傅行帆 пре 5 година
родитељ
комит
b741a47816

+ 3
- 2
src/components/AuthButton/index.jsx Прегледај датотеку

@@ -13,11 +13,12 @@ const AuthButton = ({ children, name, noRight }) => {
13 13
 
14 14
   // const hasRight = btn.roles.some(x => current.some(y => x === y))
15 15
 
16
-  if (!btn || !btn.rolesList || !btn.rolesList.length) {
16
+  if (!btn) {
17 17
     return <>{children}</>
18 18
   }
19 19
 
20
-  const hasRight = btn.rolesList.some(x => current.some(y => x.roleId === y))
20
+  const hasRight = current.filter(x => x.code === name)[0]
21
+  
21 22
   return hasRight ? <>{children}</> : <>{noRight}</>
22 23
 }
23 24
 

+ 1
- 1
src/models/user.js Прегледај датотеку

@@ -34,7 +34,7 @@ const UserModel = {
34 34
       const currentUser = { ...taUser, roles: (taUser.roles || []).map(x => x.roleId) }
35 35
 
36 36
       setAllBtnAuth(buttonList)
37
-      setUserBtnAuth(currentUser.roles)
37
+      setUserBtnAuth(currentUser.buttons)
38 38
 
39 39
       return { ...state, currentUser, menuList, buttonList };
40 40
     },

+ 8
- 4
src/pages/activity/ActivityList.jsx Прегледај датотеку

@@ -156,8 +156,10 @@ const header = props => {
156 156
           <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
157 157
             {row.activityStatus === 0 && <span style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} onClick={finishDynamic.bind(this, row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>}
158 158
           </AuthButton>
159
-          <AuthButton name="admin.buildingDynamic.update.put" noRight={null}>
159
+          <AuthButton name="admin.buildingDynamic.tag" noRight={null}>
160 160
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row)}>{row.weight === 1 ? '取消标签' : '添加标签'}<Icon type="vertical-align-top" className={styles.edit} /></span>
161
+          </AuthButton>
162
+          <AuthButton name="admin.buildingDynamic.update.put" noRight={null}>
161 163
             {(row.activityStatus === 0 || row.activityStatus === 1) && <span style={{ color: '#FF925C',marginRight: '20px', cursor: 'pointer' }} onClick={toEditGoods(row.dynamicId)}>编辑<Icon type="form" className={styles.edit} /></span>}
162 164
           </AuthButton>
163 165
       {/* {(row.activityStatus === 0 || row.activityStatus === 2) &&<span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={newQrcode.bind(this, row)}>{'下载二维码'} {<Icon type="qrcode" className={styles.shoppingCart} />}</span>} */}
@@ -315,9 +317,11 @@ const header = props => {
315 317
           )}
316 318
         </Form.Item>
317 319
         <Form.Item>
318
-          <Button type="primary" htmlType="submit" className={styles.searchBtn}>
319
-            搜索
320
-          </Button>
320
+          <AuthButton name="admin.buildingDynamic.search" noRight={null}>
321
+            <Button type="primary" htmlType="submit" className={styles.searchBtn}>
322
+              搜索
323
+            </Button>
324
+          </AuthButton>
321 325
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
322 326
             重置
323 327
             </Button>

+ 2
- 0
src/pages/activity/detailActivity.jsx Прегледај датотеку

@@ -413,7 +413,9 @@ const Edit = props => {
413 413
         <AuthButton name="admin.SignList.get" noRight={null}>
414 414
           {(detailData.activityStatus === 0 || detailData.activityStatus === 2) && <span style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} onClick={getSignList.bind(this, detailData.dynamicId)}><Button>报名记录</Button></span>}
415 415
           </AuthButton>
416
+          <AuthButton name="admin.dymic.qrcode" noRight={null}>
416 417
           {(detailData.activityStatus === 0 || detailData.activityStatus === 2) &&<span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={newQrcode.bind(this, detailData)}>{<Button>下载二维码</Button>}</span>}
418
+          </AuthButton>
417 419
           <Button onClick={() => cancelPage()}>
418 420
             取消
419 421
           </Button>

+ 7
- 1
src/pages/activity/drainage/DrainageList.jsx Прегледај датотеку

@@ -186,18 +186,22 @@ const header = (props) => {
186 186
       align: 'center',
187 187
       render: (text, datas) => (
188 188
         <>
189
+        <AuthButton name="admin.taDrainage.put" noRight={null}>
189 190
           <span style={{ right: '20px', bottom: ' 10px', fontSize: ' 0.106rem', color: '#FF7E48', cursor: 'pointer'}} onClick={() => addshowModal(datas)}>
190 191
             编辑
191 192
           </span>
193
+        </AuthButton>
192 194
           <AuthButton name="admin.taDrainage.id.delete" noRight={null}>
193 195
             <span style={{ right: '20px', bottom: ' 10px', fontSize: ' 0.106rem', color: '#FF7E48', cursor: 'pointer', marginLeft: 20 }} onClick={deleteDrainage(datas.drainageId)}>
194 196
               删除
195 197
             </span>
196 198
           </AuthButton >
199
+          <AuthButton name="admin.taDrainage.publish" noRight={null}>
197 200
           <span style={{ right: '20px', bottom: ' 10px', fontSize: ' 0.106rem', color: '#FF7E48', cursor: 'pointer', marginLeft: 20 }} onClick={exchangeDrainage(datas)}>
198 201
             {datas.status === 1 ? '下架' : '上架'}
199 202
           </span>
200
-          <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
203
+          </AuthButton>
204
+          <AuthButton name="admin.taDrainage.data" noRight={null}>
201 205
             <span style={{ right: '20px', top: '20px', fontSize: ' 0.106rem', zIndex: 1, color: '#FF7E48', cursor: 'pointer', marginLeft: 20  }} onClick={toEditList(datas)}>
202 206
               数据
203 207
             </span>
@@ -493,9 +497,11 @@ const header = (props) => {
493 497
           )}
494 498
         </Form.Item>
495 499
           <Form.Item >
500
+          <AuthButton name="admin.taDrainage.search" noRight={null}>
496 501
             <Button type="primary" htmlType="submit" className={styles.searchBtn} onClick>
497 502
               搜索
498 503
           </Button>
504
+          </AuthButton>
499 505
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
500 506
               重置
501 507
             </Button>

+ 1
- 1
src/pages/activity/groupActivity/detailActivity.jsx Прегледај датотеку

@@ -378,7 +378,7 @@ const Edit = props => {
378 378
         {tab === 'share' && <Share />}
379 379
       </div>
380 380
       <div style={{textAlign: 'center'}}>
381
-        <AuthButton name="admin.SignList.get" noRight={null}>
381
+        <AuthButton name="admin.share.record" noRight={null}>
382 382
           {(detailData.activityStatus === 0 || detailData.activityStatus === 2) && 
383 383
             <span 
384 384
               style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} 

+ 6
- 2
src/pages/activity/groupActivity/list.jsx Прегледај датотеку

@@ -119,13 +119,15 @@ const header = props => {
119 119
             <AuthButton name="admin.taShareActivity.finish.put" noRight={null}><span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={endGroupActivity(row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span></AuthButton>
120 120
           }
121 121
           {
122
-            <AuthButton name="admin.buildingDynamic.send.dynamicId.put" noRight={null}>
122
+            <AuthButton name="admin.taShareActivity.publish" noRight={null}>
123 123
               <span style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} onClick={sendOrPublicDynamic.bind(this, row)}>{row.status === 1 ? '取消发布' : '发布'}<Icon type="close-circle" className={styles.edit} /></span>
124 124
             </AuthButton>
125 125
           }
126 126
           {
127
-            <AuthButton name="admin.taShareActivity.list.get" noRight={null}>
127
+            <AuthButton name="admin.taShareActivity.tag" noRight={null}>
128 128
               <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{row.weight === 1 ? '取消标签' : '添加标签'}<Icon type="vertical-align-top" className={styles.edit} /></span>
129
+            </AuthButton>}{
130
+            <AuthButton name="admin.taShareActivity.top" noRight={null}>
129 131
               <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{row.sort === true ? '取消推荐首页' : '推荐首页'}<Icon type="vertical-align-top" className={styles.edit} /></span>
130 132
             </AuthButton>}
131 133
 
@@ -299,9 +301,11 @@ const header = props => {
299 301
           )}
300 302
         </Form.Item>
301 303
         <Form.Item>
304
+        <AuthButton name="admin.taShareActivity.search" noRight={null}>
302 305
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
303 306
             搜索
304 307
           </Button>
308
+          </AuthButton>
305 309
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
306 310
             重置
307 311
             </Button>

+ 1
- 1
src/pages/activity/helpActivity/detailActivity.jsx Прегледај датотеку

@@ -377,7 +377,7 @@ const Edit = props => {
377 377
         {tab === 'share' && <Share />}
378 378
       </div>
379 379
       <div style={{textAlign: 'center'}}>
380
-        <AuthButton name="admin.SignList.get" noRight={null}>
380
+        <AuthButton name="admin.help.record" noRight={null}>
381 381
           {(detailData.activityStatus === 0 || detailData.activityStatus === 2) && 
382 382
             <span 
383 383
               style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} 

+ 8
- 4
src/pages/activity/helpActivity/list.jsx Прегледај датотеку

@@ -110,17 +110,19 @@ const getActivityDetail = (helpActivityId) => () => {
110 110
       render: (x, row) => (
111 111
         <>
112 112
           {
113
-            <AuthButton name="admin.top.update.post" noRight={null}>
113
+            <AuthButton name="admin.help.publish" noRight={null}>
114 114
               <span style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} onClick={sendOrPublicDynamic.bind(this, row)}>{row.status === 1 ? '取消发布' : '发布'}<Icon type="close-circle" className={styles.edit} /></span>
115 115
             </AuthButton>
116 116
           }
117 117
           {row.activityStatus === 0 &&
118
-            <AuthButton name="admin.top.update.post" noRight={null}>
118
+            <AuthButton name="admin.help.finish" noRight={null}>
119 119
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 2)}>结束活动<Icon type="poweroff" style={{color:'#bebebe'}} className={styles.edit} /></span> </AuthButton>
120 120
           }
121 121
           {
122
-          <AuthButton name="admin.top.update.post" noRight={null}>
122
+          <AuthButton name="admin.help.tag" noRight={null}>
123 123
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消标签' : '添加标签' }<Icon type="vertical-align-top"  style={{color:'#bebebe'}} className={styles.edit} /></span>
124
+          </AuthButton>}{
125
+          <AuthButton name="admin.help.top" noRight={null}>
124 126
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
125 127
           </AuthButton> }
126 128
 
@@ -293,15 +295,17 @@ const handleSubmit = (e, props) => {
293 295
           )}
294 296
         </Form.Item>
295 297
         <Form.Item>
298
+        <AuthButton name="admin.help.search" noRight={null}>
296 299
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
297 300
             搜索
298 301
           </Button>
302
+          </AuthButton>
299 303
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
300 304
               重置
301 305
             </Button>
302 306
         </Form.Item>
303 307
       </Form>
304
-      <AuthButton name="admin.buildingDynamic.add.post" noRight={null}>
308
+      <AuthButton name="admin.help.add.post" noRight={null}>
305 309
         <Button name="admin.helpActivity.add.post" noRight={null} type="danger" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>
306 310
       </AuthButton>
307 311
       <Table dataSource={data.records} columns={columns} pagination={false} rowKey="activityList"/>

+ 9
- 7
src/pages/building/list/index.jsx Прегледај датотеку

@@ -112,7 +112,7 @@ function CartBody(props) {
112 112
       <p className={Styles.cardText}>
113 113
         <span className={Styles.title}>楼盘编号</span>
114 114
         <span style={{textOverflow: 'ellipsis',  whiteSpace: 'nowrap',  overflow: 'hidden'}}>:{data.code}</span>
115
-        <AuthButton name="admin.building.update.put" noRight={null}>
115
+        <AuthButton name="admin.building.update" noRight={null}>
116 116
           <span className={Styles.ediText} onClick={() => toEdi(data)}>
117 117
             编辑
118 118
                   <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
@@ -142,14 +142,14 @@ function CartBody(props) {
142 142
         <span >:{moment(data.createDate).format('YYYY-MM-DD HH:mm:ss')}</span>
143 143
       </p>
144 144
       <p style={{ margin: '15px 0', position: 'relative', fontSize: '0.106rem' }}>
145
-      <AuthButton name="admin.building.update.status.put" noRight={null}>
145
+      <AuthButton name="admin.building.public" noRight={null}>
146 146
         <span style={{ color: '#FF4A4A' }} onClick={() => pulicAndUnPulic(data)}>
147 147
           {/* 已发布的时候,需要显示取消发布的字样 */}
148 148
           {data.status === 1 ? '取消发布' : '发布'}
149 149
           <Icon type={data.status === 1 ? 'close-circle' : 'form'} style={{ color: '#C0C4CC', marginLeft: '8px' }} />
150 150
         </span>
151 151
       </AuthButton>
152
-      <AuthButton name="admin.building.delete.id.delete" noRight={null}>
152
+      <AuthButton name="admin.building.delete" noRight={null}>
153 153
         <span style={{
154 154
           color: '#FF4A4A', position: 'absolute', right: '0',
155 155
         }} onClick={() => deleteBuilding(data)}>
@@ -319,16 +319,18 @@ function body(props) {
319 319
           )}
320 320
         </Form.Item>
321 321
         <Form.Item>
322
-            <Button type="primary" htmlType="submit">
323
-              搜索
324
-            </Button>
322
+            <AuthButton name="admin.building.search" noRight={null}>
323
+              <Button type="primary" htmlType="submit">
324
+                搜索
325
+              </Button>
326
+            </AuthButton> 
325 327
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
326 328
               重置
327 329
             </Button>
328 330
         </Form.Item>
329 331
       </Form>
330 332
 
331
-      <AuthButton name="admin.building.add.post" noRight={null}>
333
+      <AuthButton name="admin.building.add" noRight={null}>
332 334
         <Button type="danger" className={Styles.addButton} onClick={() => toAdd()}>
333 335
           新增楼盘
334 336
         </Button>

+ 17
- 13
src/pages/building/type/index.jsx Прегледај датотеку

@@ -37,18 +37,22 @@ function body() {
37 37
       key: 'row',
38 38
       render: (_, record) => (
39 39
         <span >
40
-          <Button type="link" style={{
41
-            color: '#FF4A4A', right: '0',
42
-          }} onClick={() => deleteType(record)}>
43
-            删除
44
-            <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
45
-          </Button>
46
-          <Button type="link" style={{
47
-            color: '#FF4A4A', right: '0',
48
-          }} onClick={() => toEdi(record.buildingTypeId)}>
49
-            编辑
50
-            <Icon type="copy" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
51
-          </Button>
40
+          <AuthButton name="admin.tdBuildingType.delete" noRight={null}>
41
+            <Button type="link" style={{
42
+              color: '#FF4A4A', right: '0',
43
+            }} onClick={() => deleteType(record)}>
44
+              删除
45
+              <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
46
+            </Button>
47
+          </AuthButton>
48
+          <AuthButton name="admin.tdBuildingType.update" noRight={null}>
49
+            <Button type="link" style={{
50
+              color: '#FF4A4A', right: '0',
51
+            }} onClick={() => toEdi(record.buildingTypeId)}>
52
+              编辑
53
+              <Icon type="copy" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
54
+            </Button>
55
+          </AuthButton>
52 56
         </span>
53 57
       ),
54 58
     },
@@ -119,7 +123,7 @@ function body() {
119 123
 
120 124
   return (
121 125
     <>
122
-      <AuthButton name="admin.tdBuildingType.post" noRight={null}>
126
+      <AuthButton name="admin.tdBuildingType.add" noRight={null}>
123 127
         <Button type="danger" onClick={() => toEdi()}>新增类型</Button>
124 128
       </AuthButton>
125 129
       <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} rowKey="buildingType"/>

+ 8
- 2
src/pages/carouselFigure/advertisingList.jsx Прегледај датотеку

@@ -96,9 +96,13 @@ const toEdit = (contentId) => () => {
96 96
       align: 'center',
97 97
       render: (x,row) => (
98 98
         <>
99
-          <AuthButton name="admin.extendContent.id.put" noRight={null}>
99
+          <AuthButton name="admin.advert.publish" noRight={null}>
100 100
             <span style={{ color: '#1990FF', marginRight: '20px',cursor: 'pointer' }} onClick={changeStatus(row)}>{ row.status === 1 ? '下架' : '上架' }<Icon type="vertical-align-top" className={styles.edit} /></span>
101
+          </AuthButton>
102
+          <AuthButton name="admin.advert.put" noRight={null}>
101 103
             <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEdit(row.contentId)}>编辑<Icon type="form" className={styles.edit} /></span>
104
+          </AuthButton>
105
+          <AuthButton name="admin.advert.delete" noRight={null}>
102 106
             <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={deleteCarouse(row.contentId)}>删除<Icon type="vertical-align-top" className={styles.edit} /></span>
103 107
           </AuthButton>
104 108
         </>
@@ -253,15 +257,17 @@ const handleSubmit = (e, props) => {
253 257
           )}
254 258
         </Form.Item>
255 259
         <Form.Item>
260
+        <AuthButton name="admin.advert.search" noRight={null}>
256 261
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
257 262
             搜索
258 263
           </Button>
264
+          </AuthButton>
259 265
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
260 266
               重置
261 267
             </Button>
262 268
         </Form.Item>
263 269
       </Form>
264
-      <AuthButton name="admin.extendContent.post" noRight={null}>
270
+      <AuthButton name="admin.advert.post" noRight={null}>
265 271
         <Button type="danger" className={styles.addBtn} onClick={toEdit()}>新增</Button>
266 272
       </AuthButton>
267 273
       <Table dataSource={data.records} columns={columns} pagination={false} rowKey="advertisingList"/>

+ 7
- 1
src/pages/carouselFigure/carouselFigureList.jsx Прегледај датотеку

@@ -96,9 +96,13 @@ const toEditCarouse = (contentId) => () => {
96 96
       align: 'center',
97 97
       render: (x,row) => (
98 98
         <>
99
-          <AuthButton name="admin.extendContent.id.put" noRight={null}>
99
+          <AuthButton name="admin.extendContent.publish" noRight={null}>
100 100
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer'}} onClick={changeStatus(row)}>{ row.status === 1 ? '下架' : '上架' }<Icon type="vertical-align-top" className={styles.edit} /></span>
101
+          </AuthButton>
102
+          <AuthButton name="admin.extendContent.id.put" noRight={null}>
101 103
             <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditCarouse(row.contentId)}>编辑<Icon type="form" className={styles.edit} /></span>
104
+          </AuthButton>
105
+          <AuthButton name="admin.extendContent.delete" noRight={null}>
102 106
             <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={deleteCarouse(row.contentId)}>删除<Icon type="vertical-align-top" className={styles.edit} /></span>
103 107
           </AuthButton>
104 108
         </>
@@ -251,9 +255,11 @@ const handleSubmit = (e, props) => {
251 255
           )}
252 256
         </Form.Item>
253 257
         <Form.Item>
258
+        <AuthButton name="admin.extendContent.search" noRight={null}>
254 259
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
255 260
             搜索
256 261
           </Button>
262
+          </AuthButton>
257 263
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
258 264
               重置
259 265
             </Button>

+ 2
- 2
src/pages/carouselFigure/customImg/list.jsx Прегледај датотеку

@@ -94,7 +94,7 @@ function header(props) {
94 94
       align: 'center',
95 95
       render: (x, row) => (
96 96
         <>
97
-          <AuthButton name="admin.taNewsType.id.put" noRight={null}>
97
+          <AuthButton name="admin.custom.put" noRight={null}>
98 98
             <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditCustom(row.imgId)}>
99 99
               编辑<Icon type="form" className={styles.edit} />
100 100
             </span>
@@ -111,7 +111,7 @@ function header(props) {
111 111
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
112 112
         
113 113
       </Form>
114
-      <AuthButton name="admin.taGoods.add.post" noRight={null}>
114
+      <AuthButton name="admin.custom.post" noRight={null}>
115 115
         <Button type="danger" className={styles.addBtn} onClick={toEditCustom()}>新增</Button>
116 116
       </AuthButton>
117 117
       <Table rowKey="goodsList" dataSource={data.records} columns={columns} pagination={false} />

+ 2
- 0
src/pages/channel/channelList.jsx Прегледај датотеку

@@ -182,7 +182,9 @@ const header = props => {
182 182
           </Select>
183 183
         </div>
184 184
         <div >
185
+        <AuthButton name="admin.channel.search" noRight={null}>
185 186
           <Button type="primary" onClick={() => queryList()}>查询</Button>
187
+          </AuthButton>
186 188
           {/* <Button onClick={() => reset() }>重置</Button> */}
187 189
         </div>
188 190
       </div>

+ 10
- 6
src/pages/channel/independentList/index.jsx Прегледај датотеку

@@ -441,17 +441,21 @@ function body (props) {
441 441
           )}
442 442
         </Form.Item>
443 443
         <Form.Item style={{ position: 'absolute', right: '38px' }} >
444
-          <Button type="primary" htmlType="submit" >
445
-            搜索
446
-          </Button>
444
+          <AuthButton name="admin.major.search" noRight={null}>
445
+            <Button type="primary" htmlType="submit" >
446
+              搜索
447
+            </Button>
448
+          </AuthButton>
447 449
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
448 450
             重置
449 451
           </Button>
450 452
         </Form.Item>
451 453
       </Form>
452
-      <Button type="primary" onClick={() => exportIndependen()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
453
-        导出
454
-      </Button>
454
+      <AuthButton name="admin.major.import" noRight={null}>
455
+        <Button type="primary" onClick={() => exportIndependen()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
456
+          导出
457
+        </Button>
458
+      </AuthButton>
455 459
       <Table rowKey="independentIndex" dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
456 460
       {/* 推荐客户 */}
457 461
       <ModalTable visibleData={gVisibleData} />

+ 15
- 9
src/pages/customer/customerlist/index.jsx Прегледај датотеку

@@ -264,11 +264,11 @@ function body(props) {
264 264
       // eslint-disable-next-line no-nested-ternary
265 265
       render: (_, record) => (
266 266
         <>
267
-          <AuthButton>
267
+          <AuthButton name="admin.customer.public.detail" noRight={null}>
268 268
             <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => publicCustomerDetail(record)}>查看详情</Button>
269 269
           </AuthButton>
270 270
           &nbsp;&nbsp;
271
-          <AuthButton>
271
+          <AuthButton name="admin.customer.recommend" noRight={null}>
272 272
             <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
273 273
           </AuthButton>
274 274
         </>
@@ -358,7 +358,9 @@ function body(props) {
358 358
             &nbsp;
359 359
           <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
360 360
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
361
+            </AuthButton>
361 362
             &nbsp;&nbsp;
363
+          <AuthButton name="admin.customer.recommend.belong" noRight={null}>
362 364
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
363 365
           </AuthButton>
364 366
             &nbsp;&nbsp;
@@ -366,7 +368,7 @@ function body(props) {
366 368
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
367 369
           </AuthButton>
368 370
             &nbsp;&nbsp;
369
-          <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
371
+          <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
370 372
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
371 373
           </AuthButton>
372 374
             &nbsp;
@@ -424,17 +426,21 @@ function body(props) {
424 426
           )}
425 427
         </Form.Item>}
426 428
         <Form.Item>
427
-            <Button type="primary" htmlType="submit" >
428
-              查询
429
-            </Button>
429
+            <AuthButton name="admin.customer.recommend.search" noRight={null}>
430
+              <Button type="primary" htmlType="submit" >
431
+                查询
432
+              </Button>
433
+            </AuthButton>
430 434
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
431 435
               重置
432 436
             </Button>
433 437
         </Form.Item>
434 438
       </Form>
435
-      <Button type="primary" onClick={() => exportCustomer()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
436
-        导出
437
-      </Button>
439
+      <AuthButton name="admin.customer.import" noRight={null}>
440
+        <Button type="primary" onClick={() => exportCustomer()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
441
+          导出
442
+        </Button>
443
+      </AuthButton>
438 444
 
439 445
       <div style={{ margin: '20px 0'}}>
440 446
         <AuthButton name="admin.customer.recommend.get" noRight={null}>

+ 5
- 3
src/pages/integralMall/GoodsList.jsx Прегледај датотеку

@@ -195,9 +195,11 @@ function header(props) {
195 195
           )}
196 196
         </Form.Item>
197 197
         <Form.Item>
198
-            <Button type="primary" htmlType="submit" className={styles.searchBtn}>
199
-              搜索
200
-            </Button>
198
+            <AuthButton name="admin.taGoods.search" noRight={null}>
199
+              <Button type="primary" htmlType="submit" className={styles.searchBtn}>
200
+                搜索
201
+              </Button>
202
+            </AuthButton>
201 203
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
202 204
               重置
203 205
             </Button>

+ 5
- 3
src/pages/integralMall/exchangeRecords.jsx Прегледај датотеку

@@ -184,9 +184,11 @@ function record(props) {
184 184
           </Form.Item>
185 185
           
186 186
           <Form.Item style={{position:'absolute',right:'38px'}}>
187
-            <Button type="primary" htmlType="submit">
188
-              搜索
189
-            </Button>
187
+            <AuthButton name="admin.taGoods.exchange" noRight={null}>
188
+              <Button type="primary" htmlType="submit">
189
+                搜索
190
+              </Button>
191
+            </AuthButton>
190 192
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
191 193
               重置
192 194
             </Button>

+ 8
- 4
src/pages/news/list/NewsList.jsx Прегледај датотеку

@@ -180,7 +180,7 @@ function body(props) {
180 180
         cover={<img alt="example" src={data.newsImg} style={{ borderRadius: '12px 0 0 12px', width: '230px', height: '228px' }}></img>}
181 181
         bodyStyle={{ padding: '10px 20px' }}
182 182
       >
183
-        <AuthButton name="admin.taNews.id.put" noRight={null}>
183
+        <AuthButton name="admin.taNews.top" noRight={null}>
184 184
         <span style={{ position: 'absolute', right: '83px', top: '16px', fontSize: ' 0.106rem',zIndex:1, color: '#FF7E48', cursor: 'pointer' }} onClick={topNews(data.weight, data.newsId)}>{ data.weight === 1 ? '取消置顶' : '置顶' }</span>
185 185
         </AuthButton>
186 186
 
@@ -189,6 +189,8 @@ function body(props) {
189 189
             编辑
190 190
                   <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
191 191
           </span>
192
+          </AuthButton>
193
+          <AuthButton name="admin.taNews.publish" noRight={null}>
192 194
           {data.newsStatus === 0 ?
193 195
             <span style={{ position: 'absolute', left: '250px', bottom: ' 10px', fontSize: ' 0.106rem', color: '#FF7E48', zIndex: 1, cursor: 'pointer' }} onClick={cancelRelease.bind(this, data.newsId, 1, data.buildingId, data.newsType.newsTypeId)}>
194 196
               取消发布
@@ -296,9 +298,11 @@ function body(props) {
296 298
           )}
297 299
         </Form.Item>
298 300
         <Form.Item>
299
-          <Button type="primary" htmlType="submit" >
300
-            搜索
301
-          </Button>
301
+          <AuthButton name="admin.news.search" noRight={null}>
302
+            <Button type="primary" htmlType="submit" >
303
+              搜索
304
+            </Button>
305
+          </AuthButton>
302 306
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
303 307
             重置
304 308
             </Button>

+ 5
- 3
src/pages/news/type/NewsType.jsx Прегледај датотеку

@@ -134,9 +134,11 @@ function header(props) {
134 134
           )}
135 135
         </Form.Item>
136 136
         <Form.Item>
137
-            <Button type="primary" htmlType="submit" >
138
-              查询
139
-            </Button>
137
+            <AuthButton name="admin.taNewsType.search" noRight={null}>
138
+              <Button type="primary" htmlType="submit" >
139
+                查询
140
+              </Button>
141
+            </AuthButton>
140 142
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
141 143
               重置
142 144
             </Button>

+ 10
- 6
src/pages/recommend/recommendCustomer/index.jsx Прегледај датотеку

@@ -225,18 +225,22 @@ function body(props) {
225 225
           )}
226 226
         </Form.Item>
227 227
         <Form.Item style={{ position:'absolute',right:'38px' }}>
228
-            <Button type="primary" htmlType="submit" >
229
-              搜索
230
-            </Button>
228
+            <AuthButton name="admin.recommend.search" noRight={null}>
229
+              <Button type="primary" htmlType="submit" >
230
+                搜索
231
+              </Button>
232
+            </AuthButton>
231 233
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
232 234
               重置
233 235
             </Button>
234 236
         </Form.Item>
235 237
       </Form>
236 238
       {/* style={{float:'right',margin:'20px 0'}} */}
237
-      <Button type="primary" onClick={() => exportRecommendCustomer()}>
238
-        导出
239
-      </Button>
239
+      <AuthButton name="admin.recommend.import" noRight={null}>
240
+        <Button type="primary" onClick={() => exportRecommendCustomer()}>
241
+          导出
242
+        </Button>
243
+      </AuthButton>
240 244
       <Table rowKey="recommendCustomer" dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
241 245
     </>
242 246
   );

+ 2
- 0
src/pages/record/drainage/DrainageVisitRecordList.jsx Прегледај датотеку

@@ -162,9 +162,11 @@ const header = props => {
162 162
           )}
163 163
         </Form.Item>
164 164
         <Form.Item>
165
+        <AuthButton name="admin.visit.record.search" noRight={null}>
165 166
           <Button type="primary" htmlType="submit" className={styles.searchBtn}> 
166 167
             搜索
167 168
           </Button>
169
+          </AuthButton>
168 170
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
169 171
             重置
170 172
             </Button>

+ 4
- 0
src/pages/record/report/index.jsx Прегледај датотеку

@@ -190,9 +190,11 @@ function body(props) {
190 190
           </Col>
191 191
           <div style={{minWidth:'150px',position: 'absolute', right: '-12px', }}>
192 192
             <Form.Item >
193
+            <AuthButton name="admin.report.search" noRight={null}>
193 194
               <Button type="primary" htmlType="submit">
194 195
                 搜索
195 196
             </Button>
197
+            </AuthButton>
196 198
               <Button style={{ marginLeft: 8 }} onClick={handleReset}>
197 199
                 重置
198 200
             </Button>
@@ -202,9 +204,11 @@ function body(props) {
202 204
         <div >
203 205
         </div>
204 206
       </Form>
207
+      <AuthButton name="admin.report.import" noRight={null}>
205 208
       <Button type="primary" onClick={() => exportReport()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
206 209
         导出
207 210
       </Button>
211
+      </AuthButton>
208 212
       <Table rowKey="report" style={{ marginTop: '40px' }} dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
209 213
     </>
210 214
   );

+ 7
- 0
src/pages/staff/list/RoleList.jsx Прегледај датотеку

@@ -8,6 +8,7 @@ import { Card, Avatar } from 'antd';
8 8
 import request from '../../../utils/request'
9 9
 import Styles from './style.less';
10 10
 import apis from '../../../services/apis';
11
+import AuthButton from '../../../components/AuthButton';
11 12
 
12 13
 const header = props => {
13 14
 // function confirm(id) {
@@ -118,12 +119,16 @@ const columns = [
118 119
     align: 'center',
119 120
 
120 121
     render: (text, record) => <>
122
+    <AuthButton name="admin.role.publish" noRight={null}>
121 123
       <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={() => stop(record.roleId, record.status)}>{ record.status === 1 ? '停用' : '启用' }
122 124
       <Icon type="stop" className={styles.shoppingCart} style={{ fontSize: 14 }}/>
123 125
       </span>
126
+      </AuthButton>
127
+      <AuthButton name="admin.role.put" noRight={null}>
124 128
       <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={() => toEditRole(record.roleId)} >编辑
125 129
       <Icon type="form" className={styles.edit} />
126 130
       </span>
131
+      </AuthButton>
127 132
     </>,
128 133
 
129 134
   },
@@ -132,7 +137,9 @@ const columns = [
132 137
 
133 138
 return (
134 139
     <>
140
+    <AuthButton name="admin.role.add" noRight={null}>
135 141
       <Button type="danger" className={styles.addBtn} onClick={addRole}>新增</Button>
142
+      </AuthButton>
136 143
       <div className={Styles.roletext}>
137 144
 
138 145
         <Table rowKey="roleList" dataSource={data.records} columns={columns} />

+ 9
- 3
src/pages/staff/list/StaffList.jsx Прегледај датотеку

@@ -4,7 +4,7 @@ import { Form, Input, Button, Icon, Select, message, Table, Divider, Row, Col, T
4 4
 import { FormattedMessage } from 'umi-plugin-react/locale';
5 5
 import styles from '../../style/GoodsList.less';
6 6
 import router from 'umi/router';
7
-
7
+import AuthButton from '../../../components/AuthButton';
8 8
 import apis from '../../../services/apis';
9 9
 import request from '../../../utils/request'
10 10
 import Styles from './style.less';
@@ -98,19 +98,22 @@ const CartBody = props => {
98 98
     <Card className={Styles.card}>
99 99
       <div>
100 100
         <Avatar src={data.photo} style={{ width: '0.48rem', height: '0.48rem' }} />
101
+        <AuthButton name="admin.user.put" noRight={null}>
101 102
         <Button type="link" style={{ color: '#FF925C', fontSize: '0.106rem', position: 'absolute', top: '40px', left: '0.56rem' }} onClick={toEditStaff(data.userId)}>
102 103
           编辑
103 104
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '0.04rem' }} />
104 105
         </Button>
106
+        </AuthButton>
105 107
         {/* <Button type="link" style={{ fontSize: ' 0.106rem', color: '#cacaca', position: 'absolute', top: '40px', right: '0' }} onClick={() => departure(data)}>
106 108
           离职
107 109
                 <Icon type="exclamation-circle" style={{ color: '#C0C4CC', marginLeft: '0.04rem' }} />
108 110
         </Button> */}
111
+        <AuthButton name="admin.user.publish" noRight={null}>
109 112
         <Button type="link" style={{ fontSize: ' 0.106rem', color: '#cacaca', position: 'absolute', top: '40px', right: '0' }} onClick={confirm(data)}>
110 113
           {data.status === 1 ? '停用' : '启用'}
111 114
           <Icon type={data.status === 1 ? 'close-circle' : 'form'} style={{ color: '#C0C4CC', marginLeft: '0.04rem' }} />
112 115
         </Button>
113
-
116
+        </AuthButton>
114 117
       </div>
115 118
       <div>
116 119
 
@@ -211,16 +214,19 @@ const header = props => {
211 214
         </Form.Item>
212 215
 
213 216
         <Form.Item>
217
+        <AuthButton name="admin.user.search" noRight={null}>
214 218
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
215 219
             搜索
216 220
           </Button>
217
-
221
+        </AuthButton>
218 222
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
219 223
             重置
220 224
             </Button>
221 225
         </Form.Item>
222 226
       </Form>
227
+      <AuthButton name="admin.user.add" noRight={null}>
223 228
       <Button type="danger" style={{ margin: '20px 0', padding: '2px 36px' }} onClick={toEditStaff()}>新增</Button>
229
+      </AuthButton>
224 230
       <Row style={{ padding: ' 0 10px' }}>
225 231
         {
226 232
           tempData.records.map((item, index) => (

+ 2
- 0
src/pages/system/document/list.jsx Прегледај датотеку

@@ -137,9 +137,11 @@ function body(props) {
137 137
           )}
138 138
         </Form.Item>
139 139
         <Form.Item>
140
+        <AuthButton name="admin.documentVerify.search" noRight={null}>
140 141
           <Button type="primary" htmlType="submit">
141 142
             查询
142 143
           </Button>
144
+          </AuthButton>
143 145
           &nbsp;&nbsp;&nbsp;&nbsp;
144 146
           <Button onClick={(e) => handleReset(e)}>
145 147
             清空

+ 7
- 1
src/pages/system/housingPolicy.jsx Прегледај датотеку

@@ -87,9 +87,13 @@ const toEditPolicy = (policyId) => () => {
87 87
       align: 'center',
88 88
       render: (x,row) => (
89 89
         <>
90
-          <AuthButton name="admin.taPolicy.id.put" noRight={null}>
90
+          <AuthButton name="admin.taPolicy.publish" noRight={null}>
91 91
             <span style={{ color: '#1990FF',cursor: 'pointer' }} onClick={publicOrNoPublic(row)}>{ row.publishStatus === 0 ? '发布' : '取消发布' }<Icon type="close-circle" className={styles.edit} /></span>
92
+          </AuthButton> 
93
+          <AuthButton name="admin.taPolicy.top" noRight={null}>
92 94
             <span style={{ color: '#1990FF', marginRight: '20px',cursor: 'pointer' }} onClick={topPolicy(row)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
95
+          </AuthButton>
96
+          <AuthButton name="admin.taPolicy.id.put" noRight={null}>
93 97
             <span style={{ color: '#FF925C',cursor: 'pointer' }} onClick={toEditPolicy(row.policyId)}>编辑<Icon type="form" className={styles.edit} /></span>
94 98
           </AuthButton>
95 99
           <AuthButton name="admin.taPolicy.id.delete" noRight={null}>
@@ -185,9 +189,11 @@ const handleSubmit = (e, props) => {
185 189
           )}
186 190
         </Form.Item>
187 191
         <Form.Item>
192
+        <AuthButton name="admin.taPolicy.search" noRight={null}>
188 193
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
189 194
             搜索
190 195
           </Button>
196
+          </AuthButton>
191 197
         </Form.Item>
192 198
       </Form>
193 199
       <AuthButton name="admin.taPolicy.post" noRight={null}>