From 92815a54e85ab75b75dba46f22f66e17b48c2eab Mon Sep 17 00:00:00 2001 From: xinbowang <664176494@qq.com> Date: Tue, 1 Sep 2020 20:27:49 +0800 Subject: [PATCH 1/4] update --- ruoyi-ui/src/permission.js | 10 +- .../src/views/benyi/thememonthplan/table.vue | 370 +++++++++++++++++- 2 files changed, 372 insertions(+), 8 deletions(-) diff --git a/ruoyi-ui/src/permission.js b/ruoyi-ui/src/permission.js index 1a58905ce..1fc91bf77 100644 --- a/ruoyi-ui/src/permission.js +++ b/ruoyi-ui/src/permission.js @@ -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/', '/activity', '/week', '/month', '/term', '/play'] router.beforeEach((to, from, next) => { NProgress.start() diff --git a/ruoyi-ui/src/views/benyi/thememonthplan/table.vue b/ruoyi-ui/src/views/benyi/thememonthplan/table.vue index 6820556d1..3401d610d 100644 --- a/ruoyi-ui/src/views/benyi/thememonthplan/table.vue +++ b/ruoyi-ui/src/views/benyi/thememonthplan/table.vue @@ -1,16 +1,372 @@ \ No newline at end of file + + \ No newline at end of file From 2032cab48d93222a2b7ed396c1a22459a8f03d7b Mon Sep 17 00:00:00 2001 From: paidaxing444 <12qwaszx> Date: Wed, 2 Sep 2020 09:25:22 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=91=A8=E8=AE=A1=E5=88=92=E9=A2=84?= =?UTF-8?q?=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/permission.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-ui/src/permission.js b/ruoyi-ui/src/permission.js index 1fc91bf77..5a59fea77 100644 --- a/ruoyi-ui/src/permission.js +++ b/ruoyi-ui/src/permission.js @@ -22,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() From 0e5b8f77f1b04d9d9075db6469b3c98a6e70ab28 Mon Sep 17 00:00:00 2001 From: paidaxing444 <12qwaszx> Date: Wed, 2 Sep 2020 09:44:30 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=91=A8=E8=AE=A1=E5=88=92=E6=89=93?= =?UTF-8?q?=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/utils/print.js | 60 +++++++++---------------------------- 1 file changed, 14 insertions(+), 46 deletions(-) diff --git a/ruoyi-ui/src/utils/print.js b/ruoyi-ui/src/utils/print.js index 2bc2d78ca..799a33376 100644 --- a/ruoyi-ui/src/utils/print.js +++ b/ruoyi-ui/src/utils/print.js @@ -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) { From f600ffd34b1714f59325eb027eabea740a857c16 Mon Sep 17 00:00:00 2001 From: paidaxing444 <12qwaszx> Date: Thu, 3 Sep 2020 16:24:07 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9C=88=E8=AE=A1=E5=88=92=E6=89=93?= =?UTF-8?q?=E5=8D=B0=EF=BC=8C=E4=B8=BB=E9=A2=98=E6=95=B4=E5=90=88=E5=92=8C?= =?UTF-8?q?=E6=B8=B8=E6=88=8F=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/router/index.js | 15 ++ ruoyi-ui/src/views/benyi/math/plan.vue | 112 +++++------ ruoyi-ui/src/views/benyi/theme/activity.vue | 10 +- .../src/views/benyi/thememonthplan/index.vue | 16 +- .../src/views/benyi/thememonthplan/table.vue | 187 ++++++------------ .../src/views/benyi/themeweekplan/index.vue | 1 - .../ByThemeMonthplanController.java | 10 +- 7 files changed, 153 insertions(+), 198 deletions(-) diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 29b16deb8..de4b9aec6 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -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, diff --git a/ruoyi-ui/src/views/benyi/math/plan.vue b/ruoyi-ui/src/views/benyi/math/plan.vue index aaaad1610..b2518c584 100644 --- a/ruoyi-ui/src/views/benyi/math/plan.vue +++ b/ruoyi-ui/src/views/benyi/math/plan.vue @@ -28,7 +28,7 @@ size="small" @keyup.enter.native="handleQuery" /> - --> + --> - --> + --> 搜索 重置 @@ -108,7 +108,7 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['benyi:plan:add']" + v-hasPermi="['benyi:math:add']" >新增 @@ -118,7 +118,7 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['benyi:plan:edit']" + v-hasPermi="['benyi:math:edit']" >修改 @@ -128,18 +128,9 @@ size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['benyi:plan:remove']" + v-hasPermi="['benyi:math:remove']" >删除 - - 导出 - @@ -148,16 +139,16 @@ - + - + + --> @@ -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() {}); - } - } + }, }; \ No newline at end of file diff --git a/ruoyi-ui/src/views/benyi/theme/activity.vue b/ruoyi-ui/src/views/benyi/theme/activity.vue index ab57e6e36..3877a45f9 100644 --- a/ruoyi-ui/src/views/benyi/theme/activity.vue +++ b/ruoyi-ui/src/views/benyi/theme/activity.vue @@ -53,7 +53,7 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['system:activity:add']" + v-hasPermi="['benyi:theme:add']" >新增 @@ -63,7 +63,7 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['system:activity:edit']" + v-hasPermi="['benyi:theme:edit']" >修改 @@ -73,7 +73,7 @@ size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['system:activity:remove']" + v-hasPermi="['benyi:theme:remove']" >删除 @@ -92,14 +92,14 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['system:activity:edit']" + v-hasPermi="['benyi:theme:edit']" >修改 删除 diff --git a/ruoyi-ui/src/views/benyi/thememonthplan/index.vue b/ruoyi-ui/src/views/benyi/thememonthplan/index.vue index 4f73e6d69..fc59c796e 100644 --- a/ruoyi-ui/src/views/benyi/thememonthplan/index.vue +++ b/ruoyi-ui/src/views/benyi/thememonthplan/index.vue @@ -114,7 +114,7 @@ - + @@ -471,6 +478,13 @@ export default { }) .catch(function () {}); }, + /** 预览按钮操作 */ + handleView(row) { + const id = row.id; + this.$router.push({ + path: "/benyi_course/thememonthplanprint/table/"+id, + }); + }, }, }; \ No newline at end of file diff --git a/ruoyi-ui/src/views/benyi/thememonthplan/table.vue b/ruoyi-ui/src/views/benyi/thememonthplan/table.vue index 3401d610d..573e96b70 100644 --- a/ruoyi-ui/src/views/benyi/thememonthplan/table.vue +++ b/ruoyi-ui/src/views/benyi/thememonthplan/table.vue @@ -33,18 +33,18 @@ {{h.label}} - - - {{item.theme}} + + + {{monththeme}} - {{item.daytime}} / 星期{{item.zhou}} - {{themeactivityFormat(item.activityid)}} - {{fzxzFormat(item.fzxz)}} + {{item.zc}} + {{item.starttime}}---{{item.endtime}} + {{themeactivityFormat(item.activityid)}} {{item.jzzc}} 本月微型课程 - {{bz}} + 备注 @@ -63,14 +63,8 @@