{"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\\ProjectFlowChart.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\src\\views\\projectManagent\\ProjectFlowChart.vue","mtime":1723543352528},{"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":456789000000},{"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/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport _toConsumableArray from \"D:/jenkins/workspace/xypm-web/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _defineProperty from \"D:/jenkins/workspace/xypm-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 moduleRouter from '@/module_components.js';\nimport menuApi from '@/api/menu.js';\nexport default {\n  name: 'ProjectFlowChart',\n  components: _objectSpread({}, moduleRouter),\n  data: function data() {\n    return {\n      isShow: false,\n      currentComponent: '',\n      menuTabsStyle: null,\n      filterText: '',\n      //树型搜索内容\n      isIeExplorer: false,\n      //\n      isExpand: false,\n      loading: false,\n      treeData: [],\n      defaultProps: {\n        label: 'name',\n        code: 'code',\n        id: 'id',\n        children: 'children',\n        isLeaf: 'leaf' // 指定节点是否为叶子节点，仅在指定了 lazy 属性的情况下生效\n      },\n\n      defaultCheckedKeys: [],\n      defaultExpandedKeys: [],\n      node: '',\n      resolve: '',\n      isShowAside: true //左侧菜单默认显示\n    };\n  },\n  mounted: function mounted() {\n    if (this.$route.params && this.$route.params.alias) {\n      this.getInitMenus(this.$route.params);\n    } else {\n      this.getInitMenus();\n    }\n    // this.getInitMenus()\n  },\n\n  computed: {\n    projectId: function projectId() {\n      return this.$route.params.id;\n    }\n  },\n  watch: {\n    filterText: function filterText(val) {\n      this.$refs.tree.filter(val);\n    }\n  },\n  defaultCheckedKeys: function defaultCheckedKeys(val) {\n    this.$refs.tree.setCheckedKeys(val);\n  },\n  methods: {\n    //点击节点\n    handleNodeClick: function handleNodeClick(data) {\n      if (data.alias && data.children.length == 0) {\n        // console.log(data)\n        this.currentComponent = data.alias;\n        sessionStorage.setItem('activeAlias', JSON.stringify(data));\n      }\n    },\n    filterNode: function filterNode(value, data) {\n      if (!value) return true;\n      return data[this.defaultProps.label].indexOf(value) !== -1;\n    },\n    loadNode: function loadNode(node, resolve) {},\n    // 树状菜单的全部展开和收起\n    handleExpandCollapse: function handleExpandCollapse() {\n      var elTree = this.$refs.tree;\n      for (var i = 0; i < elTree.store._getAllNodes().length; i++) {\n        elTree.store._getAllNodes()[i].expanded = this.isExpand;\n      }\n      this.isExpand = !this.isExpand;\n    },\n    //树状刷新\n    refresh: function refresh() {\n      var _this = this;\n      this.loading = true;\n      this.$emit('refresh', function () {\n        _this.loading = false;\n        _this.filterText = '';\n        _this.getInitMenus();\n      });\n      setTimeout(function () {\n        _this.loading = false;\n        _this.filterText = '';\n        _this.getInitMenus();\n      }, 2000);\n    },\n    //初始获取树状的菜单目录\n    getInitMenus: function getInitMenus(params) {\n      var _this2 = this;\n      // debugger\n      // console.log(params)\n      this.$http.post('${cqxy}/biz/projectManagement/projectPersonnelMenu/v1/getCurrentUserMenuByProjectId?projectId=' + this.projectId).then(function (res) {\n        if (res.data.state) {\n          var _arrPcode$0$children;\n          console.log(res.data.value, '555555555555555555');\n          // let menus = JSON.parse(sessionStorage.getItem('currentFrontMenus'))\n          var menus = res.data.value;\n          //将菜单统计报表下的项目台账隐藏并将统计报表更名为项目台账\n          menus.forEach(function (item, index) {\n            // console.log(item.alias, item.name)\n            //隐藏菜单中的项目管理菜单\n            if (item.alias == 'projectManagentSub') {\n              delete menus[index];\n            }\n            //隐藏菜单中的年度计划菜单\n            if (item.alias == 'AnnualPlan' || item.alias == 'planningEIA' || item.alias == 'fileLibrary' || item.alias == 'DirectoryManagement' || item.alias == \"projectAccount\" || item.alias == \"projectApprovalAccount\" || item.alias == \"biddingAccount\" || item.alias == \"contractAccount\" || item.alias == \"investmentProgressAccount\" || item.alias == \"paymentAccount\" || item.alias == \"contractChangeAccount\" || item.alias == \"projectInformationStatistics\" || item.alias == \"userDefinedLedger\") {\n              delete menus[index];\n            }\n          });\n          menus.forEach(function (item) {\n            if (item.alias == 'statisticalReport') {\n              item.children.forEach(function (item1, index) {\n                if (item1.alias == 'projectInformationStatistics') {\n                  item.children.splice(index, 1);\n                }\n              });\n            }\n          });\n          var tree = menus.filter(function (item) {\n            return item.alias !== 'projectManagement';\n          });\n          var arrPcode = [{\n            name: '项目管理',\n            code: 'root',\n            children: [],\n            id: '0',\n            isLeaf: true,\n            alias: 'root'\n          }];\n          (_arrPcode$0$children = arrPcode[0].children).push.apply(_arrPcode$0$children, _toConsumableArray(tree));\n          _this2.treeData = arrPcode;\n          var defaultKey = _this2.treeData[0].children;\n          var cureentAlias = JSON.parse(sessionStorage.getItem('activeAlias'));\n          if (cureentAlias) {\n            _this2.defaultTable(cureentAlias);\n          } else if (params) {\n            var al = defaultKey.filter(function (item) {\n              if (item.children.length > 0) {\n                item.children.forEach(function (item2) {\n                  if (item2.alias == params.alias) {\n                    return item;\n                  }\n                });\n              } else {\n                if (item.alias == params.alias) {\n                  return item;\n                }\n              }\n            });\n            _this2.defaultTable(al[0]);\n          } else {\n            for (var i in defaultKey) {\n              if (i == 0) {\n                if (defaultKey[i].children.length > 0) {\n                  _this2.defaultTable(defaultKey[i].children[i]);\n                } else {\n                  _this2.defaultTable(defaultKey[i]);\n                }\n              }\n            }\n          }\n        }\n      });\n    },\n    defaultTable: function defaultTable(data) {\n      var _this3 = this;\n      console.log(data);\n      this.defaultCheckedKeys.push(data.id);\n      this.defaultExpandedKeys.push(data.id);\n      this.currentComponent = data.alias;\n      this.$nextTick(function () {\n        _this3.$refs.tree.setCurrentKey(data.id);\n      });\n    },\n    //隐藏目录\n    handleHideMenu: function handleHideMenu() {\n      this.isShowAside = !this.isShowAside;\n    }\n  },\n  destroyed: function destroyed() {\n    delete sessionStorage.removeItem('activeAlias');\n  }\n};",null]}