{"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/Modules/Charts.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/Modules/Charts.vue","mtime":1701674859501},{"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 \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.number.constructor\";\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//\nimport { reqChartsDetail, reqUpdateChartsDetail, reqAddCharts } from \"@/service/ModulesApi.js\";\nimport { getModuleViewList } from \"@/service/ViewApi.js\";\nimport { getModuleFormList } from \"@/service/FormApi.js\";\nimport CodeMirror from \"@/components/Common/CodeMirror\";\nimport { nameCheck, descCheck } from \"@/utils/utils.js\";\nimport { delMsg } from '@/utils/elementui';\nexport default {\n name: \"chartsdetial\",\n data: function data() {\n return {\n params: {\n id: \"\" // 当前选中的id\n\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 note: [{\n validator: descCheck,\n trigger: \"blur\"\n }]\n },\n activeName: \"basic\",\n form: {\n name: \"\",\n // 名称\n viewId: \"\",\n // 查询表单\n searchFormId: \"\",\n // 点击跳转视图\n note: \"\",\n // 备注\n fontSize: \"12\" // 字体大小\n\n },\n typeChart: \"\",\n // 表格类型\n chartObj: {},\n viewList: [],\n // 查询表单数据\n formList: [],\n // 跳转视图数据\n tableHeight: '200px',\n loading: true,\n // 加载\n btnLoading: false // 保存按钮加载状态\n\n };\n },\n methods: {\n /**\n * 动态计算页面table高度\n */\n getScollerHeight: function getScollerHeight() {\n var _this = this;\n\n setTimeout(function () {\n var clientHeight = document.documentElement.clientHeight || document.body.clientHeight; //60 头部, 32 面包屑, 41 第一层页签, 50 列表标题, 71 查询, 20 父组件外边距, 40分页\n\n _this.tableHeight = clientHeight - 60 - 32 - 41 - 10 + 'px';\n }, 100);\n },\n handleClick: function handleClick(row) {\n console.log(row);\n },\n applySample: function () {\n var _applySample = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!this.typeChart) {\n _context.next = 13;\n break;\n }\n\n _context.prev = 1;\n _context.next = 4;\n return delMsg(this.$t('msg.choose'), this.$t('msg.tip'));\n\n case 4:\n this.$refs.codemirror.setEditor();\n this.$refs.codemirror.refresh();\n _context.next = 11;\n break;\n\n case 8:\n _context.prev = 8;\n _context.t0 = _context[\"catch\"](1);\n console.log(_context.t0);\n\n case 11:\n _context.next = 14;\n break;\n\n case 13:\n return _context.abrupt(\"return\", this.$message.error(this.$t('msg.select_sample')));\n\n case 14:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this, [[1, 8]]);\n }));\n\n function applySample() {\n return _applySample.apply(this, arguments);\n }\n\n return applySample;\n }(),\n save: function save(formName) {\n var _this2 = this;\n\n // 编辑\n if (this.params.id) {\n this.$refs[formName].validate( /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(valid) {\n var params, result;\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 = 10;\n break;\n }\n\n _this2.btnLoading = true;\n params = _objectSpread(_objectSpread({}, _this2.form), {}, {\n id: _this2.params.id,\n appId: sessionStorage.getItem(\"appId\"),\n parentId: _this2.$route.query.moduleId,\n scripttext: _this2.$refs.codemirror.getEditor(),\n fontSize: Number(_this2.form.fontSize),\n chartName: _this2.typeChart\n });\n _context2.next = 5;\n return reqUpdateChartsDetail(params);\n\n case 5:\n result = _context2.sent;\n if (result.data.errcode == 0) _this2.$message.success(_this2.$t('msg.update_ss'));\n _this2.btnLoading = false;\n _context2.next = 12;\n break;\n\n case 10:\n console.log('error submit!!');\n return _context2.abrupt(\"return\", false);\n\n case 12:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }());\n } else {\n this.$refs[formName].validate( /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(valid) {\n var response;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n if (!valid) {\n _context3.next = 9;\n break;\n }\n\n _this2.btnLoading = true;\n _context3.next = 4;\n return reqAddCharts({\n appId: sessionStorage.getItem(\"appId\"),\n moduleId: _this2.$route.query.moduleId\n }, _objectSpread(_objectSpread({}, _this2.form), {}, {\n scripttext: _this2.$refs.codemirror.getEditor(),\n chartName: _this2.typeChart,\n fontSize: Number(_this2.form.fontSize)\n }));\n\n case 4:\n response = _context3.sent;\n\n if (response.data.errcode == 0) {\n _this2.$message.success(_this2.$t('msg.created_ss'));\n\n _this2.params.id = response.data.data.id;\n }\n\n _this2.btnLoading = false;\n _context3.next = 11;\n break;\n\n case 9:\n console.log('error submit!!');\n return _context3.abrupt(\"return\", false);\n\n case 11:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n\n return function (_x2) {\n return _ref2.apply(this, arguments);\n };\n }());\n }\n },\n logout: function logout() {\n this.$router.push({\n path: \"/home/softwaresdetails/chartslist\",\n query: {\n edit: true,\n moduleId: this.$route.query.moduleId\n }\n });\n },\n preStep: function preStep() {\n this.$refs.codemirror.undo();\n },\n nextStep: function nextStep() {\n this.$refs.codemirror.redo();\n },\n // 选择样例后更新code的内容\n setEditor: function setEditor(codeData) {\n this.chartObj.scripttext = codeData;\n },\n // 请求统计图详情\n getChartDetail: function () {\n var _getChartDetail = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n var response;\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n this.loading = true;\n _context4.next = 3;\n return reqChartsDetail(this.$route.query.id);\n\n case 3:\n response = _context4.sent;\n\n if (response.data.errcode == 0) {\n this.loading = false;\n this.chartObj = response.data.data;\n this.typeChart = this.chartObj.chartName;\n this.form = {\n name: this.chartObj.name,\n viewId: this.chartObj.viewId ? this.chartObj.viewId : \"\",\n // 点击跳转视图\n searchFormId: this.chartObj.searchFormId ? this.chartObj.searchFormId : \"\",\n // 查询表单\n note: this.chartObj.note ? this.chartObj.note : \"\",\n // 备注\n fontSize: String(this.chartObj.fontSize) // 字体大小\n\n };\n this.getViewList();\n this.getFromList();\n }\n\n case 5:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function getChartDetail() {\n return _getChartDetail.apply(this, arguments);\n }\n\n return getChartDetail;\n }(),\n\n /**\n * 请求查询表单的数据\n */\n getViewList: function getViewList() {\n var _this3 = this;\n\n var params = {\n searchword: \"\",\n pageNo: 1,\n linesPerPage: 100000,\n appId: sessionStorage.getItem(\"appId\"),\n moduleId: this.$route.query.moduleId\n };\n this.loading = true;\n getModuleViewList(params, {\n onSucess: function onSucess(response) {\n if (response.data.errcode == 0) {\n _this3.loading = false;\n _this3.viewList = response.data.data.datas;\n\n if (_this3.form.viewId) {\n var have = false;\n\n for (var i = 0; i < _this3.viewList.length; i++) {\n if (_this3.viewList[i].id == _this3.form.viewId) {\n have = true;\n break;\n }\n }\n\n if (!have) {\n _this3.form.viewId = \"\";\n }\n }\n }\n }\n });\n },\n\n /**\n * 请求跳转视图的数据\n */\n getFromList: function getFromList() {\n var _this4 = this;\n\n var params = {\n name: \"\",\n description: \"\",\n type: 256,\n pageNo: 1,\n linesPerPage: 100000,\n appId: sessionStorage.getItem(\"appId\"),\n moduleId: this.$route.query.moduleId\n };\n this.loading = true;\n getModuleFormList(params, {\n onSucess: function onSucess(response) {\n if (response.data.errcode == 0) {\n _this4.formList = response.data.data;\n _this4.loading = false;\n\n if (_this4.form.searchFormId) {\n var have = false;\n\n for (var i = 0; i < _this4.formList.length; i++) {\n if (_this4.formList[i].id == _this4.form.searchFormId) {\n have = true;\n break;\n }\n }\n\n if (!have) {\n _this4.form.searchFormId = \"\";\n }\n }\n }\n }\n });\n }\n },\n created: function created() {\n // 有params是编辑\n if (this.$route.query.edit == true || this.$route.query.edit == 'true') {\n this.getChartDetail();\n this.params.id = this.$route.query.id;\n }\n\n this.getScollerHeight(); // 判断如果不是编辑页面就获取完数据详情再请求\n\n if (this.$route.query.edit == false || this.$route.query.edit == 'false') {\n this.getViewList();\n this.getFromList();\n }\n },\n components: {\n CodeMirror: CodeMirror\n }\n};",null]}