| | |
| | | </el-button> |
| | | </template> |
| | | <template slot="activityAreaForm"> |
| | | <map-box ref="OpenLayersMap" @toData="toData" :routeRange="form.activityArea"></map-box> |
| | | <!-- <map-box ref="OpenLayersMap" @toData="toData" :routeRange="form.activityArea"></map-box>--> |
| | | <dc-map ref="dcMap" @toData="toData" :range="form.activityArea"></dc-map> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | |
| | | import securityManageCar from "@/views/securityManageCar/securityManageCar" |
| | | import MapBox from "@/components/map/mapBox"; |
| | | import SearchMap from "@/components/map/searchMap"; |
| | | import DcMap from "@/components/map/dcMap"; |
| | | |
| | | export default { |
| | | components: { |
| | | DcMap, |
| | | SearchMap, |
| | | MapBox, |
| | | securityManage, |
| | |
| | | message: "请输入活动名称", |
| | | trigger: "blur" |
| | | }], |
| | | overHidden:true, |
| | | }, |
| | | { |
| | | label: "负责单位", |
| | | prop: "company", |
| | | hide:true, |
| | | }, |
| | | { |
| | | label: "负责人", |
| | |
| | | click: () => { |
| | | this.placeBox = !this.placeBox |
| | | }, |
| | | // addDisplay: false, |
| | | // editDisplay: false, |
| | | // viewDisplay: false, |
| | | overHidden:true, |
| | | }, |
| | | { |
| | | label: "经度", |
| | |
| | | label: "所属辖区", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | dicUrl: "api/blade-system/dept/lazy-list", |
| | | dicUrl: "api/blade-system/dept/getPoliceStationTree", |
| | | props: { |
| | | label: 'deptName', |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'children' |
| | | }, |
| | | search: true, |
| | | searchSpan: 4, |
| | | span: 24, |
| | | defaultExpandAll:"true", |
| | | width: 110, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | label: "人数", |
| | | prop: "number", |
| | | width: 60, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入人数", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "活动内容", |
| | | prop: "content", |
| | | type: "textarea", |
| | | span: 24 |
| | | span: 24, |
| | | hide:true, |
| | | }, |
| | | ] |
| | | }, |
| | |
| | | loading() |
| | | return |
| | | } |
| | | |
| | | if (row.activityArea.startsWith("LINESTRING")){ |
| | | |
| | | }else { |
| | | if (!row.activityArea.startsWith("'LINESTRING")){ |
| | | row.activityArea = "'LINESTRING("+row.activityArea+")'" |
| | | } |
| | | row.position = row.longitude + " " + row.latitude |
| | |
| | | this.form['longitude'] = data.position.split(" ")[0] |
| | | this.form['latitude'] = data.position.split(" ")[1] |
| | | this.point = "POINT("+this.form.longitude +" "+this.form.latitude+")" |
| | | this.$refs.dcMap.showPolygon(this.form.activityArea) |
| | | }) |
| | | } |
| | | done() |
| | |
| | | this.chosePoint.address = data |
| | | }, |
| | | confirmLonLat(){ |
| | | this.form.longitude = this.chosePoint.longitude |
| | | this.form.latitude = this.chosePoint.latitude |
| | | this.form.place = this.chosePoint.address |
| | | this.point = "POINT("+this.form.longitude +" "+this.form.latitude+")" |
| | | this.placeBox = false |
| | | if(this.chosePoint.longitude){ |
| | | this.form.longitude = this.chosePoint.longitude |
| | | this.form.latitude = this.chosePoint.latitude |
| | | this.form.place = this.chosePoint.address |
| | | this.point = "POINT("+this.form.longitude +" "+this.form.latitude+")" |
| | | this.placeBox = false |
| | | }else { |
| | | this.$alert('该点没有位置信息,请重新选点!', '提示', { |
| | | confirmButtonText: '确定', |
| | | }); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |