Commit 016e561b by liucan

fix:修改监控状态页面错误日志弹窗标题为"错误详情",任务执行记录页面优先加载当日数据

parent f19c6910
......@@ -2,7 +2,7 @@
<div class="dataCard">
<div class="titleStyle">错误日志统计</div>
<div class="chart-container" ref="chartRef"></div>
<el-dialog draggable v-model="DialogVisible" :title="`日志详情丨${curDate}`" @close="tableData = []">
<el-dialog draggable v-model="DialogVisible" :title="`错误详情丨${curDate}`" @close="tableData = []">
<div class="table-content">
<el-table :data="curTableData" border style="width: 100%">
<el-table-column width="55" label="序号" type="index" />
......
......@@ -102,7 +102,7 @@ zhCn.el.pagination.pageClassifier = "页";
const route = useRoute();
const router = useRouter();
//初始数据为近七天
const timeValue = ref([dayjs().subtract(7, "day").format("YYYY-MM-DD"), dayjs().format("YYYY-MM-DD")]);
const timeValue = ref<string[]>([]);
const tableData = ref([]);
const pageObj = ref({
total: 10,
......@@ -128,18 +128,34 @@ const tableLoading = ref(false);
//重置查询
const resetQuery = () => {
timeValue.value = [dayjs().subtract(7, "day").format("YYYY-MM-DD"), dayjs().format("YYYY-MM-DD")];
timeValue.value = [];
getData();
};
// 获取任务执行记录列表
const getData = async () => {
searchData();
let resTime: any[] = [];
resTime.push(dayjs().subtract(7, "day").format("YYYY-MM-DD HH:mm:ss"));
resTime.push(dayjs().format("YYYY-MM-DD HH:mm:ss"));
console.log(resTime);
tableLoading.value = true;
const res = await getSpiderTaskRecord({
page: pageObj.value.pageNo,
size: pageObj.value.pageSize,
status: "total",
times: resTime,
});
pageObj.value.total = res.data.total;
tableData.value = res.data.list;
console.log(tableData.value);
tableLoading.value = false;
};
//查询数据的方法
const searchData = async () => {
if (!timeValue.value) {
if (timeValue.value.length == 0) {
ElMessage.warning("请先选择时间段");
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment