From 95e6bc22e72ca9cd9df18c71172bd0392b3b1357 Mon Sep 17 00:00:00 2001 From: zhang chengzhi <3144712872@qq.com> Date: Tue, 1 Oct 2024 22:21:55 +0800 Subject: [PATCH] =?UTF-8?q?feat():=E4=BC=98=E5=8C=96=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=2010.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/fence/group.js | 13 ++- src/api/warning/rule.js | 14 +-- src/api/warning/strategy.js | 16 ++-- .../system/manage/carInformation/index.vue | 92 +++++++++++++++++++ 4 files changed, 119 insertions(+), 16 deletions(-) diff --git a/src/api/fence/group.js b/src/api/fence/group.js index 11694ca..5930065 100644 --- a/src/api/fence/group.js +++ b/src/api/fence/group.js @@ -63,7 +63,6 @@ export function selectAllGroup() { return request({ url: '/enterprise/group/selectAllGroup', method: 'post', - data }) } @@ -76,6 +75,17 @@ export function findFenceAndWayById(id) { }) } +//车辆绑定围栏组 +export function boundGroupAndCar(data) { + return request({ + url: '/enterprise/group/boundGroupAndCar', + method: 'post', + data + }) +} + + + //围栏组绑定车辆 export function selectCarAdd(data) { @@ -85,3 +95,4 @@ export function selectCarAdd(data) { data }) } + diff --git a/src/api/warning/rule.js b/src/api/warning/rule.js index 733eaa0..c60ccf3 100644 --- a/src/api/warning/rule.js +++ b/src/api/warning/rule.js @@ -3,14 +3,14 @@ import request from '@/utils/request' // 查询预警规则列表 export function listRule(query) { return request({ - url: '/warning/rule/list', + url: '/enterprise/rule/list', method: 'get', params: query }) } export function findStrategyRuleList(query) { return request({ - url: '/warning/rule/findStrategyRuleList', + url: '/enterprise/rule/findStrategyRuleList', method: 'get', params: query }) @@ -19,7 +19,7 @@ export function findStrategyRuleList(query) { // 查询预警规则详细 export function getRule(id) { return request({ - url: '/warning/rule/' + id, + url: '/enterprise/rule/' + id, method: 'get' }) } @@ -27,7 +27,7 @@ export function getRule(id) { // 新增预警规则 export function addRule(data) { return request({ - url: '/warning/rule', + url: '/enterprise/rule', method: 'post', data: data }) @@ -36,7 +36,7 @@ export function addRule(data) { // 修改预警规则 export function updateRule(data) { return request({ - url: '/warning/rule', + url: '/enterprise/rule', method: 'put', data: data }) @@ -45,14 +45,14 @@ export function updateRule(data) { // 删除预警规则 export function delRule(id) { return request({ - url: '/warning/rule/' + id, + url: '/enterprise/rule/' + id, method: 'delete' }) } export function findCarTypeMsg(carTypeId) { return request({ - url: '/warning/carTypeMsg/findCarTypeMsg', + url: '/enterprise/carTypeMsg/findCarTypeMsg', method: 'post', params: {carTypeId:carTypeId} }) diff --git a/src/api/warning/strategy.js b/src/api/warning/strategy.js index 924af80..252a9b5 100644 --- a/src/api/warning/strategy.js +++ b/src/api/warning/strategy.js @@ -3,14 +3,14 @@ import request from '@/utils/request' // 查询预警策略列表 export function listStrategy(query) { return request({ - url: '/warning/strategy/list', + url: '/enterprise/strategy/list', method: 'get', params: query }) } export function selectStrategyList(query) { return request({ - url: '/warning/strategy/selectStrategyList', + url: '/enterprise/strategy/selectStrategyList', method: 'get', params: query }) @@ -19,7 +19,7 @@ export function selectStrategyList(query) { // 查询预警策略详细 export function getStrategy(id) { return request({ - url: '/warning/strategy/' + id, + url: '/enterprise/strategy/' + id, method: 'get' }) } @@ -27,7 +27,7 @@ export function getStrategy(id) { // 新增预警策略 export function addStrategy(data) { return request({ - url: '/warning/strategy', + url: '/enterprise/strategy', method: 'post', data: data }) @@ -36,7 +36,7 @@ export function addStrategy(data) { // 修改预警策略 export function updateStrategy(data) { return request({ - url: '/warning/strategy', + url: '/enterprise/strategy', method: 'put', data: data }) @@ -45,19 +45,19 @@ export function updateStrategy(data) { // 删除预警策略 export function delStrategy(id) { return request({ - url: '/warning/strategy/' + id, + url: '/enterprise/strategy/' + id, method: 'delete' }) } export function findCarTypeName() { return request({ - url: '/warning/carType/findCarTypeName', + url: '/enterprise/carType/findCarTypeName', method: 'post', }) } export function findStrategyListByCarTypeId(carTypeId) { return request({ - url: '/warning/strategy/findStrategyListByCarTypeId', + url: '/enterprise/strategy/findStrategyListByCarTypeId', method: 'post', params: {carTypeId:carTypeId} }) diff --git a/src/views/system/manage/carInformation/index.vue b/src/views/system/manage/carInformation/index.vue index 7c21b2d..a312803 100644 --- a/src/views/system/manage/carInformation/index.vue +++ b/src/views/system/manage/carInformation/index.vue @@ -94,6 +94,7 @@ 修改 删除 配置策略 + 绑定围栏组 @@ -119,6 +120,47 @@ + + + + + + + + + + + + + + 取 消 + 确 定 + + + + + + @@ -135,6 +177,7 @@ import { updCarStrategyId } from '@/api/system/manage/carInformation' import { findStrategyListByCarTypeId, updateStrategy } from '@/api/warning/strategy' +import { boundGroupAndCar, selectAllGroup } from '@/api/fence/group' export default { //import引入的组件需要注入到对象中才能使用" @@ -143,10 +186,24 @@ export default { data() { //这里存放数据" return { + GroupAndCarBound:{ + vin:null, + //多选框选中内容 + groupListResp: [], + }, + + //围栏组列表 + groupList:[], + //抽屉属性 + drawer:false, + //抽屉呼出方向 从右到左 + direction:'rtl', + strategyId:null, carId:null, dialogVisible: false, tableData: [], + // 查询参数 selectInformation: { pageNum: 1, @@ -171,6 +228,41 @@ export default { watch: {}, //方法集合", methods: { + + dobound(){ + + boundGroupAndCar(this.GroupAndCarBound).then(res=>{ + + this.$modal.msgSuccess("绑定成功"); + this.drawer=false; + }) + + + }, + handleSelectionChange(val) { + this.GroupAndCarBound.groupListResp = val; + }, + + + handleClose(done) { + this.$confirm('确认关闭?') + .then(_ => { + done(); + }) + .catch(_ => {}); + }, + + boundFenceGroup(row){ + this.GroupAndCarBound.vin=row.carVin; + selectAllGroup().then(res=>{ + + this.groupList = res.data; + + console.log(this.groupList); + this.drawer =true; + }) + + }, updCarStrategyId(){ updCarStrategyId(this.carId,this.strategyId).then((res)=>{ this.$modal.msgSuccess("修改成功");