2022-10-17 10:13:22 +08:00
|
|
|
<!-- 步骤条 -->
|
|
|
|
|
<template>
|
2022-10-25 14:01:28 +08:00
|
|
|
<div class="list progress" id="scrollBox">
|
2022-10-24 10:19:15 +08:00
|
|
|
<div :ops="ops" class="list-item progress-item" v-for="(item, index) in list" :key="index">
|
2022-10-22 18:06:19 +08:00
|
|
|
<div :class="['progress-item-dot', { active: projectData.constructionStage-1 >= index }]"></div>
|
2022-10-17 10:13:22 +08:00
|
|
|
<div class="info">
|
2022-10-22 18:06:19 +08:00
|
|
|
<span class="label">{{ item.name }}</span>
|
2022-10-17 10:13:22 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-10-22 18:06:19 +08:00
|
|
|
import { getProjectDetail } from '@/assets/js/api/baseInfo.js'
|
2022-10-17 10:13:22 +08:00
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
|
list: {
|
|
|
|
|
type: Array,
|
|
|
|
|
default: () => []
|
|
|
|
|
}
|
2022-10-22 18:06:19 +08:00
|
|
|
},
|
|
|
|
|
data(){
|
|
|
|
|
return{
|
|
|
|
|
projectData: {
|
|
|
|
|
constructionStage: 10,
|
|
|
|
|
},
|
|
|
|
|
ops: {
|
|
|
|
|
vuescroll: {
|
|
|
|
|
wheelDirectionReverse: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created(){
|
|
|
|
|
console.log('this.list',this.list)
|
|
|
|
|
this.getDataDateils()
|
2022-10-25 14:01:28 +08:00
|
|
|
},
|
|
|
|
|
mounted(){
|
|
|
|
|
|
2022-10-22 18:06:19 +08:00
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
getDataDateils() {
|
|
|
|
|
let data = { projectSn: this.$store.state.projectSn }
|
|
|
|
|
getProjectDetail(data).then((res) => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
console.log('查询进度',res)
|
|
|
|
|
this.projectData = res.result
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
2022-10-17 10:13:22 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.progress {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
width: 100%;
|
2022-10-25 14:01:28 +08:00
|
|
|
height: 95%;
|
2022-10-17 10:13:22 +08:00
|
|
|
|
|
|
|
|
.progress-item {
|
|
|
|
|
position: relative;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
2022-10-17 17:46:04 +08:00
|
|
|
width: 185px;
|
2022-10-17 10:13:22 +08:00
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
|
|
.progress-item-dot {
|
|
|
|
|
width: 10px;
|
|
|
|
|
height: 10px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
|
content: '';
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 4px;
|
|
|
|
|
transform: translateX(-99%);
|
|
|
|
|
display: block;
|
2022-10-17 17:46:04 +08:00
|
|
|
width: 185px;
|
2022-10-17 10:13:22 +08:00
|
|
|
height: 2px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.active {
|
|
|
|
|
&::after {
|
|
|
|
|
background: #6dc6d8;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
|
content: '';
|
|
|
|
|
position: relative;
|
|
|
|
|
z-index: 9;
|
|
|
|
|
display: block;
|
|
|
|
|
width: 10px;
|
|
|
|
|
height: 10px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.info {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
height: 60px;
|
|
|
|
|
.label {
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
|
.progress-item-dot {
|
|
|
|
|
&::after {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|