doway-coms 1.6.73 → 1.6.74
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
|
@@ -107,26 +107,7 @@ export default {
|
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
created() {
|
|
110
|
-
this.
|
|
111
|
-
// 设置唯一标识,用于保存时找到字段并重新排序
|
|
112
|
-
this.adjustUserDefineColumns.forEach((x, index)=> x.currentKey = index + x.field)
|
|
113
|
-
this.columns = [];
|
|
114
|
-
this.adjustUserDefineColumns.forEach((item) => {
|
|
115
|
-
// 去除操作列和序号、多选框列
|
|
116
|
-
if (item.field === "operation" || item.field == undefined) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
const column = {
|
|
120
|
-
currentKey: item.currentKey,
|
|
121
|
-
field: item.field,
|
|
122
|
-
title: item.title,
|
|
123
|
-
visible: item.visible,
|
|
124
|
-
width: item.width,
|
|
125
|
-
filters: item.filters,
|
|
126
|
-
order: item.order,
|
|
127
|
-
}
|
|
128
|
-
this.columns.push(column);
|
|
129
|
-
})
|
|
110
|
+
this.setColumnsOptions()
|
|
130
111
|
},
|
|
131
112
|
mounted() {
|
|
132
113
|
// 初始排序数组
|
|
@@ -134,6 +115,28 @@ export default {
|
|
|
134
115
|
this.setOptions()
|
|
135
116
|
},
|
|
136
117
|
methods: {
|
|
118
|
+
setColumnsOptions() {
|
|
119
|
+
this.adjustUserDefineColumns = this.userDefineColumns;
|
|
120
|
+
// 设置唯一标识,用于保存时找到字段并重新排序
|
|
121
|
+
this.adjustUserDefineColumns.forEach((x, index)=> x.currentKey = index + x.field)
|
|
122
|
+
this.columns = [];
|
|
123
|
+
this.adjustUserDefineColumns.forEach((item) => {
|
|
124
|
+
// 去除操作列和序号、多选框列
|
|
125
|
+
if (item.field === "operation" || item.field == undefined) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const column = {
|
|
129
|
+
currentKey: item.currentKey,
|
|
130
|
+
field: item.field,
|
|
131
|
+
title: item.title,
|
|
132
|
+
visible: item.visible,
|
|
133
|
+
width: item.width,
|
|
134
|
+
filters: item.filters,
|
|
135
|
+
order: item.order,
|
|
136
|
+
}
|
|
137
|
+
this.columns.push(column);
|
|
138
|
+
})
|
|
139
|
+
},
|
|
137
140
|
// 配置方法
|
|
138
141
|
setOptions() {
|
|
139
142
|
var vm = this
|
|
@@ -204,6 +207,14 @@ export default {
|
|
|
204
207
|
})
|
|
205
208
|
saveUserModuleDataFieldApi(postData)
|
|
206
209
|
.then(res => {
|
|
210
|
+
// 更改columns序号
|
|
211
|
+
// vm.columns.forEach(column => {
|
|
212
|
+
// let tempObject = postData.fields.find(x => x.field == column.field)
|
|
213
|
+
// if (tempObject) {
|
|
214
|
+
// column.sort = tempObject.sort
|
|
215
|
+
// }
|
|
216
|
+
// })
|
|
217
|
+
// console.log('1',vm.columns);
|
|
207
218
|
// 返回表格组件触发更新
|
|
208
219
|
vm.$emit('saveSeqConfig',postData, res.content)
|
|
209
220
|
})
|
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
:height="height"
|
|
102
102
|
:userDefineColumns="userDefineColumns"
|
|
103
103
|
ref="baseAdjustGridView"
|
|
104
|
+
@saveSeqConfig="saveSeqConfig"
|
|
104
105
|
/>
|
|
105
106
|
</template>
|
|
106
107
|
<div @click="clickHeader" v-if="moduleCode && dataCode" >
|
|
@@ -741,7 +742,7 @@ export default {
|
|
|
741
742
|
props: {
|
|
742
743
|
isSeqPopover: {
|
|
743
744
|
type: Boolean,
|
|
744
|
-
default:
|
|
745
|
+
default: false,
|
|
745
746
|
},
|
|
746
747
|
showOverFlow: {
|
|
747
748
|
type: Boolean,
|
|
@@ -1867,9 +1868,9 @@ export default {
|
|
|
1867
1868
|
let tableCollectColumn = this.$refs.baseGrid.getTableColumn().collectColumn;
|
|
1868
1869
|
// 表格排序信息更新
|
|
1869
1870
|
XEUtils.arrayEach(tableCollectColumn, (loopCol) => {
|
|
1870
|
-
const find = XEUtils.find(emitColumns, item => loopCol.field === item.field)
|
|
1871
|
+
const find = XEUtils.find(emitColumns.fields, item => loopCol.field === item.field)
|
|
1871
1872
|
if (find) {
|
|
1872
|
-
loopCol.sort = find.sort
|
|
1873
|
+
loopCol.params.sort = find.sort
|
|
1873
1874
|
}
|
|
1874
1875
|
})
|
|
1875
1876
|
//设置表格顺序
|
|
@@ -1878,9 +1879,11 @@ export default {
|
|
|
1878
1879
|
(p) => p.params.sort
|
|
1879
1880
|
);
|
|
1880
1881
|
// 更新表格
|
|
1881
|
-
|
|
1882
|
+
this.$refs.baseGrid.reloadColumn(tableCollectColumn)
|
|
1883
|
+
this.userDefineColumns = this.tableCollectColumn
|
|
1884
|
+
// this.$refs.baseAdjustGridView.setColumnsOptions()
|
|
1882
1885
|
//清空store缓存
|
|
1883
|
-
|
|
1886
|
+
this.$store.commit(
|
|
1884
1887
|
"SET_MODULE_VIEW_INFO",{
|
|
1885
1888
|
moduleCode:this.moduleCode,
|
|
1886
1889
|
info: resData
|