myTask.vue 29 KB

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