fix:修改 user的显示问题 以及 权限无法选择的问题
This commit is contained in:
@@ -132,26 +132,11 @@ export default {
|
||||
email: [
|
||||
{ type: 'email', message: this.$t('validate.email') }
|
||||
]
|
||||
}
|
||||
},
|
||||
roleData: []
|
||||
}
|
||||
},
|
||||
setup () {
|
||||
let roleData = []
|
||||
const getRoleData = async () => {
|
||||
await get('sys/role?pageSize=-1').then(response => {
|
||||
console.log(response);
|
||||
if (response.code === 200) {
|
||||
roleData = response.data.list
|
||||
}
|
||||
})
|
||||
}
|
||||
// onMounted(getRoleData)
|
||||
return {
|
||||
roleData,
|
||||
getRoleData
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.getRoleData()
|
||||
@@ -200,6 +185,14 @@ export default {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
getRoleData (){
|
||||
get('sys/role?pageSize=-1').then(response => {
|
||||
console.log(response);
|
||||
if (response.code === 200) {
|
||||
this.roleData = response.data.list
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
:active-color="theme.themeColor"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="val => {statusChange(scope.row)}">
|
||||
@change="()=>{statusChange(scope.row)}">
|
||||
</el-switch>
|
||||
</template>
|
||||
<span v-else>{{scope.row[item.prop]}}</span>
|
||||
|
||||
Reference in New Issue
Block a user