{"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\\form\\FormManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\form\\FormManager.vue","mtime":1675071992913},{"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.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.regexp.to-string\";\nimport \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\nimport \"core-js/modules/es7.array.includes\";\nimport \"core-js/modules/es6.string.includes\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.string.ends-with\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\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\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { mapState } from 'vuex';\nimport form from '@/api/form.js';\nimport req from '@/request.js';\nimport utils from '@/hotent-ui-util.js';\n\nvar FormMenusAdd = function FormMenusAdd() {\n return import('@/views/form/FormMenusAdd.vue');\n};\n\nvar htAsideTree = function htAsideTree() {\n return import('@/components/common/HtAsideTree.vue');\n};\n\nvar EipSysTypeSelector = function EipSysTypeSelector() {\n return import('@/components/selector/EipSysTypeSelector.vue');\n};\n\nvar FormDesigner = function FormDesigner() {\n return import('@/components/form/FormDesigner.vue');\n};\n\nvar EipBoSelector = function EipBoSelector() {\n return import('@/components/selector/EipBoSelector.vue');\n};\n\nvar FlowFormAuth = function FlowFormAuth() {\n return import('@/components/flow/FlowFormAuth.vue');\n};\n\nvar FormVersionManager = function FormVersionManager() {\n return import('@/views/form/FormVersionManager.vue');\n};\n\nvar FormPrintTemplateManager = function FormPrintTemplateManager() {\n return import('@/views/form/FormPrintTemplateManager.vue');\n};\n\nvar eipSysTypeDialog = function eipSysTypeDialog() {\n return import('@/components/dialog/EipSysTypeDialog.vue');\n};\n\nvar eipBoDialog = function eipBoDialog() {\n return import('@/components/dialog/EipBoDialog.vue');\n};\n\nexport default {\n components: {\n htAsideTree: htAsideTree,\n EipSysTypeSelector: EipSysTypeSelector,\n FormDesigner: FormDesigner,\n EipBoSelector: EipBoSelector,\n FlowFormAuth: FlowFormAuth,\n FormVersionManager: FormVersionManager,\n FormPrintTemplateManager: FormPrintTemplateManager,\n eipSysTypeDialog: eipSysTypeDialog,\n eipBoDialog: eipBoDialog,\n FormMenusAdd: FormMenusAdd\n },\n data: function data() {\n return {\n asideShow: true,\n treeData: [],\n defaultProps: {\n children: 'children',\n label: 'name'\n },\n data: [],\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n dialogVisible: false,\n dialogVisible2: false,\n formEditorDialogVisible: false,\n dialogSaveCopyVisible: false,\n formId: null,\n formDefId: null,\n bpmForm: {\n formKey: '',\n bos: '',\n desc: '',\n templateConf: {}\n },\n typeIdQuery: null,\n formVersionVisible: false,\n formPrintVisible: false,\n formKey: null,\n updateTableData: [],\n formRow: {},\n newForm: {\n id: '',\n name: '',\n formKey: '',\n typeId: '',\n typeName: ''\n },\n importDialogVisible: false,\n formTypeSelectorCatId: '',\n formTypeSelectorCatName: '',\n fullscreenLoading: false,\n bindData: [],\n deleteDialogVisible: false,\n deleteConfirmList: []\n };\n },\n watch: {\n formEditorDialogVisible: function formEditorDialogVisible(newVal, oldVal) {\n if (newVal == false && oldVal == true) {\n this.handleCloseFormEditor();\n }\n }\n },\n computed: _objectSpread({}, mapState({\n currentUser: function currentUser(state) {\n return state.login.currentUser;\n },\n formDeleteUrl: function formDeleteUrl() {\n return \"\".concat(window.context.form, \"/form/form/v1/remove\");\n },\n uploadHeaders: function uploadHeaders(mapState) {\n return {\n Authorization: 'Bearer ' + mapState.login.currentUser.token\n };\n },\n imporCheckUrl: function imporCheckUrl(mapState) {\n return window.context.form + '/form/form/v1/importCheck?typeId=' + this.formTypeSelectorCatId;\n }\n })),\n created: function created() {\n //判断页面是否从建模过来的\n var bos = this.$route.query.bos; //第二种情况是按了F5刷新的,这种也不进入表单编辑页面\n\n if (bos && bos !== '[object Object]') {\n var templateConf = this.$route.query.templateConf;\n\n if (templateConf) {\n this.handleDialogSure({\n selection: bos,\n templateConf: templateConf\n }, true);\n } else {\n this.handleDialogSure(bos, true);\n }\n }\n },\n mounted: function mounted() {\n this.$validator = this.$root.$validator;\n\n if (this.$route.query.formId && this.$route.query.defId) {\n var row = {\n id: this.$route.query.formId,\n defId: this.$route.query.defId\n };\n this.handleCommand({\n row: row,\n command: 'edit'\n });\n this.$router.push('form#formManager');\n }\n },\n methods: {\n //显示表单添加到菜单dialog\n addToMenu: function addToMenu(type) {\n this.$refs.formMenusAdd.showDialog(type, 'addReport');\n },\n handleDialogSure: function handleDialogSure(data, boo) {\n if (Array.isArray(data)) {\n this.bpmForm.bos = data;\n this.bpmForm.templateConf = {};\n } else {\n this.bpmForm.bos = data.selection;\n this.bpmForm.templateConf = data.templateConf;\n }\n\n this.bpmForm.formType = 'pc'; //this.bpmForm.name = this.bpmForm.formName;\n\n this.formId = '';\n this.formDefId = '';\n this.formEditorDialogVisible = true;\n\n if (!boo) {\n this.$refs.eipBoDialog.handleClose();\n }\n },\n hadleUploadResult: function hadleUploadResult(response, file, fileList) {\n var _this = this;\n\n var height = (document.documentElement.clientHeight || document.body.clientHeight) * 0.85 + 'px';\n this.fullscreenLoading = false;\n var this_ = this;\n\n if (response.state) {\n this_.handleImportSuccess(response.value);\n } else {\n if (response.message) {\n if (response.message.indexOf('是否继续为其新增版本') > 0) {\n this.$confirm('
' + response.message + '
', '提示', {\n cancelButtonText: '取消',\n dangerouslyUseHTMLString: true,\n confirmButtonText: '确定',\n type: 'warning',\n closeOnClickModal: false\n }).then(function () {\n this_.fullscreenLoading = true;\n this_.$http.post(\"\".concat(window.context.form, \"/form/form/v1/importSave?cacheFileId=\") + response.value + '&confirmImport=true&typeId=' + _this.formTypeSelectorCatId).then(function (resp) {\n this_.fullscreenLoading = false;\n var data = resp.data;\n\n if (data.state) {\n this_.handleImportSuccess(data.value);\n } else {\n this_.$message.error(data.message);\n }\n });\n }).catch(function (action) {\n this_.$http.post(\"\".concat(window.context.form, \"/form/form/v1/importSave?confirmImport=false&cacheFileId=\") + response.value);\n this_.importDialogVisible = false;\n\n _this.$refs.upload.clearFiles();\n });\n } else {\n this.$message.error(response.message);\n }\n }\n }\n },\n handleImportSuccess: function handleImportSuccess(msg) {\n if (msg) {\n this.$message({\n type: 'success',\n message: msg,\n showClose: true,\n duration: 5000,\n dangerouslyUseHTMLString: true\n });\n } else {\n this.$message.success('表单导入成功');\n }\n\n this.importDialogVisible = false;\n this.$refs.htTable.load();\n this.$refs.upload.clearFiles();\n },\n beforeUpload: function beforeUpload(file) {\n if (!file.name.endsWith('.zip')) {\n this.$message.warning('只能导入zip文件!');\n return false;\n }\n\n this.imporActionUrl = this.imporCheckUrl;\n this.fullscreenLoading = true;\n },\n onExceed: function onExceed(file) {\n this.$message.warning('只能选择一个zip文件!');\n },\n submitImport: function submitImport() {\n if (!this.$refs.upload.uploadFiles || this.$refs.upload.uploadFiles.length == 0) {\n this.$message.warning('请选择要导入的表单!');\n return false;\n }\n\n if (!this.formTypeSelectorCatId) {\n this.$message.warning('请选择要导入的分类!');\n return false;\n }\n\n this.$refs.upload.submit();\n },\n handExport: function handExport() {\n var selection = this.$refs.htTable.$refs.htTable.selection;\n\n if (selection.length == 0) {\n this.$message.warning('请选择至少一项记录');\n return;\n }\n\n var ids = [];\n\n var _iterator = _createForOfIteratorHelper(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 (ids.length == 0) {\n this.$message.warning('请选择至少一项记录');\n return;\n }\n\n var url = \"\".concat(window.context.form, \"/form/form/v1/exportForm?formIds=\").concat(ids);\n req.download(url);\n },\n rowClick: function rowClick(row, column, event) {\n this.updateTableData.push(this.$refs.htTable.$refs.htTable.toggleRowSelection(row));\n },\n //表格选中数据\n tableSelect: function tableSelect(selection) {\n this.updateTableData = selection;\n },\n //设置分类\n openTypeSetDialog: function openTypeSetDialog() {\n if (this.updateTableData.length == 0) {\n this.$message({\n message: '请先选择需要设置分类的数据',\n type: 'warning'\n });\n return;\n }\n\n this.$refs.typeSetDialog.showDialog({});\n },\n sysTypeDialogOnConfirm: function sysTypeDialogOnConfirm(data) {\n var id = [];\n\n for (var i = 0; i < this.updateTableData.length; i++) {\n id.push(this.updateTableData[i].id);\n }\n\n var this_ = this;\n this.$http.get('${portal}/sys/sysType/v1/updateEntitySysType?typeID=' + data.id + '&entityIds=' + id.join(',')).then(function (resp) {\n if (resp.data && resp.data.state) {\n this_.$message({\n message: resp.data.message,\n type: 'success'\n });\n this_.updateTableData = [];\n setTimeout(function () {\n this_.dialogVisible = false;\n this_.$refs.htTable.load();\n }, 3000);\n return;\n }\n\n this_.$message.error(resp.data.message);\n });\n },\n openFormVersion: function openFormVersion(row) {\n this.formKey = row.formKey;\n this.formVersionVisible = true;\n },\n handleCloseFormVersion: function handleCloseFormVersion() {\n this.formVersionVisible = false;\n this.$refs.htTable.load();\n },\n handleCloseFormPrint: function handleCloseFormPrint() {\n this.formPrintVisible = false;\n },\n formAuth: function formAuth(formKey) {\n var param = {\n flowKey: '',\n formKey: formKey,\n nodeId: '',\n parentflowKey: '',\n type: '1'\n };\n this.$refs.flowFormAuth.showDialog(param);\n },\n handleNodeClick: function handleNodeClick(node) {\n if (node.typeKey == 'FORM_TYPE') {\n this.typeIdQuery = null;\n } else {\n this.bpmForm.typeName = node.name;\n this.bpmForm.typeId = node.id;\n this.typeIdQuery = {\n property: 'typeId',\n value: node.id,\n group: 'typeId',\n operation: 'EQUAL',\n relation: 'AND'\n };\n }\n\n this.$refs.htTable.load();\n },\n check: function check(data, checkObj) {\n if (checkObj.checkedKeys.length == 0) {\n this.typeIdQuery = null;\n } else {\n this.typeIdQuery = {\n property: 'typeId',\n value: checkObj.checkedKeys.join(','),\n group: 'typeId',\n operation: 'IN',\n relation: 'AND'\n };\n }\n\n this.$refs.htTable.load();\n },\n loadData: function loadData(param, cb) {\n var _this2 = this;\n\n var _param = {};\n _param = _objectSpread(_objectSpread({}, _param), param);\n\n if (this.typeIdQuery) {\n _param.querys.push(this.typeIdQuery);\n }\n\n form.getPageJson(_param).then(function (response) {\n _this2.data = response.rows;\n _this2.pageResult = {\n page: response.page,\n pageSize: response.pageSize,\n total: response.total\n };\n }).finally(function () {\n return cb();\n });\n },\n handleCommand: function handleCommand(params) {\n var _this3 = this;\n\n this.formRow = params.row;\n\n switch (params.command) {\n case 'edit':\n this.bpmForm.bos = [];\n this.formId = params.row.id;\n this.formDefId = params.row.defId;\n this.formEditorDialogVisible = true;\n break;\n\n case 'preview':\n if (this.currentUser && this.currentUser.account) {\n var routeUrl = this.$router.resolve({\n path: '/previewForm/' + params.row.id\n });\n window.open(routeUrl.href, '_blank'); // window.open(\n // window.context.manage +\n // '/previewForm/' +\n // params.row.id +\n // '?token=' +\n // this.currentUser.token,\n // // Base64.encode(this.currentUser.account),\n // '_blank'\n // )\n }\n\n break;\n\n case 'publish':\n this.$confirm('是否确定发布表单?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this3.$http.post('${form}/form/form/v1/publish', {}, {\n formId: params.row.id\n }).then(function (response) {\n if (response.data.state) {\n _this3.$message({\n type: 'success',\n message: response.data.message\n });\n\n _this3.$refs.htTable.load();\n } else {\n _this3.$message.$error(response.data.message);\n }\n });\n }).catch(function () {});\n break;\n\n case 'formRight':\n this.formAuth(params.row.formKey);\n break;\n\n case 'mobileForm':\n this.$confirm('是否确定生成手机表单?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this3.createMobileForm(params.row);\n }).catch(function () {});\n break;\n\n case 'copy':\n this.saveCopy();\n break;\n\n case 'relation':\n this.bindRelation(params);\n break;\n\n case 'printForm':\n this.formKey = params.row.formKey;\n this.formPrintVisible = true;\n break;\n\n case 'manage':\n this.formId = params.row.id;\n this.addToMenu('manage');\n break;\n\n case 'front':\n this.formId = params.row.id;\n this.addToMenu('front');\n break;\n\n default:\n break;\n }\n },\n bindRelation: function bindRelation(params) {\n var _this4 = this;\n\n this.dialogVisible2 = true;\n form.getBindRelation(params.row.defId, params.row.formKey).then(function (resp) {\n _this4.bindData = resp.data;\n });\n },\n saveCopy: function saveCopy() {\n this.newForm.id = this.formRow.id;\n this.dialogSaveCopyVisible = true;\n },\n handleCloseSaveCopy: function handleCloseSaveCopy() {\n this.newForm = {\n id: '',\n name: '',\n formKey: '',\n typeId: '',\n typeName: ''\n };\n this.dialogSaveCopyVisible = false;\n },\n afterSaveData: function afterSaveData() {\n this.handleCloseSaveCopy();\n this.$refs.htTable.load();\n },\n handleClose: function handleClose() {\n this.dialogVisible = false;\n this.dialogVisible2 = false;\n this.bindData = [];\n },\n openAddDailog: function openAddDailog() {\n this.$refs.eipBoDialog.showDialog([], 'pc'); // this.dialogVisible = true;\n\n this.$set(this.bpmForm, 'formKey', '');\n this.$set(this.bpmForm, 'bos', '');\n this.$set(this.bpmForm, 'desc', '');\n this.$set(this.bpmForm, 'formName', '');\n this.$set(this.bpmForm, 'name', '');\n\n if (this.bpmForm.typeName) {\n this.$set(this.bpmForm, 'typeId', this.bpmForm.typeId);\n this.$set(this.bpmForm, 'typeName', this.bpmForm.typeName);\n } else {\n this.$set(this.bpmForm, 'typeName', '');\n this.$set(this.bpmForm, 'typeId', '');\n }\n\n this.$set(this.bpmForm, 'id', '');\n this.$set(this.bpmForm, 'defId', '');\n this.$set(this.bpmForm, 'rev', 1);\n },\n handleCloseFormEditor: function handleCloseFormEditor() {\n this.formEditorDialogVisible = false;\n this.$refs.htTable.load();\n },\n toFormDesigner: function toFormDesigner() {\n var _this5 = this;\n\n utils.validateForm(this, 'editBpmForm').then(function () {\n _this5.bpmForm.formType = 'pc';\n _this5.bpmForm.name = _this5.bpmForm.formName;\n _this5.formId = '';\n _this5.formDefId = '';\n _this5.formEditorDialogVisible = true;\n\n _this5.handleClose();\n }).catch(function (reason) {\n var rules = reason.map(function (obj) {\n return obj.rule;\n }); //获取到报错后的规则数组\n\n if (rules.includes('required')) {\n _this5.$message.error('请完整填写表单内容');\n } else if (rules.includes('alpha_num')) {\n _this5.$message.error('信息未正确填写');\n } else if (rules.includes('isExist')) {\n _this5.$message.error('表单别名重复');\n }\n });\n },\n createMobileForm: function createMobileForm(row) {\n var _this6 = this;\n\n this.$http.post('${form}/form/form/v1/pcForm2MobileForm?formId=' + row.id).then(function (response) {\n if (response.data.state) {\n _this6.$message({\n type: 'success',\n message: response.data.message\n });\n\n _this6.$refs.htTable.load();\n } else {\n _this6.$message.$error(response.data.message);\n }\n });\n },\n //删除表单\n handleDeleteForm: function () {\n var _handleDeleteForm = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var _this7 = this;\n\n var selection, formKeies, i, templateMap, _i, template, key, formName, _i2;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n selection = this.$refs.htTable.$refs.htTable.selection;\n\n if (!(!selection || selection.length == 0)) {\n _context.next = 4;\n break;\n }\n\n this.$message.error('请至少选择一条数据');\n return _context.abrupt(\"return\");\n\n case 4:\n formKeies = [];\n\n for (i = 0; i < selection.length; i++) {\n if (selection[i]) {\n formKeies.push(selection[i].formKey);\n }\n }\n\n templateMap = {};\n _i = 0;\n\n case 8:\n if (!(_i < formKeies.length)) {\n _context.next = 16;\n break;\n }\n\n _context.next = 11;\n return this.getBpmDataTemplate(formKeies[_i]);\n\n case 11:\n template = _context.sent;\n templateMap[formKeies[_i]] = template;\n\n case 13:\n _i++;\n _context.next = 8;\n break;\n\n case 16:\n _context.t0 = regeneratorRuntime.keys(templateMap);\n\n case 17:\n if ((_context.t1 = _context.t0()).done) {\n _context.next = 33;\n break;\n }\n\n key = _context.t1.value;\n\n if (!templateMap[key]) {\n _context.next = 31;\n break;\n }\n\n if (!this.deleteDialogVisible) {\n this.deleteDialogVisible = true;\n }\n\n formName = key;\n _i2 = 0;\n\n case 23:\n if (!(_i2 < selection.length)) {\n _context.next = 30;\n break;\n }\n\n if (!(selection[_i2].formKey === key)) {\n _context.next = 27;\n break;\n }\n\n formName = selection[_i2].name;\n return _context.abrupt(\"break\", 30);\n\n case 27:\n _i2++;\n _context.next = 23;\n break;\n\n case 30:\n this.deleteConfirmList.push({\n formKey: formName,\n templateList: templateMap[key]\n });\n\n case 31:\n _context.next = 17;\n break;\n\n case 33:\n //没有绑定流程节点的表单\n if (!this.deleteDialogVisible) {\n this.$confirm('确定要删除吗?
如已绑定表单列表,将同步删除', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning',\n dangerouslyUseHTMLString: true\n }).then(function () {\n _this7.deleteFormConfirm();\n });\n }\n\n case 34:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function handleDeleteForm() {\n return _handleDeleteForm.apply(this, arguments);\n }\n\n return handleDeleteForm;\n }(),\n getBpmDataTemplate: function () {\n var _getBpmDataTemplate = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(formKey) {\n var _this8 = this;\n\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n return _context2.abrupt(\"return\", new Promise(function (resolve, reject) {\n _this8.$http.get(\"\".concat(window.context.form, \"/form/dataTemplate/v1/getExistsByFormKey?formKey=\").concat(formKey)).then(function (resp) {\n resolve(resp.data);\n });\n }));\n\n case 1:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n function getBpmDataTemplate(_x) {\n return _getBpmDataTemplate.apply(this, arguments);\n }\n\n return getBpmDataTemplate;\n }(),\n deleteCancel: function deleteCancel() {\n this.deleteConfirmList.splice(0);\n this.deleteDialogVisible = false;\n this.updateTableData.splice(0);\n },\n deleteFormConfirm: function deleteFormConfirm() {\n var me_ = this;\n this.$refs.deleteBtn.$on('after-delete', function () {\n me_.deleteDialogVisible = false;\n me_.deleteConfirmList.splice(0);\n me_.$refs.htTable.$refs.htTable.selection.splice(0);\n me_.updateTableData.splice(0);\n });\n this.$refs.deleteBtn.handleDelete();\n }\n }\n};",null]}