|
@@ -1,11 +1,11 @@
|
|
|
-import React from 'react'
|
|
|
|
|
|
|
+import React, { useEffect, useState } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
import styles from './index.module.scss'
|
|
|
import { rowArrTemp } from '@/pages/Zother/data'
|
|
import { rowArrTemp } from '@/pages/Zother/data'
|
|
|
import { InfoProvider } from '@/pages/Zother/InfoContext'
|
|
import { InfoProvider } from '@/pages/Zother/InfoContext'
|
|
|
import EditTop from '@/pages/Zother/EditTop'
|
|
import EditTop from '@/pages/Zother/EditTop'
|
|
|
import { G1_APIgetClueList, G1API_obj } from '@/store/action/Gmaintain/G1accident'
|
|
import { G1_APIgetClueList, G1API_obj } from '@/store/action/Gmaintain/G1accident'
|
|
|
import EditBtn from '@/pages/Zother/EditBtn'
|
|
import EditBtn from '@/pages/Zother/EditBtn'
|
|
|
-import { G1moreList } from '../data'
|
|
|
|
|
|
|
+import { getPanDianListFu } from '../data'
|
|
|
import FileArchive from '@/pages/Zother/FileArchive'
|
|
import FileArchive from '@/pages/Zother/FileArchive'
|
|
|
|
|
|
|
|
const rowArr = [
|
|
const rowArr = [
|
|
@@ -17,34 +17,51 @@ const rowArr = [
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
function G1edit() {
|
|
function G1edit() {
|
|
|
|
|
+ const [info, setInfo] = useState<any>({ list: [], loding: false })
|
|
|
|
|
+
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ getPanDianListFu(list => {
|
|
|
|
|
+ setInfo({ list, loding: true })
|
|
|
|
|
+ })
|
|
|
|
|
+ }, [])
|
|
|
|
|
+
|
|
|
return (
|
|
return (
|
|
|
- <InfoProvider>
|
|
|
|
|
- <div className={styles.B3edit} id='editBox'>
|
|
|
|
|
- <div className='editMain'>
|
|
|
|
|
- {/* 顶部 */}
|
|
|
|
|
- <EditTop
|
|
|
|
|
- pageTxt='事故登记'
|
|
|
|
|
- rowArr={rowArr}
|
|
|
|
|
- APIobj={G1API_obj}
|
|
|
|
|
- fileUpInfo={{ myUrl: 'cms/orderAccident/upload', dirCode: 'accident' }}
|
|
|
|
|
- // 第二个模块
|
|
|
|
|
- moreDom={{
|
|
|
|
|
- txt: '事故报告',
|
|
|
|
|
- API: G1_APIgetClueList,
|
|
|
|
|
- domList: G1moreList,
|
|
|
|
|
- myUrl: 'cms/orderAccident/son/upload',
|
|
|
|
|
- dirCode: 'accidentSon'
|
|
|
|
|
- }}
|
|
|
|
|
- />
|
|
|
|
|
-
|
|
|
|
|
- {/* 附件归档 */}
|
|
|
|
|
- <FileArchive />
|
|
|
|
|
-
|
|
|
|
|
- {/* 底部按钮 */}
|
|
|
|
|
- <EditBtn path='/accident' APIobj={G1API_obj} checkListTxt='请选择关联藏品' isTow={true} />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </InfoProvider>
|
|
|
|
|
|
|
+ <>
|
|
|
|
|
+ {info.loding ? (
|
|
|
|
|
+ <InfoProvider>
|
|
|
|
|
+ <div className={styles.B3edit} id='editBox'>
|
|
|
|
|
+ <div className='editMain'>
|
|
|
|
|
+ {/* 顶部 */}
|
|
|
|
|
+ <EditTop
|
|
|
|
|
+ pageTxt='事故登记'
|
|
|
|
|
+ rowArr={rowArr}
|
|
|
|
|
+ APIobj={G1API_obj}
|
|
|
|
|
+ fileUpInfo={{ myUrl: 'cms/orderAccident/upload', dirCode: 'accident' }}
|
|
|
|
|
+ // 第二个模块
|
|
|
|
|
+ moreDom={{
|
|
|
|
|
+ txt: '事故报告',
|
|
|
|
|
+ API: G1_APIgetClueList,
|
|
|
|
|
+ domList: info.list,
|
|
|
|
|
+ myUrl: 'cms/orderAccident/son/upload',
|
|
|
|
|
+ dirCode: 'accidentSon'
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
|
|
+ {/* 附件归档 */}
|
|
|
|
|
+ <FileArchive />
|
|
|
|
|
+
|
|
|
|
|
+ {/* 底部按钮 */}
|
|
|
|
|
+ <EditBtn
|
|
|
|
|
+ path='/accident'
|
|
|
|
|
+ APIobj={G1API_obj}
|
|
|
|
|
+ checkListTxt='请选择关联藏品'
|
|
|
|
|
+ isTow={true}
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </InfoProvider>
|
|
|
|
|
+ ) : null}
|
|
|
|
|
+ </>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
|