feat():优化业务功能 10.1
parent
6790c484f9
commit
95e6bc22e7
|
@ -63,7 +63,6 @@ export function selectAllGroup() {
|
||||||
return request({
|
return request({
|
||||||
url: '/enterprise/group/selectAllGroup',
|
url: '/enterprise/group/selectAllGroup',
|
||||||
method: 'post',
|
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) {
|
export function selectCarAdd(data) {
|
||||||
|
@ -85,3 +95,4 @@ export function selectCarAdd(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,14 @@ import request from '@/utils/request'
|
||||||
// 查询预警规则列表
|
// 查询预警规则列表
|
||||||
export function listRule(query) {
|
export function listRule(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/rule/list',
|
url: '/enterprise/rule/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function findStrategyRuleList(query) {
|
export function findStrategyRuleList(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/rule/findStrategyRuleList',
|
url: '/enterprise/rule/findStrategyRuleList',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
@ -19,7 +19,7 @@ export function findStrategyRuleList(query) {
|
||||||
// 查询预警规则详细
|
// 查询预警规则详细
|
||||||
export function getRule(id) {
|
export function getRule(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/rule/' + id,
|
url: '/enterprise/rule/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ export function getRule(id) {
|
||||||
// 新增预警规则
|
// 新增预警规则
|
||||||
export function addRule(data) {
|
export function addRule(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/rule',
|
url: '/enterprise/rule',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
@ -36,7 +36,7 @@ export function addRule(data) {
|
||||||
// 修改预警规则
|
// 修改预警规则
|
||||||
export function updateRule(data) {
|
export function updateRule(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/rule',
|
url: '/enterprise/rule',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
@ -45,14 +45,14 @@ export function updateRule(data) {
|
||||||
// 删除预警规则
|
// 删除预警规则
|
||||||
export function delRule(id) {
|
export function delRule(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/rule/' + id,
|
url: '/enterprise/rule/' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function findCarTypeMsg(carTypeId) {
|
export function findCarTypeMsg(carTypeId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/carTypeMsg/findCarTypeMsg',
|
url: '/enterprise/carTypeMsg/findCarTypeMsg',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: {carTypeId:carTypeId}
|
params: {carTypeId:carTypeId}
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,14 +3,14 @@ import request from '@/utils/request'
|
||||||
// 查询预警策略列表
|
// 查询预警策略列表
|
||||||
export function listStrategy(query) {
|
export function listStrategy(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/strategy/list',
|
url: '/enterprise/strategy/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function selectStrategyList(query) {
|
export function selectStrategyList(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/strategy/selectStrategyList',
|
url: '/enterprise/strategy/selectStrategyList',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
@ -19,7 +19,7 @@ export function selectStrategyList(query) {
|
||||||
// 查询预警策略详细
|
// 查询预警策略详细
|
||||||
export function getStrategy(id) {
|
export function getStrategy(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/strategy/' + id,
|
url: '/enterprise/strategy/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ export function getStrategy(id) {
|
||||||
// 新增预警策略
|
// 新增预警策略
|
||||||
export function addStrategy(data) {
|
export function addStrategy(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/strategy',
|
url: '/enterprise/strategy',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
@ -36,7 +36,7 @@ export function addStrategy(data) {
|
||||||
// 修改预警策略
|
// 修改预警策略
|
||||||
export function updateStrategy(data) {
|
export function updateStrategy(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/strategy',
|
url: '/enterprise/strategy',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
@ -45,19 +45,19 @@ export function updateStrategy(data) {
|
||||||
// 删除预警策略
|
// 删除预警策略
|
||||||
export function delStrategy(id) {
|
export function delStrategy(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/strategy/' + id,
|
url: '/enterprise/strategy/' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function findCarTypeName() {
|
export function findCarTypeName() {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/carType/findCarTypeName',
|
url: '/enterprise/carType/findCarTypeName',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function findStrategyListByCarTypeId(carTypeId) {
|
export function findStrategyListByCarTypeId(carTypeId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/warning/strategy/findStrategyListByCarTypeId',
|
url: '/enterprise/strategy/findStrategyListByCarTypeId',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: {carTypeId:carTypeId}
|
params: {carTypeId:carTypeId}
|
||||||
})
|
})
|
||||||
|
|
|
@ -94,6 +94,7 @@
|
||||||
<el-button type="text" @click="handleEdit(scope.row)">修改</el-button>
|
<el-button type="text" @click="handleEdit(scope.row)">修改</el-button>
|
||||||
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
|
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
<el-button type="text" @click="configurationStrategy(scope.row)">配置策略</el-button>
|
<el-button type="text" @click="configurationStrategy(scope.row)">配置策略</el-button>
|
||||||
|
<el-button type="text" class="el-icon-connection" @click="boundFenceGroup(scope.row)">绑定围栏组</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -119,6 +120,47 @@
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-drawer
|
||||||
|
title="绑定围栏组"
|
||||||
|
:visible.sync="drawer"
|
||||||
|
:direction="direction"
|
||||||
|
:before-close="handleClose">
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
ref="multipleTable"
|
||||||
|
:data="groupList"
|
||||||
|
tooltip-effect="dark"
|
||||||
|
style="width: 100%"
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="id"
|
||||||
|
prop="id"
|
||||||
|
width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="groupName"
|
||||||
|
label="围栏组名称"
|
||||||
|
width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="priority"
|
||||||
|
label="优先级"
|
||||||
|
show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<el-button @click="drawer = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="dobound()">确 定</el-button>
|
||||||
|
|
||||||
|
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -135,6 +177,7 @@ import {
|
||||||
updCarStrategyId
|
updCarStrategyId
|
||||||
} from '@/api/system/manage/carInformation'
|
} from '@/api/system/manage/carInformation'
|
||||||
import { findStrategyListByCarTypeId, updateStrategy } from '@/api/warning/strategy'
|
import { findStrategyListByCarTypeId, updateStrategy } from '@/api/warning/strategy'
|
||||||
|
import { boundGroupAndCar, selectAllGroup } from '@/api/fence/group'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
//import引入的组件需要注入到对象中才能使用"
|
//import引入的组件需要注入到对象中才能使用"
|
||||||
|
@ -143,10 +186,24 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
//这里存放数据"
|
//这里存放数据"
|
||||||
return {
|
return {
|
||||||
|
GroupAndCarBound:{
|
||||||
|
vin:null,
|
||||||
|
//多选框选中内容
|
||||||
|
groupListResp: [],
|
||||||
|
},
|
||||||
|
|
||||||
|
//围栏组列表
|
||||||
|
groupList:[],
|
||||||
|
//抽屉属性
|
||||||
|
drawer:false,
|
||||||
|
//抽屉呼出方向 从右到左
|
||||||
|
direction:'rtl',
|
||||||
|
|
||||||
strategyId:null,
|
strategyId:null,
|
||||||
carId:null,
|
carId:null,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
selectInformation: {
|
selectInformation: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
@ -171,6 +228,41 @@ export default {
|
||||||
watch: {},
|
watch: {},
|
||||||
//方法集合",
|
//方法集合",
|
||||||
methods: {
|
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(){
|
||||||
updCarStrategyId(this.carId,this.strategyId).then((res)=>{
|
updCarStrategyId(this.carId,this.strategyId).then((res)=>{
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
|
Loading…
Reference in New Issue