{"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\\leaderTodo.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\src\\components\\flow\\leaderTodo.vue","mtime":1675214577089},{"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":315532800000},{"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/es6.string.starts-with\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.search\";\nimport _defineProperty from \"D:/jenkins/workspace/xypm-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : 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//\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 TaskToCopyTo from \"@/components/flow/task/taskToCopyTo.vue\";\nexport default {\n  name: \"todo\",\n  components: {\n    FlowTree: FlowTree,\n    TaskToCopyTo: TaskToCopyTo\n  },\n  props: {\n    defKey: {\n      type: String,\n      default: \"\"\n    }\n  },\n  data: function data() {\n    return {\n      asideShow: false,\n      isAsideShow: false,\n      tableData: \"\",\n      date: \"\",\n      currentTree: \"\",\n      fullscreenLoading: true,\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    };\n  },\n  computed: _objectSpread(_objectSpread({}, mapState('storeProcess', ['rows', 'pagination', 'total'])), {}, {\n    currentSwitchValue: function currentSwitchValue() {\n      return localStorage.leaderTodoAsideShow === 'true' || localStorage.leaderTodoAsideShow === true;\n    }\n  }),\n  methods: {\n    //将当前展开或者收起的值存在localStorage中\n    handleSwitch: function handleSwitch(val) {\n      localStorage.leaderTodoAsideShow = val;\n    },\n    //流程传阅\n    taskToCopyTo: function taskToCopyTo() {\n      if (this.ids == \"\") {\n        Message.warning(\"请选择要传阅的流程\");\n        return;\n      }\n\n      this.$refs.taskToCopyTo.handleClose(); //父组件调用子组件方法\n    },\n    //批量勾选待办流程获取\n    handleSelectionChange: function handleSelectionChange(val) {\n      this.ids = \"\";\n\n      if (val.length > 0) {\n        for (var i = 0; i < val.length; i++) {\n          this.ids = this.ids + val[i].id + \",\";\n        }\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\n      if (keyCode == 13) {\n        this.search(\"find\");\n      }\n    },\n    // 查询\n    search: function search(str) {\n      var _this = this;\n\n      if (str == \"find\") {\n        this.$store.dispatch(\"storeProcess/setPaginationPageNum\", 1);\n      }\n\n      var querys = []; //查询条件\n\n      var queryFilter = {};\n      var pageBean = {\n        pageBean: this.pagination\n      };\n      var beginDate = \"\"; //开始时间\n\n      var endDate = \"\"; //结束时间\n\n      var group = \"main\"; //判断条件\n\n      if (this.tableData) {\n        querys = [{\n          property: \"subject_\",\n          value: this.tableData,\n          group: \"main\",\n          operation: \"LIKE\",\n          relation: \"OR\"\n        }, {\n          property: \"proc_inst_id_\",\n          value: this.tableData,\n          group: \"main\",\n          operation: \"LIKE\",\n          relation: \"OR\"\n        }, {\n          property: \"proc_def_name_\",\n          value: this.tableData,\n          group: \"main\",\n          operation: \"LIKE\",\n          relation: \"OR\"\n        }, {\n          property: \"name_\",\n          value: this.tableData,\n          group: \"main\",\n          operation: \"LIKE\",\n          relation: \"OR\"\n        }];\n        var temp = querys[0];\n\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\n      if (this.urgentStateVal) {\n        querys.push({\n          property: \"urgentStateValue\",\n          value: this.urgentStateVal,\n          group: \"main\",\n          operation: \"IN\",\n          relation: \"OR\"\n        });\n      }\n\n      if (this.currentTree) {\n        querys.push({\n          property: \"type_id_\",\n          value: this.currentTree,\n          group: \"typeId\",\n          operation: \"IN\",\n          relation: \"AND\"\n        });\n      }\n\n      if (this.defKey) {\n        querys.push({\n          property: \"tmp.proc_def_key_\",\n          value: this.defKey,\n          operation: \"EQUAL\",\n          relation: \"AND\"\n        });\n      }\n\n      if (this.date) {\n        beginDate = utils.formatDate(this.date[0].getTime());\n        endDate = utils.formatDate(this.date[1].getTime());\n        querys.push({\n          property: \"tmp.create_time_\",\n          value: [beginDate, endDate],\n          group: \"time\",\n          operation: \"BETWEEN\",\n          relation: \"AND\"\n        });\n      }\n\n      queryFilter = {\n        pageBean: this.pagination,\n        querys: querys\n      };\n      this.openFullScreen();\n      this.$store.dispatch(\"storeProcess/getLeaderTodoByPagination\", queryFilter).then(function (data) {\n        if (!data.state) {\n          if (data.message === 'BaseException: 无秘书审批权限！') {\n            _this.$router.push(\"/v-flow/v-todo\");\n\n            window.location.reload();\n          }\n        }\n\n        _this.fullscreenLoading = false;\n      });\n    },\n    //重置\n    reset: function reset() {\n      this.tableData = \"\";\n      this.date = \"\";\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          this.handleOpenUrl(\"/task/\" + row.id + \"/\" + row.identityList[0].id, 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\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 {\n        this.handleOpenUrl(\"/task/\" + row.id + \"/0\", newWin);\n      }\n    },\n    handleOpenUrl: function handleOpenUrl(url, newWin) {\n      if (!newWin) {\n        this.$router.push(url);\n        return;\n      }\n\n      if (!url) {\n        return;\n      }\n\n      var token = this.$store.state.login.currentUser.token;\n\n      if (!url.toLowerCase().startsWith(\"http\")) {\n        url = window.context.front + url;\n      }\n\n      if (url.indexOf('?') == -1) {\n        url = url + \"?token=\" + token;\n      } else {\n        url = url + \"&token=\" + token;\n      }\n\n      window.open(url, \"_blank\");\n    },\n    //子组件传值父组件(待办分类查询)\n    getCurrent: function getCurrent(data) {\n      var _this2 = this;\n\n      if (data.id == 6) {\n        this.openFullScreen();\n        var pageBean = {\n          pageBean: this.pagination\n        };\n        this.$store.dispatch(\"storeProcess/getLeaderTodoByPagination\", pageBean).then(function () {\n          _this2.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\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.getLeaderTodoCount();\n    }\n  },\n  created: function created() {\n    var _this3 = this;\n\n    this.asideShow = this.currentSwitchValue;\n    this.isAsideShow = this.currentSwitchValue;\n    var this_ = this;\n    this.$http.get(\"${portal}/sys/sysProperties/v1/getByAlias?alias=taskListFiledConf\").then(function (resp) {\n      var tempConf = {};\n\n      if (resp.data) {\n        tempConf = resp.data;\n      } else {\n        tempConf = this_.defaultFiledShowConfList;\n      }\n\n      this_.formatConfListToObj(tempConf);\n    });\n    var querys = [];\n\n    if (this.defKey) {\n      querys.push({\n        property: \"tmp.proc_def_key_\",\n        value: this.defKey,\n        operation: \"EQUAL\",\n        relation: \"AND\"\n      });\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\n    this.$store.dispatch(\"storeProcess/getLeaderTodoByPagination\", pageBean).then(function () {\n      //页面加载调用tudo.js里面的分页方法\n      _this3.fullscreenLoading = false;\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};",null]}