Browse Source

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

傅行帆 5 years ago
parent
commit
6ef6727a3d

+ 22
- 8
src/pages/activity/ActivityList.jsx View File

@@ -7,7 +7,8 @@ import moment from 'moment';
7 7
 import SelectCity from '../../components/SelectButton/CitySelect'
8 8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
9 9
 import apis from '../../services/apis';
10
-import request from '../../utils/request'
10
+import request from '../../utils/request';
11
+import AuthButton from '@/components/AuthButton';
11 12
 
12 13
 const { Option } = Select;
13 14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
@@ -96,12 +97,23 @@ const toEditGoods = (dynamicId) => () => {
96 97
       dataIndex: 'handle',
97 98
       key: 'handle',
98 99
       align: 'center',
99
-      render: (x,row) => <><span style={{ color: '#1990FF'}} onClick={getSignList.bind(this, row.dynamicId)}>{row.isEnlist == '1' || row.isEnlist == '2' ? "报名记录" : ""}<Icon type="snippets" className={styles.shoppingCart} /></span>
100
-                           <span style={{ color: '#1990FF' }} onClick={sendOrPublicDynamic.bind(this,row)}>{ row.status === 1 ? '取消发布' : '发布' }<Icon type="close-circle" className={styles.edit} /></span>
101
-                           <span style={{ color: '#1990FF' }} onClick={finishDynamic.bind(this,row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
102
-                           <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={topDynamic(row)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
103
-                           <span style={{ color: '#FF925C' }} onClick={toEditGoods(row.dynamicId)}>编辑<Icon type="form" className={styles.edit} /></span>
104
-                         </>
100
+      render: (x,row) => (
101
+        <>
102
+          <AuthButton name="admin.SignList.get" noRight={null}>
103
+            <span style={{ color: '#1990FF'}} onClick={getSignList.bind(this, row.dynamicId)}>{row.isEnlist == '1' || row.isEnlist == '2' ? "报名记录" : ""}<Icon type="snippets" className={styles.shoppingCart} /></span>
104
+          </AuthButton>
105
+          <AuthButton name="admin.buildingDynamic.send.dynamicId.put" noRight={null}>
106
+            <span style={{ color: '#1990FF' }} onClick={sendOrPublicDynamic.bind(this,row)}>{ row.status === 1 ? '取消发布' : '发布' }<Icon type="close-circle" className={styles.edit} /></span>
107
+          </AuthButton>
108
+          <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
109
+            <span style={{ color: '#1990FF' }} onClick={finishDynamic.bind(this,row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
110
+          </AuthButton>
111
+          <AuthButton name="admin.buildingDynamic.update.put" noRight={null}>
112
+            <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={topDynamic(row)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
113
+            <span style={{ color: '#FF925C' }} onClick={toEditGoods(row.dynamicId)}>编辑<Icon type="form" className={styles.edit} /></span>
114
+          </AuthButton>
115
+        </>
116
+      )
105 117
     },
106 118
   ];
107 119
   
@@ -232,7 +244,9 @@ const handleSubmit = (e, props) => {
232 244
           </Button>
233 245
         </Form.Item>
234 246
       </Form>
235
-      <Button type="danger" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>
247
+      <AuthButton name="admin.buildingDynamic.add.post" noRight={null}>
248
+        <Button type="danger" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>
249
+      </AuthButton>
236 250
       <Table dataSource={data.list} columns={columns} pagination={false}/>
237 251
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
238 252
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />

+ 0
- 2
src/pages/building/list/index.jsx View File

@@ -285,11 +285,9 @@ function body(props) {
285 285
           )}
286 286
         </Form.Item>
287 287
         <Form.Item>
288
-          <AuthButton name="admin.buildinglist.get" noRight={null}>
289 288
             <Button type="primary" htmlType="submit">
290 289
               搜索
291 290
             </Button>
292
-          </AuthButton>
293 291
         </Form.Item>
294 292
       </Form>
295 293
 

+ 13
- 6
src/pages/carouselFigure/advertisingList.jsx View File

@@ -7,7 +7,8 @@ import moment from 'moment';
7 7
 import SelectCity from '../../components/SelectButton/CitySelect'
8 8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
9 9
 import apis from '../../services/apis';
10
-import request from '../../utils/request'
10
+import request from '../../utils/request';
11
+import AuthButton from '@/components/AuthButton';
11 12
 
12 13
 const { Option } = Select;
13 14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
@@ -80,10 +81,14 @@ const toEdit = (contentId) => () => {
80 81
       dataIndex: 'handle',
81 82
       key: 'handle',
82 83
       align: 'center',
83
-      render: (x,row) => <>
84
-                           <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={changeStatus(row)}>{ row.status === 1 ? '禁用' : '启用' }<Icon type="vertical-align-top" className={styles.edit} /></span>
85
-                           <span style={{ color: '#FF925C' }} onClick={toEdit(row.contentId)}>编辑<Icon type="form" className={styles.edit} /></span>
86
-                         </>
84
+      render: (x,row) => (
85
+        <>
86
+          <AuthButton name="admin.extendContent.id.put" noRight={null}>
87
+            <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={changeStatus(row)}>{ row.status === 1 ? '禁用' : '启用' }<Icon type="vertical-align-top" className={styles.edit} /></span>
88
+            <span style={{ color: '#FF925C' }} onClick={toEdit(row.contentId)}>编辑<Icon type="form" className={styles.edit} /></span>
89
+          </AuthButton>
90
+        </>
91
+      )
87 92
     },
88 93
   ];
89 94
   
@@ -201,7 +206,9 @@ const handleSubmit = (e, props) => {
201 206
           </Button>
202 207
         </Form.Item>
203 208
       </Form>
204
-      <Button type="danger" className={styles.addBtn} onClick={toEdit()}>新增</Button>
209
+      <AuthButton name="admin.extendContent.post" noRight={null}>
210
+        <Button type="danger" className={styles.addBtn} onClick={toEdit()}>新增</Button>
211
+      </AuthButton>
205 212
       <Table dataSource={data.records} columns={columns} pagination={false}/>
206 213
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
207 214
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />

+ 13
- 6
src/pages/carouselFigure/carouselFigureList.jsx View File

@@ -7,7 +7,8 @@ import moment from 'moment';
7 7
 import SelectCity from '../../components/SelectButton/CitySelect'
8 8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
9 9
 import apis from '../../services/apis';
10
-import request from '../../utils/request'
10
+import request from '../../utils/request';
11
+import AuthButton from '@/components/AuthButton';
11 12
 
12 13
 const { Option } = Select;
13 14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
@@ -80,10 +81,14 @@ const toEditCarouse = (contentId) => () => {
80 81
       dataIndex: 'handle',
81 82
       key: 'handle',
82 83
       align: 'center',
83
-      render: (x,row) => <>
84
-                           <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={changeStatus(row)}>{ row.status === 1 ? '禁用' : '启用' }<Icon type="vertical-align-top" className={styles.edit} /></span>
85
-                           <span style={{ color: '#FF925C' }} onClick={toEditCarouse(row.contentId)}>编辑<Icon type="form" className={styles.edit} /></span>
86
-                         </>
84
+      render: (x,row) => (
85
+        <>
86
+          <AuthButton name="admin.extendContent.id.put" noRight={null}>
87
+            <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={changeStatus(row)}>{ row.status === 1 ? '禁用' : '启用' }<Icon type="vertical-align-top" className={styles.edit} /></span>
88
+            <span style={{ color: '#FF925C' }} onClick={toEditCarouse(row.contentId)}>编辑<Icon type="form" className={styles.edit} /></span>
89
+          </AuthButton>
90
+        </>
91
+      )
87 92
     },
88 93
   ];
89 94
   
@@ -201,7 +206,9 @@ const handleSubmit = (e, props) => {
201 206
           </Button>
202 207
         </Form.Item>
203 208
       </Form>
204
-      <Button type="danger" className={styles.addBtn} onClick={toEditCarouse()}>新增</Button>
209
+      <AuthButton name="admin.extendContent.post" noRight={null}>
210
+        <Button type="danger" className={styles.addBtn} onClick={toEditCarouse()}>新增</Button>
211
+      </AuthButton>
205 212
       <Table dataSource={data.records} columns={columns} pagination={false}/>
206 213
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
207 214
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />

+ 10
- 3
src/pages/channel/channelList.jsx View File

@@ -4,7 +4,8 @@ import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import channels from './channelList.less';
5 5
 import router from 'umi/router';
6 6
 import apis from '../../services/apis';
7
-import request from '../../utils/request'
7
+import request from '../../utils/request';
8
+import AuthButton from '@/components/AuthButton';
8 9
 
9 10
 const { Option } = Select;
10 11
 
@@ -81,7 +82,11 @@ const columns = [
81 82
     dataIndex: '',
82 83
     key: '',
83 84
     align: 'center',
84
-    render: (text, record) => <a style={{ color: '#66B3FF' }} onClick={() => toedit(record.channelId)} >编辑</a>,
85
+    render: (text, record) => (
86
+      <AuthButton name="admin.channel.id.put" noRight={null}>
87
+        <a style={{ color: '#66B3FF' }} onClick={() => toedit(record.channelId)} >编辑</a>
88
+      </AuthButton>
89
+    )
85 90
   },
86 91
 ];
87 92
 
@@ -170,7 +175,9 @@ const header = props => {
170 175
           {/* <Button onClick={() => reset() }>重置</Button> */}
171 176
         </div>
172 177
       </div>
173
-      <Button type="danger" onClick={toAdd} className={channels.about} >新增</Button>
178
+      <AuthButton name="admin.channel.post" noRight={null}>
179
+        <Button type="danger" onClick={toAdd} className={channels.about} >新增</Button>
180
+      </AuthButton>
174 181
       <Table dataSource={data.result.records} columns={columns} pagination={{ pageSize: 10, total: data.result.total, onChange }} />
175 182
     </>
176 183
   )

+ 0
- 2
src/pages/customer/customerlist/index.jsx View File

@@ -254,11 +254,9 @@ function body(props) {
254 254
           )}
255 255
         </Form.Item>
256 256
         <Form.Item>
257
-          <AuthButton name="admin.customer.recommend.get" noRight={null}>
258 257
             <Button type="primary" htmlType="submit" >
259 258
               查询
260 259
             </Button>
261
-          </AuthButton>
262 260
         </Form.Item>
263 261
       </Form>
264 262
 

+ 0
- 2
src/pages/customer/independentList/index.jsx View File

@@ -410,11 +410,9 @@ function body(props) {
410 410
           )}
411 411
         </Form.Item>
412 412
         <Form.Item>
413
-          <AuthButton name="admin.customer.agents.get" noRight={null}>
414 413
             <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
415 414
               搜索
416 415
             </Button>
417
-          </AuthButton>
418 416
         </Form.Item>
419 417
       </Form>
420 418
 

+ 0
- 2
src/pages/customer/recommendCustomer/index.jsx View File

@@ -179,11 +179,9 @@ function body(props) {
179 179
           )}
180 180
         </Form.Item>
181 181
         <Form.Item>
182
-          <AuthButton name="admin.customer.recommend.recommender.get" noRight={null}>
183 182
             <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
184 183
               搜索
185 184
             </Button>
186
-          </AuthButton>
187 185
         </Form.Item>
188 186
       </Form>
189 187
 

+ 0
- 2
src/pages/customer/report/index.jsx View File

@@ -154,11 +154,9 @@ function body(props) {
154 154
           )}
155 155
         </Form.Item>
156 156
         <Form.Item>
157
-          <AuthButton name="admin.customer.recommend.report.get" noRight={null}>
158 157
             <Button type="primary" htmlType="submit">
159 158
               搜索
160 159
             </Button>
161
-          </AuthButton>
162 160
         </Form.Item>
163 161
       </Form>
164 162
       <Table style={{marginTop:'40px'}} dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />

+ 3
- 3
src/pages/integralMall/GoodsList.jsx View File

@@ -185,14 +185,14 @@ function header(props) {
185 185
           )}
186 186
         </Form.Item>
187 187
         <Form.Item>
188
-          <AuthButton name="admin.taGoods.get" noRight={null}>
189 188
             <Button type="primary" htmlType="submit" className={styles.searchBtn}>
190 189
               搜索
191 190
             </Button>
192
-          </AuthButton>
193 191
         </Form.Item>
194 192
       </Form>
195
-      <Button type="danger" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>
193
+      <AuthButton name="admin.taGoods.add.post" noRight={null}>
194
+        <Button type="danger" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>
195
+      </AuthButton>
196 196
       <Table dataSource={data.records} columns={columns} pagination={false} />
197 197
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
198 198
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />

+ 2
- 1
src/pages/integralMall/exchangeRecords.jsx View File

@@ -7,6 +7,7 @@ import moment from 'moment';
7 7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8 8
 import apis from '../../services/apis';
9 9
 import request from '../../utils/request'
10
+import AuthButton from '@/components/AuthButton';
10 11
 
11 12
 /**
12 13
   @param {*} props
@@ -182,7 +183,7 @@ function record(props) {
182 183
           <Form.Item>
183 184
             <Button type="primary" htmlType="submit" className={styles.searchBtn}>
184 185
               搜索
185
-          </Button>
186
+            </Button>
186 187
           </Form.Item>
187 188
         </div>
188 189
       </Form>

+ 7
- 2
src/pages/integralMall/writeOff.jsx View File

@@ -6,6 +6,7 @@ import router from 'umi/router';
6 6
 import erweima from '../../assets/erweima.png';
7 7
 import saoma from '../../assets/saoma.png';
8 8
 import list from '../../assets/list.png';
9
+import AuthButton from '@/components/AuthButton';
9 10
 
10 11
 const { TabPane } = Tabs;
11 12
 function callback(key) {
@@ -41,7 +42,9 @@ class Dialog extends React.Component {
41 42
     const { visible, loading } = this.state;
42 43
     return (
43 44
       <div>
44
-        <Button type="primary" onClick={this.showModal} style={{ margin: '80px auto', display: 'block', padding: '6px 46px', backgroundColor: '#EA2323', border: 'none' }}>立即核销</Button>
45
+        <AuthButton name="admin.taPointsExchange.recId.put" noRight={null}>
46
+          <Button type="primary" onClick={this.showModal} style={{ margin: '80px auto', display: 'block', padding: '6px 46px', backgroundColor: '#EA2323', border: 'none' }}>立即核销</Button>
47
+        </AuthButton>
45 48
         <Modal
46 49
           style={{ marginTop: '20vh' }}
47 50
           visible={visible}
@@ -142,7 +145,9 @@ function header(props) {
142 145
           </Row>
143 146
           <div style={{ margin: '110px auto', display: 'block', textAlign: 'center' }}>
144 147
             <Input placeholder="请输入手机号" style={{ width: '200px' }} onChange={changeTel} />
145
-            <Button type="primary" style={{ marginLeft: '10px', padding: '6px 46px', backgroundColor: '#EA2323', border: 'none' }} onClick={verifyTel}>立即核销</Button>
148
+            <AuthButton name="admin.taPointsExchange.recId.put" noRight={null}>
149
+              <Button type="primary" style={{ marginLeft: '10px', padding: '6px 46px', backgroundColor: '#EA2323', border: 'none' }} onClick={verifyTel}>立即核销</Button>
150
+            </AuthButton>
146 151
           </div>
147 152
         </TabPane>
148 153
       </Tabs>,

+ 27
- 20
src/pages/news/list/NewsList.jsx View File

@@ -9,6 +9,8 @@ import NewsTypeSelect from '../../../components/SelectButton/NewTypeSelect'
9 9
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
10 10
 import SelectCity from '../../../components/SelectButton/CitySelect'
11 11
 
12
+import AuthButton from '@/components/AuthButton';
13
+
12 14
 
13 15
 const { Option } = Select;
14 16
 // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -167,25 +169,28 @@ function body(props) {
167 169
         cover={<img alt="example" src={data.newsImg} style={{ borderRadius: '12px 0 0 12px', width: '260px', height: '253px' }}></img>}
168 170
         bodyStyle={{ padding: '10px 20px' }}
169 171
       >
170
-        <span style={{ position: 'absolute', right: '20px', top: '20px', fontSize: ' 0.11rem', color: '#FF7E48' }} onClick={toEditList(data.newsId)}>
171
-          编辑
172
-                <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
173
-        </span>
174
-        {data.newsStatus === 0 ?
175
-          <span style={{ position: 'absolute', left: '280px', bottom: ' 0.11rem', fontSize: ' 0.11rem', color: '#FF7E48' }} onClick={cancelRelease.bind(this, data.newsId, 1, data.buildingId, data.newsType.newsTypeId)}>
176
-            取消发布
177
-              <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
178
-          </span> :
179
-          <span style={{ position: 'absolute', left: '280px', bottom: ' 0.11rem', fontSize: ' 0.11rem', color: '#FF7E48' ,zIndex:'1'}} onClick={cancelRelease.bind(this, data.newsId, 0, data.buildingId, data.newsType.newsTypeId)}>
180
-            发布
181
-              <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
172
+        <AuthButton name="admin.taNews.id.put" noRight={null}>
173
+          <span style={{ position: 'absolute', right: '20px', top: '20px', fontSize: ' 0.11rem', color: '#FF7E48' }} onClick={toEditList(data.newsId)}>
174
+            编辑
175
+                  <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
182 176
           </span>
183
-        }
184
-
185
-        <span style={{ position: 'absolute', right: '20px', bottom: ' 0.11rem', fontSize: ' 0.11rem', color: '#FF7E48' }} onClick={changeNewsListStatus(data.newsId)}>
186
-          删除
177
+          {data.newsStatus === 0 ?
178
+            <span style={{ position: 'absolute', left: '280px', bottom: ' 0.11rem', fontSize: ' 0.11rem', color: '#FF7E48' }} onClick={cancelRelease.bind(this, data.newsId, 1, data.buildingId, data.newsType.newsTypeId)}>
179
+              取消发布
180
+                <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
181
+            </span> :
182
+            <span style={{ position: 'absolute', left: '280px', bottom: ' 0.11rem', fontSize: ' 0.11rem', color: '#FF7E48' }} onClick={cancelRelease.bind(this, data.newsId, 0, data.buildingId, data.newsType.newsTypeId)}>
183
+              发布
184
+                <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
185
+            </span>
186
+          }
187
+        </AuthButton>
188
+        <AuthButton name="admin.taNews.id.delete" noRight={null}>
189
+            <span style={{ position: 'absolute', right: '20px', bottom: ' 0.11rem', fontSize: ' 0.11rem', color: '#FF7E48' }} onClick={changeNewsListStatus(data.newsId)}>
190
+                  删除
187 191
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
188
-        </span>
192
+            </span>
193
+        </AuthButton>
189 194
         <div style={{ position: 'absolute', left: '260px', top: '0px', padding: '20px' }}>
190 195
           <p style={{
191 196
             fontSize: ' 0.11rem', color: '#333', fontWeight: '600', marginBottom: '10px', overflow: 'hidden',
@@ -273,9 +278,11 @@ function body(props) {
273 278
           </Button>
274 279
         </Form.Item>
275 280
       </Form>
276
-      <Button type="danger" style={{ padding: '0 40px', margin: '20px 0' }} onClick={toEditList()}>
277
-        新增
278
-      </Button>
281
+      <AuthButton name="admin.taNews.post" noRight={null}>
282
+        <Button type="danger" style={{ padding: '0 40px', margin: '20px 0' }} onClick={toEditList()}>
283
+          新增
284
+        </Button>
285
+      </AuthButton>
279 286
 
280 287
       {/* 卡片内容,显示楼盘项目  */}
281 288
       <Row style={{ padding: ' 0 10px' }}>

+ 19
- 4
src/pages/news/type/NewsType.jsx View File

@@ -3,7 +3,8 @@ import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagina
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import styles from '../../style/GoodsList.less';
5 5
 import router from 'umi/router';
6
-import BuildSelect from '../../../components/SelectButton/BuildSelect'
6
+import BuildSelect from '../../../components/SelectButton/BuildSelect';
7
+import AuthButton from '@/components/AuthButton';
7 8
 
8 9
 import request from '../../../utils/request'
9 10
 
@@ -99,8 +100,20 @@ function header(props) {
99 100
       dataIndex: 'handle',
100 101
       key: 'handle',
101 102
       align: 'center',
102
-      render: (x, row) => <><span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeNewsStatus(row, row.newsTypeId)}>{row.status == 1 ? '删除' : '上架'}<Icon type="shopping-cart" className={styles.shoppingCart} />
103
-                            </span><span style={{ color: '#FF925C' }} onClick={toEditNews(row.newsTypeId)}>编辑<Icon type="form" className={styles.edit} /></span></>,
103
+      render: (x, row) => (
104
+        <>
105
+          <AuthButton name="admin.taNewsType.id.delete" noRight={null}>
106
+            <span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeNewsStatus(row, row.newsTypeId)}>
107
+              {row.status == 1 ? '删除' : '上架'}<Icon type="shopping-cart" className={styles.shoppingCart} />
108
+            </span>
109
+          </AuthButton>
110
+          <AuthButton name="admin.taNewsType.id.put" noRight={null}>
111
+            <span style={{ color: '#FF925C' }} onClick={toEditNews(row.newsTypeId)}>
112
+              编辑<Icon type="form" className={styles.edit} />
113
+            </span>
114
+          </AuthButton>
115
+        </>
116
+      )
104 117
     },
105 118
   ];
106 119
 
@@ -118,7 +131,9 @@ function header(props) {
118 131
           )}
119 132
         </Form.Item>
120 133
       </Form>
121
-      <Button type="primary" className={styles.addBtn} onClick={toEditNews()}>新增</Button>
134
+      <AuthButton name="admin.taNewsType.post" noRight={null}>
135
+        <Button type="primary" className={styles.addBtn} onClick={toEditNews()}>新增</Button>
136
+      </AuthButton>
122 137
       <Table dataSource={data.records} columns={columns} pagination={false} />
123 138
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
124 139
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />

+ 17
- 8
src/pages/system/housingPolicy.jsx View File

@@ -7,7 +7,8 @@ import moment from 'moment';
7 7
 import SelectCity from '../../components/SelectButton/CitySelect'
8 8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
9 9
 import apis from '../../services/apis';
10
-import request from '../../utils/request'
10
+import request from '../../utils/request';
11
+import AuthButton from '@/components/AuthButton';
11 12
 
12 13
 const { Option } = Select;
13 14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
@@ -84,12 +85,18 @@ const toEditPolicy = (policyId) => () => {
84 85
       dataIndex: 'handle',
85 86
       key: 'handle',
86 87
       align: 'center',
87
-      render: (x,row) => <>
88
-                           <span style={{ color: '#1990FF' }} onClick={publicOrNoPublic(row)}>{ row.publishStatus === 0 ? '发布' : '取消发布' }<Icon type="close-circle" className={styles.edit} /></span>
89
-                           <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={topPolicy(row)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
90
-                           <span style={{ color: '#FF925C' }} onClick={toEditPolicy(row.policyId)}>编辑<Icon type="form" className={styles.edit} /></span>
91
-                           <span style={{ color: '#FF925C' }} onClick={deletePolicy(row.policyId)}>删除<Icon type="form" className={styles.edit} /></span>
92
-                         </>
88
+      render: (x,row) => (
89
+        <>
90
+          <AuthButton name="admin.taPolicy.id.put" noRight={null}>
91
+            <span style={{ color: '#1990FF' }} onClick={publicOrNoPublic(row)}>{ row.publishStatus === 0 ? '发布' : '取消发布' }<Icon type="close-circle" className={styles.edit} /></span>
92
+            <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={topPolicy(row)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
93
+            <span style={{ color: '#FF925C' }} onClick={toEditPolicy(row.policyId)}>编辑<Icon type="form" className={styles.edit} /></span>
94
+          </AuthButton>
95
+          <AuthButton name="admin.taPolicy.id.delete" noRight={null}>
96
+            <span style={{ color: '#FF925C' }} onClick={deletePolicy(row.policyId)}>删除<Icon type="form" className={styles.edit} /></span>
97
+          </AuthButton>
98
+        </>
99
+      )
93 100
     },
94 101
   ];
95 102
   
@@ -174,7 +181,9 @@ const handleSubmit = (e, props) => {
174 181
           </Button>
175 182
         </Form.Item>
176 183
       </Form>
177
-      <Button type="primary" className={styles.addBtn} onClick={toEditPolicy()}>新增</Button>
184
+      <AuthButton name="admin.taPolicy.post" noRight={null}>
185
+        <Button type="primary" className={styles.addBtn} onClick={toEditPolicy()}>新增</Button>
186
+      </AuthButton>
178 187
       <Table dataSource={data.records} columns={columns} pagination={false}/>
179 188
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
180 189
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />

+ 5
- 2
src/pages/system/intention.jsx View File

@@ -9,7 +9,8 @@ import XForm, { FieldTypes } from '../../components/XForm';
9 9
 import Wangedit from '../../components/Wangedit/Wangedit'
10 10
 import apis from '../../services/apis';
11 11
 import request from '../../utils/request'
12
-import SelectCity from '../../components/SelectButton/CitySelect'
12
+import SelectCity from '../../components/SelectButton/CitySelect';
13
+import AuthButton from '@/components/AuthButton';
13 14
 
14 15
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15 16
 /**
@@ -78,7 +79,9 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
78 79
               </Row>
79 80
     })}
80 81
     <Row>
81
-      <Button type="primary" className={styles.searchBtn} onClick={submitValue}>确定</Button>
82
+      <AuthButton name="admin.taBuildingIntentionAddOrUpdate.buildingId.post" noRight={null}>
83
+        <Button type="primary" className={styles.searchBtn} onClick={submitValue}>确定</Button>
84
+      </AuthButton>
82 85
     </Row>
83 86
     </>
84 87
   );

+ 5
- 2
src/pages/system/report.jsx View File

@@ -8,7 +8,8 @@ import BuildSelect from '../../components/SelectButton/BuildSelect'
8 8
 import XForm, { FieldTypes } from '../../components/XForm';
9 9
 import Wangedit from '../../components/Wangedit/Wangedit'
10 10
 import apis from '../../services/apis';
11
-import request from '../../utils/request'
11
+import request from '../../utils/request';
12
+import AuthButton from '@/components/AuthButton';
12 13
 
13 14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14 15
 /**
@@ -56,7 +57,9 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
56 57
       <Row>
57 58
         <Checkbox.Group options={data} value={checkData} onChange={onChange} />
58 59
       </Row>
59
-      <Button type="primary" className={styles.searchBtn} onClick={saveCheckedReport}>提交</Button>
60
+      <AuthButton name="admin.taBuildingReport.add.post" noRight={null}>
61
+        <Button type="primary" className={styles.searchBtn} onClick={saveCheckedReport}>提交</Button>
62
+      </AuthButton>
60 63
     </>
61 64
   );
62 65
  }

+ 25
- 18
src/services/apis.js View File

@@ -26,7 +26,7 @@ export default {
26 26
     signout: {
27 27
       method: 'POST',
28 28
       url: `${prefix}/taUser/signout`,
29
-      logout: true
29
+      logout: true,
30 30
     },
31 31
   },
32 32
   building: {
@@ -195,43 +195,50 @@ export default {
195 195
   indexEcharts: {
196 196
     userResource: {
197 197
       method: 'GET',
198
-      url: `${prefix}/selectUserResource`
198
+      url: `${prefix}/selectUserResource`,
199
+      action: 'userStatistics',
199 200
     },
200 201
     userBehavior: {
201 202
       summary: {
202 203
         method: 'GET',
203
-        url: `${prefix}/selectUserBehavior`
204
+        url: `${prefix}/selectUserBehavior`,
205
+        action: 'userBehaviorStatistics',
204 206
       },
205 207
       profile: {
206 208
         method: 'GET',
207
-        url: `${prefix}/selectEventAll`
209
+        url: `${prefix}/selectEventAll`,
210
+        action: 'behaviorIncident',
208 211
       },
209 212
     },
210 213
     userActive: {
211 214
       method: 'GET',
212
-      url: `${prefix}/selectActiveUserCount`
215
+      url: `${prefix}/selectActiveUserCount`,
216
+      action: 'selectActiveUserCount',
213 217
     },
214 218
     userSex: {
215 219
       method: 'GET',
216
-      url: `${prefix}/selectSexUser`
220
+      url: `${prefix}/selectSexUser`,
221
+      action: 'selectSexUser',
217 222
     },
218 223
     newUser: {
219 224
       method: 'GET',
220
-      url: `${prefix}/selectNewsUserCount`
225
+      url: `${prefix}/selectNewsUserCount`,
226
+      action: 'selectNewsUserCount',
221 227
     },
222 228
     userConversion: {
223 229
       method: 'GET',
224
-      url: `${prefix}/selectConversion`
230
+      url: `${prefix}/selectConversion`,
231
+      action: 'selectConversion',
225 232
     },
226 233
     intentionUsers: {
227 234
       method: 'GET',
228
-      url: `${prefix}/selectIntentionUser`
235
+      url: `${prefix}/selectIntentionUser`,
236
+      action: 'selectIntentionUser',
229 237
     },
230
-
231 238
     userCity: {
232
-      method:'get',
239
+      method: 'get',
233 240
       url: `${prefix}/selectCityUser`,
234
-      action: 'admin.selectCityUser.get'
241
+      action: 'admin.selectCityUser.get',
235 242
     },
236 243
 
237 244
   },
@@ -249,17 +256,17 @@ export default {
249 256
       cancel: {
250 257
         method: 'PUT',
251 258
         url: `${prefix}/buildingDynamic/cancel/:id`,
252
-        action: 'admin.buildingDynamic.cancel.dynamicId.put'
259
+        action: 'admin.buildingDynamic.cancel.dynamicId.put',
253 260
       },
254 261
       send: {
255 262
         url: `${prefix}/buildingDynamic/send/:id`,
256 263
         method: 'PUT',
257
-        action: 'admin.buildingDynamic.send.dynamicId.put'
264
+        action: 'admin.buildingDynamic.send.dynamicId.put',
258 265
       },
259 266
       finish: {
260 267
         url: `${prefix}/buildingDynamic/finish`,
261 268
         method: 'PUT',
262
-        action: 'admin.buildingDynamic.finish.put'
269
+        action: 'admin.buildingDynamic.finish.put',
263 270
       },
264 271
       details: {
265 272
         url: `${prefix}/buildingDynamic/Details`,
@@ -357,7 +364,7 @@ export default {
357 364
       url: `${prefix}/taPointsExchange/change`,
358 365
       method: 'PUT',
359 366
       action: 'admin.taPointsExchange.change.put',
360
-    }
367
+    },
361 368
   },
362 369
   carsuseFigure: {
363 370
     extendContent: {
@@ -384,7 +391,7 @@ export default {
384 391
       url: `${prefix}/extendContent`,
385 392
       method: 'POST',
386 393
       action: 'admin.extendContent.post',
387
-    }
394
+    },
388 395
   },
389 396
   system: {
390 397
     taPolicy: {
@@ -441,7 +448,7 @@ export default {
441 448
       url: `${prefix}/taBuildingReport/add`,
442 449
       method: 'POST',
443 450
       action: 'admin.taBuildingReport.add.post',
444
-    }
451
+    },
445 452
   },
446 453
   staff: {
447 454
     taUser: {