projectList.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. v-if="type !== '2'"
  5. :model="queryParams"
  6. ref="queryForm"
  7. size="small"
  8. :inline="true"
  9. v-show="showSearch"
  10. label-width="90px"
  11. style="margin-left: -22px"
  12. >
  13. <el-form-item label="项目名称" prop="projectName">
  14. <el-input
  15. v-model.trim="queryParams.projectName"
  16. placeholder="请输入项目名称"
  17. clearable
  18. @keyup.enter.native="handleQuery"
  19. />
  20. </el-form-item>
  21. <el-form-item label="项目负责人" prop="investHead">
  22. <el-input
  23. v-model.trim="queryParams.investHead"
  24. placeholder="请输入项目负责人"
  25. clearable
  26. @keyup.enter.native="handleQuery"
  27. />
  28. </el-form-item>
  29. <el-form-item label="公司联系人" prop="projectContacts">
  30. <el-input
  31. v-model.trim="queryParams.projectContacts"
  32. placeholder="请输入公司联系人"
  33. clearable
  34. @keyup.enter.native="handleQuery"
  35. />
  36. </el-form-item>
  37. <el-form-item label="渠道" prop="channel">
  38. <el-select v-model="queryParams.channel" placeholder="全部" clearable>
  39. <el-option
  40. v-for="item in channelList"
  41. :key="item.id"
  42. :label="item.channelName"
  43. :value="item.id"
  44. />
  45. </el-select>
  46. </el-form-item>
  47. <el-form-item label="所属组别" prop="projectGroup">
  48. <el-select
  49. v-model="queryParams.projectGroup"
  50. placeholder="全部"
  51. clearable
  52. >
  53. <el-option
  54. v-for="dict in dict.type.project_group"
  55. :key="dict.value"
  56. :label="dict.label"
  57. :value="dict.value"
  58. />
  59. </el-select>
  60. </el-form-item>
  61. <el-form-item label="项目公司" prop="company">
  62. <el-input
  63. v-model.trim="queryParams.company"
  64. placeholder="请输入项目所属公司"
  65. clearable
  66. @keyup.enter.native="handleQuery"
  67. />
  68. </el-form-item>
  69. <el-form-item class="searchWrapper">
  70. <el-button
  71. type="primary"
  72. icon="el-icon-search"
  73. size="mini"
  74. @click="handleQuery"
  75. >搜索</el-button
  76. >
  77. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  78. >重置</el-button
  79. >
  80. </el-form-item>
  81. </el-form>
  82. <el-row
  83. :gutter="10"
  84. class="mb8"
  85. v-if="type === '2' && stage == '4' ? false : true"
  86. >
  87. <el-col :span="1.5">
  88. <el-button
  89. v-if="type === '1' && stage == '1'"
  90. type="primary"
  91. plain
  92. icon="el-icon-plus"
  93. size="mini"
  94. @click="handleAdd"
  95. v-hasPermi="['invest:pool:add']"
  96. >新增</el-button
  97. >
  98. </el-col>
  99. <el-col :span="1.5">
  100. <el-button
  101. :disabled="multiple"
  102. plain
  103. type="success"
  104. v-if="stage === '1'"
  105. size="mini"
  106. icon="el-icon-edit"
  107. @click="handleSelectData(1)"
  108. v-hasPermi="['invest:pool:edit']"
  109. >修改</el-button
  110. >
  111. </el-col>
  112. <el-col :span="1.5">
  113. <el-button
  114. :disabled="multiple"
  115. plain
  116. type="primary"
  117. size="mini"
  118. icon="el-icon-edit"
  119. v-if="stage === '2'"
  120. @click="handleSelectData(5)"
  121. v-hasPermi="['invest:pool:assess']"
  122. >上传评估意见</el-button
  123. >
  124. </el-col>
  125. <el-col :span="1.5">
  126. <el-button
  127. plain
  128. :disabled="multiple"
  129. type="warning"
  130. v-if="stage == '3'"
  131. size="mini"
  132. icon="el-icon-document"
  133. @click="handleSelectData(6)"
  134. v-hasPermi="['invest:pool:lx:apply']"
  135. >立项申请</el-button
  136. >
  137. </el-col>
  138. <el-col :span="1.5">
  139. <el-button
  140. plain
  141. :disabled="multiple"
  142. type="warning"
  143. v-if="stage == '3'"
  144. size="mini"
  145. icon="el-icon-chat-line-round"
  146. @click="handleSelectData(7, 'LX')"
  147. v-hasPermi="['invest:pool:lx:meeting']"
  148. >发起立项会议</el-button
  149. >
  150. </el-col>
  151. <el-col :span="1.5">
  152. <el-button
  153. plain
  154. :disabled="multiple"
  155. type="primary"
  156. v-if="stage == '3'"
  157. size="mini"
  158. icon="el-icon-document-checked"
  159. @click="handleSelectData(8)"
  160. >上传打分表</el-button
  161. >
  162. </el-col>
  163. <el-col :span="1.5">
  164. <el-button
  165. plain
  166. :disabled="multiple"
  167. type="warning"
  168. v-if="stage == '4'"
  169. size="mini"
  170. icon="el-icon-tickets"
  171. @click="handleSelectData(9)"
  172. v-hasPermi="['invest:pool:due']"
  173. >尽调申请</el-button
  174. >
  175. </el-col>
  176. <el-col :span="1.5">
  177. <el-button
  178. plain
  179. :disabled="multiple"
  180. type="primary"
  181. v-if="stage == '4'"
  182. size="mini"
  183. icon="el-icon-document-checked"
  184. @click="handleSelectData(10)"
  185. >上传尽调报告</el-button
  186. >
  187. </el-col>
  188. <el-col :span="1.5">
  189. <el-button
  190. plain
  191. :disabled="multiple"
  192. type="warning"
  193. v-if="stage == '5'"
  194. size="mini"
  195. icon="el-icon-document"
  196. @click="handleSelectData(11)"
  197. v-hasPermi="['invest:pool:tj:apply']"
  198. >投决申请</el-button
  199. >
  200. </el-col>
  201. <el-col :span="1.5">
  202. <el-button
  203. plain
  204. :disabled="multiple"
  205. type="warning"
  206. v-if="stage == '5'"
  207. size="mini"
  208. icon="el-icon-chat-line-square"
  209. @click="handleSelectData(12, 'TJ')"
  210. v-hasPermi="['invest:pool:tj:meeting']"
  211. >发起投决会议</el-button
  212. >
  213. </el-col>
  214. <el-col :span="1.5">
  215. <el-button
  216. plain
  217. :disabled="multiple"
  218. type="primary"
  219. v-if="stage == '5'"
  220. size="mini"
  221. icon="el-icon-document-checked"
  222. @click="handleSelectData(13)"
  223. >上传打分表</el-button
  224. >
  225. </el-col>
  226. <el-col :span="1.5">
  227. <el-button
  228. :disabled="multiple"
  229. plain
  230. type="success"
  231. v-if="stage !== '0'"
  232. size="mini"
  233. icon="el-icon-setting"
  234. v-hasPermi="['invest:pool:stage']"
  235. @click="handleSelectData(3)"
  236. >设置项目阶段</el-button
  237. >
  238. </el-col>
  239. <el-col :span="1.5">
  240. <el-button
  241. @click="handleSelectData(4)"
  242. v-if="type === '1' && stage !== '0'"
  243. type="danger"
  244. plain
  245. icon="el-icon-switch-button"
  246. size="mini"
  247. :disabled="multiple"
  248. v-hasPermi="['invest:pool:remove']"
  249. >终止</el-button
  250. >
  251. </el-col>
  252. <el-col :span="1.5">
  253. <el-button
  254. v-if="type === '1' && stage == '0'"
  255. type="warning"
  256. plain
  257. icon="el-icon-download"
  258. size="mini"
  259. @click="handleExport"
  260. v-hasPermi="['invest:pool:export']"
  261. >导出</el-button
  262. >
  263. </el-col>
  264. <right-toolbar
  265. :showSearch.sync="showSearch"
  266. @queryTable="getList"
  267. ></right-toolbar>
  268. </el-row>
  269. <el-table
  270. ref="dataTable"
  271. @row-click="clickRow"
  272. class="tableWrapper"
  273. :class="{ hideHeaderCheckBox: stage !== '0' }"
  274. v-loading="loading"
  275. border
  276. :data="poolList"
  277. @selection-change="handleSelectionChange"
  278. >
  279. <el-table-column type="selection" width="40" align="center" />
  280. <el-table-column
  281. type="index"
  282. label="序号"
  283. width="50"
  284. align="center"
  285. ></el-table-column>
  286. <!-- <el-table-column label="主键id" align="center" prop="id" /> -->
  287. <el-table-column label="项目名称" align="center" prop="projectName">
  288. <template slot-scope="scope">
  289. <div
  290. :title="scope.row.projectName"
  291. class="public-text-blue public-cursor"
  292. @click.stop="handleDetail(scope.row)"
  293. >
  294. {{ scope.row.projectName }}
  295. </div>
  296. </template>
  297. </el-table-column>
  298. <el-table-column
  299. label="公司名称"
  300. align="center"
  301. prop="tProjectCompany.companyName"
  302. >
  303. <template slot-scope="scope">
  304. <div :title="scope.row.tProjectCompany.companyName">
  305. {{ scope.row.tProjectCompany.companyName }}
  306. </div>
  307. </template>
  308. </el-table-column>
  309. <el-table-column
  310. label="项目所属城市"
  311. align="center"
  312. prop="tProjectCompany.registeredAddress"
  313. >
  314. <template slot-scope="scope">
  315. <div :title="scope.row.tProjectCompany.registeredAddress">
  316. {{ scope.row.tProjectCompany.registeredAddress }}
  317. </div>
  318. </template>
  319. </el-table-column>
  320. <el-table-column label="所属行业" align="center" prop="industry"
  321. ><template slot-scope="scope">
  322. <dict-tag
  323. :options="dict.type.CUSTOMER_TRADE"
  324. :value="scope.row.industry"
  325. />
  326. </template>
  327. </el-table-column>
  328. <el-table-column label="项目阶段" align="center" prop="projectStage">
  329. <template slot-scope="scope">
  330. <dict-tag
  331. :options="dict.type.project_stage"
  332. :value="scope.row.projectStage"
  333. />
  334. </template>
  335. </el-table-column>
  336. <el-table-column label="项目状态" align="center" prop="projectState" width="120">
  337. <template slot-scope="scope">
  338. <dict-tag
  339. :options="dict.type.project_state"
  340. :value="scope.row.projectState"
  341. />
  342. </template>
  343. </el-table-column>
  344. <el-table-column
  345. label="备案时间"
  346. align="center"
  347. prop="tProjectCompany.filingTime"
  348. >
  349. <template slot-scope="scope">
  350. <span>{{
  351. parseTime(scope.row.tProjectCompany.filingTime, "{y}-{m}-{d}")
  352. }}</span>
  353. </template>
  354. </el-table-column>
  355. <el-table-column
  356. label="立项通过日期"
  357. align="center"
  358. prop="projectDate"
  359. v-if="stage !== '1'"
  360. >
  361. <template slot-scope="scope">
  362. <span>{{ parseTime(scope.row.projectDate, "{y}-{m}-{d}") }}</span>
  363. </template>
  364. </el-table-column>
  365. <el-table-column
  366. label="投决通过日期"
  367. align="center"
  368. prop="decisionDate"
  369. v-if="stage !== '1'"
  370. >
  371. <template slot-scope="scope">
  372. <span>{{ parseTime(scope.row.decisionDate, "{y}-{m}-{d}") }}</span>
  373. </template>
  374. </el-table-column>
  375. <el-table-column label="项目负责人" align="center" prop="investHead">
  376. <template slot-scope="scope">
  377. <div :title="scope.row.investHead">
  378. {{ scope.row.investHead }}
  379. </div>
  380. </template>
  381. </el-table-column>
  382. <!-- <el-table-column label="项目编号" align="center" prop="projectCode" /> -->
  383. <el-table-column
  384. label="渠道"
  385. align="center"
  386. prop="tProjectChannel.channelName"
  387. >
  388. <template slot-scope="scope">
  389. <div
  390. v-if="
  391. scope.row.tProjectChannel && scope.row.tProjectChannel.channelName
  392. "
  393. :title="scope.row.tProjectChannel.channelName"
  394. >
  395. {{ scope.row.tProjectChannel.channelName }}
  396. </div>
  397. </template>
  398. </el-table-column>
  399. <!-- <el-table-column
  400. label="所属组别"
  401. align="center"
  402. prop="tProjectChannel.channelGroup"
  403. >
  404. <template slot-scope="scope">
  405. <dict-tag
  406. :options="dict.type.project_group"
  407. :value="scope.row.tProjectChannel.channelGroup"
  408. />
  409. </template>
  410. </el-table-column> -->
  411. <!-- <el-table-column
  412. label="项目联系人"
  413. align="center"
  414. prop="tProjectContacts.name"
  415. >
  416. <template slot-scope="scope">
  417. <div :title="scope.row.tProjectContacts.name">
  418. {{ scope.row.tProjectContacts.name }}
  419. </div>
  420. </template>
  421. </el-table-column> -->
  422. <!--<el-table-column
  423. label="创建人"
  424. width="120"
  425. align="center"
  426. prop="createBy"
  427. />
  428. <el-table-column
  429. label="创建时间"
  430. align="center"
  431. prop="createTime"
  432. width="160"
  433. /> -->
  434. <!-- delFlag -->
  435. <el-table-column label="状态" align="center" prop="investHead">
  436. <template slot-scope="scope">
  437. <div :title="scope.row.delFlag === '1' ? '终止' : '正常'">
  438. {{ scope.row.delFlag === "1" ? "终止" : "正常" }}
  439. </div>
  440. </template>
  441. </el-table-column>
  442. <!-- fixed="right" -->
  443. <el-table-column label="操作" align="center" v-if="false">
  444. <template slot-scope="scope">
  445. <!-- stage//0=全部 1=项目报备 2=评估考察 3=项目立项 4=尽职背调 5=项目投决 -->
  446. <!-- <el-button
  447. class="custom-orange-color"
  448. v-if="stage == '1'"
  449. size="mini"
  450. type="text"
  451. icon="el-icon-thumb"
  452. @click="handlefollowRecord(scope.row)"
  453. >上传跟进记录</el-button> -->
  454. <!-- <el-button
  455. class="custom-orange-color"
  456. v-if="stage == '3' && scope.row.delFlag !== '1'"
  457. size="mini"
  458. type="text"
  459. icon="el-icon-chat-line-round"
  460. @click="handleMeeting(scope.row, 'LX')"
  461. >发起立项会议</el-button
  462. >
  463. <el-button
  464. class="custom-orange-color"
  465. v-if="stage == '5' && scope.row.delFlag !== '1'"
  466. size="mini"
  467. type="text"
  468. icon="el-icon-chat-line-square"
  469. @click="handleMeeting(scope.row, 'TJ')"
  470. >发起投决会议</el-button
  471. >
  472. <el-button
  473. class="custom-orange-color"
  474. v-if="stage == '4' && scope.row.delFlag !== '1'"
  475. size="mini"
  476. type="text"
  477. icon="el-icon-tickets"
  478. @click="handleDropdown($event, scope.row)"
  479. >尽职背调</el-button
  480. >
  481. <el-button
  482. v-if="scope.row.delFlag !== '1' && stage !== '0'"
  483. size="mini"
  484. type="text"
  485. icon="el-icon-setting"
  486. @click="handleBusinessUpdate(scope.row)"
  487. >设置项目阶段</el-button
  488. >
  489. <el-button
  490. v-if="scope.row.delFlag !== '1' && stage !== '0'"
  491. size="mini"
  492. type="text"
  493. icon="el-icon-edit"
  494. @click="handleUpdate(scope.row)"
  495. v-hasPermi="['invest:pool:edit']"
  496. >修改</el-button
  497. >
  498. <el-button
  499. class="custom-blue-color"
  500. size="mini"
  501. type="text"
  502. icon="el-icon-search"
  503. @click="handleDetail(scope.row)"
  504. v-hasPermi="['invest:pool:query']"
  505. >详情</el-button
  506. > -->
  507. <el-button
  508. v-if="scope.row.delFlag !== '1' && stage !== '0'"
  509. class="custom-red-color"
  510. size="mini"
  511. type="text"
  512. icon="el-icon-switch-button"
  513. @click="handleDelete(scope.row)"
  514. v-hasPermi="['invest:pool:remove']"
  515. >终止</el-button
  516. >
  517. </template>
  518. </el-table-column>
  519. </el-table>
  520. <pagination
  521. v-show="total > 0"
  522. :total="total"
  523. :page.sync="queryParams.pageNum"
  524. :limit.sync="queryParams.pageSize"
  525. @pagination="getList"
  526. />
  527. <!-- 设置项目状态对话框 -->
  528. <businessUpdate @getList="getList" ref="businessUpdate"></businessUpdate>
  529. <!-- 上传评估意见对话框 -->
  530. <!-- <el-dialog
  531. :title="titleAssess"
  532. :visible.sync="openAssess"
  533. width="800px"
  534. append-to-body
  535. >
  536. <el-form
  537. ref="formAssess"
  538. :model="formAssess"
  539. :rules="rulesAssess"
  540. label-width="120px"
  541. >
  542. <el-form-item label="评估意见" prop="assess">
  543. <el-input
  544. maxlength="200"
  545. rows="4"
  546. type="textarea"
  547. v-model="formAssess.assess"
  548. placeholder="请填写评估意见"
  549. >
  550. </el-input>
  551. </el-form-item>
  552. </el-form>
  553. <div slot="footer" class="dialog-footer">
  554. <el-button type="primary" @click="submitAssessForm" v-preventReClick
  555. >确 定</el-button
  556. >
  557. <el-button @click="openAssess = false">取 消</el-button>
  558. </div>
  559. </el-dialog> -->
  560. <!-- 尽调组件 -->
  561. <!-- <dueDiligenceList
  562. ref="dueDiligenceLists"
  563. :projectId="projectId"
  564. :projectName="form.projectName"
  565. ></dueDiligenceList> -->
  566. <!-- 跟进记录组件 -->
  567. <!-- <followList
  568. :type="'3'"
  569. ref="followList"
  570. :projectId="projectId"
  571. ></followList> -->
  572. <!-- 会议管理组件 -->
  573. <!-- <meetingList
  574. :type="'3'"
  575. ref="meetingList"
  576. :projectId="projectId"
  577. ></meetingList> -->
  578. </div>
  579. </template>
  580. <script>
  581. import { listPool, delPool, editStage } from "@/api/invest/pool";
  582. import { selectByFlowKey } from "@/api/flowable/definition";
  583. import { listChannel } from "@/api/invest/channel";
  584. import dueDiligenceList from "./dueDiligenceList";
  585. import followList from "./followList";
  586. import meetingList from "./meetingList";
  587. import businessUpdate from "./businessUpdate";
  588. import { mapGetters } from "vuex";
  589. export default {
  590. props: {
  591. type: {
  592. type: String,
  593. default: "1", //1=显示全部列表 2=显示某项目下的详情列表
  594. },
  595. stage: {
  596. type: String,
  597. default: "0", //0=全部 1=项目报备 2=评估考察 3=项目立项 4=尽职背调 5=项目投决
  598. },
  599. projectId: {
  600. type: String,
  601. },
  602. },
  603. dicts: ["project_group", "project_stage", "project_state", "CUSTOMER_TRADE"],
  604. components: {
  605. dueDiligenceList,
  606. followList,
  607. meetingList,
  608. businessUpdate,
  609. },
  610. data() {
  611. return {
  612. // 遮罩层
  613. loading: false,
  614. // 选中id数组
  615. ids: [],
  616. idsName: [],
  617. // 非单个禁用
  618. single: true,
  619. // 非多个禁用
  620. multiple: true,
  621. // 选中数组
  622. selectRowList: [],
  623. // 显示搜索条件
  624. showSearch: false,
  625. // 总条数
  626. total: 0,
  627. // 项目池表格数据
  628. poolList: [],
  629. // 查询参数
  630. queryParams: {
  631. id: null,
  632. pageNum: 1,
  633. pageSize: 10,
  634. projectName: null,
  635. projectGroup: "",
  636. projectCode: null,
  637. channel: null,
  638. contactDate: null,
  639. projectDate: null,
  640. decisionDate: null,
  641. industry: null,
  642. company: null,
  643. projectContacts: null,
  644. investHead: null,
  645. previousFinancing: null,
  646. financingStage: null,
  647. financingMoney: null,
  648. financingDate: null,
  649. investValuation: null,
  650. investMoney: null,
  651. investType: null,
  652. investPloy: null,
  653. investWorth: null,
  654. projectStage: null,
  655. projectState: null,
  656. orderByColumn: "createTime",
  657. isAsc: "desc",
  658. createTime: null,
  659. },
  660. channelList: [],
  661. };
  662. },
  663. computed: {
  664. ...mapGetters(["user"]),
  665. },
  666. created() {},
  667. mounted() {
  668. // 项目阶段
  669. if (this.stage != "0") {
  670. this.queryParams.projectStage = this.stage;
  671. }
  672. if (this.projectId) {
  673. this.queryParams.id = this.projectId;
  674. }
  675. this.getList();
  676. // 渠道
  677. listChannel({
  678. pageNum: 1,
  679. pageSize: 100,
  680. }).then((response) => {
  681. this.channelList = response.rows;
  682. });
  683. },
  684. activated() {
  685. // 项目阶段
  686. if (this.stage != "0") {
  687. this.queryParams.projectStage = this.stage;
  688. }
  689. this.getList();
  690. },
  691. methods: {
  692. /** 查询项目池列表 */
  693. getList() {
  694. this.loading = true;
  695. listPool(this.queryParams).then((response) => {
  696. this.poolList = response.rows;
  697. this.total = response.total;
  698. this.loading = false;
  699. });
  700. },
  701. /** 搜索按钮操作 */
  702. handleQuery() {
  703. this.queryParams.pageNum = 1;
  704. this.getList();
  705. },
  706. /** 重置按钮操作 */
  707. resetQuery() {
  708. this.resetForm("queryForm");
  709. this.queryParams.orderByColumn = "createTime";
  710. this.queryParams.isAsc = "desc";
  711. this.handleQuery();
  712. },
  713. // 多选框选中数据
  714. handleSelectionChange(selection) {
  715. if (this.stage !== "0") {
  716. if (selection.length > 1) {
  717. //移除上一次选中行数据
  718. selection.shift();
  719. //修改选中图标为未选中状态
  720. this.$refs.dataTable.clearSelection();
  721. //将当前选中行改为选中状态
  722. this.$refs.dataTable.toggleRowSelection(selection[0]);
  723. }
  724. }
  725. this.ids = selection.map((item) => item.id);
  726. this.idsName = selection.map((item) => item.projectName);
  727. this.single = selection.length !== 1;
  728. this.multiple = !selection.length;
  729. this.selectRowList = selection;
  730. },
  731. clickRow(row) {
  732. this.$refs.dataTable.toggleRowSelection(row);
  733. },
  734. /** 新增按钮操作 */
  735. handleAdd() {
  736. this.$router.push({ path: "/invest/pool/add" });
  737. },
  738. handleSelectData(type, otherData) {
  739. // type 1=修改 2=详情 3=设置项目阶段 4=终止 5=上传评估意见
  740. // 6=立项申请 7=发起立项会议 8=上传打分表(立项)
  741. // 9=尽调申请 10=上传尽调报告
  742. // 11=投决申请 12=发起投决会议 13=上传打分表(投决)
  743. if (this.selectRowList.length == 1) {
  744. const row = this.selectRowList[0];
  745. if (row.delFlag === "1") {
  746. this.$message({
  747. message: "项目已终止",
  748. duration: 1500,
  749. type: "error",
  750. });
  751. } else if (row.investHead === this.user.nickName) {
  752. // 项目负责人
  753. if (type === 1) {
  754. // 修改
  755. this.handleUpdate(row);
  756. } else if (type === 2) {
  757. // 详情
  758. this.handleDetail(row);
  759. } else if (type === 3) {
  760. if (row.projectState !== "1") {
  761. // 设置项目阶段
  762. this.$refs.businessUpdate.handleBusinessUpdate(row);
  763. } else {
  764. this.$message({
  765. message: "暂存时不能设置项目阶段",
  766. duration: 1500,
  767. type: "warning",
  768. });
  769. }
  770. } else if (type === 4) {
  771. // 终止
  772. this.handleDelete(row);
  773. }
  774. } else {
  775. this.$message({
  776. message: "无权限",
  777. duration: 1500,
  778. type: "error",
  779. });
  780. }
  781. } else {
  782. this.$message({
  783. message: "只能选择一条数据",
  784. duration: 1500,
  785. type: "warning",
  786. });
  787. }
  788. },
  789. handleDetail(row) {
  790. const id = row.id || this.ids;
  791. this.$router.push({ path: "/invest/pool/detail", query: { id: id } });
  792. },
  793. /** 修改按钮操作 */
  794. handleUpdate(row) {
  795. const id = row.id;
  796. this.$router.push({ path: "/invest/pool/add", query: { id: id } });
  797. },
  798. /**终止按钮操作 */
  799. handleDelete(row) {
  800. const ids = row.id || this.ids;
  801. const idsName = row.projectName ? row.projectName : this.idsName;
  802. this.$modal
  803. .confirm('是否终止"' + idsName + '"项目?')
  804. .then(function () {
  805. return delPool(ids);
  806. })
  807. .then(() => {
  808. this.getList();
  809. this.$modal.msgSuccess("已终止");
  810. })
  811. .catch(() => {});
  812. },
  813. /** 导出按钮操作 */
  814. handleExport() {
  815. this.download(
  816. "invest/pool/export",
  817. {
  818. ...this.queryParams,
  819. },
  820. `pool_${new Date().getTime()}.xlsx`
  821. );
  822. },
  823. // // 上传评估意见
  824. // handleAssessPop(row) {
  825. // this.resetAssess();
  826. // this.openAssess = true;
  827. // this.titleAssess = "上传评估意见";
  828. // },
  829. // // 发起会议
  830. // handleMeeting(row, meetingType) {
  831. // this.$store.commit("SET_PROJECTITEMMESSAGE", row);
  832. // this.$refs.meetingList.handleAdd(row.id, meetingType);
  833. // },
  834. // getButtonItem(row) {
  835. // let that = this;
  836. // this.needUpload = false;
  837. // // 是否是发起人
  838. // this.isInitiator = row.investHead == this.user.nickName;
  839. // getlistProjectPoolId(row.id).then((response) => {
  840. // // 是否有尽调报告
  841. // if (response.tProjectInvestigate) {
  842. // // 修改尽调申请
  843. // this.needInitiate = false;
  844. // this.dueForm = response.tProjectInvestigate;
  845. // // 如果上传人有 this.user.userId 那么 needUpload=true
  846. // // 需要上传的人数组
  847. // let investigatePersonIdList =
  848. // response.tProjectInvestigate.investigatePersonId.split(",");
  849. // if (investigatePersonIdList.indexOf(this.user.userId) > -1) {
  850. // this.needUpload = true;
  851. // }
  852. // if (!this.needUpload && !this.isInitiator) {
  853. // this.$message({
  854. // message: "暂无更多操作权限",
  855. // duration: 1500,
  856. // type: "warning",
  857. // });
  858. // }
  859. // } else {
  860. // // 发起尽调申请
  861. // this.needInitiate = true;
  862. // if (!this.isInitiator) {
  863. // this.$message({
  864. // message: "暂无更多操作权限",
  865. // duration: 1500,
  866. // type: "warning",
  867. // });
  868. // }
  869. // }
  870. // });
  871. // },
  872. // // 上传跟进记录
  873. // handlefollowRecord(row) {
  874. // this.$store.commit("SET_PROJECTITEMMESSAGE", row);
  875. // this.$refs.followList.handleAdd(row.id);
  876. // },
  877. // // 设置上传评估意见表单重置
  878. // resetAssess() {
  879. // this.formAssess = {
  880. // id: null,
  881. // assess: null,
  882. // projectPoolId: this.selectRowList[0].id,
  883. // };
  884. // this.resetForm("formAssess");
  885. // },
  886. // // 上传评估意见提交
  887. // submitAssessForm() {
  888. // let that = this;
  889. // this.$refs["formAssess"].validate((valid) => {
  890. // if (valid) {
  891. // // editStage(this.formAssess).then((response) => {
  892. // // that.$modal.msgSuccess("提交成功");
  893. // // that.openAssess = false;
  894. // // });
  895. // }
  896. // });
  897. // },
  898. },
  899. };
  900. </script>
  901. <style lang="scss" scoped>
  902. .tableWrapper {
  903. font-size: 12px;
  904. color: #000;
  905. ::v-deep .el-table__header-wrapper th {
  906. font-size: 12px;
  907. font-weight: bolder;
  908. color: #000;
  909. }
  910. ::v-deep td.el-table__cell:not(:last-child) div {
  911. text-overflow: -o-ellipsis-lastline;
  912. overflow: hidden;
  913. text-overflow: ellipsis;
  914. display: -webkit-box;
  915. -webkit-line-clamp: 1;
  916. line-clamp: 1;
  917. -webkit-box-orient: vertical;
  918. }
  919. }
  920. /**找到表头那一行,然后把里面的复选框隐藏掉**/
  921. .hideHeaderCheckBox
  922. ::v-deep
  923. .el-table__header-wrapper
  924. .el-table__header
  925. .el-checkbox {
  926. display: none;
  927. }
  928. </style>