Commit 6f1f844c authored by shangtx's avatar shangtx

fix: 角色管理bug

parent ebbadd43
...@@ -43,19 +43,15 @@ ...@@ -43,19 +43,15 @@
<a-select <a-select
:disabled="this.id == 1" :disabled="this.id == 1"
v-decorator="[ v-decorator="[
'sysRole.available', 'sysRole.isEnabled',
{ {
initialValue: sysRole.available, initialValue: sysRole.isEnabled,
rules: [{ required: true, message: '请选择状态' }] rules: [{ required: true, message: '请选择状态' }]
} }
]" ]"
> >
<a-select-option <a-select-option :key="1" :value="1" >启用 </a-select-option>
v-for="item in typeList" <a-select-option :key="2" :value="0" >禁用 </a-select-option>
:key="item.id"
:value="item.valueInt"
>{{ item.name }}
</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
...@@ -187,15 +183,13 @@ export default { ...@@ -187,15 +183,13 @@ export default {
getDetail(this.id).then((resp) => { getDetail(this.id).then((resp) => {
if (resp && resp.code == SYS_CONST.REQUEST.SUCCEED) { if (resp && resp.code == SYS_CONST.REQUEST.SUCCEED) {
this.sysRole = resp.data.sysRole this.sysRole = resp.data.sysRole
this.sysRole.available = this.sysRole.available ? 1 : 0 this.sysRole.isEnabled = this.sysRole.isEnabled ? 1 : 0
this.itemList = [] this.itemList = []
if (resp.data.sysBusinessTreeList) { if (resp.data.sysBusinessTreeList) {
this.itemList = resp.data.sysBusinessTreeList[0].children this.itemList = resp.data.sysBusinessTreeList[0].children
} }
this.checkChildren(this.itemList) this.checkChildren(this.itemList)
this.checkSelectRow(this.itemList) this.checkSelectRow(this.itemList)
this.typeList = resp.data.codeMap[SYS_CONST.CODE.SYS_AVAILABLE_STATUS]
} }
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment