{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\flow\\simulation\\ProcessSimulation.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\flow\\simulation\\ProcessSimulation.vue","mtime":1675071992881},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es7.symbol.async-iterator\";\nimport \"core-js/modules/es6.symbol\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.array.from\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.array.find\";\nimport _toConsumableArray from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\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\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 uc from \"@/api/uc.js\";\nimport utils from \"@/hotent-ui-util.js\";\nimport { Base64 } from \"js-base64\";\n\nvar eipAuthDialog = function eipAuthDialog() {\n return import(\"@/components/dialog/EipAuthDialog.vue\");\n};\n\nvar processSimulationInst = function processSimulationInst() {\n return import(\"@/views/flow/simulation/ProcessSimulationInst.vue\");\n};\n\nvar chart = function chart() {\n return import(\"@/components/form/chart/Chart.vue\");\n};\n\nexport default {\n components: {\n eipAuthDialog: eipAuthDialog,\n processSimulationInst: processSimulationInst,\n chart: chart\n },\n computed: {\n deleteUrl: function deleteUrl() {\n return window.context.bpmRunTime + \"/runtime/bpmTestCase/v1/remove\";\n },\n saveUrl: function saveUrl() {\n var preUrl = window.context.bpmRunTime + \"/runtime/bpmTestCase/v1/save\";\n return preUrl;\n }\n },\n data: function data() {\n return {\n formDialogVisible: false,\n dialogVisible: false,\n processSimulationdialogVisible: false,\n baseFlowInfo: {\n defKyes: [],\n nodeInfo: {},\n formId: null\n },\n defKey: null,\n testCase: {\n name: \"\",\n defKey: \"\",\n boFormData: {},\n startor: [],\n actionType: {},\n bpmDebugger: {}\n },\n testCaseSaveModel: {},\n isSubmit: true,\n data: [],\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n previewFormUrl: \"\",\n reportDialogVisible: false,\n reportData: {},\n reportOption: {},\n isAddDialog: false\n };\n },\n mounted: function mounted() {\n var _this = this;\n\n this.$validator = this.$root.$validator;\n window.addEventListener('message', function (e) {\n if (e.data && e.data.formData) {\n _this.testCase.boFormData = e.data.formData;\n }\n });\n },\n methods: {\n handleReportClose: function handleReportClose() {\n this.reportDialogVisible = false;\n },\n batchStartFlow: function batchStartFlow(id) {\n var _this2 = this;\n\n var elTable = null;\n\n if (this.$refs.testCaseTable.$refs.htTable) {\n elTable = this.$refs.testCaseTable.$refs.htTable;\n }\n\n if (elTable && elTable.selection && elTable.selection.length == 0 && !id) {\n this.$message.error(\"请至少选择一条数据\");\n return;\n }\n\n var ids = [];\n\n var _iterator = _createForOfIteratorHelper(elTable.selection),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var item = _step.value;\n ids.push(item.id);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n if (id) {\n ids.push(id);\n }\n\n var idstr = ids.join(\",\");\n this.$http.post(window.context.bpmRunTime + \"/runtime/bpmTestCase/v1/startTest\", idstr).then(function (res) {\n if (res.data.state) {\n _this2.$message(res.data.message);\n } else {\n _this2.$message(res.data.message);\n }\n });\n },\n initData: function initData() {\n var _this3 = this;\n\n this.$http.get(window.context.bpmRunTime + \"/runtime/bpmTestCase/v1/getBaseInfo?defKey=\" + this.defKey).then(function (res) {\n Object.assign(_this3.baseFlowInfo, res.data);\n });\n },\n addItem: function addItem(type, defKey) {\n if (type == \"actionType\") {\n var obj = {\n \"nodeId\": \"\",\n \"actionName\": \"agree\",\n \"count\": 1\n };\n\n if (!this.testCase.actionType[defKey]) {\n this.$set(this.testCase.actionType, defKey, []);\n }\n\n this.$set(this.testCase.actionType[defKey], this.testCase.actionType[defKey].length, obj);\n }\n\n if (type == \"bpmDebugger\") {\n if (!this.testCase.bpmDebugger[defKey]) {\n this.$set(this.testCase.bpmDebugger, defKey, []);\n }\n\n this.$set(this.testCase.bpmDebugger[defKey], this.testCase.bpmDebugger[defKey].length, []);\n }\n },\n delItem: function delItem(arr, key) {\n arr.splice(key, 1);\n },\n selectNodeId: function selectNodeId(type, defKey, key, idx) {\n if (type == \"actionType\") {\n var __arr = _toConsumableArray(this.testCase.actionType[defKey]);\n\n __arr.splice(idx, 1);\n\n var isExist = __arr.find(function (item) {\n return item.nodeId == key.nodeId;\n });\n\n if (isExist) {\n this.$message.warning(\"已经设置了该节点,请重新选择,请不要重复设置\");\n key.nodeId = \"\";\n }\n }\n\n if (type == \"bpmDebugger\") {\n var __arr = _toConsumableArray(this.testCase.bpmDebugger[defKey]);\n\n __arr.splice(idx, 1);\n\n var _isExist = __arr.find(function (item) {\n return item == key;\n });\n\n if (_isExist) {\n this.$message.warning(\"已经设置了该节点,请重新选择,请不要重复设置\", {\n icon: 2\n });\n key = \"\";\n return;\n }\n }\n },\n showAuthDialog: function showAuthDialog() {\n var conf = {\n right: [],\n permissionList: [{\n type: \"user\",\n title: \"用户\"\n }, {\n type: \"org\",\n title: \"组织\"\n }, {\n type: \"pos\",\n title: \"岗位\"\n }, {\n type: \"role\",\n title: \"角色\"\n }]\n };\n\n if (this.testCase.startor) {\n conf.right = this.testCase.startor;\n }\n\n this.$refs.eipAuthDialog.showDialog(conf);\n },\n showFormDialog: function showFormDialog() {\n this.previewFormUrl = window.context.front + \"/previewForm/\" + this.baseFlowInfo.formId + \"?token=\" + this.$store.state.login.currentUser.token + \"&formData=\" + Base64.encode(JSON.stringify(this.testCase.boFormData));\n this.formDialogVisible = true;\n },\n handleFormDialogClose: function handleFormDialogClose() {\n var cancel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n if (cancel && this.isAddDialog) {\n this.testCase.boFormData = {};\n }\n\n this.formDialogVisible = false;\n },\n showReportDialog: function showReportDialog() {\n var _this4 = this;\n\n var elTable = this.$refs.testCaseTable.$refs.htTable;\n\n if (!elTable.selection || elTable.selection.length == 0) {\n this.$message.warning(\"请至少选择一个测试用例\");\n return;\n }\n\n var aryIds = [];\n elTable.selection.forEach(function (element) {\n aryIds.push(element.id);\n });\n this.$http.post(window.context.bpmRunTime + \"/runtime/bpmTestCase/v1/getReportData\", aryIds.join(\",\")).then(function (res) {\n _this4.reportData = res.data.value;\n var app = {};\n app.config = {\n rotate: 90,\n align: 'left',\n verticalAlign: 'middle',\n position: 'insideBottom',\n distance: 15\n };\n var labelOption = {\n normal: {\n show: true,\n position: app.config.position,\n distance: app.config.distance,\n align: app.config.align,\n verticalAlign: app.config.verticalAlign,\n rotate: app.config.rotate,\n formatter: '{c} {name|{a}}',\n fontSize: 16,\n rich: {\n name: {\n textBorderColor: '#fff'\n }\n }\n }\n };\n _this4.reportOption = {\n name: \"流程仿真报表\",\n subtext: \"实例状态\",\n color: ['#003366', '#4cabce', '#e5323e'],\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n type: 'shadow'\n }\n },\n legend: {\n data: ['end-已结束', 'unend-未结束', 'endProcess--人工结束']\n },\n toolbox: {\n show: true,\n orient: 'vertical',\n left: 'right',\n top: 'center',\n feature: {\n mark: {\n show: true\n },\n dataView: {\n show: true,\n readOnly: false\n },\n magicType: {\n show: true,\n type: ['line', 'bar', 'stack', 'tiled']\n },\n restore: {\n show: true\n },\n saveAsImage: {\n show: true\n }\n }\n },\n calculable: true,\n xAxis: [{\n type: 'category',\n axisTick: {\n show: false\n },\n data: _this4.reportData.xAxis\n }],\n yAxis: [{\n type: 'value'\n }],\n series: [{\n name: 'end-已结束',\n type: 'bar',\n barGap: 0,\n label: labelOption,\n data: _this4.reportData.end\n }, {\n name: 'unend-未结束',\n type: 'bar',\n label: labelOption,\n data: _this4.reportData.unend\n }, {\n name: 'endProcess--人工结束',\n type: 'bar',\n label: labelOption,\n data: _this4.reportData.endProcess\n }]\n };\n _this4.reportDialogVisible = true;\n });\n },\n showInstDialog: function showInstDialog() {\n this.$refs.processSimulationInst.handleInstDialogShow(this.defKey);\n },\n dialogOnConfirm: function dialogOnConfirm(res) {\n this.testCase.startor = res;\n },\n handleClose: function handleClose() {\n this.dialogVisible = false;\n },\n showProcessSimulation: function showProcessSimulation(defKey) {\n this.defKey = defKey;\n this.testCase.defKey = defKey;\n this.initData();\n this.processSimulationdialogVisible = true;\n },\n handleCloseProcessSimulation: function handleCloseProcessSimulation() {\n this.processSimulationdialogVisible = false;\n },\n showDialog: function showDialog() {\n var add = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n if (add) {\n this.testCase = {\n name: \"\",\n boFormData: {},\n startor: [],\n actionType: {},\n bpmDebugger: {},\n id: \"\",\n pkVal: \"\"\n };\n this.isAddDialog = true;\n }\n\n this.dialogVisible = true;\n },\n dialogCancle: function dialogCancle(dialogVisible) {\n this[dialogVisible] = false;\n this.isAddDialog = false;\n },\n loadData: function loadData(param, cb) {\n var _this5 = this;\n\n if (!param.querys) {\n param.querys = [];\n }\n\n var defKeyParam = {\n property: \"def_key_\",\n value: this.defKey,\n group: \"quick\",\n relation: \"AND\",\n operation: \"EQUAL\"\n };\n param.querys = param.querys.concat(defKeyParam);\n this.$http.post(window.context.bpmRunTime + \"/runtime/bpmTestCase/v1/list\", param).then(function (response) {\n _this5.data = response.data.rows;\n _this5.pageResult = {\n page: response.data.page,\n pageSize: response.data.pageSize,\n total: response.data.total\n };\n }).finally(function () {\n return cb();\n });\n },\n handleCommand: function handleCommand(params) {\n switch (params.command) {\n case \"editTestCase\":\n var temp = {};\n temp = _objectSpread(_objectSpread({}, temp), params.row);\n temp.startor = JSON.parse(temp.startor);\n temp.bpmDebugger = JSON.parse(temp.bpmDebugger);\n temp.boFormData = JSON.parse(temp.boFormData);\n temp.actionType = JSON.parse(temp.actionType);\n this.testCase = temp;\n this.showDialog(false);\n break;\n\n case \"startFlow\":\n this.batchStartFlow(params.row.id);\n break;\n\n default:\n break;\n }\n },\n beforeSaveData: function () {\n var _beforeSaveData = _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 // 提交前可以改变model中的数据\n this.testCaseSaveModel = _objectSpread(_objectSpread({}, this.testCaseSaveModel), this.testCase);\n this.testCaseSaveModel.boFormData = JSON.stringify(this.testCaseSaveModel.boFormData);\n this.testCaseSaveModel.startor = JSON.stringify(this.testCaseSaveModel.startor);\n this.testCaseSaveModel.actionType = JSON.stringify(this.testCaseSaveModel.actionType);\n this.testCaseSaveModel.bpmDebugger = JSON.stringify(this.testCaseSaveModel.bpmDebugger);\n this.testCaseSaveModel.defKey = this.defKey;\n this.isSubmit = true;\n\n case 7:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function beforeSaveData() {\n return _beforeSaveData.apply(this, arguments);\n }\n\n return beforeSaveData;\n }(),\n afterSaveData: function afterSaveData() {\n var _this6 = this;\n\n this.dialogVisible = false;\n this.$refs.testCaseTable.load();\n setTimeout(function () {\n _this6.testCase = {\n name: \"\",\n boFormData: {},\n startor: [],\n actionType: {},\n bpmDebugger: {},\n id: \"\",\n pkVal: \"\"\n };\n }, 200);\n },\n afterLoadData: function afterLoadData(data) {\n var _this7 = this;\n\n // 菜单权限复制\n if (this.dialogVisibleMenuPerm) {\n this.allowRoles = data;\n } // 编辑角色\n\n\n if (this.dialogVisible) {\n this.role = data.value;\n setTimeout(function () {\n return _this7.$validator.validateAll(\"editRoleForm\");\n });\n }\n }\n }\n};",null]}