Explorar o código

修改bug提交代码

zhangh %!s(int64=2) %!d(string=hai) anos
pai
achega
29ecb5c64e

+ 1 - 0
src/views/certificate/list.vue

@@ -12,6 +12,7 @@
         filterable
         style="width:300px;"
         placeholder="请选择"
+        clearable
         @change="projectChange"
       >
         <el-option

+ 22 - 26
src/views/manager/archivetree.vue

@@ -289,12 +289,10 @@
         <el-tree
           :props="dialogProps"
           show-checkbox
-          :check-strictly='true'
           :data="dialogData"
           node-key="id"
           accordion
           ref="trees"
-          @check-change="handleCheckChange"
           class="filter-tree"
         >
         </el-tree>
@@ -727,19 +725,26 @@ export default {
       })
       this.pushfileTap = true
       await this.saixuan(this.dialogData)
+      console.log(this.checkXuan);
       this.$refs.trees.setCheckedKeys(this.checkXuan);
     },
     // 赛选
     saixuan (da) {//赛选
       if (da.length > 0) {
+        let tag = true
         da.forEach(val => {
-          if (val.isDisplayTree == 1) {
+          if (val.isDisplayTree == 1 && val.hasChildren) {
+            let ks = this.saixuan(val.children)
+            if (ks) {
+              this.checkXuan.push(val.id)
+            }
+          } else if (val.isDisplayTree == 1 && !val.hasChildren) {
             this.checkXuan.push(val.id)
-          }
-          if (val.hasChildren) {
-            this.saixuan(val.children)
+          } else {
+            tag = false
           }
         })
+        return tag
       }
     },
     pushFileClose () {//弹框关闭事件
@@ -779,33 +784,24 @@ export default {
       }
     },
     saveFile () {//保存按钮
-      let arr = this.$refs.trees.getCheckedKeys()
-      console.log(arr);
+      let zi = this.$refs.trees.getCheckedKeys() //返回选中子节点的key
+      let fu = this.$refs.trees.getHalfCheckedKeys()//返回选中子节点的父节点的key
+      let arr = [...zi, ...fu]
       if (arr.length > 0) {
-        // this.$refs.trees.setCheckedKeys(this.checkXuan);
-        // let ids = ''
-        // arr.forEach((val, key) => {
-        //   ids += val
-        //   if (key != arr.length - 1) {
-        //     ids += ','
-        //   }
-        // })
-        // this.submitDisplayConfigTree(ids)
+        let ids = ''
+        arr.forEach((val, key) => {
+          ids += val
+          if (key != arr.length - 1) {
+            ids += ','
+          }
+        })
+        this.submitDisplayConfigTree(ids)
       } else {
         this.$message({
           type: 'error',
           message: '请先设置配置文件'
         })
       }
-    },
-    handleCheckChange (data, checked, indeterminate) {
-      console.log(data, checked, indeterminate);
-      if (checked) {
-
-      }
-    },
-    checkXuanzhong () {
-
     },
     //#endregion
   },

+ 10 - 0
src/views/manager/projectinfo/editElement/editElement.vue

@@ -296,6 +296,11 @@ export default {
       let _that = this
       var MyComponent = await Vue.extend({
         template: localStorage.getItem('editElement'),
+        data () {
+          formData: {
+
+          }
+        },
         methods: {
           RightClick (tr, td, x1, x2, y1, y2) {//鼠标右键事件
             _that.RightClick2(tr, td, x1, x2, y1, y2)
@@ -309,6 +314,11 @@ export default {
       let _that = this
       var MyComponent = await Vue.extend({
         template: localStorage.getItem('editElement'),
+        data () {
+          formData: {
+
+          }
+        },
         methods: {
           RightClick (tr, td, x1, x2, y1, y2) {//鼠标右键事件
             _that.RightClick2(tr, td, x1, x2, y1, y2)

+ 2 - 2
src/views/manager/projectinfo/tree.vue

@@ -1317,7 +1317,7 @@ export default {
         children: 'children',
         disabled: 'hasChildren',
         isLeaf: function (data) {
-          return !data.hasChildren || (data.isExistForm == 1);
+          return !data.hasChildren || (data.hasChildren && data.isExistForm == 1)
         },
       },
       exceldata: [],//清表模板
@@ -2204,7 +2204,7 @@ export default {
     },
     async setParameterName () {//设置参数名称中添加节点参数按钮
       // wbsId: this.jiedianId
-       this.namelists.unshift({ name: '', remark: '', k: '', type: 0, })
+      this.namelists.unshift({ name: '', remark: '', k: '', type: 0, })
     },
     async nodeInfoSave () {//节点参数弹框保存按钮
       if (this.nodeInfoTable) {

+ 10 - 0
src/views/manager/projectinfo/treeTemplate/dynamicExcel.vue

@@ -84,6 +84,11 @@ export default {
       let _that = this
       var MyComponent = await Vue.extend({
         template: localStorage.getItem('excelHtml'),
+        data () {
+          formData: {
+
+          }
+        },
         methods: {
           getInformation (name, tr, td) {//鼠标右键事件
             _that.getInformation(name, tr, td)
@@ -98,6 +103,11 @@ export default {
       let _that = this
       var MyComponent = await Vue.extend({
         template: localStorage.getItem('excelHtml'),
+        data () {
+          formData: {
+
+          }
+        },
         getInformation (name, tr, td) {//鼠标右键事件
           _that.getInformation(name, tr, td)
         },

+ 1 - 2
src/views/manager/wbsinfo/edit.vue

@@ -1443,8 +1443,7 @@ export default {
         children: 'children',
         label: 'title',
         isLeaf: function (data) {
-          console.log(data.isExistForm == 1);
-          return !data.hasChildren || (data.isExistForm == 1);
+          return !data.hasChildren || (data.hasChildren && data.isExistForm == 1)
         }
       },
       leftType: 5,