Преглед на файлове

修改测试计划编辑修改--及增加清空组织架构和全选组织架构方法

plg преди 3 месеца
родител
ревизия
3b4b083295
променени са 3 файла, в които са добавени 35 реда и са изтрити 17 реда
  1. 33 13
      src/components/PlanRegister.vue
  2. 1 1
      src/views/manage/channelInfo/invite.vue
  3. 1 3
      src/views/manage/generalSituation.vue

+ 33 - 13
src/components/PlanRegister.vue

@@ -35,8 +35,8 @@
                 <el-input v-model="ruleForm.planName"></el-input>
               </el-form-item>
               <!-- <el-button v-show="true">asasas</el-button> -->
-              <div  v-if="userInfo.roleType != '3'">
-                <el-form-item label="测评对象" prop="planType" >
+              <div v-if="userInfo.roleType != '3'">
+                <el-form-item label="测评对象" prop="planType">
                   <el-radio-group v-model="ruleForm.planType" @change="teacherChange">
                     <el-radio label="1">教师</el-radio>
                     <el-radio label="0">学生</el-radio>
@@ -100,7 +100,22 @@
                   </el-row>
                 </el-form-item>
               </div>
-
+              <el-button
+                type="info"
+                style="line-height: 10px; margin-top: 10px; font-size: 12px"
+                round
+                size="mini"
+                @click="selectAllDataOrg()"
+                >全选组织架构</el-button
+              >
+              <el-button
+                type="info"
+                style="line-height: 10px; margin-top: 10px; font-size: 12px"
+                round
+                size="mini"
+                @click="clearDataOrg()"
+                >清空组织架构</el-button
+              >
               <div style="display: flex">
                 <el-form-item label="组织架构" prop="checkedList">
                   <el-tree
@@ -114,13 +129,6 @@
                   >
                   </el-tree>
                 </el-form-item>
-                <el-button
-                  type="info"
-                  style="height: 100%; margin-top: 20px"
-                  round
-                  @click="clearDataOrg()"
-                  >清空组织架构</el-button
-                >
               </div>
 
               <!-- <el-button @click="getCheckedNodes"> 获取已选 </el-button> -->
@@ -539,7 +547,8 @@ export default {
               let resultRes = this.deleteChildren(forRes);
               let levelList = this.markersFun(resultRes, 1);
               //修改测试计划
-
+              let listOrg = levelList[0].children;
+              this.treeData = listOrg;
               //判断选择时教师还是学生
               if (this.ruleForm.planType == "1") {
                 let listOrg = levelList[0].children;
@@ -551,7 +560,6 @@ export default {
                 this.treeData = listOrg.filter((item) => {
                   return item.extend != -1;
                 });
-                // this.treeData = levelList;
               }
 
               //
@@ -705,6 +713,7 @@ export default {
       this.id = val.id;
       this.dialogVisible = true;
       this.isView = false;
+      this.ruleForm.planType = val.planType;
       this.ruleForm.planName = val.planName;
       this.ruleForm.endTime = val.planEndTime;
       //将配置计划置空
@@ -752,12 +761,23 @@ export default {
             //
             listOrg.push(res.data.orgEntityList[i].orgNo);
           }
-
+          //  debugger;
           this.ruleForm.checkedList = listOrg;
           this.$refs.tree.setCheckedKeys(this.ruleForm.checkedList);
         }
       });
     },
+    //全选组织架构
+    selectAllDataOrg() {
+
+      let list = [];
+      for (let i = 0; i < this.treeData.length; i++) {
+        list.push(this.treeData[i].orgNo);
+      }
+      this.ruleForm.checkedList = list;
+      this.$refs.tree.setCheckedKeys(this.ruleForm.checkedList);
+    },
+    //清空组织架构
     clearDataOrg() {
       this.grade = [];
       this.instructor = [];

+ 1 - 1
src/views/manage/channelInfo/invite.vue

@@ -159,7 +159,7 @@
                 </div>
                 <div
                   class="detail_button"
-                  v-show="scope.row.planStatus == '1'"
+                  v-show="scope.row.planStatus == '1'&&userInfo.roleType!='5'"
                   @click="editUser(scope.row)"
                 >
                   <img src="../../../assets/img/table/edit.png" />

+ 1 - 3
src/views/manage/generalSituation.vue

@@ -560,8 +560,7 @@ export default {
       }, 1000);
     },
     queryDetail() {
-      console.log(this.planData);
-      debugger;
+
       this.$refs.register.open(this.planData);
     },
     //根据组织编号查询总人数
@@ -610,7 +609,6 @@ export default {
               );
             });
             let list2 = Object.fromEntries(list1);
-            debugger;
             this.planData = list2;
             //调用各个专业不同总分人数
             // this.isScore();