vue2-client 1.14.95 → 1.14.97

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.14.95",
3
+ "version": "1.14.97",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -362,6 +362,11 @@ export default {
362
362
  type: Number,
363
363
  default: 80
364
364
  },
365
+ // 是否禁用右侧操作行为
366
+ disableAction: {
367
+ type: Boolean,
368
+ default: false
369
+ },
365
370
  // 额外参数,用于控制组件行为
366
371
  extraParams: {
367
372
  type: Object,
@@ -541,6 +546,7 @@ export default {
541
546
  env: this.env,
542
547
  form: this.$refs.xForm.form,
543
548
  summaryUpdate: true,
549
+ disableAction: this.disableAction,
544
550
  ...res
545
551
  })
546
552
  if (this.realQueryConfig?.funcData?.pageMounted) {
@@ -151,6 +151,7 @@
151
151
  <template v-if="isTableMode">
152
152
  <x-table-wrapper
153
153
  ref="table"
154
+ :disableAction="disableAction"
154
155
  @rowClick="handleRowClick"
155
156
  @beforeDataChange="beforeDataChange"
156
157
  @expand="onExpand">
@@ -458,7 +459,9 @@ export default {
458
459
  selectRowMode: 'default',
459
460
  tableSize: 'default',
460
461
  clearSelectRowAfterQuery: false,
461
- selectedRowModalVisible: false
462
+ selectedRowModalVisible: false,
463
+ // 是否禁用右侧操作行为
464
+ disableAction: false
462
465
  }
463
466
  },
464
467
  props: {
@@ -739,7 +742,8 @@ export default {
739
742
  printTemplate = 'DEFAULT_CRUD_PRINT_TEMPLATE',
740
743
  selectRowMode = 'default',
741
744
  tableSize = 'default',
742
- clearSelectRowAfterQuery = false
745
+ clearSelectRowAfterQuery = false,
746
+ disableAction = false
743
747
  } = params
744
748
  this.showSummary = Object.keys(tableSummaryMap).length > 0
745
749
  if (this.showSummary) {
@@ -792,6 +796,7 @@ export default {
792
796
  this.selectRowMode = selectRowMode
793
797
  this.tableSize = tableSize
794
798
  this.clearSelectRowAfterQuery = clearSelectRowAfterQuery
799
+ this.disableAction = disableAction
795
800
  if (this.chartsConfigArray.length > 0) {
796
801
  // 循环chartsConfigArray,将每个配置的数据请求参数赋值给requestParameters
797
802
  this.chartsConfigArray.forEach(item => {
@@ -5,7 +5,7 @@
5
5
  ref="expandableTable"
6
6
  :id="tableContext.uniqueId"
7
7
  :alert="true"
8
- :columns="tableContext.tableColumns"
8
+ :columns="realTableColumns"
9
9
  :data="loadData()"
10
10
  :rowKey="tableContext.rowKey"
11
11
  :showSummary="tableContext.showSummary"
@@ -24,7 +24,7 @@
24
24
  @rowClick="handleRowClick"
25
25
  >
26
26
  <template
27
- v-for="(item, c_index) in tableContext.tableColumns"
27
+ v-for="(item, c_index) in realTableColumns"
28
28
  :slot="item.dataIndex"
29
29
  slot-scope="text, record, index">
30
30
  <template v-if="tableContext.isEditMode && getFromItem(item.dataIndex,text, record, index)">
@@ -140,7 +140,7 @@
140
140
  ref="simpleTable"
141
141
  :id="tableContext.uniqueId"
142
142
  :alert="true"
143
- :columns="tableContext.tableColumns"
143
+ :columns="realTableColumns"
144
144
  :data="loadData()"
145
145
  :rowKey="tableContext.rowKey"
146
146
  :showSummary="tableContext.showSummary"
@@ -158,7 +158,7 @@
158
158
  @beforeDataChange="beforeDataChange"
159
159
  >
160
160
  <template
161
- v-for="(item, c_index) in tableContext.tableColumns"
161
+ v-for="(item, c_index) in realTableColumns"
162
162
  :slot="item.dataIndex"
163
163
  slot-scope="text, record, index">
164
164
  <template v-if="tableContext.isEditMode && getFromItem(item.dataIndex,text, record, index)">
@@ -287,6 +287,9 @@ export default {
287
287
  // 获取当前活动的表格实例
288
288
  activeTable () {
289
289
  return this.tableContext.expandedGrid ? this.$refs.expandableTable : this.$refs.simpleTable
290
+ },
291
+ realTableColumns () {
292
+ return this.tableContext.tableColumns.filter(item => item.slotType !== 'action' || !this.disableAction)
290
293
  }
291
294
  },
292
295
  props: {
@@ -294,6 +297,10 @@ export default {
294
297
  type: Boolean,
295
298
  required: false,
296
299
  default: false
300
+ },
301
+ disableAction: {
302
+ type: Boolean,
303
+ default: false
297
304
  }
298
305
  },
299
306
  inject: ['tableContext'],
@@ -384,11 +391,11 @@ export default {
384
391
  if (aa) {
385
392
  const tempConfig = JSON.parse(JSON.stringify(aa))
386
393
  // 如果找到了字段
387
- const ColumnIndex = this.tableContext.tableColumns.findIndex(item => item.dataIndex === model)
394
+ const ColumnIndex = this.realTableColumns.findIndex(item => item.dataIndex === model)
388
395
  // 并且表单项是日期框
389
396
  if (ColumnIndex !== -1 && ['yearPicker', 'monthPicker', 'datePicker', 'rangePicker'].includes(tempConfig.type)) {
390
397
  // 修改他的列宽
391
- this.tableContext.tableColumns[ColumnIndex].width = 220
398
+ this.realTableColumns[ColumnIndex].width = 220
392
399
  }
393
400
  // 如果有检验规则检验是数字
394
401
  if (ColumnIndex !== -1 && ['number', 'integer', 'float'].includes(tempConfig?.rule?.type)) {