iam-audit-dsc-top-div.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. <template>
  2. <a-row>
  3. <a-col
  4. v-for="(one, index) in ['sjdws', 'fgl', 'sjwts', 'yzgwt', 'zgzwt', 'wtje']"
  5. :key="one"
  6. :span="4"
  7. :class="one + '-col'"
  8. >
  9. <div :class="$style.mainDiv" @click="fnOpenModel(one)">
  10. <div :class="$style.leftDiv">
  11. <span :class="$style.cardtitle">
  12. <span :class="$style.number">{{ number[index] }}</span>
  13. <br />
  14. <span :class="$style.title">{{ title[index] }}</span>
  15. </span>
  16. </div>
  17. <div :class="$style.rightDiv">
  18. <!-- <a-avatar :style="{ backgroundColor: bgcolor[index] }" :class="$style.avatar" :size="65">
  19. <template v-slot:icon>
  20. <sd-icon
  21. :style="{
  22. marginLeft: index === 0 ? '5px' : '0px',
  23. marginTop: index === 3 ? '20px' : '0px',
  24. }"
  25. :type="icon[index]"
  26. theme="fill"
  27. >
  28. </sd-icon>
  29. </template>
  30. </a-avatar> -->
  31. </div>
  32. </div>
  33. </a-col>
  34. </a-row>
  35. </template>
  36. <script>
  37. import axios from '@/common/services/axios-instance'
  38. import iamAuditDscService from './iam-audit-dsc-service'
  39. import components from './_import-components/iam-audit-dsc-top-div-import'
  40. export default {
  41. name: 'IamAuditDscTopDiv',
  42. metaInfo: {
  43. title: 'IamAuditTopDiv',
  44. },
  45. components,
  46. props: {
  47. /**
  48. * 统计的组织ID
  49. */
  50. unidId: {
  51. type: Array,
  52. default: () => {
  53. return []
  54. },
  55. },
  56. /**
  57. * 统计的年份
  58. */
  59. planYear: {
  60. type: String,
  61. default: null,
  62. },
  63. },
  64. data() {
  65. return {
  66. icon: [
  67. 'sd-audit-dsc-user-icon',
  68. 'sd-audit-dsc-project-all-icon',
  69. 'sd-audit-dsc-project-start-icon',
  70. 'sd-audit-dsc-gzdg-icon',
  71. 'sd-audit-dsc-find-icon',
  72. 'sd-audit-dsc-rectify-icon',
  73. ],
  74. title: [
  75. '本年度审计项目数',
  76. '近4年度审计覆盖率',
  77. '审计问题发现数量',
  78. '到期整改的问题数量',
  79. '整改中问题数量',
  80. '问题涉及金额(万元)',
  81. ],
  82. bgcolor: ['#bb7ec4', '#ffb648', '#ff4a55', '#00a389', '#54c5eb', '#bb7ec4'],
  83. number: [],
  84. }
  85. },
  86. computed: {
  87. // 因为props传值不会自动更新,使用计算值
  88. selectYear() {
  89. return this.planYear
  90. },
  91. // 因为props传值不会自动更新,使用计算值
  92. selectUnidId() {
  93. if (this.unidId.length > 0) {
  94. return this.unidId[0].id
  95. } else {
  96. return null
  97. }
  98. },
  99. // 因为props传值不会自动更新,使用计算值
  100. selectUnidText() {
  101. if (this.unidId.length > 0) {
  102. return this.unidId[0].name
  103. } else {
  104. return null
  105. }
  106. },
  107. },
  108. watch: {
  109. // 年份和组织变化时,重新加载数据
  110. selectYear() {
  111. this.getData()
  112. },
  113. selectUnidId() {
  114. this.getData()
  115. },
  116. },
  117. created() {
  118. // 创建时获取内容
  119. this.getData()
  120. },
  121. methods: {
  122. /**
  123. * 打开对应的模块
  124. */
  125. fnOpenModel(type) {
  126. debugger
  127. // 审计单位数量
  128. if (type === 'sjdws') {
  129. window.open(
  130. '#/spic-audit-dsc-unit-list?params={"unitNames":"\'' +
  131. this.selectUnidText +
  132. '\'","planYear":"' +
  133. this.selectYear +
  134. '","type":"unit","unitId":"' +
  135. this.selectUnidId +
  136. '"}&type=auditedunitlist'
  137. )
  138. }
  139. // 近四年审计单位覆盖率
  140. if (type === 'fgl') {
  141. window.open(
  142. '#/spic-audit-dsc-coverage-list?params={"unitNames":"\'' +
  143. this.selectUnidText +
  144. '\'","planYear":"' +
  145. this.selectYear +
  146. '","type":"fourunit","isTwoUnit":"0","unitId":"' +
  147. this.selectUnidId +
  148. '"}&type=fourYearCoverage' +
  149. '&year=' +
  150. this.selectYear
  151. )
  152. }
  153. // 审计发现问题数
  154. if (type === 'sjwts') {
  155. const param = {}
  156. param.unitId = this.selectUnidId
  157. param.planYear = this.selectYear
  158. window.open(
  159. '#/spic-audit-dsc-find-list?params=' +
  160. encodeURIComponent(JSON.stringify(param)) +
  161. '&type=findqusetionlist'
  162. )
  163. }
  164. // 已整改问题数
  165. if (type === 'yzgwt') {
  166. window.open(
  167. '#/spic-audit-dsc-rectify-list?params={"unitNames":"\'' +
  168. this.selectUnidText +
  169. '\'","planYear":"' +
  170. this.selectYear +
  171. '","type":"rect","unitId":"' +
  172. this.selectUnidId +
  173. '"}&type=rectlist'
  174. )
  175. }
  176. // 已整改问题数
  177. if (type === 'zgzwt') {
  178. window.open(
  179. '#/spic-audit-dsc-rectify-list?params={"unitNames":"\'' +
  180. this.selectUnidText +
  181. '\'","planYear":"' +
  182. this.selectYear +
  183. '","type":"recting","unitId":"' +
  184. this.selectUnidId +
  185. '"}&type=rectinglist'
  186. )
  187. }
  188. // 审计发现
  189. // if (type === 'sjfx') {
  190. // window.open(
  191. // '#/iam-audit-dsc-find-list?params={"unitNames":"\'' +
  192. // this.selectUnidText +
  193. // '\'","dateStart":"' +
  194. // this.selectYear +
  195. // '","dimension":"decision","unitIds":"' +
  196. // this.selectUnidId +
  197. // '"}&type=projectlist'
  198. // )
  199. // }
  200. // 已整改问题数量
  201. if (type === 'wtje') {
  202. window.open(
  203. '#/spic-audit-dsc-find-list?params={"unitNames":"\'' +
  204. this.selectUnidText +
  205. '\'","planYear":"' +
  206. this.selectYear +
  207. '","unitId":"' +
  208. this.selectUnidId +
  209. '"}&type=amountlist'
  210. )
  211. }
  212. },
  213. /**
  214. * 初始化数据
  215. */
  216. getData() {
  217. this.number = []
  218. // 获取整体数量
  219. const params = {
  220. unitId: this.selectUnidId,
  221. planYear: this.selectYear,
  222. type: 0,
  223. }
  224. if (this.selectUnidId) {
  225. iamAuditDscService.getAllNumResult(params).then((res) => {
  226. // 按顺序将内容写入
  227. const data = res.data
  228. console.log('顶部总体数量数据', data)
  229. // 本年度单位审计数量
  230. this.number.push(data.UNIT_NUM)
  231. // 近4年度审计覆盖率(待定)
  232. this.number.push(data.PERCENT)
  233. // 审计问题发现数
  234. this.number.push(data.FIND_NUM)
  235. // 已整改的问题数
  236. this.number.push(data.RECT_NUM)
  237. // 整改中的问题数
  238. this.number.push(data.RECTING_NUM)
  239. // 问题涉及金额
  240. this.number.push(data.AMOUNT)
  241. })
  242. // 问题涉及金额接口
  243. // iamAuditDscService.getAuditFindMoneyList(params).then((res) => {
  244. // const data = res.data
  245. // console.log(data)
  246. // })
  247. // 整改情况接口
  248. // iamAuditDscService.getQuestionRectResult(params).then((res) => {
  249. // const data = res.data
  250. // console.log(data)
  251. // })
  252. // 审计问题数(柱状图)接口
  253. // iamAuditDscService.findQuestionNumQuery(params).then((res) => {
  254. // const data = res.data
  255. // console.log(data)
  256. // })
  257. }
  258. },
  259. },
  260. }
  261. </script>
  262. <style module lang="scss">
  263. @use '@/common/design' as *;
  264. .main-div {
  265. display: flex;
  266. height: 105px;
  267. margin: 0 10px;
  268. cursor: pointer;
  269. background: #fff;
  270. border-radius: 10px;
  271. .left-div {
  272. width: 70%;
  273. padding-left: 22px;
  274. color: #fff;
  275. .title {
  276. height: 45%;
  277. text-align: left;
  278. font-weight: 600;
  279. // line-height: 60px;
  280. }
  281. .number {
  282. text-align: center;
  283. height: 35%;
  284. font-size: 40px;
  285. font-weight: 600;
  286. line-height: 60px;
  287. }
  288. .cardtitle {
  289. text-align: center;
  290. display: inline-block;
  291. }
  292. }
  293. .right-div {
  294. width: 30%;
  295. .avatar {
  296. margin-top: 20px;
  297. }
  298. }
  299. }
  300. :global(yzgwt-col) {
  301. .main-div {
  302. cursor: not-allowed;
  303. }
  304. }
  305. :global(.sjdws-col) {
  306. :global(.main-div_iam-audit-dsc-top-div_custom) {
  307. background-image: url('../imagess/top-img.png');
  308. background-size: 100% 100%;
  309. background-repeat: no-repeat;
  310. }
  311. .right-div {
  312. width: 30%;
  313. background-image: url('../imagess/num.png');
  314. background-size: 60px 60px;
  315. background-position: left center;
  316. background-repeat: no-repeat;
  317. }
  318. }
  319. :global(.fgl-col) {
  320. :global(.main-div_iam-audit-dsc-top-div_custom) {
  321. background-image: url('../imagess/top-img2.png');
  322. background-size: 100% 100%;
  323. background-repeat: no-repeat;
  324. }
  325. .right-div {
  326. width: 30%;
  327. background-image: url('../imagess/num2.png');
  328. background-size: 60px 60px;
  329. background-position: left center;
  330. background-repeat: no-repeat;
  331. }
  332. }
  333. :global(.sjwts-col) {
  334. :global(.main-div_iam-audit-dsc-top-div_custom) {
  335. background-image: url('../imagess/top-img3.png');
  336. background-size: 100% 100%;
  337. background-repeat: no-repeat;
  338. }
  339. .right-div {
  340. width: 30%;
  341. background-image: url('../imagess/num3.png');
  342. background-size: 60px 60px;
  343. background-position: left center;
  344. background-repeat: no-repeat;
  345. }
  346. }
  347. :global(.yzgwt-col) {
  348. :global(.main-div_iam-audit-dsc-top-div_custom) {
  349. background-image: url('../imagess/top-img4.png');
  350. background-size: 100% 100%;
  351. background-repeat: no-repeat;
  352. }
  353. .right-div {
  354. width: 30%;
  355. background-image: url('../imagess/num4.png');
  356. background-size: 60px 60px;
  357. background-position: left center;
  358. background-repeat: no-repeat;
  359. }
  360. }
  361. :global(.zgzwt-col) {
  362. :global(.main-div_iam-audit-dsc-top-div_custom) {
  363. background-image: url('../imagess/top-img5.png');
  364. background-size: 100% 100%;
  365. background-repeat: no-repeat;
  366. }
  367. .right-div {
  368. width: 30%;
  369. background-image: url('../imagess/num5.png');
  370. background-size: 60px 60px;
  371. background-position: left center;
  372. background-repeat: no-repeat;
  373. }
  374. }
  375. :global(.wtje-col) {
  376. :global(.main-div_iam-audit-dsc-top-div_custom) {
  377. background-image: url('../imagess/top-img6.png');
  378. background-size: 100% 100%;
  379. background-repeat: no-repeat;
  380. }
  381. .right-div {
  382. width: 30%;
  383. background-image: url('../imagess/num6.png');
  384. background-size: 60px 60px;
  385. background-repeat: no-repeat;
  386. background-position: left center;
  387. }
  388. }
  389. </style>