doway-coms 2.11.29 → 2.11.31

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": "doway-coms",
3
- "version": "2.11.29",
3
+ "version": "2.11.31",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -147,6 +147,7 @@ export default {
147
147
  }
148
148
  const column = {
149
149
  currentKey: item.currentKey,
150
+ type:item.type,
150
151
  field: item.field,
151
152
  title: item.title,
152
153
  visible: item.visible,
@@ -154,6 +155,7 @@ export default {
154
155
  width: item.width,
155
156
  filters: item.filters,
156
157
  order: item.order,
158
+ fixed:item.fixed
157
159
  }
158
160
  this.columns.push(column);
159
161
  })
@@ -214,11 +216,14 @@ export default {
214
216
  let tempObject = vm.columns.find(x => x.currentKey == item)
215
217
  let tempData = {
216
218
  field: tempObject.field,
217
- sort: index + 1,
219
+ sort: index + 1 + 100,//davis20250407 序号从100开始,防止和系统字段序号冲突
218
220
  hidden: !tempObject.visible,
219
221
  width: tempObject.width,
220
222
  extraInfo:{}
221
223
  }
224
+ if(tempObject.fixed){//设置固定列20250407 davis添加
225
+ tempData.extraInfo.fixed = tempObject.fixed
226
+ }
222
227
  if (tempObject.filters && tempObject.filters[0].data && tempObject.filters[0].data.bindingValues.length) {
223
228
  tempObject.filters[0].checked = true;
224
229
  tempData.extraInfo.filterExpression = tempObject.filters
@@ -2558,6 +2558,14 @@ export default {
2558
2558
  this.$refs.baseGrid.getTableColumn().collectColumn
2559
2559
  // 表格排序信息更新
2560
2560
  XEUtils.arrayEach(tableCollectColumn, (loopCol) => {
2561
+ if(loopCol.type==='seq'){
2562
+ loopCol.params.sort = 1
2563
+ return
2564
+ }
2565
+ if(loopCol.type==='checkbox'){
2566
+ loopCol.params.sort = 2
2567
+ return
2568
+ }
2561
2569
  const find = XEUtils.find(
2562
2570
  emitColumns.fields,
2563
2571
  (item) => loopCol.field === item.field
@@ -2651,11 +2659,21 @@ export default {
2651
2659
  let tableCollectColumn = XEUtils.toTreeArray(
2652
2660
  this.$refs.baseGrid.getTableColumn().collectColumn
2653
2661
  )
2662
+ let tempColumns = []
2663
+ //先查询固定列左边的
2664
+ let leftColumns =XEUtils.orderBy(XEUtils.filter(tableCollectColumn,p=>p.fixed==='left'),p=>p.sortNumber)
2665
+ //然后查询不是固定列的
2666
+ let commonColumns =XEUtils.orderBy(XEUtils.filter(tableCollectColumn,p=>p.fixed!=='left' && p.fixed!=='right'),p=>p.sortNumber)
2667
+ //最后再试固定列右边
2668
+ let rightColumns =XEUtils.orderBy(XEUtils.filter(tableCollectColumn,p=>p.fixed==='right'),p=>p.sortNumber)
2669
+
2670
+ tempColumns = [...leftColumns,...commonColumns,...rightColumns]
2671
+ // console.debug('tableCollectColumn',tempColumns)
2654
2672
  if (this.isSeqPopover) {
2655
- this.userDefineColumns = tableCollectColumn
2673
+ this.userDefineColumns = tempColumns
2656
2674
  } else {
2657
2675
  this.userDefineColumns = XEUtils.filter(
2658
- tableCollectColumn,
2676
+ tempColumns,
2659
2677
  (p) =>
2660
2678
  !p.children &&
2661
2679
  p.params.disableUserVisible !== true &&
@@ -3135,32 +3153,35 @@ export default {
3135
3153
  },
3136
3154
  reloadColumn(columns) {
3137
3155
  this.internalColumns = []
3138
- if (this.showSeq) {
3156
+
3157
+ columns.forEach((column) => {
3158
+ this.internalColumns.push(this.initColumns(column))
3159
+ })
3160
+ //注意,不能移到上面添加,会出现布局问题,暂时不知道什么原因????
3161
+ if (this.showCheckBox) {
3139
3162
  this.internalColumns.push({
3140
- type: 'seq',
3163
+ type: 'checkbox',
3141
3164
  fixed: 'left',
3142
- width: 50,
3143
- slots: {
3144
- header: 'seqHeader',
3145
- },
3165
+ width: 40,
3146
3166
  params: {
3147
3167
  disableUserVisible: true,
3148
3168
  },
3149
3169
  })
3150
3170
  }
3151
- if (this.showCheckBox) {
3171
+ if (this.showSeq) {
3152
3172
  this.internalColumns.push({
3153
- type: 'checkbox',
3173
+ type: 'seq',
3154
3174
  fixed: 'left',
3155
- width: 40,
3175
+ width: 50,
3176
+ slots: {
3177
+ header: 'seqHeader',
3178
+ },
3156
3179
  params: {
3157
3180
  disableUserVisible: true,
3158
3181
  },
3159
3182
  })
3160
3183
  }
3161
- columns.forEach((column) => {
3162
- this.internalColumns.push(this.initColumns(column))
3163
- })
3184
+
3164
3185
  //设置验证规则信息,如果没有验证规则的情况下一定要设置null值,设置{}的话会导致点击编辑行会有问题
3165
3186
  this.editRules =XEUtils.isEmpty(this.validRules)?null:this.validRules
3166
3187