|
|
|
@ -18,6 +18,7 @@ import { useEffect, useState, FC, useRef, Fragment } from 'react';
|
|
|
|
|
import { downLoadLink } from '@/utils/download';
|
|
|
|
|
import url from '@/utils/url';
|
|
|
|
|
import { ColumnsType } from 'antd/lib/table';
|
|
|
|
|
import { uniq } from 'lodash';
|
|
|
|
|
|
|
|
|
|
interface PageProps {}
|
|
|
|
|
|
|
|
|
@ -133,6 +134,11 @@ const Page: FC<PageProps> = () => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleFinish = async (v: any) => {
|
|
|
|
|
const sights = v?.sights?.map((e: any) => e.deviceId);
|
|
|
|
|
if (uniq(sights).length !== sights.length) {
|
|
|
|
|
message.warn('铭牌编号不能重复');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (editId.current) {
|
|
|
|
|
const res = await Fetch(`/openi/device/editOrAdd`, {
|
|
|
|
|
method: 'post',
|
|
|
|
@ -225,6 +231,8 @@ const Page: FC<PageProps> = () => {
|
|
|
|
|
if (res.result === 'success') {
|
|
|
|
|
message.success('导入成功');
|
|
|
|
|
getData(params);
|
|
|
|
|
} else {
|
|
|
|
|
message.success(res?.errorMsg);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
@ -392,7 +400,7 @@ const Page: FC<PageProps> = () => {
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
>
|
|
|
|
|
<Input disabled />
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Row>
|
|
|
|
|
</div>
|
|
|
|
|