Merge branch 'master' into xin
This commit is contained in:
@ -1,3 +1,11 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2020-09-01 20:25:37
|
||||
* @LastEditTime: 2020-09-01 20:27:37
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: \ruoyi-ui\src\permission.js
|
||||
*/
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import {
|
||||
@ -14,7 +22,7 @@ NProgress.configure({
|
||||
})
|
||||
|
||||
//const whiteList = ['/login', '/auth-redirect', '/bind', '/register']
|
||||
const whiteList = ['/login', '/experience/apply/', '/experience/result/', '/experience/content/', '/activity', 'week', 'month', 'term', 'play']
|
||||
const whiteList = ['/login', '/experience/apply/', '/experience/result/', '/experience/content/']
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
NProgress.start()
|
||||
|
@ -322,6 +322,21 @@ export const constantRoutes = [{
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/benyi_course/thememonthplanprint',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'table/:id',
|
||||
component: () =>
|
||||
import('@/views/benyi/thememonthplan/table'),
|
||||
name: 'Thememonthplan2',
|
||||
meta: {
|
||||
title: '主题整合月计划(表格)',
|
||||
icon: ''
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/benyi_course/math',
|
||||
component: Layout,
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 打印类属性、方法定义
|
||||
/* eslint-disable */
|
||||
const Print = function (dom, options) {
|
||||
const Print =function(dom, options) {
|
||||
if (!(this instanceof Print)) return new Print(dom, options);
|
||||
|
||||
this.options = this.extend({
|
||||
@ -10,8 +10,7 @@ const Print = function (dom, options) {
|
||||
if ((typeof dom) === "string") {
|
||||
this.dom = document.querySelector(dom);
|
||||
} else {
|
||||
this.isDOM(dom)
|
||||
this.dom = this.isDOM(dom) ? dom : dom.$el;
|
||||
this.dom = dom;
|
||||
}
|
||||
|
||||
this.init();
|
||||
@ -44,7 +43,7 @@ Print.prototype = {
|
||||
var textareas = document.querySelectorAll('textarea');
|
||||
var selects = document.querySelectorAll('select');
|
||||
|
||||
for (var k = 0; k < inputs.length; k++) {
|
||||
for (var k in inputs) {
|
||||
if (inputs[k].type == "checkbox" || inputs[k].type == "radio") {
|
||||
if (inputs[k].checked == true) {
|
||||
inputs[k].setAttribute('checked', "checked")
|
||||
@ -53,18 +52,16 @@ Print.prototype = {
|
||||
}
|
||||
} else if (inputs[k].type == "text") {
|
||||
inputs[k].setAttribute('value', inputs[k].value)
|
||||
} else {
|
||||
inputs[k].setAttribute('value', inputs[k].value)
|
||||
}
|
||||
}
|
||||
|
||||
for (var k2 = 0; k2 < textareas.length; k2++) {
|
||||
for (var k2 in textareas) {
|
||||
if (textareas[k2].type == 'textarea') {
|
||||
textareas[k2].innerHTML = textareas[k2].value
|
||||
}
|
||||
}
|
||||
|
||||
for (var k3 = 0; k3 < selects.length; k3++) {
|
||||
for (var k3 in selects) {
|
||||
if (selects[k3].type == 'select-one') {
|
||||
var child = selects[k3].children;
|
||||
for (var i in child) {
|
||||
@ -78,48 +75,26 @@ Print.prototype = {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 包裹要打印的元素
|
||||
// fix: https://github.com/xyl66/vuePlugs_printjs/issues/36
|
||||
return this.wrapperRefDom(this.dom).outerHTML;
|
||||
},
|
||||
// 向父级元素循环,包裹当前需要打印的元素
|
||||
// 防止根级别开头的 css 选择器不生效
|
||||
wrapperRefDom: function (refDom) {
|
||||
let prevDom = null
|
||||
let currDom = refDom
|
||||
while (currDom && currDom.tagName.toLowerCase() !== 'body') {
|
||||
if (prevDom) {
|
||||
let element = currDom.cloneNode(false)
|
||||
element.appendChild(prevDom)
|
||||
prevDom = element
|
||||
} else {
|
||||
prevDom = currDom.cloneNode(true)
|
||||
}
|
||||
|
||||
currDom = currDom.parentElement
|
||||
}
|
||||
|
||||
return currDom.tagName.toLowerCase() === 'body' ? currDom : prevDom
|
||||
return this.dom.outerHTML;
|
||||
},
|
||||
|
||||
writeIframe: function (content) {
|
||||
var w, doc, iframe = document.createElement('iframe'),
|
||||
f = document.body.appendChild(iframe);
|
||||
iframe.id = "myIframe";
|
||||
//iframe.style = "position:absolute;width:0;height:0;top:-10px;left:-10px;";
|
||||
iframe.setAttribute('style', 'position:absolute;width:0;height:0;top:-10px;left:-10px;');
|
||||
iframe.style = "position:absolute;width:0;height:0;top:-10px;left:-10px;";
|
||||
|
||||
w = f.contentWindow || f.contentDocument;
|
||||
doc = f.contentDocument || f.contentWindow.document;
|
||||
doc.open();
|
||||
doc.write(content);
|
||||
doc.close();
|
||||
var _this = this
|
||||
iframe.onload = function(){
|
||||
_this.toPrint(w);
|
||||
setTimeout(function () {
|
||||
document.body.removeChild(iframe)
|
||||
}, 100)
|
||||
}
|
||||
this.toPrint(w);
|
||||
|
||||
setTimeout(function () {
|
||||
document.body.removeChild(iframe)
|
||||
}, 100)
|
||||
},
|
||||
|
||||
toPrint: function (frameWindow) {
|
||||
@ -138,14 +113,7 @@ Print.prototype = {
|
||||
} catch (err) {
|
||||
console.log('err', err);
|
||||
}
|
||||
},
|
||||
isDOM: (typeof HTMLElement === 'object') ?
|
||||
function (obj) {
|
||||
return obj instanceof HTMLElement;
|
||||
} :
|
||||
function (obj) {
|
||||
return obj && typeof obj === 'object' && obj.nodeType === 1 && typeof obj.nodeName === 'string';
|
||||
}
|
||||
}
|
||||
};
|
||||
const MyPlugin = {}
|
||||
MyPlugin.install = function (Vue, options) {
|
||||
|
@ -28,7 +28,7 @@
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form-item>-->
|
||||
<el-form-item label="游戏形式" prop="type">
|
||||
<el-select v-model="queryParams.type" placeholder="请选择游戏形式" clearable size="small">
|
||||
<el-option
|
||||
@ -94,7 +94,7 @@
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择创建时间"
|
||||
></el-date-picker>
|
||||
</el-form-item> -->
|
||||
</el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@ -108,7 +108,7 @@
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['benyi:plan:add']"
|
||||
v-hasPermi="['benyi:math:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -118,7 +118,7 @@
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['benyi:plan:edit']"
|
||||
v-hasPermi="['benyi:math:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -128,18 +128,9 @@
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['benyi:plan:remove']"
|
||||
v-hasPermi="['benyi:math:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['benyi:plan:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="planList" @selection-change="handleSelectionChange">
|
||||
@ -148,16 +139,16 @@
|
||||
<el-table-column label="游戏名称" align="center" prop="name" />
|
||||
<el-table-column label="排序" align="center" prop="sort" />
|
||||
<el-table-column label="游戏形式" align="center" :formatter="typeFormat" prop="type" />
|
||||
<el-table-column label="游戏目标" align="center" prop="target" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="游戏目标" align="center" prop="target" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="游戏准备" align="center" prop="prepare" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="游戏过程" align="center" prop="process" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="游戏过程" align="center" prop="process" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="本周其它目标" align="center" prop="otherTarget" />
|
||||
<el-table-column label="建议" align="center" prop="suggest" />
|
||||
<el-table-column label="创建时间" align="center" prop="createtime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createtime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table-column>-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -165,14 +156,14 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['benyi:plan:edit']"
|
||||
v-hasPermi="['benyi:math:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['benyi:plan:remove']"
|
||||
v-hasPermi="['benyi:math:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -246,7 +237,6 @@ import {
|
||||
delPlan,
|
||||
addPlan,
|
||||
updatePlan,
|
||||
exportPlan
|
||||
} from "@/api/benyi/plan";
|
||||
import { listMath, getMath } from "@/api/benyi/math";
|
||||
import Editor from "@/components/Editor";
|
||||
@ -254,7 +244,7 @@ import Editor from "@/components/Editor";
|
||||
export default {
|
||||
name: "Plan",
|
||||
components: {
|
||||
Editor
|
||||
Editor,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -293,28 +283,40 @@ export default {
|
||||
process: undefined,
|
||||
otherTarget: undefined,
|
||||
suggest: undefined,
|
||||
createtime: undefined
|
||||
createtime: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [{ required: true, message: "游戏名称不能为空", trigger: "blur" }],
|
||||
name: [
|
||||
{ required: true, message: "游戏名称不能为空", trigger: "blur" },
|
||||
],
|
||||
sort: [{ required: true, message: "序号不能为空", trigger: "blur" }],
|
||||
type: [{ required: true, message: "游戏形式不能为空", trigger: "blur" }],
|
||||
target: [{ required: true, message: "游戏目标不能为空", trigger: "blur" }],
|
||||
prepare: [{ required: true, message: "游戏准备不能为空", trigger: "blur" }],
|
||||
process: [{ required: true, message: "游戏过程不能为空", trigger: "blur" }],
|
||||
otherTarget: [{ required: true, message: "本周其它目标不能为空", trigger: "blur" }],
|
||||
suggest: [{ required: true, message: "建议不能为空", trigger: "blur" }]
|
||||
}
|
||||
type: [
|
||||
{ required: true, message: "游戏形式不能为空", trigger: "blur" },
|
||||
],
|
||||
target: [
|
||||
{ required: true, message: "游戏目标不能为空", trigger: "blur" },
|
||||
],
|
||||
prepare: [
|
||||
{ required: true, message: "游戏准备不能为空", trigger: "blur" },
|
||||
],
|
||||
process: [
|
||||
{ required: true, message: "游戏过程不能为空", trigger: "blur" },
|
||||
],
|
||||
otherTarget: [
|
||||
{ required: true, message: "本周其它目标不能为空", trigger: "blur" },
|
||||
],
|
||||
suggest: [{ required: true, message: "建议不能为空", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const mathId = this.$route.params && this.$route.params.id;
|
||||
this.getMath(mathId);
|
||||
this.getMaths();
|
||||
this.getDicts("sys_math_type").then(response => {
|
||||
this.getDicts("sys_math_type").then((response) => {
|
||||
this.typeOptions = response.data;
|
||||
});
|
||||
},
|
||||
@ -322,7 +324,7 @@ export default {
|
||||
/** 查询游戏数学方案列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listPlan(this.queryParams).then(response => {
|
||||
listPlan(this.queryParams).then((response) => {
|
||||
this.planList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@ -344,7 +346,7 @@ export default {
|
||||
},
|
||||
/** 查询游戏数学名称详细 */
|
||||
getMath(mathId) {
|
||||
getMath(mathId).then(response => {
|
||||
getMath(mathId).then((response) => {
|
||||
this.queryParams.mathid = response.data.id;
|
||||
this.defaultMath = response.data.id;
|
||||
this.getList();
|
||||
@ -352,7 +354,7 @@ export default {
|
||||
},
|
||||
//获取游戏数学名称列表
|
||||
getMaths() {
|
||||
listMath().then(response => {
|
||||
listMath().then((response) => {
|
||||
this.mathOptions = response.rows;
|
||||
});
|
||||
},
|
||||
@ -374,7 +376,7 @@ export default {
|
||||
process: undefined,
|
||||
otherTarget: undefined,
|
||||
suggest: undefined,
|
||||
createtime: undefined
|
||||
createtime: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -391,7 +393,7 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id);
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
@ -406,26 +408,26 @@ export default {
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getPlan(id).then(response => {
|
||||
getPlan(id).then((response) => {
|
||||
this.form = response.data;
|
||||
// console.log(this.form);
|
||||
this.typeOptions = response.types;
|
||||
// console.log(this.typeOptions);
|
||||
this.form.type = response.typeIds;
|
||||
|
||||
|
||||
this.open = true;
|
||||
this.title = "修改游戏数学方案";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
var arrtype = this.form.type;
|
||||
this.form.type = arrtype.join(";");
|
||||
|
||||
|
||||
if (this.form.id != undefined) {
|
||||
updatePlan(this.form).then(response => {
|
||||
updatePlan(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -433,7 +435,7 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addPlan(this.form).then(response => {
|
||||
addPlan(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
@ -453,34 +455,18 @@ export default {
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(function() {
|
||||
.then(function () {
|
||||
return delPlan(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(function() {});
|
||||
.catch(function () {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm("是否确认导出所有游戏数学方案数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(function() {
|
||||
return exportPlan(queryParams);
|
||||
})
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
@ -53,7 +53,7 @@
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:activity:add']"
|
||||
v-hasPermi="['benyi:theme:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -63,7 +63,7 @@
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:activity:edit']"
|
||||
v-hasPermi="['benyi:theme:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -73,7 +73,7 @@
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:activity:remove']"
|
||||
v-hasPermi="['benyi:theme:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -92,14 +92,14 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:activity:edit']"
|
||||
v-hasPermi="['benyi:theme:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:activity:remove']"
|
||||
v-hasPermi="['benyi:theme:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -114,7 +114,7 @@
|
||||
<!-- <el-table-column label="家长支持" align="center" prop="support" />
|
||||
<el-table-column label="备注" align="center" prop="remarks" />-->
|
||||
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -140,6 +140,13 @@
|
||||
v-hasPermi="['benyi:themetermplan:edit']"
|
||||
v-show="isShow(scope.row)"
|
||||
>提交</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['benyi:themetermplan:query']"
|
||||
>预览</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -471,6 +478,13 @@ export default {
|
||||
})
|
||||
.catch(function () {});
|
||||
},
|
||||
/** 预览按钮操作 */
|
||||
handleView(row) {
|
||||
const id = row.id;
|
||||
this.$router.push({
|
||||
path: "/benyi_course/thememonthplanprint/table/"+id,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -1,16 +1,305 @@
|
||||
<template>
|
||||
<div class="table-container">
|
||||
343
|
||||
<div class="table-container" ref="printMe">
|
||||
<h2 class="title">{{title}}</h2>
|
||||
<div class="table">
|
||||
<div class="print no-print">
|
||||
<el-button type="primary" plain size="mini" icon="el-icon-printer" @click="prints"></el-button>
|
||||
</div>
|
||||
<table>
|
||||
<tr class="align-center">
|
||||
<!-- <td v-for="h in headerData" :key="h.title">
|
||||
<b class="table-title">{{h.title}}</b>
|
||||
{{h.name}}
|
||||
</td>-->
|
||||
<td>
|
||||
<b class="table-title">班级:</b>
|
||||
{{classname}}
|
||||
</td>
|
||||
<td>
|
||||
<b class="table-title">月份:</b>
|
||||
{{month}}
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<b class="table-title">月主题:</b>
|
||||
{{monththeme}}
|
||||
</td>
|
||||
<td>
|
||||
<b class="table-title">制表人:</b>
|
||||
{{tbr}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="align-center table-bg">
|
||||
<td v-for="h in bodyData.title" :key="h.prop">
|
||||
<b>{{h.label}}</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="item in bodyData.monthplanitemList" :key="item.id">
|
||||
<td v-if="item.theme" :rowspan="bodyData.monthplanitemList.length" class="align-center">
|
||||
<span>{{monththeme}}</span>
|
||||
</td>
|
||||
<td class="align-center">{{item.zc}}</td>
|
||||
<td class="align-center">{{item.starttime}}---{{item.endtime}}</td>
|
||||
<td class="align-center">{{themeactivityFormat(item.activityid)}}</td>
|
||||
<td>{{item.jzzc}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="align-center">本月微型课程</td>
|
||||
<td colspan="4" v-html="wxkc"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="align-center">备注</td>
|
||||
<td colspan="4">{{bz}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="align-center">教学主管审批</td>
|
||||
<td colspan="4">{{spyj}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- <p
|
||||
class="warning"
|
||||
>注:此周计划表不需要发给家长,只需上报教学主管。制定班级一周教学与活动计划表,请使用班级管理模块中“教学与游戏活动周计划表”,以上报教学主管和作为周计划通知发给家长。</p>-->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listActivityByThemeId } from "@/api/benyi/activity";
|
||||
import { listMonthplan, getMonthplan } from "@/api/benyi/thememonthplan";
|
||||
import { listMonthplanitem } from "@/api/benyi/thememonthplanitem";
|
||||
import { listThemeByIds, listThemeByActivityIds } from "@/api/benyi/theme";
|
||||
|
||||
export default {
|
||||
name: 'MonthTable',
|
||||
name: "MonthTable",
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
tableData: [],
|
||||
title: "",
|
||||
month: "",
|
||||
classname: "",
|
||||
tbr: "",
|
||||
monththeme: "",
|
||||
wxkc: "",
|
||||
bz: "",
|
||||
spyj: "",
|
||||
//主题活动
|
||||
themeactivityOptions: [],
|
||||
//根据活动id获取的theme名称
|
||||
themenamebyactivityids: "",
|
||||
bodyData: {
|
||||
title: [
|
||||
{
|
||||
label: "主题",
|
||||
prop: "theme",
|
||||
},
|
||||
{
|
||||
label: "周次",
|
||||
prop: "day",
|
||||
},
|
||||
{
|
||||
label: "时间",
|
||||
prop: "name",
|
||||
},
|
||||
{
|
||||
label: "活动名称",
|
||||
prop: "term",
|
||||
},
|
||||
{
|
||||
label: "家长支持",
|
||||
prop: "help",
|
||||
},
|
||||
],
|
||||
monthplanitemList: [
|
||||
{
|
||||
theme: "",
|
||||
},
|
||||
// {
|
||||
// day: "周二",
|
||||
// name: "活动",
|
||||
// term: "同质",
|
||||
// },
|
||||
// {
|
||||
// day: "周三",
|
||||
// name: "活动",
|
||||
// term: "同质",
|
||||
// },
|
||||
// {
|
||||
// day: "周四",
|
||||
// name: "活动",
|
||||
// term: "同质",
|
||||
// },
|
||||
// {
|
||||
// day: "周五",
|
||||
// name: "活动",
|
||||
// term: "同质",
|
||||
// },
|
||||
],
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
mpid: undefined,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const thememonthplanid = this.$route.params && this.$route.params.id;
|
||||
this.getThemeMonthPlan(thememonthplanid);
|
||||
},
|
||||
methods: {
|
||||
getThemeMonthPlan(thememonthplanid) {
|
||||
getMonthplan(thememonthplanid).then((response) => {
|
||||
this.queryParams.mpid = response.data.id;
|
||||
this.title = response.data.name;
|
||||
this.month = response.data.month;
|
||||
this.classname = response.classname;
|
||||
this.tbr = response.createusername;
|
||||
this.wxkc = response.data.wxkc;
|
||||
this.bz = response.data.remark;
|
||||
this.spyj = response.data.shyj;
|
||||
|
||||
this.themeFormat(response.data.themes);
|
||||
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
//主题翻译
|
||||
async themeFormat(themeids) {
|
||||
var themename = "";
|
||||
var ids = themeids.split(";");
|
||||
var array = [];
|
||||
//console.log(ids);
|
||||
ids.forEach(function (value, key, arr) {
|
||||
//console.log(value); // 结果依次为1,2,3
|
||||
if (value != "") {
|
||||
array.push(parseInt(value));
|
||||
}
|
||||
});
|
||||
|
||||
if (array.length > 0) {
|
||||
await listThemeByIds(array).then((response) => {
|
||||
response.rows.forEach(function (value1, key1, arr1) {
|
||||
themename = themename + value1.name + ";";
|
||||
});
|
||||
});
|
||||
//(themename);
|
||||
this.monththeme = themename;
|
||||
}
|
||||
},
|
||||
/** 查询主题整合周计划明细列表 */
|
||||
getList() {
|
||||
//console.log(this.queryParams.wpid);
|
||||
listMonthplanitem(this.queryParams).then((response) => {
|
||||
this.bodyData.monthplanitemList = response.rows;
|
||||
|
||||
//获取所有的活动id
|
||||
var activityIds = "";
|
||||
response.rows.forEach(function (value, key, arr) {
|
||||
if (value.activityid != null) {
|
||||
activityIds = activityIds + value.activityid + ";";
|
||||
}
|
||||
});
|
||||
var array = [];
|
||||
activityIds.split(";").forEach(function (value, key, arr) {
|
||||
if (value != "") {
|
||||
array.push(parseInt(value));
|
||||
}
|
||||
});
|
||||
|
||||
if (response.rows.length > 0) {
|
||||
this.getThemeActivityList(array);
|
||||
}
|
||||
|
||||
this.bodyData.monthplanitemList[0].theme = activityIds;
|
||||
});
|
||||
},
|
||||
// 主题--字典状态字典翻译
|
||||
themeactivityFormat(activityid) {
|
||||
if (activityid != null) {
|
||||
var ilength = activityid.split(";").length - 1;
|
||||
var names = "";
|
||||
for (var i = 1; i < ilength; i++) {
|
||||
names =
|
||||
names +
|
||||
this.selectMoeDictLabel(
|
||||
this.themeactivityOptions,
|
||||
activityid.split(";")[i]
|
||||
) +
|
||||
";";
|
||||
}
|
||||
//this.selectDictLabel(this.scopeOptions, row.xnxq);
|
||||
return names;
|
||||
}
|
||||
return "";
|
||||
},
|
||||
//主题活动
|
||||
getThemeActivityList(themeid) {
|
||||
listActivityByThemeId(themeid).then((response) => {
|
||||
//console.log(response.rows);
|
||||
this.themeactivityOptions = response.rows;
|
||||
});
|
||||
},
|
||||
//打印
|
||||
prints() {
|
||||
//console.log(this.$refs.printMe);
|
||||
this.$print(this.$refs.printMe);
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.table-container {
|
||||
padding: 30px 10%;
|
||||
.title {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
padding: 15px 0;
|
||||
}
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
.table {
|
||||
font-size: 14px;
|
||||
.print {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table td {
|
||||
border: #ccc solid 1px;
|
||||
line-height: 24px;
|
||||
padding: 8px 5px;
|
||||
}
|
||||
.table-title {
|
||||
font-size: 16px;
|
||||
}
|
||||
.table-bg {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
}
|
||||
.warning {
|
||||
padding-top: 20px;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
@media print {
|
||||
.table-container {
|
||||
padding: 30px 0;
|
||||
}
|
||||
.print {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
/*去除页眉页脚*/
|
||||
@page {
|
||||
size: auto; /* auto is the initial value */
|
||||
margin: 3mm; /* this affects the margin in the printer settings */
|
||||
}
|
||||
</style>
|
@ -140,7 +140,6 @@
|
||||
icon="el-icon-view"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['benyi:themeweekplan:query']"
|
||||
v-show="isShow(scope.row)"
|
||||
>预览</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -12,6 +12,7 @@ import com.ruoyi.project.benyi.service.IByThemeTermplanitemService;
|
||||
import com.ruoyi.project.benyi.service.IByThemeMonthplanitemService;
|
||||
import com.ruoyi.project.common.SchoolCommon;
|
||||
import com.ruoyi.project.system.service.IByClassService;
|
||||
import com.ruoyi.project.system.service.ISysUserService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -52,6 +53,8 @@ public class ByThemeMonthplanController extends BaseController {
|
||||
private IByThemeTermplanitemService byThemeTermplanitemService;
|
||||
@Autowired
|
||||
private IByThemeMonthplanitemService byThemeonthplanitemService;
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
/**
|
||||
* 查询主题整合月计划列表
|
||||
@ -89,7 +92,12 @@ public class ByThemeMonthplanController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
return AjaxResult.success(byThemeMonthplanService.selectByThemeMonthplanById(id));
|
||||
AjaxResult ajax=AjaxResult.success();
|
||||
ByThemeMonthplan byThemeMonthplan=byThemeMonthplanService.selectByThemeMonthplanById(id);
|
||||
ajax.put(AjaxResult.DATA_TAG, byThemeMonthplan);
|
||||
ajax.put("classname",byClassService.selectByClassById(byThemeMonthplan.getClassid()).getBjmc());
|
||||
ajax.put("createusername",userService.selectUserById(byThemeMonthplan.getCreateuserid()).getNickName());
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user