spic-audit-dsc-unit-list.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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. :projectlist="true"
  14. :data-url="dataUrl"
  15. :actions="actions"
  16. :process-req="processReq"
  17. :process-res="processRes"
  18. :defultpagination-pagesize="50"
  19. />
  20. </div>
  21. </template>
  22. <script>
  23. import { Message } from 'ant-design-vue'
  24. import TableActionTypes from '@/common/services/table-action-types'
  25. import download from '@/common/services/download'
  26. import auditService from './iam-audit-dsc-service'
  27. import components from './_import-components/spic-audit-dsc-unit-list-import'
  28. const columns = [
  29. {
  30. title: '序号',
  31. customRender: (text, record, index) => {
  32. return { children: index + 1 }
  33. },
  34. width: '80px',
  35. },
  36. {
  37. title: '审计机构',
  38. dataIndex: 'UNIT_NAME',
  39. },
  40. {
  41. title: '项目名称',
  42. dataIndex: 'PROJECT_TITLE',
  43. },
  44. {
  45. title: '项目编号',
  46. dataIndex: 'PROJECT_CODE',
  47. },
  48. {
  49. title: '审计类型',
  50. dataIndex: 'AUDIT_TYPE',
  51. },
  52. {
  53. title: '被审计单位',
  54. dataIndex: 'AUDITED_UNIT_NAMES',
  55. },
  56. {
  57. title: '项目负责人',
  58. dataIndex: 'PROJECT_PRINCIPAL_NAME',
  59. },
  60. {
  61. title: '项目组长',
  62. dataIndex: 'GROUP_LEADER_NAME',
  63. },
  64. {
  65. title: '项目成员',
  66. dataIndex: 'USER_NAME',
  67. },
  68. {
  69. title: '项目来源',
  70. dataIndex: 'isPlanIn',
  71. },
  72. {
  73. title: '项目状态',
  74. dataIndex: 'ITEM_STATUS',
  75. },
  76. ]
  77. export default {
  78. name: 'SpicAuditDscUnitList',
  79. metaInfo: {
  80. title: '审计发现统计透视图',
  81. },
  82. components,
  83. data() {
  84. return {
  85. params: null,
  86. columns,
  87. data: [],
  88. actions: [
  89. {
  90. label: '导出',
  91. id: 'export',
  92. permission: null,
  93. type: TableActionTypes.primary,
  94. callback: () => {
  95. const params = JSON.parse(this.$route.query.params)
  96. if (this.$route.query.type === 'auditedunitlist') {
  97. auditService
  98. .exportUnitList(params)
  99. .then((data) => {
  100. const url = URL.createObjectURL(data)
  101. download(url, '审计项目列表导出.xls')
  102. })
  103. .catch(() => {
  104. Message.error('导出失败')
  105. })
  106. }
  107. // else if (this.$route.query.type === 'fourauditedunitlist') {
  108. // auditService
  109. // .exportUnitList(params)
  110. // .then((data) => {
  111. // const url = URL.createObjectURL(data)
  112. // download(url, '审计单位列表导出.xls')
  113. // })
  114. // .catch(() => {
  115. // Message.error('导出失败')
  116. // })
  117. // }
  118. },
  119. },
  120. ],
  121. }
  122. },
  123. computed: {
  124. dataUrl() {
  125. if (this.$route.query.type === 'auditedunitlist') {
  126. return 'api/xcoa-mobile/v1/spicDecisionSupportCenter/getAuditedUnitList'
  127. } else {
  128. return ''
  129. }
  130. // else if (this.$route.query.type === 'fourauditedunitlist') {
  131. // return 'api/xcoa-mobile/v1/spicDecisionSupportCenter/getAuditedUnitList'
  132. // }
  133. },
  134. },
  135. methods: {
  136. processRes(res) {
  137. return res
  138. },
  139. processReq(req) {
  140. const params = JSON.parse(this.$route.query.params)
  141. req.data = {
  142. ...req.data,
  143. ...params,
  144. }
  145. if (req.data.pageIndex === undefined) {
  146. req.data.pageIndex = req.data.startPosition
  147. }
  148. if (req.data.pageSize === undefined) {
  149. req.data.pageSize = 10
  150. }
  151. return req
  152. },
  153. },
  154. }
  155. </script>
  156. <style module lang="scss">
  157. @use '@/common/design' as *;
  158. .titlepoint {
  159. position: absolute;
  160. top: 12px;
  161. left: 20px;
  162. width: 8px;
  163. height: 27px;
  164. background: #1890ff;
  165. border-radius: 8px;
  166. }
  167. .toptitle {
  168. position: absolute;
  169. top: 9px;
  170. left: 40px;
  171. width: 200px;
  172. font-size: 22px;
  173. font-weight: bold;
  174. color: #404040;
  175. }
  176. </style>