{"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/createMenu.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/createMenu.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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { nameCheck } from '@/utils/utils.js';\nimport { getAllMenu as _getAllMenu } from '@/service/CommontoolsAPI.js';\nimport { createMenu } from '@/service/FormApi.js';\nimport { createViewMenu } from '@/service/ViewApi.js';\nexport default {\n name: 'CreateMenu',\n data: function data() {\n return {\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 menuVisible: false,\n menuParams: {\n id: '',\n name: '',\n superior: ''\n },\n menuOption: [] // 上级菜单数组\n\n };\n },\n props: {\n formId: String,\n viewId: String,\n type: String // 属于表单还是视图\n\n },\n methods: {\n /**\n * 显示菜单对话框\n */\n showCreateDialog: function showCreateDialog() {\n this.menuVisible = true;\n this.getAllMenu();\n },\n\n /**\n * 关闭创建菜单对话框\n */\n handleCloseMenu: function handleCloseMenu() {\n var menuParams = {\n id: '',\n name: '',\n superior: ''\n };\n this.menuParams = menuParams;\n this.menuVisible = false;\n this.$refs['menuParams'].resetFields();\n },\n\n /**\n * 创建菜单\n */\n saveMenu: function saveMenu(menuParams) {\n var _this = this;\n\n this.$refs[menuParams].validate(function (valid) {\n if (valid) {\n if (_this.type == 'form') {\n var params = {\n appId: sessionStorage.getItem('appId'),\n id: _this.formId\n };\n createMenu(_this.menuParams, params, {\n onSucess: function onSucess(response) {\n if (response.data.errcode == 0) {\n _this.handleCloseMenu();\n\n _this.$message({\n message: _this.$t('msg.created_ss'),\n type: 'success'\n });\n }\n }\n });\n } else if (_this.type == 'view') {\n var viewParams = {\n appId: sessionStorage.getItem('appId'),\n id: _this.viewId\n };\n createViewMenu(viewParams, _this.menuParams, {\n onSucess: function onSucess(response) {\n if (response.data.errcode == 0) {\n _this.$message({\n message: _this.$t('msg.created_ss'),\n type: 'success'\n });\n\n _this.handleCloseMenu();\n }\n }\n });\n }\n } else {\n return false;\n }\n });\n },\n\n /**\n * 获取上级菜单\n */\n getAllMenu: function getAllMenu() {\n var _this2 = this;\n\n _getAllMenu({\n applicationId: sessionStorage.getItem('appId'),\n currentMenuId: '',\n type: '',\n showType: 'old'\n }, {\n onSucess: function onSucess(response) {\n if (response.data.errcode == 0) {\n _this2.menuOption = response.data.data;\n }\n }\n });\n }\n }\n};",null]}