fix():围栏组

master
86191 2024-09-25 20:25:30 +08:00
parent 49bdd5f36b
commit 5747259c30
3 changed files with 72 additions and 37 deletions

View File

@ -36,10 +36,14 @@ export function updfence(data) {
//删除 //删除
export function delElectronById(id) { export function delElectronById(id) {
// return request({
// url: '/fence/fence/delElectronById/'+id,
// method: 'post',
// data
// })
return request({ return request({
url: '/fence/fence/delElectronById/'+id, url: '/fence/fence/' + id,
method: 'post', method: 'DELETE'
data
}) })
} }

View File

@ -157,20 +157,20 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <!-- <el-row>-->
<el-col :span="20"> <!-- <el-col :span="20">-->
<el-form-item label="围栏类型" prop="noticeType"> <!-- <el-form-item label="围栏类型" prop="noticeType">-->
<el-select v-model="form.groupType" placeholder="请选择围栏类型"> <!-- <el-select v-model="form.groupType" placeholder="请选择围栏类型">-->
<el-option <!-- <el-option-->
v-for="dict in dict.type.sys_fence_type" <!-- v-for="dict in dict.type.sys_fence_type"-->
:key="dict.value" <!-- :key="dict.value"-->
:label="dict.label" <!-- :label="dict.label"-->
:value="dict.value" <!-- :value="dict.value"-->
></el-option> <!-- ></el-option>-->
</el-select> <!-- </el-select>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
<el-row> <el-row>
<el-col :span="20"> <el-col :span="20">
<el-form-item label="围栏组状态"> <el-form-item label="围栏组状态">

View File

@ -36,6 +36,7 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
v-hasPermi="['system:notice:add']" v-hasPermi="['system:notice:add']"
@ -59,6 +60,17 @@
>修改 >修改
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['fence:fence:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
@ -66,7 +78,7 @@
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['vehicles:sysCorpuscleFence:export']" v-hasPermi="['fence:fence:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
@ -80,6 +92,7 @@
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column <el-table-column
label="id" label="id"
width="180"> width="180">
@ -109,32 +122,32 @@
<dict-tag :options="dict.type.sys_notice_status" :value="scope.row.status"/> <dict-tag :options="dict.type.sys_notice_status" :value="scope.row.status"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column-->
label="围栏地理位置" <!-- label="围栏位置"-->
width="180"> <!-- width="180">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span style="margin-left: 10px">{{ scope.row.longitudeLatitude}}</span> <!-- <span style="margin-left: 10px">{{ scope.row.longitudeLatitude}}</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="操"> <el-table-column label="">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="warning" type="warning"
class="el-icon-view" class="el-icon-view"
@click="lookFence(scope.row)">回显围栏</el-button> @click="lookFence(scope.row)"></el-button>
<el-button <el-button
type="success" type="success"
class="el-icon-map-location" class="el-icon-map-location"
@click="handleFence(scope.row)">绘制电子围栏</el-button> @click="handleFence(scope.row)">绘制围栏</el-button>
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@click="handleUpdate(scope.row)">修改围栏</el-button> @click="handleUpdate(scope.row)">修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="danger" type="danger"
@click="handleDelete(scope.row)">删除围栏</el-button> @click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -192,9 +205,10 @@
<script> <script>
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {addfence, findElectronicByid, listFence, updfence} from "@/api/fence/fence"; import { addfence, delElectronById, findElectronicByid, listFence, updfence } from '@/api/fence/fence'
import {addDept, delDept, getDept, listDept, listDeptExcludeChild, updateDept} from "@/api/system/dept"; import {addDept, delDept, getDept, listDept, listDeptExcludeChild, updateDept} from "@/api/system/dept";
export default { export default {
name: "list", name: "list",
dicts: ['sys_normal_disable','sys_fence_type','sys_notice_status'], dicts: ['sys_normal_disable','sys_fence_type','sys_notice_status'],
@ -202,6 +216,8 @@ export default {
return { return {
// //
single: true, single: true,
//
multiple: true,
showSearch: true, showSearch: true,
fenceList:[], fenceList:[],
queryParams:{}, queryParams:{},
@ -248,18 +264,31 @@ export default {
path:'map', path:'map',
query:{id:row.id,longitudeLatitude:row.longitudeLatitude,open:0} query:{id:row.id,longitudeLatitude:row.longitudeLatitude,open:0}
}) })
alert("位置:"+row.longitudeLatitude)
}, },
//
handleDelete(row){ handleDelete(row){
this.$modal.confirm('是否确认删除名称为"' + row.deptName + '"的数据项?').then(function () { // this.$modal.confirm('"' + row.deptName + '"').then(function () {
return delDept(row.deptId); // return delDept(row.deptId);
// }).then(() => {
// this.getList();
// this.$modal.msgSuccess("");
// }).catch(() => {
// });
const ids = row.id || this.ids;
this.$confirm('是否确认删除电子围栏编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delElectronById(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => { }).catch(() => {});
});
}, },
// //
cancel() { cancel() {
this.open = false; this.open = false;
this.reset(); this.reset();
@ -290,7 +319,7 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('vehicles/sysCorpuscleFence/export', { this.download('fence/fence/export', {
...this.queryParams ...this.queryParams
}, `vehicle_fence.xlsx`) }, `vehicle_fence.xlsx`)
}, },
@ -334,4 +363,6 @@ export default {
}, },
} }
}; };
</script> </script>