myTask.vue 31 KB

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