feat():优化业务功能 10.7

master
zhang chengzhi 2024-10-07 18:41:52 +08:00
parent c5f7eac850
commit 23559037a9
3 changed files with 40 additions and 5 deletions

View File

@ -67,6 +67,17 @@ export function selectAllGroup() {
}
//围栏组所有
export function getGroupListResp(data) {
return request({
url: '/enterprise/group/getGroupListResp',
method: 'post',
data
})
}
//回显绑定的电子围栏信息
export function findFenceAndWayById(id) {
return request({

View File

@ -324,7 +324,6 @@ export default {
this.open = false;
this.getList();
});
loading.close();
}
}
});

View File

@ -56,8 +56,10 @@
prop="typeName">
</el-table-column>
<el-table-column
label="电子围栏外键"
prop="groupId">
label="是否绑定围栏">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_car_group" :value="scope.row.groupId"/>
</template>
</el-table-column>
<el-table-column
label="车辆电机厂商"
@ -94,7 +96,8 @@
<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="configurationStrategy(scope.row)"></el-button>
<el-button type="text" class="el-icon-connection" @click="boundFenceGroup(scope.row)"></el-button>
<el-button type="primary" class="el-icon-connection" @click="boundFenceGroup(scope.row)" v-show="scope.row.groupId==0"></el-button>
<el-button type="success" class="el-icon-link" @click="lookboundGroup(scope.row)" v-show="scope.row.groupId==1"></el-button>
</template>
</el-table-column>
</el-table>
@ -177,9 +180,10 @@ import {
updCarStrategyId
} from '@/api/system/manage/carInformation'
import { findStrategyListByCarTypeId, updateStrategy } from '@/api/warning/strategy'
import { boundGroupAndCar, selectAllGroup } from '@/api/fence/group'
import { boundGroupAndCar, getGroupListResp, selectAllGroup } from '@/api/fence/group'
export default {
dicts: ['sys_car_group'],
//import使"
components: {},
props: {},
@ -229,6 +233,27 @@ export default {
//",
methods: {
lookboundGroup(row){
selectAllGroup().then(res=>{
this.groupList = res.data;
})
this.drawer=true;
getGroupListResp(row).then(res=>{
let rows = res.data;
console.log(rows)
if (rows!=null&&rows!=undefined&&rows!=''){
rows.forEach(row => {
console.log(this.groupList[row.id-1]);
console.log(row);
this.$refs.multipleTable.toggleRowSelection(this.groupList[row.id-1]);
});
}
})
},
dobound(){
boundGroupAndCar(this.GroupAndCarBound).then(res=>{