傅行帆 5 gadus atpakaļ
vecāks
revīzija
b741a47816

+ 3
- 2
src/components/AuthButton/index.jsx Parādīt failu

13
 
13
 
14
   // const hasRight = btn.roles.some(x => current.some(y => x === y))
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
     return <>{children}</>
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
   return hasRight ? <>{children}</> : <>{noRight}</>
22
   return hasRight ? <>{children}</> : <>{noRight}</>
22
 }
23
 }
23
 
24
 

+ 1
- 1
src/models/user.js Parādīt failu

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

+ 8
- 4
src/pages/activity/ActivityList.jsx Parādīt failu

156
           <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
156
           <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
157
             {row.activityStatus === 0 && <span style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} onClick={finishDynamic.bind(this, row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>}
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
           </AuthButton>
158
           </AuthButton>
159
-          <AuthButton name="admin.buildingDynamic.update.put" noRight={null}>
159
+          <AuthButton name="admin.buildingDynamic.tag" noRight={null}>
160
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row)}>{row.weight === 1 ? '取消标签' : '添加标签'}<Icon type="vertical-align-top" className={styles.edit} /></span>
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
             {(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>}
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
           </AuthButton>
164
           </AuthButton>
163
       {/* {(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>} */}
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
           )}
317
           )}
316
         </Form.Item>
318
         </Form.Item>
317
         <Form.Item>
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
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
325
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
322
             重置
326
             重置
323
             </Button>
327
             </Button>

+ 2
- 0
src/pages/activity/detailActivity.jsx Parādīt failu

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

+ 7
- 1
src/pages/activity/drainage/DrainageList.jsx Parādīt failu

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

+ 1
- 1
src/pages/activity/groupActivity/detailActivity.jsx Parādīt failu

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

+ 6
- 2
src/pages/activity/groupActivity/list.jsx Parādīt failu

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>
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
               <span style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} onClick={sendOrPublicDynamic.bind(this, row)}>{row.status === 1 ? '取消发布' : '发布'}<Icon type="close-circle" className={styles.edit} /></span>
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
             </AuthButton>
124
             </AuthButton>
125
           }
125
           }
126
           {
126
           {
127
-            <AuthButton name="admin.taShareActivity.list.get" noRight={null}>
127
+            <AuthButton name="admin.taShareActivity.tag" noRight={null}>
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>
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
               <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{row.sort === true ? '取消推荐首页' : '推荐首页'}<Icon type="vertical-align-top" className={styles.edit} /></span>
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
             </AuthButton>}
132
             </AuthButton>}
131
 
133
 
299
           )}
301
           )}
300
         </Form.Item>
302
         </Form.Item>
301
         <Form.Item>
303
         <Form.Item>
304
+        <AuthButton name="admin.taShareActivity.search" noRight={null}>
302
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
305
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
303
             搜索
306
             搜索
304
           </Button>
307
           </Button>
308
+          </AuthButton>
305
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
309
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
306
             重置
310
             重置
307
             </Button>
311
             </Button>

+ 1
- 1
src/pages/activity/helpActivity/detailActivity.jsx Parādīt failu

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

+ 8
- 4
src/pages/activity/helpActivity/list.jsx Parādīt failu

110
       render: (x, row) => (
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
               <span style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} onClick={sendOrPublicDynamic.bind(this, row)}>{row.status === 1 ? '取消发布' : '发布'}<Icon type="close-circle" className={styles.edit} /></span>
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
             </AuthButton>
115
             </AuthButton>
116
           }
116
           }
117
           {row.activityStatus === 0 &&
117
           {row.activityStatus === 0 &&
118
-            <AuthButton name="admin.top.update.post" noRight={null}>
118
+            <AuthButton name="admin.help.finish" noRight={null}>
119
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 2)}>结束活动<Icon type="poweroff" style={{color:'#bebebe'}} className={styles.edit} /></span> </AuthButton>
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
             <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>
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
             <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>
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
           </AuthButton> }
127
           </AuthButton> }
126
 
128
 
293
           )}
295
           )}
294
         </Form.Item>
296
         </Form.Item>
295
         <Form.Item>
297
         <Form.Item>
298
+        <AuthButton name="admin.help.search" noRight={null}>
296
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
299
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
297
             搜索
300
             搜索
298
           </Button>
301
           </Button>
302
+          </AuthButton>
299
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
303
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
300
               重置
304
               重置
301
             </Button>
305
             </Button>
302
         </Form.Item>
306
         </Form.Item>
303
       </Form>
307
       </Form>
304
-      <AuthButton name="admin.buildingDynamic.add.post" noRight={null}>
308
+      <AuthButton name="admin.help.add.post" noRight={null}>
305
         <Button name="admin.helpActivity.add.post" noRight={null} type="danger" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>
309
         <Button name="admin.helpActivity.add.post" noRight={null} type="danger" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>
306
       </AuthButton>
310
       </AuthButton>
307
       <Table dataSource={data.records} columns={columns} pagination={false} rowKey="activityList"/>
311
       <Table dataSource={data.records} columns={columns} pagination={false} rowKey="activityList"/>

+ 9
- 7
src/pages/building/list/index.jsx Parādīt failu

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

+ 17
- 13
src/pages/building/type/index.jsx Parādīt failu

37
       key: 'row',
37
       key: 'row',
38
       render: (_, record) => (
38
       render: (_, record) => (
39
         <span >
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
         </span>
56
         </span>
53
       ),
57
       ),
54
     },
58
     },
119
 
123
 
120
   return (
124
   return (
121
     <>
125
     <>
122
-      <AuthButton name="admin.tdBuildingType.post" noRight={null}>
126
+      <AuthButton name="admin.tdBuildingType.add" noRight={null}>
123
         <Button type="danger" onClick={() => toEdi()}>新增类型</Button>
127
         <Button type="danger" onClick={() => toEdi()}>新增类型</Button>
124
       </AuthButton>
128
       </AuthButton>
125
       <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} rowKey="buildingType"/>
129
       <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} rowKey="buildingType"/>

+ 8
- 2
src/pages/carouselFigure/advertisingList.jsx Parādīt failu

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

+ 7
- 1
src/pages/carouselFigure/carouselFigureList.jsx Parādīt failu

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

+ 2
- 2
src/pages/carouselFigure/customImg/list.jsx Parādīt failu

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

+ 2
- 0
src/pages/channel/channelList.jsx Parādīt failu

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

+ 10
- 6
src/pages/channel/independentList/index.jsx Parādīt failu

441
           )}
441
           )}
442
         </Form.Item>
442
         </Form.Item>
443
         <Form.Item style={{ position: 'absolute', right: '38px' }} >
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
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
449
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
448
             重置
450
             重置
449
           </Button>
451
           </Button>
450
         </Form.Item>
452
         </Form.Item>
451
       </Form>
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
       <Table rowKey="independentIndex" dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
459
       <Table rowKey="independentIndex" dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
456
       {/* 推荐客户 */}
460
       {/* 推荐客户 */}
457
       <ModalTable visibleData={gVisibleData} />
461
       <ModalTable visibleData={gVisibleData} />

+ 15
- 9
src/pages/customer/customerlist/index.jsx Parādīt failu

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

+ 5
- 3
src/pages/integralMall/GoodsList.jsx Parādīt failu

195
           )}
195
           )}
196
         </Form.Item>
196
         </Form.Item>
197
         <Form.Item>
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
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
203
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
202
               重置
204
               重置
203
             </Button>
205
             </Button>

+ 5
- 3
src/pages/integralMall/exchangeRecords.jsx Parādīt failu

184
           </Form.Item>
184
           </Form.Item>
185
           
185
           
186
           <Form.Item style={{position:'absolute',right:'38px'}}>
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
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
192
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
191
               重置
193
               重置
192
             </Button>
194
             </Button>

+ 8
- 4
src/pages/news/list/NewsList.jsx Parādīt failu

180
         cover={<img alt="example" src={data.newsImg} style={{ borderRadius: '12px 0 0 12px', width: '230px', height: '228px' }}></img>}
180
         cover={<img alt="example" src={data.newsImg} style={{ borderRadius: '12px 0 0 12px', width: '230px', height: '228px' }}></img>}
181
         bodyStyle={{ padding: '10px 20px' }}
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
         <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>
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
         </AuthButton>
185
         </AuthButton>
186
 
186
 
189
             编辑
189
             编辑
190
                   <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
190
                   <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
191
           </span>
191
           </span>
192
+          </AuthButton>
193
+          <AuthButton name="admin.taNews.publish" noRight={null}>
192
           {data.newsStatus === 0 ?
194
           {data.newsStatus === 0 ?
193
             <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)}>
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
           )}
298
           )}
297
         </Form.Item>
299
         </Form.Item>
298
         <Form.Item>
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
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
306
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
303
             重置
307
             重置
304
             </Button>
308
             </Button>

+ 5
- 3
src/pages/news/type/NewsType.jsx Parādīt failu

134
           )}
134
           )}
135
         </Form.Item>
135
         </Form.Item>
136
         <Form.Item>
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
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
142
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
141
               重置
143
               重置
142
             </Button>
144
             </Button>

+ 10
- 6
src/pages/recommend/recommendCustomer/index.jsx Parādīt failu

225
           )}
225
           )}
226
         </Form.Item>
226
         </Form.Item>
227
         <Form.Item style={{ position:'absolute',right:'38px' }}>
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
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
233
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
232
               重置
234
               重置
233
             </Button>
235
             </Button>
234
         </Form.Item>
236
         </Form.Item>
235
       </Form>
237
       </Form>
236
       {/* style={{float:'right',margin:'20px 0'}} */}
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
       <Table rowKey="recommendCustomer" dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
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 Parādīt failu

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

+ 4
- 0
src/pages/record/report/index.jsx Parādīt failu

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

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

+ 9
- 3
src/pages/staff/list/StaffList.jsx Parādīt failu

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

+ 2
- 0
src/pages/system/document/list.jsx Parādīt failu

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

+ 7
- 1
src/pages/system/housingPolicy.jsx Parādīt failu

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