FrequencyView.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  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>立项年度:{{ formData[activeRowIndex] && formData[activeRowIndex].c_lxndwt ? formData[activeRowIndex].c_lxndwt : '--' }}</div>
  16. <div>被审计镇:{{ formData[activeRowIndex] && formData[activeRowIndex].c_bsjzwt && unTownOptions && unTownOptions[formData[activeRowIndex].c_bsjzwt] ? unTownOptions[formData[activeRowIndex].c_bsjzwt] : '--' }}</div>
  17. </div>
  18. <div class="dialog_title_info">问题金额(万元):{{ formData[activeRowIndex] && formData[activeRowIndex].c_wtjewt ? formData[activeRowIndex].c_wtjewt : '--'}}</div>
  19. <div class="dialog_title">审计报告中的问题反映情况</div>
  20. <div v-for="(item, index) in dialogData" :key="index" class="dialog_table">
  21. <div>{{ item.title }}</div>
  22. <div>{{ formData[activeRowIndex] && formData[activeRowIndex][item.columnName] ? formData[activeRowIndex][item.columnName] : '--'}}</div>
  23. </div>
  24. <!-- <div class="dialog_title3"><el-button size="mini" type="primary" class="infoBut">查看疑点图斑</el-button></div> -->
  25. </div>
  26. </el-dialog>
  27. <div class="frenquency-container-inner">
  28. <div class="header">
  29. <div class="header-title">频发问题</div>
  30. <div class="header-select">
  31. <div>
  32. <div class="text">类别 :</div>
  33. <NewSelect
  34. ref="auditTypeRef"
  35. :placeholder="'请选择类别'"
  36. class="select-input"
  37. v-model="typeSelectVal"
  38. :options="typeOptions"
  39. :value="typeSelectVal"
  40. />
  41. </div>
  42. <div>
  43. <div class="text">被审计街镇 :</div>
  44. <NewSelect
  45. ref="townTypeRef"
  46. :placeholder="'请选择街镇'"
  47. class="select-input"
  48. v-model="townSelectVal"
  49. :options="townOptions"
  50. :value="townSelectVal"
  51. />
  52. </div>
  53. <div>
  54. <div class="text">立项年度 :</div>
  55. <NewSelect
  56. ref="timeRef"
  57. :placeholder="'立项年度'"
  58. class="select-input"
  59. v-model="timeSelectVal"
  60. :options="timeOptions"
  61. :value="timeSelectVal"
  62. />
  63. </div>
  64. </div>
  65. <div class="query-btn" @click="getTableData(1)">查询</div>
  66. <div class="reset-btn" @click="resetEvent">重置</div>
  67. </div>
  68. <div class="center">
  69. <el-table :data="tableData" style="width: 100%" max-height="600" @row-click="rowClick">
  70. <el-table-column type="index" width="70" align="center"> </el-table-column>
  71. <el-table-column prop="createYear" label="立项年度" width="150" align="center"> </el-table-column>
  72. <el-table-column prop="auditTown" label="被审计镇" align="center" width="180"> </el-table-column>
  73. <el-table-column prop="type" label="类别" align="center"> </el-table-column>
  74. <el-table-column prop="keyPoint" label="重点审计事项" align="center"> </el-table-column>
  75. <el-table-column prop="problemType" label="参考问题定性" align="center"> </el-table-column>
  76. <!-- <el-table-column prop="problemNature" label="问题定性" align="center">
  77. </el-table-column> -->
  78. </el-table>
  79. </div>
  80. <div class="footer">
  81. <Pagination class="pagination-style" :paginationData="paginationData" />
  82. </div>
  83. </div>
  84. </div>
  85. </template>
  86. <script>
  87. import NewSelect from "@/components/common/NewSelect.vue";
  88. import Pagination from "@/components/common/Pagination.vue";
  89. /**
  90. * 频发问题 -- 智能辅助
  91. * @author: Gao Lu
  92. * @Date: 2022.11.24
  93. */
  94. export default {
  95. name: "FrequencyDialog",
  96. components: { NewSelect, Pagination },
  97. data() {
  98. return {
  99. // 数据字典暂存对象
  100. classDictMap: {},
  101. typeSelectVal: "",
  102. typeOptions: [],
  103. townSelectVal: "",
  104. townOptions: [],
  105. timeSelectVal: "",
  106. timeOptions: [],
  107. tableData: [],
  108. currentPage: 1,
  109. currentPageSize: 10,
  110. // 整改中的查看详情弹窗状态
  111. dialogVisible: false,
  112. dialogData: [
  113. { title: "问题分类", columnName: "c_wtflwt", info: "--" },
  114. { title: "问题定性1", columnName: "c_wtdx1wt", info: "--" },
  115. { title: "问题定性2", columnName: "c_wtdx2wt", info: "--" },
  116. { title: "问题事项", columnName: "c_wtsxwt", info: "--" },
  117. { title: "使用法条", columnName: "c_syftwt", info: "--" },
  118. { title: "边审边改情况", columnName: "c_bsbgqkwt", info: "--" }
  119. ],
  120. // 暂存全部数据
  121. formData: [],
  122. // 选中的rowinxdex
  123. activeRowIndex: 0,
  124. paginationData: {
  125. pageSize: 10,
  126. pagerCount: 5,
  127. currentPage: 1,
  128. pageSizes: [5, 10, 20, 30],
  129. total: 50,
  130. currentChange: val => {
  131. this.getTableData(val);
  132. },
  133. handleSizeChange: val => {
  134. this.handleSizeChange(val);
  135. }
  136. }
  137. };
  138. },
  139. created() {
  140. this.townOptions = [];
  141. this.unTownOptions = {};
  142. this.timeOptions = [];
  143. this.typeOptions = [];
  144. // 时间选择
  145. for (let i = 1980; i <= parseInt(this.$dayjs().format("YYYY")); i++) {
  146. this.timeOptions.unshift({
  147. value: i,
  148. label: i
  149. });
  150. }
  151. // 获取数据字典中下拉框数据
  152. this.classDictQuery("0", "sj_select", "审计类别");
  153. this.classDictQuery("0", "浦东新区行政区划", "浦东新区行政区划");
  154. this.getTableData(1);
  155. },
  156. methods: {
  157. // 数据字典查询 -- 获取所需类别
  158. classDictQuery(type, cName, keyName) {
  159. let params = new FormData();
  160. params = {
  161. type: type,
  162. cName: cName
  163. };
  164. this.$Post(this.urlsCollection.selectByCNameAType, params).then(res => {
  165. if (res.code === 200 && res.content.length > 0) {
  166. this.classDictMap[keyName] = new Map();
  167. res.content.forEach(v => {
  168. this.classDictMap[keyName].set(v.index + "", v.name);
  169. });
  170. if (keyName === "浦东新区行政区划") {
  171. this.classDictMap[keyName].forEach((v, i) => {
  172. this.townOptions.push({
  173. value: i,
  174. label: v
  175. });
  176. this.unTownOptions[i]=v;
  177. });
  178. this.townOptions.unshift({
  179. value: "全部",
  180. label: "全部"
  181. });
  182. }
  183. if (keyName === "审计类别") {
  184. this.classDictMap[keyName].forEach((v, i) => {
  185. this.typeOptions.push({
  186. value: i,
  187. label: v
  188. });
  189. });
  190. }
  191. }
  192. });
  193. },
  194. resetEvent() {
  195. this.typeSelectVal = "";
  196. this.townSelectVal = "";
  197. this.timeSelectVal = "";
  198. this.$refs.auditTypeRef.imgValue = "";
  199. this.$refs.townTypeRef.imgValue = "";
  200. this.$refs.timeRef.imgValue = "";
  201. this.getTableData(1);
  202. },
  203. rowClick(row, column, event) {
  204. this.activeRowIndex = row.rowIndex - 1;
  205. this.dialogVisible = true;
  206. },
  207. handleClose() {
  208. this.dialogVisible = false;
  209. },
  210. // 切换页
  211. getTableData(val) {
  212. this.tableData = [];
  213. let searchParam = [];
  214. // 类别
  215. if (this.typeSelectVal) {
  216. let paramType = {
  217. field: "c_sjlbwt",
  218. // 等值查询
  219. searchType: "1",
  220. content: {
  221. value: this.typeSelectVal
  222. }
  223. };
  224. searchParam.push(paramType);
  225. }
  226. // 被审计街镇
  227. if (this.townSelectVal && this.townSelectVal !== "全部") {
  228. let paramTown = {
  229. field: "c_bsjzwt",
  230. // 等值查询
  231. searchType: "1",
  232. content: {
  233. value: this.townSelectVal
  234. }
  235. };
  236. searchParam.push(paramTown);
  237. }
  238. // 立项年度
  239. if (this.timeSelectVal) {
  240. let paramTime = {
  241. field: "c_lxndwt",
  242. // 等值查询
  243. searchType: "1",
  244. content: {
  245. value: this.timeSelectVal
  246. }
  247. };
  248. searchParam.push(paramTime);
  249. }
  250. let params = new FormData();
  251. params = {
  252. columnId: 1127,
  253. states: "0,1,2,3",
  254. pageSize: this.currentPageSize,
  255. page: val - 1,
  256. search: JSON.stringify(searchParam)
  257. };
  258. this.$Post(this.urlsCollection.selectContentList, params).then(res => {
  259. if (res.code === 200 && res.content.data.length > 0) {
  260. this.paginationData.currentPage = val;
  261. this.paginationData.total = res.content.count;
  262. this.formData = res.content.data;
  263. let rowIndex = 0;
  264. this.tableData = res.content.data.map(v => {
  265. rowIndex ++;
  266. return {
  267. rowIndex: rowIndex,
  268. id: v.id || "--",
  269. createYear: v.c_lxndwt || "--",
  270. // createYear: this.$dayjs(v.c_year).format("YYYY")|| "--",
  271. auditTown: this.classDictMap["浦东新区行政区划"].get(v.c_bsjzwt) || "--",
  272. type: this.classDictMap["审计类别"].get(v.c_sjlbwt) || "--",
  273. keyPoint: v.c_zdsjsxwt || "--",
  274. problemType: v.c_ckwtdxwt || "--",
  275. problemNature: v.c_wtdx1wt || "--"
  276. };
  277. });
  278. }
  279. });
  280. },
  281. // 切换条数
  282. handleSizeChange(val) {
  283. console.log(`每页 ${val} 条`);
  284. this.currentPageSize = val;
  285. this.getTableData(this.currentPage);
  286. }
  287. }
  288. };
  289. </script>
  290. <style lang="less" scoped>
  291. .frenquency-container {
  292. display: flex;
  293. align-items: center;
  294. justify-content: center;
  295. &-inner {
  296. width: 98%;
  297. height: 97%;
  298. background: rgba(0, 39, 77, 0.5);
  299. .header {
  300. height: 13%;
  301. width: 100%;
  302. position: relative;
  303. &-title {
  304. width: 84px;
  305. height: 20px;
  306. font-size: 20px;
  307. font-family: PingFang SC;
  308. font-weight: 400;
  309. color: #4dc3ff;
  310. line-height: 30px;
  311. position: absolute;
  312. top: 1px;
  313. left: 10px;
  314. }
  315. &-select {
  316. position: absolute;
  317. left: 10px;
  318. bottom: 5px;
  319. width: 900px;
  320. height: 40px;
  321. color: #e6e6e6;
  322. display: flex;
  323. justify-content: space-between;
  324. & > div {
  325. // position: absolute;
  326. display: flex;
  327. justify-content: space-around;
  328. width: 320px;
  329. .text {
  330. display: flex;
  331. align-items: center;
  332. justify-content: flex-end;
  333. width: 100px;
  334. height: 28px;
  335. }
  336. .select-input {
  337. width: 170px;
  338. }
  339. }
  340. }
  341. .reset-btn,
  342. .query-btn {
  343. width: 60px;
  344. height: 30px;
  345. border-radius: 3px;
  346. border: none;
  347. color: #fff;
  348. cursor: pointer;
  349. display: flex;
  350. align-items: center;
  351. justify-content: center;
  352. position: absolute;
  353. top: 15px;
  354. }
  355. .reset-btn {
  356. right: 30px;
  357. background: rgba(129, 140, 164, 1);
  358. }
  359. .query-btn {
  360. right: 110px;
  361. background-image: linear-gradient(to top, rgba(79, 172, 254, 1), rgba(0, 242, 254, 1));
  362. }
  363. }
  364. .center {
  365. height: 77%;
  366. width: 100%;
  367. overflow: auto;
  368. /deep/.el-table {
  369. background: rgba(0, 39, 77, 0.6);
  370. // font-size: 0.95rem;
  371. font-family: PingFang SC;
  372. font-weight: 500;
  373. thead {
  374. color: #4dc3ff;
  375. font-size: 15px;
  376. }
  377. }
  378. }
  379. .footer {
  380. height: 10%;
  381. width: 100%;
  382. position: absolute;
  383. .pagination-style {
  384. position: absolute;
  385. right: 50px;
  386. }
  387. }
  388. }
  389. }
  390. .dialog_title {
  391. font-size: 20px;
  392. font-weight: bold;
  393. color: #fff;
  394. padding-bottom: 1.5rem;
  395. &2 {
  396. font-weight: 100;
  397. font-size: 18px;
  398. color: #fff;
  399. padding-top: 1.5rem;
  400. }
  401. &3 {
  402. display: flex;
  403. justify-content: center;
  404. padding-top: 1.5rem;
  405. }
  406. &_info {
  407. display: flex;
  408. justify-content: space-between;
  409. align-items: center;
  410. font-size: 18px;
  411. font-weight: 400px;
  412. color: #dcdfe6;
  413. padding: 1rem 0;
  414. }
  415. }
  416. .dialog_table {
  417. display: flex;
  418. justify-content: space-between;
  419. div {
  420. width: 50%;
  421. text-align: center;
  422. background-color: #ffffff64 !important;
  423. margin: 1px;
  424. padding: 5px 10px;
  425. display: flex;
  426. justify-content: center;
  427. color: #dcdfe6;
  428. border: 1px solid #001d3c00;
  429. }
  430. }
  431. </style>