{"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\\DefManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\flow\\DefManager.vue","mtime":1675071992788},{"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.regexp.to-string\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.string.ends-with\";\nimport \"core-js/modules/es6.function.name\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 flow from '@/api/flow.js';\nimport BpmEditor from '@/views/flow/BpmEditor.vue';\nimport req from '@/request.js';\nimport utils from \"@/hotent-ui-util.js\";\n\nvar htAsideTree = function htAsideTree() {\n  return import('@/components/common/HtAsideTree.vue');\n};\n\nvar FlowConfig = function FlowConfig() {\n  return import('@/components/flow/FlowConfig.vue');\n};\n\nvar SubFlowConfig = function SubFlowConfig() {\n  return import('@/components/flow/FlowConfig.vue');\n};\n\nvar FlowOtherSetting = function FlowOtherSetting() {\n  return import('@/components/flow/FlowOtherSetting.vue');\n};\n\nvar FlowVarList = function FlowVarList() {\n  return import('@/components/flow/FlowVarList.vue');\n};\n\nvar FlowVersionList = function FlowVersionList() {\n  return import('@/components/flow/FlowVersionList.vue');\n};\n\nvar eipSysTypeSelector = function eipSysTypeSelector() {\n  return import('@/components/selector/EipSysTypeSelector.vue');\n};\n\nvar FlowEditBoSetting = function FlowEditBoSetting() {\n  return import('@/components/flow/FlowEditBoSetting.vue');\n};\n\nvar eipSysTypeDialog = function eipSysTypeDialog() {\n  return import('@/components/dialog/EipSysTypeDialog.vue');\n};\n\nvar processSimulation = function processSimulation() {\n  return import('@/views/flow/simulation/ProcessSimulation.vue');\n};\n\nvar EipSysTypeSelector = function EipSysTypeSelector() {\n  return import(\"@/components/selector/EipSysTypeSelector.vue\");\n};\n\nvar defAuthorizePageDialog = function defAuthorizePageDialog() {\n  return import(\"@/components/dialog/DefAuthorizePageDialog.vue\");\n};\n\nexport default {\n  components: {\n    BpmEditor: BpmEditor,\n    htAsideTree: htAsideTree,\n    FlowConfig: FlowConfig,\n    FlowOtherSetting: FlowOtherSetting,\n    SubFlowConfig: SubFlowConfig,\n    FlowVarList: FlowVarList,\n    FlowVersionList: FlowVersionList,\n    FlowEditBoSetting: FlowEditBoSetting,\n    eipSysTypeSelector: eipSysTypeSelector,\n    eipSysTypeDialog: eipSysTypeDialog,\n    processSimulation: processSimulation,\n    EipSysTypeSelector: EipSysTypeSelector,\n    defAuthorizePageDialog: defAuthorizePageDialog\n  },\n  data: function data() {\n    return {\n      data: [],\n      pageResult: {\n        page: 1,\n        pageSize: 50,\n        total: 0\n      },\n      dialogVisible: false,\n      defEditTabComponent: [{\n        alias: 'defConfig',\n        name: '流程设计'\n      }, {\n        alias: 'defVarList',\n        name: '变量管理'\n      }],\n      statusArray: [{\n        text: '已发布',\n        value: 'deploy',\n        type: 'info'\n      }, {\n        text: '未发布',\n        value: 'draft'\n      }, {\n        text: '禁用',\n        value: 'forbidden',\n        type: 'danger'\n      }, {\n        text: '禁止实例',\n        value: 'forbidden_instance',\n        type: 'warning'\n      }],\n      activeName: 'defConfig',\n      curSelectDefId: '',\n      // 配置页面是否需要刷新缓存\n      flowConfigShouldRefresh: false,\n      topDefKey: '',\n      subDefId: '',\n      isShowSubFlowSet: false,\n      isCurDefPublish: false,\n      selectTypeIds: '',\n      fullscreenLoading: false,\n      importDialogVisible: false,\n      flowTypeSelectorCatId: '',\n      flowTypeSelectorCatName: '',\n      startDef: '',\n      defNameAndVrsionTitle: '',\n      dialogVisible2: false,\n      bindData: {},\n      dialogSaveCopyVisible: false,\n      newFlow: {},\n      flowRow: {},\n      deleteList: [],\n      deleteDialogVisible: false,\n      deleteReason: '111',\n      defConfComponetKey: ''\n    };\n  },\n  computed: mapState({\n    isForbidden: function isForbidden() {\n      return [{\n        text: '正常',\n        value: '0',\n        type: 'success'\n      }, {\n        text: '挂起',\n        value: '1',\n        type: 'danger'\n      }];\n    },\n    deleteUrl: function deleteUrl() {\n      return window.context.bpmModel + '/flow/def/v1/removeByDefIds?cascade=true';\n    },\n    uploadHeaders: function uploadHeaders(mapState) {\n      return {\n        Authorization: 'Bearer ' + mapState.login.currentUser.token\n      };\n    },\n    imporCheckUrl: function imporCheckUrl() {\n      return window.context.bpmModel + '/flow/def/v1/importCheck?typeId=' + this.flowTypeSelectorCatId;\n    },\n    account: function account(state) {\n      return state.login.currentUser.account;\n    },\n    token: function token(state) {\n      return state.login.currentUser.token;\n    },\n    frontUrl: function frontUrl() {\n      return '/agentStart/' + this.startDef + '/0?token=' + this.token + '&showMenu=true';\n    }\n  }),\n  mounted: function mounted() {\n    //数据建模-》查看绑定关系\n    if (this.$route.query.bpmId) {\n      this.isCurDefPublish = true;\n      this.curSelectDefId = this.$route.query.bpmId;\n      this.activeName = 'defConfig';\n      this.dialogVisible = true;\n      this.$router.push('flowDesign#defManager');\n      this.handleDefSignSuccess();\n    }\n  },\n  methods: {\n    rowClick: function rowClick(row) {\n      this.$refs.htTable.$refs.htTable.toggleRowSelection(row);\n    },\n    handleDefSignSuccess: function handleDefSignSuccess() {\n      this.flowConfigShouldRefresh = true;\n\n      if (!this.curSelectDefId) {\n        return;\n      }\n\n      var this_ = this;\n      req.get('${bpmModel}/flow/def/v1/defGet?defId=' + this.curSelectDefId).then(function (resp) {\n        var data = resp.data;\n\n        if (data) {\n          this_.defNameAndVrsionTitle = data.name + '(版本' + data.version + ')';\n        }\n      });\n    },\n    handleDefDeploySuccess: function handleDefDeploySuccess(id) {\n      this.curSelectDefId = id;\n      this.isCurDefPublish = true;\n      this.defConfComponetKey = new Date().getTime();\n      this.activeName = 'defConfig';\n      this.handleDefSignSuccess();\n    },\n    //跳转指定选项卡\n    toggleTab: function toggleTab(name) {\n      this.activeName = name;\n      this.flowConfigShouldRefresh = true;\n    },\n    //启动流程\n    startFlow: function startFlow(id) {\n      this.startDef = id;\n      var routeUrl = window.context.front + '/agentStart/' + this.startDef + '/0?token=' + this.token + '&showMenu=true';\n      window.open(routeUrl, '_blank');\n    },\n    handleUploadResult: function handleUploadResult(response) {\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 && 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            req.post(window.context.bpmModel + '/flow/def/v1/importSave?cacheFileId=' + response.value + '&confirmImport=' + true + '&typeId=' + _this.flowTypeSelectorCatId).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 () {\n            req.post(window.context.bpmModel + '/flow/def/v1/importSave?cacheFileId=' + response.value + '&confirmImport=' + false);\n            this_.importDialogVisible = false;\n\n            _this.$refs.upload.clearFiles();\n          });\n        } else {\n          this.$message.error(response.message || '流程导入失败');\n        }\n      }\n    },\n    handleImportSuccess: function handleImportSuccess() {\n      this.$message.success('流程导入成功');\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() {\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.flowTypeSelectorCatId) {\n        this.$message.warning('请选择要导入的分类!');\n        return false;\n      }\n\n      this.$refs.upload.submit();\n    },\n    watchBPMNXML: function watchBPMNXML() {\n      var url = window.context.bpmModel + '/flow/def/v1/bpmnXml?defId=' + this.curSelectDefId;\n      var tenantId = '-1';\n\n      try {\n        if (this.$store.state.login.currentUser.userAttrs.tenantId) {\n          tenantId = this.$store.state.login.currentUser.userAttrs.tenantId;\n        }\n      } catch (error) {}\n\n      if (tenantId != '-1') {\n        url = url + '&tenantId=' + tenantId;\n      }\n\n      window.open(url, '_blank');\n    },\n    beforePanelLeave: function beforePanelLeave() {\n      if (!this.isCurDefPublish) {\n        this.$message.warning('流程还未发布,无法进行配置');\n        return false;\n      }\n    },\n    handlePaneClick: function handlePaneClick(data) {\n      if (data.alias) {\n        this.currentTabComponent = data.alias;\n      } //流程设计\n\n\n      if (data.name == 'defConfig') {\n        this.flowConfigShouldRefresh = false;\n      }\n    },\n    handlePaneRemove: function handlePaneRemove() {\n      this.activeName = 'defConfig';\n      this.flowConfigShouldRefresh = true;\n      this.isShowSubFlowSet = false;\n    },\n    handleNodeClick: function handleNodeClick(node) {\n      if (node.id == '6') {\n        this.selectTypeIds = '';\n      } else {\n        this.selectTypeIds = node.id;\n      }\n\n      this.$refs.htTable.quickSearch();\n    },\n    check: function check(data, checkObj) {\n      this.selectTypeIds = checkObj.checkedKeys.join(',');\n      this.$refs.htTable.load();\n    },\n    handleClose: function handleClose() {\n      this.dialogVisible = false;\n      this.dialogVisible2 = false;\n      this.$refs.htTable.load(true);\n    },\n    handleCloseMenuPerm: function handleCloseMenuPerm() {\n      this.dialogVisibleMenuPerm = false;\n    },\n    dialogCancel: function dialogCancel(dialogVisible) {\n      this[dialogVisible] = false;\n    },\n    loadData: function loadData(param, cb) {\n      var _this2 = this;\n\n      param.querys = param.querys || [];\n\n      if (this.selectTypeIds) {\n        var hasTypeQuery = false;\n\n        var _iterator = _createForOfIteratorHelper(param.querys),\n            _step;\n\n        try {\n          for (_iterator.s(); !(_step = _iterator.n()).done;) {\n            var query = _step.value;\n\n            if (query.property == 'typeId') {\n              query.value = this.selectTypeIds;\n              hasTypeQuery = true;\n              break;\n            }\n          }\n        } catch (err) {\n          _iterator.e(err);\n        } finally {\n          _iterator.f();\n        }\n\n        if (!hasTypeQuery) {\n          param.querys.push({\n            group: 'main',\n            operation: 'IN',\n            property: 'typeId',\n            relation: 'AND',\n            value: this.selectTypeIds\n          });\n        }\n      } else {\n        param.querys = param.querys.filter(function (q) {\n          return q.property != 'typeId';\n        });\n      }\n\n      flow.getDefPage(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      switch (params.command) {\n        case 'edit':\n          //编辑\n          this.curSelectDefId = params.row.defId;\n          this.defNameAndVrsionTitle = params.row.name + '(版本' + params.row.version + ')';\n\n          if (params.row.status == 'draft') {\n            this.isCurDefPublish = false;\n            this.activeName = 'defDesign';\n          } else {\n            this.isCurDefPublish = true;\n            this.activeName = 'defConfig';\n          }\n\n          this.dialogVisible = true;\n          break;\n\n        case 'add':\n          //新增\n          this.curSelectDefId = '';\n          this.activeName = 'defDesign';\n          this.dialogVisible = true;\n          this.isCurDefPublish = false;\n          this.defNameAndVrsionTitle = '';\n          break;\n\n        case 'restore':\n          //恢复\n          break;\n\n        case 'isForbidden':\n          //挂起/取消挂起\n          this.forbiddenOrUnForbiddenInst(params);\n          break;\n\n        case 'cleanData':\n          this.cleanData(params.row.id);\n          break;\n\n        case 'startFlow':\n          this.startFlow(params.row.id);\n          break;\n\n        case 'bindRelation':\n          this.bindRelation(params.row.defId);\n          break;\n\n        case 'delete':\n          if (params.row.status == 'draft') {\n            this.deleteFlow(params.row.defId);\n          } else {\n            this.batchDelete(params.row);\n          }\n\n          break;\n\n        case 'processSimulation':\n          this.$refs.processSimulation.showProcessSimulation(params.row.defKey);\n          break;\n\n        case 'copy':\n          this.copy(params.row);\n          break;\n\n        case 'auth':\n          this.auth(params.row);\n          break;\n\n        default:\n          break;\n      }\n    },\n    auth: function auth(row) {\n      this.$refs.defAuthorizePageDialog.showDialog(row);\n    },\n    copy: function copy(flow) {\n      this.flowRow = _objectSpread({}, flow);\n      this.newFlow = {\n        defId: this.flowRow.id,\n        defKey: \"\",\n        name: \"\",\n        typeId: \"\"\n      };\n      this.dialogSaveCopyVisible = true;\n    },\n    handleCloseSaveCopy: function handleCloseSaveCopy() {\n      this.dialogSaveCopyVisible = false;\n    },\n    saveCopy: function saveCopy() {\n      var _this3 = this;\n\n      flow.copy(this.newFlow).then(function (resp) {\n        if (resp.data.state) {\n          _this3.dialogSaveCopyVisible = false;\n\n          _this3.$message.success(resp.data.message);\n\n          _this3.$refs.htTable.load();\n        }\n      });\n    },\n    bindRelation: function bindRelation(defId) {\n      var _this4 = this;\n\n      this.dialogVisible2 = true;\n      flow.getBindRelation(defId).then(function (resp) {\n        _this4.bindData = resp.data;\n      });\n    },\n    cleanData: function cleanData(defId) {\n      var this_ = this;\n      this.$confirm('此操作会清除该流程所有的实例任务等数据，是否确认清除？', '提示', {\n        cancelButtonText: '取消',\n        confirmButtonText: '确定',\n        type: 'warning',\n        closeOnClickModal: false\n      }).then(function () {\n        req.post(window.context.bpmModel + '/flow/def/v1/cleanData?defId=' + defId).then(function (response) {\n          var data = response.data;\n\n          if (data.state) {\n            this_.$message.success(data.message);\n          } else {\n            this_.$message.fail(data.message);\n          }\n        });\n      });\n    },\n    deleteFlow: function deleteFlow(defId) {\n      var this_ = this;\n      this.$confirm('删除后不可恢复，是否确定删除?', '提示', {\n        cancelButtonText: '取消',\n        confirmButtonText: '确定',\n        type: 'warning',\n        closeOnClickModal: false\n      }).then(function () {\n        req.remove(this_.deleteUrl + '&ids=' + defId).then(function (response) {\n          if (response.data && response.data.state) {\n            this_.$message.success('删除成功');\n            this_.$refs.htTable.load();\n          }\n        });\n      });\n    },\n    handExport: function handExport() {\n      var elTable = this.$refs.htTable;\n\n      if (this.$refs.htTable.$refs && this.$refs.htTable.$refs.htTable) {\n        elTable = this.$refs.htTable.$refs.htTable;\n      }\n\n      if (elTable && elTable.selection && elTable.selection.length == 0) {\n        this.$message.warning('请选择至少一项记录');\n        return;\n      }\n\n      if (elTable && elTable.selection && elTable.selection.length > 10) {\n        this.$message.warning('因流程和表单相关数据较大，单次最多导出10条');\n        return;\n      }\n\n      var ids = [];\n\n      var _iterator2 = _createForOfIteratorHelper(elTable.selection),\n          _step2;\n\n      try {\n        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n          var item = _step2.value;\n          ids.push(item['id']);\n        }\n      } catch (err) {\n        _iterator2.e(err);\n      } finally {\n        _iterator2.f();\n      }\n\n      if (ids.length == 0) {\n        this.$message.warning('请选择至少一项记录');\n        return;\n      }\n\n      var url = \"\".concat(window.context.bpmModel, \"/flow/def/v1/exportXml?bpmDefId=\").concat(ids);\n      req.download(url);\n    },\n    batchDelete: function batchDelete(def) {\n      var selectDefs = [];\n\n      if (!def) {\n        var elTable = this.$refs.htTable;\n\n        if (this.$refs.htTable.$refs && this.$refs.htTable.$refs.htTable) {\n          elTable = this.$refs.htTable.$refs.htTable;\n        }\n\n        if (elTable && elTable.selection && elTable.selection.length == 0) {\n          this.$message.warning('请选择至少一项记录');\n          return;\n        }\n\n        var _iterator3 = _createForOfIteratorHelper(elTable.selection),\n            _step3;\n\n        try {\n          for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n            var item = _step3.value;\n            selectDefs.push(item);\n          }\n        } catch (err) {\n          _iterator3.e(err);\n        } finally {\n          _iterator3.f();\n        }\n      } else {\n        selectDefs.push(def);\n      }\n\n      if (selectDefs.length == 0) {\n        this.$message.warning('请选择至少一项记录');\n        return;\n      }\n\n      var defKeys = [];\n\n      for (var _i = 0, _selectDefs = selectDefs; _i < _selectDefs.length; _i++) {\n        var _item = _selectDefs[_i];\n        defKeys.push(_item['defKey']);\n      }\n\n      var me_ = this;\n      this.$http.get('${bpmRunTime}/runtime/instance/v1/getInstanceCountByDefKeys?defKeys=' + defKeys.join(',')).then(function (resp) {\n        if (resp.data) {\n          var countMap = {};\n          resp.data.forEach(function (d) {\n            countMap[d['PROC_DEF_KEY_']] = d;\n          });\n          var list = [];\n          selectDefs.forEach(function (s) {\n            s = JSON.parse(JSON.stringify(s));\n\n            if (countMap[s.defKey]) {\n              s.totalCount = countMap[s.defKey].totalCount;\n              s.runningCount = countMap[s.defKey].runningCount;\n            } else {\n              s.totalCount = 0;\n              s.runningCount = 0;\n            }\n\n            list.push(s);\n          });\n          me_.deleteList = list;\n          me_.deleteDialogVisible = true;\n          me_.deleteReason = '';\n          return;\n        }\n\n        me_.$message.error(resp.data.message);\n      });\n    },\n    batchDeleteConfirm: function batchDeleteConfirm() {\n      if (!this.deleteReason) {//this.$message.warning('请输入删除原因');\n        //return\n      }\n\n      if (!this.deleteList || this.deleteList.length == 0) {\n        this.$message.warning('删除的流程不能为空');\n        return;\n      }\n\n      var ids = [];\n      this.deleteList.forEach(function (e) {\n        ids.push(e.defId);\n      });\n      var this_ = this;\n      req.remove(this_.deleteUrl + '&ids=' + ids.join(',')).then(function (response) {\n        if (response.data && response.data.state) {\n          this_.$message.success('删除成功');\n          this_.deleteDialogVisible = false;\n          this_.$refs.htTable.load();\n        }\n      });\n    },\n    //设置分类\n    openTypeSetDialog: function openTypeSetDialog() {\n      var elTable = this.$refs.htTable;\n\n      if (this.$refs.htTable.$refs && this.$refs.htTable.$refs.htTable) {\n        elTable = this.$refs.htTable.$refs.htTable;\n      }\n\n      if (elTable && elTable.selection && elTable.selection.length == 0) {\n        this.$message.warning('请选择至少一项记录');\n        return;\n      }\n\n      this.$refs.typeSetDialog.showDialog({});\n    },\n    sysTypeDialogOnConfirm: function sysTypeDialogOnConfirm(data) {\n      var elTable = this.$refs.htTable;\n\n      if (this.$refs.htTable.$refs && this.$refs.htTable.$refs.htTable) {\n        elTable = this.$refs.htTable.$refs.htTable;\n      }\n\n      if (elTable && elTable.selection && elTable.selection.length == 0) {\n        this.$message.warning('请选择至少一项记录');\n        return;\n      }\n\n      var id = [];\n\n      var _iterator4 = _createForOfIteratorHelper(elTable.selection),\n          _step4;\n\n      try {\n        for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n          var item = _step4.value;\n          id.push(item['id']);\n        }\n      } catch (err) {\n        _iterator4.e(err);\n      } finally {\n        _iterator4.f();\n      }\n\n      var this_ = this;\n      this.$http.post('${bpmModel}/flow/def/v1/defSetCategory', {\n        typeName: data.name,\n        typeId: data.id,\n        defIds: id.join(',')\n      }).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_.$refs.htTable.load();\n          }, 3000);\n          return;\n        }\n\n        this_.$message.error(resp.data.message);\n      });\n    }\n  },\n  created: function created() {\n    var this_ = this;\n    this.$root.$on('set-sub-flow', function (data) {\n      this_.activeName = '';\n      this_.showSubFlowSet = false;\n      req.get(window.context.bpmModel + '/flow/def/v1/subFlowDetail?defId=' + data.defId + '&nodeId=' + data.nodeId).then(function (response) {\n        var data = response.data;\n        this_.topDefKey = data.topDefKey;\n        this_.subDefId = data.defId;\n        this_.activeName = 'subFlowSet';\n        this_.isShowSubFlowSet = true;\n      });\n    });\n  }\n};",null]}