From 0709ca04f939b6b7e56757b6a24d7e283300e71d Mon Sep 17 00:00:00 2001 From: SEN Date: Tue, 27 Aug 2024 18:43:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E9=85=8D=E7=BD=AE=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../session/setting/unitSetting/index.tsx | 6 ++ .../setting/unitSetting/phoneSetting.tsx | 97 +++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 src/components/DataPreview/session/setting/unitSetting/phoneSetting.tsx diff --git a/src/components/DataPreview/session/setting/unitSetting/index.tsx b/src/components/DataPreview/session/setting/unitSetting/index.tsx index 4c09cab59..86ac093d9 100644 --- a/src/components/DataPreview/session/setting/unitSetting/index.tsx +++ b/src/components/DataPreview/session/setting/unitSetting/index.tsx @@ -4,6 +4,7 @@ import { ISession, ITarget } from '@/ts/core'; import PublicInfo from './publicInfo'; import { ProFormLayoutType } from '@ant-design/pro-components'; import HomeSetting from '../common/homeSetting'; +import PhoneSetting from './phoneSetting'; import orgCtrl from '@/ts/controller'; import { orgAuth } from '@/ts/core/public/consts'; @@ -43,6 +44,11 @@ const UnitSetting: React.FC = ({ target, session, ...other }: IProps) => {/* 门户设置*/} + {/* 移动端门户设置*/} + {target.hasAuthoritys([orgAuth.SuperAuthId, orgAuth.DataAuthId]) && ( + + )} + {/* 注销设置*/} {target.hasAuthoritys([orgAuth.SuperAuthId]) && ( + ) : null; + const config = [ + { lable: '固定栏位①', key: 'app1', accept: '应用' }, + { lable: '固定栏位②', key: 'app2', accept: '应用' }, + { lable: '固定栏位③', key: 'app3', accept: '应用' }, + { lable: '个人台账表', key: 'personalForm', accept: '表单' }, + { lable: '部门台账表', key: 'departmentForm', accept: '表单' }, + { lable: '单位台账表', key: 'companyForm', accept: '表单' }, + { lable: '二维码标签\n展示表', key: 'scanForm', accept: '表单' }, + ]; + return ( + <> + + + {config.map((item) => ( + + {edit && !formValue[item.key] ? ( + + ) : ( + { + delete formValue[item.key]; + setFormValue({ ...formValue }); + }}> + {formValue[item.key]?.name || '未配置'} + + )} + + ))} + + + {needType && ( + setNeedType('')} + onOk={(files) => { + if (files.length > 0) { + setFormValue({ ...formValue, [currentKey]: files[0].metadata }); + } + setNeedType(''); + }} + /> + )} + + ); +}; + +export default PhoneSetting; -- Gitee