BUG 25975
This commit is contained in:
		
							
								
								
									
										89
									
								
								packages/2.0.5/AppGridBlock/components/add.vue
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										89
									
								
								packages/2.0.5/AppGridBlock/components/add.vue
									
									
									
									
										vendored
									
									
								
							| @@ -10,7 +10,7 @@ | |||||||
|         ></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> | ||||||
| @@ -26,7 +26,7 @@ | |||||||
|             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"> | ||||||
| @@ -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"> | ||||||
| @@ -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> | ||||||
| @@ -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"}, | ||||||
|         ], |         ], | ||||||
|       }; |       }; | ||||||
|     }, |     }, | ||||||
| @@ -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) { | ||||||
| @@ -467,7 +465,7 @@ export default { | |||||||
|         .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]; | ||||||
| @@ -497,13 +495,11 @@ 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.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; | ||||||
|           // this.forms.isLastLevel =this.forms.girdLevel; |           // 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; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user