jinlin
2024-04-07 d9461a1740bbc5d8d03258e4db0722aa9655d712
web/src/views/modules/taskReliability/TaskPhase-AddOrUpdate.vue
@@ -10,9 +10,9 @@
      <zt-form-item label="阶段时速" prop="phaseSpeed">
        <el-input v-model="dataForm.phaseSpeed"></el-input>
      </zt-form-item>
      <zt-form-item label="阶段顺序" prop="phaseSort">
<!--      <zt-form-item label="阶段顺序" prop="phaseSort">
        <el-input v-model="dataForm.phaseSort"></el-input>
      </zt-form-item>
      </zt-form-item>-->
      <zt-form-item label="备注" prop="remark">
        <el-input v-model="dataForm.remark"></el-input>
      </zt-form-item>
@@ -54,15 +54,15 @@
      // 表单提交
      async formSubmit() {
        console.log(this.time,'dataLoaded')
        if (this.time + Number(this.dataForm.phaseDurationRate > 1)) {
          this.$alert("当前运行时长比已超出,请重新设置")
          return
        }
        let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/taskReliability/TaskPhase/', this.dataForm)
        if (res.success) {
          await this.$tip.success()
          this.$refs.dialog.close()
          this.$emit('refreshDataList')
        if (this.time + Number(this.dataForm.phaseDurationRate )> 1) {
          this.$alert("请重新设置当前时长比分配")
        }else{
          let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/taskReliability/TaskPhase/', this.dataForm)
          if (res.success) {
            await this.$tip.success()
            this.$refs.dialog.close()
            this.$emit('refreshDataList')
          }
        }
      }
    }