Browse Source

培训/演练 类型默认值联动代码提交

jingyuanchao 1 năm trước cách đây
mục cha
commit
e85492b48d
2 tập tin đã thay đổi với 16 bổ sung3 xóa
  1. 8 1
      src/views/core/drill/plan/index.vue
  2. 8 2
      src/views/core/edu/plan/index.vue

+ 8 - 1
src/views/core/drill/plan/index.vue

@@ -167,7 +167,7 @@
           </el-col>
         </el-row>
         <el-row>
-          <el-col :span="12" v-show="form.planCycle != 0&&form.issue == 0">
+          <el-col :span="12" v-show="showBuildTaskNow()">
             <el-form-item label="立即生效" prop="buildTaskNow">
               <!--              <el-checkbox v-model="form.buildTaskNow">
                               默认从下个周期...
@@ -431,6 +431,13 @@ export default {
       // this.initRoleList(this.form.execOrgType);
       // this.form.planExecOrgIdList = [];
     },
+    showBuildTaskNow(){
+      if (!this.form.id){
+        return this.form.planCycle != 0
+      }else {
+        return this.form.planCycle != 0&&this.form.issue == 0
+      }
+    },
     /** 查询机构树数据 */
     getDeptTree() {
       deptTreeSelect().then(response => {

+ 8 - 2
src/views/core/edu/plan/index.vue

@@ -216,9 +216,8 @@
             </el-form-item>
           </el-col>
         </el-row>
-
         <el-row>
-          <el-col :span="12" v-show="form.planCycle != 0&&form.issue == 0">
+          <el-col :span="12" v-show="showBuildTaskNow()">
             <el-form-item label="立即生效" prop="buildTaskNow">
               <el-checkbox v-model="form.buildTaskNow">
                 默认从下个周期生成任务,
@@ -429,6 +428,13 @@ export default {
         return v.id
       });
     },
+    showBuildTaskNow(){
+      if (!this.form.id){
+       return this.form.planCycle != 0
+      }else {
+        return this.form.planCycle != 0&&this.form.issue == 0
+      }
+    },
     /** 查询教育培训计划列表 */
     getList() {
       this.loading = true;