myTask.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  1. <template>
  2. <!-- <div class="app-container">-->
  3. <div>
  4. <el-card shadow="hover">
  5. <!-- 查询表单区域 -->
  6. <el-form :model="queryParams" ref="queryForm" inline>
  7. <el-form-item label="项目名称" prop="projectName">
  8. <el-input
  9. v-model.trim="queryParams.projectName"
  10. placeholder="请输入项目名称"
  11. clearable
  12. @keyup.enter.native="handleQuery"
  13. />
  14. </el-form-item>
  15. <el-form-item label="终止原因" prop="reason">
  16. <el-input
  17. v-model.trim="queryParams.reason"
  18. placeholder="请输入终止原因"
  19. clearable
  20. @keyup.enter.native="handleQuery"
  21. />
  22. </el-form-item>
  23. <!-- 可继续扩展其他查询表单项目,比如项目编号、负责人等 -->
  24. <el-form-item>
  25. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  26. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  27. <el-button type="warning" plain icon="el-icon-download" size="mini" @click="exportQuery">导出</el-button>
  28. </el-form-item>
  29. </el-form>
  30. <!-- Tab 切换区域 -->
  31. <el-tabs v-model="activeTab" type="card" @tab-click="handleTabClick">
  32. <el-tab-pane label="待办任务" name="list1">
  33. <!-- 列表一内容 -->
  34. <el-table
  35. ref="dataTable"
  36. @row-click="clickRow"
  37. class="tableWrapper"
  38. v-loading="loading"
  39. border
  40. :data="myTaskList"
  41. >
  42. <!-- <el-table-column type="selection" width="40" align="center" />-->
  43. <el-table-column
  44. type="index"
  45. label="序号"
  46. width="50"
  47. align="center"
  48. ></el-table-column>
  49. <el-table-column label="项目名称" align="center" prop="projectName" width="200">
  50. <template slot-scope="scope">
  51. <div
  52. :title="scope.row.projectName"
  53. class="public-text-blue public-cursor"
  54. @click.stop="handleInvestOppDetail(scope.row)"
  55. >
  56. {{ scope.row.projectName }}
  57. </div>
  58. </template>
  59. </el-table-column>
  60. <el-table-column label="所属行业" align="center" prop="industry"
  61. ><template slot-scope="scope">
  62. <dict-tag
  63. :options="dict.type.CUSTOMER_TRADE"
  64. :value="scope.row.industry"
  65. />
  66. </template>
  67. </el-table-column>
  68. <el-table-column label="项目阶段" align="center" prop="projectStage">
  69. <template slot-scope="scope">
  70. <dict-tag
  71. :options="dict.type.project_stage"
  72. :value="scope.row.projectStage"
  73. />
  74. </template>
  75. </el-table-column>
  76. <!-- <el-table-column
  77. label="项目状态"
  78. align="center"
  79. prop="projectState"
  80. width="120"
  81. >
  82. <template slot-scope="scope">
  83. <dict-tag
  84. :options="dict.type.project_state"
  85. :value="scope.row.projectState"
  86. />
  87. </template>
  88. </el-table-column>-->
  89. <el-table-column label="项目机会状态" align="center" prop="projectStatus">
  90. <template slot-scope="scope">
  91. <!-- 定义状态文本映射对象 -->
  92. <el-tag
  93. :type="{
  94. 0: 'success',
  95. 1: 'danger',
  96. 2: 'warning'
  97. }[scope.row.projectStatus] || 'info'"
  98. >
  99. {{ {
  100. 0: '正常',
  101. 1: '终止',
  102. 2: '观望'
  103. }[scope.row.projectStatus] || '未知状态' }}
  104. </el-tag>
  105. </template>
  106. </el-table-column>
  107. <el-table-column label="项目负责人" align="center" prop="investHead">
  108. <template slot-scope="scope">
  109. <div :title="scope.row.investHead">
  110. {{ scope.row.investHead }}
  111. </div>
  112. </template>
  113. </el-table-column>
  114. <el-table-column label="终止原因" align="center" prop="reason">
  115. <template slot-scope="scope">
  116. <div :title="scope.row.reason">
  117. {{ scope.row.reason }}
  118. </div>
  119. </template>
  120. </el-table-column>
  121. <!-- delFlag -->
  122. <el-table-column label="状态" align="center" prop="delFlag">
  123. <template slot-scope="scope">
  124. <div :title="scope.row.delFlag === '1' ? '终止' : '正常'">
  125. {{ scope.row.delFlag === "1" ? "终止" : "正常" }}
  126. </div>
  127. </template>
  128. </el-table-column>
  129. <el-table-column label="申请人" align="center" prop="startUserName">
  130. <template slot-scope="scope">
  131. <div :title="scope.row.startUserName">
  132. {{ scope.row.startUserName }}
  133. </div>
  134. </template>
  135. </el-table-column>
  136. <el-table-column label="申请日期" align="center" prop="createTime">
  137. <template slot-scope="scope">
  138. <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
  139. </template>
  140. </el-table-column>
  141. <el-table-column label="当前节点" align="center" prop="taskName">
  142. <template slot-scope="scope">
  143. <div :title="scope.row.taskName" class="public-text-blue public-cursor" @click="handleReadImage(scope.row)">
  144. {{ scope.row.taskName}}
  145. </div>
  146. </template>
  147. </el-table-column>
  148. <el-table-column label="当前处理人" align="center" prop="assigneeName">
  149. <template slot-scope="scope">
  150. <div :title="scope.row.assigneeName">
  151. {{ scope.row.assigneeName}}
  152. </div>
  153. </template>
  154. </el-table-column>
  155. <el-table-column label="流程状态" align="center" prop="status">
  156. <template slot-scope="scope">
  157. <div :title="scope.row.status">
  158. <span v-if="scope.row.status === 0">暂存</span>
  159. <span v-else-if="scope.row.status === 1">已提交</span>
  160. <span v-else-if="scope.row.status === 2">审批中</span>
  161. <span v-else-if="scope.row.status === 3">审批完成</span>
  162. <span v-else-if="scope.row.status === 4">关闭</span>
  163. </div>
  164. </template>
  165. </el-table-column>
  166. <el-table-column label="操作" align="center" width="90" class-name="small-padding fixed-width">
  167. <template slot-scope="scope">
  168. <el-button v-if="scope.row.taskDefKey=='modifyApply'" type="text" @click="handleEdit(scope.row)">处理</el-button>
  169. <template v-else>
  170. <!-- 1. 签收按钮:无签收人时显示 -->
  171. <el-button v-if="!scope.row.assignee" type="primary" @click="handleSign(scope.row)">签收</el-button>
  172. <!-- 2. 处理按钮:有签收人时显示 -->
  173. <el-button v-else type="text" @click="handleProcess(scope.row)">处理</el-button>
  174. <!-- 3. 撤回按钮:需补充逻辑(比如仅未签收可撤回,可结合 signPerson 判断) -->
  175. <!-- <el-button v-if="!scope.row.assignee" size="mini" type="text" icon="el-icon-refresh-right" @click="handleWithdraw(scope.row)">撤回</el-button>-->
  176. <!-- 4. 详情按钮:一直显示 -->
  177. </template>
  178. <el-button type="text" @click="handleDetail(scope.row)">详情</el-button>
  179. </template>
  180. </el-table-column>
  181. </el-table>
  182. <!-- 分页 -->
  183. <pagination
  184. v-show="myTaskTotal > 0"
  185. :total="myTaskTotal"
  186. :page.sync="queryParams.pageNum"
  187. :limit.sync="queryParams.pageSize"
  188. @pagination="getMyTaskList"
  189. />
  190. </el-tab-pane>
  191. <el-tab-pane label="已办任务" name="list2">
  192. <!-- 我的单据表格 -->
  193. <!-- 列表一内容 -->
  194. <el-table
  195. ref="dataTable"
  196. @row-click="clickRow"
  197. class="tableWrapper"
  198. v-loading="loading"
  199. border
  200. :data="myDoneTaskList"
  201. >
  202. <!-- <el-table-column type="selection" width="40" align="center" />-->
  203. <el-table-column
  204. type="index"
  205. label="序号"
  206. width="50"
  207. align="center"
  208. ></el-table-column>
  209. <!-- <el-table-column label="主键id" align="center" prop="id" /> -->
  210. <el-table-column label="项目名称" align="center" prop="projectName" width="200">
  211. <template slot-scope="scope">
  212. <div
  213. :title="scope.row.projectName"
  214. class="public-text-blue public-cursor"
  215. @click.stop="handleInvestOppDetail(scope.row)"
  216. >
  217. {{ scope.row.projectName }}
  218. </div>
  219. </template>
  220. </el-table-column>
  221. <el-table-column label="所属行业" align="center" prop="industry"
  222. ><template slot-scope="scope">
  223. <dict-tag
  224. :options="dict.type.CUSTOMER_TRADE"
  225. :value="scope.row.industry"
  226. />
  227. </template>
  228. </el-table-column>
  229. <el-table-column label="项目阶段" align="center" prop="projectStage">
  230. <template slot-scope="scope">
  231. <dict-tag
  232. :options="dict.type.project_stage"
  233. :value="scope.row.projectStage"
  234. />
  235. </template>
  236. </el-table-column>
  237. <!-- <el-table-column
  238. label="项目状态"
  239. align="center"
  240. prop="projectState"
  241. width="120"
  242. >
  243. <template slot-scope="scope">
  244. <dict-tag
  245. :options="dict.type.project_state"
  246. :value="scope.row.projectState"
  247. />
  248. </template>
  249. </el-table-column>-->
  250. <el-table-column label="项目机会状态" align="center" prop="projectStatus">
  251. <template slot-scope="scope">
  252. <!-- 定义状态文本映射对象 -->
  253. <el-tag
  254. :type="{
  255. 0: 'success',
  256. 1: 'danger',
  257. 2: 'warning'
  258. }[scope.row.projectStatus] || 'info'"
  259. >
  260. {{ {
  261. 0: '正常',
  262. 1: '终止',
  263. 2: '观望'
  264. }[scope.row.projectStatus] || '未知状态' }}
  265. </el-tag>
  266. </template>
  267. </el-table-column>
  268. <el-table-column label="项目负责人" align="center" prop="investHead">
  269. <template slot-scope="scope">
  270. <div :title="scope.row.investHead">
  271. {{ scope.row.investHead }}
  272. </div>
  273. </template>
  274. </el-table-column>
  275. <el-table-column label="终止原因" align="center" prop="reason">
  276. <template slot-scope="scope">
  277. <div :title="scope.row.reason">
  278. {{ scope.row.reason }}
  279. </div>
  280. </template>
  281. </el-table-column>
  282. <!-- delFlag -->
  283. <el-table-column label="状态" align="center" prop="delFlag">
  284. <template slot-scope="scope">
  285. <div :title="scope.row.delFlag === '1' ? '终止' : '正常'">
  286. {{ scope.row.delFlag === "1" ? "终止" : "正常" }}
  287. </div>
  288. </template>
  289. </el-table-column>
  290. <el-table-column label="申请人" align="center" prop="startUserName">
  291. <template slot-scope="scope">
  292. <div :title="scope.row.startUserName">
  293. {{ scope.row.startUserName }}
  294. </div>
  295. </template>
  296. </el-table-column>
  297. <el-table-column label="申请日期" align="center" prop="createTime">
  298. <template slot-scope="scope">
  299. <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
  300. </template>
  301. </el-table-column>
  302. <el-table-column label="当前节点" align="center" prop="taskName">
  303. <template slot-scope="scope">
  304. <div v-if="scope.row.deployId !== null && scope.row.deployId !== undefined && scope.row.deployId !== ''" :title="scope.row.taskName" class="public-text-blue public-cursor" @click="handleReadImage(scope.row)">
  305. {{ scope.row.taskName}}
  306. </div>
  307. <div v-else :title="scope.row.taskName">
  308. {{ scope.row.taskName}}
  309. </div>
  310. </template>
  311. </el-table-column>
  312. <el-table-column label="当前处理人" align="center" prop="assigneeName">
  313. <template slot-scope="scope">
  314. <div :title="scope.row.assigneeName">
  315. {{ scope.row.assigneeName}}
  316. </div>
  317. </template>
  318. </el-table-column>
  319. <el-table-column label="流程状态" align="center" prop="status">
  320. <template slot-scope="scope">
  321. <div :title="scope.row.status">
  322. <span v-if="scope.row.status === 0">暂存</span>
  323. <span v-else-if="scope.row.status === 1">已提交</span>
  324. <span v-else-if="scope.row.status === 2">审批中</span>
  325. <span v-else-if="scope.row.status === 3">审批完成</span>
  326. <span v-else-if="scope.row.status === 4">关闭</span>
  327. </div>
  328. </template>
  329. </el-table-column>
  330. <el-table-column label="操作" align="center" width="70" class-name="small-padding fixed-width">
  331. <template slot-scope="scope">
  332. <el-button type="text" size="small" @click="handleDetail(scope.row)">详情</el-button>
  333. </template>
  334. </el-table-column>
  335. </el-table>
  336. <!-- 分页 -->
  337. <pagination
  338. v-show="myDoneTaskTotal > 0"
  339. :total="myDoneTaskTotal"
  340. :page.sync="queryParams.pageNum"
  341. :limit.sync="queryParams.pageSize"
  342. @pagination="getMyDoneTaskList"
  343. />
  344. </el-tab-pane>
  345. <el-tab-pane label="我的单据" name="list3">
  346. <!-- 我的单据表格 -->
  347. <!-- 列表一内容 -->
  348. <el-table
  349. ref="dataTable"
  350. @row-click="clickRow"
  351. class="tableWrapper"
  352. v-loading="loading"
  353. border
  354. :data="myList"
  355. >
  356. <!-- <el-table-column type="selection" width="40" align="center" />-->
  357. <el-table-column
  358. type="index"
  359. label="序号"
  360. width="50"
  361. align="center"
  362. ></el-table-column>
  363. <!-- <el-table-column label="主键id" align="center" prop="id" /> -->
  364. <el-table-column label="项目名称" align="center" prop="projectName" width="200">
  365. <template slot-scope="scope">
  366. <div
  367. :title="scope.row.projectName"
  368. class="public-text-blue public-cursor"
  369. @click.stop="handleInvestOppDetail(scope.row)"
  370. >
  371. {{ scope.row.projectName }}
  372. </div>
  373. </template>
  374. </el-table-column>
  375. <el-table-column label="所属行业" align="center" prop="industry"
  376. ><template slot-scope="scope">
  377. <dict-tag
  378. :options="dict.type.CUSTOMER_TRADE"
  379. :value="scope.row.industry"
  380. />
  381. </template>
  382. </el-table-column>
  383. <el-table-column label="项目阶段" align="center" prop="projectStage">
  384. <template slot-scope="scope">
  385. <dict-tag
  386. :options="dict.type.project_stage"
  387. :value="scope.row.projectStage"
  388. />
  389. </template>
  390. </el-table-column>
  391. <!-- <el-table-column
  392. label="项目状态"
  393. align="center"
  394. prop="projectState"
  395. width="120"
  396. >
  397. <template slot-scope="scope">
  398. <dict-tag
  399. :options="dict.type.project_state"
  400. :value="scope.row.projectState"
  401. />
  402. </template>
  403. </el-table-column>-->
  404. <el-table-column label="项目机会状态" align="center" prop="projectStatus">
  405. <template slot-scope="scope">
  406. <!-- 定义状态文本映射对象 -->
  407. <el-tag
  408. :type="{
  409. 0: 'success',
  410. 1: 'danger',
  411. 2: 'warning'
  412. }[scope.row.projectStatus] || 'info'"
  413. >
  414. {{ {
  415. 0: '正常',
  416. 1: '终止',
  417. 2: '观望'
  418. }[scope.row.projectStatus] || '未知状态' }}
  419. </el-tag>
  420. </template>
  421. </el-table-column>
  422. <el-table-column label="项目负责人" align="center" prop="investHead">
  423. <template slot-scope="scope">
  424. <div :title="scope.row.investHead">
  425. {{ scope.row.investHead }}
  426. </div>
  427. </template>
  428. </el-table-column>
  429. <el-table-column label="终止原因" align="center" prop="reason">
  430. <template slot-scope="scope">
  431. <div :title="scope.row.reason">
  432. {{ scope.row.reason }}
  433. </div>
  434. </template>
  435. </el-table-column>
  436. <!-- delFlag -->
  437. <el-table-column label="状态" align="center" prop="delFlag">
  438. <template slot-scope="scope">
  439. <div :title="scope.row.delFlag === '1' ? '终止' : '正常'">
  440. {{ scope.row.delFlag === "1" ? "终止" : "正常" }}
  441. </div>
  442. </template>
  443. </el-table-column>
  444. <el-table-column label="申请人" align="center" prop="startUserName">
  445. <template slot-scope="scope">
  446. <div :title="scope.row.startUserName">
  447. {{ scope.row.startUserName }}
  448. </div>
  449. </template>
  450. </el-table-column>
  451. <el-table-column label="申请日期" align="center" prop="createTime">
  452. <template slot-scope="scope">
  453. <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
  454. </template>
  455. </el-table-column>
  456. <el-table-column label="当前节点" align="center" prop="taskName">
  457. <template slot-scope="scope">
  458. <div :title="scope.row.taskName" class="public-text-blue public-cursor" @click="handleReadImage(scope.row)">
  459. {{ scope.row.taskName}}
  460. </div>
  461. </template>
  462. </el-table-column>
  463. <el-table-column label="当前处理人" align="center" prop="assigneeName">
  464. <template slot-scope="scope">
  465. <div :title="scope.row.assigneeName">
  466. {{ scope.row.assigneeName}}
  467. </div>
  468. </template>
  469. </el-table-column>
  470. <el-table-column label="流程状态" align="center" prop="status">
  471. <template slot-scope="scope">
  472. <div :title="scope.row.status">
  473. <span v-if="scope.row.status === 0">暂存</span>
  474. <span v-else-if="scope.row.status === 1">已提交</span>
  475. <span v-else-if="scope.row.status === 2">审批中</span>
  476. <span v-else-if="scope.row.status === 3">审批完成</span>
  477. <span v-else-if="scope.row.status === 4">关闭</span>
  478. </div>
  479. </template>
  480. </el-table-column>
  481. <el-table-column label="操作" align="center" width="70" class-name="small-padding fixed-width">
  482. <template slot-scope="scope">
  483. <el-button type="text" size="small" @click="handleDetail(scope.row)">详情</el-button>
  484. </template>
  485. </el-table-column>
  486. </el-table>
  487. <!-- 分页 -->
  488. <pagination
  489. v-show="myTotal > 0"
  490. :total="myTotal"
  491. :page.sync="queryParams.pageNum"
  492. :limit.sync="queryParams.pageSize"
  493. @pagination="getMyList"
  494. />
  495. </el-tab-pane>
  496. </el-tabs>
  497. </el-card>
  498. <!-- Flowable 流程图弹窗 -->
  499. <!-- 流程图 -->
  500. <el-dialog :title="readImage.title" :visible.sync="readImage.open" width="70%" append-to-body>
  501. <!-- <el-image :src="readImage.src"></el-image> -->
  502. <flow :flowData="flowData"/>
  503. </el-dialog>
  504. </div>
  505. </template>
  506. <script>
  507. import { getMyTaskList,getMyDoneTaskList,getMyList } from "@/api/project/termination/pool";
  508. import { selectByFlowKey,flowXmlAndNode } from "@/api/flowable/definition";
  509. import { listChannel } from "@/api/invest/channel";
  510. import dueDiligenceList from "../../invest/components/dueDiligenceList.vue";
  511. import followList from "../../invest/components/followList.vue";
  512. import meetingList from "../../invest/components/meetingList.vue";
  513. import businessUpdate from "../../invest/components/businessUpdate.vue";
  514. import flow from '@/views/flowable/task/todo/detail/flow';
  515. import {
  516. getPool
  517. } from "@/api/invest/pool";
  518. import { mapGetters } from "vuex";
  519. import pool from "../../invest/pool/index.vue";
  520. export default {
  521. dicts: ["project_group", "project_stage", "project_state", "CUSTOMER_TRADE"],
  522. components: {
  523. dueDiligenceList,
  524. followList,
  525. meetingList,
  526. businessUpdate,
  527. flow
  528. },
  529. data() {
  530. return {
  531. // 当前激活的 Tab
  532. activeTab:"list1",
  533. // 遮罩层
  534. loading: false,
  535. // 查询参数
  536. queryParams: {
  537. id: null,
  538. pageNum: 1,
  539. pageSize: 10,
  540. projectName: null,
  541. projectGroup: "",
  542. projectCode: null,
  543. channel: null,
  544. contactDate: null,
  545. projectDate: null,
  546. decisionDate: null,
  547. industry: null,
  548. company: null,
  549. projectContacts: null,
  550. investHead: null,
  551. previousFinancing: null,
  552. financingStage: null,
  553. financingMoney: null,
  554. financingDate: null,
  555. investValuation: null,
  556. investMoney: null,
  557. investType: null,
  558. investPloy: null,
  559. investWorth: null,
  560. projectStage: null,
  561. projectState: null,
  562. orderByColumn: "createTime",
  563. isAsc: "desc",
  564. createTime: null,
  565. },
  566. // 数据列表(分开存储不同Tab的数据)
  567. myTaskList: [], // 待办任务数据
  568. // 待办任务总条数,用于分页
  569. myTaskTotal: 0,
  570. myDoneTaskList: [], // 已办任务数据
  571. // 已办任务总条数,用于分页
  572. myDoneTaskTotal: 0,
  573. myList: [], // 我的单据数据
  574. // 我的单据总条数,用于分页
  575. myTotal: 0,
  576. channelList: [], //渠道
  577. //流程图信息
  578. readImage:{
  579. open: false,
  580. src: "",
  581. },
  582. // xml
  583. flowData: {},
  584. };
  585. },
  586. computed: {
  587. ...mapGetters(["user"]),
  588. },
  589. created() {
  590. // 页面初始化时,加载当前激活Tab的数据
  591. this.initTabData();
  592. },
  593. mounted() {
  594. // 渠道
  595. listChannel({
  596. pageNum: 1,
  597. pageSize: 100,
  598. }).then((response) => {
  599. this.channelList = response.rows;
  600. });
  601. },
  602. methods: {
  603. // Tab切换事件处理
  604. handleTabClick(tab) {
  605. // tab为当前点击的Tab对象,tab.name即标识(list1/list2)
  606. this.activeTab = tab.name;
  607. // 根据Tab标识加载对应数据
  608. this.initTabData();
  609. },
  610. // 初始化当前Tab数据(支持传入Tab名,默认用activeTab)
  611. initTabData() {
  612. switch (this.activeTab) {
  613. case "list1":
  614. // 待办任务:调用待办查询方法
  615. this.getMyTaskList();
  616. break;
  617. case "list2":
  618. // 已办任务:调用已办查询方法
  619. this.getMyDoneTaskList();
  620. break;
  621. case "list3":
  622. // 我的单据:调用单据查询方法
  623. this.getMyList();
  624. break;
  625. default:
  626. break;
  627. }
  628. },
  629. // 1. 查询“我的待办任务”数据
  630. getMyTaskList() {
  631. this.loading = true;
  632. // 调用待办任务接口(示例)
  633. getMyTaskList(this.queryParams).then((response) => {
  634. this.myTaskList = response.rows; // 表格数据
  635. this.myTaskTotal = response.total; // 分页总条数
  636. this.loading = false;
  637. }).catch(() => {
  638. this.loading = false;
  639. });
  640. },
  641. // 2. 查询“我的已办任务”数据
  642. getMyDoneTaskList() {
  643. this.loading = true;
  644. // 调用待办任务接口(示例)
  645. getMyDoneTaskList(this.queryParams).then((response) => {
  646. this.myDoneTaskList = response.rows; // 表格数据
  647. this.myDoneTaskTotal = response.total; // 分页总条数
  648. this.loading = false;
  649. }).catch(() => {
  650. this.loading = false;
  651. });
  652. },
  653. // 3. 查询“我的单据”数据
  654. getMyList() {
  655. this.loading = true;
  656. // 调用我的单据接口(示例)
  657. getMyList(this.queryParams).then((response) => {
  658. this.myList = response.rows;
  659. this.myTotal = response.total;
  660. this.loading = false;
  661. }).catch(() => {
  662. this.loading = false;
  663. });
  664. },
  665. /** 搜索按钮操作 */
  666. handleQuery() {
  667. this.queryParams.pageNum = 1;
  668. this.initTabData();
  669. },
  670. /** 重置按钮操作 */
  671. resetQuery() {
  672. this.resetForm("queryForm");
  673. this.queryParams.orderByColumn = "createTime";
  674. this.queryParams.isAsc = "desc";
  675. this.queryParams.pageNum = 1;
  676. this.queryParams.pageSize = 10;
  677. this.handleQuery();
  678. },
  679. /*导出*/
  680. exportQuery() {
  681. switch (this.activeTab) {
  682. case "list1":
  683. // 待办任务:调用待办导出方法
  684. this.handleExportMyTask();
  685. break;
  686. case "list2":
  687. // 已办任务:调用已办导出方法
  688. this.handleExportMyDoneTask();
  689. break;
  690. case "list3":
  691. // 我的单据:调用单据导出方法
  692. this.handleExportMy();
  693. break;
  694. default:
  695. break;
  696. }
  697. },
  698. /** 导出按钮操作 */
  699. handleExportMyTask() {
  700. this.download(
  701. "project/termination/exportMyTask",
  702. {
  703. ...this.queryParams,
  704. },
  705. `MyTask_${new Date().getTime()}.xlsx`
  706. );
  707. },
  708. handleExportMyDoneTask() {
  709. this.download(
  710. "project/termination/exportMyDoneTask",
  711. {
  712. ...this.queryParams,
  713. },
  714. `MyDoneTask_${new Date().getTime()}.xlsx`
  715. );
  716. },
  717. handleExportMy() {
  718. this.download(
  719. "project/termination/exportMy",
  720. {
  721. ...this.queryParams,
  722. },
  723. `My_${new Date().getTime()}.xlsx`
  724. );
  725. },
  726. clickRow(row) {
  727. this.$refs.dataTable.toggleRowSelection(row);
  728. },
  729. /*项目机会详情*/
  730. handleInvestOppDetail(row) {
  731. const projectPoolId = row.projectPoolId;
  732. getPool(projectPoolId).then((response) => {
  733. const pInstId=response.data.procInstId;
  734. this.$router.push({ path: "/project/investOpp/detail", query: { id:
  735. projectPoolId , pInstId: pInstId } });
  736. });
  737. },
  738. // 跳转到处理页面(暂存节点页面)
  739. handleEdit(row){
  740. const id = row.id || this.ids;
  741. const poolId=row.projectPoolId;
  742. const pInstId=row.procInstId; ``
  743. const taskId=row.taskId;
  744. this.$router.push({ path: "/project/termination/edit", query: { id: poolId , pInstId: pInstId , taskId:taskId} });
  745. },
  746. // 签收操作
  747. handleSign(row) {
  748. // 标记签收人、更新状态等逻辑
  749. row.signPerson = '当前用户';
  750. this.$message.success('签收成功');
  751. },
  752. // 跳转到处理页面
  753. handleProcess(row){
  754. /*this.$router.push({ path: '/flowable/task/todo/detail/index',
  755. query: {
  756. procInsId: row.procInsId,
  757. executionId: row.executionId,
  758. deployId: row.deployId,
  759. taskId: row.taskId,
  760. taskName: row.taskName,
  761. startUser: row.startUserName + '-' + row.startDeptName,
  762. }})*/
  763. const id = row.id || this.ids;
  764. const poolId=row.projectPoolId;
  765. const pInstId=row.procInstId;
  766. const taskId=row.taskId;
  767. this.$store.commit("SET_PROJECTITEMMESSAGE", row);
  768. this.$router.push({ path: "/project/termination/audit", query: { id:poolId , pInstId: pInstId ,taskId:taskId} });
  769. },
  770. // 撤回操作
  771. handleWithdraw(row) {
  772. // 撤回逻辑(比如清空签收人)
  773. row.signPerson = '';
  774. this.$message.success('已撤回');
  775. },
  776. // 详情操作
  777. /*handleFlowRecord(row) {
  778. // 查看流程详情逻辑
  779. console.log('流程详情:', row);
  780. }*/
  781. /*详情*/
  782. handleDetail(row) {
  783. const id = row.id || this.ids;
  784. const poolId=row.projectPoolId;
  785. const pInstId=row.procInstId;
  786. this.$router.push({ path: "/project/termination/detail", query: { id: poolId , pInstId: pInstId } });
  787. },
  788. /** 修改按钮操作 */
  789. handleUpdate(row) {
  790. const id = row.id;
  791. this.$router.push({ path: "/invest/pool/add", query: { id: id } });
  792. },
  793. /**终止按钮操作 */
  794. handleDelete(row) {
  795. const ids = row.id || this.ids;
  796. const idsName = row.projectName ? row.projectName : this.idsName;
  797. this.$modal
  798. .confirm('是否终止"' + idsName + '"项目?')
  799. .then(function () {
  800. return delPool(ids);
  801. })
  802. .then(() => {
  803. this.getList();
  804. this.$modal.msgSuccess("已终止");
  805. })
  806. .catch(() => {});
  807. },
  808. /** 流程图查看 */
  809. handleReadImage(row){
  810. this.readImage.title = "流程图";
  811. this.readImage.open = true;
  812. // this.readImage.src = process.env.VUE_APP_BASE_API + "/flowable/definition/readImage/" + deploymentId;
  813. flowXmlAndNode({procInsId: row.procInstId,deployId:row.deployId}).then(res => {
  814. this.flowData = res.data;
  815. })
  816. },
  817. },
  818. };
  819. </script>
  820. <style lang="scss" scoped>
  821. .tableWrapper {
  822. font-size: 12px;
  823. color: #000;
  824. ::v-deep .el-table__header-wrapper th {
  825. font-size: 12px;
  826. font-weight: bolder;
  827. color: #000;
  828. }
  829. ::v-deep td.el-table__cell:not(:last-child) div {
  830. text-overflow: -o-ellipsis-lastline;
  831. overflow: hidden;
  832. text-overflow: ellipsis;
  833. display: -webkit-box;
  834. -webkit-line-clamp: 1;
  835. line-clamp: 1;
  836. -webkit-box-orient: vertical;
  837. }
  838. }
  839. /**找到表头那一行,然后把里面的复选框隐藏掉**/
  840. .hideHeaderCheckBox
  841. ::v-deep
  842. .el-table__header-wrapper
  843. .el-table__header
  844. .el-checkbox {
  845. display: none;
  846. }
  847. </style>