瀏覽代碼

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

傅行帆 5 年之前
父節點
當前提交
6ef6727a3d

+ 22
- 8
src/pages/activity/ActivityList.jsx 查看文件

7
 import SelectCity from '../../components/SelectButton/CitySelect'
7
 import SelectCity from '../../components/SelectButton/CitySelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
9
 import apis from '../../services/apis';
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
 const { Option } = Select;
13
 const { Option } = Select;
13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
96
       dataIndex: 'handle',
97
       dataIndex: 'handle',
97
       key: 'handle',
98
       key: 'handle',
98
       align: 'center',
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
           </Button>
244
           </Button>
233
         </Form.Item>
245
         </Form.Item>
234
       </Form>
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
       <Table dataSource={data.list} columns={columns} pagination={false}/>
250
       <Table dataSource={data.list} columns={columns} pagination={false}/>
237
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
251
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
238
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
252
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />

+ 0
- 2
src/pages/building/list/index.jsx 查看文件

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

+ 13
- 6
src/pages/carouselFigure/advertisingList.jsx 查看文件

7
 import SelectCity from '../../components/SelectButton/CitySelect'
7
 import SelectCity from '../../components/SelectButton/CitySelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
9
 import apis from '../../services/apis';
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
 const { Option } = Select;
13
 const { Option } = Select;
13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
80
       dataIndex: 'handle',
81
       dataIndex: 'handle',
81
       key: 'handle',
82
       key: 'handle',
82
       align: 'center',
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
           </Button>
206
           </Button>
202
         </Form.Item>
207
         </Form.Item>
203
       </Form>
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
       <Table dataSource={data.records} columns={columns} pagination={false}/>
212
       <Table dataSource={data.records} columns={columns} pagination={false}/>
206
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
213
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
207
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
214
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />

+ 13
- 6
src/pages/carouselFigure/carouselFigureList.jsx 查看文件

7
 import SelectCity from '../../components/SelectButton/CitySelect'
7
 import SelectCity from '../../components/SelectButton/CitySelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
9
 import apis from '../../services/apis';
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
 const { Option } = Select;
13
 const { Option } = Select;
13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
80
       dataIndex: 'handle',
81
       dataIndex: 'handle',
81
       key: 'handle',
82
       key: 'handle',
82
       align: 'center',
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
           </Button>
206
           </Button>
202
         </Form.Item>
207
         </Form.Item>
203
       </Form>
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
       <Table dataSource={data.records} columns={columns} pagination={false}/>
212
       <Table dataSource={data.records} columns={columns} pagination={false}/>
206
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
213
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
207
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
214
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />

+ 10
- 3
src/pages/channel/channelList.jsx 查看文件

4
 import channels from './channelList.less';
4
 import channels from './channelList.less';
5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
 import apis from '../../services/apis';
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
 const { Option } = Select;
10
 const { Option } = Select;
10
 
11
 
81
     dataIndex: '',
82
     dataIndex: '',
82
     key: '',
83
     key: '',
83
     align: 'center',
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
           {/* <Button onClick={() => reset() }>重置</Button> */}
175
           {/* <Button onClick={() => reset() }>重置</Button> */}
171
         </div>
176
         </div>
172
       </div>
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
       <Table dataSource={data.result.records} columns={columns} pagination={{ pageSize: 10, total: data.result.total, onChange }} />
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 查看文件

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

+ 0
- 2
src/pages/customer/independentList/index.jsx 查看文件

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

+ 0
- 2
src/pages/customer/recommendCustomer/index.jsx 查看文件

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

+ 0
- 2
src/pages/customer/report/index.jsx 查看文件

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

+ 3
- 3
src/pages/integralMall/GoodsList.jsx 查看文件

185
           )}
185
           )}
186
         </Form.Item>
186
         </Form.Item>
187
         <Form.Item>
187
         <Form.Item>
188
-          <AuthButton name="admin.taGoods.get" noRight={null}>
189
             <Button type="primary" htmlType="submit" className={styles.searchBtn}>
188
             <Button type="primary" htmlType="submit" className={styles.searchBtn}>
190
               搜索
189
               搜索
191
             </Button>
190
             </Button>
192
-          </AuthButton>
193
         </Form.Item>
191
         </Form.Item>
194
       </Form>
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
       <Table dataSource={data.records} columns={columns} pagination={false} />
196
       <Table dataSource={data.records} columns={columns} pagination={false} />
197
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
197
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
198
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
198
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />

+ 2
- 1
src/pages/integralMall/exchangeRecords.jsx 查看文件

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

+ 7
- 2
src/pages/integralMall/writeOff.jsx 查看文件

6
 import erweima from '../../assets/erweima.png';
6
 import erweima from '../../assets/erweima.png';
7
 import saoma from '../../assets/saoma.png';
7
 import saoma from '../../assets/saoma.png';
8
 import list from '../../assets/list.png';
8
 import list from '../../assets/list.png';
9
+import AuthButton from '@/components/AuthButton';
9
 
10
 
10
 const { TabPane } = Tabs;
11
 const { TabPane } = Tabs;
11
 function callback(key) {
12
 function callback(key) {
41
     const { visible, loading } = this.state;
42
     const { visible, loading } = this.state;
42
     return (
43
     return (
43
       <div>
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
         <Modal
48
         <Modal
46
           style={{ marginTop: '20vh' }}
49
           style={{ marginTop: '20vh' }}
47
           visible={visible}
50
           visible={visible}
142
           </Row>
145
           </Row>
143
           <div style={{ margin: '110px auto', display: 'block', textAlign: 'center' }}>
146
           <div style={{ margin: '110px auto', display: 'block', textAlign: 'center' }}>
144
             <Input placeholder="请输入手机号" style={{ width: '200px' }} onChange={changeTel} />
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
           </div>
151
           </div>
147
         </TabPane>
152
         </TabPane>
148
       </Tabs>,
153
       </Tabs>,

+ 27
- 20
src/pages/news/list/NewsList.jsx 查看文件

9
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
9
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
10
 import SelectCity from '../../../components/SelectButton/CitySelect'
10
 import SelectCity from '../../../components/SelectButton/CitySelect'
11
 
11
 
12
+import AuthButton from '@/components/AuthButton';
13
+
12
 
14
 
13
 const { Option } = Select;
15
 const { Option } = Select;
14
 // eslint-disable-next-line @typescript-eslint/no-unused-vars
16
 // eslint-disable-next-line @typescript-eslint/no-unused-vars
167
         cover={<img alt="example" src={data.newsImg} style={{ borderRadius: '12px 0 0 12px', width: '260px', height: '253px' }}></img>}
169
         cover={<img alt="example" src={data.newsImg} style={{ borderRadius: '12px 0 0 12px', width: '260px', height: '253px' }}></img>}
168
         bodyStyle={{ padding: '10px 20px' }}
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
           </span>
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
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
191
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
188
-        </span>
192
+            </span>
193
+        </AuthButton>
189
         <div style={{ position: 'absolute', left: '260px', top: '0px', padding: '20px' }}>
194
         <div style={{ position: 'absolute', left: '260px', top: '0px', padding: '20px' }}>
190
           <p style={{
195
           <p style={{
191
             fontSize: ' 0.11rem', color: '#333', fontWeight: '600', marginBottom: '10px', overflow: 'hidden',
196
             fontSize: ' 0.11rem', color: '#333', fontWeight: '600', marginBottom: '10px', overflow: 'hidden',
273
           </Button>
278
           </Button>
274
         </Form.Item>
279
         </Form.Item>
275
       </Form>
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
       <Row style={{ padding: ' 0 10px' }}>
288
       <Row style={{ padding: ' 0 10px' }}>

+ 19
- 4
src/pages/news/type/NewsType.jsx 查看文件

3
 import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
 import styles from '../../style/GoodsList.less';
4
 import styles from '../../style/GoodsList.less';
5
 import router from 'umi/router';
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
 import request from '../../../utils/request'
9
 import request from '../../../utils/request'
9
 
10
 
99
       dataIndex: 'handle',
100
       dataIndex: 'handle',
100
       key: 'handle',
101
       key: 'handle',
101
       align: 'center',
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
           )}
131
           )}
119
         </Form.Item>
132
         </Form.Item>
120
       </Form>
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
       <Table dataSource={data.records} columns={columns} pagination={false} />
137
       <Table dataSource={data.records} columns={columns} pagination={false} />
123
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
138
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
124
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
139
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />

+ 17
- 8
src/pages/system/housingPolicy.jsx 查看文件

7
 import SelectCity from '../../components/SelectButton/CitySelect'
7
 import SelectCity from '../../components/SelectButton/CitySelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
9
 import apis from '../../services/apis';
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
 const { Option } = Select;
13
 const { Option } = Select;
13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
84
       dataIndex: 'handle',
85
       dataIndex: 'handle',
85
       key: 'handle',
86
       key: 'handle',
86
       align: 'center',
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
           </Button>
181
           </Button>
175
         </Form.Item>
182
         </Form.Item>
176
       </Form>
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
       <Table dataSource={data.records} columns={columns} pagination={false}/>
187
       <Table dataSource={data.records} columns={columns} pagination={false}/>
179
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
188
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
180
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
189
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />

+ 5
- 2
src/pages/system/intention.jsx 查看文件

9
 import Wangedit from '../../components/Wangedit/Wangedit'
9
 import Wangedit from '../../components/Wangedit/Wangedit'
10
 import apis from '../../services/apis';
10
 import apis from '../../services/apis';
11
 import request from '../../utils/request'
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
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15
 /**
16
 /**
78
               </Row>
79
               </Row>
79
     })}
80
     })}
80
     <Row>
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
     </Row>
85
     </Row>
83
     </>
86
     </>
84
   );
87
   );

+ 5
- 2
src/pages/system/report.jsx 查看文件

8
 import XForm, { FieldTypes } from '../../components/XForm';
8
 import XForm, { FieldTypes } from '../../components/XForm';
9
 import Wangedit from '../../components/Wangedit/Wangedit'
9
 import Wangedit from '../../components/Wangedit/Wangedit'
10
 import apis from '../../services/apis';
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
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
 /**
15
 /**
56
       <Row>
57
       <Row>
57
         <Checkbox.Group options={data} value={checkData} onChange={onChange} />
58
         <Checkbox.Group options={data} value={checkData} onChange={onChange} />
58
       </Row>
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 查看文件

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