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" | ||||
|         > | ||||
|           <el-button type="primary" size="mini" @click="polyEditor.open()" | ||||
|             >开始编辑</el-button | ||||
|           >开始编辑 | ||||
|           </el-button | ||||
|           > | ||||
|           <el-button size="mini" @click="polyEditor.close()" | ||||
|             >结束编辑</el-button | ||||
|           >结束编辑 | ||||
|           </el-button | ||||
|           > | ||||
|         </el-button-group> | ||||
|         <el-button-group | ||||
| @@ -197,7 +199,8 @@ | ||||
|             v-if="forms.plottingStatus == 0" | ||||
|         > | ||||
|           <el-button size="mini" @click="draw('polygon')" | ||||
|             >开始绘制多边形</el-button | ||||
|           >开始绘制多边形 | ||||
|           </el-button | ||||
|           > | ||||
|           <!-- <el-button  size="mini" @click="close()">关闭绘制</el-button> --> | ||||
|           <el-button size="mini" @click="clear()">清除绘制</el-button> | ||||
| @@ -206,7 +209,8 @@ | ||||
|       <div class="dialog-footer" slot="footer"> | ||||
|         <el-button size="medium" @click="showMap = false">取消</el-button> | ||||
|         <el-button type="primary" size="medium" @click="surePotting()" | ||||
|           >确认</el-button | ||||
|         >确认 | ||||
|         </el-button | ||||
|         > | ||||
|       </div> | ||||
|     </ai-dialog> | ||||
| @@ -216,6 +220,7 @@ | ||||
| <script> | ||||
| import AMapLoader from "@amap/amap-jsapi-loader"; | ||||
| import {mapState} from "vuex"; | ||||
|  | ||||
| export default { | ||||
|   name: "addBlock", | ||||
|   props: { | ||||
| @@ -306,33 +311,30 @@ export default { | ||||
|       // this.forms.isLastLevel = ['0','1'].includes(this.forms.girdLevel)?'0':'1'; | ||||
|       this.title = "添加网格区块"; | ||||
|     } | ||||
|     this.getAllUnit(this.user.info.areaId); | ||||
|     // this.getAllUnit(this.user.info.areaId); | ||||
|   }, | ||||
|   methods: { | ||||
|     cancel(isRefresh) { | ||||
|       this.$emit('change', { | ||||
|         type: 'list', | ||||
|         isRefresh: isRefresh ? true : false, | ||||
|         isRefresh: !!isRefresh, | ||||
|       }) | ||||
|     }, | ||||
|     // 获取所有单位 | ||||
|     getAllUnit(data) { | ||||
|       this.options = []; | ||||
|       this.instance | ||||
|         .post("/admin/sysunit/getAll", null, { | ||||
|           params: { | ||||
|             areaId: data, | ||||
|           }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|       this.instance.post("/admin/sysunit/getAll", null, { | ||||
|         params: {areaId: data}, | ||||
|       }).then((res) => { | ||||
|         if (res?.data) { | ||||
|           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.map((t) => this.addChild(t, res.data)); | ||||
|         } | ||||
|       }); | ||||
|     }, | ||||
|  | ||||
|     beforeSelectMap() { | ||||
|       AMapLoader.load({ | ||||
|         key: "b553334ba34f7ac3cd09df9bc8b539dc", // 申请好的Web端开发者Key,首次调用 load 时必填 | ||||
| @@ -392,17 +394,13 @@ export default { | ||||
|     eventOn() { | ||||
|       this.path = []; | ||||
|       this.overlays = []; | ||||
|       this.map.on("mousemove", this.showInfoMove, this); | ||||
|       this.mouseTool.on("draw", ({ type, obj }) => { | ||||
|         console.log(obj); | ||||
|       this.map.on("mousemove", null, this); | ||||
|       this.mouseTool.on("draw", ({obj}) => { | ||||
|         obj.getPath().map((e) => { | ||||
|           this.path.push({lat: e.getLat(), lng: e.getLng()}); | ||||
|         }); | ||||
|         this.overlays.push(obj); | ||||
|       }); | ||||
|       this.placeSearch.on("listElementClick", (e) => { | ||||
|         console.log(e); | ||||
|       }); | ||||
|       }) | ||||
|     }, | ||||
|     //map搜索 | ||||
|     addressChange(val) { | ||||
| @@ -497,12 +495,10 @@ export default { | ||||
|       }); | ||||
|     }, | ||||
|     searchDetail() { | ||||
|       this.instance | ||||
|         .post(`/app/appgirdinfo/queryDetailById`, null, { | ||||
|       this.instance.post(`/app/appgirdinfo/queryDetailById`, null, { | ||||
|         params: {id: this.params.id}, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|           if (res.code == 0) { | ||||
|       }).then((res) => { | ||||
|         if (res?.data) { | ||||
|           this.forms = {...res.data}; | ||||
|           this.parentGirdInfo = this.forms.parentGirdInfo; | ||||
|           this.forms.parentGirdName = this.parentGirdInfo.girdName; | ||||
| @@ -518,41 +514,48 @@ export default { | ||||
| .add-block { | ||||
|   width: 100%; | ||||
|   height: 100%; | ||||
|  | ||||
|   .above { | ||||
|     overflow: hidden; | ||||
|     padding: 8px 0; | ||||
|  | ||||
|     .left { | ||||
|       width: 380px; | ||||
|       float: left; | ||||
|     } | ||||
|  | ||||
|     .right { | ||||
|       width: 380px; | ||||
|       float: right; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .footer-btn { | ||||
|     width: 92px; | ||||
|   } | ||||
|  | ||||
|   .map { | ||||
|     width: 780px; | ||||
|     position: relative; | ||||
|     overflow: hidden; | ||||
|  | ||||
|     .container { | ||||
|       width: 760px; | ||||
|       height: 420px; | ||||
|       border-radius: 2px; | ||||
|       border: 1px solid #d0d4dc; | ||||
|     } | ||||
|  | ||||
|     #panel { | ||||
|       position: absolute; | ||||
|       height: 400px; | ||||
|       right: 30px; | ||||
|       overflow-x: auto; | ||||
|       top: 20px; | ||||
|       width: 280px; | ||||
|       overflow: hidden; | ||||
|       z-index: 10000; | ||||
|     } | ||||
|  | ||||
|     .tipinput { | ||||
|       position: absolute; | ||||
|       width: 200px; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user