From a66dee49e1ea702b4db16ef54fee38683398248d Mon Sep 17 00:00:00 2001 From: weicw1996 Date: Fri, 23 Oct 2026 14:22:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(manuscript):=20=E7=A8=BF=E4=BB=B6=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=94=B6=E6=95=9B=E5=88=B0=E4=B8=8A=E6=B8=B8=20doc=5F?= =?UTF-8?q?type=20=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 与 admin 同一处病根:picker 把界面标签直接当 doc_type 下发, 而「公众号推文」「宣传稿」「发言稿」「短视频脚本」上游一个都不认, 选中就是一次必失败的提交。 - 选项收敛为 新闻稿 / 活动总结 / 微信推文 / 通知公告(外加「自由创作」) - picker 拆成 label / value 两份:界面仍显示「公众号推文」,下发「微信推文」 - 快捷模板「发言稿提纲」换成「通知公告」,补对应示例内容 --- src/pages/manuscript/index.vue | 47 +++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/src/pages/manuscript/index.vue b/src/pages/manuscript/index.vue index 4b3e928..f898c22 100644 --- a/src/pages/manuscript/index.vue +++ b/src/pages/manuscript/index.vue @@ -4,11 +4,11 @@ AI CONTENT STUDIO AI 内容创作与宣传助手 - 写新闻稿、推文、发言稿,或直接说明你的需求,AI 先给出一份初稿。 + 写新闻稿、活动总结、公众号推文或通知公告,说清需求就行,AI 先给出一份初稿。 活动新闻稿 公众号推文 - 发言稿提纲 + 通知公告 自由创作示例 进入问答助手 @@ -21,7 +21,7 @@ 稿件类型 - {{ form.docType || '请选择稿件类型' }} + {{ docTypeLabel || '请选择稿件类型' }} @@ -207,7 +207,19 @@ const DOC_TYPE_FREE = '自由创作' // 「自由创作」是默认项:不选具体模板时只填一段内容,后端转「AI 创意助手」。 - const DOC_TYPE_OPTIONS = [DOC_TYPE_FREE, '新闻稿', '公众号推文', '宣传稿', '活动总结', '发言稿', '短视频脚本'] + // 其余选项必须与上游「内容创作与宣传助手」的 doc_type 枚举逐一对应: + // 新闻稿 / 活动总结 / 微信推文 / 通知公告。上游没有的文体(宣传稿、发言稿、 + // 短视频脚本)一律不提供 —— 下发过去只会换来一次必失败的提交。 + // label 给学生看的叫法,value 是真正下发的 doc_type。 + const DOC_TYPE_ITEMS = [ + { label: '自由创作(不套模板)', value: DOC_TYPE_FREE }, + { label: '新闻稿', value: '新闻稿' }, + { label: '活动总结', value: '活动总结' }, + { label: '公众号推文', value: '微信推文' }, + { label: '通知公告', value: '通知公告' } + ] + const DOC_TYPE_OPTIONS = DOC_TYPE_ITEMS.map((item) => item.label) + const DOC_TYPE_VALUES = DOC_TYPE_ITEMS.map((item) => item.value) const EVENT_TYPE_OPTIONS = ['校园活动', '志愿服务', '会议论坛', '社会实践', '文体活动', '品牌项目'] const createDefaultForm = () => ({ @@ -240,9 +252,14 @@ }, computed: { docTypeIndex() { - const index = this.docTypeLabels.indexOf(this.form.docType) + const index = DOC_TYPE_VALUES.indexOf(this.form.docType) return index > -1 ? index : 0 }, + docTypeLabel() { + // 选中项显示 label,而不是下发的 doc_type(如「公众号推文」→「微信推文」) + const index = DOC_TYPE_VALUES.indexOf(this.form.docType) + return index > -1 ? DOC_TYPE_OPTIONS[index] : this.form.docType + }, eventTypeIndex() { const index = this.eventTypeLabels.indexOf(this.form.eventType) return index > -1 ? index : 0 @@ -279,7 +296,7 @@ }, handleDocTypeChange(event) { const index = Number(event.detail.value) - this.form.docType = this.docTypeLabels[index] || this.form.docType + this.form.docType = DOC_TYPE_VALUES[index] || this.form.docType }, handleEventTypeChange(event) { const index = Number(event.detail.value) @@ -555,7 +572,7 @@ } if (type === 'wechat') { this.form.theme = '青春集结!这场校园科技文化节亮点抢先看' - this.form.docType = '公众号推文' + this.form.docType = '微信推文' this.form.eventType = '校园活动' this.form.time = '2026年4月中旬' this.form.location = '大学生活动中心' @@ -564,14 +581,14 @@ this.form.number = '1200' return } - this.form.theme = '在学校共青团工作会议上的发言提纲' - this.form.docType = '发言稿' - this.form.eventType = '会议论坛' - this.form.time = '2026年春季学期工作会议' - this.form.location = '学校综合楼报告厅' - this.form.participants = '各学院团委书记、团干部代表' - this.form.highlights = '总结上阶段工作,分析问题不足,部署下一阶段思想引领、基层组织建设和实践育人重点任务。' - this.form.number = '1500' + this.form.theme = '关于举办2026年广西医科大学青年志愿服务项目大赛的通知' + this.form.docType = '通知公告' + this.form.eventType = '志愿服务' + this.form.time = '2026年4月10日至5月20日' + this.form.location = '各学院团委、大学生活动中心' + this.form.participants = '全校各团支部、青年志愿者服务队' + this.form.highlights = '说明报名条件、赛程安排、材料提交截止时间和联系方式,语气正式、条目清晰。' + this.form.number = '600' }, async chooseFiles() { if (this.uploading) {