{"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\\MobileFormManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\form\\MobileFormManager.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/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\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//\nimport { mapState } from 'vuex';\nimport form from '@/api/form.js';\nimport req from '@/request.js';\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 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    eipSysTypeDialog: eipSysTypeDialog,\n    eipBoDialog: eipBoDialog\n  },\n  data: function data() {\n    return {\n      formTypeSelectorCatName: '',\n      fullscreenLoading: false,\n      importDialogVisible: false,\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      formEditorDialogVisible: false,\n      dialogSaveCopyVisible: false,\n      formId: null,\n      formDefId: null,\n      bpmForm: {\n        formKey: '',\n        bos: '',\n        desc: '',\n        formType: 'mobile'\n      },\n      typeIdQuery: null,\n      formVersionVisible: false,\n      formKey: null,\n      updateTableData: [],\n      formRow: {},\n      newForm: {\n        id: '',\n        name: '',\n        formKey: '',\n        typeId: '',\n        typeName: ''\n      }\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  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#mobileFormManager');\n    }\n  },\n  methods: {\n    handleImportSuccess: function handleImportSuccess() {\n      this.$message.success('表单导入成功');\n      this.importDialogVisible = false;\n      this.$refs.htTable.load();\n      this.$refs.upload.clearFiles();\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    onExceed: function onExceed(file) {\n      this.$message.warning('只能选择一个zip文件!');\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();\n      } else {\n        if (response.message) {\n          if (response.message.indexOf('是否继续为其新增版本') > 0) {\n            this.$confirm('<div style=\"overflow-x:hidden;overflow-y:auto ;max-height:' + height + '\">' + response.message + '</div>', '提示', {\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();\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    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    //表格选中数据\n    tableSelect: function tableSelect(selection) {\n      this.updateTableData = selection;\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    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 = 'mobile'; //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    //设置分类\n    openTypeSetDialog: function openTypeSetDialog() {\n      this.updateTableData = this.$refs.htTable.$refs.htTable.selection;\n\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          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    handleCloseFormVersion: function handleCloseFormVersion() {\n      this.formVersionVisible = 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.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    rowClick: function rowClick(row, column, event) {\n      this.$refs.htTable.$refs.htTable.toggleRowSelection(row);\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.mobile +\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        default:\n          break;\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      this.$refs.htTable.load();\n    },\n    afterSaveData: function afterSaveData() {\n      this.handleCloseSaveCopy();\n    },\n    handleClose: function handleClose() {\n      this.dialogVisible = false;\n    },\n    openAddDailog: function openAddDailog() {\n      this.$refs.eipBoDialog.showDialog([], 'mobile'); // 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, 'typeName', this.bpmForm.typeName);\n      } else {\n        this.$set(this.bpmForm, 'typeName', '');\n      }\n\n      this.$set(this.bpmForm, 'typeId', '');\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 _this4 = this;\n\n      this.$validator.validateAll('addBpmForm').then(function (result) {\n        if (result) {\n          _this4.bpmForm.formType = 'mobile';\n          _this4.bpmForm.name = _this4.bpmForm.formName;\n          _this4.formId = '';\n          _this4.formDefId = '';\n          _this4.formEditorDialogVisible = true;\n\n          _this4.handleClose();\n        } else {\n          _this4.$message.error('表单未正确填写');\n        }\n      });\n    }\n  }\n};",null]}