|
|
|
@ -464,11 +464,11 @@ |
|
|
|
v-drag |
|
|
|
:title="'岗位授权'" |
|
|
|
:visible.sync="roleVisible" |
|
|
|
width="518px" |
|
|
|
width="680px" |
|
|
|
:append-to-body="true"> |
|
|
|
<el-transfer class="rq" filterable v-model="selectRoleList" :props="{ |
|
|
|
key: 'roleNo', |
|
|
|
label: 'roleDesc' |
|
|
|
key: 'roleKey', |
|
|
|
label: 'roleLabel' |
|
|
|
}" :data="roleList" :titles="['未授权岗位', '已授权岗位']"></el-transfer> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<div style="margin-top: 5px"> |
|
|
|
@ -1127,15 +1127,37 @@ export default { |
|
|
|
|
|
|
|
searchRoleList () { |
|
|
|
searchAccessRoleList({ |
|
|
|
site: this.$store.state.user.site, |
|
|
|
username: this.selectUser.username, |
|
|
|
active: 'Y' |
|
|
|
}).then(({data}) => { |
|
|
|
this.selectRoleList = data.selectRoleList |
|
|
|
this.roleList = data.roleList |
|
|
|
this.selectRoleList = data.selectRoleList || [] |
|
|
|
this.roleList = (data.roleList || []).map(item => { |
|
|
|
const site = String((item && item.site) || '').trim() |
|
|
|
const roleNo = String((item && item.roleNo) || '').trim() |
|
|
|
const roleDesc = String((item && item.roleDesc) || '').trim() |
|
|
|
return Object.assign({}, item, { |
|
|
|
roleKey: item.roleKey || (site + '|' + roleNo), |
|
|
|
roleLabel: item.roleLabel || (site + ' - ' + roleDesc) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
parseRoleKey (roleKey) { |
|
|
|
const rawKey = String(roleKey || '') |
|
|
|
const splitIndex = rawKey.indexOf('|') |
|
|
|
if (splitIndex < 0) { |
|
|
|
return { |
|
|
|
site: '', |
|
|
|
roleNo: rawKey |
|
|
|
} |
|
|
|
} |
|
|
|
return { |
|
|
|
site: rawKey.substring(0, splitIndex), |
|
|
|
roleNo: rawKey.substring(splitIndex + 1) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
saveRoleAssessSite () { |
|
|
|
if (this.selectRoleList.length === 0) { |
|
|
|
this.$message.warning('请选择角色') |
|
|
|
@ -1143,10 +1165,11 @@ export default { |
|
|
|
} |
|
|
|
let inList = [] |
|
|
|
for (let i = 0; i < this.selectRoleList.length; i++) { |
|
|
|
const roleInfo = this.parseRoleKey(this.selectRoleList[i]) |
|
|
|
let inData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
site: roleInfo.site, |
|
|
|
username: this.selectUser.username, |
|
|
|
roleNo: this.selectRoleList[i] |
|
|
|
roleNo: roleInfo.roleNo |
|
|
|
} |
|
|
|
inList.push(inData) |
|
|
|
} |
|
|
|
@ -1265,6 +1288,10 @@ export default { |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style> |
|
|
|
.rq .el-transfer-panel { |
|
|
|
width: 260px; |
|
|
|
} |
|
|
|
|
|
|
|
.el-transfer-panel { |
|
|
|
border: 2px solid #17b3a3; |
|
|
|
border-radius: 4px; |
|
|
|
|