魏熙美 5 gadus atpakaļ
vecāks
revīzija
74f3f005c8

+ 12
- 7
src/pages/activity/drainage/Detail.jsx Parādīt failu

@@ -13,7 +13,7 @@ import AuthButton from '../../../components/AuthButton';
13 13
 const data = []
14 14
 
15 15
 const header = (props) => {
16
-  const drainageId = props.location.query.drainageId
16
+  const { drainageId, name } = props.location.query
17 17
 
18 18
 
19 19
   const [datas, setDatas] = useState([])
@@ -45,6 +45,7 @@ const header = (props) => {
45 45
         setColumns(tableTitle(eval('(' + data.records[0].content + ')')))
46 46
       }
47 47
       else {
48
+        setDatas([])
48 49
         message.info('数据为空')
49 50
       }
50 51
 
@@ -148,14 +149,18 @@ const header = (props) => {
148 149
       </Button>
149 150
 
150 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 161
         <Table columns={columns} dataSource={datas} pagination={false} />
156 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 164
         </div>
160 165
       </div>
161 166
 

+ 4
- 4
src/pages/activity/drainage/DrainageList.jsx Parādīt failu

@@ -9,12 +9,12 @@ import XForm, { FieldTypes } from '../../../components/XForm';
9 9
 import moment from 'moment';
10 10
 import AuthButton from '../../../components/AuthButton';
11 11
 
12
-const toEditList = (drainageId) => () => {
13
-  console.log(drainageId, '12344567')
12
+const toEditList = (row) => () => {
14 13
   router.push({
15 14
     pathname: '/activity/drainage/Detail',
16 15
     query: {
17
-      drainageId
16
+      drainageId: row.drainageId,
17
+      name: row.name,
18 18
     },
19 19
   });
20 20
 }
@@ -142,7 +142,7 @@ const header = (props) => {
142 142
       render: (text, datas) => (
143 143
         <>
144 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 147
             </span>
148 148
           </AuthButton>