{"remainingRequest":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/cache-loader/dist/cjs.js??ref--0-0!/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/src/components/CommonTool/menuDetail.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/src/components/CommonTool/menuDetail.vue","mtime":1701674859500},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/cache-loader/dist/cjs.js","mtime":1701674874584},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/thread-loader/dist/cjs.js","mtime":1701674873947},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/babel-loader/lib/index.js","mtime":1701674874357},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/cache-loader/dist/cjs.js","mtime":1701674874584},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/vue-loader/lib/index.js","mtime":1701674874903}],"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 _defineProperty from \"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/@babel/runtime-corejs2/helpers/esm/defineProperty\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/@babel/runtime-corejs2/helpers/esm/asyncToGenerator\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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//\nimport { getMenuDetail, getAllMenu as _getAllMenu, putMenuDetail, newMenu, getLogoUrl as _getLogoUrl } from \"@/service/CommontoolsAPI.js\";\nimport { getAllmodules } from \"@/service/CommonApi.js\";\nimport { getModuleFormList } from \"@/service/FormApi.js\";\nimport { getModuleViewList } from \"@/service/ViewApi.js\";\nimport { getReportsList } from \"@/service/ReportApi.js\";\nimport { getChartsList } from \"@/service/ModulesApi.js\";\nimport { getMultiLanguageList, deleteMultiLanguageList } from \"@/service/MultiLanguageAPI.js\";\nimport icon_select from \"@/components/Common/icon_select.vue\";\nimport font_select from \"@/components/Common/font_select.vue\";\nimport MultiLanguages from \"@/components/Common/languages_select\";\nimport ScriptEditorSelect from \"@/components/Common/scriptEditor\";\nimport ColorPicker from \"@/components/Common/ColorPicker\";\nimport { nameCheck } from \"@/utils/utils.js\";\nimport { delMsg } from '@/utils/elementui';\nexport default {\n name: \"menuDetail\",\n props: [\"type\", \"visible\"],\n components: {\n icon_select: icon_select,\n font_select: font_select,\n MultiLanguages: MultiLanguages,\n ScriptEditorSelect: ScriptEditorSelect,\n ColorPicker: ColorPicker\n },\n data: function data() {\n return {\n appId: sessionStorage.getItem(\"appId\"),\n menuId: \"\",\n menuOption: [],\n detail: {\n name: \"\",\n permissionType: \"public\",\n orderno: 0,\n opentarget: \"detail\",\n status: 1\n },\n menuRules: {\n name: [{\n required: true,\n message: this.$t('placeholder.name'),\n trigger: \"blur\"\n }, {\n validator: nameCheck,\n trigger: \"blur\"\n }]\n },\n options: [],\n opentargetOptions: [{\n value: \"detail\",\n label: this.$t('label.work_area_open')\n }, {\n value: \"target\",\n label: this.$t('label.new_win_open')\n }],\n linkTypeOptions: [{\n value: \"\",\n label: this.$t('btns.choose')\n }, {\n value: \"00\",\n label: this.$t('label.form_start')\n }, {\n value: \"01\",\n label: this.$t('view.view')\n }, {\n value: \"02\",\n label: this.$t('widget.chart')\n }, {\n value: \"07\",\n label: this.$t('label.url_script')\n }, {\n value: \"09\",\n label: this.$t('menu.custom_report')\n }],\n queryString: [],\n moduleOption: [],\n actionFormOption: [],\n actionViewOption: [],\n actionReportOption: [],\n // 作用报表\n customizeReportOption: [],\n // 自定义报表\n actionContent: \"\",\n actionContentOther: \"\",\n // 自定义链接\n actionScript: \"\",\n // 脚本链接\n showTypeOption: [{\n value: this.$t('label.all'),\n id: 0\n }, {\n value: this.$t('label.just_menu'),\n id: 1\n }, {\n value: this.$t('label.just_flow'),\n id: 2\n }],\n icon: {\n icontype: \"img\",\n imgUrl: \"/uploads/lib/icon_menu_default.png\",\n fontUrl: \"\",\n iconFontColor: \"rgba(0, 0, 0, 1)\"\n },\n iconSelectCheck: false,\n fontSelectCheck: false,\n show: true,\n isResetForm: \"\",\n // 是否重置表单\n languagesVisible: false,\n // 多语言弹窗\n languageData: {},\n // 多语言数据\n languageParams: {\n label: '',\n text: '',\n type: '',\n currpage: 1,\n pagelines: 10\n },\n scriptEditorVisible: false,\n // 脚本编辑器弹窗\n fontStyle: '',\n // 字体图标的样式\n hasRequestData: false,\n // 是否有数据\n loading: false,\n // 标识是否需要加载\n btnLoading: false // 按钮的加载\n\n };\n },\n created: function created() {\n this.getAllMenu();\n this.getModules();\n },\n computed: {\n detailVisible: {\n get: function get() {\n // this.resetData(); 影响点击新建后再点击编辑数据被重置\n return this.visible;\n },\n set: function set(val) {\n this.$emit(\"update:visible\", true);\n this.$emit(\"change\", val);\n this.$forceUpdate();\n }\n },\n\n /**\n * textarea 传给 脚本编辑器的值\n */\n showScritptEditorCode: function showScritptEditorCode() {\n return this.actionScript;\n }\n },\n watch: {\n menuId: function menuId() {\n if (this.menuId) {\n this.getData();\n }\n\n this.getModules();\n },\n \"$store.state.menuTreeMenuId\": function $storeStateMenuTreeMenuId() {\n var _this = this;\n\n if (this.$store.state.isShowMunuDetail) {\n this.detailVisible = true;\n }\n\n this.detail = {\n name: \"\",\n permissionType: \"public\",\n orderno: 0,\n opentarget: \"detail\",\n superior: \"\",\n linkType: \"\"\n };\n this.menuId = this.$store.state.menuTreeMenuId;\n\n if (this.menuId != \"\") {\n this.$nextTick(function () {\n _this.resetMenuForm();\n });\n } //id变化的时候刷新菜单列表\n\n\n if (this.$store.state.menuSuperiorId != \"\" && this.type == \"newMobile\") {\n this.show = true;\n }\n\n this.getAllMenu();\n this.getFormList();\n },\n \"$store.state.menuSuperiorId\": function $storeStateMenuSuperiorId() {\n this.detail.superior = this.$store.state.menuSuperiorId;\n this.getAllMenu();\n this.changeShow(); //新建的时候 loading结束\n\n if (this.menuId == \"\") this.loading = false;\n }\n },\n methods: {\n getLogoUrl: function getLogoUrl(url) {\n return _getLogoUrl(url);\n },\n resetData: function resetData() {\n if (this.type == \"newPc\" || this.type == \"newMobile\") {\n this.detail = {\n name: \"\",\n permissionType: \"public\",\n orderno: 0,\n opentarget: \"detail\",\n superior: this.$store.state.menuSuperiorId,\n linkType: \"\",\n status: 1\n };\n\n if (this.type == \"newMobile\" && this.detail.superior == \"\") {\n this.show = false;\n }\n\n this.icon = {\n imgUrl: \"/uploads/lib/icon_menu_default.png\",\n icontype: \"img\",\n fontUrl: \"\",\n iconFontColor: \"rgba(0, 0, 0, 1)\"\n }; // this.$store.dispatch(\"resetMenuTreeMenuId\");\n }\n },\n changeShow: function changeShow() {\n if (this.type == \"newMobile\") {// this.show = false;\n }\n },\n onSelectFontOk: function onSelectFontOk(font) {\n this.icon.fontUrl = font;\n this.icon.icontype = 'font';\n this.fontSelectCheck = false;\n },\n selectFont: function selectFont() {\n this.fontSelectCheck = true;\n },\n getUrl: function getUrl(url) {\n return _getLogoUrl(url);\n },\n onSelectIconOk: function onSelectIconOk(item) {\n if (item) {\n if (item.path) {\n this.icon.icontype = \"img\";\n this.icon.imgUrl = item.path;\n } else {\n this.$message({\n showClose: true,\n type: \"error\",\n message: this.$t('msg.select_fail')\n });\n }\n }\n },\n selectImg: function selectImg() {\n this.iconSelectCheck = true;\n },\n onSaveAndNewBtnClick: function onSaveAndNewBtnClick(formName) {\n this.onSaveBtnClick(formName);\n this.isResetForm = true;\n },\n onSaveBtnClick: function onSaveBtnClick(formName) {\n var _this2 = this;\n\n this.$refs[formName].validate( /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(valid) {\n var detail, response, isMobile, _response;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!valid) {\n _context.next = 57;\n break;\n }\n\n _this2.isResetForm = false; // 模块\n\n if (!(_this2.detail.linkType == \"00\" || _this2.detail.linkType == \"01\" || _this2.detail.linkType == \"02\" || _this2.detail.linkType == \"09\")) {\n _context.next = 28;\n break;\n }\n\n if (!(_this2.detail.moduleid == \"\" || !_this2.detail.moduleid)) {\n _context.next = 8;\n break;\n }\n\n _this2.$message({\n showClose: true,\n message: _this2.$t('msg.select_module'),\n type: \"error\"\n });\n\n return _context.abrupt(\"return\", false);\n\n case 8:\n if (!(_this2.type.indexOf(\"obile\") != -1 && (_this2.$store.state.mobileSave == \"\" || _this2.$store.state.mobileSave == null))) {\n _context.next = 12;\n break;\n }\n\n console.log('手机端一级不需要判断');\n _context.next = 26;\n break;\n\n case 12:\n if (!(_this2.actionContent == \"\" || !_this2.actionContent)) {\n _context.next = 26;\n break;\n }\n\n if (!(_this2.detail.linkType == \"00\")) {\n _context.next = 18;\n break;\n }\n\n _this2.$message({\n showClose: true,\n message: _this2.$t('msg.select_form'),\n type: \"error\"\n });\n\n return _context.abrupt(\"return\", false);\n\n case 18:\n if (!(_this2.detail.linkType == \"01\")) {\n _context.next = 23;\n break;\n }\n\n _this2.$message({\n showClose: true,\n message: _this2.$t('msg.select_view'),\n type: \"error\"\n });\n\n return _context.abrupt(\"return\", false);\n\n case 23:\n if (!(_this2.detail.linkType == \"02\" || _this2.detail.linkType == \"09\")) {\n _context.next = 26;\n break;\n }\n\n _this2.$message({\n showClose: true,\n message: _this2.$t('msg.select_report'),\n type: \"error\"\n });\n\n return _context.abrupt(\"return\", false);\n\n case 26:\n _context.next = 31;\n break;\n\n case 28:\n if (!(_this2.detail.linkType == \"05\" || _this2.detail.linkType == \"06\")) {\n _context.next = 31;\n break;\n }\n\n if (!(_this2.actionContentOther == '' || _this2.actionContentOther == undefined)) {\n _context.next = 31;\n break;\n }\n\n return _context.abrupt(\"return\", _this2.$message.error(_this2.$t('msg.select_link')));\n\n case 31:\n // 图片或字体图标\n if (_this2.icon.icontype == 'img') {\n _this2.detail.ico = \"{\\\"icon\\\":\\\"\".concat(_this2.icon.imgUrl, \"\\\",\\\"icontype\\\":\\\"\").concat(_this2.icon.icontype, \"\\\"}\");\n } else if (_this2.icon.icontype == 'font') {\n _this2.detail.ico = \"{\\\"icon\\\":\\\"\".concat(_this2.icon.fontUrl, \"\\\",\\\"icontype\\\":\\\"\").concat(_this2.icon.icontype, \"\\\",\\\"iconFontColor\\\":\\\"\").concat(_this2.icon.iconFontColor, \"\\\"}\");\n } // actionContentOther 的 值\n\n\n if (_this2.detail.linkType == '07') {\n _this2.actionContent = _this2.actionScript;\n } else if (_this2.detail.linkType == '05' || _this2.detail.linkType == '06') {\n _this2.actionContent = _this2.actionContentOther;\n } // 如果链接类型不是视图,显示总数设置为false\n\n\n if (_this2.detail.linkType != '01') {\n _this2.detail.showtotalrow = \"false\";\n } // this.detail.ico = JSON.stringify(this.icon);\n\n\n _this2.detail.queryString = JSON.stringify(_this2.queryString);\n if (_this2.detail.superior == _this2.appId) _this2.detail.superior = '';\n detail = {\n name: \"\",\n description: \"\",\n multiLanguageLabel: \"\",\n opentarget: \"\",\n ico: \"ico\",\n superior: \"\",\n linkName: \"\",\n linkType: \"\",\n moduleid: \"\",\n directory: \"\",\n actionContent: _this2.actionContent || \"\",\n queryString: \"\",\n permissionType: \"public\",\n isUsual: \"\",\n isMobile: \"\",\n orderno: 0,\n showtotalrow: \"\",\n status: 1\n };\n\n if (!(_this2.menuId != \"\")) {\n _context.next = 47;\n break;\n }\n\n _this2.detail.actionContent = _this2.actionContent; // 编辑\n\n _this2.btnLoading = true;\n _context.next = 42;\n return putMenuDetail({\n applicationId: _this2.appId,\n menuId: _this2.menuId,\n data: _this2.detail\n });\n\n case 42:\n response = _context.sent;\n _this2.btnLoading = false;\n\n if (response.data.errcode == 0) {\n _this2.$message.success(_this2.$t('msg.ss')); // 刷新左边的tree\n\n\n _this2.$emit(\"refreshMenu\"); //刷新上级数据\n\n\n _this2.getAllMenu();\n\n if (_this2.isResetForm) {\n _this2.resetMenu();\n\n _this2.resetMenuForm();\n } else {\n _this2.$store.dispatch('saveMenuTreeMenuId', _this2.detail.id);\n\n _this2.$store.dispatch('setMenuSuperiorId', '');\n }\n }\n\n _context.next = 55;\n break;\n\n case 47:\n // 新建\n detail = _objectSpread(_objectSpread({}, detail), _this2.detail);\n if (_this2.type == \"newPc\") isMobile = false;else if (_this2.type == \"newMobile\") isMobile = true;\n _this2.btnLoading = true;\n _context.next = 52;\n return newMenu(_this2.appId, isMobile, detail);\n\n case 52:\n _response = _context.sent;\n _this2.btnLoading = false;\n\n if (_response.data.errcode == 0) {\n _this2.$message.success(_this2.$t('msg.created_ss'));\n\n _this2.getAllMenu();\n\n if (_this2.isResetForm) {\n _this2.resetMenu();\n\n _this2.resetMenuForm();\n } else {\n _this2.$store.dispatch('saveMenuTreeMenuId', _response.data.data.id);\n\n _this2.$store.dispatch('setMenuSuperiorId', \"\");\n } // 刷新左边的tree\n\n\n _this2.$emit(\"refreshMenu\");\n }\n\n case 55:\n _context.next = 59;\n break;\n\n case 57:\n _this2.isResetForm = false;\n return _context.abrupt(\"return\", false);\n\n case 59:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }());\n },\n // 需要传给 menuTree 重置内容\n resetMenuForm: function resetMenuForm() {\n this.$refs[\"menuForm\"].resetFields();\n },\n // 重置内容\n resetMenu: function resetMenu() {\n this.detail = {\n name: \"\",\n description: \"\",\n multiLanguageLabel: \"\",\n opentarget: \"\",\n ico: \"ico\",\n superior: \"\",\n linkName: \"\",\n linkType: \"\",\n moduleid: \"\",\n directory: \"\",\n actionContent: this.actionContent || \"\",\n queryString: \"\",\n permissionType: \"public\",\n isUsual: \"\",\n isMobile: \"\",\n orderno: 0,\n showtotalrow: \"\",\n status: 1\n };\n this.queryString = [];\n\n if (this.type == \"newMobile\" && this.detail.superior == \"\") {\n this.show = false;\n }\n\n this.icon = {\n imgUrl: \"/uploads/lib/icon_menu_default.png\",\n fontUrl: \"\",\n icontype: \"img\",\n iconFontColor: \"rgba(0, 0, 0, 1)\"\n }; // 重置表单id\n\n this.$store.dispatch(\"resetMenuTreeMenuId\"); // 重置验证规则\n\n this.isResetForm = false;\n\n if (this.type.indexOf(\"pc\") != -1) {\n // this.type = \"newPc\";\n this.$emit(\"changePcType\");\n } else if (this.type.indexOf(\"obile\") != -1) {\n // this.type = \"newMobile\";\n this.$emit(\"changeMobileType\");\n }\n },\n //获取所有树形菜单\n getAllMenu: function getAllMenu() {\n var _this3 = this;\n\n var type;\n\n if (this.type == \"newPc\" || this.type == 'pc') {\n type = \"pc\";\n\n if (this.type.toLowerCase().indexOf('pc') != -1 && this.linkTypeOptions.length < 8) {\n this.linkTypeOptions.push({\n value: \"05\",\n label: this.$t('label.url_in')\n }, {\n value: \"06\",\n label: this.$t('label.url_out')\n });\n }\n } else if (this.type == \"newMobile\" || this.type == 'mobile') type = \"mobile\";\n\n _getAllMenu({\n applicationId: this.appId,\n currentMenuId: \"\",\n type: \"\",\n showType: type\n }, {\n onSucess: function onSucess(response) {\n if (response.data.errcode == 0) {\n // this.loading = false\n _this3.menuOption = response.data.data;\n _this3.menuOption[0].id = _this3.appId;\n }\n }\n });\n },\n changeModule: function changeModule() {\n this.actionContent = \"\";\n if (this.detail.linkType == \"00\") this.getFormList();else if (this.detail.linkType == \"01\") this.getViewList();else if (this.detail.linkType == \"02\") this.getReportList();else if (this.detail.linkType == \"09\") this.getCustomizeReportList();\n this.$forceUpdate();\n },\n getFormList: function getFormList() {\n var _this4 = this;\n\n if (this.detail.moduleid) {\n getModuleFormList({\n moduleId: this.detail.moduleid,\n name: '',\n description: '',\n pageNo: 1,\n linesPerPage: 1000000,\n type: 1\n }, {\n onSucess: function onSucess(response) {\n if (response.data.errcode == 0) {\n _this4.actionFormOption = response.data.data; // 确认表单id是否有值\n\n if (_this4.hasRequestData) {\n _this4.checkActionFormId();\n }\n }\n }\n });\n } else {\n this.actionFormOption = [];\n }\n },\n getViewList: function getViewList() {\n var _this5 = this;\n\n if (this.detail.moduleid) {\n getModuleViewList({\n moduleId: this.detail.moduleid,\n searchword: \"\",\n pageNo: \"\",\n linesPerPage: 1000000\n }, {\n onSucess: function onSucess(response) {\n if (response.data.errcode == 0) {\n _this5.actionViewOption = response.data.data.datas; // 确认视图id是否有值\n\n if (_this5.hasRequestData) {\n _this5.checkActionViewId();\n }\n }\n }\n });\n } else {\n this.actionViewOption = [];\n }\n },\n getReportList: function () {\n var _getReportList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var response;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (!this.detail.moduleid) {\n _context2.next = 7;\n break;\n }\n\n _context2.next = 3;\n return getChartsList({\n moduleId: this.detail.moduleid,\n searchword: \"\",\n pageNo: 1,\n linesPerPage: 1000000\n });\n\n case 3:\n response = _context2.sent;\n\n if (response.data.errcode == 0) {\n this.actionReportOption = response.data.data.data; // 确认是否统计图id是否存在\n\n if (this.hasRequestData) {\n this.checkActionReportId();\n }\n }\n\n _context2.next = 8;\n break;\n\n case 7:\n this.actionReportOption = [];\n\n case 8:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function getReportList() {\n return _getReportList.apply(this, arguments);\n }\n\n return getReportList;\n }(),\n getCustomizeReportList: function () {\n var _getCustomizeReportList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n var response;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n if (!this.detail.moduleid) {\n _context3.next = 7;\n break;\n }\n\n _context3.next = 3;\n return getReportsList({\n moduleId: this.detail.moduleid,\n searchword: \"\",\n pageNo: \"\",\n linesPerPage: 1000000\n });\n\n case 3:\n response = _context3.sent;\n\n if (response.data.errcode == 0) {\n // 需要过滤报表的打印模板\n this.customizeReportOption = response.data.data.datas.filter(function (item) {\n return item.isPrint == 0;\n }); // 确认是否自定义报表id是否存在\n\n if (this.hasRequestData) {\n this.checkcustomizeReportId();\n }\n }\n\n _context3.next = 8;\n break;\n\n case 7:\n this.customizeReportOption = [];\n\n case 8:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function getCustomizeReportList() {\n return _getCustomizeReportList.apply(this, arguments);\n }\n\n return getCustomizeReportList;\n }(),\n addParam: function addParam() {\n this.queryString.push({\n paramKey: \"\",\n paramValue: \"\"\n });\n },\n delParam: function delParam(index) {\n this.queryString.splice(index, 1);\n },\n getModules: function () {\n var _getModules = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n var currentModuleId, response;\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n currentModuleId = \"\";\n _context4.next = 3;\n return getAllmodules(this.appId, currentModuleId);\n\n case 3:\n response = _context4.sent;\n\n if (response.data.errcode == 0) {\n this.moduleOption = response.data.data; // 确认模块di是否存在\n\n if (this.detail.moduleid) {\n this.checkModuleId();\n }\n }\n\n case 5:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function getModules() {\n return _getModules.apply(this, arguments);\n }\n\n return getModules;\n }(),\n getData: function getData() {\n var _this6 = this;\n\n this.loading = true;\n getMenuDetail(this.menuId, {\n onSucess: function onSucess(resp) {\n if (resp.data.errcode == 0) {\n _this6.hasRequestData = true; // 有数据请求回来\n\n _this6.detail = resp.data.data;\n _this6.detail.linkType = resp.data.data.linkType ? resp.data.data.linkType : \"\";\n if (_this6.detail.linkType == \"00\") _this6.getFormList();else if (_this6.detail.linkType == \"01\") _this6.getViewList();else if (_this6.detail.linkType == \"02\") _this6.getReportList();else if (_this6.detail.linkType == \"09\") _this6.getCustomizeReportList();else _this6.loading = false;\n if (_this6.detail.linkType == \"00\" || _this6.detail.linkType == \"01\" || _this6.detail.linkType == \"02\" || _this6.detail.linkType == \"09\") _this6.actionContent = _this6.detail.actionContent;else if (_this6.detail.linkType == \"07\") _this6.actionScript = _this6.detail.actionContent;else _this6.actionContentOther = _this6.detail.actionContent;\n if ((_this6.detail.superior == \"\" || !_this6.detail.superior) && _this6.type.indexOf(\"obile\") != -1) _this6.show = false;else if (_this6.detail.superior && _this6.type.indexOf(\"obile\") != -1) _this6.show = true;\n if (!_this6.detail.linkType) _this6.detail.linkType = \"\";\n _this6.queryString = JSON.parse(_this6.detail.queryString);\n _this6.icon = JSON.parse(_this6.detail.ico); // 设置字体图标及颜色\n\n if (_this6.icon.icontype == 'img') {\n _this6.icon.imgUrl = _this6.icon.icon;\n _this6.icon.fontUrl = \"\";\n } else {\n _this6.icon.fontUrl = _this6.icon.icon;\n _this6.icon.imgUrl = \"\";\n _this6.fontStyle = 'color:' + _this6.icon.iconFontColor;\n }\n } else {\n _this6.loading = false;\n\n _this6.$message.error(resp.data.errmsg);\n }\n }\n });\n },\n\n /**\n * 链接类型改变清空模块的值\n */\n resetModuleId: function resetModuleId() {\n this.detail.moduleid = '';\n this.actionContent = ''; // 清空已有的数组【防止新建时不需选择就出现内容】\n\n this.actionFormOption = [];\n this.actionViewOption = [];\n this.actionReportOption = [];\n this.customizeReportOption = [];\n this.$forceUpdate();\n },\n\n /**\n * 显示多语言弹框\n */\n showMultiLanguage: function showMultiLanguage() {\n this.languagesVisible = true;\n this.getMultiLanguagetions();\n },\n\n /**\n * 多语言列表\n */\n getMultiLanguagetions: function () {\n var _getMultiLanguagetions = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {\n var appId, response, list;\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n appId = sessionStorage.getItem(\"appId\");\n _context5.next = 3;\n return getMultiLanguageList(this.languageParams, appId);\n\n case 3:\n response = _context5.sent;\n\n if (response.data.errcode == 0) {\n list = response.data.data;\n\n if (list.data == null) {\n list.data = [];\n }\n\n list.data.map(function (item) {\n if (item.type == 1) {\n item.language = \"English\";\n } else if (item.type == 2) {\n item.language = \"简体中文\";\n } else if (item.type == 3) {\n item.language = \"繁體中文\";\n }\n });\n this.languageData = list;\n }\n\n case 5:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n\n function getMultiLanguagetions() {\n return _getMultiLanguagetions.apply(this, arguments);\n }\n\n return getMultiLanguagetions;\n }(),\n\n /**\n * 删除多语言\n */\n delMultiLanguage: function () {\n var _delMultiLanguage = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(arr) {\n var response;\n return regeneratorRuntime.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n _context6.prev = 0;\n _context6.next = 3;\n return delMsg(this.$t('msg.delConfirm'), this.$t('msg.tip'));\n\n case 3:\n _context6.next = 5;\n return deleteMultiLanguageList(arr);\n\n case 5:\n response = _context6.sent;\n\n if (response.data.errcode == 0) {\n this.$message.success(this.$t('msg.remove_ss'));\n this.getMultiLanguagetions();\n }\n\n _context6.next = 12;\n break;\n\n case 9:\n _context6.prev = 9;\n _context6.t0 = _context6[\"catch\"](0);\n console.log(_context6.t0);\n\n case 12:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee6, this, [[0, 9]]);\n }));\n\n function delMultiLanguage(_x2) {\n return _delMultiLanguage.apply(this, arguments);\n }\n\n return delMultiLanguage;\n }(),\n\n /**\n * 多语言参数改变时重新请求\n */\n changeLanguageParams: function changeLanguageParams(params) {\n this.languageParams = params;\n this.getMultiLanguagetions();\n },\n\n /**\n * 清空多语言的值\n */\n resetMultiLanguage: function resetMultiLanguage() {\n this.detail.multiLanguageLabel = '';\n },\n\n /**\n * 选择多语言的值\n */\n handelMultiLanguage: function handelMultiLanguage(row) {\n this.detail.multiLanguageLabel = row.label;\n },\n\n /**\n * 确认模块id是否存在\n */\n checkModuleId: function checkModuleId() {\n var _this7 = this;\n\n var flag = false;\n this.moduleOption.some(function (item) {\n if (item.id === _this7.detail.moduleid) {\n flag = true;\n return;\n }\n });\n if (!flag) this.detail.moduleid = '';\n },\n\n /**\n * 确认表单id是否存在\n */\n checkActionFormId: function checkActionFormId() {\n var _this8 = this;\n\n var flag = false;\n this.actionFormOption.some(function (item) {\n if (item.id === _this8.actionContent) {\n flag = true;\n return;\n }\n });\n if (!flag) this.actionContent = '';\n this.loading = false;\n },\n\n /**\n * 确认视图id是否存在\n */\n checkActionViewId: function checkActionViewId() {\n var _this9 = this;\n\n var flag = false;\n this.actionViewOption.some(function (item) {\n if (item.id === _this9.actionContent) {\n flag = true;\n return;\n }\n });\n if (!flag) this.actionContent = '';\n this.loading = false;\n },\n\n /**\n * 确认图表id是否存在\n */\n checkActionReportId: function checkActionReportId() {\n var _this10 = this;\n\n var flag = false;\n this.actionReportOption.some(function (item) {\n if (item.id === _this10.actionContent) {\n flag = true;\n return;\n }\n });\n if (!flag) this.actionContent = '';\n this.loading = false;\n },\n\n /**\n * 确认自定义报表id是否存在\n */\n checkcustomizeReportId: function checkcustomizeReportId() {\n var _this11 = this;\n\n var flag = false;\n this.customizeReportOption.some(function (item) {\n if (item.id === _this11.actionContent) {\n flag = true;\n return;\n }\n });\n if (!flag) this.actionContent = '';\n this.loading = false;\n },\n\n /**\n * 显示脚本编辑器弹框\n */\n showScriptEditor: function showScriptEditor() {\n this.scriptEditorVisible = true;\n },\n\n /**\n * 将脚本编辑器的值写入到textarea中\n */\n handleScriptEditor: function handleScriptEditor(val) {\n this.actionScript = val;\n },\n\n /**\n * 读取和设置颜色\n */\n setColor: function setColor(val) {\n this.icon.iconFontColor = val; // 设置颜色\n\n this.fontStyle = 'color:' + val;\n }\n }\n};",null]}