进度条微调
This commit is contained in:
@@ -19,6 +19,6 @@ VITE_API_URL=/api
|
|||||||
|
|
||||||
# 开发环境跨域代理,支持配置多个
|
# 开发环境跨域代理,支持配置多个
|
||||||
|
|
||||||
VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]
|
VITE_PROXY=[["/api","http://192.168.1.124:18092/"]]
|
||||||
# VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]
|
# VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]
|
||||||
# VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文
|
# VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文
|
||||||
|
|||||||
@@ -337,6 +337,9 @@ const handlePreTest = () => {
|
|||||||
ElMessage.success("启动预检测");
|
ElMessage.success("启动预检测");
|
||||||
currentIndex = 0;
|
currentIndex = 0;
|
||||||
percentage.value = 0;
|
percentage.value = 0;
|
||||||
|
statusList.value = [];
|
||||||
|
deviceTestList.value = [];
|
||||||
|
statusId.value = 0;
|
||||||
testModel.value = "preTest"
|
testModel.value = "preTest"
|
||||||
beforeTest.value = false;
|
beforeTest.value = false;
|
||||||
getTreeData(preTestData)
|
getTreeData(preTestData)
|
||||||
@@ -371,6 +374,9 @@ const handleAutoTest = () => {
|
|||||||
ElMessage.success("启动正式检测");
|
ElMessage.success("启动正式检测");
|
||||||
currentIndex = 0;
|
currentIndex = 0;
|
||||||
percentage.value = 0;
|
percentage.value = 0;
|
||||||
|
statusList.value = [];
|
||||||
|
deviceTestList.value = [];
|
||||||
|
statusId.value = 0;
|
||||||
testModel.value = "Test"
|
testModel.value = "Test"
|
||||||
beforeTest.value = false;
|
beforeTest.value = false;
|
||||||
getTreeData(data)
|
getTreeData(data)
|
||||||
@@ -410,9 +416,9 @@ const customColors = [
|
|||||||
//加载进度条
|
//加载进度条
|
||||||
const refreshProgress = () => {
|
const refreshProgress = () => {
|
||||||
|
|
||||||
console.log(currentIndex,totalNum)
|
console.log(currentIndex,totalNum,percentage.value)
|
||||||
if (percentage.value < 100) {
|
if (percentage.value < 100) {
|
||||||
percentage.value = Math.trunc(currentIndex/totalNum) * 100;
|
percentage.value = Math.trunc(currentIndex/totalNum * 100);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@@ -422,7 +428,7 @@ const refreshProgress = () => {
|
|||||||
let strTemp = ""
|
let strTemp = ""
|
||||||
if(testModel.value === "preTest")
|
if(testModel.value === "preTest")
|
||||||
strTemp = "预检测过程全部结束"
|
strTemp = "预检测过程全部结束"
|
||||||
else if(testModel.value === "test")
|
else if(testModel.value === "Test")
|
||||||
strTemp = "正式检测全部结束"
|
strTemp = "正式检测全部结束"
|
||||||
|
|
||||||
statusId.value++;
|
statusId.value++;
|
||||||
@@ -431,17 +437,12 @@ const refreshProgress = () => {
|
|||||||
remark: strTemp,
|
remark: strTemp,
|
||||||
status: 0,
|
status: 0,
|
||||||
});
|
});
|
||||||
statusList.value.map((item: any, index: any) => {
|
|
||||||
if (index == statusList.value.length - 1) {
|
|
||||||
item.status = 1;
|
|
||||||
} else {
|
|
||||||
item.status = 0;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
console.log("检测结束")
|
||||||
if(testModel.value === "preTest")
|
if(testModel.value === "preTest")
|
||||||
ElMessage.success("预检测过程全部结束")
|
ElMessage.success("预检测过程全部结束")
|
||||||
else if(testModel.value === "test")
|
else if(testModel.value === "Test")
|
||||||
ElMessage.success("正式检测全部结束,你可以停留在此页面查看检测结果,或返回首页进行复检、报告生成和归档等操作")
|
ElMessage.success("正式检测全部结束,你可以停留在此页面查看检测结果,或返回首页进行复检、报告生成和归档等操作")
|
||||||
|
|
||||||
// percentage.value = 0;
|
// percentage.value = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user