{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web\\src\\views\\projectManagent\\DirectoryManagement.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\src\\views\\projectManagent\\DirectoryManagement.vue","mtime":1675214578105},{"path":"D:\\jenkins\\workspace\\xypm-web\\babel.config.js","mtime":1675214572901},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _defineProperty from \"D:/jenkins/workspace/xypm-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport projectArr from '@/assets/data.json';\nexport default {\n  data: function data() {\n    var _ref;\n\n    return _ref = {\n      filterText: '',\n      isIeExplorer: false,\n      defaultExpandAll: true,\n      isExpand: false,\n      loading: false,\n      treeData: [],\n      props: {\n        label: 'name',\n        code: 'code',\n        id: 'id',\n        children: 'children',\n        pcode: 'pcode',\n        isLeaf: 'leaf' // 指定节点是否为叶子节点，仅在指定了 lazy 属性的情况下生效\n\n      },\n      editMenuFormVisible: false,\n      searchForm: {\n        name: ''\n      },\n      //顶部搜索参数\n      data: [],\n      //表格数据\n      pageResult: {\n        page: 1,\n        pageSize: 20,\n        total: 0\n      },\n      form: {\n        name: '',\n        code: '',\n        pname: '',\n        pcode: ''\n      },\n      dialogVisible: false,\n      dialogTitle: '添加',\n      indexArr: [],\n      node: '',\n      resolve: ''\n    }, _defineProperty(_ref, \"treeData\", []), _defineProperty(_ref, \"nodeKey\", false), _defineProperty(_ref, \"pCode\", 'root'), _defineProperty(_ref, \"loading\", false), _defineProperty(_ref, \"arrPcode\", [{\n      name: '目录管理',\n      code: 'root'\n    }]), _defineProperty(_ref, \"options\", []), _defineProperty(_ref, \"defaultCheckedKeys\", []), _defineProperty(_ref, \"rules\", {\n      name: {\n        required: true,\n        message: '请输入名称',\n        trigger: 'blur'\n      },\n      code: {\n        required: true,\n        message: '请输入编码',\n        trigger: 'blur'\n      },\n      finishStatus: {\n        required: true,\n        message: '请选择状态',\n        trigger: 'blur'\n      },\n      groupType: {\n        required: true,\n        message: '请选择分组类型',\n        trigger: 'blur'\n      },\n      pname: {\n        required: true,\n        message: '请选择父级名称',\n        trigger: 'blur'\n      },\n      pcode: {\n        required: true,\n        message: '请输入父级编码',\n        trigger: 'blur'\n      },\n      target: {\n        required: true,\n        message: '请输入前置路由地址',\n        trigger: 'blur'\n      },\n      ptarget: {\n        required: true,\n        message: '请输入后置节点',\n        trigger: 'blur'\n      },\n      targetUrl: {\n        required: true,\n        message: '请输入后置节点路由地址',\n        trigger: 'blur'\n      }\n    }), _ref;\n  },\n  watch: {\n    filterText: function filterText(val) {\n      this.$refs.tree.filter(val);\n    },\n    defaultCheckedKeys: function defaultCheckedKeys(val) {\n      this.$refs.tree.setCheckedKeys(val);\n    }\n  },\n  mounted: function mounted() {\n    if (!!window.ActiveXObject || 'ActiveXObject' in window) {\n      this.isIeExplorer = true;\n    }\n  },\n  computed: {\n    deleteUrl: function deleteUrl() {\n      return window.context.yhxt + '/biz/projectManagement/directoryManagement/v1/delete';\n    }\n  },\n  created: function created() {\n    this.getOptions();\n  },\n  methods: {\n    handleReset: function handleReset() {\n      this.searchForm.name = '';\n      this.$refs['searchForm'].resetFields();\n      this.$refs.AtTable.load();\n    },\n    getOptions: function getOptions() {\n      var _this = this;\n\n      var param = {\n        pageBean: {\n          page: -1,\n          pageSize: 10,\n          showTotal: true\n        },\n        querys: [{\n          property: 'bdm.PCODE_',\n          value: this.pCode\n        }]\n      };\n      this.$http.post('${cqxy}/biz/projectManagement/directoryManagement/v1/queryChildNodeByPage', param).then(function (resp) {\n        var response = resp.data.value;\n        _this.options = response.rows;\n      });\n    },\n    filterNode: function filterNode(value, data) {\n      if (!value) return true;\n      return data[this.props.label].indexOf(value) !== -1;\n    },\n    // 树状菜单的全部展开和收起\n    handleExpandCollapse: function handleExpandCollapse() {\n      var elTree = this.$refs.tree;\n\n      for (var i = 0; i < elTree.store._getAllNodes().length; i++) {\n        elTree.store._getAllNodes()[i].expanded = this.isExpand;\n      }\n\n      this.isExpand = !this.isExpand;\n    },\n    refresh: function refresh() {\n      var _this2 = this;\n\n      this.loading = true;\n      this.$emit('refresh', function () {\n        _this2.loading = false;\n        _this2.isExpand = _this2.defaultExpandAll;\n      });\n      setTimeout(function () {\n        _this2.loading = false;\n        _this2.isExpand = _this2.defaultExpandAll;\n      }, 5000);\n    },\n    loadNode: function loadNode(node, resolve) {\n      //暂存\n      if (node.level === 0) {\n        this.node = node;\n        this.resolve = resolve;\n        return resolve(this.arrPcode);\n      } else {\n        //获取子节点\n        this.getPcode(node.data.code, resolve);\n      }\n    },\n    getPcode: function getPcode(data, resolve) {\n      var formData = new FormData();\n      formData.append('pCode', data);\n      this.$http.post('${cqxy}/biz/projectManagement/directoryManagement/v1/getByParentId', formData).then(function (res) {\n        var data = [];\n        res.data.value.forEach(function (item) {\n          if (item.hasChildre == '1') {\n            data.push({\n              name: item.name,\n              code: item.code,\n              pname: item.pname,\n              id: item.id\n            });\n          } else {\n            data.push({\n              name: item.name,\n              code: item.code,\n              pname: item.pname,\n              id: item.id,\n              leaf: true //没有子节点时为true\n\n            });\n          }\n        });\n        resolve(data);\n      });\n    },\n    //点击节点\n    handleNodeClick: function handleNodeClick(data) {\n      this.nodeKey = false;\n      this.editMenuFormVisible = true;\n      this.pCode = data.code;\n\n      if (this.pCode == 'root') {\n        this.$refs.AtTable.load(); // return false\n      }\n\n      if (this.$refs.AtTable) {\n        if (data.leaf) {\n          this.$message.info('没有下一级目录了');\n        } else {\n          this.$refs.AtTable.load();\n        }\n      }\n    },\n    handleAdd: function handleAdd() {\n      this.dialogTitle = '添加';\n      this.form = {\n        name: '',\n        code: '',\n        pname: this.options[0].code,\n        //父级名称\n        pcode: '',\n        finishStatus: 1,\n        //状态\n        groupType: 1,\n        //分组类型\n        timeoutReminderType: 1,\n        //超时提醒方式\n        timeoutTaskStatus: 1 //超时提醒任务状态\n\n      };\n      this.dialogVisible = true;\n    },\n    handleRowDBClick: function handleRowDBClick(data) {\n      this.form = data;\n      this.dialogTitle = '修改';\n      this.dialogVisible = true;\n    },\n    //字典回调\n    handleDict: function handleDict(val, obj, str) {\n      if (str === 'mlgl-jdzt') {} else if (str === 'mlgl-fzlx') {}\n    },\n    afterDelete: function afterDelete() {\n      this.nodeKey = true;\n      this.node.childNodes = [];\n      this.loadNode(this.node, this.resolve);\n    },\n    handleSelect: function handleSelect(selection) {\n      this.indexArr = selection;\n    },\n    handleDialogCancel: function handleDialogCancel() {\n      this.dialogVisible = false;\n    },\n    handleDialogClose: function handleDialogClose() {\n      this.dialogVisible = false;\n    },\n    handleDialogSubmit: function handleDialogSubmit() {\n      var _this3 = this;\n\n      this.form.pcode = this.pCode;\n\n      if (this.data.length !== 0) {\n        this.form.pname = this.data[0].pname;\n      }\n\n      if (!this.form.pname) {\n        this.form.pname = 'root';\n      }\n\n      this.$refs.form.validate(function (valid) {\n        if (valid) {\n          _this3.loading = true;\n\n          _this3.$http.post('${cqxy}/biz/projectManagement/directoryManagement/v1/save', _this3.form).then(function (res) {\n            if (res.data.state) {\n              _this3.$refs.form.resetFields();\n\n              _this3.$message.success(res.data.message);\n\n              _this3.dialogVisible = false;\n\n              _this3.$refs.AtTable.load();\n\n              _this3.node.childNodes = [];\n\n              _this3.loadNode(_this3.node, _this3.resolve);\n            } else {\n              _this3.$message.error(res.data.message);\n            }\n\n            _this3.loading = false;\n          });\n        }\n      });\n    },\n    loadData: function loadData(param, cb) {\n      var _this4 = this;\n\n      var pcode = [{\n        property: 'bdm.PCODE_',\n        value: this.pCode\n      }];\n\n      if (param.querys && param.querys.length) {\n        var _param$querys;\n\n        (_param$querys = param.querys).push.apply(_param$querys, pcode);\n      } else {\n        param.querys = pcode;\n      }\n\n      var obj = this.searchObj;\n\n      for (var i in obj) {\n        if (obj[i] && obj[i] !== undefined) {\n          param.querys.push({\n            group: 'advance',\n            operation: 'LIKE',\n            property: i,\n            relation: 'AND',\n            value: obj[i]\n          });\n        }\n      }\n\n      this.$http.post('${cqxy}/biz/projectManagement/directoryManagement/v1/queryChildNodeByPage', param).then(function (resp) {\n        var response = resp.data.value;\n        _this4.data = response.rows;\n        _this4.pageResult = {\n          page: response.page,\n          pageSize: response.pageSize,\n          total: response.total\n        };\n      }, function (error) {\n        reject(error);\n      }).finally(function () {\n        if (cb) {\n          cb();\n        }\n      });\n    },\n    findinfo: function findinfo() {\n      var _this5 = this;\n\n      var query = [];\n      query.push({\n        property: 'bdm.PCODE_',\n        value: this.pCode\n      });\n      var search = {\n        // project_id_: this.searchForm.projectId,\n        name_: this.searchForm.name\n      };\n      this.searchObj = search;\n\n      for (var i in search) {\n        if (search[i]) {\n          query.push({\n            group: 'advance',\n            operation: 'LIKE',\n            property: i,\n            relation: 'AND',\n            value: search[i]\n          });\n        }\n      }\n\n      var data = {\n        pageBean: {\n          page: 1,\n          pageSize: 20,\n          showTotal: true\n        },\n        querys: query\n      };\n      this.$http.post('${cqxy}/biz/projectManagement/directoryManagement/v1/queryChildNodeByPage', data).then(function (resp) {\n        var response = resp.data.value;\n        _this5.data = response.rows;\n        _this5.pageResult = {\n          page: response.page,\n          pageSize: response.pageSize,\n          total: response.total\n        };\n      });\n    }\n  }\n};",null]}