xm-audit-map-main.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <template>
  2. <a-layout :class="$style.mainDiv">
  3. <a-layout-header :class="$style.header">
  4. <div :class="$style.title" />
  5. <div :class="$style.rightDiv">
  6. <span :class="$style.righttitle">审计地图</span
  7. ><div :class="$style.year">
  8. <a-date-picker
  9. v-model="planYear"
  10. :class="$style.yearSelect"
  11. allow-clear
  12. mode="year"
  13. picker="YYYY"
  14. format="YYYY"
  15. :input-read-only="true"
  16. :open="yearOpen"
  17. placeholder="选择年份"
  18. @panelChange="panelChange"
  19. @openChange="openChange"
  20. />
  21. </div>
  22. <div :class="$style.group">
  23. <div v-show="auditOrg.length === 0" :class="$style.holder" @click="holderClick"
  24. >审计机构
  25. </div>
  26. <a-form-model-item :label="null" prop="auditOrg">
  27. <!-- <sd-group-picker v-model="auditOrg" :single="true" :root-node="rootNode" /> -->
  28. <audit-group-picker
  29. v-model="auditOrg"
  30. :single="true"
  31. :read-only="false"
  32. :root-node="rootNode"
  33. />
  34. </a-form-model-item>
  35. </div>
  36. </div>
  37. </a-layout-header>
  38. <a-layout-content :class="$style.contentDiv">
  39. <!-- 上部div -->
  40. <iam-audit-map-top-div
  41. :class="$style.topDiv"
  42. :unid-id="auditOrg"
  43. :plan-year="planYear"
  44. ></iam-audit-map-top-div>
  45. <!-- 中部div -->
  46. <div :class="$style.centerDiv">
  47. <div :class="$style.centerDivsjzq">审计周期</div>
  48. <xm-audit-chinamap v-if="type === 'china'"></xm-audit-chinamap>
  49. <xm-audit-worldmap v-if="type === 'world'"></xm-audit-worldmap>
  50. </div>
  51. </a-layout-content>
  52. </a-layout>
  53. </template>
  54. <script>
  55. import auditGroupPicker from '@product/iam/components/picker/audit-group-picker.vue'
  56. import axios from '@/common/services/axios-instance'
  57. import { getUserInfo } from '@/common/store-mixin'
  58. // import iamAuditDscService from './components/iam-audit-dsc-service'
  59. import components from './_import-components/xm-audit-map-main-import'
  60. export default {
  61. name: 'XmAuditMapMain',
  62. metaInfo: {
  63. title: '审计地图',
  64. },
  65. components: {
  66. auditGroupPicker,
  67. ...components,
  68. },
  69. data() {
  70. return {
  71. yearOpen: false,
  72. key: 0,
  73. auditOrg: [],
  74. options: [],
  75. planYear: undefined,
  76. rootNode: {},
  77. type: '',
  78. }
  79. },
  80. watch: {
  81. // 监听数据,更新之后需要刷新图标
  82. planYear() {
  83. this.key++
  84. },
  85. auditOrg() {
  86. this.key++
  87. },
  88. },
  89. created() {
  90. this.type = this.$route?.query.type
  91. let userInfo = getUserInfo()
  92. const params = {
  93. orgId: userInfo.deptId,
  94. }
  95. axios({
  96. url: 'api/xcoa-mobile/v1/iamorg/getCurrentUserGroup',
  97. method: 'get',
  98. }).then((res) => {
  99. userInfo = res.data
  100. params.orgId = res.data.id
  101. axios({
  102. url: 'api/xcoa-mobile/v1/iamorg/findIamOrgId',
  103. method: 'post',
  104. params,
  105. }).then((res) => {
  106. this.id = res.data
  107. const deptCode = userInfo.id.toString()
  108. const deptName = userInfo.name
  109. this.rootNode = { code: deptCode, name: deptName, id: this.id }
  110. // bug22421 默认统计机构设置到本机构及一下
  111. const currNoe = {
  112. id: userInfo.id,
  113. // oldId: 0,
  114. text: deptName,
  115. name: deptName,
  116. title: deptName,
  117. code: deptCode,
  118. leaf: false,
  119. isleaf: false,
  120. props: {},
  121. children: [],
  122. differentDisplay: false,
  123. expandable: true,
  124. type: 'Group',
  125. }
  126. this.auditOrg.push(currNoe)
  127. })
  128. })
  129. // 22738 年份默认为当年
  130. this.planYear = new Date().getFullYear().toString()
  131. },
  132. methods: {
  133. /**
  134. * 关闭当前窗口
  135. */
  136. closeWindow() {
  137. window.opener = window
  138. const win = window.open('', '_self')
  139. win.close()
  140. },
  141. holderClick() {
  142. document.querySelector('.group_iam-audit-dsc-main_product .ant-select').click()
  143. },
  144. /**
  145. * 打开或关闭年度选择
  146. */
  147. openChange(open) {
  148. this.yearOpen = open
  149. },
  150. /**
  151. * 年份选择时,关闭弹窗
  152. */
  153. panelChange(value) {
  154. this.planYear = value.format('YYYY')
  155. this.yearOpen = !this.yearOpen
  156. },
  157. },
  158. }
  159. </script>
  160. <style module lang="scss">
  161. @use '@/common/design' as *;
  162. $header-height: 60px;
  163. .main-div {
  164. min-height: 100%;
  165. .header {
  166. display: flex;
  167. height: 60px;
  168. padding: 0 30px;
  169. font-size: 25px;
  170. line-height: 60px;
  171. color: #fff;
  172. background: url(./mapheaderxx.png) no-repeat;
  173. background-color: #1b365d;
  174. background-position: left center;
  175. background-size: 100%;
  176. // .title {
  177. // float: left;
  178. // width: 50%;
  179. // }
  180. .title {
  181. position: relative;
  182. left: -20px;
  183. display: inline-block;
  184. width: 200px;
  185. height: 100%;
  186. background: url('~@custom/images/logo.png') no-repeat center;
  187. }
  188. .righttitle {
  189. padding: 0 10px;
  190. font-size: 22px;
  191. color: #fff;
  192. }
  193. .right-div {
  194. display: flex;
  195. justify-content: flex-end;
  196. width: calc(100% - 220px);
  197. :global(.ant-form-item-control) {
  198. :global(.ant-select) {
  199. width: 200px;
  200. margin-top: 11px;
  201. vertical-align: baseline;
  202. cursor: pointer;
  203. }
  204. :global(.ant-select-selection--multiple) {
  205. cursor: pointer;
  206. }
  207. :global(.ant-select-search__field) {
  208. display: none;
  209. }
  210. }
  211. .year {
  212. margin-right: 15px;
  213. .year-select {
  214. display: block;
  215. width: 120px;
  216. margin-top: 15px;
  217. :global(.ant-calendar-picker-input) {
  218. color: #fff;
  219. cursor: pointer;
  220. background-color: rgba(0, 0, 0, 0.102);
  221. border-color: rgba(0, 0, 0, 0.102);
  222. }
  223. :global(.ant-calendar-picker-icon) {
  224. color: #fff;
  225. }
  226. }
  227. }
  228. .group {
  229. position: relative;
  230. .holder {
  231. position: absolute;
  232. left: 10px;
  233. z-index: 1;
  234. font-size: 16px;
  235. color: #bfbfbf;
  236. cursor: pointer;
  237. }
  238. :global(.ant-select-selection) {
  239. overflow-y: hidden;
  240. background-color: rgba(0, 0, 0, 0.102);
  241. border-color: rgba(0, 0, 0, 0.102);
  242. box-shadow:none :global li {
  243. color: #fff;
  244. background: none;
  245. border-color: rgba(0, 0, 0, 0.102);
  246. }
  247. :global .anticon {
  248. color: #fff;
  249. }
  250. }
  251. :global(.ant-select-selection__choice) {
  252. color: #fff;
  253. background-color: rgba(0, 0, 0, 0.102);
  254. border-color: rgba(0, 0, 0, 0.102);
  255. box-shadow:none :global li {
  256. color: #fff;
  257. background: none;
  258. border-color: rgba(0, 0, 0, 0.102);
  259. }
  260. :global .anticon {
  261. color: #fff;
  262. }
  263. }
  264. :global(.icon_audit-value-picker_product) {
  265. color: #fff;
  266. }
  267. }
  268. .close {
  269. margin-left: 15px;
  270. font-size: 22px;
  271. cursor: pointer;
  272. }
  273. }
  274. }
  275. .content-div {
  276. margin: 20px;
  277. }
  278. .top-div {
  279. background: transparent;
  280. }
  281. .center-div {
  282. padding: 20px;
  283. margin-top: 20px;
  284. background-color: #fff;
  285. .center-divsjzq {
  286. padding: 0 20px;
  287. margin-left: -20px;
  288. font-size: 18px;
  289. color: #000;
  290. border-left: 4px solid #ec2c2c;
  291. }
  292. }
  293. .bottom-div {
  294. margin-top: 20px;
  295. }
  296. }
  297. </style>