mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-16 06:16:46 +08:00
-- fix bug
This commit is contained in:
@@ -29,7 +29,7 @@ export function traverseArr(arr, traverseObj, saveOld = false) {
|
||||
}
|
||||
|
||||
const admin = [5, 6, 8, 9, 11, 12]
|
||||
|
||||
//检查 管理权和归属权
|
||||
export function checkPer(per) {
|
||||
if (store?.state?.userInfo?.roleList.some(t => t.code === 'learning-admin')) {
|
||||
return true
|
||||
@@ -39,6 +39,11 @@ export function checkPer(per) {
|
||||
}
|
||||
return (per + "").split(',').some(t => admin.some(s => s == t))
|
||||
}
|
||||
const adminOwner = [6,9,12]
|
||||
//单独检查是否有归属权
|
||||
export function checkOwner(per) {
|
||||
return (per + "").split(',').some(t => adminOwner.some(s => s == t))
|
||||
}
|
||||
export function checkMenu(path='') {
|
||||
return store?.state?.menus.some(t => path.split(',').some(s=>'/'+s===t));
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
type="link"
|
||||
>编辑</a-button
|
||||
>
|
||||
<a-button @click="manage(record.id)" type="link">管理</a-button>
|
||||
<a-button @click="manage(record.id) && checkPer(record.permissions)" type="link">管理</a-button>
|
||||
<DropDown v-if="checkPer(record.permissions)" value="授权">
|
||||
<OwnerTableModelStudent
|
||||
:types="[7, 8, 9]"
|
||||
|
||||
@@ -161,12 +161,12 @@
|
||||
>撤回发布</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="record.type === 3"
|
||||
v-if="record.type === 3 && checkPer(record.permissions)"
|
||||
@click="baseInfo(record)"
|
||||
type="link"
|
||||
>管理</a-button
|
||||
>
|
||||
<DropDown v-if="checkPer(record.permissions)" value="授权">
|
||||
<DropDown v-if="checkPer(record.permissions) && checkOwner(record.permissions)" value="授权">
|
||||
<OwnerTableModelStudent
|
||||
:types="[4, 5, 6]"
|
||||
:id="record.id"
|
||||
@@ -959,7 +959,7 @@ import { validateName } from "@/api/index1";
|
||||
import CommonStudent from "@/components/student/CommonStudent";
|
||||
import OwnerTableModelStudent from "@/components/student/OwnerTableModelStudent";
|
||||
import DropDown from "@/components/common/DropDown";
|
||||
import { checkPer } from "@/utils/utils";
|
||||
import { checkPer,checkOwner } from "@/utils/utils";
|
||||
|
||||
export default {
|
||||
name: "projectManage",
|
||||
@@ -1707,6 +1707,7 @@ export default {
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
checkOwner,
|
||||
dayjs,
|
||||
handleEdit,
|
||||
baseInfo,
|
||||
|
||||
Reference in New Issue
Block a user