@@ -12,7 +12,7 @@ const searchParams = ref({ menuType: 2 }) | |||
async function fetchList() { | |||
const params = { | |||
...unref(data.searchParams), | |||
menuType: 1 | |||
menuType: 2 | |||
} | |||
const res = await getMenuList(params) | |||
const { menuListVoList, permissionList } = res.data |
@@ -14,7 +14,7 @@ | |||
@update:checked-row-keys="handleCheck" | |||
> | |||
<template #tableTitle> | |||
<n-button v-if="permissionStore.includes('task:all:create')" type="primary" @click="handleModal"> 新建 </n-button> | |||
<n-button v-if="permissionList.includes('task:all:create')" type="primary" @click="handleModal"> {{ getPermissionLabel('task:all:create') }} </n-button> | |||
</template> | |||
</data-table> | |||
</n-card> | |||
@@ -49,12 +49,21 @@ export default { | |||
components: { dataTable, UserModal, headSearch, DrawComp }, | |||
setup() { | |||
getPlatform() | |||
const permissionStore = usePermissionStore()// 按钮权限 | |||
const data = reactive({ | |||
...toRefs(table), | |||
...toRefs(search) | |||
...toRefs(search), | |||
permissionList: permissionStore.accessPermissionCodes | |||
}) | |||
const permissionStore = usePermissionStore().accessPermissionCodes // 按钮权限 | |||
const getPermissionLabel = (code) => { | |||
return permissionStore.accessPermissions.find((item) => { | |||
return item.code === code | |||
})?.name || '' | |||
} | |||
const status = ['任务待分配', '任务已分配', '飞手已接单', '任务飞行中', '任务已完成'] | |||
const loadDataTable = async(res) => { | |||
const _params = { | |||
...unref(data.searchParams), | |||
@@ -101,7 +110,7 @@ export default { | |||
handleModal, | |||
selectedIds, | |||
// deleteComplex, | |||
permissionStore, | |||
getPermissionLabel, | |||
handleCheck, | |||
roleType | |||
} |
@@ -124,7 +124,7 @@ const data = reactive({ | |||
text: true, | |||
onClick: getRowData.bind(null, row) | |||
}, | |||
auth: 'basic_list' | |||
auth: '' | |||
}, | |||
{ | |||
label: '编辑', |
@@ -10,7 +10,7 @@ | |||
size="large" | |||
> | |||
<template #tableTitle> | |||
<n-button v-if="permissionStore.includes('user:menber:create')" type="primary" @click="handleModal"> 新建 </n-button> | |||
<n-button v-if="permissionList.includes('user:menber:create')" type="primary" @click="handleModal"> {{ getPermissionLabel('user:menber:create') }} </n-button> | |||
</template> | |||
</data-table> | |||
</n-card> | |||
@@ -33,11 +33,18 @@ export default { | |||
name: 'UserManage', | |||
components: { dataTable, UserModal, headSearch }, | |||
setup() { | |||
const permissionStore = usePermissionStore()// 按钮权限 | |||
const data = reactive({ | |||
...toRefs(tableData), | |||
search | |||
search, | |||
permissionList: permissionStore.accessPermissionCodes | |||
}) | |||
const permissionStore = usePermissionStore().accessPermissionCodes // 按钮权限 | |||
const getPermissionLabel = (code) => { | |||
return permissionStore.accessPermissions.find((item) => { | |||
return item.code === code | |||
})?.name || '' | |||
} | |||
getRoleOptions() | |||
const loadDataTable = async(res) => { | |||
@@ -63,7 +70,7 @@ export default { | |||
...toRefs(data), | |||
loadDataTable, | |||
handleModal, | |||
permissionStore | |||
getPermissionLabel | |||
} | |||
} | |||
} |