From 34b9a31e0f19c923997bf93b1c0b092dadfa0495 Mon Sep 17 00:00:00 2001 From: zou Date: Fri, 28 Aug 2026 17:51:13 +0800 Subject: [PATCH] =?UTF-8?q?feat(F006):=20=E8=B5=84=E8=AE=AF=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=8A=B6=E6=80=81=E5=88=97=20+=20=E5=BC=B9=E7=AA=9712?= =?UTF-8?q?00px=20+=20=E6=9A=82=E5=AD=98/=E5=8F=91=E5=B8=83=E5=8F=8C?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../other/information/InformationListView.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/modules/other/information/InformationListView.vue b/src/modules/other/information/InformationListView.vue index e2f7e81..fa5c33f 100644 --- a/src/modules/other/information/InformationListView.vue +++ b/src/modules/other/information/InformationListView.vue @@ -24,6 +24,7 @@ interface Info { content: string images: string createTime: string + status?: number } const list = ref([]) @@ -54,6 +55,7 @@ const columns = [ { prop: 'id', label: 'ID', width: 90 }, { prop: 'title', label: '资讯标题', minWidth: 260 }, { prop: 'categoryName', label: '分类', width: 120, formatter: (r: Info) => r.categoryName || '--' }, + { prop: 'status', label: '状态', width: 90, formatter: (r: Info) => r.status === 0 ? '草稿' : '已发布' }, { prop: 'createTime', label: '发布时间', width: 170 }, ] @@ -67,7 +69,7 @@ const imgStyle = computed(() => ({ async function load() { loading.value = true try { - const params: any = { page: query.page, limit: query.limit } + const params: any = { page: query.page, limit: query.limit, status: 'all' } if (search.title.trim()) params.title = search.title.trim() const resp: any = await httpGet('/other/information/page', params) list.value = resp?.list || [] @@ -113,7 +115,7 @@ function onCategoryChange(id: string) { const c = categories.value.find(x => x.id === id) editForm.categoryName = c?.name || '' } -async function submit() { +async function submit(status: number) { if (!editForm.title.trim()) { ElMessage.warning('请填写标题'); return } if (!editForm.categoryId) { ElMessage.warning('请选择分类'); return } saving.value = true @@ -124,6 +126,7 @@ async function submit() { categoryName: editForm.categoryName, content: richEditorRef.value?.getContent?.() ?? editForm.content, images: editForm.images, + status, } if (editMode.value === 'create') { await httpPost('/other/information/save', payload) @@ -217,7 +220,7 @@ async function customUpload(opt: any) { - + @@ -246,7 +249,8 @@ async function customUpload(opt: any) {