This commit is contained in:
xiaozhiyong
2023-05-24 11:35:28 +08:00
parent 9a4d3de6ed
commit 35befe4dde

View File

@@ -101,7 +101,9 @@
onLoad(options) {
if (options.item) {
this.postData = JSON.parse(decodeURI(options.item))
if (!this.postData.sysRoleList) this.postData.sysRoleList = []
if (!this.postData.sysRoleList) {
this.$set(this.postData,'sysRoleList',[])
}
} else this.isAdd = this.wantUpdate = true
uni.$on('yunSiteServiceStation', (item) => {
@@ -119,6 +121,7 @@
})
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) {
@@ -127,6 +130,7 @@
return
}
this.postData.sysRoleList.push(item)
console.log('this.postData.sysRoleList',this.postData.sysRoleList)
})