perf: refresh token && delete console

This commit is contained in:
xingyu
2022-08-03 00:41:59 +08:00
parent 2bf09cbfc2
commit 21cf922723
10 changed files with 100 additions and 63 deletions

View File

@ -47,7 +47,6 @@ const getTree = async () => {
const res = await MenuApi.listSimpleMenusApi()
const menu = { id: 0, name: '主类目', children: [] as any[] }
menu.children = handleTree(res)
console.info(menu)
menuOptions.value = menu
}
// ========== 查询 ==========

View File

@ -155,7 +155,7 @@ getList()
</Table>
</ContentWrap>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<Dialog v-model="dialogVisible" :title="dialogTitle" width="60%" maxHeight="420px">
<!-- 对话框(添加 / 修改) -->
<Form
v-if="['create', 'update'].includes(actionType)"

View File

@ -110,7 +110,7 @@ const defaultProps = {
label: 'name',
value: 'id'
}
const treeOptions = ref([]) // 菜单树形结构
const treeOptions = ref<any[]>([]) // 菜单树形结构
const treeRef = ref<InstanceType<typeof ElTree>>()
const dialogScopeVisible = ref(false)
const dialogScopeTitle = ref('数据权限')
@ -133,7 +133,6 @@ const handleScope = async (type: string, row: RoleVO) => {
const menuRes = await listSimpleMenusApi()
treeOptions.value = handleTree(menuRes)
const role = await PermissionApi.listRoleMenusApi(row.id)
console.info(role)
if (role) {
// treeRef.value!.setCheckedKeys(role as unknown as Array<number>)
defaultCheckedKeys.value = role
@ -142,7 +141,6 @@ const handleScope = async (type: string, row: RoleVO) => {
const deptRes = await listSimpleDeptApi()
treeOptions.value = handleTree(deptRes)
const role = await RoleApi.getRoleApi(row.id)
console.info(role)
dataScopeForm.dataScope = role.dataScope
if (role.dataScopeDeptIds) {
// treeRef.value!.setCheckedKeys(role.dataScopeDeptIds as unknown as Array<number>, false)
@ -155,7 +153,6 @@ const handleScope = async (type: string, row: RoleVO) => {
// 保存权限
const submitScope = async () => {
const keys = treeRef.value!.getCheckedKeys(false) as unknown as Array<number>
console.info(keys)
if ('data' === actionScopeType.value) {
const data = ref<PermissionAssignRoleDataScopeReqVO>({
roleId: dataScopeForm.id,

View File

@ -19,7 +19,7 @@ const defaultProps = {
value: 'id'
}
// ========== 创建菜单树结构 ==========
const menuOptions = ref([]) // 树形结构
const menuOptions = ref<any[]>([]) // 树形结构
const treeRef = ref<InstanceType<typeof ElTree>>()
const treeNodeAll = ref(false)
// 全选/全不选
@ -84,11 +84,9 @@ const submitForm = async () => {
if (actionType.value === 'create') {
await TenantPackageApi.createTenantPackageTypeApi(data)
ElMessage.success(t('common.createSuccess'))
console.log('new data')
} else {
await TenantPackageApi.updateTenantPackageTypeApi(data)
ElMessage.success(t('common.updateSuccess'))
console.log('edit data')
}
// 操作成功,重新加载列表
dialogVisible.value = false