gjy пре 3 година
родитељ
комит
4be85816ae
3 измењених фајлова са 21 додато и 8 уклоњено
  1. 0 1
      .gitignore
  2. 20 6
      src/views/organizationNew/shoreMemberAdd.vue
  3. 1 1
      vue.config.js

+ 0 - 1
.gitignore

@@ -11,7 +11,6 @@ deployment.yaml
 tests/**/coverage/
 tests/e2e/reports
 selenium-debug.log
-config
 # Editor directories and files
 .idea
 .vscode

+ 20 - 6
src/views/organizationNew/shoreMemberAdd.vue

@@ -239,10 +239,10 @@
                        node-key="id"
                        :load="loadNode"
                        lazy>
+                       <!-- @change="val => radioGroupChange(data, val, node)" -->
                 <template slot-scope="{ node, data }">
                   <span v-if="node.level === 2">
-                    <el-checkbox-group v-model="data.check"
-                                       @change="val => radioGroupChange(data, val, node)">
+                    <el-checkbox-group v-model="data.check" @change="val => radioGroupChange(data, val, node)">
                       <el-checkbox class="zhiwuChecks"
                                    v-for="item in data.roid"
                                    :key="item.roleId"
@@ -668,7 +668,17 @@ export default {
       let res = [];
       Object.keys(this.check).forEach((value, index) => {
         this.check[value].forEach(ite => {
-          res.push(ite);
+          console.log(ite,res)
+          // if(res.length>0){
+          //   if(res.every( function( item, index, array ){ return item.roleId!=ite.roleId})){
+          //     console.log(ite)
+          //     res.push(ite);
+          //   }else{
+          //     console.log(ite)
+          //   }
+          // }else{
+            res.push(ite);
+          // }
         });
       });
       let _a = res.filter(v => v);
@@ -742,8 +752,12 @@ export default {
       }
     },
     radioGroupChange (data, val, node) {
-      this.$set(this.check, data.id, val);
-	  console.log(this.check)
+      this.check=[]
+      for (let i = 0; i < val.length; i++) {
+        data.id=val[i].deptId+'_'+val[i].roleId
+        this.$set(this.check, data.id, [val[i]]);
+      }
+      // console.log(this.check)
       this.aaabbb[data.id] = val;
     },
     //tree
@@ -1072,6 +1086,7 @@ export default {
         if (!this.ruleForm.electronicSignature) {
           this.ruleForm.electronicSignature = this.url;
         }
+        // console.log(response)
         // TODO: 此处存在疑问点?
         this.zhiwu1.roleName = response.majorRole
           ? response.majorRole.roleName
@@ -1502,7 +1517,6 @@ export default {
           if (!this.data1.find(item => item.roleId === this.zhiwu1.roleId)) {
             this.zhiwu1.roleName = null;
           }
-
           this.data1.forEach(item => {
             this.zhiwu2.forEach((gitem, gindex) => {
               if (gitem.roleId == item.roleId) {

+ 1 - 1
vue.config.js

@@ -40,7 +40,7 @@ module.exports = {
         logLevel: 'debug',
       },
       '/pb': {
-        target: 'http://192.168.1.115:8090/',
+        target: 'http://192.168.1.108:8090/',
         // target: 'http://192.168.1.122:8090/',
         // target: 'http://192.168.1.109:9100/',
         // target: 'https://standard-dev.winsea.com/',