forked from dyf/dyf-vue-ui
Merge branch 'main' of http://47.107.152.87:3000/dyf/dyf-vue-ui
This commit is contained in:
@ -35,7 +35,7 @@
|
||||
<el-option :key="1" :label="'圆形'" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否激活" prop="isActive" >
|
||||
<el-form-item label="是否激活" prop="isActive">
|
||||
<el-select v-model="queryParams.isActive" clearable placeholder="请选择">
|
||||
<el-option :key="1" :label="'是'" :value="1" />
|
||||
<el-option :key="0" :label="'否'" :value="0" />
|
||||
@ -75,8 +75,7 @@
|
||||
<div>{{ scope.row.isActive == '1' ? '是' : '否' }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="描述" align="center" prop="description"> </el-table-column>
|
||||
|
||||
<el-table-column label="描述" align="center" prop="description"> </el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" width="180" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
@ -217,7 +216,6 @@ function showSearch() {
|
||||
}
|
||||
}
|
||||
function ShowEdit(item) {
|
||||
|
||||
Status.showEdit = true;
|
||||
if (item) {
|
||||
let keys = Object.keys(item);
|
||||
@ -229,6 +227,14 @@ function ShowEdit(item) {
|
||||
if (item.coordinates) {
|
||||
cEdit.coordinates = JSON.parse(item.coordinates);
|
||||
}
|
||||
} else {
|
||||
cEdit.id = null;
|
||||
cEdit.name = '';
|
||||
cEdit.description = '';
|
||||
cEdit.areaType = null;
|
||||
cEdit.coordinates = [];
|
||||
cEdit.radius = null;
|
||||
cEdit.isActive = null;
|
||||
}
|
||||
map.clearOverLays();
|
||||
setTimeout(() => {
|
||||
@ -304,7 +310,6 @@ let time = null;
|
||||
function refreshOverLayer() {
|
||||
clearTimeout(time);
|
||||
time = setTimeout(() => {
|
||||
|
||||
if (cEdit.areaType == 1) {
|
||||
map.DrawCicle(cEdit.coordinates, cEdit.radius, circleDragEnd);
|
||||
} else {
|
||||
@ -326,7 +331,6 @@ function ClearPoint() {
|
||||
}
|
||||
//添加一个点
|
||||
function AddPoint(point, i) {
|
||||
|
||||
if (cEdit.areaType == null && !point) {
|
||||
alert('请选择围栏类型');
|
||||
return;
|
||||
@ -338,16 +342,13 @@ function AddPoint(point, i) {
|
||||
|
||||
let index = i !== undefined ? i : cEdit.coordinates.length;
|
||||
let dragEnd = (evt, lay) => {
|
||||
|
||||
map.removePoy();
|
||||
|
||||
cEdit.coordinates[index].lng = evt.lnglat.lng;
|
||||
cEdit.coordinates[index].lat = evt.lnglat.lat;
|
||||
refreshOverLayer();
|
||||
|
||||
};
|
||||
let pointClick = (evt, lay) => {
|
||||
|
||||
confirm(
|
||||
'您确认删除该点吗?',
|
||||
() => {
|
||||
@ -364,7 +365,9 @@ function AddPoint(point, i) {
|
||||
let lon = res.lng;
|
||||
let lat = res.lat;
|
||||
|
||||
if(!point){cEdit.coordinates.push({ lng: lon, lat: lat });}
|
||||
if (!point) {
|
||||
cEdit.coordinates.push({ lng: lon, lat: lat });
|
||||
}
|
||||
refreshOverLayer();
|
||||
});
|
||||
}
|
||||
@ -443,11 +446,8 @@ function getList() {
|
||||
}
|
||||
|
||||
function Export() {
|
||||
|
||||
let json = {};
|
||||
proxy?.download('/api/equipment/geoFence/export', json, `电子围栏列表_${new Date().getTime()}.xlsx`, 'post').finally(() => {
|
||||
|
||||
});
|
||||
proxy?.download('/api/equipment/geoFence/export', json, `电子围栏列表_${new Date().getTime()}.xlsx`, 'post').finally(() => {});
|
||||
}
|
||||
|
||||
//获取已选中的行
|
||||
|
||||
Reference in New Issue
Block a user