diff --git a/src/api/system/manage/carInformation.js b/src/api/system/manage/carInformation.js
index 88015de..bfdaf27 100644
--- a/src/api/system/manage/carInformation.js
+++ b/src/api/system/manage/carInformation.js
@@ -12,7 +12,7 @@ export function findInformationList(data) {
// 新增
export function insertInformation(data) {
return request({
- url: '/enterprise/information/insertInformation',
+ url: '/manage/carmsg/addCarMsg',
method: 'post',
data
})
@@ -21,7 +21,7 @@ export function insertInformation(data) {
// 修改
export function updateInformationById(data) {
return request({
- url: '/enterprise/information/updateInformationById',
+ url: '/manage/carmsg/updateInformationById',
method: 'post',
data
})
@@ -38,7 +38,7 @@ export function deleteInformationById(id) {
// 根据ID查询信息
export function findInformationByid(id) {
return request({
- url: '/enterprise/information/findInformationByid?id='+id,
+ url: '/manage/carmsg/findInformationByid?id='+id,
method: 'post'
})
}
diff --git a/src/views/system/manage/carInformation/index.vue b/src/views/system/manage/carInformation/index.vue
index 63332a4..4d3eb09 100644
--- a/src/views/system/manage/carInformation/index.vue
+++ b/src/views/system/manage/carInformation/index.vue
@@ -34,6 +34,94 @@
添加
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+ label="电子围栏外键"
+ prop="groupId">
修改
删除
配置策略
- 绑定围栏组
- 查看围栏组
+ 绑定围栏组
@@ -174,16 +259,15 @@
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
//例如:import 《组件名称》 from '《组件路径》,
import {
- deleteInformationById,
+ deleteInformationById, findInformationByid,
findInformationList,
- insertInformation,
+ insertInformation, updateInformationById,
updCarStrategyId
} from '@/api/system/manage/carInformation'
import { findStrategyListByCarTypeId, updateStrategy } from '@/api/warning/strategy'
-import { boundGroupAndCar, getGroupListResp, selectAllGroup } from '@/api/fence/group'
+import { boundGroupAndCar, selectAllGroup } from '@/api/fence/group'
export default {
- dicts: ['sys_car_group'],
//import引入的组件需要注入到对象中才能使用"
components: {},
props: {},
@@ -195,14 +279,16 @@ export default {
//多选框选中内容
groupListResp: [],
},
-
+ insertForm: {},
+ updateForm: {},
//围栏组列表
groupList:[],
//抽屉属性
drawer:false,
//抽屉呼出方向 从右到左
direction:'rtl',
-
+ dialogVisibleAdd: false,
+ dialogVisibleUpd: false,
strategyId:null,
carId:null,
dialogVisible: false,
@@ -233,27 +319,6 @@ 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=>{
@@ -348,7 +413,11 @@ export default {
},
// 修改
handleEdit(row){
- this.$router.push({path:'/carInformation/edit',query:{id:row.id}})
+ this.dialogVisibleUpd = true
+ // 回显
+ findInformationByid(row.id).then(res=>{
+ this.updateForm = res.data;
+ })
},
/** 删除 */
handleDelete(row){
@@ -368,6 +437,9 @@ export default {
},
//添加
handleAdd(){
+ this.dialogVisibleAdd = true
+ },
+ doAdd(){
insertInformation(this.insertForm).then(res=>{
alert(res.msg)
if(res.code == 200){
@@ -376,8 +448,21 @@ export default {
}
})
- }
+ },
+ doUpd(){
+ updateInformationById(this.updateForm).then(res=>{
+ alert(res.msg)
+ if(res.code == 200){
+ alert("修改成功")
+ this.getList();
+ }
+
+ })
+ },
},
+
+
+
//生命周期 - 创建完成(可以访问当前this实例)",
created() {
this.getList();