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 { )}