{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web-prod\\src\\components\\dialog\\UserDefinedLedgerDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\src\\components\\dialog\\UserDefinedLedgerDialog.vue","mtime":1667333350024},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\babel.config.js","mtime":1667333346259},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.symbol.async-iterator\";\nimport \"core-js/modules/es6.symbol\";\nimport \"core-js/modules/es6.array.from\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.map\";\nimport \"core-js/modules/es7.array.includes\";\nimport \"core-js/modules/es6.string.includes\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _toConsumableArray from \"D:/jenkins/workspace/xypm-web-prod/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n data: function data() {\n return {\n dialogVisibleTemplete: false,\n filterText: '',\n //树型搜索内容,\n isIeExplorer: false,\n isExpand: false,\n loading: false,\n menusData: [],\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 addFields: {\n data: [],\n loading: false,\n tableHeight: 300,\n selectData: []\n },\n selectFields: [],\n menusParams: {\n pageBean: {\n page: 1,\n pageSize: -1,\n showTotal: true\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n property: 'MENU_ALIAS_',\n relation: 'AND',\n value: ''\n }],\n sotrer: [{\n direction: 'ASC',\n property: 'SN_'\n }]\n },\n disabledKeys: ['2', '3', '4']\n };\n },\n mounted: function mounted() {\n var _this = this;\n this.getMenusData();\n this.calcTableHeight();\n this.$root.$on('resize', function () {\n _this.calcTableHeight(500);\n });\n this.getMenusPropsData('projectManagement');\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 methods: {\n show: function show(data) {\n this.dialogVisibleTemplete = true;\n this.addFields.selectData = data;\n },\n handleClose: function handleClose(done) {\n done();\n },\n getMenusData: function getMenusData() {\n var _arrMenus$0$children;\n var menus = JSON.parse(sessionStorage.getItem('currentFrontMenus'));\n //过滤不需要的树节点\n var menus_ = this.filterMenusData(menus);\n var arrMenus = [{\n name: '菜单名称',\n code: 'root',\n children: [],\n id: 0,\n isLeaf: true,\n alias: 'root'\n }];\n (_arrMenus$0$children = arrMenus[0].children).push.apply(_arrMenus$0$children, _toConsumableArray(menus_));\n this.menusData = arrMenus;\n this.defaultExpandedKeys.push(0);\n },\n // 过滤树节点\n filterMenusData: function filterMenusData(data) {\n data.forEach(function (item, index) {\n // 过滤年度计划、统计报表、安全,环保和文件库\n if (item.alias == 'AnnualPlan' || item.alias == 'statisticalReport' || item.alias == 'fileLibrary') {\n data.splice(index, 1);\n }\n // 过滤环保和其他\n if (item.alias == 'processManagement') {\n item.children.forEach(function (item1, index1) {\n if (item1.alias == 'securityManagement') {\n item1.children.forEach(function (item2, index2) {\n if (item2.alias == 'constructionEnvironmentProtection' || item2.alias == 'constructionOther') {\n item1.children.splice(index2, 1);\n }\n });\n }\n });\n }\n //过滤技术资料和经济资料\n if (item.alias == 'processManagement') {\n item.children.forEach(function (item1, index1) {\n if (item1.alias == 'technicalInformation') {\n item.children.splice(index1, 1);\n }\n });\n }\n });\n data.forEach(function (item, index) {\n if (item.alias == 'planningEIA') {\n data.splice(index, 1);\n }\n if (item.alias == 'processManagement') {\n item.children.forEach(function (item1, index1) {\n if (item1.alias == 'economicData') {\n item.children.splice(index1, 1);\n }\n if (item1.alias == 'securityManagement') {\n item1.children.forEach(function (item2, index2) {\n if (item2.alias == 'constructionOther') {\n item1.children.splice(index2, 1);\n }\n });\n }\n });\n }\n });\n return data;\n },\n //点击节点\n handleNodeClick: function handleNodeClick(data) {\n if (data.alias && data.children.length == 0) {\n this.currentComponent = data.alias;\n }\n this.getMenusPropsData(data.alias);\n },\n getMenusPropsData: function getMenusPropsData(alias) {\n var _this2 = this;\n this.menusParams.querys[0].value = alias;\n this.$http.post('${cqxy}/biz/menuField/v1/query', this.menusParams).then(function (res) {\n _this2.addFields.data = res.data.rows;\n });\n },\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 _this3 = this;\n this.loading = true;\n this.$emit('refresh', function () {\n _this3.loading = false;\n _this3.filterText = '';\n _this3.getMenusData();\n });\n setTimeout(function () {\n _this3.loading = false;\n _this3.filterText = '';\n _this3.getMenusData();\n }, 2000);\n },\n filterNode: function filterNode(value, data) {\n if (!value) return true;\n return data[this.defaultProps.label].indexOf(value) !== -1;\n },\n handleSelectionChange: function handleSelectionChange(selection) {\n var _this4 = this;\n selection.forEach(function (element) {\n _this4.$set(element, 'calculationMethod', 1);\n if (!_this4.selectFields.includes(element.fieldName)) {\n _this4.selectFields.push(element);\n _this4.addFields.selectData.push(element);\n }\n });\n this.addFields.selectData = this.deweight(this.addFields.selectData);\n },\n deweight: function deweight(arr) {\n var map = new Map();\n var _iterator = _createForOfIteratorHelper(arr),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var i = _step.value;\n if (!map.has(i.id)) {\n map.set(i.id, i);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return _toConsumableArray(map.values());\n },\n handleDelFields: function handleDelFields(row) {\n var _this5 = this;\n // console.log(row)\n this.addFields.selectData = this.addFields.selectData.filter(function (item) {\n return item.fieldName !== row.fieldName;\n });\n this.selectFields = this.selectFields.filter(function (item) {\n return item.fieldName !== row.fieldName;\n });\n var formData = new FormData();\n formData.append('ids', row.id);\n this.$http.post('${cqxy}/biz/menuCustomizeField/v1/delete', formData).then(function (res) {\n if (res.data.state) {\n _this5.$message.success(res.data.message);\n } else {\n _this5.$message.error(res.data.message);\n }\n });\n },\n handleSumbit: function handleSumbit() {\n // console.log(this.addFields.selectData)\n this.$emit('submitPropsData', this.addFields.selectData);\n this.dialogVisibleTemplete = false;\n },\n // 动态计算表格的高度,自适应当前容器\n calcTableHeight: function calcTableHeight(delay) {\n var _this6 = this;\n // let gap = this.type == 'import' ? 206 : 236\n var gap = 150;\n setTimeout(function () {\n _this6.addFields.tableHeight = document.documentElement.clientHeight * 0.9 - gap;\n }, delay || 0);\n }\n }\n};",null]}