enclosure-edit.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. <template>
  2. <div class="app-container">
  3. <div>
  4. <b style="color: red;font-size: 15px;">根据您填报的项目信息,系统自动将需要上传的文件列出,每种类型文件只能上传单个文件(大小限制4M),如有多个请打包上传!</b><br><b style="color: red;font-size: 15px;">技术人员上传1-7项相关文件,财务人员上传8-10项相关文件。当技术、财务资料达到 100%时,可提交项目申报。</b>
  5. </div>
  6. <h3 class="toolbar">
  7. <!-- <span class="title">加计扣除备查资料清单</span> -->
  8. <div class="tool">
  9. <el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleDownloadBatch">批量下载</el-button>
  10. </div>
  11. </h3>
  12. <el-form ref="form" :model="form" label-width="180px">
  13. <div class="table-con">
  14. <table class="table_register mt20 tablebar" style="width: 100%;">
  15. <tr>
  16. <th colspan="4" class="th_title">1、项目计划书
  17. </th>
  18. </tr>
  19. <tr>
  20. <th>项目计划书导入</th>
  21. <td colspan="3">
  22. <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('9')" v-if="techFlag && list9.length<=0">上传</el-button>
  23. </td>
  24. </tr>
  25. <tr>
  26. <th>下载</th>
  27. <td colspan="3">
  28. <ul>
  29. <li v-for="(item, index) in list9" :key="index" style="margin: 2px;">
  30. <el-row :gutter="20">
  31. <el-col :span="12">
  32. <a :href="item.url">{{item.fileName}}</a>
  33. </el-col>
  34. <el-col :span="12">
  35. <el-button type="primary" icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
  36. <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
  37. </el-col>
  38. </el-row>
  39. </li>
  40. </ul>
  41. </td>
  42. </tr>
  43. </table>
  44. <table class="table_register mt20 tablebar" style="width: 100%;">
  45. <tr>
  46. <th colspan="4" class="th_title">2、研发项目验收报告
  47. </th>
  48. </tr>
  49. <tr>
  50. <th><span style="color: red;">*</span>是否上传</th>
  51. <td>
  52. <el-form-item prop="reportFlag" label-width="0">
  53. <el-radio-group v-model="form.reportFlag" :disabled="disabledFlag">
  54. <el-radio v-for="(item, index) in booleanOptions" :key="index" :label="item.dictValue">{{item.dictLabel}}</el-radio>
  55. </el-radio-group>
  56. </el-form-item>
  57. </td>
  58. </tr>
  59. <template v-if="form.reportFlag">
  60. <tr>
  61. <th>验收报告导入</th>
  62. <td colspan="3">
  63. <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('10')" v-if="techFlag && list10.length <= 0">上传</el-button>
  64. <el-button type="primary" size="mini">
  65. <a href="/temp/研发项目验收报告模板.docx">模板下载</a>
  66. </el-button>
  67. </td>
  68. </tr>
  69. <tr>
  70. <th>下载</th>
  71. <td colspan="3">
  72. <ul>
  73. <li v-for="(item, index) in list10" :key="index" style="margin: 2px;">
  74. <el-row :gutter="20">
  75. <el-col :span="12">
  76. <a :href="item.url">{{item.fileName}}</a>
  77. </el-col>
  78. <el-col :span="12">
  79. <el-button type="primary" icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
  80. <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
  81. </el-col>
  82. </el-row>
  83. </li>
  84. </ul>
  85. </td>
  86. </tr>
  87. </template>
  88. </table>
  89. <table class="table_register mt20 tablebar" style="width: 100%;">
  90. <tr>
  91. <th colspan="4" class="th_title">3、研发过程资料,比如研发制度、会议记录、实验记录等
  92. </th>
  93. </tr>
  94. <tr>
  95. <th>研究过程资料导入</th>
  96. <td colspan="3">
  97. <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('11')" v-if="techFlag && list11.length <= 0">上传</el-button>
  98. </td>
  99. </tr>
  100. <tr>
  101. <th>下载</th>
  102. <td colspan="3">
  103. <ul>
  104. <li v-for="(item, index) in list11" :key="index" style="margin: 2px;">
  105. <el-row :gutter="20">
  106. <el-col :span="12">
  107. <a :href="item.url">{{item.fileName}}</a>
  108. </el-col>
  109. <el-col :span="12">
  110. <el-button type="primary" icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
  111. <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
  112. </el-col>
  113. </el-row>
  114. </li>
  115. </ul>
  116. </td>
  117. </tr>
  118. </table>
  119. <table class="table_register mt20" style="width: 100%;">
  120. <tr>
  121. <th colspan="4" class="th_title">4、企业有权部门关于自主、委托、合作研究开发项目立项的决议文件
  122. </th>
  123. </tr>
  124. <tr>
  125. <th>决议文件导入</th>
  126. <td colspan="3">
  127. <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('1')" v-if="techFlag && list1.length <= 0">上传</el-button>
  128. <el-button type="primary" size="mini">
  129. <a href="/temp/项目立项书模板.doc">模板下载</a>
  130. </el-button>
  131. </td>
  132. </tr>
  133. <tr>
  134. <th>下载</th>
  135. <td colspan="3">
  136. <ul>
  137. <li v-for="(item, index) in list1" :key="index" style="margin: 2px;">
  138. <el-row :gutter="20">
  139. <el-col :span="12">
  140. <a :href="item.url">{{item.fileName}}</a>
  141. </el-col>
  142. <el-col :span="12">
  143. <el-button type="primary" icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
  144. <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
  145. </el-col>
  146. </el-row>
  147. </li>
  148. </ul>
  149. </td>
  150. </tr>
  151. </table>
  152. <table class="table_register mt20" style="width: 100%;">
  153. <tr>
  154. <th colspan="4" class="th_title">5、自主、委托、合作研究开发专门机构或项目组的编制情况和研发人员名单
  155. </th>
  156. </tr>
  157. <tr>
  158. <th>研发人员名单导入</th>
  159. <td colspan="3">
  160. <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('2')" v-if="techFlag && list2.length <= 0">上传</el-button>
  161. <el-button type="primary" size="mini">
  162. <a href="/temp/项目负责人及研发人员模板.xls">模板下载</a>
  163. </el-button>
  164. </td>
  165. </tr>
  166. <tr>
  167. <th>下载</th>
  168. <td colspan="3">
  169. <ul>
  170. <li v-for="(item, index) in list2" :key="index" style="margin: 2px;">
  171. <el-row :gutter="20">
  172. <el-col :span="12">
  173. <a :href="item.url">{{item.fileName}}</a>
  174. </el-col>
  175. <el-col :span="12">
  176. <el-button type="primary" icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
  177. <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
  178. </el-col>
  179. </el-row>
  180. </li>
  181. </ul>
  182. </td>
  183. </tr>
  184. </table>
  185. <table class="table_register mt20" style="width: 100%;">
  186. <tr>
  187. <th colspan="4" class="th_title">6、经科技行政主管部门登记的委托、合作研究开发项目的合同
  188. </th>
  189. </tr>
  190. <tr>
  191. <th><span style="color: red;">*</span>是否上传</th>
  192. <td>
  193. <el-form-item prop="contractFlag" label-width="0">
  194. <el-radio-group v-model="form.contractFlag" :disabled="disabledFlag">
  195. <el-radio v-for="(item, index) in booleanOptions" :key="index" :label="item.dictValue">{{item.dictLabel}}</el-radio>
  196. </el-radio-group>
  197. </el-form-item>
  198. </td>
  199. </tr>
  200. <template v-if="form.contractFlag">
  201. <tr>
  202. <th>研究开发合同导入</th>
  203. <td colspan="3">
  204. <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('3')" v-if="techFlag && list3.length <= 0">上传</el-button>
  205. </td>
  206. </tr>
  207. <tr>
  208. <th>下载</th>
  209. <td colspan="3">
  210. <ul>
  211. <li v-for="(item, index) in list3" :key="index" style="margin: 2px;">
  212. <el-row :gutter="20">
  213. <el-col :span="12">
  214. <a :href="item.url">{{item.fileName}}</a>
  215. </el-col>
  216. <el-col :span="12">
  217. <el-button type="primary" icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
  218. <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
  219. </el-col>
  220. </el-row>
  221. </li>
  222. </ul>
  223. </td>
  224. </tr>
  225. </template>
  226. </table>
  227. <table class="table_register mt20" style="width: 100%;">
  228. <tr>
  229. <th colspan="4" class="th_title">7、“研发支出”辅助账及汇总表
  230. </th>
  231. </tr>
  232. <tr>
  233. <th>“研发支出”辅助账及汇总表导入</th>
  234. <td colspan="3">
  235. <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('6')" v-if="techFlag && list6.length <= 0">上传</el-button>
  236. </td>
  237. </tr>
  238. <tr>
  239. <th>下载</th>
  240. <td colspan="3">
  241. <ul>
  242. <li v-for="(item, index) in list6" :key="index" style="margin: 2px;">
  243. <el-row :gutter="20">
  244. <el-col :span="12">
  245. <a :href="item.url">{{item.fileName}}</a>
  246. </el-col>
  247. <el-col :span="12">
  248. <el-button type="primary" icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
  249. <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
  250. </el-col>
  251. </el-row>
  252. </li>
  253. </ul>
  254. </td>
  255. </tr>
  256. </table>
  257. <table class="table_register mt20" style="width: 100%;">
  258. <tr>
  259. <th colspan="4" class="th_title">8、企业如果已取得地市级(含)以上科技行政主管部门出具的鉴定意见,应作为资料留存备查
  260. </th>
  261. </tr>
  262. <tr>
  263. <th><span style="color: red;">*</span>是否上传</th>
  264. <td>
  265. <el-form-item prop="appraisalFlag" label-width="0">
  266. <el-radio-group v-model="form.appraisalFlag" :disabled="disabledFlag">
  267. <el-radio v-for="(item, index) in booleanOptions" :key="index" :label="item.dictValue">{{item.dictLabel}}</el-radio>
  268. </el-radio-group>
  269. </el-form-item>
  270. </td>
  271. </tr>
  272. <template v-if="form.appraisalFlag">
  273. <tr>
  274. <th>科技主管部门鉴定意见导入</th>
  275. <td colspan="3">
  276. <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('7')" v-if="techFlag && list7.length <= 0">上传</el-button>
  277. </td>
  278. </tr>
  279. <tr>
  280. <th>下载</th>
  281. <td colspan="3">
  282. <ul>
  283. <li v-for="(item, index) in list7" :key="index" style="margin: 2px;">
  284. <el-row :gutter="20">
  285. <el-col :span="12">
  286. <a :href="item.url">{{item.fileName}}</a>
  287. </el-col>
  288. <el-col :span="12">
  289. <el-button type="primary" icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
  290. <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
  291. </el-col>
  292. </el-row>
  293. </li>
  294. </ul>
  295. </td>
  296. </tr>
  297. </template>
  298. </table>
  299. <!-- 财务 -->
  300. <table class="table_register mt20" style="width: 100%;">
  301. <tr>
  302. <th colspan="4" class="th_title">9、从事研发活动的人员(包括外聘人员)和用于研发活动的仪器、设备、无形资产的费用分配说明(包括工作使用情况记录及费用分配计算证据材料)
  303. </th>
  304. </tr>
  305. <tr>
  306. <th>费用分配说明导入</th>
  307. <td colspan="3">
  308. <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('4')" v-if="finFlag && list4.length <= 0">上传</el-button>
  309. </td>
  310. </tr>
  311. <tr>
  312. <th>下载</th>
  313. <td colspan="3">
  314. <ul>
  315. <li v-for="(item, index) in list4" :key="index" style="margin: 2px;">
  316. <el-row :gutter="20">
  317. <el-col :span="12">
  318. <a :href="item.url">{{item.fileName}}</a>
  319. </el-col>
  320. <el-col :span="12">
  321. <el-button type="primary" icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
  322. <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="finFlag">删除</el-button>
  323. </el-col>
  324. </el-row>
  325. </li>
  326. </ul>
  327. </td>
  328. </tr>
  329. </table>
  330. <table class="table_register mt20" style="width: 100%;">
  331. <tr>
  332. <th colspan="4" class="th_title">10、集中研发项目研发费决算表、集中研发项目费用分摊明细情况表和实际分享收益比例等资料
  333. </th>
  334. </tr>
  335. <tr>
  336. <th>资料导入</th>
  337. <td colspan="3">
  338. <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('5')"v-if="finFlag && list5.length <= 0">上传</el-button>
  339. </td>
  340. </tr>
  341. <tr>
  342. <th>下载</th>
  343. <td colspan="3">
  344. <ul>
  345. <li v-for="(item, index) in list5" :key="index" style="margin: 2px;">
  346. <el-row :gutter="20">
  347. <el-col :span="12">
  348. <a :href="item.url">{{item.fileName}}</a>
  349. </el-col>
  350. <el-col :span="12">
  351. <el-button type="primary" icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
  352. <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="finFlag">删除</el-button>
  353. </el-col>
  354. </el-row>
  355. </li>
  356. </ul>
  357. </td>
  358. </tr>
  359. </table>
  360. <table class="table_register mt20" style="width: 100%;">
  361. <tr>
  362. <th colspan="4" class="th_title">11、《研发费用加计扣除优惠明细表》(a107012,选择预缴享受的企业留存备查)
  363. </th>
  364. </tr>
  365. <tr>
  366. <th>优惠明细表导入</th>
  367. <td colspan="3">
  368. <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('8')" v-if="finFlag && list8.length <= 0">上传</el-button>
  369. </td>
  370. </tr>
  371. <tr>
  372. <th>下载</th>
  373. <td colspan="3">
  374. <ul>
  375. <li v-for="(item, index) in list8" :key="index" style="margin: 2px;">
  376. <el-row :gutter="20">
  377. <el-col :span="12">
  378. <a :href="item.url">{{item.fileName}}</a>
  379. </el-col>
  380. <el-col :span="12">
  381. <el-button type="primary" icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
  382. <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="finFlag">删除</el-button>
  383. </el-col>
  384. </el-row>
  385. </li>
  386. </ul>
  387. </td>
  388. </tr>
  389. </table>
  390. </div>
  391. <template v-if="techFlag">
  392. <el-row :gutter="40">
  393. <el-col :span="24">
  394. <el-form-item style="width:100%;text-align: center;" label-width="0px" class="mt20">
  395. <el-button :loading="loading" size="medium" type="primary" @click.native.prevent="submitForm" style="width: 100px;">保存</el-button>
  396. <el-button size="medium" type="primary" style="width: 100px;" @click="cancel">取消</el-button>
  397. </el-form-item>
  398. </el-col>
  399. </el-row>
  400. </template>
  401. </el-form>
  402. <!-- 技术 -->
  403. <upload-enclosure ref="uploadEnclosure" v-if="enclosureVisible" @refreshData="getList()" :dataId="dataId" :attachType="'PROJECT'"></upload-enclosure>
  404. </div>
  405. </template>
  406. <script>
  407. import {getEnclosureApi,deleteEnclosureApi,getProjectInfoApi,downloadApi,declareUpdateApi} from '@/api/enterprise/project/project'
  408. import UploadEnclosure from './UploadEnclosure'
  409. import { getExtend, readBuffer, render } from '@/utils/util';
  410. import { parse } from 'qs';
  411. import axios from 'axios'
  412. import FileUpload from '@/components/FileUpload'
  413. import { downLoadZip } from "@/utils/zipdownload";
  414. import { booleanOptions } from "@/utils/dataFormat"
  415. export default {
  416. components: {
  417. UploadEnclosure,
  418. FileUpload
  419. },
  420. props: {
  421. type: {
  422. type: String
  423. },
  424. info: {
  425. type: Object,
  426. default: function () {
  427. return {}
  428. }
  429. }
  430. },
  431. data() {
  432. return {
  433. disabledFlag: false,
  434. form: {
  435. contractFlag: false,
  436. reportFlag: false,
  437. appraisalFlag: false
  438. },
  439. booleanOptions: booleanOptions,
  440. total: 0,
  441. enclosureVisible: false,
  442. list: [],
  443. id: this.$route.query.id,
  444. dataId: undefined,
  445. attachType: 'FINACIAL',
  446. loading: false,
  447. selectionList: [],
  448. ids: '',
  449. queryParams: {
  450. pageNum: 1,
  451. pageSize: 10
  452. },
  453. list1: [],
  454. list2: [],
  455. list3: [],
  456. list4: [],
  457. list5: [],
  458. list6: [],
  459. list7: [],
  460. list8: [],
  461. list9: [],
  462. list10: [],
  463. list11: []
  464. };
  465. },
  466. computed: {
  467. userType() {
  468. return this.$store.state.user.userType
  469. },
  470. techFlag() {
  471. let roleType = this.$store.state.user.userType
  472. return this.type != 'view' ? ['ENT_TECH', 'ADMIN', 'ENT_ADMIN'].includes(roleType) : false //判断是否为技术
  473. },
  474. finFlag() {
  475. let roleType = this.$store.state.user.userType
  476. return this.type != 'view' ? ['ENT_FIN', 'ADMIN', 'ENT_ADMIN'].includes(roleType) : false //判断是否为财务
  477. }
  478. },
  479. created() {
  480. this.id = this.$route.query.id || undefined;
  481. if(this.id) {
  482. this.getList()
  483. }
  484. if(this.finFlag) {
  485. this.disabledFlag = true
  486. }
  487. },
  488. methods: {
  489. getList() {
  490. getEnclosureApi(this.attachType,this.id).then(res => {
  491. if(res.code == 200) {
  492. this.list = res.data.records
  493. this.list1 = []
  494. this.list2 = []
  495. this.list3 = []
  496. this.list4 = []
  497. this.list5 = []
  498. this.list6 = []
  499. this.list7 = []
  500. this.list8 = []
  501. this.list9 = []
  502. this.list10 = []
  503. this.list11 = []
  504. this.list.map(item => {
  505. if(item.fileType == 'file1') {
  506. this.list1.push(item)
  507. }
  508. if(item.fileType == 'file2') {
  509. this.list2.push(item)
  510. }
  511. if(item.fileType == 'file3') {
  512. this.list3.push(item)
  513. }
  514. if(item.fileType == 'file4') {
  515. this.list4.push(item)
  516. }
  517. if(item.fileType == 'file5') {
  518. this.list5.push(item)
  519. }
  520. if(item.fileType == 'file6') {
  521. this.list6.push(item)
  522. }
  523. if(item.fileType == 'file7') {
  524. this.list7.push(item)
  525. }
  526. if(item.fileType == 'file8') {
  527. this.list8.push(item)
  528. }
  529. if(item.fileType == 'file9') {
  530. this.list9.push(item)
  531. }
  532. if(item.fileType == 'file10') {
  533. this.list10.push(item)
  534. }
  535. if(item.fileType == 'file11') {
  536. this.list11.push(item)
  537. }
  538. })
  539. this.total = res.data.total
  540. }
  541. })
  542. },
  543. handleUpload(type) {
  544. let params = {
  545. attachType: 'FINACIAL',
  546. fileType: 'file'+type,
  547. dataId: this.id
  548. }
  549. this.enclosureVisible = true
  550. this.$nextTick(() => {
  551. this.$refs.uploadEnclosure.init(params)
  552. })
  553. },
  554. /** 导出按钮操作 */
  555. // handleDownload(id) {
  556. // this.download(`/common/attach/${id}`, {
  557. // }, `附件`)
  558. // },
  559. handleDownload(id) {
  560. window.open(process.env.VUE_APP_BASE_API+`/common/attach/${id}`)
  561. },
  562. handleDownloadBatch() {
  563. let id = this.id
  564. downLoadZip(`/ent/data/download/${id}`, "加计扣除备查资料清单")
  565. this.getList();
  566. },
  567. // 从url加载
  568. handleView(row) {
  569. let routeUrl = this.$router.resolve({
  570. path: '/enclosurePreview',
  571. query: {url: row.url,fileName: row.fileName,id: row.id}
  572. });
  573. window.open(routeUrl.href, "_blank");
  574. },
  575. handleDelete(id) {
  576. this.$confirm('是否确认删除该数据?', "警告", {
  577. confirmButtonText: "确定",
  578. cancelButtonText: "取消",
  579. type: "warning"
  580. }).then(function() {
  581. return deleteEnclosureApi(id);
  582. }).then(() => {
  583. this.queryParams.pageNum = 1;
  584. this.getList();
  585. this.$modal.msgSuccess("删除成功");
  586. })
  587. },
  588. // 取消全选
  589. selectAll(selection) {
  590. if (selection.length == 0) {
  591. let list = this.selectedList.filter(item => !this.list.some(ele => ele.id === item.id));
  592. this.selectionList = list;
  593. }
  594. },
  595. handleSelectionChange(val) {
  596. this.selectionList = val;
  597. if(this.selectionList.length > 0) {
  598. let selectionIds = []
  599. for (let i = 0, len = this.selectionList.length; i < len; i++) {
  600. selectionIds.push(this.selectionList[i].id)
  601. }
  602. this.ids = selectionIds.join(',')
  603. }else {
  604. this.ids = ''
  605. }
  606. },
  607. submitForm() {
  608. declareUpdateApi(this.form).then(res => {
  609. this.$alert('保存成功', '提示', {
  610. confirmButtonText: '确定',
  611. callback: action => {
  612. this.loading = false
  613. this.$store.dispatch("tagsView/delView", this.$route);
  614. this.$router.go(-1);
  615. }
  616. })
  617. })
  618. },
  619. cancel() {
  620. this.$store.dispatch("tagsView/delView", this.$route); // 关闭当前tab
  621. this.$router.go(-1);
  622. }
  623. },
  624. watch: {
  625. info: {
  626. immediate: true,
  627. handler (obj) {
  628. if(obj) {
  629. this.form = Object.assign({}, this.form, obj)
  630. }
  631. }
  632. }
  633. }
  634. };
  635. </script>
  636. </script>
  637. <style lang="scss" scoped>
  638. </style>