|
@@ -1,6 +1,6 @@
|
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
import styles from './index.module.scss'
|
|
import styles from './index.module.scss'
|
|
-import { Button, Cascader, Input, Popconfirm, Select, Table } from 'antd'
|
|
|
|
|
|
+import { Button, Cascader, Input, notification, Popconfirm, Select, Table } from 'antd'
|
|
import {
|
|
import {
|
|
A1addType,
|
|
A1addType,
|
|
TableSelectType,
|
|
TableSelectType,
|
|
@@ -19,6 +19,7 @@ import { MessageFu } from '@/utils/message'
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
import AddCamera from './AddCamera'
|
|
import AddCamera from './AddCamera'
|
|
import { mapDataAll2 } from '../C1User/AddUser/city'
|
|
import { mapDataAll2 } from '../C1User/AddUser/city'
|
|
|
|
+import UpXlsx from '@/components/UpXlsx'
|
|
|
|
|
|
const tableSelectBase: TableSelectType = {
|
|
const tableSelectBase: TableSelectType = {
|
|
siteArr: undefined,
|
|
siteArr: undefined,
|
|
@@ -300,6 +301,9 @@ function A1Camera() {
|
|
return obj[openInfo.txt]
|
|
return obj[openInfo.txt]
|
|
}, [openInfo.txt])
|
|
}, [openInfo.txt])
|
|
|
|
|
|
|
|
+ // 上传xlsx 的ref
|
|
|
|
+ const upXlsxRef = useRef<any>(null)
|
|
|
|
+
|
|
// 查看 待完善
|
|
// 查看 待完善
|
|
const [lookId, setLookId] = useState(0)
|
|
const [lookId, setLookId] = useState(0)
|
|
|
|
|
|
@@ -414,15 +418,21 @@ function A1Camera() {
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div className='A1topSon A1topSon2'>
|
|
<div className='A1topSon A1topSon2'>
|
|
- <Button onClick={resetSelectFu}>重置</Button> 
|
|
|
|
|
|
+ <Button onClick={resetSelectFu}>重置</Button>
|
|
<Button type='primary' onClick={clickSearch}>
|
|
<Button type='primary' onClick={clickSearch}>
|
|
查询
|
|
查询
|
|
</Button>
|
|
</Button>
|
|
-  
|
|
|
|
<Button type='primary' onClick={() => setOpenInfo({ id: -1, txt: '新增' })}>
|
|
<Button type='primary' onClick={() => setOpenInfo({ id: -1, txt: '新增' })}>
|
|
新增
|
|
新增
|
|
</Button>
|
|
</Button>
|
|
-  
|
|
|
|
|
|
+ <a href='/xlsx/相机列表导入模板.xlsx' download>
|
|
|
|
+ <Button type='primary'>下载导入模块</Button>
|
|
|
|
+ </a>
|
|
|
|
+ <UpXlsx url='cms/camera/upload/excel' ref={upXlsxRef} xlsxResInfoFu={() => getListFu()} />
|
|
|
|
+ {/* 上传xlsx */}
|
|
|
|
+ <Button type='primary' onClick={() => upXlsxRef.current?.myInputClickFu()}>
|
|
|
|
+ 导入表格
|
|
|
|
+ </Button>
|
|
<Button type='primary' onClick={deriveFu}>
|
|
<Button type='primary' onClick={deriveFu}>
|
|
导出表格
|
|
导出表格
|
|
</Button>
|
|
</Button>
|