1
0

feat(web): 增加数据资源确权状态显示

This commit is contained in:
2024-11-29 10:28:28 +08:00
parent 5aef7728b2
commit 51bca63ec6
5 changed files with 49 additions and 5 deletions

View File

@@ -175,6 +175,7 @@ export const userStateMapping = [
]
export const confirmationStateMapping = [
mappingItem('未确权', 'NONE'),
mappingItem('草稿', 'DRAFT', 'bg-primary'),
mappingItem('审查中', 'CHECKING', 'bg-warning'),
mappingItem('通过', 'NORMAL', 'bg-success'),
@@ -199,6 +200,21 @@ export function apiPost(url) {
return api('post', url)
}
export function arrayInCheck(array, field) {
return `\${ARRAYINCLUDES(['${array.join("','")}'], ${field})}`
}
export function arrayOutCheck(array, field) {
return `\${!ARRAYINCLUDES(['${array.join("','")}'], ${field})}`
}
export const confirmationState = {
none: 'NONE',
draft: 'DRAFT',
checking: 'CHECKING',
normal: 'NORMAL',
}
export function roleCheck(roles) {
return `\${ARRAYINCLUDES(['${roles.join("','")}'], role)}`
}