马宇豪
2024-03-05 2bc59d909462d305e9c71db0c8d54b70a26c43a4
修改
已修改2个文件
76 ■■■■■ 文件已修改
src/views/notCoalMine/nTrainManage/components/trainPlanDialog.vue 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/notCoalMine/nTrainManage/index.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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')
            // 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{
              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
            //   })
            // }
            }
          }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
              })
            }
          }
          this.handleClose()
        }else{
          this.$message({
            type:'warning',
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: '确定',