<template>
|
<div id="mapInfo" class="modelBox" v-drag>
|
<div>
|
<div class="modleTitle ">
|
<div>属性信息</div>
|
<div class="modelmenu">
|
<div v-show="showMenuGrid">
|
<el-link style="color: white;font-size: 14x;">编辑</el-link>
|
</div>
|
<div class="modelClose" @click="$store.state.showMessageInfo = false"> X</div>
|
</div>
|
|
</div>
|
</div>
|
<div class="modelContent">
|
<div v-show="!showMenuGrid" class="contentMessage" v-for="(item, index) in modelOption" :key="index">
|
<div>{{ item.name }}</div>
|
<div>{{ item.value }}</div>
|
</div>
|
<div v-show="showMenuGrid" class="contentMessage" v-for="(item, index) in modelOption" :key="index">
|
<div>{{ item.name }}</div>
|
<div v-show="item.name == 'ID'">{{ item.value }}
|
</div>
|
<div v-show="item.name != 'ID'"><el-input style="width: 100%;" v-model="item.value" placeholder=""></el-input>
|
</div>
|
</div>
|
</div>
|
|
</div>
|
</template>
|
|
<script>
|
import model from '../../../assets/js/Layer/model';
|
import mapInfo from '../../../assets/js/Layer/mapInfo';
|
import {Grid_SelectById} from '@/api/api'
|
export default {
|
name: "modelEdit",
|
components: {
|
|
},
|
|
data() {
|
return {
|
modelOption: null,
|
showMenuGrid: false,
|
};
|
},
|
mounted() {
|
this.setLayerStart();
|
},
|
destroyed() {
|
|
},
|
methods: {
|
|
setLayerStart() {
|
var data = mapInfo.mssageInfo;
|
if (!data) {
|
this.$store.state.showMessageInfo = false;
|
return
|
}
|
var flag = false;
|
var id=null;
|
// for(var i in data){
|
// if(data[i].name == '类型' && data[i].value =='网格'){
|
// flag = true;
|
// }
|
// if(data[i].name =='ID'){
|
// id=data[i].value;
|
// }
|
// }
|
// if(flag){
|
// this.getInfoMessage(id)
|
// }else{
|
// this.setInfoMesgData(data);
|
// }
|
|
this.setInfoMesgData(data);
|
},
|
setInfoMesgData(res) {
|
this.modelOption = res
|
},
|
async getInfoMessage(res){
|
const data = await Grid_SelectById(res);
|
if(data.status == 200){
|
|
}
|
}
|
}
|
};
|
</script>
|
|
<style scoped lang="less">
|
.modelBox {
|
width: 370px;
|
height: 30%;
|
border: 1px solid white;
|
top: 30%;
|
left: calc(50% - 180px);
|
|
background-color: rgba(0, 0, 0, 0.6); // #0048fd69 !important
|
z-index: 9999;
|
position: absolute;
|
|
|
.modleTitle {
|
height: 42px;
|
width: 90%;
|
background: #0048fd69 !important;
|
border-bottom: 1px solid white;
|
color: white;
|
font-weight: 700px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
padding: 0% 5%;
|
|
.modelmenu {
|
display: flex;
|
align-items: center;
|
|
}
|
|
.modelClose {
|
height: 16px;
|
width: 16px;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
background: rgba(128, 128, 128, 0.6);
|
font-size: 14x;
|
margin-left: 20px;
|
|
}
|
}
|
|
.modelContent {
|
width: 88%;
|
height: calc(95% - 62px);
|
margin: 5%;
|
// display: flex;
|
// justify-content: space-between;
|
|
overflow-y: auto;
|
overflow-x: hidden;
|
|
.contentMessage {
|
width: 100%;
|
color: white;
|
display: flex;
|
border: 1px solid white;
|
border-top: transparent;
|
|
div {
|
width: calc(50% - 2px);
|
text-align: center;
|
// margin-bottom: 5%;
|
line-height: 50px;
|
border-right: 1px solid white;
|
}
|
|
div:first-child {
|
border-right: 1px solid white;
|
|
}
|
|
}
|
|
.contentMessage:first-child {
|
border-top: 1px solid white;
|
;
|
}
|
}
|
|
/deep/.el-input__inner {
|
background: transparent !important;
|
border: transparent !important;
|
color: white !important;
|
}
|
|
}
|
</style>
|