{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web\\src\\components\\flow\\todo.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\src\\components\\flow\\todo.vue","mtime":1675214577214},{"path":"D:\\jenkins\\workspace\\xypm-web\\babel.config.js","mtime":1675214572901},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\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.array.includes\";\nimport \"core-js/modules/es6.string.includes\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/xypm-web/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport \"core-js/modules/es6.string.starts-with\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.array.find-index\";\nimport _defineProperty from \"D:/jenkins/workspace/xypm-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.regexp.search\";\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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, mapActions } from \"vuex\";\nimport process from \"@/api/process\";\nimport FlowTree from \"@/components/flow/flowTree.vue\";\nimport utils from \"@/utils.js\";\nimport { Message } from \"element-ui\";\nimport TaskImage from \"@/components/flow/task/taskImage.vue\";\nimport TaskToCopyTo from \"@/components/flow/task/taskToCopyTo.vue\";\nimport eipOrgSelector from \"@/components/eipControl/selector/EipOrgSelector.vue\";\nimport req from \"@/request.js\";\nvar STATUS = {\n  NORMAL: \"待办\",\n  TRANSFORMED: \"流转\",\n  TRANSFORMEDINQU: \"征询\",\n  DELIVERTO: \"转办\",\n  FOLLOW: \"跟踪\",\n  COMMU: \"沟通\",\n  BACK: \"驳回\",\n  ADDSIGN: \"会签加签\",\n  AGENT: \"委托\",\n  SHARE: \"共享\",\n  BACKSHARE: \"驳回共享\",\n  APPROVELINEED: \"并行审批\",\n  SIGNSEQUENCEED: \"顺序签署\",\n  SIGNLINEED: \"并行签署\",\n  USERADDSIGN: \"用户加签\"\n};\nexport default {\n  name: \"todo\",\n  components: {\n    FlowTree: FlowTree,\n    TaskToCopyTo: TaskToCopyTo,\n    eipOrgSelector: eipOrgSelector,\n    TaskImage: TaskImage\n  },\n  props: {\n    defKey: {\n      type: String,\n      default: \"\"\n    },\n    orgName: {\n      type: String,\n      default: \"\"\n    },\n    orgId: {\n      type: String,\n      default: \"\"\n    }\n  },\n  data: function data() {\n    return {\n      isAsideShow: false,\n      batchHandleIds: [],\n      asideShow: false,\n      form: {\n        tableData: \"\",\n        date: \"\",\n        orgName: \"\",\n        orgId: \"\"\n      },\n      status: STATUS,\n      currentTree: \"\",\n      fullscreenLoading: true,\n      sorter: [],\n      urgentStateConf: {},\n      urgentStateConfList: [],\n      urgentStateVal: \"\",\n      ids: \"\",\n      //待办任务id集合\n      defaultFiledShowConf: \"\",\n      defaultFiledShowConfList: [{\n        name: \"subject\",\n        desc: \"标题\",\n        frontShow: true\n      }, {\n        name: \"procInstId\",\n        desc: \"流程编号\",\n        frontShow: true\n      }, {\n        name: \"procDefName\",\n        desc: \"流程名称\",\n        frontShow: true\n      }, {\n        name: \"name\",\n        desc: \"任务名称\",\n        frontShow: true\n      }, {\n        name: \"status\",\n        desc: \"类型\",\n        frontShow: true\n      }, {\n        name: \"createTime\",\n        desc: \"创建时间\",\n        frontShow: true\n      }, {\n        name: \"creator\",\n        desc: \"创建人\",\n        frontShow: true\n      }, {\n        name: \"urgentStateValue\",\n        desc: \"紧急状态\",\n        frontShow: true\n      }, {\n        name: \"dueExpDate\",\n        desc: \"到期时间\",\n        frontShow: false\n      }, {\n        name: \"ownerName\",\n        desc: \"所属人\",\n        frontShow: false\n      }, {\n        name: \"assigneeName\",\n        desc: \"待审批人\",\n        frontShow: false\n      }, {\n        name: \"prop1\",\n        desc: \"扩展1\",\n        frontShow: false\n      }, {\n        name: \"prop2\",\n        desc: \"扩展2\",\n        frontShow: false\n      }, {\n        name: \"prop3\",\n        desc: \"扩展3\",\n        frontShow: false\n      }, {\n        name: \"prop4\",\n        desc: \"扩展4\",\n        frontShow: false\n      }, {\n        name: \"prop5\",\n        desc: \"扩展5\",\n        frontShow: false\n      }, {\n        name: \"prop6\",\n        desc: \"扩展6\",\n        frontShow: false\n      }],\n      selectInstanceId: \"\",\n      selectBpmnInstId: \"\",\n      selectDefId: \"\",\n      batchDialogVisible: false,\n      batchHandleSetting: {},\n      batchResultDialog: false,\n      batchCompleteList: [],\n      batchFailedList: [],\n      batchUnBatchableList: [],\n      batchNotAuthList: [],\n      failedMsgMap: {},\n      batchSubmitBtnLoad: false,\n      skipMsg: \"\",\n      unBatchMsg: \"\"\n    };\n  },\n  watch: {\n    \"form.orgId\": {\n      handler: function handler(newName, oldName) {\n        this.search(\"find\");\n      },\n      immediate: true\n    }\n  },\n  computed: _objectSpread(_objectSpread({}, mapState('storeProcess', ['rows', 'pagination', 'total'])), {}, {\n    currentSwitchValue: function currentSwitchValue() {\n      return localStorage.todoAsideShow === 'true' || localStorage.todoAsideShow === true;\n    }\n  }),\n  created: function created() {\n    this.getTaskList();\n    this.asideShow = this.currentSwitchValue;\n    this.isAsideShow = this.currentSwitchValue;\n  },\n  methods: {\n    //将当前展开或者收起的值存在localStorage中\n    handleSwitch: function handleSwitch(val) {\n      localStorage.todoAsideShow = val;\n    },\n    getTaskList: function getTaskList() {\n      var _this = this;\n      this.$http.get(\"${portal}/sys/sysProperties/v1/getDecryptByAlias?alias=taskListFiledConf\").then(function (resp) {\n        var tempConf = {};\n        if (resp.data) {\n          tempConf = JSON.parse(resp.data.value);\n        } else {\n          tempConf = _this.defaultFiledShowConfList;\n        }\n        _this.formatConfListToObj(tempConf);\n      });\n      var querys = [];\n      if (this.defKey) {\n        querys.push({\n          property: \"bt.proc_def_key_\",\n          value: this.defKey,\n          operation: \"EQUAL\",\n          relation: \"AND\"\n        });\n      }\n      //判断是否有URL传参\n      if (this.orgName && this.orgId) {\n        this.form.orgName = this.orgName;\n        this.form.orgId = this.orgId;\n        querys.push({\n          group: \"orgId\",\n          property: \"inst.CREATE_ORG_PATH_\",\n          value: this.orgId,\n          operation: \"LIKE\",\n          relation: \"AND\"\n        });\n      }\n      var pageBean = {\n        pageBean: {\n          page: \"1\",\n          pageSize: \"10\",\n          showTotal: \"true\"\n        },\n        querys: querys\n      }; //初次加载默认pageBean\n      // this.$store\n      //   .dispatch(\"storeProcess/getUrgentStateConf\", { getConf: true })\n      //   .then(data => {\n      this.$store.dispatch(\"storeProcess/getTodoByPagination\", pageBean).then(function () {\n        //页面加载调用tudo.js里面的分页方法\n        _this.fullscreenLoading = false;\n      });\n      // if (data.conf) {\n      //   try {\n      //     data.conf = JSON.parse(data.conf);\n      //   } catch (error) {\n      //     data.conf = eval(\"(\" + data.conf + \")\");\n      //   }\n      //   this.urgentStateConfList = data.conf;\n      //   let conf = {};\n      //   for (let index = 0, c; (c = data.conf[index++]); ) {\n      //     if (c.default) {\n      //       this.urgentStateConf.defaultValue = c.state;\n      //     }\n      //     conf[c.state] = c;\n      //   }\n      //   this.urgentStateConf.conf = conf;\n      // }\n      // });\n    },\n    rowClick: function rowClick(row, column, event) {\n      //操作列不触发多选按钮\n      if (column && column.label == \"流程图\") {\n        return;\n      }\n      this.$refs.htTable.toggleRowSelection(row);\n    },\n    //流程传阅\n    taskToCopyTo: function taskToCopyTo() {\n      if (this.ids == \"\") {\n        Message.warning(\"请选择要传阅的流程\");\n        return;\n      }\n      this.$refs.taskToCopyTo.handleClose(); //父组件调用子组件方法\n    },\n    //批量勾选待办流程获取\n    handleSelectionChange: function handleSelectionChange(val) {\n      this.ids = \"\";\n      if (val.length > 0) {\n        for (var i = 0; i < val.length; i++) {\n          this.ids = this.ids + val[i].id + \",\";\n        }\n        this.ids = this.ids.substring(0, this.ids.length - 1);\n      }\n    },\n    //Loading 加载中\n    openFullScreen: function openFullScreen() {\n      this.fullscreenLoading = true;\n    },\n    handleSizeChange: function handleSizeChange(size) {\n      //每页下拉显示数据\n      this.$store.dispatch(\"storeProcess/setPaginationSize\", size);\n      this.search();\n    },\n    handleCurrentChange: function handleCurrentChange(currentPage) {\n      //点击第几页\n      this.$store.dispatch(\"storeProcess/setPaginationPageNum\", currentPage);\n      this.search();\n    },\n    //回车查询\n    searchEnterFun: function searchEnterFun(e) {\n      var keyCode = window.event ? e.keyCode : e.which;\n      if (keyCode == 13) {\n        this.search(\"find\");\n      }\n    },\n    // 处理排序\n    handleSortChange: function handleSortChange(m) {\n      this.sorter.splice(this.sorter.findIndex(function (s) {\n        return s.property == m.prop;\n      }), 1);\n      if (m.order) {\n        this.sorter.push({\n          property: m.prop,\n          direction: m.order == \"ascending\" ? \"ASC\" : \"DESC\"\n        });\n      }\n      this.search();\n    },\n    // 查询\n    search: function search(str) {\n      var _this2 = this;\n      if (str == \"find\") {\n        this.$store.dispatch(\"storeProcess/setPaginationPageNum\", 1);\n      }\n      var querys = []; //查询条件\n      var queryFilter = {};\n      var pageBean = {\n        pageBean: this.pagination\n      };\n      var beginDate = \"\"; //开始时间\n      var endDate = \"\"; //结束时间\n      var group = \"main\"; //判断条件\n      if (this.form.tableData) {\n        querys = [{\n          property: \"bt.subject_\",\n          value: this.form.tableData,\n          group: \"main\",\n          operation: \"LIKE\",\n          relation: \"OR\"\n        }, {\n          property: \"bt.proc_inst_id_\",\n          value: this.form.tableData,\n          group: \"main\",\n          operation: \"LIKE\",\n          relation: \"OR\"\n        }, {\n          property: \"bt.proc_def_name_\",\n          value: this.form.tableData,\n          group: \"main\",\n          operation: \"LIKE\",\n          relation: \"OR\"\n        }, {\n          property: \"bt.name_\",\n          value: this.form.tableData,\n          group: \"main\",\n          operation: \"LIKE\",\n          relation: \"OR\"\n        }];\n        var temp = querys[0];\n        for (var index = 1; index < 7; index++) {\n          var query = JSON.parse(JSON.stringify(temp));\n          query.property = \"prop\" + index;\n          querys.push(query);\n        }\n      }\n      if (this.form.orgId) {\n        querys.push({\n          property: \"inst.CREATE_ORG_PATH_\",\n          value: this.form.orgId,\n          group: \"orgId\",\n          operation: \"LIKE\",\n          relation: \"AND\"\n        });\n      }\n      if (this.currentTree) {\n        querys.push({\n          property: \"bt.type_id_\",\n          value: this.currentTree,\n          group: \"typeId\",\n          operation: \"IN\",\n          relation: \"AND\"\n        });\n      }\n      if (this.defKey) {\n        querys.push({\n          property: \"bt.proc_def_key_\",\n          value: this.defKey,\n          operation: \"EQUAL\",\n          relation: \"AND\"\n        });\n      }\n      if (this.form.date) {\n        beginDate = utils.formatDate(this.form.date[0].getTime());\n        endDate = utils.formatDate(this.form.date[1].getTime());\n        querys.push({\n          property: \"bt.create_time_\",\n          value: [beginDate, endDate],\n          group: \"time\",\n          operation: \"BETWEEN\",\n          relation: \"AND\"\n        });\n      }\n      queryFilter = {\n        pageBean: this.pagination,\n        querys: querys,\n        sorter: this.sorter\n      };\n      this.openFullScreen();\n      this.$store.dispatch(\"storeProcess/getTodoByPagination\", queryFilter).then(function () {\n        _this2.fullscreenLoading = false;\n      });\n    },\n    //重置\n    reset: function reset() {\n      this.form = {\n        tableData: \"\",\n        date: \"\",\n        orgName: \"\",\n        orgId: \"\"\n      };\n      this.search(\"find\");\n    },\n    handleRowClick: function handleRowClick(row, newWin) {\n      if (row.status == \"SHARE\" || row.status == \"BACKSHARE\") {\n        if (row.identityList && row.identityList.length == 1) {\n          var url = \"/task/\" + row.id + \"/\" + row.identityList[0].id;\n          this.handleOpenUrl(url, newWin);\n        } else {\n          var html = \"<select ref=\" + Math.random() + ' id=\"approvalLeaderSelect\" style=\"width: 200px;height: 30px;border-radius: 4px;margin: 20px 70px;\" ><option value=\"\">请选择</option>';\n          row.identityList.forEach(function (identity) {\n            html += '<option value=\"' + identity.id + '\">' + identity.name + \"</option>\";\n          });\n          html += \"</select>\";\n          var this_ = this;\n          this.$alert(html, \"请选择一个领导代为审批\", {\n            dangerouslyUseHTMLString: true,\n            beforeClose: function beforeClose(action, instance, done) {\n              if (action == \"confirm\") {\n                var se = document.getElementById(\"approvalLeaderSelect\");\n                if (se.selectedIndex == 0) {\n                  this.$message.warning(\"请选择代为审批的领导\");\n                } else {\n                  instance.close();\n                  this_.handleOpenUrl(\"/task/\" + row.id + \"/\" + se[se.selectedIndex].value, newWin);\n                }\n              } else {\n                instance.close();\n              }\n            }\n          });\n        }\n      } else if (row.status == \"AGENT\" && row.ownerId != row.assigneeId && row.ownerId == this.$store.state.login.currentUser.userId) {\n        //委托任务\n        this.handleOpenUrl(\"/instRead/\" + row.procInstId + \"/agent\", newWin);\n      } else if (row.status == \"FOLLOW\") {\n        //跟踪任务\n        this.handleOpenUrl(\"/taskRead/\" + row.id + \"/FOLLOW\", newWin);\n      } else {\n        var _url = \"/task/\" + row.id + \"/0\";\n        if (this.defKey) {\n          _url = \"/sysModuleInst/\" + row.id + \"/0\" + \"/\" + this.defKey + \"/true\";\n        }\n        this.handleOpenUrl(_url, newWin);\n      }\n    },\n    handleOpenUrl: function handleOpenUrl(url, newWin) {\n      if (!newWin) {\n        this.$router.push(url);\n        return;\n      }\n      if (!url) {\n        return;\n      }\n      var token = this.$store.state.login.currentUser.token;\n      if (!url.toLowerCase().startsWith(\"http\")) {\n        url = window.context.front + url;\n      }\n      if (url.indexOf('?') == -1) {\n        url = url + \"?token=\" + token;\n      } else {\n        url = url + \"&token=\" + token;\n      }\n      window.open(url, \"_blank\");\n    },\n    //子组件传值父组件(待办分类查询)\n    getCurrent: function getCurrent(data) {\n      var _this3 = this;\n      if (data.id == 6) {\n        this.currentTree = \"\";\n        this.openFullScreen();\n        var pageBean = {\n          pageBean: this.pagination\n        };\n        this.$store.dispatch(\"storeProcess/getTodoByPagination\", pageBean).then(function () {\n          _this3.fullscreenLoading = false;\n        });\n      } else {\n        var ids = [];\n        this.getFlowTrees(data, ids);\n        this.currentTree = ids.join(\",\");\n        this.search(\"find\");\n      }\n    },\n    getFlowTrees: function getFlowTrees(data, ids) {\n      ids.push(data.id);\n      var arr = data.children;\n      for (var i = 0; i < arr.length; i++) {\n        this.getFlowTrees(arr[i], ids);\n      }\n    },\n    formatConfListToObj: function formatConfListToObj(tempList) {\n      var editConfObj = {};\n      tempList.forEach(function (c) {\n        var key = c.name;\n        editConfObj[key] = c;\n      });\n      this.$set(this, \"defaultFiledShowConf\", editConfObj);\n    },\n    loadCount: function loadCount() {\n      return process.getCountByUserId(this.pagination);\n    },\n    computeTime: function computeTime(deadline) {\n      if (deadline) {\n        var time = new Date(deadline).getTime();\n        var nowTime = new Date().getTime();\n        var duration = time - nowTime;\n        if (duration > 0) return deadline;else {\n          var hour = Math.floor(Math.abs(duration / 3600000));\n          var minute = Math.ceil(Math.abs(duration % 3600000 / 60000));\n          return \"已到期\" + hour + \"时\" + minute + \"分\";\n        }\n      }\n      return \"\";\n    },\n    computeColor: function computeColor(deadline) {\n      if (deadline) {\n        var time = new Date(deadline).getTime();\n        var nowTime = new Date().getTime();\n        var day = (time - nowTime) / 86400000;\n        if (day > 0)\n          //绿色\n          return {\n            color: \"#22870D\"\n          };else {\n          if (Math.ceil(Math.abs(day)) >= 3)\n            //红色\n            return {\n              color: \"#F1300A\"\n            };\n            //黄色\n          else return {\n            color: \"#E1A306\"\n          };\n        }\n      }\n      return {};\n    },\n    handleShowTaskImage: function () {\n      var _handleShowTaskImage = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(row) {\n        return regeneratorRuntime.wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              _context.next = 2;\n              return this.changeSeletion(row);\n            case 2:\n              this.$refs.taskImage.handleOpen();\n            case 3:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee, this);\n      }));\n      function handleShowTaskImage(_x) {\n        return _handleShowTaskImage.apply(this, arguments);\n      }\n      return handleShowTaskImage;\n    }(),\n    changeSeletion: function changeSeletion(row) {\n      this.selectInstanceId = row.procInstId;\n      this.selectBpmnInstId = row.bpmnInstId;\n    },\n    batchHandle: function batchHandle() {\n      var _this4 = this;\n      var selectTasks = this.$refs.htTable.selection;\n      if (!selectTasks || selectTasks.length == 0) {\n        this.$message({\n          type: \"warning\",\n          message: \"请至少选择一条任务\"\n        });\n        return;\n      }\n      //忽略掉非待办类型的任务\n      var ids = [];\n      this.skipMsg = \"\";\n      for (var i = selectTasks.length - 1; i >= 0; i--) {\n        if (selectTasks[i].status == \"NORMAL\") {\n          ids.push(selectTasks[i].id);\n        } else {\n          this.skipMsg += selectTasks[i].subject + \"</br>\";\n          selectTasks.splice(i, 1);\n        }\n      }\n      if (ids.length > 0) {\n        req.get(\"${bpmRunTime}/runtime/task/v1/filterUnBatchable?taskIds=\" + ids.join(\",\")).then(function (resp) {\n          if (resp.data.state && resp.data.value) {\n            if (resp.data.value.length != ids.length) {\n              ids = resp.data.value;\n              var unBatchMsg = \"以下任务未配置批量处理<br/>\";\n              for (var _i = selectTasks.length - 1; _i >= 0; _i--) {\n                if (!resp.data.value.includes(selectTasks[_i].id)) {\n                  unBatchMsg += selectTasks[_i].subject + \"<br/>\";\n                  selectTasks.splice(_i, 1);\n                }\n              }\n              //this.$message({type:\"warning\",dangerouslyUseHTMLString:true,message:unBatchMsg});\n              _this4.unBatchMsg = unBatchMsg;\n            }\n            if (ids && ids.length > 0) {\n              _this4.batchHandleIds = ids;\n              _this4.batchDialogVisible = true;\n            } else {\n              _this4.showMsg();\n            }\n          }\n        });\n      } else {\n        if (this.skipMsg) {\n          this.showMsg();\n        }\n      }\n      this.batchHandleCheck();\n    },\n    batchHandleCheck: function batchHandleCheck() {},\n    batchHandleSubmit: function batchHandleSubmit() {\n      var _this5 = this;\n      var errMsg = \"\";\n      this.batchSubmitBtnLoad = true;\n      if (!this.batchHandleSetting.opinion || !this.batchHandleSetting.action) {\n        errMsg = \"完善表单信息\";\n      }\n      if (this.batchHandleSetting.action == \"reject\" && (!this.batchHandleSetting.backHandMode || !this.batchHandleSetting.rejectType)) {\n        errMsg = \"请完善驳回设置\";\n      }\n      if (errMsg) {\n        this.$message({\n          type: \"warning\",\n          message: errMsg\n        });\n        this.batchSubmitBtnLoad = false;\n        return;\n      }\n      var action;\n      if (this.batchHandleSetting.action == \"agree\") {\n        action = \"agree\";\n      } else {\n        action = this.batchHandleSetting.rejectType || this.batchHandleSetting.action;\n      }\n      this.$http.post(window.context.bpmRunTime + \"/runtime/task/v1/batchHandle\", {\n        taskIds: this.batchHandleIds.join(\",\"),\n        action: action,\n        opinion: this.batchHandleSetting.opinion\n      }).then(function (resp) {\n        if (resp.data && resp.data.state) {\n          _this5.batchDialogVisible = false;\n          _this5.batchSubmitBtnLoad = false;\n          _this5.showBatchResult(resp.data.value);\n        }\n      });\n    },\n    showBatchResult: function showBatchResult(taskMaps) {\n      this.batchCompleteList = taskMaps[\"complete\"];\n      this.batchFailedList = taskMaps[\"failedList\"];\n      this.batchUnBatchableList = taskMaps[\"unHandleList\"];\n      this.batchNotAuthList = taskMaps[\"notAuth\"];\n      this.failedMsgMap = taskMaps[\"failedMsg\"];\n      this.batchResultDialog = true;\n    },\n    afterBatchClose: function afterBatchClose() {\n      this.batchDialogVisible = false;\n      this.batchHandleSetting = {};\n    },\n    afterResultClose: function afterResultClose() {\n      this.batchCompleteList = [];\n      this.batchFailedList = [];\n      this.batchUnBatchableList = [];\n      this.batchNotAuthList = [];\n      this.failedMsgMap = [];\n      this.batchResultDialog = false;\n      this.search(\"find\");\n    },\n    open: function open(row) {\n      var token = this.$store.state.login.currentUser.token;\n      if (row.status == \"SHARE\" || row.status == \"BACKSHARE\") {\n        if (row.identityList && row.identityList.length == 1) {\n          var url = \"/task/\" + row.id + \"/\" + row.identityList[0].id + \"?token=\" + token;\n          //this.$router.push(url);\n          window.open(window.context.front + url, \"_blank\");\n        } else {\n          var html = \"<select ref=\" + Math.random() + ' id=\"approvalLeaderSelect\" style=\"width: 200px;height: 30px;border-radius: 4px;margin: 20px 70px;\" ><option value=\"\">请选择</option>';\n          row.identityList.forEach(function (identity) {\n            html += '<option value=\"' + identity.id + '\">' + identity.name + \"</option>\";\n          });\n          html += \"</select>\";\n          var this_ = this;\n          this.$alert(html, \"请选择一个领导代为审批\", {\n            dangerouslyUseHTMLString: true,\n            beforeClose: function beforeClose(action, instance, done) {\n              if (action == \"confirm\") {\n                var se = document.getElementById(\"approvalLeaderSelect\");\n                if (se.selectedIndex == 0) {\n                  this.$message.warning(\"请选择代为审批的领导\");\n                } else {\n                  instance.close();\n                  /*this_.$router.push(\r\n                          \"/task/\" + row.id + \"/\" + se[se.selectedIndex].value\r\n                  );*/\n                  var _url2 = window.context.front + \"/task/\" + row.id + \"/\" + se[se.selectedIndex].value + \"?token=\" + token;\n                  window.open(_url2, \"_blank\");\n                }\n              } else {\n                instance.close();\n              }\n            }\n          });\n        }\n      } else if (row.status == \"AGENT\" && row.ownerId != row.assigneeId && row.ownerId == this.$store.state.login.currentUser.userId) {\n        //委托任务\n        //this.$router.push(\"/instRead/\" + row.procInstId + \"/agent\");\n        window.open(window.context.front + \"/instRead/\" + row.procInstId + \"/agent\" + \"?token=\" + token, \"_blank\");\n      } else if (row.status == \"FOLLOW\") {\n        //跟踪任务\n        //this.$router.push(\"/taskRead/\" + row.id + \"/FOLLOW\");\n        window.open(window.context.front + \"/taskRead/\" + row.id + \"/FOLLOW\" + \"?token=\" + token, \"_blank\");\n      } else {\n        var _url3 = \"/task/\" + row.id + \"/0\";\n        if (this.defKey) {\n          _url3 += \"/noSingle\" + \"?token=\" + token;\n        }\n        //this.$router.push(url);\n        window.open(window.context.front + _url3, \"_blank\");\n      }\n    },\n    doneView: function doneView(procId) {\n      var token = this.$store.state.login.currentUser.token;\n      var url = window.context.front + \"/inst/\" + procId + \"/doneList?token=\" + token;\n      window.open(url, \"_blank\");\n    },\n    afterOpen: function afterOpen() {\n      this.showMsg();\n    },\n    showMsg: function showMsg() {\n      var message = \"\";\n      if (this.skipMsg) {\n        message = \"以下任务不是待办任务，不支持批量处理:</br>\" + this.skipMsg + \"<br/>\";\n      }\n      if (this.unBatchMsg) {\n        message += this.unBatchMsg;\n      }\n      if (message) {\n        this.$message({\n          dangerouslyUseHTMLString: true,\n          message: message,\n          type: \"warning\"\n        });\n      }\n    }\n  }\n};",null]}