Commit e18ca613 by liucan

feat:任务执行界面默认加载近七天数据

parent bc1a6cea
......@@ -74,4 +74,4 @@ app.use(router);
app.use(pinia);
app.use(ElementPlus, { size: "default" });
app.mount("#app");
app.mount("#app");
\ No newline at end of file
......@@ -111,7 +111,6 @@ import { getSpiderList, addSateNo, getSateIdList } from "@/api/system.ts";
import NoItem from "./components/NoItem.vue";
import { ElMessage, type UploadProps, type UploadRawFile } from "element-plus";
import MenuTitle from "@/components/MenuTitle.vue";
import { number } from "echarts";
const router = useRouter();
const tableData = ref([]);
......
......@@ -17,6 +17,7 @@
date-format="YYYY/MM/DD ddd"
time-format="A hh:mm:ss"
value-format="YYYY-MM-DD"
style="width: 250px"
/>
</el-config-provider>
</div>
......@@ -122,17 +123,12 @@ const tableLoading = ref(false);
//重置查询
const resetQuery = () => {
timeValue.value = [];
timeValue.value = [dayjs().subtract(7, "day").format("YYYY-MM-DD"), dayjs().format("YYYY-MM-DD")];
getData();
};
// 获取任务执行记录列表
const getData = async () => {
// tableLoading.value = true;
// const res = await getSpiderTaskRecord({ page: pageObj.value.pageNo, size: pageObj.value.pageSize, status: "total" });
// pageObj.value.total = res.data.total;
// tableData.value = res.data.list;
// tableLoading.value = false;
searchData();
};
......@@ -145,8 +141,10 @@ const searchData = async () => {
let resTime: any[] = [];
const startTime = timeValue.value[0];
const endTime = timeValue.value[1];
resTime.push(startTime);
resTime.push(endTime);
resTime.push(startTime + " 00:00:00");
resTime.push(endTime + " 00:00:00");
console.log(resTime);
tableLoading.value = true;
const res = await getSpiderTaskRecord({
page: pageObj.value.pageNo,
......
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