From e81717bcd6ca26d4b0df8307eb6a30956e5e6c48 Mon Sep 17 00:00:00 2001 From: paidaxing444 <12qwaszx> Date: Fri, 6 Nov 2020 16:55:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BC=E5=84=BF=E8=AF=84=E4=BC=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/benyi/assessment/student.vue | 51 +++++++++++-------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/ruoyi-ui/src/views/benyi/assessment/student.vue b/ruoyi-ui/src/views/benyi/assessment/student.vue index 2eef76d43..1be6f526c 100644 --- a/ruoyi-ui/src/views/benyi/assessment/student.vue +++ b/ruoyi-ui/src/views/benyi/assessment/student.vue @@ -269,27 +269,38 @@ export default { // }, /** 提交按钮 */ submitForm: function () { - var items = ""; - this.checkList.forEach((item) => { - //当全选被选中的时候,循环遍历源数据,把数据的每一项加入到默认选中的数组去 - items = items + item + ","; - }); - // console.log(items); - // console.log("提交:"+this.checkList.length); - if (this.checkList.length == 0) { - this.msgError("请至少选择一项数据"); - } else { - this.form.childid = this.childId; - this.form.classid = this.classid; - this.form.items = items; - this.form.type = "Y"; - this.form.xn = this.trem; - addAssessmentchild(this.form).then((response) => { - if (response.code === 200) { - this.msgSuccess("评估成功"); + this.$confirm("确认生成图表数据?生成后数据不能取消", "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + callback: (action) => { + if (action === "confirm") { + // console.log('按下 确定') + var items = ""; + this.checkList.forEach((item) => { + //当全选被选中的时候,循环遍历源数据,把数据的每一项加入到默认选中的数组去 + items = items + item + ","; + }); + // console.log(items); + // console.log("提交:"+this.checkList.length); + if (this.checkList.length == 0) { + this.msgError("请至少选择一项数据"); + } else { + this.form.childid = this.childId; + this.form.classid = this.classid; + this.form.items = items; + this.form.type = "Y"; + this.form.xn = this.trem; + addAssessmentchild(this.form).then((response) => { + if (response.code === 200) { + this.msgSuccess("评估成功"); + } + }); + } + } else { } - }); - } + }, + }); }, handleClick(tab) { // this.activeName = tab