Showing
4 changed files
with
8 additions
and
6 deletions
| ... | @@ -163,10 +163,12 @@ export default { | ... | @@ -163,10 +163,12 @@ export default { |
| 163 | let menuItem = {}; | 163 | let menuItem = {}; |
| 164 | menuItem.id = item.id; | 164 | menuItem.id = item.id; |
| 165 | menuItem.title = item.title; | 165 | menuItem.title = item.title; |
| 166 | + menuItem.disabled = this.roleFormDisabled; | ||
| 166 | data.push(menuItem) | 167 | data.push(menuItem) |
| 167 | if (item.children && item.children.length) { | 168 | if (item.children && item.children.length) { |
| 169 | + menuItem.disabled = this.roleFormDisabled; | ||
| 168 | menuItem.children = this.treeDataInfo(item.children); | 170 | menuItem.children = this.treeDataInfo(item.children); |
| 169 | - menuItem.children.unshift({ id: item.id, title: `${item.title}(菜单)` }) | 171 | + menuItem.children.unshift({ id: item.id, title: `${item.title}(菜单)`, disabled: this.roleFormDisabled }) |
| 170 | } | 172 | } |
| 171 | }); | 173 | }); |
| 172 | return data; | 174 | return data; | ... | ... |
| ... | @@ -157,7 +157,7 @@ export default { | ... | @@ -157,7 +157,7 @@ export default { |
| 157 | status == 0 | 157 | status == 0 |
| 158 | ? (this.roleFormDisabled = true) | 158 | ? (this.roleFormDisabled = true) |
| 159 | : (this.roleFormDisabled = false); | 159 | : (this.roleFormDisabled = false); |
| 160 | - this.drawerTitle = "修改角色"; | 160 | + this.drawerTitle = status == 0 ? "查看角色" : "修改角色"; |
| 161 | }, | 161 | }, |
| 162 | //修改角色状态 | 162 | //修改角色状态 |
| 163 | roleStatus(row) { | 163 | roleStatus(row) { | ... | ... |
| ... | @@ -153,11 +153,11 @@ export default { | ... | @@ -153,11 +153,11 @@ export default { |
| 153 | }); | 153 | }); |
| 154 | }, | 154 | }, |
| 155 | //用户详情 | 155 | //用户详情 |
| 156 | - userDetail(id) { | 156 | + userDetail(status, id) { |
| 157 | detailUser(id) | 157 | detailUser(id) |
| 158 | .then((res) => { | 158 | .then((res) => { |
| 159 | this.drawer = true; | 159 | this.drawer = true; |
| 160 | - this.drawerTitle = "修改用户"; | 160 | + this.drawerTitle = status == 0 ? "查看用户" : "修改用户"; |
| 161 | if (res.code === 200) { | 161 | if (res.code === 200) { |
| 162 | this.userData = res.data; | 162 | this.userData = res.data; |
| 163 | this.userData.portName | 163 | this.userData.portName |
| ... | @@ -180,7 +180,7 @@ export default { | ... | @@ -180,7 +180,7 @@ export default { |
| 180 | }, | 180 | }, |
| 181 | //查询修改用户 | 181 | //查询修改用户 |
| 182 | buttonClick(row, status) { | 182 | buttonClick(row, status) { |
| 183 | - this.userDetail(row.row.id); | 183 | + this.userDetail(status, row.row.id); |
| 184 | status == 0 | 184 | status == 0 |
| 185 | ? (this.userFormDisabled = true) | 185 | ? (this.userFormDisabled = true) |
| 186 | : (this.userFormDisabled = false); | 186 | : (this.userFormDisabled = false); | ... | ... |
-
Please register or login to post a comment