|
|
@@ -1,13 +1,84 @@
|
|
|
import React from 'react'
|
|
|
import styles from './index.module.scss'
|
|
|
-function E2story() {
|
|
|
+import { useSelector } from 'react-redux'
|
|
|
+import { RootState } from '@/store'
|
|
|
+import { E2_APIgetList } from '@/store/action/Eculture/E2story'
|
|
|
+import TableList from '@/pages/Zother/TableList'
|
|
|
+import { baseFormData } from '@/pages/Zother/data'
|
|
|
+import { storyTableC } from '@/utils/tableData'
|
|
|
+import { Button } from 'antd'
|
|
|
+import history from '@/utils/history'
|
|
|
+
|
|
|
+const E2topSearch = [
|
|
|
+ {
|
|
|
+ type: 'input',
|
|
|
+ key: 'searchKey',
|
|
|
+ placeholder: `请输入故事标题、关联藏品`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'input',
|
|
|
+ key: 'searchTagName',
|
|
|
+ placeholder: '搜索藏品标签'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'time',
|
|
|
+ key: ['startTime', 'endTime'],
|
|
|
+ placeholder: [`录入日期开始`, `录入日期结束`]
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
+const D1baseFormData = baseFormData()
|
|
|
+
|
|
|
+const dataExport = () => {
|
|
|
+ console.log('数据导出了')
|
|
|
+}
|
|
|
+
|
|
|
+function D1register() {
|
|
|
+ // 从仓库拿数据
|
|
|
+ const tableInfo = useSelector((state: RootState) => state.E2story.tableInfo)
|
|
|
+
|
|
|
+ const storyTableListToprr = ({
|
|
|
+ clickSearch,
|
|
|
+ resetSelectFu
|
|
|
+ }: {
|
|
|
+ clickSearch: () => void
|
|
|
+ resetSelectFu: () => void
|
|
|
+ }) => {
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ <Button type='primary' onClick={() => history.push(`/story_edit/1/null`)}>
|
|
|
+ 新增故事
|
|
|
+ </Button>
|
|
|
+ <Button type='primary' onClick={dataExport}>
|
|
|
+ 数据导出
|
|
|
+ </Button>
|
|
|
+ <Button type='primary' onClick={clickSearch}>
|
|
|
+ 查询
|
|
|
+ </Button>
|
|
|
+ <Button onClick={resetSelectFu}>重置</Button>
|
|
|
+ </>
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
return (
|
|
|
<div className={styles.E2story}>
|
|
|
<div className='pageTitle'>故事管理</div>
|
|
|
+
|
|
|
+ <TableList
|
|
|
+ baseFormData={D1baseFormData}
|
|
|
+ getListAPI={E2_APIgetList}
|
|
|
+ pageKey='story'
|
|
|
+ tableInfo={tableInfo}
|
|
|
+ columnsTemp={storyTableC}
|
|
|
+ rightBtnWidth={350}
|
|
|
+ yHeight={585}
|
|
|
+ searchDom={E2topSearch}
|
|
|
+ storyTableListToprr={storyTableListToprr}
|
|
|
+ />
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
|
|
|
-const MemoE2story = React.memo(E2story)
|
|
|
+const MemoD1register = React.memo(D1register)
|
|
|
|
|
|
-export default MemoE2story
|
|
|
+export default MemoD1register
|