新增导出插件的可排序功能
This commit is contained in:
@@ -630,6 +630,42 @@ function fnExportAll() {
|
||||
onOk() {
|
||||
const key = 'exportAlarm';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
// 排序字段
|
||||
const sortData = {
|
||||
header: [
|
||||
'id',
|
||||
'neId',
|
||||
'neName',
|
||||
'neType',
|
||||
'ackState',
|
||||
'ackTime',
|
||||
'ackUser',
|
||||
'addInfo',
|
||||
'alarmCode',
|
||||
'alarmId',
|
||||
'alarmSeq',
|
||||
'alarmStatus',
|
||||
'alarmTitle',
|
||||
'alarmType',
|
||||
'clearTime',
|
||||
'clearType',
|
||||
'clearUser',
|
||||
'counter',
|
||||
'eventTime',
|
||||
'latestEventTime',
|
||||
'locationInfo',
|
||||
'objectName',
|
||||
'objectType',
|
||||
'objectUid',
|
||||
'origSeverity',
|
||||
'perceivedSeverity',
|
||||
'province',
|
||||
'pvFlag',
|
||||
'specificProblem',
|
||||
'specificProblemId',
|
||||
'timestamp',
|
||||
],
|
||||
};
|
||||
exportAll(queryParams).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
@@ -637,7 +673,7 @@ function fnExportAll() {
|
||||
key,
|
||||
duration: 3,
|
||||
});
|
||||
writeSheet(res.data, 'alarm').then(fileBlob =>
|
||||
writeSheet(res.data, 'alarm', sortData).then(fileBlob =>
|
||||
saveAs(fileBlob, `alarm_${Date.now()}.xlsx`)
|
||||
);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user