Commit e18ca613 by liucan

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

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