myTask.vue 29 KB

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