myTask.vue 29 KB

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