|
|
|
@ -38,9 +38,11 @@ const NodeInitTool: FC<PageProps> = ({ }) => {
|
|
|
|
|
const [pin, setPin] = useState<any>('');
|
|
|
|
|
|
|
|
|
|
const [radioValue, setRadioValue] = useState(1)
|
|
|
|
|
const [configRadio, setConfigRadio] = useState(1)
|
|
|
|
|
const [configRadio, setConfigRadio] = useState(1) // 第三步:装配操作类型
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
|
|
|
|
|
|
const [dbIp,setdpIp] = useState('127.0.0.1') //数据库服务器IP地址
|
|
|
|
|
|
|
|
|
|
const [fileInfo, setFileInfo] = useState({
|
|
|
|
|
"secret": "",
|
|
|
|
|
"algorithm": "",
|
|
|
|
@ -82,9 +84,8 @@ const NodeInitTool: FC<PageProps> = ({ }) => {
|
|
|
|
|
formData.append('file', file);
|
|
|
|
|
formData.append('sysType ', sysTypeStr[str]);
|
|
|
|
|
nodeInit_step2(formData).then((res) => {
|
|
|
|
|
if (res?.result == "success" && res?.data.length > 0) {
|
|
|
|
|
if (res?.result == "success" && res?.data.length >= 0) {
|
|
|
|
|
message.success('数据加载成功')
|
|
|
|
|
console.log("res--", res)
|
|
|
|
|
setFileInfo(res?.data[0]);
|
|
|
|
|
localStorage.setItem(`${urlParams?.fileType}`, JSON.stringify({ ...info, deviceInit: { data: res?.data[0], install: false } }));
|
|
|
|
|
// setDataLoading(true);
|
|
|
|
@ -122,6 +123,7 @@ const NodeInitTool: FC<PageProps> = ({ }) => {
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
if (res?.result == "success") {
|
|
|
|
|
message.success('初始化成功');
|
|
|
|
|
localStorage.setItem(`${urlParams?.fileType}`, JSON.stringify({ ...info, nodeInitStatus: true }))
|
|
|
|
|
form.resetFields();
|
|
|
|
|
} else {
|
|
|
|
|
message.error(res?.errorMsg);
|
|
|
|
@ -191,7 +193,7 @@ const NodeInitTool: FC<PageProps> = ({ }) => {
|
|
|
|
|
<div style={{ height: '200px', border: '1px solid #69C0E9' }}></div>
|
|
|
|
|
<div style={{ marginTop: '50px', display: 'flex', alignItems: 'center', justifyContent: 'flex-start' }}>
|
|
|
|
|
<div style={{ marginRight: '10px' }}>数据库服务器IP地址</div>
|
|
|
|
|
<div style={{ flex: 1 }}><Input /></div>
|
|
|
|
|
<div style={{ flex: 1 }}><Input value={dbIp} /></div>
|
|
|
|
|
<ButtonComp type={'confirm'} text={'确定'} style={{ marginLeft: '30px' }} onClick={() => { }} />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|