|
@@ -14,8 +14,8 @@
|
|
</u-checkbox-group>
|
|
</u-checkbox-group>
|
|
</view>
|
|
</view>
|
|
<view class="form-handle">
|
|
<view class="form-handle">
|
|
- <u-button type="success" shape="circle" :ripple="true" @click="creatAuthorize" class="handle-custom">确认授权</u-button>
|
|
|
|
- <u-button type="error" shape="circle" :ripple="true" @click="modalShow1 = true" class="handle-custom2">删除该授权用户</u-button>
|
|
|
|
|
|
+ <u-button type="success" shape="circle" :ripple="true" @click="setAuthorize" class="handle-custom">确认授权</u-button>
|
|
|
|
+ <u-button type="error" shape="circle" :ripple="true" @click="modalShow2 = true" class="handle-custom2">删除该授权用户</u-button>
|
|
</view>
|
|
</view>
|
|
<u-modal v-model="modalShow1" content="是否确认授予该授权用户对应权限" @confirm="setAuthorize" :async-close="true"
|
|
<u-modal v-model="modalShow1" content="是否确认授予该授权用户对应权限" @confirm="setAuthorize" :async-close="true"
|
|
:show-cancel-button="true"></u-modal>
|
|
:show-cancel-button="true"></u-modal>
|
|
@@ -49,8 +49,8 @@
|
|
merchantNickname: res.data.merchantNickname,
|
|
merchantNickname: res.data.merchantNickname,
|
|
merchantPhone: res.data.merchantPhone,
|
|
merchantPhone: res.data.merchantPhone,
|
|
}
|
|
}
|
|
- let role = res.data.allRoleInfos.map(stie => {
|
|
|
|
- return site.roleId
|
|
|
|
|
|
+ let role = res.data.roleInfos.map(stie => {
|
|
|
|
+ return stie.roleId
|
|
}).join(',')
|
|
}).join(',')
|
|
this.checkList = res.data.allRoleInfos.map(stie => {
|
|
this.checkList = res.data.allRoleInfos.map(stie => {
|
|
return {
|
|
return {
|
|
@@ -61,8 +61,9 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
|
+ console.log(error)
|
|
this.$refs.uTips.show({
|
|
this.$refs.uTips.show({
|
|
- title: error.data.msg,
|
|
|
|
|
|
+ title: error.msg,
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
})
|
|
})
|
|
@@ -71,7 +72,7 @@
|
|
// 设置授权用户权限
|
|
// 设置授权用户权限
|
|
setAuthorize() {
|
|
setAuthorize() {
|
|
NET.request(API.setAuthorize + this.userInfo.userId, {
|
|
NET.request(API.setAuthorize + this.userInfo.userId, {
|
|
- roleInfos: this.checkList.filter(site => site.check).map(site => {
|
|
|
|
|
|
+ roleInfos: this.checkList.filter(site => site.checked).map(site => {
|
|
return {
|
|
return {
|
|
roleName: site.roleName,
|
|
roleName: site.roleName,
|
|
roleId: site.roleId,
|
|
roleId: site.roleId,
|