<template>
|
<div class="demo-progress border-r-small f-b">
|
<el-row>
|
<el-col span="8">
|
<el-progress :width="100" type="dashboard" :percentage="(finish / total) * 100">
|
<template #default="{ percentage }">
|
<span class="percentage-value">{{ percentage }}%</span>
|
<span class="percentage-label">{{ finish + '/' + total }}</span>
|
</template>
|
</el-progress>
|
</el-col>
|
<el-col span="16">
|
<div>{{ name }}</div>
|
<!-- <div>{{ planTime }}</div> -->
|
<div>{{ userName }}</div>
|
<el-row style="gap: 10px">
|
<div class="v-center" v-for="item in count" :key="item.sceneType">
|
<el-progress
|
:width="50"
|
:stroke-width="3"
|
type="dashboard"
|
:percentage="(item.finish / item.total) * 100"
|
>
|
<template #default="{ percentage }">
|
<span class="percentage-value-small">{{ percentage }}%</span>
|
</template>
|
</el-progress>
|
<div>
|
<el-text size="small">{{ item.sceneType }}</el-text>
|
<el-text size="small">{{ item.finish + '/' + item.total }}</el-text>
|
</div>
|
<div></div>
|
<!-- <div class="percentage-label-small">{{ item.sceneType }}</div> -->
|
<!-- <span class="percentage-label-small">{{ item.finish + '/' + item.total }} </span> -->
|
</div>
|
</el-row>
|
</el-col>
|
</el-row>
|
</div>
|
</template>
|
|
<script>
|
/**
|
* 巡查任务区域统计信息
|
*/
|
export default {
|
props: {
|
name: String,
|
district: String,
|
planTime: String,
|
startTime: String,
|
endTime: String,
|
userName: String,
|
status: String,
|
|
count: Array
|
},
|
data() {
|
return {}
|
},
|
watch: {},
|
computed: {
|
total() {
|
let t = 0
|
this.count.forEach((c) => {
|
t += c.total
|
})
|
return t
|
},
|
finish() {
|
let t = 0
|
this.count.forEach((c) => {
|
t += c.finish
|
})
|
return t
|
}
|
},
|
methods: {}
|
}
|
</script>
|
|
<style scoped>
|
.wrapper {
|
border: var(--el-border);
|
border-radius: var(--el-border-radius-base);
|
}
|
|
.percentage-value {
|
display: block;
|
margin-top: 10px;
|
font-size: var(--el-font-size-base);
|
}
|
.percentage-value-small {
|
display: block;
|
/* margin-top: 10px; */
|
font-size: var(--el-font-size-small);
|
}
|
.percentage-label {
|
display: block;
|
margin-top: 10px;
|
font-size: var(--el-font-size-base);
|
}
|
.percentage-label-small {
|
display: block;
|
/* margin-top: 10px; */
|
font-size: var(--el-font-size-small);
|
}
|
</style>
|