中建四局大屏细节 处理

This commit is contained in:
骆乐 2022-11-08 15:11:01 +08:00
parent 8ed86ce22d
commit d13dc96821
5 changed files with 83 additions and 77 deletions

View File

@ -18,7 +18,7 @@ var PROJECT = {
} }
var PROJECT_TYPE = PROJECT.online_zjsj var PROJECT_TYPE = PROJECT.local_test
var headerShow = true; // 是否显示头部 var headerShow = true; // 是否显示头部
var tabsShow = true; // 是否显示tabs var tabsShow = true; // 是否显示tabs

View File

@ -27,6 +27,7 @@
<script> <script>
import { listProjectInfo } from '@/assets/js/api/zhongjianFourth' import { listProjectInfo } from '@/assets/js/api/zhongjianFourth'
import { getProjectExtendInfoApi }from "@/assets/js/api/baseInfo.js";
import LeftThree from './leftThree/index.vue' import LeftThree from './leftThree/index.vue'
export default { export default {
@ -36,14 +37,15 @@ export default {
projectSn:"", projectSn:"",
// //
open: true, open: true,
contractPrice:"",
// //
informationForm: { informationForm: {
projectName: { label: '项目名称:', value: '' }, projectName: { label: '项目名称:', value: '' },
bulidStatus: { label: '项目状态:', value: '' }, bulidStatus: { label: '项目状态:', value: '' },
constructionStage: { label: '形象进度:', value: '' }, constructionStage: { label: '形象进度:', value: '' },
households:{label: '户数:', value: ''}, households:{label: '项目造价:', value: ''},
// val2:{label: ':', value: ''}, // val2:{label: ':', value: ''},
projectAcreage: { label: '工程面积:', value: '', unit: '' }, projectAcreage: { label: '项目面积:', value: '', unit: '' },
constructionUnit: { label: '建设单位:', value: ''}, constructionUnit: { label: '建设单位:', value: ''},
projectAddress: { label: '项目地址:', value: '' }, projectAddress: { label: '项目地址:', value: '' },
}, },
@ -77,28 +79,39 @@ export default {
}, },
created() { created() {
this.projectSn = this.$store.state.projectSn this.projectSn = this.$store.state.projectSn
this.getVal()
}, },
mounted(){ mounted(){
this.getList() this.$nextTick(()=>{
this.getList()
})
}, },
methods: { methods: {
/** 查询数据 */ /** 查询数据 */
getVal(){
getProjectExtendInfoApi({ projectSn: this.projectSn,}).then((res)=>{
console.log('查看的结果',res)
this.contractPrice = res.result.contractPrice
})
},
getList() { getList() {
listProjectInfo({ projectSn: this.projectSn }).then(res => { listProjectInfo({ projectSn: this.projectSn }).then(res => {
console.log('项目信息: ', res) console.log('项目信息: ', res)
const informationForm = this.informationForm const informationForm = this.informationForm
Object.keys(informationForm).forEach(key => { Object.keys(informationForm).forEach(key => {
if (key === 'constructionStage') { if (key === 'constructionStage') {
informationForm[key].value = this.constructionStageEnum[res.result[key]] informationForm[key].value = this.constructionStageEnum[res.result[key]]
} else if( key === 'households'){
informationForm[key].value = this.contractPrice
} else if (key === 'bulidStatus') { } else if (key === 'bulidStatus') {
informationForm[key].value = this.projectStatusEnum[res.result[key]] informationForm[key].value = this.projectStatusEnum[res.result[key]]
} else { }else {
informationForm[key].value = res.result[key] informationForm[key].value = res.result[key]
} }
}) })
}) })
}, },
// //
// handleMouseenter() { // handleMouseenter() {
// this.open = true // this.open = true

View File

@ -17,26 +17,16 @@
import Card from '../components/Card' import Card from '../components/Card'
import { listProjectInfo } from '@/assets/js/api/zhongjianFourth' import { listProjectInfo } from '@/assets/js/api/zhongjianFourth'
import { mapState } from 'vuex'
export default { export default {
components: { Card }, components: { Card },
data: () => ({ data: () => ({
//
// list: {
// projectAddress: { label: '', value: ' ' },
// projectAcreage: { label: '', value: ' 112768.21' },
// constructionUnit: { label: '', value: ' (广)' },
// designUnit: { label: '', value: ' ' },
// exploreUnit: { label: '', value: ' ' },
// supervisorUnit: { label: '', value: ' 广' },
// },
list: { list: {
projectAddress: { label: '项目位置', value: '' }, projectAddress: { label: '项目地址', value: '' },
projectAcreage: { label: '用地面积', value: '' }, projectAcreage: { label: '项目面积', value: '' },
constructionUnit: { label: '建设单位', value: '' }, constructionUnit: { label: '建设单位', value: '' },
designUnit: { label: '设计单位', value: '' }, designUnit: { label: '设计单位', value: '' },
exploreUnit: { label: '勘察单位', value: '' }, exploreUnit: { label: '业主单位', value: '' },
supervisorUnit: { label: '监理单位', value: '' }, supervisorUnit: { label: '监理单位', value: '' },
}, },
}), }),
@ -51,7 +41,7 @@ export default {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
listProjectInfo({ projectSn: this.projectSn }).then(res => { listProjectInfo({ projectSn: this.projectSn }).then(res => {
console.log('项目信息: ', res); console.log('项目信息11111: ', res);
const list = this.list; const list = this.list;
Object.keys(list).forEach(key => { Object.keys(list).forEach(key => {
list[key].value = res.result[key]; list[key].value = res.result[key];

View File

@ -90,7 +90,7 @@ export default {
if(res.result != null){ if(res.result != null){
this.leftList.a.value = res.result.pm25 this.leftList.a.value = res.result.pm25
this.leftList.b.value = res.result.pm10 this.leftList.b.value = res.result.pm10
this.leftList.c.value = res.result.noise this.leftList.c.value = res.result.noise.toFixed(2)
this.rightList.temperature.value = res.result.temperature this.rightList.temperature.value = res.result.temperature
this.rightList.humidity.value = res.result.humidity this.rightList.humidity.value = res.result.humidity
this.rightList.windSpeed.value = res.result.windspeed this.rightList.windSpeed.value = res.result.windspeed
@ -162,7 +162,7 @@ export default {
width: 77px; width: 77px;
height: 44px; height: 44px;
font-size: 30px; font-size: 24px;
background-image: url('../assets/images/command-center/block2.png'); background-image: url('../assets/images/command-center/block2.png');
} }

View File

@ -1,80 +1,83 @@
<template> <template>
<Card title="基本信息"> <Card title="基本信息">
<div class="contentBox"> <div class="contentBox">
<p class="row"> <div class="list">
<span>项目位置:</span> <div class="list-item" v-for="(item, key) in list" :key="key">
<a>{{list.projectAddress}}</a> <span class="label">{{ item.label +' '}} </span>
</p> <span class="value">{{ item.value }}</span>
<p class="row"> </div>
<span>用地面积:</span> </div>
<a>{{list.projectAcreage}}</a>
</p>
<p class="row">
<span>建设单位:</span>
<a>{{list.constructionUnit}}</a>
</p>
<p class="row">
<span>设计单位:</span>
<a>{{list.designUnit}}</a>
</p>
<p class="row">
<span>勘察单位:</span>
<a>{{list.exploreUnit}}</a>
</p>
<p class="row">
<span>监理单位:</span>
<a>{{list.supervisorUnit}}</a>
</p>
</div> </div>
</Card> </Card>
</template> </template>
<script> <script>
import Card from "../components/Card.vue"; import Card from '../components/Card'
import { listProjectInfo } from '@/assets/js/api/zhongjianFourth'
export default { export default {
components: { Card }, components: { Card },
data(){ data: () => ({
return{ list: {
list:{ projectAddress: { label: '项目地址', value: '' },
projectAddress:'建宁路与热河交叉路口', projectAcreage: { label: '项目面积', value: '' },
projectAcreage:'112768.21㎡', constructionUnit: { label: '建设单位', value: '' },
constructionUnit:"中建四局发展(广州天河)有限公司", designUnit: { label: '设计单位', value: '' },
designUnit:"中国建筑第四工程局有限公司", exploreUnit: { label: '业主单位', value: '' },
exploreUnit:"贵州中建建筑科研设计院有限公司", supervisorUnit: { label: '监理单位', value: '' },
supervisorUnit:"广州宏元建设工程咨询有限公司", },
} }),
} created() {
this.projectSn = this.$store.state.projectSn
// this.projectSn=localStorage.getItem('sn')
}, },
created(){ mounted(){
// this.getData(); this.getList()
}, },
methods:{ methods: {
} /** 查询列表 */
}; getList() {
listProjectInfo({ projectSn: this.projectSn }).then(res => {
console.log('项目信息11111: ', res);
const list = this.list;
Object.keys(list).forEach(key => {
list[key].value = res.result[key];
})
})
},
},
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.contentBox { .contentBox {
margin-top: 3%;
width: 100%; width: 100%;
height: 90%; height: 90%;
overflow: auto; overflow: auto;
margin-top: 1%; .list-item {
.row { flex: 1;
height: 35px; position: relative;
line-height: 35px; display: flex;
margin-top: 3px; box-sizing: border-box;
span { padding: 8px 0;
margin-left: 10%; width: 100%;
color: white;
width: 25%;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
position: relative; cursor: pointer;
} transition: all 0.3s;
a { white-space: nowrap;
color: white;
}
} }
.label {
box-sizing: border-box;
width: 22%;
padding-left: 20px;
}
.value {
width: 75%;
}
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 3px; width: 3px;