From 2f3a4560fccadb6637bcb6f162ac7c8ffc5b248c Mon Sep 17 00:00:00 2001 From: rd <1344903914@qq.com> Date: Mon, 11 Aug 2025 15:13:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=86=E4=BA=AB=E9=A1=B5=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=9B=9E=E5=A4=8D=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/all/generationWorkshop.ts | 15 + .../detail/components/ai-suggest/index.vue | 257 ++++++++---------- .../detail/components/ai-suggest/style.scss | 3 + .../explore/detail/constants.ts | 23 -- .../explore/detail/index.vue | 2 +- .../manuscript-check-table/index.vue | 13 +- .../manuscript/check-list/constants.ts | 10 +- .../share-manuscript-modal/share-modal.vue | 41 +-- .../upload-manuscript-modal/index.vue | 7 +- 9 files changed, 173 insertions(+), 198 deletions(-) diff --git a/src/api/all/generationWorkshop.ts b/src/api/all/generationWorkshop.ts index 49d6688..e0c22cc 100644 --- a/src/api/all/generationWorkshop.ts +++ b/src/api/all/generationWorkshop.ts @@ -5,6 +5,21 @@ export const getWorksList = (params = {}) => { return Http.get('/v1/works/list', params); }; +// 内容稿件-获取模板 +export const getTemplateUrl = (params = {}) => { + return Http.get('/v1/works/template', params); +}; + +// 内容稿件-通过链接获取稿件 +export const postWorksByLink = (params = {}) => { + return Http.post('/v1/works/by-link', params); +}; + +// 内容稿件-通过文档获取稿件 +export const postWorksByFile = (params = {}) => { + return Http.post('/v1/works/by-file', params); +}; + // 内容稿件-批量添加 export const postWorksBatch = (params = {}) => { return Http.post('/v1/works/batch', params); diff --git a/src/views/creative-generation-workshop/explore/detail/components/ai-suggest/index.vue b/src/views/creative-generation-workshop/explore/detail/components/ai-suggest/index.vue index b3285d5..de7d009 100644 --- a/src/views/creative-generation-workshop/explore/detail/components/ai-suggest/index.vue +++ b/src/views/creative-generation-workshop/explore/detail/components/ai-suggest/index.vue @@ -4,7 +4,8 @@ import TextOverTips from '@/components/text-over-tips'; import SvgIcon from '@/components/svg-icon/index.vue'; import DeleteCommentModal from './delete-comment-modal.vue'; -import { RESULT_LIST, ENUM_OPINION, formatRelativeTime } from '../../constants'; +import { RESULT_LIST } from '@/views/creative-generation-workshop/manuscript/check/components/content-card/constants.ts'; +import { ENUM_OPINION, formatRelativeTime } from '../../constants'; import { postShareWorksComments, deleteShareWorksComments } from '@/api/all/generationWorkshop.ts'; import { exactFormatTime } from '@/utils/tools.ts'; import { useUserStore } from '@/stores'; @@ -14,47 +15,12 @@ import icon2 from '@/assets/img/creative-generation-workshop/icon-avatar-default import icon3 from '@/assets/img/error-img.png'; const _iconMap = new Map([ - [1, { icon: }], + // [3, { icon: }], [2, { icon: }], - [3, { icon: }], - [4, { icon: }], + [1, { icon: }], + [0, { icon: }], ]); -const data1 = [ - { - label: '色情检测', - level: 1, - }, - { - label: '涉政检测', - level: 2, - }, - { - label: '涉政正负向检测', - level: 3, - }, - { - label: '涉政正负向检测', - level: 3, - }, - { - label: '涉政正负向检测', - level: 3, - }, - { - label: '涉政正负向检测', - level: 3, - }, - { - label: '暴恐检测', - level: 4, - }, - { - label: '暴恐检测', - level: 4, - }, -]; - export default { props: { isExpand: { @@ -76,6 +42,10 @@ export default { const isReplay = ref(false); const replayTarget = ref({}); const deleteCommentModalRef = ref(null); + const textAreaRef = ref(null); + + const aiReview = computed(() => props.dataSource.ai_review); + const violationItems = computed(() => props.dataSource?.ai_review?.violation_items ?? []); const closeReplay = () => { isReplay.value = false; @@ -88,13 +58,15 @@ export default { }; const onComment = async () => { + console.log(textAreaRef.value.focus()); const { code, data } = await postShareWorksComments(props.dataSource.id, route.params.shareCode, { content: comment.value, comment_id: replayTarget.value.id, }); if (code === 200) { emit('updateComment'); - // comment.value = ''; + comment.value = ''; + textAreaRef.value.focus(); } }; @@ -153,6 +125,7 @@ export default { )}