From 2bc59d909462d305e9c71db0c8d54b70a26c43a4 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期二, 05 三月 2024 15:15:35 +0800 Subject: [PATCH] 修改 --- src/views/notCoalMine/nTrainManage/index.vue | 5 ++ src/views/notCoalMine/nTrainManage/components/trainPlanDialog.vue | 71 +++++++++++++++++++---------------- 2 files changed, 43 insertions(+), 33 deletions(-) diff --git a/src/views/notCoalMine/nTrainManage/components/trainPlanDialog.vue b/src/views/notCoalMine/nTrainManage/components/trainPlanDialog.vue index e73e276..5b2c8ca 100644 --- a/src/views/notCoalMine/nTrainManage/components/trainPlanDialog.vue +++ b/src/views/notCoalMine/nTrainManage/components/trainPlanDialog.vue @@ -260,41 +260,48 @@ async submit(){ this.$refs["ruleForm"].validate(async(valid) =>{ if(valid) { - await this.submitUpload() if(this.title == '新增计划'){ - const {id,...data} = this.form - const res= await addViolation(data) - if(res.code == 200){ - this.$message({ - type:'success', - message: res.msg - }) - this.fileList = [] - this.open = false - this.$emit('getList') - }else{ - this.$message({ - type:'warning', - message: res.msg - }) - } + // const {id,...data} = this.form + // const res= await addViolation(data) + // if(res.code == 200){ + // this.$message({ + // type:'success', + // message: res.msg + // }) + // this.fileList = [] + // this.open = false + // this.$emit('getList') + // }else{ + // this.$message({ + // type:'warning', + // message: res.msg + // }) + // } + this.form['info'] = '--' + this.form['startTime'] = '2024-02-24' + this.form['endTime'] ='2024-03-05' + this.form['sheet'] = '19' + this.form['num'] ='19' + this.form['passNum'] = '19' + this.$emit('addRecord',this.form) }else{ - const res= await editViolation(this.form) - if(res.code == 200){ - this.$message({ - type:'success', - message: res.msg - }) - this.fileList = [] - this.open = false - this.$emit('getList') - }else{ - this.$message({ - type:'warning', - message: res.msg - }) - } + // const res= await editViolation(this.form) + // if(res.code == 200){ + // this.$message({ + // type:'success', + // message: res.msg + // }) + // this.fileList = [] + // this.open = false + // this.$emit('getList') + // }else{ + // this.$message({ + // type:'warning', + // message: res.msg + // }) + // } } + this.handleClose() }else{ this.$message({ type:'warning', diff --git a/src/views/notCoalMine/nTrainManage/index.vue b/src/views/notCoalMine/nTrainManage/index.vue index 476f215..30df1d9 100644 --- a/src/views/notCoalMine/nTrainManage/index.vue +++ b/src/views/notCoalMine/nTrainManage/index.vue @@ -101,7 +101,7 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> - <trainPlan-dialog ref="trainPlanDialog" @getList="getList" :typeList="typeList"></trainPlan-dialog> + <trainPlan-dialog ref="trainPlanDialog" @getList="getList" :typeList="typeList" @addRecord="addNew"></trainPlan-dialog> <el-dialog title="培训记录" :visible.sync="recordDialog" @@ -280,6 +280,9 @@ openRecord(){ this.recordDialog = true }, + addNew(data){ + this.dataList.unshift(data) + }, handleDelete(index){ this.$confirm('此操作将永久删除该条数据, 是否继续?', '提示', { confirmButtonText: '确定', -- Gitblit v1.9.2