129 lines
2.9 KiB
Vue
Raw Normal View History

2022-10-17 10:13:22 +08:00
<template>
<Card title="项目信息">
<div class="container">
<vue-scroll style="height: 95%;">
2022-10-17 10:13:22 +08:00
<div class="list">
<div class="list-item" v-for="(item, key) in list" :key="key">
<span class="label">{{ item.label +' '}} </span>
2022-10-17 10:13:22 +08:00
<span class="value">{{ item.value }}</span>
</div>
</div>
</vue-scroll>
</div>
</Card>
</template>
<script>
import Card from '../components/Card'
import { listProjectInfo } from '@/assets/js/api/zhongjianFourth'
export default {
components: { Card },
data: () => ({
list: {
2022-11-08 15:11:01 +08:00
projectAddress: { label: '项目地址', value: '' },
projectAcreage: { label: '项目面积', value: '' },
constructionUnit: { label: '建设单位', value: '' },
designUnit: { label: '设计单位', value: '' },
2022-11-08 15:11:01 +08:00
exploreUnit: { label: '业主单位', value: '' },
supervisorUnit: { label: '监理单位', value: '' },
2022-10-17 10:13:22 +08:00
},
}),
created() {
2022-11-08 10:59:30 +08:00
this.projectSn = this.$store.state.projectSn
// this.projectSn=localStorage.getItem('sn')
2022-10-17 10:13:22 +08:00
},
mounted(){
this.getList()
2022-10-17 10:13:22 +08:00
},
methods: {
/** 查询列表 */
getList() {
listProjectInfo({ projectSn: this.projectSn }).then(res => {
2022-11-08 15:11:01 +08:00
console.log('项目信息11111: ', res);
const list = this.list;
Object.keys(list).forEach(key => {
list[key].value = res.result[key];
})
})
},
2022-10-17 10:13:22 +08:00
},
}
</script>
<style lang="less" scoped>
.container {
box-sizing: border-box;
padding-top: 16px;
padding-left: 16px;
2022-10-17 10:13:22 +08:00
width: 100%;
height: 100%;
.list {
width: 100%;
height: 100%;
color: #fff;
overflow-y: scroll;
2022-10-17 10:13:22 +08:00
.list-item {
flex: 1;
position: relative;
display: flex;
box-sizing: border-box;
padding: 8px 0;
2022-10-17 10:13:22 +08:00
width: 100%;
font-size: 16px;
2022-10-17 10:13:22 +08:00
font-weight: 500;
cursor: pointer;
transition: all 0.3s;
white-space: nowrap;
// &:hover {
// margin-top: 2px;
// margin-bottom: 5px;
// padding: 20px 0;
// &::before {
// content: '';
// position: absolute;
// top: 50%;
// left: 6px;
// display: inline-block;
// transform: translate(0, -50%);
// width: 8px;
// height: 14px;
// background-image: url('../assets/images/command-center/triangle.png');
// background-size: 100% 100%;
// transition: all .3s;
// }
// }
2022-10-17 10:13:22 +08:00
// &:hover .value {
// color: #c2805f;
// }
2022-10-17 10:13:22 +08:00
// &:last-child {
// margin-bottom: 0;
// }
2022-10-17 10:13:22 +08:00
// .label,
// .value {
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
// }
2022-10-17 10:13:22 +08:00
.label {
box-sizing: border-box;
width: 22%;
2022-10-17 10:13:22 +08:00
padding-left: 20px;
}
.value {
width: 75%;
}
}
}
}
</style>