diff --git a/.env b/.env index bcf6e24..1e544f4 100644 --- a/.env +++ b/.env @@ -1 +1,2 @@ -REACT_APP_WS_URL=127.1.1.0:8080/ws +REACT_APP_WS_URL=192.168.1.146:8080/ws +PORT= 3000 \ No newline at end of file diff --git a/package.json b/package.json index 15bb757..1322ac4 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "outline", "version": "0.1.0", "private": true, - "proxy": "http://127.1.1.0:8080", + "proxy": "http://192.168.1.146:8080", "dependencies": { "@ant-design/icons": "^6.0.0", "@babel/core": "^7.16.0", diff --git a/src/pages/system/Setting.tsx b/src/pages/system/Setting.tsx index bf3d109..e8b10a3 100644 --- a/src/pages/system/Setting.tsx +++ b/src/pages/system/Setting.tsx @@ -1,5 +1,5 @@ -import { useState, useEffect, useRef } from 'react'; -import { Button, Cascader, Input, message } from 'antd'; +import { useState, useEffect } from 'react'; +import { Button, Cascader, Input, message, Form } from 'antd'; import { LoadingOutlined, } from '@ant-design/icons'; @@ -127,32 +127,6 @@ export default function Setting(){ } } - let newAccountInfo = useRef({ - name:'', - value:'' - }) - function onSaveAccount(){ - console.log('newAccountInfo---', newAccountInfo) - const accountParams = { - code:"UPLOAD_USERNAME", - name:accountInfo.name, - value:newAccountInfo.current.value, - id:accountInfo.id - } - sysSet(accountParams, "PUT").then(res=>{ - if(res.status === 0){ - dispatch(updateSystemAccountState(accountParams)) - message.success("修改成功") - } - }) - } - - function onAccountChange(accountValue:string){ - newAccountInfo.current.name = accountInfo.name || ''; - newAccountInfo.current.value = accountValue; - console.log('newAccountInfo--22-', newAccountInfo) - } - function convertToCascaderData(data:OrgItem[]) { return data.map(item => { const newItem:orgCascaderType = { @@ -275,20 +249,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