BUG 25975
This commit is contained in:
59
packages/2.0.5/AppGridBlock/components/add.vue
vendored
59
packages/2.0.5/AppGridBlock/components/add.vue
vendored
@@ -186,10 +186,12 @@
|
|||||||
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
|
||||||
@@ -197,7 +199,8 @@
|
|||||||
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>
|
||||||
@@ -216,6 +220,7 @@
|
|||||||
<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: {
|
||||||
@@ -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 时必填
|
||||||
@@ -392,17 +394,13 @@ export default {
|
|||||||
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) {
|
||||||
@@ -497,12 +495,10 @@ 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) => {
|
||||||
.then((res) => {
|
if (res?.data) {
|
||||||
if (res.code == 0) {
|
|
||||||
this.forms = {...res.data};
|
this.forms = {...res.data};
|
||||||
this.parentGirdInfo = this.forms.parentGirdInfo;
|
this.parentGirdInfo = this.forms.parentGirdInfo;
|
||||||
this.forms.parentGirdName = this.parentGirdInfo.girdName;
|
this.forms.parentGirdName = this.parentGirdInfo.girdName;
|
||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user