周立森 5 년 전
부모
커밋
c4230f65f4
4개의 변경된 파일35개의 추가작업 그리고 18개의 파일을 삭제
  1. 12
    9
      src/pages/activity/drainage/Detail.jsx
  2. 4
    4
      src/pages/activity/drainage/DrainageList.jsx
  3. 14
    5
      src/pages/news/type/NewsType.jsx
  4. 5
    0
      src/services/apis.js

+ 12
- 9
src/pages/activity/drainage/Detail.jsx 파일 보기

@@ -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([])
@@ -43,6 +43,7 @@ const header = (props) => {
43 43
         setColumns(tableTitle(data.records))
44 44
       }
45 45
       else {
46
+        setDatas([])
46 47
         message.info('数据为空')
47 48
       }
48 49
 
@@ -155,16 +156,18 @@ const header = (props) => {
155 156
       </Button>
156 157
 
157 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 168
         <Table columns={columns} dataSource={datas} pagination={false} />
165 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 171
         </div>
169 172
       </div>
170 173
 

+ 4
- 4
src/pages/activity/drainage/DrainageList.jsx 파일 보기

@@ -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>

+ 14
- 5
src/pages/news/type/NewsType.jsx 파일 보기

@@ -114,6 +114,10 @@ function header(props) {
114 114
       ),
115 115
     },
116 116
   ];
117
+  function handleReset() {
118
+    props.form.resetFields();
119
+    getList({ pageNum: 1, pageSize: 10 })
120
+  }
117 121
 
118 122
   const { getFieldDecorator } = props.form
119 123
   return (
@@ -121,13 +125,18 @@ function header(props) {
121 125
     <>
122 126
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
123 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 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 140
       </Form>
132 141
       <AuthButton name="admin.taNewsType.post" noRight={null}>
133 142
         <Button type="danger" className={styles.addBtn} onClick={toEditNews()}>新增</Button>

+ 5
- 0
src/services/apis.js 파일 보기

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