From 24aa350674408d8839bff339a0608ea3289a3e51 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Wed, 16 Apr 2025 18:58:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=A1=B9=E6=94=B9=E4=B8=BA=E5=BE=AA=E7=8E=AF=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/system/Setting.tsx | 53 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/src/pages/system/Setting.tsx b/src/pages/system/Setting.tsx index 1c90e45..b3d29fe 100644 --- a/src/pages/system/Setting.tsx +++ b/src/pages/system/Setting.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { Button, Cascader, Input, message } from 'antd'; +import { Button, Cascader, Input, message, Form } from 'antd'; import { LoadingOutlined, } from '@ant-design/icons'; @@ -273,20 +273,55 @@ export default function Setting(){ } }; + const saveSet = (item:systemItem) => { + const params = { + id:item.id, + value:item.value + } + sysSet(params, "PUT").then(res=>{ + }) + + } + + const form = () =>{ + return
+ { + systemList.map((item, index) => { + return + {item.code === 'ORG' ? + + : saveSet(item)}/>} + + }) + } +
+ } + // @ts-ignore return <>

系统配置

-
- 铁路局: -
-
- {accountInfo.name}: - {onAccountChange(e.target.value)}} className='w-[300px]'> - -
+ {form()} + {/*
*/} + {/* 铁路局:*/} + {/*
*/} + {/*
*/} + {/* {accountInfo.name}:*/} + {/* {onAccountChange(e.target.value)}} className='w-[300px]'>*/} + {/* */} + {/*
*/}

设备配置

{connectionStatus()}