日志导出修改

master
leo 3 years ago
parent bbea985a98
commit 643e11a3c3

@ -82,6 +82,15 @@ export async function getLogPageList(param, controller) {
return result;
}
// 下载日志
export async function downloadLogs(param, controller) {
let result = {};
await http.post('/api/' + controller + '/DownloadLogs', param).then((data) => {
result = data;
});
return result;
}
export async function GetFormulaPageList(param, controller) {
param = param || { FPageIndex: 1, FPageSize: 10 };
let result = {};

@ -34,8 +34,8 @@
v-model:selectedKeys="selectedKeys" :default-toolbar="defaultToolbar"
:page="dataList.length>0?pageInfo:null" @change="changePage">
<template v-slot:toolbar>
<!-- <lay-button size="sm" @click="_getPageList(false,true)"></lay-button> -->
<!-- <lay-button size="sm" type="normal" @click="showEditMaterial(1)"></lay-button> -->
<lay-button size="sm" @click="_getPageList(false,true)"></lay-button>
<lay-button size="sm" type="normal" @click="downLogs()"></lay-button>
</template>
</lay-table>
</lay-card>
@ -59,7 +59,8 @@
} from "vue";
import {
getBasicList,
getLogPageList
getLogPageList,
downloadLogs
} from "/src/api/api/common";
import AddMateria from '../materia/components/AddMateria.vue';
import EditMateria from '../materia/components/EditMateria.vue';
@ -311,6 +312,17 @@
showRefresh: true
});
this._clickSearch();
},
//
async downLogs() {
let idx = layer.load(2);
let result = await downloadLogs({
limit: 1000
}, "OperateLog");
layer.close(idx);
if (result.Code == "200") {
window.location.href = result.Data
}
}
}
}

Loading…
Cancel
Save