更新
This commit is contained in:
@@ -98,7 +98,6 @@
|
||||
siteName: '',
|
||||
customerName: '',
|
||||
sysRoleList: [],
|
||||
// oilSiteInfoList: [],
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -113,19 +112,9 @@
|
||||
uni.$on('yunSiteServiceStation', (item) => {
|
||||
this.postData.channelId = item.id
|
||||
this.postData.siteName = item.otherSiteName
|
||||
// item['name'] = item.siteName
|
||||
// if (!item.isChecked) {
|
||||
// let index = this.postData.oilSiteInfoList.findIndex(secItem => secItem.id == item.id)
|
||||
// if (index !== -1) {
|
||||
// this.postData.oilSiteInfoList.splice(index, 1)
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
// this.postData.oilSiteInfoList.push(item)
|
||||
})
|
||||
|
||||
uni.$on('yunSiteAuth', (item) => {
|
||||
// console.log('item',item)
|
||||
if (!item.isChecked) {
|
||||
let index = this.postData.sysRoleList.findIndex(secItem => secItem.id == item.id)
|
||||
if (index !== -1) {
|
||||
@@ -134,10 +123,7 @@
|
||||
return
|
||||
}
|
||||
this.postData.sysRoleList.push(item)
|
||||
console.log('this.postData.sysRoleList',this.postData.sysRoleList)
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
@@ -159,10 +145,8 @@
|
||||
WrongText:'请选择所属权限'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
let check = tool.checkFn(this.postData,[],needCheckMap)
|
||||
|
||||
}
|
||||
let check = tool.checkFn(this.postData,[],needCheckMap)
|
||||
if(!check.result){
|
||||
uni.showToast({
|
||||
title:check.WrongText,
|
||||
@@ -170,17 +154,12 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// if(this.postData.sysRoleList.length)
|
||||
|
||||
let ids = this.postData.sysRoleList.reduce((pre, cur) => {
|
||||
pre.push(cur.id)
|
||||
return pre
|
||||
}, [])
|
||||
this.postData.roleIds = ids
|
||||
|
||||
this.judgeQuery().then(res => {
|
||||
|
||||
if (res.code === 20000) {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
@@ -189,7 +168,6 @@
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1500)
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user