agilebuilder-ui 1.1.80 → 1.1.81-tmp1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/lib/{401-79ff6c9c.js → 401-559680c3.js} +1 -1
  2. package/lib/{404-ea2bd6a4.js → 404-525cb9e6.js} +1 -1
  3. package/lib/{_baseUniq-BXtq6_NW-b5fc489d.js → _baseUniq-BXtq6_NW-195b7624.js} +2 -2
  4. package/lib/{arc-Js_tyW10-b52fc23c.js → arc-Js_tyW10-5f2bdd5b.js} +1 -1
  5. package/lib/architecture-O4VJ6CD3-ZoZ2IAk2-b4d13c1b.js +11 -0
  6. package/lib/{architectureDiagram-SUXI7LT5-kyYGGrHN-dec821e8.js → architectureDiagram-SUXI7LT5-kyYGGrHN-7c386c1d.js} +8 -8
  7. package/lib/{blockDiagram-6J76NXCF-IAr4zDV3-0ffdf98a.js → blockDiagram-6J76NXCF-IAr4zDV3-2a38c333.js} +7 -7
  8. package/lib/{c4Diagram-6F6E4RAY-Dv27rXcJ-a632eb32.js → c4Diagram-6F6E4RAY-Dv27rXcJ-73b0e533.js} +3 -3
  9. package/lib/{channel-BBZy6zOT-91e52a0c.js → channel-BBZy6zOT-737b9e4e.js} +1 -1
  10. package/lib/{chunk-353BL4L5-Dn_Y_Yna-764d0356.js → chunk-353BL4L5-Dn_Y_Yna-86517913.js} +1 -1
  11. package/lib/{chunk-67H74DCK-Br5U8bfD-d8f38128.js → chunk-67H74DCK-Br5U8bfD-35e4a15f.js} +1 -1
  12. package/lib/{chunk-AACKK3MU-DH_MKxca-5fcc97ad.js → chunk-AACKK3MU-DH_MKxca-351457bb.js} +1 -1
  13. package/lib/{chunk-BFAMUDN2-DHLCoYMN-5c6fc011.js → chunk-BFAMUDN2-DHLCoYMN-18d15356.js} +1 -1
  14. package/lib/{chunk-E2GYISFI-DQPHyyga-dac1d017.js → chunk-E2GYISFI-DQPHyyga-af4c38c9.js} +1 -1
  15. package/lib/{chunk-OW32GOEJ-CQOSE6Bn-a1d9f4fa.js → chunk-OW32GOEJ-CQOSE6Bn-1e9df6d6.js} +3 -3
  16. package/lib/{chunk-SKB7J2MH-BlwHRDiW-5cb0273d.js → chunk-SKB7J2MH-BlwHRDiW-9a6869aa.js} +1 -1
  17. package/lib/{chunk-SZ463SBG-DEp8buKJ-9c8a0224.js → chunk-SZ463SBG-DEp8buKJ-537c2c6c.js} +4 -4
  18. package/lib/{classDiagram-M3E45YP4-D0ySDe-v-83ba13b1.js → classDiagram-M3E45YP4-D0ySDe-v-25beaa6f.js} +6 -6
  19. package/lib/{classDiagram-v2-YAWTLIQI-D0ySDe-v-83ba13b1.js → classDiagram-v2-YAWTLIQI-D0ySDe-v-25beaa6f.js} +6 -6
  20. package/lib/{clone-CEJtuQzg-87b6fde3.js → clone-CEJtuQzg-2dcec15b.js} +1 -1
  21. package/lib/{dagre-JOIXM2OF-5zx0JY2T-2fc1b791.js → dagre-JOIXM2OF-5zx0JY2T-4770e35a.js} +7 -7
  22. package/lib/{diagram-5UYTHUR4-C19nyAKc-a2566e15.js → diagram-5UYTHUR4-C19nyAKc-2ff59de4.js} +7 -7
  23. package/lib/{diagram-VMROVX33-DkGwo-hj-51a4fa89.js → diagram-VMROVX33-DkGwo-hj-1a449d84.js} +8 -8
  24. package/lib/{diagram-ZTM2IBQH-CBgHCu9L-336d2a44.js → diagram-ZTM2IBQH-CBgHCu9L-79cbe80b.js} +7 -7
  25. package/lib/{erDiagram-3M52JZNH-cttdAJXW-fadfd61d.js → erDiagram-3M52JZNH-cttdAJXW-2d654d38.js} +5 -5
  26. package/lib/{flowDiagram-KYDEHFYC-9HpsqDdB-c2062dc5.js → flowDiagram-KYDEHFYC-9HpsqDdB-e95c6355.js} +6 -6
  27. package/lib/{ganttDiagram-EK5VF46D-8QB3ofs6-8531f1a3.js → ganttDiagram-EK5VF46D-8QB3ofs6-e85abbd4.js} +3 -3
  28. package/lib/gitGraph-ZV4HHKMB-BSmtVGRu-38ba5de5.js +11 -0
  29. package/lib/{gitGraphDiagram-GW3U2K7C-DNzc0Vx_-4b8af9f9.js → gitGraphDiagram-GW3U2K7C-DNzc0Vx_-30e86ada.js} +8 -8
  30. package/lib/{graph-3zJxsO-i-8c5c3145.js → graph-3zJxsO-i-7cd62c17.js} +3 -3
  31. package/lib/{iframe-page-bf3581e2.js → iframe-page-aec49896.js} +1 -1
  32. package/lib/{index-13e73297.js → index-f25a0f8b.js} +2220 -2077
  33. package/lib/info-63CPKGFF-C8sYWczU-f25456bb.js +11 -0
  34. package/lib/{infoDiagram-LHK5PUON-C-vFFPTf-32a28f59.js → infoDiagram-LHK5PUON-C-vFFPTf-94039349.js} +6 -6
  35. package/lib/{journeyDiagram-EWQZEKCU-BJrw4-AG-0db52f9d.js → journeyDiagram-EWQZEKCU-BJrw4-AG-eff80a35.js} +5 -5
  36. package/lib/{kanban-definition-ZSS6B67P-BptAnqU--09df3bd0.js → kanban-definition-ZSS6B67P-BptAnqU--ebfdba4e.js} +3 -3
  37. package/lib/{layout-sGZIJplX-89308221.js → layout-sGZIJplX-49fc0d6f.js} +5 -5
  38. package/lib/{linear-DqgVh5FN-22bf30ca.js → linear-DqgVh5FN-f87c9e12.js} +1 -1
  39. package/lib/{mermaid-parser.core-CH9ryA1K-54fad62d.js → mermaid-parser.core-CH9ryA1K-246804df.js} +12 -12
  40. package/lib/{mermaid.core-CAqkCmS1-1a2bb6c5.js → mermaid.core-CAqkCmS1-889e3b7e.js} +30 -30
  41. package/lib/{min-BngCxx8g-f2fc5ef1.js → min-BngCxx8g-fdc6e8f6.js} +3 -3
  42. package/lib/{mindmap-definition-6CBA2TL7-Cp_EeEsh-5257b407.js → mindmap-definition-6CBA2TL7-Cp_EeEsh-45ad4a61.js} +2 -2
  43. package/lib/packet-HUATNLJX-bfFWFja0-e991049a.js +11 -0
  44. package/lib/pie-WTHONI2E-QPrWs3SR-e794f4b5.js +11 -0
  45. package/lib/{pieDiagram-NIOCPIFQ-C46Y_4C6-481f3d87.js → pieDiagram-NIOCPIFQ-C46Y_4C6-9a038b76.js} +8 -8
  46. package/lib/{quadrantDiagram-2OG54O6I-Dgf6d6F_-369bcedf.js → quadrantDiagram-2OG54O6I-Dgf6d6F_-3791343e.js} +3 -3
  47. package/lib/radar-NJJJXTRR-BnUCJhQL-79f1b4ac.js +11 -0
  48. package/lib/{requirementDiagram-QOLK2EJ7-CSF6N7HA-32c846ee.js → requirementDiagram-QOLK2EJ7-CSF6N7HA-06551e7c.js} +4 -4
  49. package/lib/{sankeyDiagram-4UZDY2LN-BAHB7dMS-8621ea6c.js → sankeyDiagram-4UZDY2LN-BAHB7dMS-ae050112.js} +2 -2
  50. package/lib/{sequenceDiagram-SKLFT4DO-10gLJ50N-cedf74ac.js → sequenceDiagram-SKLFT4DO-10gLJ50N-75fe8e81.js} +4 -4
  51. package/lib/{stateDiagram-MI5ZYTHO-D6p6nCaj-2184b52e.js → stateDiagram-MI5ZYTHO-D6p6nCaj-a62d5ef6.js} +9 -9
  52. package/lib/{stateDiagram-v2-5AN5P6BG-DaN5hC-t-22338951.js → stateDiagram-v2-5AN5P6BG-DaN5hC-t-d7ab7c41.js} +5 -5
  53. package/lib/super-ui.css +1 -1
  54. package/lib/super-ui.js +1 -1
  55. package/lib/super-ui.umd.cjs +113 -113
  56. package/lib/{tab-content-iframe-index-49bddc0a.js → tab-content-iframe-index-448977a0.js} +1 -1
  57. package/lib/{tab-content-index-e371b16f.js → tab-content-index-cdf2780f.js} +1 -1
  58. package/lib/{tache-subprocess-history-59e976f7.js → tache-subprocess-history-eeaa7770.js} +1 -1
  59. package/lib/{timeline-definition-MYPXXCX6-gLqnWxDu-f9e9fe2e.js → timeline-definition-MYPXXCX6-gLqnWxDu-4affe323.js} +3 -3
  60. package/lib/treemap-75Q7IDZK-B2atdfMH-7cb5e6f2.js +11 -0
  61. package/lib/{xychartDiagram-H2YORKM3-Whqa4ezL-74aac2bd.js → xychartDiagram-H2YORKM3-Whqa4ezL-7e67fbaa.js} +3 -3
  62. package/package.json +1 -1
  63. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +7 -22
  64. package/packages/department-user-tree-inline/src/search-result.vue +2 -9
  65. package/packages/fs-preview/src/fs-preview.vue +60 -68
  66. package/packages/fs-upload-new/src/fs-preview-new.vue +4 -13
  67. package/packages/scan-code-input/src/scan-code-input.vue +1 -1
  68. package/packages/scan-code-input-browser/src/scan-code-input.vue +13 -23
  69. package/packages/super-grid/src/columns-config.vue +86 -25
  70. package/packages/super-grid/src/list-tabs.vue +70 -0
  71. package/packages/super-grid/src/super-grid-service.js +4 -0
  72. package/packages/super-grid/src/super-grid.vue +101 -9
  73. package/packages/super-grid/src/tab-config.vue +295 -0
  74. package/packages/workflow-history-list/src/workflow-history-list.vue +4 -18
  75. package/src/i18n/langs/cn.js +10 -6
  76. package/src/i18n/langs/en.js +10 -10
  77. package/src/utils/jump-page-utils.js +1 -1
  78. package/src/utils/workflow-util.js +2 -5
  79. package/lib/architecture-O4VJ6CD3-ZoZ2IAk2-6b17acd8.js +0 -11
  80. package/lib/gitGraph-ZV4HHKMB-BSmtVGRu-3e09653d.js +0 -11
  81. package/lib/info-63CPKGFF-C8sYWczU-1e29ebd2.js +0 -11
  82. package/lib/packet-HUATNLJX-bfFWFja0-667f6600.js +0 -11
  83. package/lib/pie-WTHONI2E-QPrWs3SR-e78315cf.js +0 -11
  84. package/lib/radar-NJJJXTRR-BnUCJhQL-da5b5f7d.js +0 -11
  85. package/lib/treemap-75Q7IDZK-B2atdfMH-54046a6a.js +0 -11
@@ -19,6 +19,9 @@
19
19
  <el-button size="default" @click="resetConfig">
20
20
  {{ $t('imatrixUIPublicModel.reset') }}
21
21
  </el-button>
22
+ <el-button size="default" @click="showTabConfig">
23
+ {{ $t('superGrid.tabConfig') }}
24
+ </el-button>
22
25
  <el-button size="default" @click="$emit('close')">
23
26
  {{ $t('imatrixUIPublicModel.cancel') }}
24
27
  </el-button>
@@ -27,12 +30,12 @@
27
30
  >
28
31
  </div>
29
32
  <el-table v-if="hasLoaded" :data="columns" class="custom-config-elTable" max-height="450" row-key="prop">
30
- <el-table-column :label="$t('superGrid.label')" property="label" width="220">
33
+ <el-table-column :label="$t('superGrid.label')" property="label" width="150">
31
34
  <template v-slot="scope">
32
35
  <span :title="scope.row.label" class="ellipsis cell--span">{{ scope.row.label }}</span>
33
36
  </template>
34
37
  </el-table-column>
35
- <el-table-column :label="$t('superGrid.isShow')" property="showType" width="120">
38
+ <el-table-column :label="$t('superGrid.isShow')" property="showType" width="100">
36
39
  <template v-slot="scope">
37
40
  <el-select
38
41
  v-model="scope.row.showType"
@@ -47,7 +50,7 @@
47
50
  </el-select>
48
51
  </template>
49
52
  </el-table-column>
50
- <el-table-column :label="$t('superGrid.isExportable')" property="exportType" width="120">
53
+ <el-table-column v-if="!isFormSubTable" :label="$t('superGrid.isExportable')" property="exportType" width="100">
51
54
  <template v-slot="scope">
52
55
  <el-select
53
56
  v-model="scope.row.exportType"
@@ -73,14 +76,14 @@
73
76
  @clear="clearDisplayOrder(scope.row)"
74
77
  @input="handleInput(scope.row, 'displayOrder')"
75
78
  />
76
- <el-select v-else v-model="scope.row.displayOrderType">
79
+ <el-select v-else v-model="scope.row.displayOrderType" :disabled="isDisabledCommon(scope.row)">
77
80
  <el-option :label="$t('superGrid.default')" value="default" />
78
81
  <el-option :label="$t('superGrid.custom')" value="custom" />
79
82
  </el-select>
80
83
  </template>
81
84
  </el-table-column>
82
85
  <el-table-column
83
- v-if="isDragColumn"
86
+ v-if="isDragColumn && !isFormSubTable"
84
87
  :label="$t('superGrid.searchDisplayOrder')"
85
88
  property="searchDisplayOrder"
86
89
  sortable
@@ -99,14 +102,14 @@
99
102
  <el-select
100
103
  v-else
101
104
  v-model="scope.row.searchDisplayOrderType"
102
- :disabled="!searchColumns.includes(scope.row.prop)"
105
+ :disabled="isDisabledCommon(scope.row) && !searchColumns.includes(scope.row.prop)"
103
106
  >
104
107
  <el-option :label="$t('superGrid.default')" value="default" />
105
108
  <el-option :label="$t('superGrid.custom')" value="custom" />
106
109
  </el-select>
107
110
  </template>
108
111
  </el-table-column>
109
- <el-table-column :label="$t('superGrid.width')" property="widthType">
112
+ <el-table-column :label="$t('superGrid.width')" property="widthType" width="100">
110
113
  <template v-slot="scope">
111
114
  <el-input
112
115
  v-if="scope.row.widthType && scope.row.widthType === 'custom'"
@@ -121,7 +124,22 @@
121
124
  </el-select>
122
125
  </template>
123
126
  </el-table-column>
127
+ <el-table-column :label="$t('superGrid.tab')" property="tabType">
128
+ <template v-slot="scope">
129
+ <el-select v-if="scope.row.tabType && scope.row.tabType === 'custom'"
130
+ v-model="scope.row.tabCode"
131
+ clearable
132
+ @clear="clearTab(scope.row)">
133
+ <el-option v-for="tab in tabs" :key="tab.code" :label="tab.name" :value="tab.code" />
134
+ </el-select>
135
+ <el-select v-else v-model="scope.row.tabType" :disabled="isDisabledTab(scope.row)">
136
+ <el-option :label="$t('superGrid.default')" value="default" />
137
+ <el-option :label="$t('superGrid.custom')" value="custom" />
138
+ </el-select>
139
+ </template>
140
+ </el-table-column>
124
141
  </el-table>
142
+ <TabConfig v-if="isShowTabConfig" :list-code="listCode" :list-tabs="tabs" @close="closeTabConfig"/>
125
143
  </el-dialog>
126
144
  </template>
127
145
 
@@ -130,6 +148,7 @@ import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
130
148
  import * as Vue from 'vue'
131
149
  import store from './store'
132
150
  import Sortable from 'sortablejs'
151
+ import TabConfig from './tab-config.vue'
133
152
 
134
153
  export default {
135
154
  name: 'ColumnsConfig',
@@ -138,29 +157,36 @@ export default {
138
157
  type: String,
139
158
  default: ''
140
159
  },
141
- visibleColumns: {
142
- type: Object,
143
- default: () => {}
144
- }
160
+ isFormSubTable: {
161
+ type: Boolean,
162
+ default: false
163
+ },
164
+ },
165
+ components:{
166
+ TabConfig
145
167
  },
146
168
  data() {
147
169
  return {
148
170
  columns: [],
149
171
  searchColumns: [],
150
- hasLoaded: false
172
+ hasLoaded: false,
173
+ isShowTabConfig: false,
174
+ tabs: []
151
175
  }
152
176
  },
153
177
  created() {
154
- for (let i = 0; i < this.visibleColumns.length; i++) {
155
- const column = this.visibleColumns[i]
156
- if (column.queryType === 'normal' && !column.custom && column.prop) {
157
- this.searchColumns.push(column.prop)
158
- }
159
- }
178
+ // for (let i = 0; i < this.visibleColumns.length; i++) {
179
+ // const column = this.visibleColumns[i]
180
+ // if (column.queryType === 'normal' && !column.custom && column.prop) {
181
+ // this.searchColumns.push(column.prop)
182
+ // }
183
+ // }
160
184
  },
161
185
  mounted() {
162
- this.listAllColumns().then((columns) => {
163
- this.columns = columns
186
+ this.listAllColumns().then((data) => {
187
+ this.columns = data.allColumns
188
+ this.tabs = data.allTabs
189
+ this.getSearchColumnProps(this.columns)
164
190
  this.hasLoaded = true
165
191
  this.$nextTick(() => {
166
192
  this.dragColumnDisplayOrder()
@@ -168,6 +194,21 @@ export default {
168
194
  })
169
195
  },
170
196
  methods: {
197
+ getSearchColumnProps(columns){
198
+ for (let i = 0; i < columns.length; i++) {
199
+ const column = columns[i]
200
+ if (column.queryType === 'normal' && !column.custom && column.prop) {
201
+ this.searchColumns.push(column.prop)
202
+ }
203
+ }
204
+ },
205
+ isDisabledTab(row) {
206
+ // 序号、复选框列不可以配置是否显示;占位符列不可以设置是否显示;当不是自定义的显示状态为false时,不可配置是否显示
207
+ return (
208
+ (row.prop && (row.prop === '$index' || row.prop === '$selection')) ||
209
+ row.custom === true
210
+ )
211
+ },
171
212
  isDisabledShow(row) {
172
213
  // 序号、复选框列不可以配置是否显示;占位符列不可以设置是否显示;当不是自定义的显示状态为false时,不可配置是否显示
173
214
  return (
@@ -184,6 +225,12 @@ export default {
184
225
  (row.exportType && row.exportType !== 'false' && row.exportable === false)
185
226
  )
186
227
  },
228
+ isDisabledCommon(row) {
229
+ // 序号、复选框列不可以配置是否导出
230
+ return (
231
+ (row.prop && (row.prop === '$index' || row.prop === '$selection'))
232
+ )
233
+ },
187
234
  changeShow(row, value) {
188
235
  if (value !== undefined && value === 'false') {
189
236
  row.show = false
@@ -229,8 +276,10 @@ export default {
229
276
  showClose: true
230
277
  })
231
278
  this.hasLoaded = false
232
- this.listAllColumns().then((columns) => {
233
- this.columns = columns
279
+ this.listAllColumns().then((data) => {
280
+ this.columns = data.allColumns
281
+ this.tabs = data.allTabs
282
+ this.getSearchColumnProps(this.columns)
234
283
  this.hasLoaded = true
235
284
  this.$nextTick(() => {
236
285
  this.dragColumnDisplayOrder()
@@ -243,7 +292,7 @@ export default {
243
292
  listAllColumns() {
244
293
  return new Promise((resolve, reject) => {
245
294
  const url =
246
- window.$vueApp.config.globalProperties.baseAPI + '/component/super-grids/all-list-columns/' + this.listCode
295
+ window.$vueApp.config.globalProperties.baseAPI + '/component/super-grids/all-list-column-and-tabs/' + this.listCode
247
296
  const gridParams = store.get(this.listCode)
248
297
  const params = {}
249
298
  const isSql = gridParams.isSql
@@ -253,8 +302,8 @@ export default {
253
302
  }
254
303
  this.$http
255
304
  .post(url, params)
256
- .then((columns) => {
257
- resolve(columns)
305
+ .then((data) => {
306
+ resolve(data)
258
307
  })
259
308
  .catch((error) => {
260
309
  reject(error)
@@ -267,6 +316,9 @@ export default {
267
316
  clearWidth(row) {
268
317
  row.widthType = 'default'
269
318
  },
319
+ clearTab(row){
320
+ row.tabType = 'default'
321
+ },
270
322
  handleInput(row, field) {
271
323
  if (row[field] < 0) {
272
324
  row[field] = 0 // 如果值小于 0,则重置为 0
@@ -322,6 +374,15 @@ export default {
322
374
  })
323
375
  }
324
376
  })
377
+ },
378
+ showTabConfig(){
379
+ this.isShowTabConfig = true
380
+ },
381
+ closeTabConfig(tabs){
382
+ if(tabs){
383
+ this.tabs = tabs
384
+ }
385
+ this.isShowTabConfig = false
325
386
  }
326
387
  },
327
388
  emits: ['open', 'opend', 'close', 'closed', 'reset', 'opend', 'close', 'closed']
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <el-button-group>
3
+ <el-button v-for="tab in tabs" :key="tab.code" :class="currentTabCode&&currentTabCode===tab.code?'active-tab':''" @click="changeTab(tab)">{{tab.name}}</el-button>
4
+ </el-button-group>
5
+ </template>
6
+
7
+ <script>
8
+ import * as Vue from 'vue'
9
+
10
+ export default {
11
+ name: 'ListTabs',
12
+ props: {
13
+ listCode:{
14
+ type:String,
15
+ default: null
16
+ },
17
+ listTabs: {
18
+ type: Array,
19
+ default: () => {
20
+ return []
21
+ }
22
+ },
23
+ currentTabCode: {
24
+ type:String,
25
+ default: null
26
+ },
27
+ otherTabColumnProps:{
28
+ type: Array,
29
+ default: () => {
30
+ return []
31
+ }
32
+ }
33
+ },
34
+ data() {
35
+ const listTabsCopy = JSON.parse(JSON.stringify(this.listTabs))
36
+ return {
37
+ listTabsCopy,
38
+ tabs:[],
39
+ otherListTabProps: []
40
+ }
41
+ },
42
+ created() {
43
+ if(this.otherTabColumnProps && this.otherTabColumnProps.length > 0){
44
+ let tabs = []
45
+ if(this.listTabsCopy && this.listTabsCopy.length > 0){
46
+ // console.log('22222--this.listTabs=',this.listTabsCopy)
47
+ tabs = this.listTabsCopy.concat([{code:'_other', name:this.$t('superGrid.otherTabName'), displayOrder:1000}])
48
+ }
49
+ this.tabs = tabs
50
+ } else {
51
+ this.tabs = this.listTabsCopy
52
+ }
53
+ this.otherListTabProps = this.otherTabColumnProps
54
+ },
55
+ mounted() {
56
+
57
+ },
58
+ methods: {
59
+ changeTab(tab){
60
+ this.$emit('change-tab', {tab,columnProps: this.otherListTabProps})
61
+ }
62
+ }
63
+ }
64
+ </script>
65
+ <style scoped>
66
+ .active-tab{
67
+ background-color:#409EFF;
68
+ color: white !important
69
+ }
70
+ </style>
@@ -169,6 +169,9 @@ const superGridService = {
169
169
  gridParams.pagination = this.pagination
170
170
  gridParams.pageContext = this.pageContext
171
171
  gridParams.configureObj = this.configureObj
172
+ gridParams.listTabs = this.listTabs
173
+ gridParams.otherTabColumnProps = this.otherTabColumnProps
174
+ this.currentTabCode = this.listTabs && this.listTabs.length > 0? this.listTabs[0].code: null
172
175
  this.tableName = this.basicInfo.tableName
173
176
  gridParams.hiddenColumns = this.options.hiddenColumns
174
177
  ? JSON.parse(JSON.stringify(this.options.hiddenColumns))
@@ -187,6 +190,7 @@ const superGridService = {
187
190
  this.isSubTableShowPage = this.isFormSubTable ? this.isShowPage : false
188
191
  gridParams.isSubTableShowPage = this.isSubTableShowPage
189
192
  this.getDetailColumn()
193
+ this.filterTabColumns(this.currentTabCode)
190
194
  this.hasLoadedColumns = true
191
195
  let canFetchData = true
192
196
  if (isHasOptionFunction('loadBeforeSend', this.code)) {
@@ -157,11 +157,18 @@
157
157
  v-on="item.$on"
158
158
  />
159
159
  </el-table>
160
- <div v-if="showPagination && !isShowCard" class="super-grid-main-table-footer-view">
161
- <div class="yx-flex-wrap" style="gap: 10px">
162
- <div v-if="isFormSubTable && pagination && isShowPage" style="width: 16px; height: 16px"></div>
160
+ <div v-if="!isShowCard" class="super-grid-main-table-footer-view">
161
+ <div class="yx-flex-wrap" style="gap: 10px;align-items:center">
162
+ <!-- {{listTabs}} -->
163
+ <list-tabs
164
+ v-if="refreshGrid && hasLoadedColumns"
165
+ :list-tabs="listTabs"
166
+ :list-code="code"
167
+ :other-tab-column-props="otherTabColumnProps"
168
+ :current-tab-code="currentTabCode"
169
+ @change-tab="changeTab"/>
163
170
  <div
164
- v-if="basicInfo.customConfig && !isFormSubTable"
171
+ v-if="basicInfo.customConfig"
165
172
  class="el-icon-setting"
166
173
  :title="$t('superGrid.columnConfig')"
167
174
  @click="configColumns"
@@ -174,7 +181,7 @@
174
181
  </div>
175
182
  </div>
176
183
  <el-pagination
177
- v-if="pagination && isShowPage"
184
+ v-if="showPagination && pagination && isShowPage"
178
185
  v-model:current-page="currentPage"
179
186
  v-model:page-size="pagination.pageSize"
180
187
  background
@@ -195,9 +202,9 @@
195
202
 
196
203
  <columns-config
197
204
  v-if="showColumnConfig"
198
- :visible-columns="visibleColumns"
199
205
  :list-code="code"
200
206
  :is-sql="isSql"
207
+ :is-form-sub-table="isFormSubTable"
201
208
  @close="closeCustomConfig($event)"
202
209
  @reset="resetCustomConfig($event)"
203
210
  />
@@ -252,6 +259,7 @@ import SearchForm from './search-form.vue'
252
259
  import searchFormDialog from './search-form-dialog.vue'
253
260
  import RowDetail from './row-detail.vue'
254
261
  import MobileCard from './components/mobile-table-card.jsx'
262
+ import ListTabs from './list-tabs.vue'
255
263
  import { getEntityFieldValueWithOutCase, setEntityFieldValue } from '../../../src/utils/util'
256
264
  import eventBus from './eventBus'
257
265
  import {
@@ -304,7 +312,8 @@ export default {
304
312
  ElIconSetting,
305
313
  ElIconRefresh,
306
314
  RowDetail,
307
- MobileCard
315
+ MobileCard,
316
+ ListTabs
308
317
  },
309
318
  name: 'SuperGrid',
310
319
  // mixins: [resizeMixin],
@@ -530,7 +539,11 @@ export default {
530
539
  orderType: 'ascending', // 排序方式
531
540
  orderColumns: [], // 排序字段集合
532
541
  orderColumn: null, // 排序字段实体
533
- columnsMap: null // 字段map集合
542
+ columnsMap: null, // 字段map集合
543
+ listTabs: [], // 页签列表集合
544
+ tabColumns: {}, // 页签和字段存储集合
545
+ currentTabCode: null, // 当前选中的页签
546
+ otherTabColumnProps: [] // “其它信息”页签中的字段名集合
534
547
  }
535
548
  },
536
549
  computed: {
@@ -603,8 +616,13 @@ export default {
603
616
  // 字段对象集合
604
617
  let columnsMap = {}
605
618
  let orderColumns = []
619
+ let columns = this.columns
620
+ if(!this.isShowCard && this.tabColumns && this.currentTabCode && this.tabColumns[this.currentTabCode] && this.tabColumns[this.currentTabCode].length > 0){
621
+ // 不是卡片时,列表模式时才需要多页签功能
622
+ columns = this.tabColumns[this.currentTabCode]
623
+ }
606
624
  return setAttrs(
607
- this.columns.filter((column) => {
625
+ columns.filter((column) => {
608
626
  if (!this.isHasSearchColumn && column.queryType && column.queryType === 'normal') {
609
627
  // 表示有查询字段
610
628
  this.isHasSearchColumn = true
@@ -3043,6 +3061,8 @@ export default {
3043
3061
  this.refreshGridInitialize()
3044
3062
  },
3045
3063
  refreshGridInitialize() {
3064
+ // 清空页签字段内容
3065
+ this.tabColumns = {}
3046
3066
  this.initialize().then(() => {
3047
3067
  // 添加该代码是为了解决保存字段个性化配置后,重新渲染列表问题,例如:列宽重新计算问题
3048
3068
  this.refreshGrid = false
@@ -4027,6 +4047,78 @@ export default {
4027
4047
  }
4028
4048
  // this.packageSubTableData(gridParams, sortSubTableDataList, sortInfo, this.isSubSearch, this.orderColumn)
4029
4049
  }
4050
+ },
4051
+ changeTab({tab, columnProps}){
4052
+ if(tab && tab.code ){
4053
+ this.currentTabCode = tab.code
4054
+ }
4055
+ if(tab && tab.code && tab.code !== '_other' && !this.tabColumns[tab.code]){
4056
+ // 非其它信息页签
4057
+ this.filterTabColumns(tab.code)
4058
+ } else if(tab && tab.code && tab.code === '_other' && !this.tabColumns[tab.code]){
4059
+ // 其它信息页签
4060
+ const tabCodes = []
4061
+ this.listTabs.forEach(tab=>{
4062
+ tabCodes.push(tab.code)
4063
+ })
4064
+ let tabColumns = []
4065
+ for (let i = 0; i < this.columns.length; i++) {
4066
+ const column = this.columns[i]
4067
+ if(column && (column.prop === '$index' || column.prop === '$selection' || column.prop === 'operation')){
4068
+ tabColumns.push(column)
4069
+ } else if(column.dynamic && (!column.children || column.children.length === 0) && (!column.tabCode || tabCodes.indexOf(column.tabCode)<0)){
4070
+ // 动态列没配置页签编码的显示到其它页签中
4071
+ tabColumns.push(column)
4072
+ }else if (column.prop && columnProps && columnProps.length > 0 && columnProps.indexOf(column.prop)>=0 ) {
4073
+ tabColumns.push(column)
4074
+ } else if(column.children && column.children.length>0){
4075
+ const isInOtherTab = this.groupHeaderIsInOtherTab(column.children[0],columnProps)
4076
+ if(isInOtherTab){
4077
+ tabColumns.push(column)
4078
+ }
4079
+ }
4080
+ }
4081
+ this.tabColumns[tab.code] = tabColumns
4082
+ }
4083
+ },
4084
+ filterTabColumns(tabCode) {
4085
+ if(tabCode){
4086
+ let tabColumns = []
4087
+ for (let i = 0; i < this.columns.length; i++) {
4088
+ const column = this.columns[i]
4089
+ if(column && (column.prop === '$index' || column.prop === '$selection' || column.prop === 'operation')){
4090
+ tabColumns.push(column)
4091
+ }else if (column &&column.tabCode && column.tabCode === tabCode ) {
4092
+ tabColumns.push(column)
4093
+ } else if(column &&column.children && column.children.length>0){
4094
+ const isInTab = this.groupHeaderIsInTab(tabCode, column.children[0])
4095
+ if(isInTab){
4096
+ tabColumns.push(column)
4097
+ }
4098
+ }
4099
+ }
4100
+ this.tabColumns[tabCode] = tabColumns
4101
+ }
4102
+ },
4103
+ // 组合表头是否在指定页签内
4104
+ groupHeaderIsInTab(tabCode, column) {
4105
+ if(column && tabCode){
4106
+ if (column.tabCode && column.tabCode === tabCode ) {
4107
+ return true
4108
+ } else if(column.children && column.children.length>0){
4109
+ return this.groupHeaderIsInTab(tabCode, column.children[0])
4110
+ }
4111
+ }
4112
+ },
4113
+ // 组合表头是否在“其它信息”页签内
4114
+ groupHeaderIsInOtherTab(column, columnProps) {
4115
+ if(column){
4116
+ if (column.prop && columnProps.indexOf(column.prop)>=0 ) {
4117
+ return true
4118
+ } else if(column.children && column.children.length>0){
4119
+ return this.groupHeaderIsInOtherTab(tabCode, column.children[0])
4120
+ }
4121
+ }
4030
4122
  }
4031
4123
  },
4032
4124
  emits: [