dingxin il y a 5 ans
Parent
révision
67b0cbce8e

+ 16
- 8
src/pages/building/list/index.jsx Voir le fichier

@@ -111,10 +111,12 @@ function CartBody(props) {
111 111
       <p className={Styles.cardText}>
112 112
         <span className={Styles.title}>楼盘编号</span>
113 113
         <span >:{data.code}</span>
114
-        <span className={Styles.ediText} onClick={() => toEdi(data)}>
115
-          编辑
116
-                <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
117
-        </span>
114
+        <AuthButton name="admin.building.update.put" noRight={null}>
115
+          <span className={Styles.ediText} onClick={() => toEdi(data)}>
116
+            编辑
117
+                  <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
118
+          </span>
119
+        </AuthButton>
118 120
       </p>
119 121
       <p className={Styles.cardText}>
120 122
         <span className={Styles.title}>楼盘名称</span>
@@ -139,17 +141,21 @@ function CartBody(props) {
139 141
         <span >:{data.createDate}</span>
140 142
       </p>
141 143
       <p style={{ margin: '15px 0', position: 'relative', fontSize: '0.11rem' }}>
144
+      <AuthButton name="admin.building.update.status.put" noRight={null}>
142 145
         <span style={{ color: '#FF4A4A' }} onClick={() => pulicAndUnPulic(data)}>
143 146
           {/* 已发布的时候,需要显示取消发布的字样 */}
144 147
           {data.status === 1 ? '取消发布' : '发布'}
145 148
           <Icon type={data.status === 1 ? 'close-circle' : 'form'} style={{ color: '#C0C4CC', marginLeft: '8px' }} />
146 149
         </span>
150
+      </AuthButton>
151
+      <AuthButton name="admin.building.delete.id.delete" noRight={null}>
147 152
         <span style={{
148 153
           color: '#FF4A4A', position: 'absolute', right: '0',
149 154
         }} onClick={() => deleteBuilding(data)}>
150 155
           删除
151 156
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
152 157
         </span>
158
+      </AuthButton>
153 159
       </p>
154 160
     </Card>
155 161
   )
@@ -279,13 +285,15 @@ function body(props) {
279 285
           )}
280 286
         </Form.Item>
281 287
         <Form.Item>
282
-          <Button type="primary" htmlType="submit">
283
-            搜索
284
-          </Button>
288
+          <AuthButton name="admin.buildinglist.get" noRight={null}>
289
+            <Button type="primary" htmlType="submit">
290
+              搜索
291
+            </Button>
292
+          </AuthButton>
285 293
         </Form.Item>
286 294
       </Form>
287 295
 
288
-      <AuthButton name="building.add" noRight={null}>
296
+      <AuthButton name="admin.building.add.post" noRight={null}>
289 297
         <Button type="danger" className={Styles.addButton} onClick={() => toAdd()}>
290 298
           新增楼盘
291 299
         </Button>

+ 4
- 1
src/pages/building/type/index.jsx Voir le fichier

@@ -5,6 +5,7 @@ import moment from 'moment';
5 5
 import Styles from './style.less'
6 6
 import request from '../../../utils/request';
7 7
 import apis from '../../../services/apis';
8
+import AuthButton from '@/components/AuthButton';
8 9
 
9 10
 function body() {
10 11
   // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -96,7 +97,9 @@ function body() {
96 97
 
97 98
   return (
98 99
     <>
99
-      <Button type="danger" onClick={() => toEdi()}>新增类型</Button>
100
+      <AuthButton name="admin.tdBuildingType.post" noRight={null}>
101
+        <Button type="danger" onClick={() => toEdi()}>新增类型</Button>
102
+      </AuthButton>
100 103
       <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} />
101 104
       {/* 分页 */}
102 105
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>

+ 25
- 14
src/pages/customer/customerlist/index.jsx Voir le fichier

@@ -10,6 +10,7 @@ import Attribution from './components/attribution'
10 10
 import IntegralRecord from './components/integralRecord'
11 11
 import ChangeStatus from './components/changeStatus'
12 12
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
13
+import AuthButton from '@/components/AuthButton';
13 14
 
14 15
 
15 16
 const { Option } = Select;
@@ -191,13 +192,19 @@ function body(props) {
191 192
       // eslint-disable-next-line no-nested-ternary
192 193
       render: (_, record) => (
193 194
         <>
194
-          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
195
-          &nbsp;&nbsp;
196
-          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
197
-          <br />
198
-          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
199
-          &nbsp;&nbsp;
200
-          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
195
+          <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
196
+            <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
197
+            &nbsp;&nbsp;
198
+            <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
199
+          </AuthButton>
200
+            <br />
201
+          <AuthButton name="admin.customer.recommend.get" noRight={null}>
202
+            <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
203
+          </AuthButton>
204
+            &nbsp;&nbsp;
205
+          <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
206
+            <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
207
+          </AuthButton>
201 208
         </>
202 209
       ),
203 210
     },
@@ -247,17 +254,21 @@ function body(props) {
247 254
           )}
248 255
         </Form.Item>
249 256
         <Form.Item>
250
-          <Button type="primary" htmlType="submit" >
251
-            查询
252
-          </Button>
257
+          <AuthButton name="admin.customer.recommend.get" noRight={null}>
258
+            <Button type="primary" htmlType="submit" >
259
+              查询
260
+            </Button>
261
+          </AuthButton>
253 262
         </Form.Item>
254 263
       </Form>
255 264
 
256 265
       <div style={{ marginTop: '20px', marginBottom: '20px' }}>
257
-        <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
258
-          <Radio.Button value="private">私客</Radio.Button>
259
-          <Radio.Button value="public">公客</Radio.Button>
260
-        </Radio.Group>
266
+        <AuthButton name="admin.customer.recommend.get" noRight={null}>
267
+          <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
268
+            <Radio.Button value="private">私客</Radio.Button>
269
+            <Radio.Button value="public">公客</Radio.Button>
270
+          </Radio.Group>
271
+        </AuthButton>
261 272
       </div>
262 273
       <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
263 274
 

+ 12
- 5
src/pages/customer/independentList/index.jsx Voir le fichier

@@ -5,6 +5,7 @@ import request from '../../../utils/request';
5 5
 import apis from '../../../services/apis';
6 6
 import Styles from './style.less';
7 7
 import { router } from 'umi';
8
+import AuthButton from '@/components/AuthButton';
8 9
 
9 10
 
10 11
 const { Option } = Select;
@@ -375,9 +376,13 @@ function body(props) {
375 376
           {
376 377
             <>
377 378
               {/* <sapn style={{ color: 'rgba(239,39,58,1)' }}>查看详细</sapn> */}
378
-              <a style={{ color: 'rgba(239,39,58,1)' }} onClick={() => Invite(record)}>邀请经纪人</a>
379
+              <AuthButton name="admin.channel.InviteClientsList.get" noRight={null}>
380
+                <a style={{ color: 'rgba(239,39,58,1)' }} onClick={() => Invite(record)}>邀请经纪人</a>
381
+              </AuthButton>
379 382
               &nbsp;&nbsp;&nbsp;&nbsp;
380
-              <a style={{ color: 'rgba(239,39,58,1)' }} onClick={() => gM(record)}>推荐客户</a>
383
+              <AuthButton name="admin.customer.recommend.id.get" noRight={null}>
384
+                <a style={{ color: 'rgba(239,39,58,1)' }} onClick={() => gM(record)}>推荐客户</a>
385
+              </AuthButton>
381 386
             </>
382 387
           }
383 388
         </>
@@ -405,9 +410,11 @@ function body(props) {
405 410
           )}
406 411
         </Form.Item>
407 412
         <Form.Item>
408
-          <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
409
-            搜索
410
-          </Button>
413
+          <AuthButton name="admin.customer.agents.get" noRight={null}>
414
+            <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
415
+              搜索
416
+            </Button>
417
+          </AuthButton>
411 418
         </Form.Item>
412 419
       </Form>
413 420
 

+ 9
- 4
src/pages/customer/recommendCustomer/index.jsx Voir le fichier

@@ -5,6 +5,7 @@ import request from '../../../utils/request';
5 5
 import apis from '../../../services/apis';
6 6
 import Styles from './style.less';
7 7
 import { router } from 'umi';
8
+import AuthButton from '@/components/AuthButton';
8 9
 
9 10
 
10 11
 const { Option } = Select;
@@ -130,7 +131,9 @@ function body(props) {
130 131
       render: (_, record) => (
131 132
         <>
132 133
           {
133
-            record.verifyStatus === 0 ? <sapn style={{ color: 'rgba(239,39,58,1)' }} onClick={() => toAudit(record.customerId)}>审核</sapn> : ''
134
+            <AuthButton name="admin.customer.recommend.verify.id.put" noRight={null}>
135
+              {record.verifyStatus === 0 ? <sapn style={{ color: 'rgba(239,39,58,1)' }} onClick={() => toAudit(record.customerId)}>审核</sapn> : ''}
136
+            </AuthButton>
134 137
           }
135 138
         </>
136 139
       ),
@@ -176,9 +179,11 @@ function body(props) {
176 179
           )}
177 180
         </Form.Item>
178 181
         <Form.Item>
179
-          <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
180
-            搜索
181
-          </Button>
182
+          <AuthButton name="admin.customer.recommend.recommender.get" noRight={null}>
183
+            <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
184
+              搜索
185
+            </Button>
186
+          </AuthButton>
182 187
         </Form.Item>
183 188
       </Form>
184 189
 

+ 6
- 3
src/pages/customer/report/index.jsx Voir le fichier

@@ -5,6 +5,7 @@ import request from '../../../utils/request';
5 5
 import apis from '../../../services/apis';
6 6
 import Styles from './style.less';
7 7
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
8
+import AuthButton from '@/components/AuthButton';
8 9
 
9 10
 
10 11
 const { Option } = Select;
@@ -153,9 +154,11 @@ function body(props) {
153 154
           )}
154 155
         </Form.Item>
155 156
         <Form.Item>
156
-          <Button type="primary" htmlType="submit">
157
-            搜索
158
-          </Button>
157
+          <AuthButton name="admin.customer.recommend.report.get" noRight={null}>
158
+            <Button type="primary" htmlType="submit">
159
+              搜索
160
+            </Button>
161
+          </AuthButton>
159 162
         </Form.Item>
160 163
       </Form>
161 164
       <Table style={{marginTop:'40px'}} dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />

+ 21
- 5
src/pages/integralMall/GoodsList.jsx Voir le fichier

@@ -6,6 +6,7 @@ import router from 'umi/router';
6 6
 import BuildSelect from '../../components/SelectButton/BuildSelect'
7 7
 import apis from '../../services/apis';
8 8
 import request from '../../utils/request'
9
+import AuthButton from '@/components/AuthButton';
9 10
 
10 11
 const { Option } = Select;
11 12
 
@@ -123,8 +124,21 @@ function header(props) {
123 124
       dataIndex: 'handle',
124 125
       key: 'handle',
125 126
       align: 'center',
126
-      render: (x, row) => <><span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeGoodsStatus(row)}>{row.status == 1 ? '下架' : '上架'}<Icon type="shopping-cart" className={styles.shoppingCart} />
127
-                            </span><span style={{ color: '#FF925C' }} onClick={toEditGoods(row.goodsId)}>编辑<Icon type="form" className={styles.edit} /></span></>,
127
+      render: (x, row) => (
128
+        <>
129
+          <AuthButton name="admin.taGoods.change.put" noRight={null}>
130
+            <span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeGoodsStatus(row)}>
131
+              {row.status == 1 ? '下架' : '上架'}
132
+              {<Icon type="shopping-cart" className={styles.shoppingCart} />}
133
+            </span>
134
+          </AuthButton>
135
+          <AuthButton name="admin.taGoods.put" noRight={null}>
136
+            <span style={{ color: '#FF925C' }} onClick={toEditGoods(row.goodsId)}>
137
+              编辑<Icon type="form" className={styles.edit} />
138
+            </span>
139
+          </AuthButton>
140
+        </>
141
+      ),
128 142
     },
129 143
   ];
130 144
 
@@ -171,9 +185,11 @@ function header(props) {
171 185
           )}
172 186
         </Form.Item>
173 187
         <Form.Item>
174
-          <Button type="primary" htmlType="submit" className={styles.searchBtn}>
175
-            搜索
176
-          </Button>
188
+          <AuthButton name="admin.taGoods.get" noRight={null}>
189
+            <Button type="primary" htmlType="submit" className={styles.searchBtn}>
190
+              搜索
191
+            </Button>
192
+          </AuthButton>
177 193
         </Form.Item>
178 194
       </Form>
179 195
       <Button type="danger" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>

+ 16
- 3
src/pages/integralMall/achieve.jsx Voir le fichier

@@ -6,7 +6,8 @@ import router from 'umi/router';
6 6
 import moment from 'moment';
7 7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8 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
 const { TabPane } = Tabs;
12 13
 
@@ -89,8 +90,20 @@ const columns = [
89 90
       dataIndex: 'handle',
90 91
       key: 'handle',
91 92
       align: 'center',
92
-      render: (x,row) => <><span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeStatus(row)}>{row.status == 1?'停用':'启用'}<Icon type="stop" className={styles.shoppingCart} /></span>
93
-                      <span style={{ color: '#FF925C' }}>{row.buildingId != null ? '编辑'`${<Icon type="form" className={styles.edit} />}` : ''}</span></>,
93
+      render: (x,row) => (
94
+        <>
95
+          <AuthButton name="admin.tdPointsRules.change.put" noRight={null}>
96
+            <span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeStatus(row)}>
97
+              {row.status == 1?'停用':'启用'}<Icon type="stop" className={styles.shoppingCart} />
98
+            </span>
99
+          </AuthButton>
100
+          <AuthButton name="admin.tdPointsRules.put" noRight={null}>
101
+            <span style={{ color: '#FF925C' }}>
102
+              {row.buildingId != null ? '编辑'`${<Icon type="form" className={styles.edit} />}` : ''}
103
+            </span>
104
+          </AuthButton>
105
+        </>
106
+      ),
94 107
     },
95 108
   ];
96 109