iam-dm-finsystem-list.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <a-card :bordered="false" :class="$style.newcard">
  3. <div>
  4. <audit-advanced-query
  5. :expand="expand"
  6. :search-data="formData"
  7. :ref-name="searchform"
  8. :search-style="{ height: '135px', left: '0px', top: '40px' }"
  9. :search-fun="handleSearch"
  10. @searchedClick="searchedClick"
  11. >
  12. <template>
  13. <a-col :span="12">
  14. <a-form-model-item label="财务系统名称" prop="financialSystemName">
  15. <a-input v-model="formData.financialSystemName" allow-clear />
  16. </a-form-model-item>
  17. </a-col>
  18. <a-col :span="12">
  19. <a-form-model-item label="财务系统版本" prop="financialSystemVersion">
  20. <a-input v-model="formData.financialSystemVersion" allow-clear />
  21. </a-form-model-item>
  22. </a-col>
  23. </template>
  24. </audit-advanced-query>
  25. <a-card>
  26. <sd-data-table-ex
  27. ref="dataTable"
  28. :filter-expressions="expressions"
  29. :columns="columns"
  30. :actions="actions"
  31. form-id="iamFinFinancialSystem"
  32. page-id="dm/finsystem/iamFinFinancialSystem"
  33. :search-fields="['financialSystemName']"
  34. :show-advance-query="true"
  35. show-selection
  36. :modal-props="{ class: 'noBottom' }"
  37. @searchbtnClick="searchbtnClick"
  38. >
  39. <div slot="islink" slot-scope="text, record">
  40. <a :title="text" @click="rowClick(record)">{{ text }}</a>
  41. </div>
  42. </sd-data-table-ex>
  43. </a-card>
  44. </div>
  45. </a-card>
  46. </template>
  47. <script>
  48. import axios from '@/common/services/axios-instance'
  49. import crossWindowWatcher from '@/common/services/cross-window-watcher'
  50. import TableColumnTypes from '@/common/services/table-column-types'
  51. import TableActionTypes from '@/common/services/table-action-types'
  52. import auditAdvancedQuery from '@product/iam/components/audit-advanced-query.vue'
  53. import auditAdvancedQueryMixins from '@product/iam/components/audit-advanced-query-mixins'
  54. import components from './_import-components/iam-dm-finsystem-list-import'
  55. export default {
  56. name: 'IamDmFinsystemList',
  57. metaInfo: {
  58. title: '财务系统版本列表',
  59. },
  60. components: {
  61. ...components,
  62. auditAdvancedQuery,
  63. },
  64. mixins: [auditAdvancedQueryMixins],
  65. data() {
  66. return {
  67. dataType: [],
  68. searchform: 'searchform',
  69. expressions: [],
  70. formData: {
  71. financialSystemName: '',
  72. financialSystemVersion: '',
  73. },
  74. columns: [
  75. {
  76. title: '序号',
  77. customRender: (text, record, index) => `${index + 1}`,
  78. width: '80px',
  79. },
  80. {
  81. title: '财务系统名称',
  82. dataIndex: 'financialSystemName',
  83. scopedSlots: { customRender: 'islink' },
  84. width: '200px',
  85. },
  86. {
  87. title: '财务系统版本',
  88. dataIndex: 'financialSystemVersion',
  89. },
  90. {
  91. title: '维护人员',
  92. dataIndex: 'creatorName',
  93. },
  94. {
  95. title: '维护日期',
  96. dataIndex: 'creationTime',
  97. sdRender: TableColumnTypes.date,
  98. },
  99. ],
  100. actions: [
  101. {
  102. label: '删除',
  103. permission: null,
  104. type: TableActionTypes.ex.delete,
  105. },
  106. {
  107. label: '新建',
  108. type: TableActionTypes.primary, // 新建按钮,不需要回调,自动处理
  109. permission: null, // 权限控制
  110. callback: () => {
  111. const url = '/iam-dm-finsystem-form' // 新页面要打开的路由地址
  112. crossWindowWatcher.waitForChanged(url).then((refreshFlag) => {
  113. if (refreshFlag) {
  114. // 这里写或者调刷新的方法
  115. this.refresh()
  116. }
  117. })
  118. },
  119. },
  120. ],
  121. }
  122. },
  123. methods: {
  124. clearSelection() {
  125. this.$refs.sjzlTable.clearSelection()
  126. },
  127. // 刷新列表
  128. refresh() {
  129. // this.$refs.sjzlTable.refresh()
  130. this.$emit('refreshTable')
  131. },
  132. // 新建、详情打开新页面
  133. rowClick(record) {
  134. const url = '/iam-dm-finsystem-form?record=' + record.id // 新页面要打开的路由地址
  135. crossWindowWatcher.waitForChanged(url).then((refreshFlag) => {
  136. if (refreshFlag) {
  137. this.refresh()
  138. }
  139. })
  140. },
  141. // 查询
  142. handleSearch() {
  143. this.expressions = []
  144. // 财务系统名称
  145. if (this.formData.financialSystemName) {
  146. this.expressions.push({
  147. dataType: 'str',
  148. name: 'financialSystemName',
  149. op: 'like',
  150. stringValue: `%${this.formData.financialSystemName}%`,
  151. })
  152. }
  153. // 财务系统版本
  154. if (this.formData.financialSystemVersion) {
  155. this.expressions.push({
  156. dataType: 'str',
  157. name: 'financialSystemVersion',
  158. op: 'like',
  159. stringValue: `%${this.formData.financialSystemVersion}%`,
  160. })
  161. }
  162. },
  163. },
  164. }
  165. </script>
  166. <style module lang="scss">
  167. @use '@/common/design' as *;
  168. .newcard {
  169. padding: 16px;
  170. :global(.ant-card-body) {
  171. padding: 0;
  172. }
  173. }
  174. </style>