BUG 25975
This commit is contained in:
355
packages/2.0.5/AppGridBlock/components/add.vue
vendored
355
packages/2.0.5/AppGridBlock/components/add.vue
vendored
@@ -3,67 +3,67 @@
|
|||||||
<ai-detail>
|
<ai-detail>
|
||||||
<template #title>
|
<template #title>
|
||||||
<ai-title
|
<ai-title
|
||||||
:title="title"
|
:title="title"
|
||||||
:isShowBack="true"
|
:isShowBack="true"
|
||||||
:isShowBottomBorder="true"
|
:isShowBottomBorder="true"
|
||||||
@onBackClick="cancel(false)"
|
@onBackClick="cancel(false)"
|
||||||
></ai-title>
|
></ai-title>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<ai-card title="层级信息" >
|
<ai-card title="层级信息">
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<ai-wrapper label-width="120px" :columnsNumber="2" style="margin-top: 16px">
|
<ai-wrapper label-width="120px" :columnsNumber="2" style="margin-top: 16px">
|
||||||
<ai-info-item label="上级层级单位:"><span>{{ forms.parentGirdName }}</span></ai-info-item>
|
<ai-info-item label="上级层级单位:"><span>{{ forms.parentGirdName }}</span></ai-info-item>
|
||||||
</ai-wrapper>
|
</ai-wrapper>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
|
|
||||||
<el-form
|
<el-form
|
||||||
ref="rules"
|
ref="rules"
|
||||||
:model="forms"
|
:model="forms"
|
||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
size="small"
|
size="small"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
>
|
>
|
||||||
<ai-card title="基础信息" >
|
<ai-card title="基础信息">
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<div class="above">
|
<div class="above">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<el-form-item label="网格名称" prop="girdName">
|
<el-form-item label="网格名称" prop="girdName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="forms.girdName"
|
v-model="forms.girdName"
|
||||||
placeholder="请输入…"
|
placeholder="请输入…"
|
||||||
maxlength="10"
|
maxlength="10"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="网格类型" prop="girdType">
|
<el-form-item label="网格类型" prop="girdType">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="forms.girdType"
|
v-model="forms.girdType"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, i) in dict.getDict('girdType')"
|
v-for="(item, i) in dict.getDict('girdType')"
|
||||||
:key="i"
|
:key="i"
|
||||||
:label="item.dictName"
|
:label="item.dictName"
|
||||||
:value="item.dictValue"
|
:value="item.dictValue"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否最后一级" prop="isLastLevel">
|
<el-form-item label="是否最后一级" prop="isLastLevel">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="forms.isLastLevel"
|
v-model="forms.isLastLevel"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
:disabled="isEdit"
|
:disabled="isEdit"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, i) in dict.getDict('isLastLevel')"
|
v-for="(item, i) in dict.getDict('isLastLevel')"
|
||||||
:key="i"
|
:key="i"
|
||||||
:label="item.dictName"
|
:label="item.dictName"
|
||||||
:value="item.dictValue"
|
:value="item.dictValue"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -71,24 +71,24 @@
|
|||||||
<div class="right">
|
<div class="right">
|
||||||
<el-form-item label="网格编码" prop="girdCode">
|
<el-form-item label="网格编码" prop="girdCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="forms.girdCode"
|
v-model="forms.girdCode"
|
||||||
placeholder="请输入…"
|
placeholder="请输入…"
|
||||||
maxlength="30"
|
maxlength="30"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="网格层级" prop="girdLevel">
|
<el-form-item label="网格层级" prop="girdLevel">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="forms.girdLevel"
|
v-model="forms.girdLevel"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
:disabled="isEdit"
|
:disabled="isEdit"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, i) in dict.getDict('girdLevel')"
|
v-for="(item, i) in dict.getDict('girdLevel')"
|
||||||
:key="i"
|
:key="i"
|
||||||
:label="item.dictName"
|
:label="item.dictName"
|
||||||
:value="item.dictValue"
|
:value="item.dictValue"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
|
|
||||||
<ai-card title="其他信息" >
|
<ai-card title="其他信息">
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<div class="above">
|
<div class="above">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
@@ -113,19 +113,19 @@
|
|||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="初始日期" prop="startDate">
|
<el-form-item label="初始日期" prop="startDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="forms.startDate"
|
v-model="forms.startDate"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终止日期" prop="endDate">
|
<el-form-item label="终止日期" prop="endDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="forms.endDate"
|
v-model="forms.endDate"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -133,8 +133,8 @@
|
|||||||
<div class="right">
|
<div class="right">
|
||||||
<el-form-item label="面积" prop="area">
|
<el-form-item label="面积" prop="area">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="forms.area"
|
v-model="forms.area"
|
||||||
placeholder="面积㎡"
|
placeholder="面积㎡"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
<el-button size="small" @click="showMap = true">地图标绘</el-button>
|
<el-button size="small" @click="showMap = true">地图标绘</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@@ -159,45 +159,48 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-detail>
|
</ai-detail>
|
||||||
<ai-dialog
|
<ai-dialog
|
||||||
title="网格范围"
|
title="网格范围"
|
||||||
:visible.sync="showMap"
|
:visible.sync="showMap"
|
||||||
:customFooter="true"
|
:customFooter="true"
|
||||||
:destroyOnClose="true"
|
:destroyOnClose="true"
|
||||||
@opened="beforeSelectMap"
|
@opened="beforeSelectMap"
|
||||||
border
|
border
|
||||||
width="850px"
|
width="850px"
|
||||||
>
|
>
|
||||||
<div class="map">
|
<div class="map">
|
||||||
<div class="tipinput">
|
<div class="tipinput">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchAddress"
|
v-model="searchAddress"
|
||||||
@change="addressChange"
|
@change="addressChange"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入关键字"
|
placeholder="请输入关键字"
|
||||||
id="tipinput"
|
id="tipinput"
|
||||||
size="medium"
|
size="medium"
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
></el-input>
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div id="panel"></div>
|
<div id="panel"></div>
|
||||||
<div class="container" id="container"></div>
|
<div class="container" id="container"></div>
|
||||||
<el-button-group
|
<el-button-group
|
||||||
style="margin-top: 8px"
|
style="margin-top: 8px"
|
||||||
v-if="forms.plottingStatus == 1"
|
v-if="forms.plottingStatus == 1"
|
||||||
>
|
>
|
||||||
<el-button type="primary" size="mini" @click="polyEditor.open()"
|
<el-button type="primary" size="mini" @click="polyEditor.open()"
|
||||||
>开始编辑</el-button
|
>开始编辑
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
<el-button size="mini" @click="polyEditor.close()"
|
<el-button size="mini" @click="polyEditor.close()"
|
||||||
>结束编辑</el-button
|
>结束编辑
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
<el-button-group
|
<el-button-group
|
||||||
style="margin-top: 8px"
|
style="margin-top: 8px"
|
||||||
v-if="forms.plottingStatus == 0"
|
v-if="forms.plottingStatus == 0"
|
||||||
>
|
>
|
||||||
<el-button size="mini" @click="draw('polygon')"
|
<el-button size="mini" @click="draw('polygon')"
|
||||||
>开始绘制多边形</el-button
|
>开始绘制多边形
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
<!-- <el-button size="mini" @click="close()">关闭绘制</el-button> -->
|
<!-- <el-button size="mini" @click="close()">关闭绘制</el-button> -->
|
||||||
<el-button size="mini" @click="clear()">清除绘制</el-button>
|
<el-button size="mini" @click="clear()">清除绘制</el-button>
|
||||||
@@ -206,7 +209,8 @@
|
|||||||
<div class="dialog-footer" slot="footer">
|
<div class="dialog-footer" slot="footer">
|
||||||
<el-button size="medium" @click="showMap = false">取消</el-button>
|
<el-button size="medium" @click="showMap = false">取消</el-button>
|
||||||
<el-button type="primary" size="medium" @click="surePotting()"
|
<el-button type="primary" size="medium" @click="surePotting()"
|
||||||
>确认</el-button
|
>确认
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
@@ -215,7 +219,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AMapLoader from "@amap/amap-jsapi-loader";
|
import AMapLoader from "@amap/amap-jsapi-loader";
|
||||||
import { mapState } from "vuex";
|
import {mapState} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "addBlock",
|
name: "addBlock",
|
||||||
props: {
|
props: {
|
||||||
@@ -262,22 +267,22 @@ export default {
|
|||||||
formRules() {
|
formRules() {
|
||||||
return {
|
return {
|
||||||
girdName: [
|
girdName: [
|
||||||
{ required: true, message: "请填写网格名称", trigger: "change" },
|
{required: true, message: "请填写网格名称", trigger: "change"},
|
||||||
],
|
],
|
||||||
girdCode: [
|
girdCode: [
|
||||||
{ required: true, message: "请填写网格编码", trigger: "change" },
|
{required: true, message: "请填写网格编码", trigger: "change"},
|
||||||
],
|
],
|
||||||
girdType: [
|
girdType: [
|
||||||
{ required: true, message: "请选择网格类型", trigger: "change" },
|
{required: true, message: "请选择网格类型", trigger: "change"},
|
||||||
],
|
],
|
||||||
isLastLevel: [
|
isLastLevel: [
|
||||||
{ required: true, message: "请选择是否最后一级", trigger: "change" },
|
{required: true, message: "请选择是否最后一级", trigger: "change"},
|
||||||
],
|
],
|
||||||
girdLevel: [
|
girdLevel: [
|
||||||
{ required: true, message: "请选择网格层级", trigger: "change" },
|
{required: true, message: "请选择网格层级", trigger: "change"},
|
||||||
],
|
],
|
||||||
eventReportUnitId: [
|
eventReportUnitId: [
|
||||||
{ required: true, message: "请选择事件上报主体", trigger: "change" },
|
{required: true, message: "请选择事件上报主体", trigger: "change"},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -290,7 +295,7 @@ export default {
|
|||||||
},
|
},
|
||||||
unitOps() {
|
unitOps() {
|
||||||
let initData = JSON.parse(JSON.stringify(this.options)),
|
let initData = JSON.parse(JSON.stringify(this.options)),
|
||||||
ops = initData.filter((e) => !e.parentId);
|
ops = initData.filter((e) => !e.parentId);
|
||||||
ops.map((e) => this.addChild(e, initData));
|
ops.map((e) => this.addChild(e, initData));
|
||||||
return ops;
|
return ops;
|
||||||
},
|
},
|
||||||
@@ -306,33 +311,30 @@ export default {
|
|||||||
// this.forms.isLastLevel = ['0','1'].includes(this.forms.girdLevel)?'0':'1';
|
// this.forms.isLastLevel = ['0','1'].includes(this.forms.girdLevel)?'0':'1';
|
||||||
this.title = "添加网格区块";
|
this.title = "添加网格区块";
|
||||||
}
|
}
|
||||||
this.getAllUnit(this.user.info.areaId);
|
// this.getAllUnit(this.user.info.areaId);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
cancel (isRefresh) {
|
cancel(isRefresh) {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'list',
|
type: 'list',
|
||||||
isRefresh: isRefresh ? true : false,
|
isRefresh: !!isRefresh,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取所有单位
|
// 获取所有单位
|
||||||
getAllUnit(data) {
|
getAllUnit(data) {
|
||||||
this.options = [];
|
this.options = [];
|
||||||
this.instance
|
this.instance.post("/admin/sysunit/getAll", null, {
|
||||||
.post("/admin/sysunit/getAll", null, {
|
params: {areaId: data},
|
||||||
params: {
|
}).then((res) => {
|
||||||
areaId: data,
|
if (res?.data) {
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
res.data = res.data.map((a) => {
|
res.data = res.data.map((a) => {
|
||||||
return { ...a, label: a.name };
|
return {...a, label: a.name}
|
||||||
});
|
});
|
||||||
this.options = res.data.filter((e) => !e.parentId);
|
this.options = res.data.filter((e) => !e.parentId);
|
||||||
this.options.map((t) => this.addChild(t, res.data));
|
this.options.map((t) => this.addChild(t, res.data));
|
||||||
});
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeSelectMap() {
|
beforeSelectMap() {
|
||||||
AMapLoader.load({
|
AMapLoader.load({
|
||||||
key: "b553334ba34f7ac3cd09df9bc8b539dc", // 申请好的Web端开发者Key,首次调用 load 时必填
|
key: "b553334ba34f7ac3cd09df9bc8b539dc", // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||||
@@ -344,65 +346,61 @@ export default {
|
|||||||
plugins: [], // 需要加载的 AMapUI ui插件
|
plugins: [], // 需要加载的 AMapUI ui插件
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((AMap) => {
|
.then((AMap) => {
|
||||||
this.map = new AMap.Map("container", {
|
this.map = new AMap.Map("container", {
|
||||||
resizeEnable: true,
|
resizeEnable: true,
|
||||||
});
|
|
||||||
if (this.forms.plottingStatus == 1) {
|
|
||||||
let path = [];
|
|
||||||
this.forms.points.map((e, index) => {
|
|
||||||
path[index] = [e.lng, e.lat];
|
|
||||||
});
|
|
||||||
let polygon = new AMap.Polygon({
|
|
||||||
path: path,
|
|
||||||
strokeColor: "#FF33FF",
|
|
||||||
strokeWeight: 6,
|
|
||||||
strokeOpacity: 0.2,
|
|
||||||
fillOpacity: 0.4,
|
|
||||||
fillColor: "#1791fc",
|
|
||||||
zIndex: 50,
|
|
||||||
bubble: true,
|
|
||||||
});
|
|
||||||
this.map.add([polygon]);
|
|
||||||
this.map.setFitView();
|
|
||||||
this.polyEditor = new AMap.PolygonEditor(this.map, polygon);
|
|
||||||
} else {
|
|
||||||
this.mouseTool = new AMap.MouseTool(this.map);
|
|
||||||
// this.map.add(new AMap.Marker({
|
|
||||||
// position:this.map.getCenter()
|
|
||||||
// }));
|
|
||||||
this.placeSearch = new AMap.PlaceSearch({
|
|
||||||
pageSize: 3, // 单页显示结果条数
|
|
||||||
pageIndex: 1, // 页码
|
|
||||||
city: "", // 兴趣点城市
|
|
||||||
citylimit: false, //是否强制限制在设置的城市内搜索
|
|
||||||
map: this.map, // 展现结果的地图实例
|
|
||||||
panel: "panel", // 结果列表将在此容器中进行展示。
|
|
||||||
autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
|
|
||||||
});
|
|
||||||
this.map.setZoomAndCenter(14, [117.147097, 36.72081], false, 600);
|
|
||||||
this.eventOn();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
});
|
});
|
||||||
|
if (this.forms.plottingStatus == 1) {
|
||||||
|
let path = [];
|
||||||
|
this.forms.points.map((e, index) => {
|
||||||
|
path[index] = [e.lng, e.lat];
|
||||||
|
});
|
||||||
|
let polygon = new AMap.Polygon({
|
||||||
|
path: path,
|
||||||
|
strokeColor: "#FF33FF",
|
||||||
|
strokeWeight: 6,
|
||||||
|
strokeOpacity: 0.2,
|
||||||
|
fillOpacity: 0.4,
|
||||||
|
fillColor: "#1791fc",
|
||||||
|
zIndex: 50,
|
||||||
|
bubble: true,
|
||||||
|
});
|
||||||
|
this.map.add([polygon]);
|
||||||
|
this.map.setFitView();
|
||||||
|
this.polyEditor = new AMap.PolygonEditor(this.map, polygon);
|
||||||
|
} else {
|
||||||
|
this.mouseTool = new AMap.MouseTool(this.map);
|
||||||
|
// this.map.add(new AMap.Marker({
|
||||||
|
// position:this.map.getCenter()
|
||||||
|
// }));
|
||||||
|
this.placeSearch = new AMap.PlaceSearch({
|
||||||
|
pageSize: 3, // 单页显示结果条数
|
||||||
|
pageIndex: 1, // 页码
|
||||||
|
city: "", // 兴趣点城市
|
||||||
|
citylimit: false, //是否强制限制在设置的城市内搜索
|
||||||
|
map: this.map, // 展现结果的地图实例
|
||||||
|
panel: "panel", // 结果列表将在此容器中进行展示。
|
||||||
|
autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
|
||||||
|
});
|
||||||
|
this.map.setZoomAndCenter(14, [117.147097, 36.72081], false, 600);
|
||||||
|
this.eventOn();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log(e);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//地图事件绑定
|
//地图事件绑定
|
||||||
eventOn() {
|
eventOn() {
|
||||||
this.path = [];
|
this.path = [];
|
||||||
this.overlays = [];
|
this.overlays = [];
|
||||||
this.map.on("mousemove", this.showInfoMove, this);
|
this.map.on("mousemove", null, this);
|
||||||
this.mouseTool.on("draw", ({ type, obj }) => {
|
this.mouseTool.on("draw", ({obj}) => {
|
||||||
console.log(obj);
|
|
||||||
obj.getPath().map((e) => {
|
obj.getPath().map((e) => {
|
||||||
this.path.push({ lat: e.getLat(), lng: e.getLng() });
|
this.path.push({lat: e.getLat(), lng: e.getLng()});
|
||||||
});
|
});
|
||||||
this.overlays.push(obj);
|
this.overlays.push(obj);
|
||||||
});
|
})
|
||||||
this.placeSearch.on("listElementClick", (e) => {
|
|
||||||
console.log(e);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
//map搜索
|
//map搜索
|
||||||
addressChange(val) {
|
addressChange(val) {
|
||||||
@@ -464,11 +462,11 @@ export default {
|
|||||||
// this.forms.eventReportUnit = this.$refs.cascader.getCheckedNodes().label;
|
// this.forms.eventReportUnit = this.$refs.cascader.getCheckedNodes().label;
|
||||||
if (this.forms.plottingStatus == 1) {
|
if (this.forms.plottingStatus == 1) {
|
||||||
this.polyEditor
|
this.polyEditor
|
||||||
.getTarget()
|
.getTarget()
|
||||||
.getPath()
|
.getPath()
|
||||||
.map((e) => {
|
.map((e) => {
|
||||||
this.forms.points.push({ lng: e.lng, lat: e.lat });
|
this.forms.points.push({lng: e.lng, lat: e.lat});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.forms.points = [...this.path];
|
this.forms.points = [...this.path];
|
||||||
}
|
}
|
||||||
@@ -478,18 +476,18 @@ export default {
|
|||||||
this.$refs["rules"].validate((valid) => {
|
this.$refs["rules"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.instance
|
this.instance
|
||||||
.post(
|
.post(
|
||||||
`/app/appgirdinfo/addOrUpdate`,
|
`/app/appgirdinfo/addOrUpdate`,
|
||||||
{
|
{
|
||||||
...this.forms,
|
...this.forms,
|
||||||
},
|
},
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.cancel(true)
|
this.cancel(true)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log("error submit!!");
|
console.log("error submit!!");
|
||||||
return false;
|
return false;
|
||||||
@@ -497,18 +495,16 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
searchDetail() {
|
searchDetail() {
|
||||||
this.instance
|
this.instance.post(`/app/appgirdinfo/queryDetailById`, null, {
|
||||||
.post(`/app/appgirdinfo/queryDetailById`, null, {
|
params: {id: this.params.id},
|
||||||
params: { id: this.params.id },
|
}).then((res) => {
|
||||||
})
|
if (res?.data) {
|
||||||
.then((res) => {
|
this.forms = {...res.data};
|
||||||
if (res.code == 0) {
|
this.parentGirdInfo = this.forms.parentGirdInfo;
|
||||||
this.forms = { ...res.data };
|
this.forms.parentGirdName = this.parentGirdInfo.girdName;
|
||||||
this.parentGirdInfo = this.forms.parentGirdInfo;
|
// this.forms.isLastLevel =this.forms.girdLevel;
|
||||||
this.forms.parentGirdName = this.parentGirdInfo.girdName;
|
}
|
||||||
// this.forms.isLastLevel =this.forms.girdLevel;
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -518,41 +514,48 @@ export default {
|
|||||||
.add-block {
|
.add-block {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.above {
|
.above {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 8px 0;
|
padding: 8px 0;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 380px;
|
width: 380px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
width: 380px;
|
width: 380px;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-btn {
|
.footer-btn {
|
||||||
width: 92px;
|
width: 92px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.map {
|
.map {
|
||||||
width: 780px;
|
width: 780px;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
width: 760px;
|
width: 760px;
|
||||||
height: 420px;
|
height: 420px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
border: 1px solid #d0d4dc;
|
border: 1px solid #d0d4dc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#panel {
|
#panel {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 400px;
|
height: 400px;
|
||||||
right: 30px;
|
right: 30px;
|
||||||
overflow-x: auto;
|
|
||||||
top: 20px;
|
top: 20px;
|
||||||
width: 280px;
|
width: 280px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
z-index: 10000;
|
z-index: 10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tipinput {
|
.tipinput {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
@@ -563,4 +566,4 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user