iam-audit-map-top-div.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <template>
  2. <a-row>
  3. <a-col
  4. v-for="(one, index) in ['sjdwsl', 'ndsjfgl', 'sjwtfxs', 'yzgwts', 'zgzwts', 'wtsjje']"
  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. <div :class="$style.number">{{ number[index] }}</div>
  12. <div :class="$style.title">{{ title[index] }}</div>
  13. </div>
  14. <div :class="$style.rightDiv">
  15. <!-- bgcolor[index] -->
  16. <a-avatar style=" background: none" :class="$style.avatar" :size="65">
  17. <template v-slot:icon>
  18. <img src="./image/sjdwsl1.png" v-if="one === 'sjdwsl'" />
  19. <img src="./image/ndsjfgl1.png" v-if="one === 'ndsjfgl'" />
  20. <img src="./image/sjwtfxs1.png" v-if="one === 'sjwtfxs'" />
  21. <img src="./image/yzgwts1.png" v-if="one === 'yzgwts'" />
  22. <img src="./image/zgzwts1.png" v-if="one === 'zgzwts'" />
  23. <img src="./image/wtsjje1.png" v-if="one === 'wtsjje'" />
  24. </template>
  25. </a-avatar>
  26. </div>
  27. </div>
  28. </a-col>
  29. </a-row>
  30. </template>
  31. <script>
  32. import axios from '@/common/services/axios-instance'
  33. // import iamAuditDscService from './iam-audit-dsc-service'
  34. import components from './_import-components/iam-audit-map-top-div-import'
  35. export default {
  36. name: 'IamAuditMapTopDiv',
  37. metaInfo: {
  38. title: 'IamAuditTopDiv',
  39. },
  40. components,
  41. props: {
  42. /**
  43. * 统计的组织ID
  44. */
  45. unidId: {
  46. type: Array,
  47. default: () => {
  48. return []
  49. },
  50. },
  51. /**
  52. * 统计的年份
  53. */
  54. planYear: {
  55. type: String,
  56. default: null,
  57. },
  58. },
  59. data() {
  60. return {
  61. icon: [
  62. 'sd-audit-dsc-user-icon',
  63. 'sd-audit-dsc-project-all-icon',
  64. 'sd-audit-dsc-project-start-icon',
  65. 'sd-audit-dsc-gzdg-icon',
  66. 'sd-audit-dsc-find-icon',
  67. 'sd-audit-dsc-rectify-icon',
  68. ],
  69. title: [
  70. '审计单位数量',
  71. '年度审计覆盖率',
  72. '审计问题发现数',
  73. '已整改问题',
  74. '整改中问题数',
  75. '问题涉及金额',
  76. ],
  77. bgcolor: ['#bb7ec4', '#ffb648', '#ff4a55', '#00a389', '#54c5eb', '#bb7ec4'],
  78. number: [],
  79. }
  80. },
  81. computed: {
  82. // 因为props传值不会自动更新,使用计算值
  83. selectYear() {
  84. return this.planYear
  85. },
  86. // 因为props传值不会自动更新,使用计算值
  87. selectUnidId() {
  88. if (this.unidId.length > 0) {
  89. return this.unidId[0].id
  90. } else {
  91. return null
  92. }
  93. },
  94. // 因为props传值不会自动更新,使用计算值
  95. selectUnidText() {
  96. if (this.unidId.length > 0) {
  97. return this.unidId[0].name
  98. } else {
  99. return null
  100. }
  101. },
  102. },
  103. watch: {
  104. // 年份和组织变化时,重新加载数据
  105. selectYear() {
  106. this.getData()
  107. },
  108. selectUnidId() {
  109. this.getData()
  110. },
  111. },
  112. created() {
  113. // 创建时获取内容
  114. this.getData()
  115. },
  116. methods: {
  117. /**
  118. * 打开对应的模块
  119. */
  120. fnOpenModel(type) {
  121. // 审计人员
  122. if (type === 'sjry') {
  123. if (this.selectUnidId) {
  124. // iamAuditDscService.getOrgId(this.selectUnidId).then((res) => {
  125. // window.open(
  126. // `#/iam-audit-dsc-userbase-list?depid=${res.data}&deptext=${this.selectUnidText}`
  127. // )
  128. // })
  129. } else {
  130. window.open(`#/iam-audit-dsc-userbase-list`)
  131. }
  132. }
  133. // 所有项目列表
  134. if (type === 'xmzs') {
  135. window.open(
  136. '#/iam-audit-dsc-project-list?params={"unitNames":"\'' +
  137. this.selectUnidText +
  138. '\'","planYear":"' +
  139. this.selectYear +
  140. '","unitIds":"' +
  141. this.selectUnidId +
  142. '"}&type=projectlist'
  143. )
  144. }
  145. // 已启动项目列表
  146. if (type === 'yqdxm') {
  147. window.open(
  148. '#/iam-audit-dsc-project-list?params={"unitNames":"\'' +
  149. this.selectUnidText +
  150. '\'","planYear":"' +
  151. this.selectYear +
  152. '","status":"start","unitIds":"' +
  153. this.selectUnidId +
  154. '"}&type=projectlist'
  155. )
  156. }
  157. // 底稿
  158. if (type === 'dg') {
  159. }
  160. // 审计发现
  161. if (type === 'sjfx') {
  162. window.open(
  163. '#/iam-audit-dsc-find-list?params={"unitNames":"\'' +
  164. this.selectUnidText +
  165. '\'","dateStart":"' +
  166. this.selectYear +
  167. '","dimension":"decision","unitIds":"' +
  168. this.selectUnidId +
  169. '"}&type=projectlist'
  170. )
  171. }
  172. // 已整改问题数量
  173. if (type === 'sjzg') {
  174. window.open(
  175. '#/iam-audit-dsc-rectify-list?params={"unitNames":"\'' +
  176. this.selectUnidText +
  177. '\'","dateStart":"' +
  178. this.selectYear +
  179. '","dimension":"decision","unitIds":"' +
  180. this.selectUnidId +
  181. '"}&type=projectlist'
  182. )
  183. }
  184. },
  185. /**
  186. * 初始化数据
  187. */
  188. getData() {
  189. this.number = ['66', '36%', '40', '35', '3', '128.28']
  190. // 获取整体数量
  191. const params = {
  192. unitId: this.selectUnidId,
  193. planYear: this.selectYear,
  194. }
  195. if (this.selectUnidId) {
  196. // iamAuditDscService.getAllNumResult(params).then((res) => {
  197. // // 按顺序将内容写入
  198. // const data = res.data
  199. // // 审计人员数量
  200. // this.number.push(data.PERSON_NUM)
  201. // // 项目总数
  202. // this.number.push(data.PROJECT_TOTAL_NUM)
  203. // // 已启动项目数
  204. // this.number.push(data.STARTED_PROJECT_NUM)
  205. // // 底稿数量
  206. // this.number.push(data.PAPER_NUM)
  207. // // 审计发现数量
  208. // this.number.push(data.FIND_NUM)
  209. // // 已整改问题数量
  210. // this.number.push(data.RECT_NUM)
  211. // })
  212. }
  213. },
  214. },
  215. }
  216. </script>
  217. <style module lang="scss">
  218. @use '@/common/design' as *;
  219. .main-div {
  220. display: flex;
  221. height: 105px;
  222. margin: 0 10px;
  223. cursor: pointer;
  224. background: #fff;
  225. border-radius: 10px;
  226. .left-div {
  227. display: flex;
  228. flex-direction: column;
  229. width: 70%;
  230. // padding-left: 22px;
  231. .title {
  232. height: 50%;
  233. font-weight: 600;
  234. color: #fff;
  235. text-align: center;
  236. // line-height: 60px;
  237. vertical-align: top;
  238. }
  239. .number {
  240. height: 50%;
  241. margin-top: 15px;
  242. font-size: 45px;
  243. font-weight: 700;
  244. line-height: 45px;
  245. color: #fff;
  246. text-align: center;
  247. }
  248. }
  249. .right-div {
  250. width: 30%;
  251. .avatar {
  252. margin-top: 20px;
  253. }
  254. }
  255. }
  256. :global(.dg-col) {
  257. .main-div {
  258. cursor: not-allowed;
  259. }
  260. }
  261. :global(.sjdwsl-col) {
  262. .main-div {
  263. background: url('./image/sjdwsl.png') no-repeat center;
  264. }
  265. }
  266. :global(.ndsjfgl-col) {
  267. .main-div {
  268. background: url('./image/ndsjfgl.png') no-repeat center;
  269. }
  270. }
  271. :global(.sjwtfxs-col) {
  272. .main-div {
  273. background: url('./image/sjwtfxs.png') no-repeat center;
  274. }
  275. }
  276. :global(.yzgwts-col) {
  277. .main-div {
  278. background: url('./image/yzgwts.png') no-repeat center;
  279. }
  280. }
  281. :global(.zgzwts-col) {
  282. .main-div {
  283. background: url('./image/zgzwts.png') no-repeat center;
  284. }
  285. }
  286. :global(.wtsjje-col) {
  287. .main-div {
  288. background: url('./image/wtsjje.png') no-repeat center;
  289. }
  290. }
  291. </style>