Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maple
TOSTUMI
Commits
f0ace35b
Commit
f0ace35b
authored
Sep 04, 2020
by
MrShi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev_ssz分支,账号模块v2.0
parent
d4a09175
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
95 additions
and
16 deletions
+95
-16
config.ts
config/config.ts
+3
-3
TableShow.tsx
src/components/TableShow/TableShow.tsx
+2
-2
permission.ts
src/models/permission.ts
+51
-0
Account.tsx
src/pages/AccountManagement/account/Account.tsx
+7
-4
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+4
-1
account.tsx
src/services/account.tsx
+6
-6
permission.ts
src/services/permission.ts
+22
-0
No files found.
config/config.ts
View file @
f0ace35b
...
...
@@ -254,13 +254,13 @@ export default defineConfig({
{path: './AccountManagementEdit',component:'./AccountManagement/AccountManagement/AccountManagement'},
]
},*/
{
path
:
'./
AccountManageme
nt'
,
path
:
'./
accou
nt'
,
name
:
'accountmanagement1'
,
routes
:
[
{
path
:
'./'
,
component
:
'./AccountManagement/account/Account'
},
{
path
:
'./AccountManagementEdit'
,
component
:
'./AccountManagement/AccountManagement/AccountManagement'
},
{
path
:
'./edit'
,
component
:
'./AccountManagement/account/AccountEdit'
},
{
path
:
'./reset'
,
component
:
'./AccountManagement/account/AccountReset'
},
]
},
...
...
src/components/TableShow/TableShow.tsx
View file @
f0ace35b
...
...
@@ -12,13 +12,13 @@ const TableShow = (props:any) => {
const
key
=
[
[
"Service Community"
,
"communityName"
],
[
"User Name"
,
"accountName"
],
[
"Facility Bookings"
,
"facilityTitle"
],
[
"Facility Bookings"
,
"facilityTitle"
],
[
"Actions"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
Space
size=
"middle"
>
<
a
onClick=
{
goTo
.
bind
(
this
,
record
)
}
>
Detail
</
a
></
Space
>)],
]
return
(
<>
<
Table
dataSource=
{
Data2
.
data
}
columns=
{
columns2
}
></
Table
>
{
/*<Table dataSource={Data2.data} columns={columns2}></Table>*/
}
</>
);
};
...
...
src/models/permission.ts
0 → 100644
View file @
f0ace35b
import
{
getPermission
,
savePermission
,
checkPermission
}
from
'@/services/permission'
;
export
default
{
namespace
:
'permissionModel'
,
state
:
{
data
:
[],
},
effects
:
{
*
getAccountPermission
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
getPermission
,
payload
);
yield
put
({
type
:
"get"
,
});
if
(
callback
)
callback
(
response
);
},
*
saveAccountPermission
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
savePermission
,
payload
);
yield
put
({
type
:
"save"
,
});
if
(
callback
)
callback
(
response
);
},
*
checkAccountPermission
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
checkPermission
,
payload
);
yield
put
({
type
:
"check"
,
});
if
(
callback
)
callback
(
response
);
},
},
reducers
:
{
get
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
};
},
save
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
};
},
check
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
};
},
},
};
src/pages/AccountManagement/account/Account.tsx
View file @
f0ace35b
...
...
@@ -114,7 +114,8 @@ class Account extends React.Component {
status
:
this
.
state
.
status
,
moment
:
this
.
state
.
moment
,
name
:
this
.
state
.
name
,
leaderID
:
this
.
props
.
currentUser
.
userid
,
// leaderID: this.props.currentUser.userid,
leaderID
:
"21232f297a57a5a743894a0e4a801fc3"
,
userPhone
:
"18813787835"
};
console
.
log
(
params
);
...
...
@@ -188,7 +189,7 @@ class Account extends React.Component {
}
}
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/account/edit'
,
pathname
:
'/
AccountManagement/
account/edit'
,
query
:
params
,
}))
};
...
...
@@ -292,10 +293,12 @@ class Account extends React.Component {
<
span
>
<
Button
style=
{
{
background
:
'transparent'
,
border
:
0
,
color
:
'#1890FF'
}
}
onClick=
{
()
=>
this
.
edit
(
record
)
}
>
Edit
</
Button
>
{
record
.
userID
==
1
||
record
.
userID
==
this
.
props
.
currentUser
.
userid
?
''
:
<
Button
style=
{
{
background
:
'transparent'
,
border
:
0
,
color
:
'#1890FF'
}
}
onClick=
{
()
=>
this
.
changeStatus
(
record
)
}
>
{
record
.
userStatus
==
1
?
"lock"
:
"unlock"
}
</
Button
>
{
/*{record.userID == 1||record.userID == this.props.currentUser.userid?'':
<Button style={{background: 'transparent', border: 0, color: '#1890FF'}}
onClick={() => this.changeStatus(record)}>
{
record
.
userStatus
==
1
?
"lock"
:
"unlock"
}
</
Button
>
}
{record.userStatus == 1 ? "lock" : "unlock"}</Button>}
*/
}
</
span
>
),
},
...
...
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
f0ace35b
...
...
@@ -111,7 +111,7 @@ class AccountEdit extends React.Component {
//跳转到账户页面
back
=
()
=>
{
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/account'
,
pathname
:
'/
AccountManagement/
account'
,
}))
};
//获取所有上级
...
...
@@ -491,6 +491,9 @@ class AccountEdit extends React.Component {
flag
:
0
,
})
}
this
.
setState
({
flag
:
1
,
})
});
if
(
params
.
id
!=
''
&&
params
.
id
!=
null
)
{
this
.
getPermission
(
params
.
account
);
...
...
src/services/account.tsx
View file @
f0ace35b
import
request
from
'@/utils/request'
;
export
async
function
getAccount
(
params
)
{
return
request
(
'/
api/
tos/user/getAllInfrom'
,
{
return
request
(
'/tos/user/getAllInfrom'
,
{
method
:
'POST'
,
data
:
params
,
});
}
export
async
function
delAccount
(
params
)
{
return
request
(
'/
api/
tos/users/del'
,
{
return
request
(
'/tos/users/del'
,
{
method
:
'POST'
,
data
:
params
,
});
}
export
async
function
saveAccount
(
params
)
{
return
request
(
'/
api/
tos/users/save'
,
{
return
request
(
'/tos/users/save'
,
{
method
:
'POST'
,
data
:
params
,
});
}
export
async
function
getAllLeader
(
params
)
{
return
request
(
'/
api/
users/getAllLeader'
,
{
return
request
(
'/users/getAllLeader'
,
{
method
:
'POST'
,
data
:
params
,
});
}
export
async
function
checkAccountByName
(
params
)
{
return
request
(
'/
api/
tos/checkAccount/username'
,
{
return
request
(
'/tos/checkAccount/username'
,
{
method
:
'POST'
,
data
:
params
,
});
}
export
async
function
quitAndUser
(
params
)
{
return
request
(
'/
api/
tos/users/quitAndUser'
,
{
return
request
(
'/tos/users/quitAndUser'
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
src/services/permission.ts
0 → 100644
View file @
f0ace35b
import
request
from
'@/utils/request'
;
export
async
function
getPermission
(
params
)
{
return
request
(
'/tos/account/permission/getPermission'
,
{
method
:
'POST'
,
data
:
params
,
});
}
export
async
function
savePermission
(
params
)
{
return
request
(
'/tos/account/permission/savePermission'
,
{
method
:
'POST'
,
data
:
params
,
});
}
export
async
function
checkPermission
(
params
)
{
return
request
(
'/tos/permission/checkPermission'
,
{
method
:
'POST'
,
data
:
params
,
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment