1.清理代码;
This commit is contained in:
parent
b0d5c1ef58
commit
21403a5643
|
@ -142,7 +142,7 @@ const createPolygonFeature = (style, position, text, layer) => {
|
||||||
const cloneStyle = (style) => {
|
const cloneStyle = (style) => {
|
||||||
const clone = {};
|
const clone = {};
|
||||||
for (let key in style) {
|
for (let key in style) {
|
||||||
console.log(key);
|
// console.log(key);
|
||||||
if (key === "id") {
|
if (key === "id") {
|
||||||
clone[key] = style[key];
|
clone[key] = style[key];
|
||||||
} else if (key === "properties") {
|
} else if (key === "properties") {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<el-dialog v-model="showDialog" :title="title" width="800px" destroy-on-close>
|
<el-dialog v-model="showDialog" :title="title" width="800px" destroy-on-close>
|
||||||
<div class="form-wrapper">
|
<div class="form-wrapper">
|
||||||
<div class="base-container">
|
<div class="base-container">
|
||||||
<el-form class="base-info" :model="form" ref="formRef" :label-width="labelWidth">
|
<el-form class="base-info" :model="form" :rules="rules" ref="formRef" :label-width="labelWidth">
|
||||||
<el-form-item label="样式名称" prop="styleName">
|
<el-form-item label="样式名称" prop="styleName">
|
||||||
<el-input v-model="form.styleName" placeholder="请输入样式名称" clearable></el-input>
|
<el-input v-model="form.styleName" placeholder="请输入样式名称" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -322,7 +322,7 @@ const mapOptions = {
|
||||||
y: defaultPoint[1],
|
y: defaultPoint[1],
|
||||||
z: 5000,
|
z: 5000,
|
||||||
heading: 0,
|
heading: 0,
|
||||||
pitch: -90,
|
pitch: -89.9,
|
||||||
roll: 0
|
roll: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -344,6 +344,14 @@ const form = ref({
|
||||||
description: '',
|
description: '',
|
||||||
config: '',
|
config: '',
|
||||||
})
|
})
|
||||||
|
const rules = {
|
||||||
|
styleName: [
|
||||||
|
{ required: true, message: '请输入样式名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
styleType: [
|
||||||
|
{ required: true, message: '请选择样式类型', trigger: 'change' }
|
||||||
|
],
|
||||||
|
}
|
||||||
const showPoint = ref(false)
|
const showPoint = ref(false)
|
||||||
const formPoint = ref({
|
const formPoint = ref({
|
||||||
pixelSize: 10,
|
pixelSize: 10,
|
||||||
|
@ -538,7 +546,7 @@ const refreshMap = () => {
|
||||||
if (showBillboard.value) options.billboard = formBillboard.value
|
if (showBillboard.value) options.billboard = formBillboard.value
|
||||||
if (showLabel.value) options.label = formLabel.value
|
if (showLabel.value) options.label = formLabel.value
|
||||||
options.common = formCommon.value
|
options.common = formCommon.value
|
||||||
console.log('更新样式配置:', JSON.stringify(options))
|
// console.log('更新样式配置:', JSON.stringify(options))
|
||||||
form.value.config = JSON.stringify(options)
|
form.value.config = JSON.stringify(options)
|
||||||
|
|
||||||
if (entity) {
|
if (entity) {
|
||||||
|
@ -630,24 +638,6 @@ const reset = () => {
|
||||||
* 确定
|
* 确定
|
||||||
*/
|
*/
|
||||||
const handleConfirm = () => {
|
const handleConfirm = () => {
|
||||||
// proxy.$refs["styleRef"].validate(valid => {
|
|
||||||
// if (valid) {
|
|
||||||
// if (form.value.userId != null) {
|
|
||||||
// updateUser(form.value).then(response => {
|
|
||||||
// proxy.$modal.msgSuccess("修改成功")
|
|
||||||
// open.value = false
|
|
||||||
// getList()
|
|
||||||
// })
|
|
||||||
// } else {
|
|
||||||
// addUser(form.value).then(response => {
|
|
||||||
// proxy.$modal.msgSuccess("新增成功")
|
|
||||||
// open.value = false
|
|
||||||
// getList()
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
proxy.$refs["formRef"].validate(valid => {
|
proxy.$refs["formRef"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (form.value.id) {
|
if (form.value.id) {
|
||||||
|
|
Loading…
Reference in New Issue