From 2b695bfabdceccb0ee19c12c8e655bd7f47a6e2f Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期二, 27 十月 2026 18:06:44 +0800
Subject: [PATCH] feat(wxcp): 通知前端支持图片/视频/Markdown/多图文与成员预览

---
 src/views/research/application/data.ts |   48 ++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 38 insertions(+), 10 deletions(-)

diff --git a/src/views/research/application/data.ts b/src/views/research/application/data.ts
index 258cb62..835b0a0 100644
--- a/src/views/research/application/data.ts
+++ b/src/views/research/application/data.ts
@@ -2,7 +2,10 @@
 
 import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+import type { ResearchApplicationApi } from '#/api/research/application';
 import type { ResearchGuidelineApi } from '#/api/research/guideline';
+
+import { z } from '#/adapter/form';
 
 import { DICT_TYPE } from '@vben/constants';
 import { getDictOptions } from '@vben/hooks';
@@ -16,6 +19,32 @@
 
 /** 琛ㄥ崟绫诲瀷 */
 export type FormType = 'create' | 'detail' | 'edit';
+
+/** 璇鹃缁勬垚鍛樼被鍨嬮�夐」锛堝榻愬鏍$増鎴愬憳琛級 */
+export const MEMBER_TYPE_OPTIONS = [
+  { label: '鏁欏笀', value: '鏁欏笀' },
+  { label: '瀛︾敓', value: '瀛︾敓' },
+  { label: '鏍″浜哄憳', value: '鏍″浜哄憳' },
+];
+
+/**
+ * 鎴愬憳琛屾姇褰变负鍙彁浜ゅ璞★細鍙繚鐣欏悗绔帴鍙楃殑瀛楁锛�
+ * 涓嶅甫 id / applicationId锛岄伩鍏嶄笌銆屽厛鍒犲悗澧炪�嶇殑杞垹琛屼富閿啿绐併��
+ * 鑱旂郴鐢佃瘽銆佹垚鍛樿鑹插凡涓嶅湪琛ㄥ崟褰曞叆锛屼絾鍘嗗彶琛屽師鍊肩户缁�忎紶锛岄伩鍏嶇紪杈戞椂琚竻绌恒��
+ */
+export function toSubmitMembers(
+  members?: ResearchApplicationApi.ApplicationMember[],
+): ResearchApplicationApi.ApplicationMember[] {
+  return (members ?? []).map((member) => ({
+    name: member.name,
+    memberType: member.memberType,
+    contactPhone: member.contactPhone,
+    workUnit: member.workUnit,
+    jobTitle: member.jobTitle,
+    memberRole: member.memberRole,
+    sortNo: member.sortNo,
+  }));
+}
 
 /** 璇鹃鐢虫姤涔︾姸鎬侊紙瀵瑰簲瀛楀吀 research_application_status锛� */
 export const ApplicationStatus = {
@@ -180,10 +209,14 @@
       label: '鑱旂郴鐢佃瘽',
       component: 'Input',
       componentProps: {
-        placeholder: '璇疯緭鍏ヨ仈绯荤數璇�',
-        maxlength: 20,
+        placeholder: '璇疯緭鍏� 11 浣嶆墜鏈哄彿',
+        maxlength: 11,
         disabled: readonly,
       },
+      rules: z
+        .string({ message: '鑱旂郴鐢佃瘽涓嶈兘涓虹┖' })
+        .min(1, '鑱旂郴鐢佃瘽涓嶈兘涓虹┖')
+        .regex(/^1[3-9]\d{9}$/, '鑱旂郴鐢佃瘽鏍煎紡涓嶆纭紝璇疯緭鍏ユ纭殑 11 浣嶆墜鏈哄彿'),
     },
     {
       fieldName: 'contactEmail',
@@ -209,15 +242,10 @@
       },
     },
     {
-      fieldName: 'teamMembers',
+      // 瀛愯〃缂栬緫鐢� form.vue 鐨� #members 鎻掓Ы娓叉煋
+      fieldName: 'members',
       label: '璇鹃缁勬垚鍛�',
-      component: 'Textarea',
-      componentProps: {
-        placeholder: '姣忚涓�鏉★紝鏍煎紡锛氬鍚峾鍗曚綅|鑱岀О\n渚嬪锛氭潕鍥泑XX澶у|鍓暀鎺�',
-        autoSize: { minRows: 3, maxRows: 6 },
-        disabled: readonly,
-      },
-      help: '姣忚涓�鏉★紝鐢ㄧ珫绾垮垎闅旓細濮撳悕|鍗曚綅|鑱岀О',
+      component: 'Input',
       formItemClass: 'col-span-2',
     },
     {

--
Gitblit v1.9.3