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