|
|
@ -21,7 +21,7 @@ |
|
|
|
<span class="panel-con">{{ maintenanceDose }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="width: 95%; padding-left: 5%"> |
|
|
|
<div style="width: 95%; padding-left: 5%; position: relative"> |
|
|
|
<div style="width: 120%"> |
|
|
|
<span :style="{ marginLeft: percentA }" class="tips"> |
|
|
|
{{ info }} |
|
|
@ -32,6 +32,7 @@ |
|
|
|
<div class="flex-1" style="width: 106%; margin-left: -3%"> |
|
|
|
<div :key="index" class="flex-1" style="justify-content: center" v-for="(item, index) in lists">{{ item }}</div> |
|
|
|
</div> |
|
|
|
<div class="cir" v-if="cirAni"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -54,15 +55,18 @@ export default { |
|
|
|
}, |
|
|
|
lists: ['呼叫', '分诊', '一线', '采血', '心电', 'CT', '二线', '谈话', '签字', '团注', '介入', '置鞘', '病房'], |
|
|
|
info: '呼叫', |
|
|
|
cirAni: false, |
|
|
|
cirTimer: null, |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: mapState('messages', ['weightMessage', 'bolusDose', 'maintenanceDose', 'thrombolyticDose', 'startMessages', 'rfidMessage']), |
|
|
|
watch: { |
|
|
|
rfidMessage(val) { |
|
|
|
if (this.startMessages || val.step === '0') { |
|
|
|
if (this.startMessages || val.step === '0' || val.type - 0 === 0) { |
|
|
|
this.percent = 0; |
|
|
|
this.percentA = 0; |
|
|
|
this.info = '呼叫'; |
|
|
|
this.startCirAni(); |
|
|
|
this.setStartMessages(false); |
|
|
|
} else { |
|
|
|
if ((val.step || val.step === '0') && val.step - 0 >= (this.percent * 12) / 100 && val.step - 0 <= 12) { |
|
|
@ -79,11 +83,27 @@ export default { |
|
|
|
this.percent = 0; |
|
|
|
this.percentA = 0; |
|
|
|
this.info = '呼叫'; |
|
|
|
this.startCirAni(val); |
|
|
|
this.setStartMessages(false); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { ...mapMutations('messages', ['setStartMessages']) }, |
|
|
|
methods: { |
|
|
|
...mapMutations('messages', ['setStartMessages']), |
|
|
|
startCirAni(val) { |
|
|
|
console.log('val: ', val); |
|
|
|
if (!this.cirTimer) { |
|
|
|
const that = this; |
|
|
|
this.cirTimer = setInterval(() => { |
|
|
|
that.cirAni = !that.cirAni; |
|
|
|
}, 500); |
|
|
|
setTimeout(() => { |
|
|
|
clearInterval(that.cirTimer); |
|
|
|
that.cirTimer = null; |
|
|
|
}, 3100); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// mounted() { |
|
|
|
// const that = this; |
|
|
|
// var add = setInterval(function() { |
|
|
@ -100,6 +120,17 @@ export default { |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="stylus" scoped> |
|
|
|
.cir { |
|
|
|
position: absolute !important; |
|
|
|
top: 50% !important; |
|
|
|
margin-top: -8px !important; |
|
|
|
left: 8px !important; |
|
|
|
height: 16px !important; |
|
|
|
width: 16px !important; |
|
|
|
border-radius: 50% !important; |
|
|
|
background: #4ACA6D !important; |
|
|
|
} |
|
|
|
|
|
|
|
.panel-box { |
|
|
|
height: 100%; |
|
|
|
width: 100%; |
|
|
|