自动保存上次筛选条件
This commit is contained in:
@@ -166,6 +166,8 @@ export class MainComponent implements OnInit {
|
||||
this.airline_color = JSON.parse(element.settingContent);
|
||||
} else if (element.groupCode === 'userSettingMsgAlert') {
|
||||
this.airline_message_alert = JSON.parse(element.settingContent).targetList;
|
||||
} else if (element.groupCode === 'userSettingSelected') {
|
||||
this.filterItems = JSON.parse(element.settingContent);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -264,14 +266,16 @@ export class MainComponent implements OnInit {
|
||||
//计算可视区域高度,渲染数据
|
||||
this.wait_render_data = combined_data;
|
||||
this.selectedFilterData = combined_data;
|
||||
this.calcVisibleCount()
|
||||
|
||||
this.selectChange('dynamic');
|
||||
this.calcVisibleCount();
|
||||
|
||||
//默认选中第一条
|
||||
if (this.render_data.length > 0) {
|
||||
this.row_state = this.render_data[0];
|
||||
}
|
||||
|
||||
this.operateSpinServiceService.hideSpin();
|
||||
// this.operateSpinServiceService.hideSpin();
|
||||
|
||||
//开始处理动态消息
|
||||
this.canHandleDynamicMessage = true;
|
||||
@@ -609,7 +613,7 @@ export class MainComponent implements OnInit {
|
||||
} else {
|
||||
this.dateFilterItem = '';
|
||||
}
|
||||
this.selectChange('filter');
|
||||
this.selectChange('time');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -620,6 +624,18 @@ export class MainComponent implements OnInit {
|
||||
this.positionedArray = [];
|
||||
this.positionArrayIndex = 0;
|
||||
this.operateSpinServiceService.showSpin();
|
||||
let settingContent = JSON.stringify(this.filterItems);
|
||||
this.httpCilent.post('/adminapi/settings/uisettings', {
|
||||
envCode: 'web',
|
||||
groupCode: 'userSettingSelected',
|
||||
settingContent: settingContent,
|
||||
}).subscribe(() => {
|
||||
console.log('保存UIsetting成功!');
|
||||
})
|
||||
} else if (type === 'time') {
|
||||
this.positionedArray = [];
|
||||
this.positionArrayIndex = 0;
|
||||
this.operateSpinServiceService.showSpin();
|
||||
}
|
||||
|
||||
let filter_data = [];
|
||||
|
||||
Reference in New Issue
Block a user