Commit 6505a2d5 authored by 张伯涛's avatar 张伯涛

一键停止倒计时结束后添加文字提示

parent 87220694
...@@ -787,7 +787,7 @@ async function OnekeyStop(){ ...@@ -787,7 +787,7 @@ async function OnekeyStop(){
isLoading.value = false; isLoading.value = false;
return; return;
} }
isWait.value = false
isStop.value = true; isStop.value = true;
countDown.value = 180; countDown.value = 180;
isRunning.value = true; isRunning.value = true;
...@@ -995,7 +995,6 @@ async function OnekeyStopEnd() { ...@@ -995,7 +995,6 @@ async function OnekeyStopEnd() {
} }
finally { finally {
isLoading.value = false; isLoading.value = false;
isWait.value = false;
} }
} }
...@@ -1018,7 +1017,8 @@ function getSteps() { ...@@ -1018,7 +1017,8 @@ function getSteps() {
// 一键启动 // 一键启动
if(res.code === 200) { if(res.code === 200) {
// 获取的数组里,runStart和stopStart有一个是true就输出 // 获取的数组里,runStart和stopStart有一个是true就输出
const item = res.data.find(item => (item.runStart === true && item.stopStart === false) || (item.runStart === false && item.stopStart === true )) // const item = res.data.find(item => (item.runStart === true && item.stopStart === false) || (item.runStart === false && item.stopStart === true ))
const item = res.data.find(item => (item.runStart === true || item.stopStart === true ))
// 获取的数组里,都是false就输出第一个 // 获取的数组里,都是false就输出第一个
const itemTwo = res.data.find(item => item.unitId === transferId.value) const itemTwo = res.data.find(item => item.unitId === transferId.value)
// console.log('item',item) // console.log('item',item)
...@@ -1027,6 +1027,7 @@ function getSteps() { ...@@ -1027,6 +1027,7 @@ function getSteps() {
if( isLoading.value === false) { if( isLoading.value === false) {
if(item.stopStart === true) { if(item.stopStart === true) {
isStop.value = true; isStop.value = true;
isWait.value = false
startCountdownTwo(); startCountdownTwo();
}else { }else {
clearInterval(timerTwo) clearInterval(timerTwo)
...@@ -1120,6 +1121,7 @@ const startTimer = () => { ...@@ -1120,6 +1121,7 @@ const startTimer = () => {
if (isRunning.value === true && countDown.value > 0) { if (isRunning.value === true && countDown.value > 0) {
countDown.value--; countDown.value--;
} else { } else {
isWait.value = true
clearInterval(timer); clearInterval(timer);
isRunning.value = false; isRunning.value = false;
} }
...@@ -1132,6 +1134,8 @@ const startTimerTwo = () => { ...@@ -1132,6 +1134,8 @@ const startTimerTwo = () => {
if ( countDown.value > 0) { if ( countDown.value > 0) {
countDown.value--; countDown.value--;
} else { } else {
isStop.value = false
isWait.value = true
clearInterval(timerTwo); clearInterval(timerTwo);
} }
}, 1000); }, 1000);
......
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