{"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/Roles.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/Roles.vue","mtime":1701674859499},{"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 \"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\";\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\";\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//\nimport { createRoles, updateRoles } from \"@/service/CommontoolsAPI.js\";\nimport { nameCheck } from \"@/utils/utils.js\";\nexport default {\n name: \"roles\",\n data: function data() {\n return {\n params: {\n appId: \"\",\n id: \"\",\n name: \"\",\n roleNo: \"\",\n status: 1,\n defaultRole: true\n },\n rules: {\n name: [{\n required: true,\n message: this.$t('placeholder.role_name'),\n trigger: 'blur'\n }, {\n validator: nameCheck,\n trigger: \"blur\"\n }],\n roleNo: [{\n required: true,\n message: this.$t('placeholder.role_num'),\n trigger: 'blur'\n }],\n defaultRole: [{\n required: true,\n message: this.$t('placeholder.role_default'),\n trigger: 'change'\n }]\n },\n btnLoading: false // 按钮的加载\n\n };\n },\n mounted: function mounted() {\n if (this.$route.query.edit && this.$route.query.edit != 'false') {\n var record = this.$route.query.params;\n\n var params = _objectSpread(_objectSpread({}, this.params), record);\n\n this.params = params;\n } else {\n var appId = sessionStorage.getItem(\"appId\");\n\n var _params = _objectSpread(_objectSpread({}, this.params), {}, {\n appId: appId\n });\n\n this.params = _params;\n }\n },\n methods: {\n /**\n * 退出\n */\n goback: function goback() {\n this.$store.dispatch(\"rightHelpPageParams\", {\n title: this.$t('widget.role_list'),\n url: \"application/application_info_generalTools_role_list_help.html\"\n });\n this.$router.push({\n path: '/home/softwaresdetails/commontool/roleslist',\n query: {\n edit: true\n }\n });\n },\n //保存并新建\n btnSaveAndNew: function btnSaveAndNew(params) {\n this.btnSave(params, 'andnew');\n },\n //重置字段\n resetFields: function resetFields() {\n this.params = {\n appId: sessionStorage.getItem(\"appId\"),\n id: '',\n name: '',\n roleNo: '',\n status: 1,\n defaultRole: true\n };\n },\n\n /**\n * 保存操作\n */\n btnSave: function btnSave(params, type) {\n var _this = this;\n\n if (this.params.id != \"\") {\n this.$refs[params].validate( /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(valid) {\n var response;\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 = 9;\n break;\n }\n\n _this.btnLoading = true;\n _context.next = 4;\n return updateRoles(_this.params);\n\n case 4:\n response = _context.sent;\n _this.btnLoading = false;\n\n if (response.data.errcode == 0) {\n _this.$message.success(_this.$t('msg.ss'));\n\n if (type == 'andnew') {\n _this.resetFields();\n }\n }\n\n _context.next = 10;\n break;\n\n case 9:\n return _context.abrupt(\"return\", false);\n\n case 10:\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 } else {\n this.$refs[params].validate( /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(valid) {\n var response, _params2;\n\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (!valid) {\n _context2.next = 9;\n break;\n }\n\n _this.btnLoading = true;\n _context2.next = 4;\n return createRoles(_this.params);\n\n case 4:\n response = _context2.sent;\n _this.btnLoading = false;\n\n if (response.data.errcode == 0) {\n _params2 = _objectSpread(_objectSpread({}, _this.params), {}, {\n id: response.data.data.id\n });\n _this.params = _params2;\n\n _this.$message.success(_this.$t('msg.ss'));\n\n if (type == 'andnew') {\n _this.resetFields();\n }\n }\n\n _context2.next = 10;\n break;\n\n case 9:\n return _context2.abrupt(\"return\", false);\n\n case 10:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n return function (_x2) {\n return _ref2.apply(this, arguments);\n };\n }());\n }\n }\n },\n watch: {\n \"$store.state.rightHelpPageParams\": {\n handler: function handler() {\n if (this.$store.state.rightHelpFrame) {\n this.$store.state.rightHelpFrame.contentWindow.showHelpContentHtml(this.$store.state.rightHelpPageParams.title, this.$store.state.rightHelpPageParams.url);\n }\n },\n deep: true\n }\n }\n};",null]}