|
|
|
@ -1,11 +1,12 @@
|
|
|
|
|
import { useEffect, useState } from 'react';
|
|
|
|
|
import styles from './index.less';
|
|
|
|
|
import { history } from 'umi'
|
|
|
|
|
import { Button, ConfigProvider, Form, Input, Modal, Radio } from 'antd';
|
|
|
|
|
import { Button, ConfigProvider, Form, Input, Modal, Radio, message } from 'antd';
|
|
|
|
|
import ButtonComp from '@/components/ButtonComp';
|
|
|
|
|
import theme from '@/styles/antd.theme';
|
|
|
|
|
import { getPlugCordResult } from '@/services/api';
|
|
|
|
|
import { validateNumber } from '@/utils/validate';
|
|
|
|
|
import ClearInfoDialog from '@/components/ClearInfoDialog';
|
|
|
|
|
|
|
|
|
|
// 首页
|
|
|
|
|
export default function IndexPage() {
|
|
|
|
@ -14,6 +15,7 @@ export default function IndexPage() {
|
|
|
|
|
const [visibility, setVisibility] = useState<boolean>(false);
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
|
const [loading, setLoading] = useState(false);
|
|
|
|
|
const [tishiDialog, setTishiDialog] = useState(false);
|
|
|
|
|
|
|
|
|
|
const list = [
|
|
|
|
|
{ name: '01MMD049安装.exe', img: '', url: '/installExe' },
|
|
|
|
@ -44,9 +46,12 @@ export default function IndexPage() {
|
|
|
|
|
const onFinish = async (data: any) => {
|
|
|
|
|
setLoading(true)
|
|
|
|
|
await getPlugCordResult(data).then(res => {
|
|
|
|
|
if (res?.result == 'success') {
|
|
|
|
|
if (res?.result == 'success' && res?.data[0]?.data) {
|
|
|
|
|
setIsAuth(true)
|
|
|
|
|
localStorage.setItem('is_auth', JSON.stringify(true));
|
|
|
|
|
message.success("系统连接检测成功")
|
|
|
|
|
} else if (!res?.data[0]?.data) {
|
|
|
|
|
message.success("系统连接检测失败")
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
setLoading(false)
|
|
|
|
@ -91,11 +96,11 @@ export default function IndexPage() {
|
|
|
|
|
<Radio value={52}> 52 </Radio>
|
|
|
|
|
</Radio.Group>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="workbenchNumber" label="系统编号" rules={[
|
|
|
|
|
{ required: true, message: '请输入系统编号' },
|
|
|
|
|
<Form.Item name="workbenchNumber" label="工作台编号" rules={[
|
|
|
|
|
{ required: true, message: '请输入工作台编号' },
|
|
|
|
|
{ validator: validateNumber }
|
|
|
|
|
]}>
|
|
|
|
|
<Input style={{ width: 260, marginLeft: 5 }} placeholder="请输入系统编号" />
|
|
|
|
|
<Input style={{ width: 260, marginLeft: 5 }} placeholder="请输入工作台编号" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
<div className='flex_jE mt20'>
|
|
|
|
|