From f96c3655dfc10702580e7a97e0be4bb58467671b Mon Sep 17 00:00:00 2001 From: wx <645899409@qq.com> Date: Tue, 2 Dec 2025 14:10:10 +0800 Subject: [PATCH] =?UTF-8?q?update=201.AED=E5=B8=83=E7=82=B9=E7=AE=A1?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E5=B8=83=E7=82=B9=E4=BD=8D=E7=BD=AE=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=B8=BA=E5=8F=AF=E6=89=8B=E8=BE=93=E5=8F=AF=E9=80=89?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aed/location/locationList.data.ts | 53 +++++++++++++++---- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/src/views/emergency/aed/location/locationList.data.ts b/src/views/emergency/aed/location/locationList.data.ts index a82a4b6..3a94eb9 100644 --- a/src/views/emergency/aed/location/locationList.data.ts +++ b/src/views/emergency/aed/location/locationList.data.ts @@ -167,27 +167,60 @@ export const formSchema: FormSchema[] = [ componentProps: () => ({ format: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD', style: { width: '100%' } }), }, { - label: '布点地址', + label: '地点', + field: 'geoCollectType', + component: 'RadioGroup', + required: true, + defaultValue: '0', + componentProps: { + options: [ + { + value: '0', + label: '地图选点', + }, + { + value: '1', + label: '手动输入', + }, + ], + }, + }, + { + label: '地图选点', field: 'installAddress', component: 'Input', slot: 'installAddress', - rules: [{ required: true, message: '请选择布点位置' }], + dynamicRules: ({ values }) => { + return [ + { + required: values.geoCollectType == 0, + message: '请进行地图选点', + }, + ]; + }, + // required: ({ values }) => values.geoCollectType == 0, + show: ({ values }) => values.geoCollectType == 0, }, { label: '经度', field: 'longitude', - component: 'InputNumber', - componentProps: () => ({ style: { width: '100%' } }), - show: false, - // required: true, + component: 'Input', + required: ({ values }) => values.geoCollectType == 1, + show: ({ values }) => values.geoCollectType == 1, }, { label: '纬度', field: 'latitude', - component: 'InputNumber', - componentProps: () => ({ style: { width: '100%' } }), - show: false, - // required: true, + component: 'Input', + required: ({ values }) => values.geoCollectType == 1, + show: ({ values }) => values.geoCollectType == 1, + }, + { + label: '详细地址', + field: 'installAddress', + component: 'Input', + required: ({ values }) => values.geoCollectType == 1, + show: ({ values }) => values.geoCollectType == 1, }, { label: '覆盖人数',