Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4055b7a2a9 | ||
|
|
bbff52f324 |
No files matched your search
@@ -40,9 +40,10 @@ export const deleteDramaApi = (id: number) => {
|
||||
return request.delete<void>({ url: `/admin/dramas/${id}` })
|
||||
}
|
||||
|
||||
/** 审核与发布:submit / approve / reject / publish / offline */
|
||||
/** 审核与发布:submit / approve / reject / publish / offline / approvePublish */
|
||||
export const changeDramaStatusApi = (id: number, action: DramaReviewAction, reason?: string) => {
|
||||
return request.post<void>({ url: `/admin/dramas/${id}/${action}`, data: { reason } })
|
||||
const path = action === 'approvePublish' ? 'approve-publish' : action
|
||||
return request.post<void>({ url: `/admin/dramas/${id}/${path}`, data: { reason } })
|
||||
}
|
||||
|
||||
/** 下拉选项(短剧表单用),只返回 id/name */
|
||||
|
||||
@@ -73,7 +73,8 @@ export interface DramaSaveData {
|
||||
sort?: number
|
||||
}
|
||||
|
||||
export type DramaReviewAction = 'submit' | 'approve' | 'reject' | 'publish' | 'offline'
|
||||
export type DramaReviewAction =
|
||||
'submit' | 'approve' | 'reject' | 'publish' | 'offline' | 'approvePublish'
|
||||
|
||||
export interface EpisodeItem {
|
||||
id: number
|
||||
|
||||
@@ -83,7 +83,9 @@ onBeforeUnmount(() => {
|
||||
}
|
||||
|
||||
.notice-badge :deep(.el-badge__content.is-fixed) {
|
||||
top: 8px;
|
||||
right: 2px;
|
||||
/* 角标中心骑在铃铛右上角:right 9px + 右移 50%,与位数宽度无关 */
|
||||
top: calc(50% - 9px);
|
||||
right: 9px;
|
||||
transform: translate(50%, -50%);
|
||||
}
|
||||
</style>
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
} from '@/views/contentManagement/upload/imagePresets'
|
||||
|
||||
const router = useRouter()
|
||||
const { can, hasAny } = useRbac()
|
||||
const { can } = useRbac()
|
||||
|
||||
const loading = ref(false)
|
||||
const list = ref([])
|
||||
@@ -110,7 +110,8 @@ const actionMeta = {
|
||||
approve: { label: '审核通过', done: '已通过审核' },
|
||||
reject: { label: '驳回', done: '已驳回' },
|
||||
publish: { label: '上线', done: '已上线' },
|
||||
offline: { label: '下线', done: '已下线' }
|
||||
offline: { label: '下线', done: '已下线' },
|
||||
approvePublish: { label: '审核通过并上线', done: '已通过审核并上线' }
|
||||
}
|
||||
|
||||
async function load() {
|
||||
@@ -435,9 +436,9 @@ async function runAction(row, action) {
|
||||
function reviewActions(row) {
|
||||
const canReview = can('drama:review')
|
||||
if (row.status === 'draft' || row.status === 'offline') {
|
||||
return hasAny('drama:update', 'drama:review') ? ['submit'] : []
|
||||
return canReview ? ['approvePublish'] : []
|
||||
}
|
||||
if (row.status === 'reviewing') return canReview ? ['approve', 'reject'] : []
|
||||
if (row.status === 'reviewing') return canReview ? ['approvePublish', 'reject'] : []
|
||||
if (row.status === 'approved') return canReview ? ['publish'] : []
|
||||
if (row.status === 'published') return canReview ? ['offline'] : []
|
||||
return []
|
||||
|
||||
Reference in new issue
Block a user