|
@@ -1,4 +1,5 @@
|
|
|
import request from '@/utils/request';
|
|
import request from '@/utils/request';
|
|
|
|
|
+import _ from 'lodash';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
@@ -66,9 +67,11 @@ export default {
|
|
|
if (res?.columnConfig?.length > 0) {
|
|
if (res?.columnConfig?.length > 0) {
|
|
|
//对比接口返回和本地columns
|
|
//对比接口返回和本地columns
|
|
|
let { nlist, type } = this.columnsContrast(res.columnConfig);
|
|
let { nlist, type } = this.columnsContrast(res.columnConfig);
|
|
|
|
|
+ const uniqueList = _.uniqBy(nlist, 'prop');
|
|
|
|
|
+ const uniqueLabelList = _.uniqBy(uniqueList, 'label');
|
|
|
//有更新则更新服务缓存配置
|
|
//有更新则更新服务缓存配置
|
|
|
if (type) {
|
|
if (type) {
|
|
|
- this.saveColumns(nlist);
|
|
|
|
|
|
|
+ this.saveColumns(uniqueLabelList);
|
|
|
}
|
|
}
|
|
|
this.setStorage(this.cacheKeyUrl + 'Cols', nlist);
|
|
this.setStorage(this.cacheKeyUrl + 'Cols', nlist);
|
|
|
// 更新列
|
|
// 更新列
|