|
@@ -599,7 +599,7 @@ const getQueryDataRangeSpeed = async () => {
|
|
count:Number(valueObj.batch_size),
|
|
count:Number(valueObj.batch_size),
|
|
time:Number(valueObj.interval)
|
|
time:Number(valueObj.interval)
|
|
}
|
|
}
|
|
- mockStart()
|
|
|
|
|
|
+ mockStart(true)
|
|
};
|
|
};
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
getcateData();
|
|
getcateData();
|
|
@@ -715,7 +715,7 @@ const setParamsHl = (start: string, end: string) => {
|
|
];
|
|
];
|
|
setConditionTime({"min_time":hlQueryParams.value.eDate[0],"max_time":hlQueryParams.value.eDate[1]})
|
|
setConditionTime({"min_time":hlQueryParams.value.eDate[0],"max_time":hlQueryParams.value.eDate[1]})
|
|
};
|
|
};
|
|
-const mockStart = () => {
|
|
|
|
|
|
+const mockStart = async (state:boolean=false) => {
|
|
if (queryParamsMock.value.time > 60) {
|
|
if (queryParamsMock.value.time > 60) {
|
|
ElMessage({
|
|
ElMessage({
|
|
message: `最大不超过60s`,
|
|
message: `最大不超过60s`,
|
|
@@ -730,7 +730,19 @@ const mockStart = () => {
|
|
});
|
|
});
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- lineParamsAllRef.value = [];
|
|
|
|
|
|
+ // mounted进来使用缓存接口数据
|
|
|
|
+ if (state) {
|
|
|
|
+ let resultCatch= await mockCacheData({})
|
|
|
|
+ lineParamsAllRef.value = resultCatch.data.map((its:any) => {
|
|
|
|
+ return {
|
|
|
|
+ data: its,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+ // debugger
|
|
|
|
+ }else{
|
|
|
|
+
|
|
|
|
+ lineParamsAllRef.value = [];
|
|
|
|
+ }
|
|
seriesData.value = [
|
|
seriesData.value = [
|
|
{
|
|
{
|
|
name: "趋势",
|
|
name: "趋势",
|
|
@@ -746,7 +758,8 @@ const mockStart = () => {
|
|
start: queryParamsMock.value.sDate,
|
|
start: queryParamsMock.value.sDate,
|
|
end: queryParamsMock.value.eDate,
|
|
end: queryParamsMock.value.eDate,
|
|
});
|
|
});
|
|
- updateDataRangeSpeed({
|
|
|
|
|
|
+ if (!state) {
|
|
|
|
+ updateDataRangeSpeed({
|
|
start_time: moment(queryParamsMock.value.sDate).format(
|
|
start_time: moment(queryParamsMock.value.sDate).format(
|
|
"YYYY-MM-DD HH:mm:ss"
|
|
"YYYY-MM-DD HH:mm:ss"
|
|
),
|
|
),
|
|
@@ -759,6 +772,8 @@ const mockStart = () => {
|
|
type: "success",
|
|
type: "success",
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
+ }
|
|
|
|
+
|
|
};
|
|
};
|
|
let cateBigRef = ref([]);
|
|
let cateBigRef = ref([]);
|
|
let cateSmallRef = ref([]);
|
|
let cateSmallRef = ref([]);
|