周立森 5 years ago
parent
commit
c4230f65f4

+ 12
- 9
src/pages/activity/drainage/Detail.jsx View File

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([])
43
         setColumns(tableTitle(data.records))
43
         setColumns(tableTitle(data.records))
44
       }
44
       }
45
       else {
45
       else {
46
+        setDatas([])
46
         message.info('数据为空')
47
         message.info('数据为空')
47
       }
48
       }
48
 
49
 
155
       </Button>
156
       </Button>
156
 
157
 
157
       <div>
158
       <div>
158
-        {/* H5项目名称 style={{ float: 'right', margin: '20px 0', zIndex: 1 }} */}
159
-        <AuthButton name="admin.taDrainageRecord.export.get" noRight={null}>
160
-          <Button type="primary" style={{ marginLeft: '30px', float: 'right', marginTop: '30px', marginBottom: '30px', zIndex: 1 }} onClick={excelPort}>导出数据</Button>
161
-        </AuthButton>
162
-        {
163
-         console.log("datas", datas)}
159
+        <div style={{ display: 'flex', justifyContent: 'space-between' }}>
160
+         <div style={{ lineHeight: '92px', width: '600px', fontWeight: 'bold', fontSize: '18px' }}>
161
+            H5项目:{ name }
162
+         </div>
163
+          {/* H5项目名称 style={{ float: 'right', margin: '20px 0', zIndex: 1 }} */}
164
+          <AuthButton name="admin.taDrainageRecord.export.get" noRight={null}>
165
+            <Button type="primary" style={{ marginLeft: '30px', float: 'right', marginTop: '30px', marginBottom: '30px', zIndex: 1 }} onClick={excelPort}>导出数据</Button>
166
+          </AuthButton>
167
+        </div>
164
         <Table columns={columns} dataSource={datas} pagination={false} />
168
         <Table columns={columns} dataSource={datas} pagination={false} />
165
         <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
169
         <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
166
-          <Pagination showQuickJumper defaultCurrent={1} total={total.total} onChange={(e) => changePageNum(e)} current={total.current}
167
-/>
170
+          <Pagination showQuickJumper defaultCurrent={1} total={total.total} onChange={(e) => changePageNum(e)} current={total.current}/>
168
         </div>
171
         </div>
169
       </div>
172
       </div>
170
 
173
 

+ 4
- 4
src/pages/activity/drainage/DrainageList.jsx View File

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>

+ 14
- 5
src/pages/news/type/NewsType.jsx View File

114
       ),
114
       ),
115
     },
115
     },
116
   ];
116
   ];
117
+  function handleReset() {
118
+    props.form.resetFields();
119
+    getList({ pageNum: 1, pageSize: 10 })
120
+  }
117
 
121
 
118
   const { getFieldDecorator } = props.form
122
   const { getFieldDecorator } = props.form
119
   return (
123
   return (
121
     <>
125
     <>
122
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
126
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
123
         <Form.Item>
127
         <Form.Item>
124
-          {getFieldDecorator('status')(
125
-            <Select style={{ width: '180px' }} placeholder="请选择">
126
-              <Option value="1">已上架</Option>
127
-              <Option value="0">已下架</Option>
128
-            </Select>,
128
+          {getFieldDecorator('buildingId')(
129
+            <BuildSelect />,
129
           )}
130
           )}
130
         </Form.Item>
131
         </Form.Item>
132
+        <Form.Item>
133
+            <Button type="primary" htmlType="submit" >
134
+              查询
135
+            </Button>
136
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
137
+              重置
138
+            </Button>
139
+        </Form.Item>
131
       </Form>
140
       </Form>
132
       <AuthButton name="admin.taNewsType.post" noRight={null}>
141
       <AuthButton name="admin.taNewsType.post" noRight={null}>
133
         <Button type="danger" className={styles.addBtn} onClick={toEditNews()}>新增</Button>
142
         <Button type="danger" className={styles.addBtn} onClick={toEditNews()}>新增</Button>

+ 5
- 0
src/services/apis.js View File

730
   },
730
   },
731
  },
731
  },
732
  helpActivity: {
732
  helpActivity: {
733
+  effectiveList: {
734
+    url: `${prefix}/helpActivityEffective/list`,
735
+    method: 'GET',
736
+    action: 'admin.helpActivityEffective.list.get',
737
+  },
733
   list: {
738
   list: {
734
     url: `${prefix}/helpActivity/list`,
739
     url: `${prefix}/helpActivity/list`,
735
     method: 'GET',
740
     method: 'GET',