From fe2d6627b8f1002af7a31b08f6f43bec034d04ee Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期三, 21 十月 2026 18:29:07 +0800
Subject: [PATCH] feat: 完善课题、会员、财务、企微页面并新增资产/用车/采购

---
 src/views/wxcp/notice/data.ts |  117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 112 insertions(+), 5 deletions(-)

diff --git a/src/views/wxcp/notice/data.ts b/src/views/wxcp/notice/data.ts
index 470b00d..1b28e06 100644
--- a/src/views/wxcp/notice/data.ts
+++ b/src/views/wxcp/notice/data.ts
@@ -7,6 +7,21 @@
 /** 琛ㄥ崟绫诲瀷 */
 export type NoticeFormType = 'create' | 'update' | 'detail';
 
+/** 閫氱煡妯℃澘绫诲瀷 */
+export const NOTICE_TYPE = {
+  TEXT: 1,
+  CARD: 2,
+  FILE: 3,
+  NEWS: 4,
+} as const;
+
+export const NOTICE_TYPE_OPTIONS = [
+  { label: '绾枃鏈�氱煡', value: NOTICE_TYPE.TEXT },
+  { label: '鍥炬枃鍗$墖锛堝~鎶�/閾炬帴锛�', value: NOTICE_TYPE.CARD },
+  { label: '鏂囦欢閫氱煡锛堜笂浼犳枃浠舵帹閫侊級', value: NOTICE_TYPE.FILE },
+  { label: '鍥炬枃娑堟伅锛堟爣棰�+鎽樿+灏侀潰锛�', value: NOTICE_TYPE.NEWS },
+];
+
 /** 閫氱煡琛ㄥ崟 */
 export function useNoticeFormSchema(formType: NoticeFormType): VbenFormSchema[] {
   const readonly = formType === 'detail';
@@ -17,24 +32,111 @@
       dependencies: { triggerFields: [''], show: () => false },
     },
     {
+      fieldName: 'noticeType',
+      label: '閫氱煡妯℃澘',
+      component: 'Select',
+      componentProps: {
+        options: NOTICE_TYPE_OPTIONS,
+        placeholder: '璇烽�夋嫨閫氱煡妯℃澘',
+        disabled: readonly,
+      },
+      rules: 'required',
+    },
+    {
       fieldName: 'title',
       label: '閫氱煡鏍囬',
       component: 'Input',
       componentProps: { placeholder: '璇疯緭鍏ラ�氱煡鏍囬', disabled: readonly },
       rules: 'required',
-      formItemClass: 'col-span-2',
     },
     {
       fieldName: 'content',
       label: '閫氱煡姝f枃',
       component: 'Textarea',
       componentProps: {
-        rows: 8,
-        placeholder: '璇疯緭鍏ラ�氱煡姝f枃',
+        rows: 6,
+        placeholder: '绾枃鏈�氱煡蹇呭~锛涘叾瀹冩ā鏉垮彲浣滀负琛ュ厖璇存槑',
         disabled: readonly,
       },
-      rules: 'required',
-      help: '鎺ㄩ�佹椂瓒呰繃 600 瀛椾細鑷姩鎴柇锛屽缓璁妸鍏抽敭淇℃伅鏀惧墠闈�',
+      help: '绾枃鏈�氱煡鎺ㄩ�佹椂瓒呰繃 600 瀛椾細鑷姩鎴柇锛屽缓璁妸鍏抽敭淇℃伅鏀惧墠闈�',
+      formItemClass: 'col-span-2',
+    },
+    {
+      fieldName: 'summary',
+      label: '鎽樿',
+      component: 'Textarea',
+      componentProps: {
+        rows: 3,
+        placeholder: '鍥炬枃鍗$墖/鍥炬枃娑堟伅灞曠ず鐨勬憳瑕�',
+        disabled: readonly,
+      },
+      dependencies: {
+        triggerFields: ['noticeType'],
+        show: (values) =>
+          values.noticeType === NOTICE_TYPE.CARD ||
+          values.noticeType === NOTICE_TYPE.NEWS,
+      },
+      formItemClass: 'col-span-2',
+    },
+    {
+      fieldName: 'linkUrl',
+      label: '璺宠浆閾炬帴',
+      component: 'Input',
+      componentProps: {
+        placeholder: '濉姤椤甸潰鎴栬鎯呴〉鍦板潃锛屽 https://...',
+        disabled: readonly,
+      },
+      dependencies: {
+        triggerFields: ['noticeType'],
+        show: (values) =>
+          values.noticeType === NOTICE_TYPE.CARD ||
+          values.noticeType === NOTICE_TYPE.NEWS,
+      },
+      formItemClass: 'col-span-2',
+    },
+    {
+      fieldName: 'linkBtnText',
+      label: '鎸夐挳鏂囨',
+      component: 'Input',
+      componentProps: {
+        placeholder: '濡傦細鍘诲~鎶� / 鏌ョ湅璇︽儏',
+        disabled: readonly,
+      },
+      dependencies: {
+        triggerFields: ['noticeType'],
+        show: (values) => values.noticeType === NOTICE_TYPE.CARD,
+      },
+    },
+    {
+      fieldName: 'coverUrl',
+      label: '灏侀潰鍥惧湴鍧�',
+      component: 'Input',
+      componentProps: {
+        placeholder: '鍥炬枃娑堟伅灏侀潰鍥惧湴鍧�锛堥�夊~锛�',
+        disabled: readonly,
+      },
+      dependencies: {
+        triggerFields: ['noticeType'],
+        show: (values) => values.noticeType === NOTICE_TYPE.NEWS,
+      },
+      formItemClass: 'col-span-2',
+    },
+    {
+      fieldName: 'fileBlobId',
+      label: '閫氱煡鏂囦欢',
+      component: 'FileUpload',
+      componentProps: {
+        valueKey: 'id',
+        maxNumber: 1,
+        multiple: false,
+        showDescription: !readonly,
+        disabled: readonly,
+      },
+      dependencies: {
+        triggerFields: ['noticeType'],
+        show: (values) => values.noticeType === NOTICE_TYPE.FILE,
+      },
+      help: '浼佷笟寰俊鏂囦欢娑堟伅涓婇檺 20MB',
       formItemClass: 'col-span-2',
     },
     {
@@ -83,6 +185,11 @@
 export function useNoticeGridColumns(): VxeTableGridOptions<WxCpNoticeApi.Notice>['columns'] {
   return [
     {
+      field: 'noticeTypeName',
+      title: '妯℃澘',
+      width: 150,
+    },
+    {
       field: 'title',
       title: '閫氱煡鏍囬',
       minWidth: 220,

--
Gitblit v1.9.3