pblmTable_over.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. <template>
  2. <div id="">
  3. <a-table
  4. ref="pblmDataTable"
  5. :row-selection="{
  6. columnWidth: 60,
  7. selectedRowKeys: selectedRowKeys,
  8. onChange: handleSelectionChange
  9. }"
  10. :columns="columns"
  11. :data-source="tableSetting.data"
  12. :rowClassName="tableRowClassName"
  13. :loading="loading"
  14. :pagination="false"
  15. row-key="id"
  16. style="width: 100%;"
  17. :style="{height: height + 'px'}"
  18. class="mainTable"
  19. :scroll="{x: 'max-content', y: height - 60}"
  20. bordered>
  21. <template #bodyCell="{ column, record }">
  22. <template v-if="column.dataIndex === 'fileNoNumber'">
  23. <span style="position: relative;">
  24. <span>{{ record.fileNoNumber }}</span>
  25. </span>
  26. </template>
  27. <template v-else-if="column.dataIndex === 'inspPblmDesc'">
  28. <a-tooltip placement="top">
  29. <template #title>
  30. <span>{{ record.inspPblmDesc }}</span>
  31. </template>
  32. <span class="ellipsis200">{{ record.inspPblmDesc }}</span>
  33. </a-tooltip>
  34. </template>
  35. <template v-else-if="column.dataIndex === 'nm'">
  36. <a-tooltip placement="top">
  37. <template #title>
  38. <span>{{ record.nm }}</span>
  39. </template>
  40. <span class="ellipsis100">{{ record.nm }}</span>
  41. </a-tooltip>
  42. </template>
  43. <template v-else-if="column.dataIndex === 'pblmSource'">
  44. <a-tooltip placement="top">
  45. <template #title>
  46. <span>{{ record.pblmSource }}</span>
  47. </template>
  48. <span class="ellipsis200">{{ record.pblmSource }}</span>
  49. </a-tooltip>
  50. </template>
  51. <template v-else-if="column.dataIndex === 'zgMemo'">
  52. <a-tooltip placement="top">
  53. <template #title>
  54. <span>{{ record.zgMemo }}</span>
  55. </template>
  56. <span class="ellipsis200">{{ record.zgMemo }}</span>
  57. </a-tooltip>
  58. </template>
  59. <template v-else-if="column.dataIndex === 'dutyDept'">
  60. <a-tooltip placement="top">
  61. <template #title>
  62. <span>{{ record.dutyDept }}</span>
  63. </template>
  64. <span class="ellipsis200">{{ record.dutyDept }}</span>
  65. </a-tooltip>
  66. </template>
  67. <template v-else-if="column.dataIndex === 'objType'">
  68. <a-tooltip placement="top">
  69. <template #title>
  70. <span>{{ record.objType }}</span>
  71. </template>
  72. <span class="ellipsis200">{{ record.objType }}</span>
  73. </a-tooltip>
  74. </template>
  75. <template v-else-if="column.dataIndex === 'zgNotes'">
  76. <a-tooltip placement="top">
  77. <template #title>
  78. <span>{{ record.zgNotes }}</span>
  79. </template>
  80. <span class="ellipsis250">{{ record.zgNotes }}</span>
  81. </a-tooltip>
  82. </template>
  83. <template v-else-if="column.dataIndex === 'reviewStatus'">
  84. <a-tooltip placement="top">
  85. <template #title>
  86. <span>{{ record.reviewStatus }}</span>
  87. </template>
  88. <span class="ellipsis200">{{ record.reviewStatus }}</span>
  89. </a-tooltip>
  90. </template>
  91. <template v-else-if="column.dataIndex === 'reviewTm'">
  92. <a-tooltip placement="top">
  93. <template #title>
  94. <span>{{ record.reviewTm }}</span>
  95. </template>
  96. <span class="ellipsis200">{{ record.reviewTm }}</span>
  97. </a-tooltip>
  98. </template>
  99. <template v-else-if="column.dataIndex === 'action'">
  100. <a-button @click.stop="showPblmDetailDialog(record)" type="link">查看</a-button>
  101. <a-button @click.stop="handleAppeal(record.id,record.stat)" type="link">申诉</a-button>
  102. </template>
  103. </template>
  104. </a-table>
  105. <a-pagination
  106. show-size-changer
  107. :pageSize="tableSetting.pagination.pageSize"
  108. @update:pageSize="val => { tableSetting.pagination.pageSize = val }"
  109. :total="tableSetting.pagination.pblmCount"
  110. :page-size-options="['10','20','50','100']"
  111. :show-total="total => `共${total}条`"
  112. @showSizeChange="handleSizeChange"
  113. @change="handlePageNumChange"
  114. style="margin-top: 35px;"
  115. />
  116. <a-modal
  117. v-model:visible="changeSupervisionVisible"
  118. v-if="changeSupervisionVisible"
  119. width="90%"
  120. @cancel="closeModal"
  121. @after-close="closeModal"
  122. title="整改问题查看"
  123. class="outerDialog custom_dialog">
  124. <cqsssh v-if="changeSupervisionVisible" :isNotShow="true" :msgNo="curRow.id" :isModel="true" @closeModel="closeModel"></cqsssh>
  125. </a-modal>
  126. <a-modal
  127. title="超期整改申诉"
  128. v-model:visible="showAppeal"
  129. @ok="submitAppeal"
  130. @cancel="showAppeal = false"
  131. width="50%"
  132. :confirm-loading="confirmLoading">
  133. <a-form :model="appealForm" ref="appealRef" :label-col="{span: 6}" :wrapper-col="{span: 18}" :rules="rules">
  134. <a-form-item label="申诉说明" prop="appealContent">
  135. <a-input v-model:value="appealForm.appealContent" type="textarea" autocomplete="off" placeholder="申诉说明" allow-clear/>
  136. </a-form-item>
  137. <a-form-item label="申诉附件">
  138. <a-upload-dragger
  139. name="file"
  140. :multiple="true"
  141. :file-list="fileList"
  142. :action="appealUrl"
  143. :show-upload-list="true"
  144. @change="handleChange"
  145. >
  146. <p class="ant-upload-drag-icon">
  147. <a-icon type="plus-square" />
  148. </p>
  149. <p>把文件拖入指定区域,完成上传,同样支持点击上传。</p>
  150. </a-upload-dragger>
  151. </a-form-item>
  152. <a-form-item label="附件">
  153. <a-table
  154. bordered
  155. :data-source="fileArray"
  156. :columns="columns4"
  157. style="width: 100%;margin: 0 auto;">
  158. <template #bodyCell="{ column, record, index }">
  159. <template v-if="column.dataIndex === 'action'">
  160. <a-button size="small" @click="removeFile(record.id, index)" type="danger">删除</a-button>
  161. <a-button size="small" @click="downloadFile(record.id,record.fileName)">下载</a-button>
  162. </template>
  163. </template>
  164. </a-table>
  165. </a-form-item>
  166. </a-form>
  167. </a-modal>
  168. </div>
  169. </template>
  170. <script>
  171. import moment from 'moment';
  172. import { deleteFileById } from '@/api/duChaAPI';
  173. import request from '@/utils/gw_ajax_request';
  174. import pblmRectifyTimeLine from '@/views/PblmRectify/Components/pblmRectifyTimeLine.vue';
  175. import pblmRectifyTimeLineOver from '@/views/PblmRectify/Components/pblmRectifyTimeLineOver.vue';
  176. import upload from '@/widgets/uploadFile.vue';
  177. import { formatDateTime2 } from '../../../utils/gw_date';
  178. import pblmMonthlyReport from '../../PblmRectifyMonthlyReport/Components/pblmMonthlyReport.vue';
  179. import {
  180. distributePblmToSjdw,
  181. formatWorkflowStat,
  182. savePblmDelayInfo,
  183. savePblmRectifyInfo,
  184. savePblmRectifyInfoX,
  185. } from '../Common/rectify_api';
  186. import { formatDeadLineDate } from '../Common/rectify_date';
  187. import cqsssh from './cqsssh.vue';
  188. import pblmDelayInfo from './pblmDelayInfo.vue';
  189. import pblmDetail from './pblmDetail.vue';
  190. import pblmRectifyEdit from './pblmRectifyEdit.vue';
  191. import pblmRectifyInfo from './pblmRectifyInfo.vue';
  192. export default {
  193. props: {
  194. pblmTableSetting: {
  195. type: Object,
  196. default: () => {
  197. return {
  198. currentFllow: '',
  199. isYwcs: false,
  200. isJc: false,
  201. isShowBtn: false,
  202. isEditVisible: '',
  203. adType: '',
  204. cType: '',
  205. data: [], // 主数据源
  206. pagination: {
  207. pageSize: 10,
  208. pageNum: 1,
  209. pblmCount: 0,
  210. }, // 翻页相关配置项
  211. height: 470,
  212. currentPblmId: '', // 当前选中的问题的ID
  213. currentPblmFileNoNumber: '', // 当前选中的问题的编号
  214. currentPblmWorkflowStat: '', // 当前选中的问题的流程状态
  215. selectedPblms: [], // 多选模式下选中的所有问题集合
  216. multiSelect: true, // 是否出现行复选框
  217. enablePblmRectifyInfo: false, // 是否在操作栏显示输入整改信息按钮
  218. showWorkflowStat: true, // 是否显示整改状态,默认显示
  219. enableMonthlyReport: false,
  220. isZGZWTBtn: false,
  221. ifChao: null,
  222. };
  223. },
  224. },
  225. isJdcjbr: {
  226. type: Boolean,
  227. default: false,
  228. },
  229. isGDXH: {
  230. type: Boolean,
  231. default: false,
  232. },
  233. },
  234. data() {
  235. return {
  236. showAppeal: false,
  237. confirmLoading: false,
  238. appealForm: {
  239. appealContent: '',
  240. },
  241. fileList: [],
  242. bizId: '',
  243. rules: {
  244. appealContent: [
  245. { required: true, message: '申诉说明不能为空', trigger: 'change' },
  246. ],
  247. },
  248. fileArray: [],
  249. currentId: '',
  250. columns4: [
  251. {
  252. title: '文件名',
  253. dataIndex: 'fileName',
  254. align: 'center',
  255. },
  256. {
  257. title: '操作',
  258. dataIndex: 'action',
  259. align: 'center',
  260. },
  261. ],
  262. moment,
  263. curRow: {},
  264. curData: {},
  265. showEdit: false,
  266. showPblmDetail: false, // 是否显示问题详情
  267. showPblmRectifyInfo: false, // 是否显示整改内容输入窗体
  268. showPblmDelayInfo: false, // 是否显示整改内容输入窗体
  269. showPblmMonthlyReportDialog: false, // 是否显示整改进度月报输入窗体
  270. tableSetting: this.pblmTableSetting,
  271. height: window.innerHeight - 400,
  272. loading: false,
  273. selectedRowKeys: [],
  274. columns: [
  275. {
  276. title: '问题编码',
  277. dataIndex: 'fileNoNumber',
  278. width: 80,
  279. fixed: 'left',
  280. align: 'center',
  281. },
  282. {
  283. title: '问题',
  284. dataIndex: 'inspPblmDesc',
  285. width: 200,
  286. fixed: 'left',
  287. align: 'center',
  288. },
  289. {
  290. title: '工程名称',
  291. dataIndex: 'nm',
  292. width: 100,
  293. fixed: 'left',
  294. align: 'center',
  295. },
  296. {
  297. title: '问题来源',
  298. dataIndex: 'pblmSource',
  299. width: 200,
  300. fixed: 'left',
  301. align: 'center',
  302. },
  303. {
  304. title: '问题印发文件名',
  305. dataIndex: 'zgMemo',
  306. width: 200,
  307. align: 'center',
  308. },
  309. {
  310. title: '县(市、区)',
  311. dataIndex: 'adName',
  312. width: 120,
  313. align: 'center',
  314. },
  315. {
  316. title: '设区市/直管县',
  317. dataIndex: 'upAdName',
  318. width: 120,
  319. align: 'center',
  320. },
  321. {
  322. title: '责任处室',
  323. dataIndex: 'dutyDept',
  324. width: 200,
  325. align: 'center',
  326. },
  327. {
  328. title: '问题归类',
  329. dataIndex: 'objType',
  330. width: 200,
  331. align: 'center',
  332. },
  333. {
  334. title: '超期记录',
  335. dataIndex: 'zgNotes',
  336. width: 250,
  337. align: 'center',
  338. },
  339. {
  340. title: '申述审核状态',
  341. dataIndex: 'reviewStatus',
  342. width: 200,
  343. align: 'center',
  344. },
  345. {
  346. title: '审核日期',
  347. dataIndex: 'reviewTm',
  348. width: 200,
  349. align: 'center',
  350. },
  351. {
  352. title: '申诉通道',
  353. dataIndex: 'ifOpen',
  354. width: 100,
  355. align: 'center',
  356. },
  357. {
  358. title: '操作',
  359. dataIndex: 'action',
  360. width: 200,
  361. align: 'center',
  362. fixed: 'right',
  363. },
  364. ],
  365. readOnlyRole: localStorage.getItem('readOnlyRole'),
  366. changeSupervisionVisible: false,
  367. };
  368. },
  369. components: {
  370. upload,
  371. pblmRectifyTimeLine,
  372. pblmRectifyTimeLineOver,
  373. pblmDetail,
  374. pblmRectifyInfo,
  375. pblmDelayInfo,
  376. pblmRectifyEdit,
  377. pblmMonthlyReportInfo: pblmMonthlyReport,
  378. cqsssh,
  379. },
  380. computed: {
  381. formatDateTime() {
  382. return formatDateTime2;
  383. },
  384. formatDeadLineDate() {
  385. return formatDeadLineDate;
  386. },
  387. formatWorkflowStat() {
  388. return formatWorkflowStat;
  389. },
  390. appealUrl() {
  391. return process.env.NODE_ENV === 'development'
  392. ? `/pdcApi/file/insert?bizId=${this.bizId}&bizType=2`
  393. : `/modular-dev-source/7446637943aa4c50b5d69c814517fca0/pdcApi/file/insert?bizId=${this.bizId}&bizType=2`;
  394. },
  395. },
  396. created() {
  397. console.log(this.isJdcjbr, 'isJdcjbr');
  398. if (typeof this.pblmTableSetting.showWorkflowStat === undefined) {
  399. this.pblmTableSetting.showWorkflowStat = true;
  400. }
  401. },
  402. methods: {
  403. clearSelection() {
  404. this.selectedRowKeys = [];
  405. this.tableSetting.selectedPblms = [];
  406. },
  407. closeModel() {
  408. this.changeSupervisionVisible = false;
  409. },
  410. downloadFile(downloadFiles, fileName) {
  411. request
  412. .get(`file/downFile/` + downloadFiles, { responseType: 'arraybuffer' })
  413. .then((res) => {
  414. const blob = new Blob([res], { type: 'application/vnd.ms-excel' });
  415. const objectUrl = URL.createObjectURL(blob);
  416. // window.location.href = objectUrl;
  417. const link = document.createElement('a');
  418. link.href = objectUrl;
  419. link.download = fileName; // 文件名
  420. link.click(); // 下载文件
  421. URL.revokeObjectURL(objectUrl); // 释放内存
  422. });
  423. },
  424. removeFile(id, index) {
  425. this.$confirm({
  426. title: '提示',
  427. content: '此操作将永久删除该文件, 是否继续?',
  428. okType: 'warning',
  429. onOk: () => {
  430. deleteFileById(id, this.userId).then((res) => {
  431. if (res.success) {
  432. this.getFileList(this.currentId);
  433. } else {
  434. this.failInfo();
  435. }
  436. });
  437. },
  438. });
  439. },
  440. handleChange(info) {
  441. this.fileList = info.fileList;
  442. const status = info.file.status;
  443. if (status === 'done') {
  444. this.$message.success(`${info.file.name}上传成功!`);
  445. } else if (status === 'error') {
  446. this.$message.error(`${info.file.name}上传失败,请联系管理员!`);
  447. }
  448. },
  449. handleAppeal(id, stat) {
  450. if (stat == '1') {
  451. return this.$message.info('正在申诉中...');
  452. } else if (stat == '3') {
  453. return this.$message.info('申诉通道已被监督处关闭,无法申诉!');
  454. }
  455. this.bizId = id;
  456. this.showAppeal = true;
  457. this.getFileList(id);
  458. },
  459. getFileList(id) {
  460. const params = {
  461. id,
  462. };
  463. this.currentId = id;
  464. request
  465. .post(`/bis/insp/BisInspZgPblmRecord/getAuditListInfo`, params)
  466. .then((res) => {
  467. this.fileArray = res.data.gwComFiles;
  468. });
  469. },
  470. submitAppeal() {
  471. this.$refs.appealRef.validate((valid) => {
  472. if (valid) {
  473. this.confirmLoading = true;
  474. const params = {
  475. id: this.bizId,
  476. appealContent: this.appealForm.appealContent,
  477. };
  478. request
  479. .post(`/bis/insp/BisInspZgPblmRecord/overdueStatementAudit`, params)
  480. .then((res) => {
  481. if (res.success) {
  482. this.confirmLoading = false;
  483. this.$message.success('申诉成功!');
  484. this.appealForm.appealContent = '';
  485. this.showAppeal = false;
  486. this.fileList = [];
  487. } else {
  488. this.$message.warning(res.message);
  489. }
  490. });
  491. } else {
  492. return false;
  493. }
  494. });
  495. },
  496. tableRowClassName(record) {
  497. if (record.isJcFlow == '1') {
  498. return 'success-jcflow';
  499. }
  500. return '';
  501. },
  502. handleSizeChange(current, size) {
  503. this.tableSetting.pagination.pageSize = size;
  504. // 触发父组件更新主数据源数据(主要将分页信息传回)
  505. this.$emit('sizeChange', {
  506. pageSize: this.tableSetting.pagination.pageSize,
  507. });
  508. },
  509. handleSelectionChange(val, row) {
  510. this.selectedRowKeys = val;
  511. this.tableSetting.selectedPblms = row;
  512. this.$emit('selectionChange', {
  513. selectedPblms: this.tableSetting.selectedPblms,
  514. });
  515. },
  516. handlePageNumChange(item) {
  517. this.tableSetting.pagination.pageNum = item;
  518. // 触发父组件更新主数据源数据(主要将分页信息传回)
  519. this.$emit('pageChange', {
  520. pageNum: this.tableSetting.pagination.pageNum,
  521. });
  522. },
  523. closePblmDetailDialog(id) {
  524. this.tableSetting.currentPblmId = '';
  525. this.tableSetting.currentPblmWorkflowStat = '';
  526. this.showPblmDetail = false;
  527. },
  528. showPblmDetailDialog(row) {
  529. this.changeSupervisionVisible = true;
  530. this.curRow = row;
  531. },
  532. closeModal() {
  533. this.changeSupervisionVisible = false;
  534. },
  535. },
  536. };
  537. </script>
  538. <style lang='less' scoped>
  539. :deep(.ant-table-pagination ) {
  540. float: left;
  541. }
  542. /deep/ .ant-table-thead>tr>th,
  543. /deep/ .ant-table-tbody>tr>td {
  544. padding: 0;
  545. height: 45px;
  546. }
  547. .ellipsis200 {
  548. display: block;
  549. width: 198px;
  550. text-overflow: ellipsis;
  551. white-space: nowrap;
  552. overflow: hidden;
  553. }
  554. .ellipsis100 {
  555. display: block;
  556. width: 98px;
  557. text-overflow: ellipsis;
  558. white-space: nowrap;
  559. overflow: hidden;
  560. }
  561. .ellipsis120 {
  562. display: block;
  563. width: 118px;
  564. text-overflow: ellipsis;
  565. white-space: nowrap;
  566. overflow: hidden;
  567. }
  568. .ellipsis250 {
  569. display: block;
  570. width: 248px;
  571. text-overflow: ellipsis;
  572. white-space: nowrap;
  573. overflow: hidden;
  574. }
  575. :deep(.success-jcflow ) {
  576. background: #bbf5ff !important;
  577. }
  578. :deep(.ant-table-scroll ) {
  579. position: relative;
  580. z-index: 1;
  581. }
  582. /deep/.ant-table-fixed-left,
  583. :deep(.ant-table-fixed-right ) {
  584. z-index: 2;
  585. }
  586. .overFlow {
  587. width: 15px;
  588. height: 15px;
  589. position: absolute;
  590. z-index: 100000;
  591. top: 15px;
  592. left: -20px;
  593. opacity: 0;
  594. }
  595. .overFlow:hover {
  596. opacity: 1;
  597. }
  598. </style>