fase()坐标获取

car_1
王熙朝 2024-06-03 20:53:07 +08:00
parent 73fd29b308
commit f1fe1a348a
4 changed files with 29 additions and 30 deletions

View File

@ -34,9 +34,3 @@ export function getSel(data) {
})
}
export function setSel(r) {
return request({
url: '/rule/map/setSel?r=' + r,
method: 'post'
})
}

View File

@ -143,9 +143,6 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
@click="querys(scope.row.carId)"
>详情</el-button>
<el-button
size="mini"
type="text"
@ -283,11 +280,6 @@ export default {
bulk() {
alert("信息已发送,等待处理")
},
querys(carId){
query(carId).then(res => {
console.log(res.data)
})
},
fence(carId) {
this.$router.push({path: '/client/sever/fence',query:{carId:carId}})
},

View File

@ -1,21 +1,26 @@
<template>
<div>
{{fenceGroups.groupsName}}下属围栏
<el-button type="text" @click="add(fenceGroups.groupsId)"></el-button>
<el-table :data="fenceGroups.fenceList">
<el-table-column prop="fenceName" label="围栏名称"></el-table-column>
<el-table-column prop="fenceType" label="围栏类型"></el-table-column>
<el-table-column prop="radius" label="半径"></el-table-column>
<el-table-column prop="eventType" label="驶入驶出"></el-table-column>
<el-table-column prop="eventType" label="驶入驶出">
<span slot-scope="scope">
<span v-if="scope.row.eventType === 'Y'"></span>
<span v-if="scope.row.eventType === 'N'"></span>
</span>
</el-table-column>
<el-table-column prop="staut" label="围栏状态">
<span slot-scope="scope">
<span v-if="scope.row.staut == 0"></span>
<span v-if="scope.row.staut == -1"></span>
<span v-if="scope.row.staut === 'Y'"></span>
<span v-if="scope.row.staut === 'N'"></span>
</span>
</el-table-column>
<el-table-column prop="polygonPoints" label="坐标"></el-table-column>
<el-table-column label="增加围栏">
<el-table-column label="删除">
<span slot-scope="scope">
<el-button type="text" @click="add(scope.row.groupId)"></el-button>
<el-button type="text">删除</el-button>
</span>
</el-table-column>
</el-table>
@ -49,8 +54,9 @@ export default {
console.log(res.data)
})
},
add(groupId) {
this.$router.push({path:'/client/sever/map',groupId:groupId})
add(groupsId) {
alert(groupsId)
this.$router.push({path:'/client/sever/map',query:{groupsId:groupsId}})
}
},
// - 访this",

View File

@ -9,7 +9,7 @@
</template>
<script>
import { getSel, setSel } from "@/api/goods/map";
import { getSel } from "@/api/goods/map";
// jsjsjson,
// import from ',
export default {
@ -21,10 +21,14 @@ export default {
data() {
// "
return {
groupId: this.$route.query.groupId,
groupsId: this.$route.query.groupsId,
path: [], //
polygonItem: [], //
polyEditors: [] //
polyEditors: [], //
pences:{
groupsId: this.$route.query.groupsId,
list: []
} //
}
},
// data",
@ -33,14 +37,17 @@ export default {
watch: {},
// ",
methods: {
sel() {
sel() {//
const jsonData = JSON.stringify(this.polygonItem[0].w.path)
console.log(jsonData)
const jsonPare = JSON.parse(jsonData)
jsonPare.forEach(res => {
console.log(res)
// console.log(res)
})
getSel(jsonPare).then(res => {
this.pences.list = this.polygonItem[0].w.path;
console.log(this.groupsId)
console.log(this.groupsId)
console.log(this.$route)
getSel(this.pences).then(res => {
console.log(res.data)
})
},
@ -51,7 +58,7 @@ export default {
//TODO
});
this.map = new this.AMap.Map("amapContainer", {
center: [116.434381, 39.898515],
center: [116.409753, 39.921925],
zoom: 14,
mapStyle: "amap://styles/darkblue",
pitch: 80,