FrequencyView.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. <template>
  2. <div class="frenquency-container">
  3. <el-dialog
  4. custom-class="myMission"
  5. title="详细信息"
  6. :append-to-body="true"
  7. :modal="true"
  8. :visible.sync="dialogVisible"
  9. width="70%"
  10. height="60%"
  11. :before-close="handleClose"
  12. >
  13. <div>
  14. <div class="dialog_title_info">
  15. <div>
  16. 立项年度:{{
  17. formData[activeRowIndex] && formData[activeRowIndex].c_lxndwt ? formData[activeRowIndex].c_lxndwt : "--"
  18. }}
  19. </div>
  20. <div>
  21. 被审计镇:{{
  22. formData[activeRowIndex] &&
  23. formData[activeRowIndex].c_bsjzwt &&
  24. unTownOptions &&
  25. unTownOptions[formData[activeRowIndex].c_bsjzwt]
  26. ? unTownOptions[formData[activeRowIndex].c_bsjzwt]
  27. : "--"
  28. }}
  29. </div>
  30. </div>
  31. <div class="dialog_title_info">
  32. 问题金额(万元):{{
  33. formData[activeRowIndex] && formData[activeRowIndex].c_wtjewt ? formData[activeRowIndex].c_wtjewt : "--"
  34. }}
  35. </div>
  36. <div class="dialog_title">审计报告中的问题反映情况</div>
  37. <div v-for="(item, index) in dialogData" :key="index" class="dialog_table">
  38. <div>{{ item.title }}</div>
  39. <div>
  40. {{
  41. formData[activeRowIndex] && formData[activeRowIndex][item.columnName]
  42. ? formData[activeRowIndex][item.columnName]
  43. : "--"
  44. }}
  45. </div>
  46. </div>
  47. <!-- <div class="dialog_title3"><el-button size="mini" type="primary" class="infoBut">查看疑点图斑</el-button></div> -->
  48. </div>
  49. </el-dialog>
  50. <div class="frenquency-container-inner">
  51. <div class="header">
  52. <div class="header-title">历史问题</div>
  53. <!-- <div class="header-select">
  54. <div>
  55. <div class="text">类别 :</div>
  56. <NewSelect
  57. ref="auditTypeRef"
  58. :placeholder="'请选择类别'"
  59. class="select-input"
  60. v-model="typeSelectVal"
  61. :options="typeOptions"
  62. :value="typeSelectVal"
  63. />
  64. </div>
  65. <div>
  66. <div class="text">被审计街镇 :</div>
  67. <NewSelect
  68. ref="townTypeRef"
  69. :placeholder="'请选择街镇'"
  70. class="select-input"
  71. v-model="townSelectVal"
  72. :options="townOptions"
  73. :value="townSelectVal"
  74. />
  75. </div>
  76. <div>
  77. <div class="text">立项年度 :</div>
  78. <NewSelect
  79. ref="timeRef"
  80. :placeholder="'立项年度'"
  81. class="select-input"
  82. v-model="timeSelectVal"
  83. :options="timeOptions"
  84. :value="timeSelectVal"
  85. />
  86. </div>
  87. </div> -->
  88. <!-- <div class="query-btn" @click="getTableData(1)">查询</div> -->
  89. <div class="reset-btn" @click="resetEvent">重置</div>
  90. </div>
  91. <div class="center" v-if="reStart">
  92. <el-table :data="tableData" style="width: 100%" max-height="600" @row-click="rowClick">
  93. <el-table-column type="index" width="70" align="center" label="序号"> </el-table-column>
  94. <el-table-column
  95. prop="createYear"
  96. label="立项年度"
  97. width="150"
  98. align="center"
  99. :filters="filters.createYearFilters"
  100. :filter-multiple="false"
  101. :filter-method="filterMethod"
  102. >
  103. </el-table-column>
  104. <el-table-column
  105. prop="auditTown"
  106. label="被审计镇"
  107. align="center"
  108. width="180"
  109. :filters="filters.auditTownFilters"
  110. :filter-multiple="false"
  111. :filter-method="filterMethod"
  112. >
  113. </el-table-column>
  114. <el-table-column
  115. prop="type"
  116. label="类别"
  117. align="center"
  118. :filters="filters.typeFilters"
  119. :filter-multiple="false"
  120. :filter-method="filterMethod"
  121. >
  122. </el-table-column>
  123. <el-table-column
  124. prop="keyPoint"
  125. label="重点审计事项"
  126. align="center"
  127. :filters="filters.keyPointFilters"
  128. :filter-multiple="false"
  129. :filter-method="filterMethod"
  130. >
  131. </el-table-column>
  132. <el-table-column
  133. prop="problemType"
  134. label="参考问题定性"
  135. align="center"
  136. :filters="filters.problemTypeFilters"
  137. :filter-multiple="false"
  138. :filter-method="filterMethod"
  139. >
  140. </el-table-column>
  141. <!-- <el-table-column prop="problemNature" label="问题定性" align="center">
  142. </el-table-column> -->
  143. </el-table>
  144. </div>
  145. <div class="footer">
  146. <Pagination class="pagination-style" :paginationData="paginationData" />
  147. </div>
  148. </div>
  149. </div>
  150. </template>
  151. <script>
  152. import NewSelect from "@/components/common/NewSelect.vue";
  153. import Pagination from "@/components/common/Pagination.vue";
  154. /**
  155. * 历史问题 -- 智能辅助
  156. * @author: Gao Lu
  157. * @Date: 2022.11.24
  158. */
  159. export default {
  160. name: "FrequencyDialog",
  161. components: { NewSelect, Pagination },
  162. data() {
  163. return {
  164. // 数据字典暂存对象
  165. classDictMap: {},
  166. typeSelectVal: "",
  167. typeOptions: [],
  168. townSelectVal: "",
  169. townOptions: [],
  170. reStart: true,
  171. problemType: "",
  172. keyPoint: "",
  173. // 立项年度搜索框
  174. timeSelectVal: "",
  175. timeOptions: [],
  176. tableData: [],
  177. currentPage: 1,
  178. currentPageSize: 10,
  179. filters: {
  180. createYearFilters: [],
  181. auditTownFilters: [],
  182. typeFilters: [],
  183. keyPointFilters: [],
  184. problemTypeFilters: []
  185. },
  186. // 整改中的查看详情弹窗状态
  187. dialogVisible: false,
  188. dialogData: [
  189. { title: "问题分类", columnName: "c_wtflwt", info: "--" },
  190. { title: "问题定性1", columnName: "c_wtdx1wt", info: "--" },
  191. { title: "问题定性2", columnName: "c_wtdx2wt", info: "--" },
  192. { title: "问题事项", columnName: "c_wtsxwt", info: "--" },
  193. { title: "使用法条", columnName: "c_syftwt", info: "--" },
  194. { title: "边审边改情况", columnName: "c_bsbgqkwt", info: "--" }
  195. ],
  196. // 暂存全部数据
  197. formData: [],
  198. // 选中的rowinxdex
  199. activeRowIndex: 0,
  200. paginationData: {
  201. pageSize: 10,
  202. pagerCount: 5,
  203. currentPage: 1,
  204. pageSizes: [5, 10, 20, 30],
  205. total: 50,
  206. currentChange: val => {
  207. this.getTableData(val);
  208. },
  209. handleSizeChange: val => {
  210. this.handleSizeChange(val);
  211. }
  212. }
  213. };
  214. },
  215. created() {
  216. this.townOptions = [];
  217. this.unTownOptions = {};
  218. this.timeOptions = [];
  219. this.typeOptions = [];
  220. // 时间选择
  221. for (let i = 1980; i <= parseInt(this.$dayjs().format("YYYY")); i++) {
  222. this.timeOptions.unshift({
  223. value: i,
  224. label: i
  225. });
  226. }
  227. // 获取数据字典中下拉框数据
  228. this.classDictQuery("0", "sj_select", "审计类别");
  229. this.classDictQuery("0", "浦东新区行政区划", "浦东新区行政区划");
  230. this.getTableData(1);
  231. },
  232. methods: {
  233. // 数据字典查询 -- 获取所需类别
  234. classDictQuery(type, cName, keyName) {
  235. let params = new FormData();
  236. params = {
  237. type: type,
  238. cName: cName
  239. };
  240. this.$Post(this.urlsCollection.selectByCNameAType, params).then(res => {
  241. if (res.code === 200 && res.content.length > 0) {
  242. this.classDictMap[keyName] = new Map();
  243. res.content.forEach(v => {
  244. this.classDictMap[keyName].set(v.index + "", v.name);
  245. });
  246. if (keyName === "浦东新区行政区划") {
  247. this.classDictMap[keyName].forEach((v, i) => {
  248. this.townOptions.push({
  249. value: i,
  250. label: v
  251. });
  252. this.unTownOptions[i] = v;
  253. });
  254. this.townOptions.unshift({
  255. value: "全部",
  256. label: "全部"
  257. });
  258. }
  259. if (keyName === "审计类别") {
  260. this.classDictMap[keyName].forEach((v, i) => {
  261. this.typeOptions.push({
  262. value: i,
  263. label: v
  264. });
  265. });
  266. }
  267. }
  268. });
  269. },
  270. resetEvent() {
  271. this.typeSelectVal = "";
  272. this.townSelectVal = "";
  273. this.timeSelectVal = "";
  274. this.keyPoint = "";
  275. this.problemType = "";
  276. this.reStart = false;
  277. setTimeout(() => {
  278. this.reStart = true;
  279. this.getTableData(1);
  280. });
  281. },
  282. rowClick(row, column, event) {
  283. this.activeRowIndex = row.rowIndex - 1;
  284. this.dialogVisible = true;
  285. },
  286. handleClose() {
  287. this.dialogVisible = false;
  288. },
  289. filterMethod(value, row, column) {
  290. let selectState = false;
  291. // 立项年度
  292. if (column.property === "createYear" && this.timeSelectVal !== value) {
  293. selectState = true;
  294. this.timeSelectVal = Number(value);
  295. }
  296. // 被审计镇
  297. if (column.property === "auditTown" && this.townSelectVal !== value) {
  298. selectState = true;
  299. this.townSelectVal = value;
  300. }
  301. // 类别
  302. if (column.property === "type" && this.typeSelectVal !== value) {
  303. selectState = true;
  304. this.typeSelectVal = value;
  305. }
  306. // 重点审计事项
  307. if (column.property === "keyPoint" && this.keyPoint !== value) {
  308. selectState = true;
  309. this.keyPoint = value;
  310. }
  311. // 参与问题定性
  312. if (column.property === "problemType" && this.problemType !== value) {
  313. selectState = true;
  314. this.problemType = value;
  315. }
  316. if (selectState) {
  317. this.getTableData(this.paginationData.currentPage);
  318. }
  319. return true;
  320. },
  321. sortList(a, b) {
  322. return a - b;
  323. },
  324. // 切换页
  325. getTableData(val) {
  326. this.tableData = [];
  327. let searchParam = [];
  328. // 类别
  329. if (this.typeSelectVal) {
  330. let paramType = {
  331. field: "c_sjlbwt",
  332. // 等值查询
  333. searchType: "1",
  334. content: {
  335. value: this.typeSelectVal
  336. }
  337. };
  338. searchParam.push(paramType);
  339. }
  340. // 被审计街镇
  341. if (this.townSelectVal && this.townSelectVal !== "全部") {
  342. let paramTown = {
  343. field: "c_bsjzwt",
  344. // 等值查询
  345. searchType: "1",
  346. content: {
  347. value: this.townSelectVal
  348. }
  349. };
  350. searchParam.push(paramTown);
  351. }
  352. // 立项年度
  353. if (this.timeSelectVal) {
  354. let paramTime = {
  355. field: "c_lxndwt",
  356. // 等值查询
  357. searchType: "1",
  358. content: {
  359. value: this.timeSelectVal
  360. }
  361. };
  362. searchParam.push(paramTime);
  363. }
  364. if (this.keyPoint) {
  365. let paramTime = {
  366. field: "c_zdsjsxwt",
  367. // 等值查询
  368. searchType: "1",
  369. content: {
  370. value: this.keyPoint
  371. }
  372. };
  373. searchParam.push(paramTime);
  374. }
  375. if (this.problemType) {
  376. let paramTime = {
  377. field: "c_ckwtdxwt",
  378. // 等值查询
  379. searchType: "1",
  380. content: {
  381. value: this.problemType
  382. }
  383. };
  384. searchParam.push(paramTime);
  385. }
  386. let params = new FormData();
  387. params = {
  388. columnId: 1127,
  389. states: "0,1,2,3",
  390. pageSize: this.currentPageSize,
  391. page: val - 1,
  392. search: JSON.stringify(searchParam),
  393. group: "c_lxndwt,c_bsjzwt,c_sjlbwt,c_zdsjsxwt,c_ckwtdxwt"
  394. };
  395. // auditSelectContentList
  396. this.$Post(this.urlsCollection.auditSelectContentList, params).then(res => {
  397. if (res.code === 200 && res.content.data.length > 0) {
  398. this.paginationData.currentPage = val;
  399. this.paginationData.total = res.content.count;
  400. this.formData = res.content.data;
  401. this.filters = {
  402. createYearFilters: [],
  403. auditTownFilters: [],
  404. typeFilters: [],
  405. keyPointFilters: [],
  406. problemTypeFilters: []
  407. };
  408. if (res.content.select) {
  409. if (res.content.select.c_bsjzwt && res.content.select.c_bsjzwt.length > 0) {
  410. res.content.select.c_bsjzwt.forEach(item => {
  411. this.filters.auditTownFilters.push({ text: this.classDictMap["浦东新区行政区划"].get(item), value: item });
  412. });
  413. }
  414. if (res.content.select.c_lxndwt && res.content.select.c_lxndwt.length > 0) {
  415. let yearsList = [];
  416. res.content.select.c_lxndwt.forEach(item => {
  417. yearsList.push(Number(item));
  418. });
  419. for (let index = 0; index < yearsList.length; index++) {
  420. for (let index2 = index; index2 < yearsList.length; index2++) {
  421. let syearsList = yearsList[index];
  422. let eyearsList = yearsList[index2];
  423. if (syearsList > eyearsList) {
  424. yearsList[index] = eyearsList;
  425. yearsList[index2] = syearsList;
  426. }
  427. }
  428. }
  429. yearsList.forEach(item => {
  430. this.filters.createYearFilters.push({ text: Number(item), value: Number(item) });
  431. });
  432. }
  433. if (res.content.select.c_sjlbwt && res.content.select.c_sjlbwt.length > 0) {
  434. res.content.select.c_sjlbwt.forEach(item => {
  435. this.filters.typeFilters.push({ text: this.classDictMap["审计类别"].get(item), value: item });
  436. });
  437. }
  438. if (res.content.select.c_ckwtdxwt && res.content.select.c_ckwtdxwt.length > 0) {
  439. res.content.select.c_ckwtdxwt.forEach(item => {
  440. this.filters.problemTypeFilters.push({ text: item, value: item });
  441. });
  442. }
  443. if (res.content.select.c_zdsjsxwt && res.content.select.c_zdsjsxwt.length > 0) {
  444. res.content.select.c_zdsjsxwt.forEach(item => {
  445. this.filters.keyPointFilters.push({ text: item, value: item });
  446. });
  447. }
  448. }
  449. let rowIndex = 0;
  450. this.tableData = res.content.data.map(v => {
  451. rowIndex++;
  452. return {
  453. rowIndex: rowIndex,
  454. id: v.id || "--",
  455. createYear: v.c_lxndwt || "--",
  456. // createYear: this.$dayjs(v.c_year).format("YYYY")|| "--",
  457. auditTown: this.classDictMap["浦东新区行政区划"].get(v.c_bsjzwt) || "--",
  458. type: this.classDictMap["审计类别"].get(v.c_sjlbwt) || "--",
  459. keyPoint: v.c_zdsjsxwt || "--",
  460. problemType: v.c_ckwtdxwt || "--",
  461. problemNature: v.c_wtdx1wt || "--"
  462. };
  463. });
  464. }
  465. });
  466. },
  467. // 切换条数
  468. handleSizeChange(val) {
  469. console.log(`每页 ${val} 条`);
  470. this.currentPageSize = val;
  471. this.getTableData(this.currentPage);
  472. }
  473. }
  474. };
  475. </script>
  476. <style lang="less" scoped>
  477. .frenquency-container {
  478. display: flex;
  479. align-items: center;
  480. justify-content: center;
  481. &-inner {
  482. width: 98%;
  483. height: 97%;
  484. background: rgba(0, 39, 77, 0.5);
  485. .header {
  486. height: 13%;
  487. width: 100%;
  488. position: relative;
  489. &-title {
  490. width: 84px;
  491. height: 20px;
  492. font-size: 20px;
  493. font-family: PingFang SC;
  494. font-weight: 400;
  495. color: #4dc3ff;
  496. line-height: 30px;
  497. position: absolute;
  498. top: 1px;
  499. left: 10px;
  500. }
  501. &-select {
  502. position: absolute;
  503. left: 10px;
  504. bottom: 5px;
  505. width: 900px;
  506. height: 40px;
  507. color: #e6e6e6;
  508. display: flex;
  509. justify-content: space-between;
  510. & > div {
  511. // position: absolute;
  512. display: flex;
  513. justify-content: space-around;
  514. width: 320px;
  515. .text {
  516. display: flex;
  517. align-items: center;
  518. justify-content: flex-end;
  519. width: 100px;
  520. height: 28px;
  521. }
  522. .select-input {
  523. width: 170px;
  524. }
  525. }
  526. }
  527. .reset-btn,
  528. .query-btn {
  529. width: 60px;
  530. height: 30px;
  531. border-radius: 3px;
  532. border: none;
  533. color: #fff;
  534. cursor: pointer;
  535. display: flex;
  536. align-items: center;
  537. justify-content: center;
  538. position: absolute;
  539. top: 15px;
  540. }
  541. .reset-btn {
  542. right: 30px;
  543. background: rgba(129, 140, 164, 1);
  544. }
  545. .query-btn {
  546. right: 110px;
  547. background-image: linear-gradient(to top, rgba(79, 172, 254, 1), rgba(0, 242, 254, 1));
  548. }
  549. }
  550. .center {
  551. height: 77%;
  552. width: 100%;
  553. overflow: auto;
  554. /deep/.el-table {
  555. background: rgba(0, 39, 77, 0.6);
  556. // font-size: 0.95rem;
  557. font-family: PingFang SC;
  558. font-weight: 500;
  559. thead {
  560. color: #4dc3ff;
  561. font-size: 15px;
  562. }
  563. }
  564. }
  565. .footer {
  566. height: 10%;
  567. width: 100%;
  568. position: absolute;
  569. .pagination-style {
  570. position: absolute;
  571. right: 50px;
  572. }
  573. }
  574. }
  575. }
  576. .dialog_title {
  577. font-size: 20px;
  578. font-weight: bold;
  579. color: #fff;
  580. padding-bottom: 1.5rem;
  581. &2 {
  582. font-weight: 100;
  583. font-size: 18px;
  584. color: #fff;
  585. padding-top: 1.5rem;
  586. }
  587. &3 {
  588. display: flex;
  589. justify-content: center;
  590. padding-top: 1.5rem;
  591. }
  592. &_info {
  593. display: flex;
  594. justify-content: space-between;
  595. align-items: center;
  596. font-size: 18px;
  597. font-weight: 400px;
  598. color: #dcdfe6;
  599. padding: 1rem 0;
  600. }
  601. }
  602. .dialog_table {
  603. display: flex;
  604. justify-content: space-between;
  605. div {
  606. width: 50%;
  607. text-align: center;
  608. background-color: #00000064 !important;
  609. margin: 1px;
  610. padding: 5px 10px;
  611. display: flex;
  612. justify-content: center;
  613. color: #dcdfe6;
  614. border: 1px solid #001d3c00;
  615. }
  616. }
  617. </style>