2022-11-07 14:54:47 +08:00
|
|
|
<template>
|
2022-11-17 08:55:51 +08:00
|
|
|
<div class="state-box">
|
2022-11-07 14:54:47 +08:00
|
|
|
<span v-if="this.injectData.status === 1">
|
|
|
|
<svg-icon icon-class="yellow_dot" style="font-size: 14px; position: relative; top: .08em" />
|
|
|
|
在途
|
|
|
|
</span>
|
|
|
|
<span v-if="this.injectData.status === 2">
|
|
|
|
<svg-icon icon-class="blue_dot" style="font-size: 14px; position: relative; top: .08em" />
|
|
|
|
已下发
|
|
|
|
</span>
|
2022-11-17 08:55:51 +08:00
|
|
|
<span v-if="this.injectData.status === 3">
|
|
|
|
<svg-icon icon-class="green_dot" style="font-size: 14px; position: relative; top: .08em" />
|
|
|
|
已完成
|
|
|
|
</span>
|
|
|
|
<span v-if="this.injectData.status === 4">
|
|
|
|
<svg-icon icon-class="orange_dot" style="font-size: 14px; position: relative; top: .08em" />
|
|
|
|
待下发
|
|
|
|
</span>
|
2022-11-07 14:54:47 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'OrderStatus',
|
|
|
|
props: {
|
|
|
|
injectData: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
beilv: 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.beilv = document.getElementById('container').offsetWidth / 1920
|
|
|
|
window.addEventListener('resize', () => {
|
|
|
|
if (this.isFullScreen) {
|
|
|
|
this.beilv = document.body.offsetWidth / 1920
|
|
|
|
} else {
|
|
|
|
this.beilv = document.getElementById('container').offsetWidth / 1920
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2022-11-17 08:55:51 +08:00
|
|
|
<style scoped>
|
|
|
|
.state-box {
|
2022-11-18 17:01:42 +08:00
|
|
|
height: calc(15px * var(--beilv))
|
2022-11-17 08:55:51 +08:00
|
|
|
}
|
|
|
|
</style>
|