iam-audit-dsc-project-list.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <div style="padding: 20px; padding-top: 0" class="reporttablecardxm">
  3. <div
  4. style="position: absolute; padding-top: 10px; line-height: 32px"
  5. class="header_sd-header_common"
  6. >
  7. <div :class="$style.titlepoint"></div>
  8. <span :class="['toptitle', $style.toptitle]">项目信息列表</span>
  9. </div>
  10. <sd-data-table
  11. ref="dataTable"
  12. :columns="columns"
  13. :data-url="dataUrl"
  14. row-key="PROJECT_CODE"
  15. :actions="actions"
  16. :process-req="processReq"
  17. :defultpagination-pagesize="50"
  18. />
  19. </div>
  20. </template>
  21. <script>
  22. import { Message } from 'ant-design-vue'
  23. import TableActionTypes from '@/common/services/table-action-types'
  24. import download from '@/common/services/download'
  25. import auditService from './iam-audit-dsc-service'
  26. import components from './_import-components/iam-audit-dsc-project-list-import'
  27. const columns = [
  28. {
  29. title: '序号',
  30. customRender: (text, record, index) => {
  31. return { children: index + 1 }
  32. },
  33. width: '80px',
  34. },
  35. {
  36. title: '审计机构',
  37. dataIndex: 'UNIT_NAME',
  38. },
  39. {
  40. title: '项目名称',
  41. dataIndex: 'PROJECT_TITLE',
  42. },
  43. {
  44. title: '项目编号',
  45. dataIndex: 'PROJECT_CODE',
  46. },
  47. {
  48. title: '审计类型',
  49. dataIndex: 'AUDIT_TYPE',
  50. },
  51. {
  52. title: '被审计单位',
  53. dataIndex: 'AUDITED_UNIT_NAMES',
  54. },
  55. {
  56. title: '项目组长',
  57. dataIndex: 'GROUP_LEADER_NAME',
  58. },
  59. {
  60. title: '项目组成员',
  61. dataIndex: 'USER_NAME',
  62. },
  63. {
  64. title: '审计方式',
  65. dataIndex: 'AUDIT_MODE',
  66. },
  67. {
  68. title: '项目状态',
  69. dataIndex: 'ITEM_STATUS',
  70. },
  71. ]
  72. export default {
  73. name: 'IamAuditDscProjectList',
  74. metaInfo: {
  75. title: '项目统计透视图',
  76. },
  77. components,
  78. data() {
  79. return {
  80. params: null,
  81. columns,
  82. data: [],
  83. actions: [
  84. {
  85. label: '导出',
  86. id: 'export',
  87. permission: null,
  88. type: TableActionTypes.primary,
  89. callback: () => {
  90. if (this.$route.query.type === 'projectlist') {
  91. // 审计项目统计_项目信息列表穿透导出
  92. this.params.maxResults = '-1'
  93. auditService
  94. .exportProjectList(this.params)
  95. .then((data) => {
  96. const url = URL.createObjectURL(data)
  97. download(url, '项目信息列表导出.xls')
  98. })
  99. .catch(() => {
  100. Message.error('导出失败')
  101. })
  102. }
  103. },
  104. },
  105. ],
  106. }
  107. },
  108. computed: {
  109. dataUrl() {
  110. return 'api/xcoa-mobile/v1/iam-statistics/getProjectTrendPassList'
  111. },
  112. },
  113. methods: {
  114. processReq(req) {
  115. const params = JSON.parse(this.$route.query.params)
  116. const newparams = {}
  117. // 没有参数就不传
  118. if (params.unitNames !== "'null'") {
  119. newparams.unitNames = params.unitNames
  120. }
  121. if (params.planYear !== 'null') {
  122. newparams.planYear = params.planYear
  123. }
  124. if (params.status === 'start') {
  125. newparams.itemStatus = '02,03,04,05,07'
  126. }
  127. if (params.unitIds !== 'null') {
  128. newparams.unitIds = params.unitIds
  129. }
  130. req.data = {
  131. ...req.data,
  132. ...newparams,
  133. }
  134. this.params = req.data
  135. return req
  136. },
  137. },
  138. }
  139. </script>
  140. <style module lang="scss">
  141. @use '@/common/design' as *;
  142. .titlepoint {
  143. position: absolute;
  144. top: 12px;
  145. left: 20px;
  146. width: 8px;
  147. height: 27px;
  148. background: #1890ff;
  149. border-radius: 8px;
  150. }
  151. .toptitle {
  152. position: absolute;
  153. top: 9px;
  154. left: 40px;
  155. width: 200px;
  156. font-size: 22px;
  157. font-weight: bold;
  158. color: #404040;
  159. }
  160. </style>