Selaa lähdekoodia

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into dev

傅行帆 5 vuotta sitten
vanhempi
commit
4cb135c431

+ 2
- 2
config/config.js Näytä tiedosto

@@ -83,8 +83,8 @@ export default {
83 83
   targets: {
84 84
     ie: 11,
85 85
   },
86
-  publicPath: './',
87
-  // publicPath: 'https://njcjweb.oss-accelerate.aliyuncs.com/admin/',
86
+  // publicPath: './',
87
+  publicPath: 'https://njcjweb.oss-accelerate.aliyuncs.com/admin/',
88 88
   history: 'hash',
89 89
   devtool: isAntDesignProPreview ? 'source-map' : false,
90 90
   // umi routes: https://umijs.org/zh/guide/router.html

+ 5
- 5
package.json Näytä tiedosto

@@ -67,8 +67,8 @@
67 67
     "redux": "^4.0.1",
68 68
     "swiper": "^5.3.6",
69 69
     "umi": "^2.13.3",
70
-    "umi-plugin-pro-block": "^1.3.2",
71
-    "umi-plugin-react": "^1.9.5",
70
+    "umi-plugin-pro-block": "^1.3.6",
71
+    "umi-plugin-react": "^1.15.3",
72 72
     "umi-request": "^1.0.8",
73 73
     "wangeditor": "^3.1.1"
74 74
   },
@@ -108,10 +108,10 @@
108 108
     "pro-download": "1.0.1",
109 109
     "slash2": "^2.0.0",
110 110
     "stylelint": "^10.1.0",
111
-    "umi-plugin-ga": "^1.1.3",
112
-    "umi-plugin-pro": "^1.0.2",
111
+    "umi-plugin-ga": "^1.1.6",
112
+    "umi-plugin-pro": "^1.0.3",
113 113
     "umi-types": "^0.3.8",
114
-    "webpack-theme-color-replacer": "^1.2.15"
114
+    "webpack-theme-color-replacer": "^1.3.7"
115 115
   },
116 116
   "optionalDependencies": {
117 117
     "puppeteer": "^1.17.0"

+ 6
- 2
src/components/Navigate/index.jsx Näytä tiedosto

@@ -16,11 +16,15 @@ const Navigate = ({ children, to, onClick }) => {
16 16
             )
17 17
         }
18 18
 
19
-    } else {
19
+    } else if (onClick) {
20 20
         return (
21
-            <a onClick={onClick} href={to} style={{ color: '#1D74D9' }}>{children}</a>
21
+            <span onClick={onClick} style={{ color: '#1D74D9' }}>{children}</span>
22 22
         )
23 23
 
24
+    } else {
25
+        return (
26
+            <span style={{ color: '#1D74D9' }}>{children}</span>
27
+        )
24 28
     }
25 29
 
26 30
 

+ 4
- 2
src/pages/activity/ActivityList.jsx Näytä tiedosto

@@ -35,9 +35,11 @@ const header = props => {
35 35
   useEffect(() => {
36 36
 
37 37
     if (localStorage.getItem("activePageParams")) {
38
-      props.form.setFieldsValue(JSON.parse(localStorage.getItem("activePageParams")));
39
-      // const { getFieldDecorator } = JSON.parse(localStorage.getItem("pageParams"))
40 38
 
39
+      const localStorageValue = JSON.parse(localStorage.getItem("activePageParams"))
40
+      localStorageValue.time = localStorageValue.time ? moment(localStorageValue.time) : ''
41
+
42
+      props.form.setFieldsValue(localStorageValue);
41 43
       getList(JSON.parse(localStorage.getItem("activePageParams")))
42 44
     } else {
43 45
       localStorage.setItem("activePageParams", JSON.stringify({ pageNum: 1, pageSize: 10 }));

+ 1
- 1
src/pages/activity/helpActivity/helpRecord.jsx Näytä tiedosto

@@ -267,7 +267,7 @@ function body(props) {
267 267
   const { helpActivityId } = props.location.query
268 268
   useEffect(() => {
269 269
     console.log('customerType', customerType)
270
-    getList({ pageNumber: 1, pageSize: 10, status: customerType, helpActivityId })
270
+    getList({ pageNum: 1, pageSize: 10, status: customerType, helpActivityId })
271 271
   }, [])
272 272
 
273 273
   function getList(params) {

+ 5
- 1
src/pages/activity/helpActivity/list.jsx Näytä tiedosto

@@ -21,9 +21,13 @@ const header = props => {
21 21
 
22 22
   useEffect(() => {
23 23
     if (localStorage.getItem("helpActivePageParams")) {
24
-      props.form.setFieldsValue(JSON.parse(localStorage.getItem("helpActivePageParams")));
24
+      // props.form.setFieldsValue(JSON.parse(localStorage.getItem("helpActivePageParams")));
25 25
       // const { getFieldDecorator } = JSON.parse(localStorage.getItem("pageParams"))
26
+      const localStorageValue = JSON.parse(localStorage.getItem("helpActivePageParams"))
27
+      localStorageValue.startTime = localStorageValue.startTime ? moment(localStorageValue.startTime) : ''
28
+      localStorageValue.endTime = localStorageValue.endTime ? moment(localStorageValue.endTime) : ''
26 29
 
30
+      props.form.setFieldsValue(localStorageValue);
27 31
       getList(JSON.parse(localStorage.getItem("helpActivePageParams")))
28 32
     } else {
29 33
       localStorage.setItem("helpActivePageParams", JSON.stringify({ pageNum: 1, pageSize: 10 }));

+ 6
- 2
src/pages/building/list/index.jsx Näytä tiedosto

@@ -181,9 +181,13 @@ function body(props) {
181 181
   // eslint-disable-next-line react-hooks/rules-of-hooks
182 182
   useEffect(() => {
183 183
     if (localStorage.getItem("pageParams")) {
184
-      props.form.setFieldsValue(JSON.parse(localStorage.getItem("pageParams")));
184
+
185 185
       // const { getFieldDecorator } = JSON.parse(localStorage.getItem("pageParams"))
186
-      getList(JSON.parse(localStorage.getItem("pageParams")))
186
+      const localStorageValue = JSON.parse(localStorage.getItem("pageParams"))
187
+      localStorageValue.startDate = localStorageValue.startDate ? moment(localStorageValue.startDate) : ''
188
+      props.form.setFieldsValue(localStorageValue);
189
+
190
+      getList({ pageNum: 1, pageSize: 9, ...JSON.parse(localStorage.getItem("pageParams")) })
187 191
     } else {
188 192
       getList({ pageNum: 1, pageSize: 9 })
189 193
     }

+ 0
- 2
src/pages/customer/customerlist/components/BatchAssistConsultant.jsx Näytä tiedosto

@@ -89,7 +89,6 @@ class ModalAttribution extends React.Component {
89 89
 
90 90
    // 分页
91 91
   onChange(pageNum) {
92
-    console.log(this.state.visibleData.buildingName,"222222222222222222222222")
93 92
     this.getList({ pageNumber: pageNum, pageSize: 5, buildingId: this.state.visibleData.buildingName ||this.props.visibleData.buildingId})
94 93
 
95 94
     // this.getUserList({ pageNumber: pageNum, pageSize: 5, buildingId: this.state.visibleData.buildingName })
@@ -97,7 +96,6 @@ class ModalAttribution extends React.Component {
97 96
 
98 97
   // 提交
99 98
   submitGm(record) {
100
-    console.log(this.state.visibleData.buildingName,"3333333333333333333")
101 99
     // 网路请求
102 100
     request({ ...apis.customer.batchConsultantAssist, data: { userId: record.userId
103 101
       ,buildingId:this.state.visibleData.buildingName  || this.props.visibleData.buildingId

+ 29
- 9
src/pages/customer/customerlist/index.jsx Näytä tiedosto

@@ -77,12 +77,18 @@ function body(props) {
77 77
     if (localStorage.getItem("state")) {
78 78
       console.log(localStorage.getItem("state"), 'state')
79 79
       if (JSON.parse(localStorage.getItem("state")) == 'private') {
80
-        props.form.setFieldsValue(JSON.parse(localStorage.getItem("priPageParams")));
81
-        getList({ ...JSON.parse(localStorage.getItem("priPageParams")) })
80
+        const localStorageValue = JSON.parse(localStorage.getItem("priPageParams"))
81
+        localStorageValue.startCreateDate = localStorageDate(localStorageValue.startCreateDate)
82
+        localStorageValue.endCreateDate = localStorageDate(localStorageValue.endCreateDate)
83
+        props.form.setFieldsValue(localStorageValue);
84
+        getList({ pageNumber: 1, pageSize: 10, ...JSON.parse(localStorage.getItem("priPageParams")) })
82 85
       } else {
83 86
         setCustomerType('public')
84
-        props.form.setFieldsValue(JSON.parse(localStorage.getItem("pubPageParams")));
85
-        getList({ ...JSON.parse(localStorage.getItem("pubPageParams")) })
87
+        const localStorageValue = JSON.parse(localStorage.getItem("pubPageParams"))
88
+        localStorageValue.startCreateDate = localStorageDate(localStorageValue.startCreateDate)
89
+        localStorageValue.endCreateDate = localStorageDate(localStorageValue.endCreateDate)
90
+        props.form.setFieldsValue(localStorageValue);
91
+        getList({ pageNumber: 1, pageSize: 10, ...JSON.parse(localStorage.getItem("pubPageParams")) })
86 92
       }
87 93
 
88 94
     } else {
@@ -93,6 +99,13 @@ function body(props) {
93 99
 
94 100
   function getList(params) {
95 101
     // 网路请求
102
+    console.log(params, '111111111111111')
103
+    if (params.startCreateDate) {
104
+      params.startCreateDate = moment(params.startCreateDate).format('YYYY-MM-DD HH:mm:ss');
105
+    }
106
+    if (params.endCreateDate) {
107
+      params.endCreateDate = moment(params.endCreateDate).format('YYYY-MM-DD HH:mm:ss');
108
+    }
96 109
     request({ ...apis.customer.customerRecommend, params: { ...params } }).then(res => {
97 110
       if (params.customerType === 'private') {
98 111
         setDataSource(res)
@@ -155,6 +168,8 @@ function body(props) {
155 168
     console.log(e)
156 169
   }
157 170
 
171
+  const localStorageDate = (date) => date ? moment(date) : ''
172
+
158 173
   // 分页
159 174
   function onChange(pageNum) {
160 175
     // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -185,8 +200,10 @@ function body(props) {
185 200
     localStorage.setItem("state", JSON.stringify(value))
186 201
     if (value === 'private') {
187 202
       if (localStorage.getItem("priPageParams")) {
188
-        props.form.setFieldsValue(JSON.parse(localStorage.getItem("priPageParams")));
189
-
203
+        const localStorageValue = JSON.parse(localStorage.getItem("priPageParams"))
204
+        localStorageValue.startCreateDate = localStorageDate(localStorageValue.startCreateDate)
205
+        localStorageValue.endCreateDate = localStorageDate(localStorageValue.endCreateDate)
206
+        props.form.setFieldsValue(localStorageValue);
190 207
         getList(JSON.parse(localStorage.getItem("priPageParams")))
191 208
       } else {
192 209
         localStorage.setItem("priPageParams", JSON.stringify({ pageNumber: 1, pageSize: 10, customerType: value }))
@@ -196,9 +213,12 @@ function body(props) {
196 213
     } else {
197 214
 
198 215
       if (localStorage.getItem("pubPageParams")) {
199
-        props.form.setFieldsValue(JSON.parse(localStorage.getItem("pubPageParams")));
200
-        // const { getFieldDecorator } = JSON.parse(localStorage.getItem("pageParams"))
201
-        getList({ customerType, ...JSON.parse(localStorage.getItem("pubPageParams")) })
216
+        const localStorageValue = JSON.parse(localStorage.getItem("pubPageParams"))
217
+        localStorageValue.startCreateDate = localStorageDate(localStorageValue.startCreateDate)
218
+        localStorageValue.endCreateDate = localStorageDate(localStorageValue.endCreateDate)
219
+        props.form.setFieldsValue(localStorageValue);
220
+
221
+        getList( {pageNumber: 1, pageSize: 10, customerType, ...JSON.parse(localStorage.getItem("pubPageParams")) })
202 222
       } else {
203 223
         localStorage.setItem("pubPageParams", JSON.stringify({ pageNumber: 1, pageSize: 10, customerType: 'public' }))
204 224
         getList({ pageNumber: 1, pageSize: 10, customerType: 'public' })

+ 10
- 6
src/pages/eContract/businessConfig/list.jsx Näytä tiedosto

@@ -1,14 +1,17 @@
1 1
 import React, { useState, useEffect } from 'react';
2 2
 import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import styles from '../../style/GoodsList.less';
5 4
 import router from 'umi/router';
6 5
 import moment from 'moment';
6
+import AuthButton from '@/components/AuthButton';
7
+import withActions from '@/components/ActionList';
8
+import EditIcon from '@/components/EditIcon';
9
+import styles from '../../style/GoodsList.less';
7 10
 import SelectCity from '../../../components/SelectButton/CitySelect'
8 11
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
9 12
 import apis from '../../../services/apis';
10 13
 import request from '../../../utils/request';
11
-import AuthButton from '@/components/AuthButton';
14
+
12 15
 
13 16
 const { Option } = Select;
14 17
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
@@ -116,11 +119,12 @@ const header = props => {
116 119
       dataIndex: 'handle',
117 120
       key: 'handle',
118 121
       align: 'center',
119
-      render: (text, record) => (
122
+      render: withActions((text, record) => [
120 123
         <AuthButton name="admin.eContractBusiness.detail.get" noRight={null}>
121
-          <a style={{ color: '#66B3FF' }} onClick={toDetail(record)} >查看详情</a>
122
-        </AuthButton>
123
-      ),
124
+           <EditIcon text="查看详情" type="look" onClick={toDetail(record)} />
125
+          {/* <a style={{ color: '#66B3FF' }} onClick={toDetail(record)} >查看详情</a> */}
126
+        </AuthButton>,
127
+      ])
124 128
     },
125 129
   ];
126 130
   

+ 24
- 34
src/pages/eContract/manage/list.jsx Näytä tiedosto

@@ -1,30 +1,22 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3
-import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import styles from '../../style/GoodsList.less';
2
+import { Form, Input, Button, Icon, Select, Table, Pagination, DatePicker } from 'antd';
5 3
 import router from 'umi/router';
6 4
 import moment from 'moment';
7
-import SelectCity from '../../../components/SelectButton/CitySelect'
8
-import BuildSelect from '../../../components/SelectButton/BuildSelect'
5
+import withActions from '@/components/ActionList';
6
+import EditIcon from '@/components/EditIcon';
7
+import AuthButton from '@/components/AuthButton';
8
+import styles from '../../style/GoodsList.less';
9 9
 import apis from '../../../services/apis';
10 10
 import request from '../../../utils/request';
11 11
 
12 12
 
13
-import AuthButton from '@/components/AuthButton';
14
-
15
-const { Option } = Select;
16
-const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
13
+const { RangePicker } = DatePicker;
17 14
 
18 15
 const header = props => {
19
-
20 16
   const [data, setData] = useState({})
21 17
 
22
-
23 18
   useEffect(() => {
24
-
25 19
     getList({ pageNum: 1, pageSize: 10 });
26
-
27
-
28 20
   }, [])
29 21
 
30 22
   // 查询列表
@@ -41,10 +33,10 @@ const header = props => {
41 33
       router.push({
42 34
         pathname: '/eContract/manage/edit',
43 35
         query: {
44
-          id: id,
36
+          id,
45 37
         },
46 38
       });
47
-      return
39
+
48 40
     }
49 41
   }
50 42
 
@@ -121,11 +113,11 @@ const header = props => {
121 113
       dataIndex: 'handle',
122 114
       key: 'handle',
123 115
       align: 'center',
124
-      render: (text, row) => (
116
+      render: withActions((text, record) => [
125 117
         <AuthButton name="admin.eContractManager.detail.get" noRight={null}>
126
-          <a style={{ color: '#66B3FF' }} onClick={toDetail(row.contractId)} >查看详情</a>
127
-        </AuthButton>
128
-      ),
118
+          <EditIcon text="查看详情" type="look" onClick={toDetail(record.contractId)} />
119
+        </AuthButton>,
120
+      ]),
129 121
     },
130 122
   ];
131 123
 
@@ -145,26 +137,25 @@ const header = props => {
145 137
     e.preventDefault();
146 138
     props.form.validateFields((err, values) => {
147 139
       if (!err) {
148
-        let {archivesDate, ...submitValue} = values
149
-        if(null != archivesDate && archivesDate.length > 0){
140
+        const { archivesDate, ...submitValue } = values
141
+        if (null != archivesDate && archivesDate.length > 0) {
150 142
           const [archivesStartDate, archivesEndDate] = archivesDate
151 143
           submitValue.archivesStartDate = moment(archivesStartDate).format('YYYY-MM-DD');
152 144
           submitValue.archivesEndDate = moment(archivesEndDate).format('YYYY-MM-DD');
153
-        }   
145
+        }
154 146
         console.log(submitValue)
155 147
         getList({ pageNum: 1, pageSize: 10, ...submitValue })
156 148
       }
157 149
     });
158 150
   }
159 151
 
160
-  //重置搜索
152
+  // 重置搜索
161 153
   function handleReset() {
162 154
     props.form.resetFields();
163 155
     getList({ pageNum: 1, pageSize: 10 })
164 156
   }
165 157
 
166 158
 
167
-
168 159
   const { getFieldDecorator } = props.form
169 160
   return (
170 161
 
@@ -200,8 +191,7 @@ const header = props => {
200 191
               <option value="">全部</option>
201 192
               <option value="1">是</option>
202 193
               <option value="0">否</option>
203
-
204
-            </Select>
194
+            </Select>,
205 195
           )}
206 196
         </Form.Item>
207 197
         <Form.Item>
@@ -210,7 +200,7 @@ const header = props => {
210 200
               <option value="">全部</option>
211 201
               <option value="1">是</option>
212 202
               <option value="0">否</option>
213
-            </Select>
203
+            </Select>,
214 204
           )}
215 205
         </Form.Item>
216 206
         <Form.Item>
@@ -219,14 +209,14 @@ const header = props => {
219 209
               <option value="">全部</option>
220 210
               <option value="1">是</option>
221 211
               <option value="0">否</option>
222
-            </Select>
212
+            </Select>,
223 213
           )}
224 214
         </Form.Item>
225 215
 
226 216
         <Form.Item>
227
-        
217
+
228 218
           {getFieldDecorator('archivesDate')(
229
-            <RangePicker placeholder={['归档开始时间', '归档结束时间']} />
219
+            <RangePicker placeholder={['归档开始时间', '归档结束时间']} />,
230 220
           )}
231 221
         </Form.Item>
232 222
         <Form.Item>
@@ -242,9 +232,9 @@ const header = props => {
242 232
           </AuthButton>
243 233
         </Form.Item>
244 234
       </Form>
245
-  
246
-    
247
-         <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
235
+
236
+
237
+      <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
248 238
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
249 239
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
250 240
       </div>

+ 5
- 3
src/pages/eContract/template/list.jsx Näytä tiedosto

@@ -9,6 +9,8 @@ import BuildSelect from '../../../components/SelectButton/BuildSelect'
9 9
 import apis from '../../../services/apis';
10 10
 import request from '../../../utils/request';
11 11
 import AuthButton from '@/components/AuthButton';
12
+import withActions from '@/components/ActionList';
13
+import EditIcon from '@/components/EditIcon';
12 14
 // import RaiseHelpDoc from '../edit/components/RaiseHelpDoc';
13 15
 
14 16
 const { Option } = Select;
@@ -105,11 +107,11 @@ const header = props => {
105 107
       dataIndex: '',
106 108
       key: '',
107 109
       align: 'center',
108
-      render: (text, record) => (
110
+      render: withActions((text, record) => [(
109 111
           <AuthButton name="admin.eContractTemplate.detail.get" noRight={null}>
110
-            <a style={{ color: '#66B3FF' }} onClick={toDetail(record)} >查看详情</a>
112
+            <EditIcon type="look" text="查看详情" onClick={toDetail(record)}></EditIcon>
111 113
           </AuthButton>
112
-      ),
114
+      ),])
113 115
     },
114 116
   ];
115 117
   const getSignList = dynamicId => {

+ 6
- 3
src/pages/h5SampleManager/h5Demand/list.jsx Näytä tiedosto

@@ -1,9 +1,9 @@
1 1
 import React, { useState, useEffect } from 'react';
2 2
 import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import styles from '../../style/GoodsList.less';
5 4
 import router from 'umi/router';
6 5
 import moment from 'moment';
6
+import styles from '../../style/GoodsList.less';
7 7
 import SelectCity from '../../../components/SelectButton/CitySelect'
8 8
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
9 9
 import apis from '../../../services/apis';
@@ -11,6 +11,8 @@ import request from '../../../utils/request';
11 11
 import BatchDel from './components/BatchDel';
12 12
 import AddDemand from './components/AddDemand';
13 13
 import AuthButton from '@/components/AuthButton';
14
+import withActions from '@/components/ActionList';
15
+import EditIcon from '@/components/EditIcon';
14 16
 
15 17
 const { Option } = Select;
16 18
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
@@ -106,10 +108,11 @@ const header = props => {
106 108
       dataIndex: 'handle',
107 109
       key: 'handle',
108 110
       align: 'center',
109
-      render: (text, record) => (
111
+      render: withActions((text, record) =>[ (
110 112
         <AuthButton name="admin.h5Demand.detail.get" noRight={null}>
111
-          <a style={{ color: '#66B3FF' }} onClick={toDetail(record)} >查看详情</a>
113
+          <EditIcon type="look" text="查看详情" onClick={toDetail(record)}></EditIcon>
112 114
         </AuthButton>
115
+      )]
113 116
       ),
114 117
     },
115 118
   ];

+ 2
- 2
src/pages/record/share/countList.jsx Näytä tiedosto

@@ -168,8 +168,8 @@ function record(props) {
168 168
           </Form.Item>
169 169
           <Form.Item>
170 170
             <span style={{marginRight:'10px'}}>分享时间:</span>
171
-                {getFieldDecorator('shareTime')(
172
-                  <RangePicker placeholder={['开始时间','结束时间']} />
171
+                {getFieldDecorator('shareTime',{initialValue : [moment(),moment()],})(
172
+                  <RangePicker placeholder={['开始时间','结束时间']}/>
173 173
                 )}
174 174
           </Form.Item>
175 175
           <Form.Item style={{position:'absolute',right:'38px'}}>

+ 17
- 18
src/pages/statistical/activity/sharePersonNum.jsx Näytä tiedosto

@@ -147,12 +147,12 @@ class SharePersonNum extends React.Component {
147 147
 
148 148
     if (props.location.query.queryDate) {
149 149
       console.log(queryDate, "props.location.query.queryDateprops.location.query.queryDate")
150
-      startDate = moment(props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss')+'.000Z';
151
-      endDate = moment(props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss')+'.999Z';
150
+      startDate = moment(props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss') + '.000Z';
151
+      endDate = moment(props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss') + '.999Z';
152 152
       console.log(startDate, endDate, "endDateendDateendDateendDateendDateendDate")
153 153
     } else {
154
-      startDate = moment(props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss')+'.000Z';
155
-      endDate = moment(props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss')+'.999Z';
154
+      startDate = moment(props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss') + '.000Z';
155
+      endDate = moment(props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss') + '.999Z';
156 156
     }
157 157
 
158 158
     console.log(startDate)
@@ -224,11 +224,11 @@ class SharePersonNum extends React.Component {
224 224
     activityType = this.props.location.query.activityType;
225 225
 
226 226
     if (this.props.location.query.queryDate) {
227
-      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss')+'.000Z';
228
-      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss')+'.999Z';
227
+      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss') + '.000Z';
228
+      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss') + '.999Z';
229 229
     } else {
230
-      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss')+'.000Z';
231
-      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss')+'.999Z';
230
+      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss') + '.000Z';
231
+      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss') + '.999Z';
232 232
     }
233 233
     this.setState({
234 234
       formData: {
@@ -297,6 +297,7 @@ class SharePersonNum extends React.Component {
297 297
 
298 298
     return (
299 299
       <>
300
+        <div align="right" style={{ marginBottom: '16px' }}><Button onClick={this.goback}>返回</Button></div>
300 301
         <div>
301 302
           <span style={{ marginLeft: '20px' }}>分享内容:{this.state.activityName}</span>
302 303
         </div>
@@ -323,23 +324,21 @@ class SharePersonNum extends React.Component {
323 324
             </Button>
324 325
             <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
325 326
           </Form.Item>
326
-        </Form>
327
-        <div>
328
-          <Button type="primary" style={{ float: 'right', margin: '20px 0', marginLeft: '20px', zIndex: 1 }} onClick={this.goback}>
329
-            返回
330
-            </Button>
331 327
           <AuthButton name="admin.statistical.activity.export" noRight={null}>
332
-            <Button type="primary" style={{ float: 'right', margin: '20px 0', zIndex: 1 }} onClick={this.exportActivityStats}>
328
+            <Button type="primary" style={{ float: 'right', zIndex: 1, marginTop: '25px' }} onClick={this.exportActivityStats}>
333 329
               导出
334 330
             </Button>
335 331
           </AuthButton>
332
+        </Form>
333
+        <div>
334
+
336 335
           <Table style={{ marginTop: '20px' }} dataSource={this.state.tableData} columns={columns} pagination={{ total: this.state.total }} onChange={this.handleTableChange} scroll={{ y: 500 }}></Table>
337 336
         </div>
338 337
         <Prompt message={location =>
339
-        location.pathname.startsWith("/statistical/activity")
340
-          ? true
341
-          : localStorage.removeItem("tabState")} />
342
-    </>
338
+          location.pathname.startsWith("/statistical/activity")
339
+            ? true
340
+            : localStorage.removeItem("tabState")} />
341
+      </>
343 342
     )
344 343
 
345 344
   }

+ 3
- 2
src/utils/request.js Näytä tiedosto

@@ -20,7 +20,7 @@ const codeMessage = {
20 20
   410: '请求的资源被永久删除,且不会再得到的。',
21 21
   422: '当创建一个对象时,发生一个验证错误。',
22 22
   500: '服务器发生错误,请检查服务器。',
23
-  502: '网关错误。',
23
+  502: '连接服务超时',
24 24
   503: '服务不可用,服务器暂时过载或维护。',
25 25
   504: '网关超时。',
26 26
 };
@@ -70,7 +70,8 @@ request.interceptors.response.use(async (response, options) => {
70 70
       const errorText = codeMessage[response.status] || response.statusText;
71 71
       const { status, url } = response;
72 72
       notification.error({
73
-        message: `请求错误 ${status}: ${url}`,
73
+        // message: `连接超时,请刷新或重新登录 ${status}: ${url}`,
74
+        message: `连接超时,请刷新或重新登录 ${status}: ${url}`,
74 75
         description: errorText,
75 76
       });
76 77
       throw new Error(response.statusText);