浏览代码

配置中心添加
任务关闭

qinzhipeng_v@didiglobal.com 4 年之前
父节点
当前提交
08c313a800
共有 1 个文件被更改,包括 12 次插入7 次删除
  1. 12 7
      src/views/ToConfigure/components/bizConfigure.vue

+ 12 - 7
src/views/ToConfigure/components/bizConfigure.vue

@@ -44,14 +44,14 @@
     <!-- 任务关闭 -->
     <p class="biz_property">
       任务关闭
-      <i v-if="Prohibit" class="el-icon-edit icon-sty" @click="Prohibit = false" />
+      <i v-if="taskBtnShow" class="el-icon-edit icon-sty" @click="taskBtnShow = false" />
     </p>
-    <el-radio-group v-model="radio" :disabled="Prohibit" class="biz_radio">
-      <el-radio label="0"> 允许 </el-radio>
-      <el-radio label="1"> 不允许</el-radio>
+    <el-radio-group v-model="taskClose" :disabled="taskBtnShow" class="biz_radio">
+      <el-radio :label="1"> 允许 </el-radio>
+      <el-radio :label="0"> 不允许</el-radio>
     </el-radio-group>
-    <el-button v-if="!Prohibit" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
-    <el-button v-if="!Prohibit" size="small" class="biz_buttom" type="primary" @click="preservation"> 保存 </el-button>
+    <el-button v-if="!taskBtnShow" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
+    <el-button v-if="!taskBtnShow" size="small" class="biz_buttom" type="primary" @click="preservation"> 保存 </el-button>
   </div>
 </template>
 
@@ -62,7 +62,9 @@ export default {
   data() {
     return {
       radio: '1',
+      taskClose: 0, // 任务关闭code
       Prohibit: true,
+      taskBtnShow: true, // 任务关闭按钮
       Schedule: true, // 排期同步望岳
       isCkEdit: false, // checklist编辑
       ckStatus: '0', // ckecklist状态
@@ -90,18 +92,21 @@ export default {
         this.num = this.bizObj.syncScheduleDpm
         this.radio = JSON.stringify(this.bizObj.isSecret)
         this.ckStatus = '' + this.bizObj.isChecklistIntercept
+        this.taskClose = this.bizObj.isTaskClose
       }
     },
     async preservation() { // 保存业务线配置
-      const res = await settingUpdateBiz({ id: this.bizId, isSecret: Number(this.radio), bizName: this.bizObj.name, isChecklistIntercept: Number(this.ckStatus) })
+      const res = await settingUpdateBiz({ id: this.bizId, isSecret: Number(this.radio), bizName: this.bizObj.name, isChecklistIntercept: Number(this.ckStatus), isTaskClose: this.taskClose })
       if (res.code === 200) {
         this.Prohibit = true
+        this.taskBtnShow = true
         this.isCkEdit = false
         this.$message({ message: '修改成功', type: 'success', duration: 1000, offset: 150 })
       }
     },
     cancel() {
       this.Prohibit = true
+      this.taskBtnShow = true
       this.isCkEdit = false
       this.radio = JSON.stringify(this.bizObj.isSecret)
       this.ckStatus = '' + this.bizObj.isChecklistIntercept