heyang 2 년 전
부모
커밋
dedeaf89d3
2개의 변경된 파일35개의 추가작업 그리고 12개의 파일을 삭제
  1. 8 1
      src/views/secureAccess/approval/passed.vue
  2. 27 11
      src/views/securityCheck/checkRecord/unsubmittedInfo.vue

+ 8 - 1
src/views/secureAccess/approval/passed.vue

@@ -214,8 +214,15 @@ import {
       },
       /**查询专业*/
       getMajorList() {
+        let _this=this;
+        this.majorList=[];
         majorListPower().then(response => {
-          this.majorList = response.rows;
+          for(let i=0;i<response.rows.length;i++){
+            if(response.rows[i].majorName!=null && response.rows[i].majorName!='' ){
+              _this.majorList.push(response.rows[i])
+            }
+          }
+
         });
       },
       /** 查询审批记录列表 */

+ 27 - 11
src/views/securityCheck/checkRecord/unsubmittedInfo.vue

@@ -356,7 +356,6 @@
     },
     created() {
       this.getListCheckOptionData();
-      this.getListCheckOptionTwo();
       // this.selectDeptListUserDeptId();
       this.treeselect();
     },
@@ -371,7 +370,6 @@
         this.remindOpen = false;
       },
       blurCheck(index){
-        // this.getListCheckOptionData(index);
         let list = JSON.parse(JSON.stringify(this.checkOptionList));
         list[index] = JSON.parse(JSON.stringify(this.defaultCheckOptionList));
         this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)))
@@ -469,17 +467,25 @@
             }
           }
           for(let i=0;i<obj.yhlist.length;i++){
+            let newObj = {};
             if(obj.yhlist[i].isLingshi == 1){
-              let list = JSON.parse(JSON.stringify(self.checkOptionList));
-              let newObj = {
-                id:parseInt(obj.yhlist[i].jcxId+''),
-                name:obj.yhlist[i].jcxName,
-              }
-              list.push(newObj);
-              self.$set(self,'checkOptionList',JSON.parse(JSON.stringify(list)));
+              // let newObj = {
+              //   id:parseInt(obj.yhlist[i].jcxId+''),
+              //   name:obj.yhlist[i].jcxName,
+              // }
+              newObj.id=parseInt(obj.yhlist[i].jcxId+'')
+              newObj.name=obj.yhlist[i].jcxName
+              // console.log('list',list);
+              // list.push(newObj);
+              // self.$set(self,'checkOptionList',JSON.parse(JSON.stringify(list)));
+              // list.push('self.checkOptionList',self.checkOptionList);
               self.temporaryIdList.push(obj.yhlist[i].jcxId);
             }
-            self.getListCheckOption();
+            if (newObj.id){
+              self.getListCheckOption(newObj);
+            }else{
+              self.getListCheckOption();
+            }
           }
           console.log(obj)
           let newOjb = obj.record;
@@ -699,8 +705,13 @@
                 id:response.data.id,
                 name:response.data.name,
               };
+              console.log('this.openIndex',this.openIndex)
+              console.log('list',list)
+              console.log('list[this.openIndex]',list[this.openIndex])
               list[this.openIndex].push(obj);
               this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)));
+              this.defaultCheckOptionList = JSON.parse(JSON.stringify(list))
+              console.log('111')
               this.temporaryIdList.push(response.data.id);
               this.$set(this.form.detailsList[this.openIndex],'jcxId',response.data.id);
               this.$set(this.form.detailsList[this.openIndex],'jcxName',response.data.name);
@@ -801,13 +812,17 @@
         }
       },
       //获取检查项
-      getListCheckOption() {
+      getListCheckOption(data) {
         let newObj = {
           level:4,
         }
         listCheckOption(newObj).then( response => {
           let list = this.getTreeData(response.data);
+          if(data){
+            list.push(data);
+          }
           this.checkOptionList.push(JSON.parse(JSON.stringify(list)));
+          console.log('this.checkOptionList',this.checkOptionList)
         });
         this.$forceUpdate();
       },
@@ -817,6 +832,7 @@
         }
         listCheckOption(newObj).then( response => {
           this.defaultCheckOptionList = this.getTreeData(response.data);
+          this.getListCheckOptionTwo();
           // let list = JSON.parse(JSON.stringify(this.checkOptionList));
           // list[index] = this.getTreeData(response.data);
           // this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)))