<template>
|
<div class="modelBox" v-drag>
|
<div>
|
<div class="modleTitle ">
|
<div>模型编辑</div>
|
<div class="modelClose" @click="$store.state.isShowEditLayer = false"> X</div>
|
</div>
|
</div>
|
<div class="modelContent">
|
<el-form :model="modelOption" label-width="80px">
|
<el-form-item label="名称">
|
<el-input v-model="modelOption.name" @change="setModelFormChange(1)" />
|
</el-form-item>
|
<el-form-item label="经度">
|
<el-input-number style="width: 100%;" @change="setModelFormChange(2)" v-model="modelOption.style.longitude"
|
:step="0.001" />
|
</el-form-item>
|
<el-form-item label="维度">
|
<el-input-number style="width: 100%;" @change="setModelFormChange(2)" v-model="modelOption.style.latitude"
|
:step="0.001" />
|
</el-form-item>
|
<el-form-item label="高度">
|
<el-input-number style="width: 100%;" @change="setModelFormChange(2)" :min="-100" :max="1000"
|
v-model="modelOption.style.altitude" :step="1" />
|
</el-form-item>
|
<el-form-item label="偏移角度">
|
<el-input-number style="width: 100%;" @change="setModelFormChange(2)" :min="-180" :max="180"
|
v-model="modelOption.style.heading" :step="1" />
|
</el-form-item>
|
<el-form-item label="俯仰角度">
|
<el-input-number style="width: 100%;" @change="setModelFormChange(2)" :min="-90" :max="90"
|
v-model="modelOption.style.pitch" :step="1" />
|
</el-form-item>
|
<el-form-item label="旋转角度">
|
<el-input-number style="width: 100%;" @change="setModelFormChange(2)" :min="-90" :max="90"
|
v-model="modelOption.style.roll" :step="1" />
|
</el-form-item>
|
<el-form-item label="比例">
|
<el-input-number style="width: 100%;" @change="setModelFormChange(2)" :min="0.1" :step="0.1" :max="10"
|
v-model="modelOption.style.scale" />
|
</el-form-item>
|
</el-form>
|
</div>
|
|
|
</div>
|
</template>
|
|
<script>
|
import model from '../../../assets/js/Layer/model';
|
|
|
export default {
|
name: "modelEdit",
|
components: {
|
|
},
|
|
data() {
|
return {
|
modelOption: {
|
id: null,
|
sourceType: null,
|
name: "",
|
style: {
|
url: null,
|
name: null,
|
altitude: null,
|
longitude: null,
|
latitude: null,
|
heading: null,
|
pitch: null,
|
roll: null,
|
scale: null,
|
url: null,
|
id: null,
|
sourceType: null,
|
}
|
},
|
};
|
},
|
mounted() {
|
this.setLayerStart();
|
},
|
destroyed() {
|
|
},
|
methods: {
|
setModelFormChange(res) {
|
if (res == 1) {
|
this.modelOption.style.name = this.modelOption.name;
|
}
|
model.setEditChanege(this.modelOption, res);
|
|
},
|
setLayerStart() {
|
this.modelOption = model.form;
|
},
|
|
}
|
};
|
</script>
|
|
<style scoped lang="less">
|
.modelBox {
|
width: 360px;
|
height: 60%;
|
border: 1px solid white;
|
top: 70px;
|
right: 20px;
|
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%;
|
|
.modelClose {
|
height: 16px;
|
width: 16px;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
background: rgba(128, 128, 128, 0.6);
|
font-size: 14x;
|
}
|
}
|
|
.modelContent {
|
width: 90%;
|
height: calc(95% - 42px);
|
margin: 5%;
|
display: flex;
|
justify-content: space-between;
|
flex-flow: row wrap;
|
|
.modelType {
|
width: 47.5%;
|
height: 20%;
|
border: 1px solid #909399;
|
|
.imgIcon {
|
width: 100%;
|
height: 100%;
|
}
|
|
}
|
|
.modelType :hover {
|
border: 1px solid #409EFF;
|
}
|
}
|
|
/deep/.el-form-item__label {
|
color: white;
|
}
|
}
|
</style>
|