提交 56b9f6cc authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 f90e77b1
......@@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" href="https://zws-imgs-pub.ezijing.com/pc/base/favicon.ico" />
<meta name="theme-color" content="#3276fc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>紫荆权限管理系统</title>
</head>
......
......@@ -35,9 +35,9 @@ export default {
return this.$store.state.appid
}
},
beforeMount() {
async beforeMount() {
// 获取所有权限
this.getPermissions()
await this.getPermissions()
// 获取当前角色的权限
this.getRolePermissions()
},
......@@ -52,7 +52,10 @@ export default {
// 获取当前角色的权限
getRolePermissions() {
getRolePermissions({ app_id: this.appid, role_id: this.data.id }).then(res => {
console.log(res)
if (res.data.length) {
this.currentPermissions = res.data.map(item => item.id)
this.$refs.tree.setCheckedKeys(this.currentPermissions)
}
})
},
// 取消
......
......@@ -42,6 +42,9 @@ export default {
immediate: true,
handler(data) {
this.form = Object.assign({}, this.form, data)
if (data && data.roles) {
this.form.role_ids = data.roles.map(item => item.id)
}
}
}
},
......
......@@ -4,8 +4,8 @@ import { Message } from 'element-ui'
import router from '../router'
const httpRequest = axios.create({
timeout: 60000,
withCredentials: true,
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
withCredentials: true
// headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
})
// 请求拦截
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论