{"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/Library/StyleLibs.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/Library/StyleLibs.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 \"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { saveStyleLibs, editgetStyleLibs, saveEditStyleLibs } from \"@/service/LibraryAPI.js\";\nimport ScriptEditorSelect from \"@/components/Common/scriptEditor\";\nimport { nameCheck } from \"@/utils/utils.js\";\nexport default {\n name: \"StyleLibs\",\n components: {\n ScriptEditorSelect: ScriptEditorSelect\n },\n data: function data() {\n return {\n formData: {\n name: \"\",\n content: \"\"\n },\n rules: {\n name: [{\n required: true,\n message: this.$t('placeholder.name'),\n trigger: 'blur'\n }, {\n validator: nameCheck,\n trigger: \"blur\"\n }],\n content: [{\n required: true,\n message: this.$t('placeholder.script'),\n trigger: 'blur'\n }]\n },\n scriptEditorVisible: false,\n // 脚本编辑器弹窗\n btnLoading: false // 按钮的加载图标\n\n };\n },\n mounted: function mounted() {\n var edit = this.$route.query.edit;\n\n if (edit && edit != 'false') {\n this.getStyleLibs();\n }\n },\n methods: {\n /**\n * 保存表单\n */\n save: function save(formName) {\n var _this = this;\n\n this.$refs[formName].validate( /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(valid) {\n var appId, styleId, response, _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 = 21;\n break;\n }\n\n appId = sessionStorage.getItem(\"appId\");\n styleId = _this.$route.query.styleId || _this.formData.id;\n\n if (!styleId) {\n _context.next = 13;\n break;\n }\n\n _this.formData.lastmodifytime = new Date();\n _this.btnLoading = true;\n _context.next = 8;\n return saveEditStyleLibs(appId, styleId, _this.formData);\n\n case 8:\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\n _context.next = 19;\n break;\n\n case 13:\n _this.btnLoading = true;\n _context.next = 16;\n return saveStyleLibs(appId, _this.formData);\n\n case 16:\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 _this.formData.id = _response.data.data.id;\n }\n\n case 19:\n _context.next = 23;\n break;\n\n case 21:\n console.log('error submit!!');\n return _context.abrupt(\"return\", false);\n\n case 23:\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\n /**\n * 获取样式库详情\n */\n getStyleLibs: function () {\n var _getStyleLibs = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var appId, styleId, response;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n appId = sessionStorage.getItem(\"appId\");\n styleId = this.$route.query.styleId;\n _context2.next = 4;\n return editgetStyleLibs(appId, styleId);\n\n case 4:\n response = _context2.sent;\n\n if (response.data.errcode == 0) {\n this.formData = response.data.data;\n }\n\n case 6:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function getStyleLibs() {\n return _getStyleLibs.apply(this, arguments);\n }\n\n return getStyleLibs;\n }(),\n\n /**\n * 退出\n */\n close: function close() {\n this.$store.dispatch(\"rightHelpPageParams\", {\n title: this.$t('msg.style_list'),\n url: \"application/application_info_libraries_styleLibs_list_help.html\"\n });\n this.$router.push({\n path: '/home/softwaresdetails/Library/StyleLibsList',\n query: {\n edit: true\n }\n });\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.formData.content = val;\n }\n },\n computed: {\n /**\n * textarea 传给 脚本编辑器的值\n */\n showScritptEditorCode: function showScritptEditorCode() {\n return this.formData.content;\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]}