魏熙美 5 年之前
父節點
當前提交
74f3f005c8
共有 2 個檔案被更改,包括 16 行新增11 行删除
  1. 12
    7
      src/pages/activity/drainage/Detail.jsx
  2. 4
    4
      src/pages/activity/drainage/DrainageList.jsx

+ 12
- 7
src/pages/activity/drainage/Detail.jsx 查看文件

13
 const data = []
13
 const data = []
14
 
14
 
15
 const header = (props) => {
15
 const header = (props) => {
16
-  const drainageId = props.location.query.drainageId
16
+  const { drainageId, name } = props.location.query
17
 
17
 
18
 
18
 
19
   const [datas, setDatas] = useState([])
19
   const [datas, setDatas] = useState([])
45
         setColumns(tableTitle(eval('(' + data.records[0].content + ')')))
45
         setColumns(tableTitle(eval('(' + data.records[0].content + ')')))
46
       }
46
       }
47
       else {
47
       else {
48
+        setDatas([])
48
         message.info('数据为空')
49
         message.info('数据为空')
49
       }
50
       }
50
 
51
 
148
       </Button>
149
       </Button>
149
 
150
 
150
       <div>
151
       <div>
151
-        {/* H5项目名称 style={{ float: 'right', margin: '20px 0', zIndex: 1 }} */}
152
-        <AuthButton name="admin.taDrainageRecord.export.get" noRight={null}>
153
-          <Button type="primary" style={{ marginLeft: '30px', float: 'right', marginTop: '30px', marginBottom: '30px', zIndex: 1 }} onClick={excelPort}>导出数据</Button>
154
-        </AuthButton>
152
+        <div style={{ display: 'flex', justifyContent: 'space-between' }}>
153
+         <div style={{ lineHeight: '92px', width: '600px', fontWeight: 'bold', fontSize: '18px' }}>
154
+            H5项目:{ name }
155
+         </div>
156
+          {/* H5项目名称 style={{ float: 'right', margin: '20px 0', zIndex: 1 }} */}
157
+          <AuthButton name="admin.taDrainageRecord.export.get" noRight={null}>
158
+            <Button type="primary" style={{ marginLeft: '30px', float: 'right', marginTop: '30px', marginBottom: '30px', zIndex: 1 }} onClick={excelPort}>导出数据</Button>
159
+          </AuthButton>
160
+        </div>
155
         <Table columns={columns} dataSource={datas} pagination={false} />
161
         <Table columns={columns} dataSource={datas} pagination={false} />
156
         <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
162
         <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
157
-          <Pagination showQuickJumper defaultCurrent={1} total={total.total} onChange={(e) => changePageNum(e)} current={total.current}
158
-/>
163
+          <Pagination showQuickJumper defaultCurrent={1} total={total.total} onChange={(e) => changePageNum(e)} current={total.current}/>
159
         </div>
164
         </div>
160
       </div>
165
       </div>
161
 
166
 

+ 4
- 4
src/pages/activity/drainage/DrainageList.jsx 查看文件

9
 import moment from 'moment';
9
 import moment from 'moment';
10
 import AuthButton from '../../../components/AuthButton';
10
 import AuthButton from '../../../components/AuthButton';
11
 
11
 
12
-const toEditList = (drainageId) => () => {
13
-  console.log(drainageId, '12344567')
12
+const toEditList = (row) => () => {
14
   router.push({
13
   router.push({
15
     pathname: '/activity/drainage/Detail',
14
     pathname: '/activity/drainage/Detail',
16
     query: {
15
     query: {
17
-      drainageId
16
+      drainageId: row.drainageId,
17
+      name: row.name,
18
     },
18
     },
19
   });
19
   });
20
 }
20
 }
142
       render: (text, datas) => (
142
       render: (text, datas) => (
143
         <>
143
         <>
144
           <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
144
           <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
145
-            <span style={{ right: '20px', top: '20px', fontSize: ' 0.106rem', zIndex: 1, color: '#FF7E48', cursor: 'pointer' }} onClick={toEditList(datas.drainageId)}>
145
+            <span style={{ right: '20px', top: '20px', fontSize: ' 0.106rem', zIndex: 1, color: '#FF7E48', cursor: 'pointer' }} onClick={toEditList(datas)}>
146
               查看详情
146
               查看详情
147
             </span>
147
             </span>
148
           </AuthButton>
148
           </AuthButton>