|
@ -1,23 +1,16 @@ |
|
|
<!-- |
|
|
|
|
|
* @Author: aBin |
|
|
|
|
|
* @email: binbin0314@126.com |
|
|
|
|
|
* @Date: 2021-07-19 15:47:38 |
|
|
|
|
|
* @LastEditors: aBin |
|
|
|
|
|
* @LastEditTime: 2021-07-19 19:39:36 |
|
|
|
|
|
--> |
|
|
|
|
|
<template> |
|
|
<template> |
|
|
<view> |
|
|
<view> |
|
|
<view class="rounded-full h-7 w-7 flex items-center justify-center text-blue-400" v-if="status === 0" @tap="changeStatus($event, 0)"> |
|
|
<view class="flex items-center justify-center text-blue-400 rounded-full h-7 w-7" v-if="status === 0" @tap="changeStatus($event, 0)"> |
|
|
<u-circle-progress :percent="100" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="4" width="66"> |
|
|
<u-circle-progress :percent="100" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="4" width="66"> |
|
|
<view class="u-progress-content"> |
|
|
<view class="u-progress-content"> |
|
|
<view class="u-progress-dot"></view> |
|
|
<view class="u-progress-dot"></view> |
|
|
<text class="u-progress-info"> |
|
|
<view class="u-progress-info"> |
|
|
<u-icon name="checkmark" size="30"></u-icon> |
|
|
<u-icon name="checkmark" size="30"></u-icon> |
|
|
</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</u-circle-progress> |
|
|
</u-circle-progress> |
|
|
</view> |
|
|
</view> |
|
|
<view class="rounded-full h-7 w-7 flex items-center justify-center text-black" v-if="status === 1" @tap="changeStatus($event, 1)"> |
|
|
<view class="flex items-center justify-center text-black rounded-full h-7 w-7" v-if="status === 1" @tap="changeStatus($event, 1)"> |
|
|
<u-circle-progress :percent="80" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66"> |
|
|
<u-circle-progress :percent="80" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66"> |
|
|
<view class="u-progress-content"> |
|
|
<view class="u-progress-content"> |
|
|
<view class="u-progress-dot"></view> |
|
|
<view class="u-progress-dot"></view> |
|
@ -25,27 +18,27 @@ |
|
|
</view> |
|
|
</view> |
|
|
</u-circle-progress> |
|
|
</u-circle-progress> |
|
|
</view> |
|
|
</view> |
|
|
<view class="rounded-full h-7 w-7 flex items-center justify-center text-gray-400" v-if="status === 2" @tap="changeStatus($event, 2)"> |
|
|
<view class="flex items-center justify-center text-gray-400 rounded-full h-7 w-7" v-if="status === 2" @tap="changeStatus($event, 2)"> |
|
|
<u-circle-progress :percent="40" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66"> |
|
|
<u-circle-progress :percent="40" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66"> |
|
|
<view class="u-progress-content"> |
|
|
<view class="u-progress-content"> |
|
|
<view class="u-progress-dot"></view> |
|
|
<view class="u-progress-dot"></view> |
|
|
<text class="u-progress-info"> |
|
|
<view class="u-progress-info"> |
|
|
<u-icon name="play-right-fill" size="30"></u-icon> |
|
|
<u-icon name="play-right-fill" size="30"></u-icon> |
|
|
</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</u-circle-progress> |
|
|
</u-circle-progress> |
|
|
</view> |
|
|
</view> |
|
|
<view |
|
|
<view |
|
|
class="rounded-full h-7 w-7 flex items-center justify-center text-red-800 font-black" |
|
|
class="flex items-center justify-center font-black text-red-800 rounded-full h-7 w-7" |
|
|
v-if="status === 3" |
|
|
v-if="status === 3" |
|
|
@tap="changeStatus($event, 3)" |
|
|
@tap="changeStatus($event, 3)" |
|
|
> |
|
|
> |
|
|
<u-circle-progress :percent="80" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66"> |
|
|
<u-circle-progress :percent="80" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66"> |
|
|
<view class="u-progress-content"> |
|
|
<view class="u-progress-content"> |
|
|
<view class="u-progress-dot"></view> |
|
|
<view class="u-progress-dot"></view> |
|
|
<text class="u-progress-info"> |
|
|
<view class="u-progress-info"> |
|
|
<u-icon name="pause" size="30"></u-icon> |
|
|
<u-icon name="pause" size="30"></u-icon> |
|
|
</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</u-circle-progress> |
|
|
</u-circle-progress> |
|
|
</view> |
|
|
</view> |
|
@ -53,56 +46,30 @@ |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import { mapMutations } from 'vuex'; |
|
|
import { mapMutations } from 'vuex'; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'TimeStatus', |
|
|
name: 'TimeStatus', |
|
|
props: { |
|
|
props: { |
|
|
status: { |
|
|
status: { default: 0, type: Number }, |
|
|
default: 0, |
|
|
content: { default: '', type: String }, |
|
|
type: Number, |
|
|
|
|
|
}, |
|
|
|
|
|
content: { |
|
|
|
|
|
default: '', |
|
|
|
|
|
type: String, |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
time: 20, |
|
|
time: 20, |
|
|
start: [ |
|
|
start: [{ text: '确认开始任务', color: 'blue' }], |
|
|
{ |
|
|
pause: [{ text: '继续' }, { text: '重新开始任务', color: 'blue' }, { text: '结束' }], |
|
|
text: '确认开始任务', |
|
|
proceed: [{ text: '暂停' }, { text: '重新开始任务', color: 'blue' }, { text: '结束' }], |
|
|
color: 'blue', |
|
|
again: [{ text: '重新开始任务', color: 'blue' }], |
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
pause: [ |
|
|
|
|
|
{ text: '继续' }, |
|
|
|
|
|
{ |
|
|
|
|
|
text: '重新开始任务', |
|
|
|
|
|
color: 'blue', |
|
|
|
|
|
}, |
|
|
|
|
|
{ text: '结束' }, |
|
|
|
|
|
], |
|
|
|
|
|
proceed: [ |
|
|
|
|
|
{ text: '暂停' }, |
|
|
|
|
|
{ |
|
|
|
|
|
text: '重新开始任务', |
|
|
|
|
|
color: 'blue', |
|
|
|
|
|
}, |
|
|
|
|
|
{ text: '结束' }, |
|
|
|
|
|
], |
|
|
|
|
|
again: [ |
|
|
|
|
|
{ |
|
|
|
|
|
text: '重新开始任务', |
|
|
|
|
|
color: 'blue', |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
...mapMutations('home', ['setClient', 'setTips', 'setStatus', 'setTipsContent']), |
|
|
...mapMutations('home', ['setClient', 'setTips', 'setStatus', 'setTipsContent']), |
|
|
|
|
|
|
|
|
chooseList() { |
|
|
chooseList() { |
|
|
return this.start; |
|
|
return this.start; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
changeStatus(e, num) { |
|
|
changeStatus(e, num) { |
|
|
this.setStatus(num); |
|
|
this.setStatus(num); |
|
|
this.setTipsContent(this.chooseTips(num, this.content)); |
|
|
this.setTipsContent(this.chooseTips(num, this.content)); |
|
@ -113,6 +80,7 @@ export default { |
|
|
this.setClient(client); |
|
|
this.setClient(client); |
|
|
this.setTips(true); |
|
|
this.setTips(true); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
chooseTips(num, content) { |
|
|
chooseTips(num, content) { |
|
|
switch (num) { |
|
|
switch (num) { |
|
|
case 0: |
|
|
case 0: |
|
|