From 7a6e696fc360c630c34f5e6e9d79193d14a17078 Mon Sep 17 00:00:00 2001 From: rd <1344903914@qq.com> Date: Mon, 11 Aug 2025 18:28:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=86=85=E5=AE=B9=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E5=86=99=E6=89=8B=E7=AB=AF-=E6=9B=BF=E6=8D=A2=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=BB=84=E4=BB=B6=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/all/generationWorkshop-writer.ts | 51 +-- src/hooks/useGetAiReviewResult.ts | 17 +- src/router/constants.ts | 1 + .../routes/modules/manuscript-writer.ts | 2 +- src/stores/modules/side-bar/constants.ts | 10 +- .../delete-manuscript-modal.vue | 4 +- .../manuscript-check-table/index.vue | 32 +- .../manuscript-writer/check-list/index.vue | 17 +- .../check/cancel-check-modal.vue | 3 +- .../check/check-success-modal.vue | 3 +- .../manuscript-writer/check/index.vue | 31 +- .../share-manuscript-modal/constants.ts | 40 --- .../share-manuscript-modal/index.vue | 293 ------------------ .../share-manuscript-modal/share-modal.vue | 137 -------- .../share-manuscript-modal/style.scss | 27 -- .../manuscript-writer/detail/index.vue | 16 +- .../edit/cancel-edit-modal.vue | 3 +- .../manuscript-writer/edit/index.vue | 13 +- .../components/manuscript-table/constants.ts | 20 +- .../delete-manuscript-modal.vue | 4 +- .../components/manuscript-table/index.vue | 5 +- .../upload-manuscript-modal/index.vue | 63 +--- .../manuscript-writer/list/index.vue | 13 +- .../upload/cancel-upload-modal.vue | 3 +- .../manuscript-writer/upload/index.vue | 6 +- .../upload/upload-success-modal.vue | 8 +- .../manuscript/check/index.vue | 4 + 27 files changed, 151 insertions(+), 675 deletions(-) delete mode 100644 src/views/creative-generation-workshop/manuscript-writer/components/share-manuscript-modal/constants.ts delete mode 100644 src/views/creative-generation-workshop/manuscript-writer/components/share-manuscript-modal/index.vue delete mode 100644 src/views/creative-generation-workshop/manuscript-writer/components/share-manuscript-modal/share-modal.vue delete mode 100644 src/views/creative-generation-workshop/manuscript-writer/components/share-manuscript-modal/style.scss diff --git a/src/api/all/generationWorkshop-writer.ts b/src/api/all/generationWorkshop-writer.ts index 395d2fa..3485f8e 100644 --- a/src/api/all/generationWorkshop-writer.ts +++ b/src/api/all/generationWorkshop-writer.ts @@ -9,21 +9,17 @@ const getWriterCode = () => { return route.params.writerCode as string; }; // 内容稿件-批量添加(写手) -export const postWorksBatchWriter = (params: any) => { +export const postWorksBatchWriter = (params: {}) => { return Http.post('/v1/writer/works/batch', params, { headers: { 'writer-code': getWriterCode() }, }); }; // 内容稿件-分页(写手) -export const getWorksPageWriter = (params: any) => { - return Http.get( - '/v1/writer/works', - { params }, - { - headers: { 'writer-code': getWriterCode() }, - }, - ); +export const getWorksPageWriter = (params: {}) => { + return Http.get('/v1/writer/works', params, { + headers: { 'writer-code': getWriterCode() }, + }); }; // 内容稿件-详情(写手) @@ -57,17 +53,13 @@ export const getTemplateUrlWriter = () => { // 内容稿件审核-分页(写手) export const getWorkAuditsPageWriter = (params: any) => { - return Http.get( - '/v1/writer/work-audits', - { params }, - { - headers: { 'writer-code': getWriterCode() }, - }, - ); + return Http.get('/v1/writer/work-audits', params, { + headers: { 'writer-code': getWriterCode() }, + }); }; // 内容稿件审核-详情(写手) -export const getWorkAuditDetailWriter = (id: string) => { +export const getWorkAuditsDetailWriter = (id: string) => { return Http.get(`/v1/writer/work-audits/${id}`, { headers: { 'writer-code': getWriterCode() }, }); @@ -75,13 +67,9 @@ export const getWorkAuditDetailWriter = (id: string) => { // 内容稿件审核-多个详情(写手) export const getWorkAuditsBatchDetailWriter = (params: any) => { - return Http.get( - '/v1/writer/work-audits/list', - { params }, - { - headers: { 'writer-code': getWriterCode() }, - }, - ); + return Http.get('/v1/writer/work-audits/list', params, { + headers: { 'writer-code': getWriterCode() }, + }); }; // 内容稿件-审核(写手) @@ -128,3 +116,18 @@ export const getWorkAuditsAiReviewResultWriter = (id: string, ticket: string) => headers: { 'writer-code': getWriterCode() }, }); }; + +// 内容稿件-通过链接获取稿件 +export const postWorksByLinkWriter = (params = {}) => { + return Http.post('/v1/writer/works/by-link', params, { + headers: { 'writer-code': getWriterCode() }, + }); +}; + +// 内容稿件-通过文档获取稿件 +export const postWorksByFileWriter = (params = {}, config = {}) => { + return Http.post('/v1/writer/works/by-file', params, { + ...config, + headers: { 'writer-code': getWriterCode() }, + }); +}; diff --git a/src/hooks/useGetAiReviewResult.ts b/src/hooks/useGetAiReviewResult.ts index fbf1721..d2f2f9b 100644 --- a/src/hooks/useGetAiReviewResult.ts +++ b/src/hooks/useGetAiReviewResult.ts @@ -1,5 +1,14 @@ -import { postWorkAuditsAiReview, getWorkAuditsAiReviewResult } from '@/api/all/generationWorkshop'; -export default function useGetAiReviewResult({ cardInfo, updateAiReview }: { cardInfo: any; updateAiReview: (ai_review: any) => void }) { +export default function useGetAiReviewResult({ + cardInfo, + updateAiReview, + startAiReviewFn, + getAiReviewResultFn, +}: { + cardInfo: any; + updateAiReview: (ai_review: any) => void; + startAiReviewFn: (params: { id: string; platform: string; content: string }) => Promise; + getAiReviewResultFn: (id: string, ticket: string) => Promise; +}) { const statusPollingTimer = ref(null); const ticket = ref(''); const checkLoading = ref(false); @@ -8,7 +17,7 @@ export default function useGetAiReviewResult({ cardInfo, updateAiReview }: { car const handleStartCheck = async () => { checkLoading.value = true; const { id, platform, content } = cardInfo.value; - const { code, data } = await postWorkAuditsAiReview({ id, platform, content }); + const { code, data } = await startAiReviewFn({ id, platform, content }); if (code === 200) { ticket.value = data.ticket; startStatusPolling(); @@ -23,7 +32,7 @@ export default function useGetAiReviewResult({ cardInfo, updateAiReview }: { car const startStatusPolling = () => { clearStatusPollingTimer(); statusPollingTimer.value = setInterval(async () => { - const { code, data } = await getWorkAuditsAiReviewResult(cardInfo.value.id, ticket.value); + const { code, data } = await getAiReviewResultFn(cardInfo.value.id, ticket.value); if (code === 200 && data.status === 1) { checkResult.value = data.ai_review; updateAiReview?.(data.ai_review); diff --git a/src/router/constants.ts b/src/router/constants.ts index 3e79148..908c08e 100644 --- a/src/router/constants.ts +++ b/src/router/constants.ts @@ -27,4 +27,5 @@ export const MENU_GROUP_IDS = { MANAGEMENT_ID: 3, // 管理中心 PROPERTY_ID: 4, // 资产营销平台 WORK_BENCH_ID: 5, // 工作台 + WRITER_CREATIVE_GENERATION_WORKSHOP_ID: 6, // 内容稿件-写手侧 }; diff --git a/src/router/routes/modules/manuscript-writer.ts b/src/router/routes/modules/manuscript-writer.ts index 69b2adb..adf00d0 100644 --- a/src/router/routes/modules/manuscript-writer.ts +++ b/src/router/routes/modules/manuscript-writer.ts @@ -14,7 +14,7 @@ const COMPONENTS: AppRouteRecordRaw[] = [ requiresAuth: false, requireLogin: false, roles: ['*'], - id: MENU_GROUP_IDS.CREATIVE_GENERATION_WORKSHOP_ID, + id: MENU_GROUP_IDS.WRITER_CREATIVE_GENERATION_WORKSHOP_ID, }, children: [ { diff --git a/src/stores/modules/side-bar/constants.ts b/src/stores/modules/side-bar/constants.ts index c68b581..3c458e8 100644 --- a/src/stores/modules/side-bar/constants.ts +++ b/src/stores/modules/side-bar/constants.ts @@ -55,7 +55,15 @@ export const MENU_LIST = [ { name: '内容稿件', routeName: 'ManuscriptList', - includeRouteNames: ['ManuscriptList', 'ManuscriptCheck', 'ManuscriptEdit', 'ManuscriptDetail'], + includeRouteNames: [ + 'ManuscriptList', + 'ManuscriptUpload', + 'ManuscriptEdit', + 'ManuscriptDetail', + 'ManuscriptCheckList', + 'ManuscriptCheckListDetail', + 'ManuscriptCheck', + ], }, ], }, diff --git a/src/views/creative-generation-workshop/manuscript-writer/check-list/components/manuscript-check-table/delete-manuscript-modal.vue b/src/views/creative-generation-workshop/manuscript-writer/check-list/components/manuscript-check-table/delete-manuscript-modal.vue index 39f8fd3..a7cdc71 100644 --- a/src/views/creative-generation-workshop/manuscript-writer/check-list/components/manuscript-check-table/delete-manuscript-modal.vue +++ b/src/views/creative-generation-workshop/manuscript-writer/check-list/components/manuscript-check-table/delete-manuscript-modal.vue @@ -20,7 +20,7 @@ - - diff --git a/src/views/creative-generation-workshop/manuscript-writer/components/share-manuscript-modal/share-modal.vue b/src/views/creative-generation-workshop/manuscript-writer/components/share-manuscript-modal/share-modal.vue deleted file mode 100644 index c40662c..0000000 --- a/src/views/creative-generation-workshop/manuscript-writer/components/share-manuscript-modal/share-modal.vue +++ /dev/null @@ -1,137 +0,0 @@ - diff --git a/src/views/creative-generation-workshop/manuscript-writer/components/share-manuscript-modal/style.scss b/src/views/creative-generation-workshop/manuscript-writer/components/share-manuscript-modal/style.scss deleted file mode 100644 index d3dc205..0000000 --- a/src/views/creative-generation-workshop/manuscript-writer/components/share-manuscript-modal/style.scss +++ /dev/null @@ -1,27 +0,0 @@ -.share-manuscript-modal { - .cts { - font-family: $font-family-regular; - font-size: 12px; - font-style: normal; - font-weight: 400; - line-height: 20px; - &.bold { - font-family: $font-family-medium; - } - } - .filter-row-item { - .label { - color: var(--Text-1, #211f24); - font-size: 14px; - } - } - .arco-modal-body { - height: 464px; - display: flex; - flex-direction: column; - overflow: hidden; - .arco-scrollbar-track { - display: none !important; - } - } -} diff --git a/src/views/creative-generation-workshop/manuscript-writer/detail/index.vue b/src/views/creative-generation-workshop/manuscript-writer/detail/index.vue index c149ae5..3790d65 100644 --- a/src/views/creative-generation-workshop/manuscript-writer/detail/index.vue +++ b/src/views/creative-generation-workshop/manuscript-writer/detail/index.vue @@ -3,16 +3,16 @@ import { Button, Message as AMessage, Spin } from '@arco-design/web-vue'; import { useRouter, useRoute } from 'vue-router'; import { AuditStatus } from '@/views/creative-generation-workshop/manuscript/check-list/constants'; -import { getWorksDetail } from '@/api/all/generationWorkshop'; +import { getWorksDetailWriter } from '@/api/all/generationWorkshop-writer.ts'; import { EnumManuscriptType } from '@/views/creative-generation-workshop/manuscript/list/constants.ts'; import { convertVideoUrlToCoverUrl, exactFormatTime } from '@/utils/tools.ts'; import { slsWithCatch } from '@/utils/stroage.ts'; const DEFAULT_SOURCE_INFO = { title: '内容稿件列表', - routeName: 'ManuscriptList', + routePath: '/writer/manuscript/list', }; -const SOURCE_MAP = new Map([['check', { title: '内容稿件审核', routeName: 'ManuscriptCheckList' }]]); +const SOURCE_MAP = new Map([['check', { title: '内容稿件审核', routePath: '/writer/manuscript/check-list' }]]); export default { setup(props, { emit, expose }) { @@ -35,7 +35,7 @@ export default { const sourceInfo = computed(() => SOURCE_MAP.get(source) ?? DEFAULT_SOURCE_INFO); const onBack = () => { - router.push({ name: sourceInfo.value.routeName }); + router.push({ path: `${sourceInfo.value.routePath}/${route.params.writerCode}` }); }; const initData = () => { @@ -52,7 +52,7 @@ export default { const getData = async () => { try { loading.value = true; - const { code, data } = await getWorksDetail(workId.value); + const { code, data } = await getWorksDetailWriter(workId.value); if (code === 200) { dataSource.value = data; initData(); @@ -111,8 +111,8 @@ export default { if (isPassed) { console.log('审核详情'); } else { - slsWithCatch('manuscriptCheckIds', [workId.value]); - router.push({ name: 'ManuscriptCheck' }); + slsWithCatch('writerManuscriptCheckIds', [workId.value]); + router.push({ path: `/writer/manuscript/check/${route.params.writerCode}` }); } }; @@ -125,7 +125,7 @@ export default { size="medium" type="outline" class="mr-12px" - onClick={() => router.push(`/manuscript/edit/${workId.value}`)} + onClick={() => router.push(`/writer/manuscript/edit/${route.params.writerCode}/${workId.value}`)} > 编辑 diff --git a/src/views/creative-generation-workshop/manuscript-writer/edit/cancel-edit-modal.vue b/src/views/creative-generation-workshop/manuscript-writer/edit/cancel-edit-modal.vue index 7aff674..754b24c 100644 --- a/src/views/creative-generation-workshop/manuscript-writer/edit/cancel-edit-modal.vue +++ b/src/views/creative-generation-workshop/manuscript-writer/edit/cancel-edit-modal.vue @@ -16,6 +16,7 @@ import { ref } from 'vue'; import icon1 from '@/assets/img/media-account/icon-warn-1.png'; const router = useRouter(); +const route = useRoute(); const visible = ref(false); const onClose = () => { @@ -23,7 +24,7 @@ const onClose = () => { }; const onConfirm = () => { onClose(); - router.push({ name: 'ManuscriptList' }); + router.push({ path: `/writer/manuscript/list/${route.params.writerCode}` }); }; const open = () => { diff --git a/src/views/creative-generation-workshop/manuscript-writer/edit/index.vue b/src/views/creative-generation-workshop/manuscript-writer/edit/index.vue index ae2abdb..71f30d5 100644 --- a/src/views/creative-generation-workshop/manuscript-writer/edit/index.vue +++ b/src/views/creative-generation-workshop/manuscript-writer/edit/index.vue @@ -2,7 +2,8 @@ import { Button, Message as AMessage } from '@arco-design/web-vue'; import EditForm, { ENUM_UPLOAD_STATUS, INITIAL_VIDEO_INFO } from '../components/edit-form'; import CancelEditModal from './cancel-edit-modal.vue'; -import { getWorksDetail, putWorksUpdate } from '@/api/all/generationWorkshop'; +import { getWorksDetailWriter, putWorksUpdateWriter } from '@/api/all/generationWorkshop-writer.ts'; + import { EnumManuscriptType } from '@/views/creative-generation-workshop/manuscript/list/constants.ts'; import { formatDuration, formatFileSize, convertVideoUrlToCoverUrl } from '@/utils/tools'; import { slsWithCatch } from '@/utils/stroage.ts'; @@ -40,14 +41,14 @@ export default { } const filteredWorks = omit(dataSource.value, 'videoInfo'); - const { code, data } = await putWorksUpdate({ id: workId.value, ...filteredWorks }); + const { code, data } = await putWorksUpdateWriter({ id: workId.value, ...filteredWorks }); if (code === 200) { AMessage.success('保存成功'); isSaved.value = true; if (check) { - slsWithCatch('manuscriptCheckIds', [workId.value]); - router.push({ name: 'ManuscriptCheck' }); + slsWithCatch('writerManuscriptCheckIds', [workId.value]); + router.push({ path: `/writer/manuscript/check/${route.params.writerCode}` }); } else { onBack(); } @@ -55,7 +56,7 @@ export default { }); }; const getData = async () => { - const { code, data } = await getWorksDetail(workId.value); + const { code, data } = await getWorksDetailWriter(workId.value); if (code === 200) { const { type, files } = data; const _data = { ...data, videoInfo: cloneDeep(INITIAL_VIDEO_INFO) }; @@ -81,7 +82,7 @@ export default { dataSource.value.videoInfo = { ...dataSource.value.videoInfo, ...newVideoInfo }; }; const onBack = () => { - router.push({ name: 'ManuscriptList' }); + router.push({ path: `/writer/manuscript/list/${route.params.writerCode}` }); }; onMounted(() => { workId && getData(); diff --git a/src/views/creative-generation-workshop/manuscript-writer/list/components/manuscript-table/constants.ts b/src/views/creative-generation-workshop/manuscript-writer/list/components/manuscript-table/constants.ts index 5199e88..6b1a059 100644 --- a/src/views/creative-generation-workshop/manuscript-writer/list/components/manuscript-table/constants.ts +++ b/src/views/creative-generation-workshop/manuscript-writer/list/components/manuscript-table/constants.ts @@ -41,11 +41,11 @@ export const TABLE_COLUMNS = [ sortDirections: ['ascend', 'descend'], }, }, - { - title: '上传人员', - dataIndex: 'uploader', - width: 180, - }, + // { + // title: '上传人员', + // dataIndex: 'uploader', + // width: 180, + // }, { title: '最后修改时间', dataIndex: 'last_modified_at', @@ -54,11 +54,11 @@ export const TABLE_COLUMNS = [ sortDirections: ['ascend', 'descend'], }, }, - { - title: '最后修改人员', - dataIndex: 'last_modifier', - width: 180, - }, + // { + // title: '最后修改人员', + // dataIndex: 'last_modifier', + // width: 180, + // }, { title: '操作', dataIndex: 'operation', diff --git a/src/views/creative-generation-workshop/manuscript-writer/list/components/manuscript-table/delete-manuscript-modal.vue b/src/views/creative-generation-workshop/manuscript-writer/list/components/manuscript-table/delete-manuscript-modal.vue index ef68bd5..223dc10 100644 --- a/src/views/creative-generation-workshop/manuscript-writer/list/components/manuscript-table/delete-manuscript-modal.vue +++ b/src/views/creative-generation-workshop/manuscript-writer/list/components/manuscript-table/delete-manuscript-modal.vue @@ -20,7 +20,7 @@