File tree Expand file tree Collapse file tree 5 files changed +23
-13
lines changed Expand file tree Collapse file tree 5 files changed +23
-13
lines changed Original file line number Diff line number Diff line change 1- export const BOOL = {
2- TRUE : '1' ,
3- FALSE : '0' ,
4- } ;
5-
61export const LOCKED_OPTIONS = [
7- { value : BOOL . FALSE , label : '正常' } ,
8- { value : BOOL . TRUE , label : '已锁定' } ,
2+ { value : false , label : '正常' } ,
3+ { value : true , label : '已锁定' } ,
94] ;
105
116// 通用请求头
@@ -19,3 +14,9 @@ export const PAGE = {
1914 NUM : '1' ,
2015 SIZE : '20' ,
2116} ;
17+
18+ export const WHITELIST_OPTIONS = [
19+ { value : 0 , label : 'permission' } ,
20+ { value : 1 , label : 'jwt' } ,
21+ { value : 2 , label : 'idempotent' } ,
22+ ] ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import systemUser from './system/user';
1111import systemUserGroup from './system/userGroup' ;
1212import systemRole from './system/role' ;
1313import systemAction from './system/action' ;
14+ import systemWhitelist from './system/whitelist' ;
1415
1516const reducer = combineReducers ( {
1617 global,
@@ -23,6 +24,7 @@ const reducer = combineReducers({
2324 systemUserGroup,
2425 systemRole,
2526 systemAction,
27+ systemWhitelist,
2628} ) ;
2729
2830export const store = configureStore ( {
Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ export const SelectTable = () => {
260260 async function handleRowLockConfirm ( ) {
261261 const params = {
262262 id : lockDialogRow . id ,
263- locked : 1 ,
263+ locked : true ,
264264 lockExpireTime : '' ,
265265 } ;
266266 if ( ! lockDialogForever ) {
@@ -300,7 +300,7 @@ export const SelectTable = () => {
300300 async function handleRowUnlockConfirm ( ) {
301301 const params = {
302302 id : unlockDialogRow . id ,
303- locked : 0 ,
303+ locked : false ,
304304 } ;
305305 try {
306306 setEditLoading ( true ) ;
@@ -511,7 +511,7 @@ export const SelectTable = () => {
511511 let lock = false ;
512512 let unlock = false ;
513513 if ( props . edit ) {
514- if ( props . row . locked === BOOL . FALSE ) {
514+ if ( ! props . row . locked ) {
515515 lock = true ;
516516 unlock = false ;
517517 } else {
@@ -677,7 +677,7 @@ export const SelectTable = () => {
677677 ellipsis : true ,
678678 colKey : 'locked' ,
679679 cell ( record ) {
680- if ( record . row . locked === BOOL . FALSE ) {
680+ if ( ! record . row . locked ) {
681681 return (
682682 < Tag theme = 'success' variant = 'light' >
683683 正常
Original file line number Diff line number Diff line change @@ -38,6 +38,13 @@ const system: IRouter[] = [
3838 title : '行为' ,
3939 } ,
4040 } ,
41+ {
42+ path : 'whitelist' ,
43+ Component : lazy ( ( ) => import ( 'pages/System/Whitelist' ) ) ,
44+ meta : {
45+ title : '白名单' ,
46+ } ,
47+ } ,
4148 ] ,
4249 } ,
4350] ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export interface UserStatusReply {
1717 id : string ;
1818 img : string ;
1919 } ;
20- locked : string ;
20+ locked : bool ;
2121 lockExpire : string ;
2222}
2323
@@ -39,7 +39,7 @@ export interface User {
3939 username : string ;
4040 code : string ;
4141 status : string ;
42- locked : string ;
42+ locked : bool ;
4343 lockMsg : string ;
4444 platform : string ;
4545 lastLogin : string ;
You can’t perform that action at this time.
0 commit comments