{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\views\\main\\systemManagement\\MenuManger.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\views\\main\\systemManagement\\MenuManger.vue","mtime":1667327530028},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\babel.config.js","mtime":1667327525434},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\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/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.function.name\";\nimport _toConsumableArray from \"D:/jenkins/workspace/xq-web-fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/xq-web-fvue/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 portalApi from '@/api/portal.js';\n\nvar HtMenuManager = function HtMenuManager() {\n return import('@/components/system/HtMenuManager.vue');\n};\n\nimport IconPanl from '@/components/selector/IconPanl.vue';\nimport IconDialog from '@/components/dialog/IconDialog.vue';\nimport req from '@/request.js';\nexport default {\n name: 'MenuManager',\n components: {\n HtMenuManager: HtMenuManager,\n IconDialog: IconDialog,\n IconPanl: IconPanl\n },\n data: function data() {\n return {\n isFrontMenu: false,\n isHref: false,\n //是否是添加URL菜单\n editMenuFormVisible: false,\n treeMenuData: [],\n defaultMenuProps: {\n children: 'children',\n label: 'name'\n },\n treeData: [],\n defaultProps: {\n children: 'children',\n label: 'name'\n },\n data: [],\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n handleDialog: false,\n dialogVisible: false,\n menu: {\n alias: '',\n tabsStyle: '',\n sysMethods: [],\n open: true,\n openType: \"1\",\n href: '',\n status: 1\n },\n tabsStyle: {\n tabType: null\n },\n currentNodeData: {},\n hasParent: false,\n batchSortDialog: false,\n //子菜单批量排序侧边弹框\n subMenuList: [],\n //子菜单集合\n uploadDialogVisible: false,\n fileList: [],\n parentMenuId: ''\n };\n },\n methods: {\n clearIcon: function clearIcon() {\n this.menu.menuIcon = '';\n this.$forceUpdate();\n },\n choseIcon: function choseIcon(icon) {\n this.menu.menuIcon = icon;\n this.$forceUpdate();\n },\n showIconPanl: function showIconPanl() {},\n handleBatchSortClose: function handleBatchSortClose() {\n this.batchSortDialog = false;\n },\n //保存子菜单批量排序\n save: function save() {\n var _this = this;\n\n portalApi.saveBatch(this.subMenuList).then(function (data) {\n _this.batchSortDialog = false;\n\n _this.$refs.htMenuManager.$refs.htMenuTree.loadData();\n\n _this.$message({\n showClose: true,\n message: data.message,\n type: 'success'\n });\n });\n },\n //移动菜单确认事件\n handleSave: function handleSave() {},\n handleMenuNodeClick: function handleMenuNodeClick(node) {},\n handleClose: function handleClose() {\n this.handleDialog = false;\n },\n icons: function icons(icon) {\n this.menu.menuIcon = icon;\n },\n handleNodeClick: function () {\n var _handleNodeClick = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(data) {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (data.href) {\n this.isHref = true;\n } else {\n this.isHref = false;\n }\n\n this.getEditData(data);\n this.currentNodeData = data;\n\n case 3:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function handleNodeClick(_x) {\n return _handleNodeClick.apply(this, arguments);\n }\n\n return handleNodeClick;\n }(),\n menuAction: function menuAction(command) {\n var _this2 = this;\n\n //判断是否是添加前端下级菜单\n if (command.node.key == '3' && command.action != 'addHref') {\n this.isFrontMenu = true;\n } else {\n this.isFrontMenu = false;\n } //判断是否是添加URL菜单\n\n\n if (command.action == 'addHref') {\n this.isHref = true;\n } else if (command.action == 'edit' && command.href) {\n this.isHref = true;\n } else {\n this.isHref = false;\n }\n\n this.action = command.action;\n this.editMenuFormVisible = false;\n var node = command.node;\n var data = command.data;\n var action = command.action;\n this.currentNodeData = data;\n this.menu = _objectSpread(_objectSpread({}, this.menu), {\n href: '',\n name: '',\n alias: '',\n menuIcon: '',\n sn: '',\n activeTab: '',\n tabsStyle: '',\n openType: \"1\",\n sysMethods: [],\n status: 1\n });\n delete this.menu.tenantId;\n\n switch (action) {\n case 'batchSort':\n this.subMenuList = _toConsumableArray(data.children);\n this.batchSortDialog = true;\n break;\n\n case 'add':\n this.menu.id = '';\n this.menu.parentId = data.id;\n this.hasParent = true;\n this.menu.path = data.path;\n this.editMenuFormVisible = true;\n this.menu.openType = \"1\", this.tabsStyle = {\n tabType: null\n };\n break;\n\n case 'addHref':\n var key = Date.parse(new Date()) + '_' + Math.ceil(Math.random() * 99999);\n this.menu.alias = 'href/template/' + key;\n this.menu.id = '';\n this.menu.parentId = data.id;\n this.hasParent = true;\n this.menu.path = data.path;\n this.editMenuFormVisible = true;\n this.menu.openType = \"1\", this.tabsStyle = {\n tabType: null\n };\n break;\n\n case 'edit':\n this.getEditData(data);\n break;\n\n case 'delete':\n this.$confirm(\"\\u662F\\u5426\\u5220\\u9664\\u83DC\\u5355[\".concat(data.name, \"]?\"), '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'success'\n }).then(function () {\n _this2.removeMenuById(data.id);\n }).catch(function () {});\n break;\n\n case 'moveto':\n var this_ = this;\n portalApi.getMenuTree().then(function (data) {\n this_.handleDialog = true;\n this_.treeMenuData = data;\n }); // this.$message(\"暂未提供该功能\");\n\n break;\n\n case 'export':\n this.exportFile(data);\n break;\n\n case 'import':\n this.importFile(data);\n\n default:\n break;\n }\n },\n exportFile: function exportFile(data) {\n var id = data.id;\n var url = window.context.portal + '/sys/sysMenu/v1/export?parentMenuId=' + id;\n req.download(url);\n },\n handleImport: function handleImport(param) {\n var _this3 = this;\n\n var formData = new FormData();\n formData.append('file', param.file);\n portalApi.importSysMenus(formData, this.parentMenuId).then(function (resp) {\n if (resp.state) {\n _this3.$message({\n type: 'success',\n message: '导入成功'\n });\n\n _this3.uploadDialogVisible = false;\n _this3.fileList = [];\n\n _this3.$refs.htMenuManager.$refs.htMenuTree.loadData();\n } else {\n _this3.beforeClose();\n }\n });\n },\n beforeClose: function beforeClose() {\n this.uploadDialogVisible = false;\n this.fileList = [];\n },\n importFile: function importFile(data) {\n this.parentMenuId = data.id;\n this.uploadDialogVisible = true;\n },\n getEditData: function getEditData(data) {\n var _this4 = this;\n\n this.editMenuFormVisible = false;\n this.hasParent = false;\n this.$http.get('${portal}/sys/sysMenu/v1/getJson?id=' + data.id).then(function (response) {\n _this4.menu = response.data;\n _this4.editMenuFormVisible = true;\n\n _this4.$validator.validate();\n\n if (_this4.menu.tabsStyle) {\n _this4.tabsStyle = JSON.parse(_this4.menu.tabsStyle);\n } else {\n _this4.tabsStyle = {\n tabType: null\n };\n }\n });\n },\n removeMenuById: function removeMenuById(id) {\n var _this5 = this;\n\n portalApi.removeMenuById(id).then(function (data) {\n _this5.$refs.htMenuManager.$refs.htMenuTree.loadData();\n\n _this5.$message({\n showClose: true,\n message: '删除成功',\n type: 'success'\n });\n }, function (error) {});\n },\n beforeSaveData: function beforeSaveData() {\n if (this.tabsStyle.tabType) {\n this.menu.tabsStyle = JSON.stringify(this.tabsStyle);\n }\n },\n afterSaveData: function afterSaveData() {\n var _this6 = this;\n\n // return;\n var msg = '是否继续添加下级菜单?';\n\n if (this.menu.id) {\n msg = '是否继续编辑菜单?';\n }\n\n this.$confirm(msg, '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'success'\n }).then(function () {\n if (!_this6.menu.id) {\n _this6.menu = _objectSpread(_objectSpread({}, _this6.menu), {\n href: '',\n name: '',\n alias: '',\n menuIcon: '',\n tabsStyle: '',\n sn: '',\n openType: \"1\",\n activeTab: '',\n sysMethods: [],\n status: 1\n });\n }\n }).catch(function () {\n if (!_this6.menu.id) {\n _this6.menu = _objectSpread(_objectSpread({}, _this6.menu), {\n href: '',\n name: '',\n alias: '',\n menuIcon: '',\n sn: '',\n openType: \"1\",\n activeTab: '',\n tabsStyle: '',\n sysMethods: [],\n status: 1\n });\n }\n\n _this6.editMenuFormVisible = false;\n });\n this.$refs.htMenuManager.$refs.htMenuTree.loadData();\n },\n addSysMethods: function addSysMethods() {\n this.menu.sysMethods.push({\n name: '',\n alias: '',\n methodType: '1',\n requestUrl: ''\n });\n },\n removeSysMethod: function removeSysMethod(row) {\n this.menu.sysMethods.remove(row);\n }\n }\n};",null]}