Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gavel-oa-app
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
李苏
gavel-oa-app
Commits
572fba7c
Commit
572fba7c
authored
Jan 16, 2025
by
王向前
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加个人信息、修改密码等用户信息
parent
b0ca57a1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
767 additions
and
357 deletions
+767
-357
routes.js
common/router/modules/routes.js
+7
-4
pages.json
pages.json
+24
-0
login.vue
pages/login/login.vue
+14
-4
modifyPw.vue
pages/user/modifyPw.vue
+94
-0
people.vue
pages/user/people.vue
+414
-191
setting.vue
pages/user/setting.vue
+171
-0
userdetail.vue
pages/user/userdetail.vue
+43
-158
tx.jpg
static/icon/tx.jpg
+0
-0
No files found.
common/router/modules/routes.js
View file @
572fba7c
...
@@ -29,7 +29,6 @@ const routes = [
...
@@ -29,7 +29,6 @@ const routes = [
title
:
'首页'
,
title
:
'首页'
,
},
},
},
},
{
{
path
:
'/pages/user/people'
,
path
:
'/pages/user/people'
,
name
:
'people'
,
name
:
'people'
,
...
@@ -115,9 +114,13 @@ const routes = [
...
@@ -115,9 +114,13 @@ const routes = [
title
:
'工作日报'
,
title
:
'工作日报'
,
},
},
},
},
{
path
:
'/pages/user/modifyPw'
,
name
:
'modifyPw'
,
meta
:
{
title
:
'修改密码'
,
},
},
]
]
export
default
routes
export
default
routes
pages.json
View file @
572fba7c
...
@@ -36,6 +36,30 @@
...
@@ -36,6 +36,30 @@
"navigationBarTitleText"
:
""
"navigationBarTitleText"
:
""
}
}
},
},
{
"path"
:
"pages/user/setting"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/user/userdetail"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/user/modifyPw"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
,
"app-plus"
:
{
"bounce"
:
"none"
}
}
},
{
{
"path"
:
"pages/kqgl/gzrb/index"
,
"path"
:
"pages/kqgl/gzrb/index"
,
"style"
:
{
"style"
:
{
...
...
pages/login/login.vue
View file @
572fba7c
...
@@ -212,6 +212,7 @@
...
@@ -212,6 +212,7 @@
password
:
loginParams
.
encodePWD
,
password
:
loginParams
.
encodePWD
,
newPassword
:
md5
(
this
.
password
)
newPassword
:
md5
(
this
.
password
)
}
}
this
.
logining
=
true
;
this
.
logining
=
true
;
//#ifdef MP-WEIXIN
//#ifdef MP-WEIXIN
//若是小程序平台,则获取到openId。整个过程是静默完成的
//若是小程序平台,则获取到openId。整个过程是静默完成的
...
@@ -265,10 +266,19 @@
...
@@ -265,10 +266,19 @@
"password"
:
""
"password"
:
""
})
})
}
}
this
.
$tip
.
success
(
'登录成功!'
)
this
.
$Router
.
replaceAll
({
uni
.
setStorage
({
name
:
'homepage'
key
:
'userinfo'
,
})
data
:{...
res
.
data
},
success
:
function
(
r
)
{
that
.
$tip
.
success
(
'登录成功!'
)
that
.
$Router
.
replaceAll
({
name
:
'homepage'
})
}
});
}
else
{
}
else
{
this
.
$tip
.
alert
(
res
.
message
);
this
.
$tip
.
alert
(
res
.
message
);
}
}
...
...
pages/user/modifyPw.vue
0 → 100644
View file @
572fba7c
<
template
>
<view
class=
"bg-white"
style=
"height: 100vh;"
>
<<cu-custom
bgColor=
"bg-blue"
:isBack=
"true"
>
<block
slot=
"content"
>
修改密码
</block>
</cu-custom>
<scroll-view
scroll-y
class=
"page"
>
<view
class=
"cu-list menu"
>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.3s'}]">
<view
class=
"content"
>
<text
class=
"text-grey"
>
旧密码:
</text>
</view>
<view
class=
"action"
>
<input
v-model=
"oldPassword"
:focus=
"true"
type=
"password"
>
</view>
</view>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.3s'}]">
<view
class=
"content"
>
<text
class=
"text-grey"
>
新密码:
</text>
</view>
<view
class=
"action"
>
<input
type=
"password"
v-model=
"newPassword"
>
</view>
</view>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.3s'}]" style="border-bottom: 1px solid #eee;">
<view
class=
"content"
>
<text
class=
"text-grey"
>
密码确认:
</text>
</view>
<view
class=
"action"
>
<input
v-model=
"newPasswordConfirm"
type=
"password"
>
</view>
</view>
</view>
<view
class=
"flex justify-center"
>
<button
class=
"cu-btn bg-blue lg margin-left shadow"
style=
"margin-top: 30px;"
@
tap=
"confirm()"
>
修改密码
</button>
</view>
</scroll-view>
</view>
</
template
>
<
script
>
export
default
{
data
:
function
(){
return
{
api
:
"kzzx/user/password/update"
,
oldPassword
:
""
,
newPassword
:
""
,
newPasswordConfirm
:
""
,
}
},
methods
:{
passWord
(
password
)
{
return
/^
(?=
.*
\d)(?=
.*
[
a-zA-Z
])
.
{6,}
$/
.
test
(
password
);
},
confirm
(){
let
that
=
this
if
(
!
this
.
passWord
(
this
.
newPassword
)){
console
.
log
(
this
.
newPassword
)
this
.
$tip
.
toast
(
'密码格式需要6位以上,数字字母组合'
);
return
}
if
(
this
.
newPassword
!=
this
.
newPasswordConfirm
){
this
.
$tip
.
toast
(
'密码确认不一致'
);
return
}
if
(
!
this
.
oldPassword
){
this
.
$tip
.
toast
(
'请输入旧密码'
);
return
}
let
data
=
{
newPassword
:
this
.
newPassword
,
oldPassword
:
this
.
oldPassword
,
newPasswordConfirm
:
this
.
newPasswordConfirm
}
that
.
$http
.
post
(
that
.
api
,
data
).
then
(
e
=>
{
if
(
e
.
data
.
success
){
this
.
$tip
.
toast
(
'修改成功'
);
uni
.
removeStorage
({
key
:
"ACCESS_TOKEN"
})
this
.
$Router
.
replaceAll
({
name
:
"login"
})
}
else
{
this
.
$tip
.
toast
(
e
.
data
.
message
||
"修改失败"
);
}
})
}
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/user/people.vue
View file @
572fba7c
<
template
>
<
template
>
<view>
<view
style=
"height: 100vh;"
>
<scroll-view
scroll-y
class=
"page bg-oa"
>
<cu-custom
bgColor=
"bg-blue"
>
<!-- 头部logo-->
<block
slot=
"content"
>
<view
class=
"UCenter-bg"
@
click=
"remove"
>
{{
title
}}
<image
:src=
"personalList.avatar"
round
class=
"png animation-slide-right margin-bottom-sm"
</block>
mode=
"widthFix"
:style=
"[
{animationDelay: '0.1s'}]">
</image>
</cu-custom>
<view
class=
"text-xl animation-slide-left"
:style=
"[
{animationDelay: '0.2s'}]">
<scroll-view
scroll-y
class=
"page"
>
{{
personalList
.
depart
}}
<view
class=
"bg-white padding-lr-sm margin-top-xs "
style=
"height: 50px;"
>
</view>
<view
class=
"flex"
style=
""
>
<image
src=
"/static/wave.gif"
mode=
"scaleToFill"
class=
"gif-wave"
></image>
<image
style=
"border-radius: 50%;height: 48px;width: 48px;"
src=
"../../static/icon/tx.jpg"
></image>
</view>
<view
style=
"padding-left: 10px;line-height:48px;font-size: 16px;"
>
<!-- 个人信息卡片-->
{{
userName
}}
,
{{
getTimeState
()
}}
<!--
<view
class=
"cu-list menu-avatar"
>
</view>
<view
class=
"cu-item"
>
</view>
<view
class=
"cu-avatar round lg"
style=
"background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg);"
></view>
</view>
<view
class=
"content flex-sub"
>
<view
class=
"flex cu-list menu margin-top-sm shadow-lg radius"
>
<view
class=
"text-grey"
>
{{
personalList
.
avatar
}}
</view>
<view
class=
"cu-item "
@
tap=
"gotoUserPage()"
<view
class=
"text-gray text-sm flex justify-between"
>
style=
"margin-top: 10px;border-bottom: 1px solid #eee;"
>
经理
<view
class=
"content"
>
</view>
<text
class=
" "
></text>
</view>
<text
class=
"text-grey"
>
个人信息
</text>
</view>
</view>
</view>
-->
</view>
<view
class=
"padding flex text-center text-grey bg-white shadow-warp"
>
<view
class=
"cu-item "
url=
"/pages/user/setting"
style=
"margin-top: 10px;"
>
<view
class=
"flex flex-sub flex-direction solid-right animation-slide-top"
<view
class=
"content"
>
:style=
"[
{animationDelay: '0.2s'}]">
<text
class=
" "
></text>
<view
class=
"text-xl text-orange"
>
{{
personalList
.
username
}}
</view>
<text
class=
"text-grey"
>
系统设置
</text>
<view
class=
"margin-top-sm"
><text
class=
"cuIcon-people"
></text>
用户
</view>
</view>
</view>
</view>
</view>
<view
class=
"flex flex-sub flex-direction animation-slide-top"
:style=
"[
{animationDelay: '0.2s'}]">
<view
class=
"text-center margin-bottom-sm margin-top-sm"
>
<view
class=
"text-xl text-green"
>
{{
personalList
.
post
?
personalList
.
post
:
'员工'
}}
</view>
<button
style=
"display: flex;"
class=
"cu-btn lg margin-top-sm bg-white text-red"
<view
class=
"margin-top-sm"
><text
class=
"cuIcon-news"
></text>
职务
</view>
@
tap=
"clearToken"
><text
space=
"emsp"
>
退出当前账号
</text>
</view>
</button>
</view>
</view>
<!-- 列表list-->
<view
class=
"cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius"
>
<view
class=
"cu-tabbar-height"
></view>
<!--
<view
class=
"cu-item arrow animation-slide-bottom"
:style=
"[
{animationDelay: '0.1s'}]">
</scroll-view>
<view
class=
"content"
>
<view
class=
"cu-modal bottom-modal"
:class=
"modalName=='bottomModal'?'show':''"
>
<text
class=
"cuIcon-favorfill text-yellow"
></text>
<view
class=
"cu-dialog"
>
<text
class=
"text-grey"
>
收藏
</text>
<view
class=
"padding-sm"
>
</view>
<view
class=
"cu-list grid col-5 text-sm border"
style=
"background-color: transparent;"
>
</view>
<view
class=
"cu-item"
v-for=
"(item,index) in settingList"
:key=
"index"
<view
class=
"cu-item arrow animation-slide-bottom"
:style=
"[
{animationDelay: '0.3s'}]">
@
tap=
"jumptoPage(item.page)"
>
<view
class=
"content"
>
<view
class=
"padding-tb"
>
<text
class=
"cuIcon-redpacket_fill text-red"
></text>
<view
class=
"text-center"
style=
"position: relative;"
>
<text
class=
"text-grey"
>
红包
</text>
<view
class=
"menu-avatar setting-menu"
style=
"background-color:white;"
>
</view>
<img
:src=
"item.icon"
style=
"padding: 8px"
>
</view>
</view>
<view
class=
"cu-item arrow animation-slide-bottom"
:style=
"[
{animationDelay: '0.5s'}]">
<view
class=
"margin-top-xs"
>
{{
item
.
title
}}
</view>
<navigator
class=
"content"
url=
"/pages/user/userdetail"
hover-class=
"none"
>
<view
class=
"menu-cur message-info"
v-show=
"item.wtsl&&item.wtsl>0"
>
<text
class=
"cuIcon-settingsfill text-cyan"
></text>
<block>
{{
item
.
wtsl
>
99
?
"99+"
:
item
.
wtsl
}}
</block>
<text
class=
"text-grey"
>
设置
</text>
</view>
</navigator>
</view>
</view>
-->
</view>
<view
class=
"cu-item arrow animation-slide-bottom"
:style=
"[
{animationDelay: '0.7s'}]">
<navigator
class=
"content"
hover-class=
"none"
@
tap=
"logout"
>
</view>
<text
class=
"cuIcon-exit text-cyan"
></text>
</view>
<text
class=
"text-grey"
>
退出
</text>
</view>
</navigator>
<view
class=
"flex text-center"
>
</view>
<button
style=
"flex: 1;background: white;"
class=
"cu-btn round margin-sm"
@
tap=
"hideModal"
><text
</view>
space=
"emsp"
>
取消
</text></button>
<view
class=
"cu-tabbar-height"
></view>
</view>
</scroll-view>
</view>
</view>
</view>
</
template
>
<view
class=
"cu-bar tabbar bg-white shadow foot"
>
<view
:class=
"PageCur=='mainPool'?'action text-blue':'action text-black'"
@
click=
"NavChange"
<
script
>
data-cur=
"mainPool"
>
import
appUpdate
from
'common/util/appUpdate.js'
<view
:class=
"PageCur=='mainPool'?'cuIcon-circlefill':'cuIcon-circle'"
></view>
工作台
import
api
from
'@/api/api'
</view>
export
default
{
name
:
"people"
,
<view
:class=
"PageCur=='people'?'action text-blue':'action text-black'"
@
click=
"NavChange"
data
()
{
data-cur=
"people"
>
return
{
<view
:class=
"PageCur=='people'?'cuIcon-peoplefill':'cuIcon-people'"
></view>
个人中心
personalList
:
{
</view>
avatar
:
''
,
</view>
realname
:
''
,
</view>
username
:
''
,
</
template
>
post
:
''
},
<
script
>
positionUrl
:
'/sys/position/list'
,
import
{
departUrl
:
'/sys/user/userDepartList'
,
us
,
userUrl
:
'/sys/user/queryById'
,
os
userId
:
''
,
}
from
'@/common/util/work.js'
id
:
''
export
default
{
};
name
:
"people"
,
},
data
()
{
return
{
PageCur
:
'people'
,
title
:
"个人中心"
,
isShow
:
"gr"
,
userName
:
"用户"
,
userId
:
''
,
id
:
''
,
navList
:
[],
typeList
:
[
],
messageNumber
:
null
,
timer
:
null
,
settingList
:
[],
modalName
:
null
}
},
watch
:
{
watch
:
{
cur
:
{
cur
:
{
immediate
:
true
,
immediate
:
true
,
handler
()
{
handler
()
{
let
that
=
this
// this.load()
uni
.
getStorage
({
// #ifdef APP-PLUS
key
:
'userinfo'
,
// 检测升级
success
:
function
(
e
){
// console.log("appUpdate")
// appUpdate()
that
.
userName
=
e
.
data
.
username
// #endif
},
fail
()
{
}
})
console
.
log
(
'watch'
,
this
.
cur
)
this
.
userId
=
this
.
$store
.
getters
.
userid
;
},
},
},
},
},
},
computed
:
{
isSuperuser
()
{
return
this
.
$store
.
state
.
isSuperuser
}
},
methods
:
{
methods
:
{
remove
()
{
gotoUserPage
(){
uni
.
removeStorageSync
(
'Access-Token'
)
this
.
$Router
.
push
({
},
name
:
"userdetail"
load
()
{
this
.
$http
.
get
(
this
.
userUrl
,
{
params
:
{
id
:
this
.
$store
.
getters
.
userid
}
}).
then
(
res
=>
{
console
.
log
(
"res"
,
res
)
if
(
res
.
data
.
success
)
{
let
perArr
=
res
.
data
.
result
let
avatar
=
(
perArr
.
avatar
&&
perArr
.
avatar
.
length
>
0
)
?
api
.
getFileAccessHttpUrl
(
perArr
.
avatar
)
:
'/static/avatar_boy.png'
this
.
personalList
.
avatar
=
avatar
this
.
personalList
.
realname
=
perArr
.
realname
this
.
personalList
.
username
=
perArr
.
username
this
.
personalList
.
post
=
perArr
.
post
this
.
personalList
.
depart
=
perArr
.
departIds
}
}).
catch
(
err
=>
{
console
.
log
(
err
);
});
},
logout
()
{
uni
.
removeStorage
({
key
:
"ACCESS_TOKEN"
})
uni
.
removeStorage
({
key
:
"userinfo"
})
this
.
$store
.
commit
(
"SET_HASLOGIN"
,
false
)
this
.
$Router
.
replaceAll
({
name
:
"login"
})
})
}
},
}
toMessage
()
{
}
</
script
>
this
.
$Router
.
push
({
name
:
"message"
<
style
>
})
.UCenter-bg
{
this
.
hideModal
()
},
background-size
:
cover
;
hideModal
()
{
height
:
400
rpx
;
this
.
modalName
=
null
;
display
:
flex
;
},
justify-content
:
center
;
jumptoPage
(
value
)
{
padding-top
:
40
rpx
;
this
.
hideModal
()
overflow
:
hidden
;
this
.
$Router
.
push
({
position
:
relative
;
name
:
value
flex-direction
:
column
;
});
align-items
:
center
;
},
color
:
#fff
;
NavChange
:
function
(
e
)
{
font-weight
:
300
;
this
.
PageCur
=
e
.
currentTarget
.
dataset
.
cur
;
text-shadow
:
0
0
3px
rgba
(
0
,
0
,
0
,
0.3
);
this
.
$Router
.
replace
({
}
name
:
this
.
PageCur
})
.UCenter-bg
text
{
},
opacity
:
0.8
;
getTtemDotInfo
()
{},
}
selectPage
()
{},
getTimeState
()
{
.UCenter-bg
image
{
// 获取当前时间
width
:
200
rpx
;
let
timeNow
=
new
Date
();
height
:
200
rpx
;
// 获取当前小时
}
let
hours
=
timeNow
.
getHours
();
// 设置默认文字
.UCenter-bg
.gif-wave
{
let
state
=
``
;
position
:
absolute
;
// 判断当前时间段
width
:
100%
;
if
(
hours
>=
0
&&
hours
<=
10
)
{
bottom
:
0
;
state
=
`早上好!`
;
left
:
0
;
}
else
if
(
hours
>
10
&&
hours
<=
14
)
{
z-index
:
99
;
state
=
`中午好!`
;
mix-blend-mode
:
screen
;
}
else
if
(
hours
>
14
&&
hours
<=
18
)
{
height
:
100
rpx
;
state
=
`下午好!`
;
}
}
else
if
(
hours
>
18
&&
hours
<=
24
)
{
state
=
`晚上好!`
;
map
,
}
.mapBox
{
return
state
;
left
:
0
;
},
z-index
:
99
;
clearToken
()
{
mix-blend-mode
:
screen
;
uni
.
removeStorage
({
height
:
100
rpx
;
key
:
"ACCESS_TOKEN"
}
})
uni
.
removeStorage
({
map
,
key
:
"userinfo"
.mapBox
{
})
width
:
750
rpx
;
this
.
$store
.
commit
(
"SET_HASLOGIN"
,
false
)
height
:
300
rpx
;
this
.
$Router
.
replaceAll
({
}
name
:
"login"
})
.bg-oa
{
},
background-image
:
url('/static/oa.png')
;
background-size
:
180%
100%
;
goToPage
(
item
,
type
)
{
height
:
100vh
;
this
.
$Router
.
push
({
}
name
:
"mywork"
,
params
:
{
id
:
item
.
id
,
name
:
item
.
name
,
type
:
type
}
})
},
},
onShow
()
{
},
onLoad
()
{
},
onHide
()
{
},
onUnload
()
{
},
destroyed
()
{
}
}
</
script
>
<
style
scoped
>
/
deep
/
.cu-list
+
.cu-list
{
margin-top
:
10px
;
}
.menu-cur
{
font-size
:
12px
;
vertical-align
:
middle
;
position
:
absolute
;
display
:
inline-flex
;
align-items
:
center
;
justify-content
:
center
;
box-sizing
:
border-box
;
padding
:
0px
8px
;
height
:
48
rpx
;
font-family
:
Helvetica
Neue
,
Helvetica
,
sans-serif
;
white-space
:
nowrap
;
top
:
0
;
right
:
0
;
}
.butselected
{
width
:
50%
;
color
:
#FFFFFF
;
background-color
:
#0066CC
;
text-align
:
center
;
line-height
:
34px
;
}
.butnoselected
{
width
:
50%
;
color
:
#0066CC
;
background-color
:
#FFFFFF
;
text-align
:
center
;
line-height
:
34px
;
}
.c
{
width
:
50%
;
color
:
#0066CC
;
background-color
:
#FFFFFF
;
text-align
:
center
;
line-height
:
34px
;
}
.peoplebut
{
border
:
1px
solid
#0066CC
;
height
:
36px
;
width
:
25vh
;
border-radius
:
0px
;
margin
:
0
auto
;
margin-bottom
:
10px
;
}
.UCenter-bg
{
/* #ifdef MP-WEIXIN */
background-image
:
url('https://static.jeecg.com/upload/test/blue_1595818030310.png')
;
/* #endif */
/* #ifndef MP-WEIXIN */
/* background-image: url('/static/blue.png'); */
/* #endif */
background-size
:
cover
;
height
:
400
rpx
;
display
:
flex
;
justify-content
:
center
;
padding-top
:
40
rpx
;
overflow
:
hidden
;
position
:
relative
;
flex-direction
:
column
;
align-items
:
center
;
color
:
#fff
;
font-weight
:
300
;
text-shadow
:
0
0
3px
rgba
(
0
,
0
,
0
,
0.3
);
}
.userinforbg
{
background
:
linear-gradient
(
to
top
,
pink
,
#4a86e8
);
}
.UCenter-bg
text
{
opacity
:
0.8
;
}
.UCenter-bg
image
{
width
:
200
rpx
;
height
:
200
rpx
;
}
.UCenter-bg
.gif-wave
{
position
:
absolute
;
width
:
100%
;
bottom
:
0
;
left
:
0
;
z-index
:
99
;
mix-blend-mode
:
screen
;
height
:
100
rpx
;
}
map
,
.mapBox
{
left
:
0
;
z-index
:
99
;
mix-blend-mode
:
screen
;
height
:
100
rpx
;
}
map
,
.mapBox
{
width
:
750
rpx
;
height
:
300
rpx
;
}
.min-height
{
height
:
20
rpx
;
}
.bg-f
{
background-color
:
#f8f8f8
;
}
/
deep
/
.cu-list.menu-avatar
>
.cu-item
:after
,
.cu-list.menu
>
.cu-item
:after
{
border
:
none
;
}
/
deep
/
.nav-owner
.cu-list
.cu-item
{
/* display: flex;
flex-wrap: wrap;
justify-content: space-between; */
margin
:
0
10px
;
border-radius
:
4px
;
/* min-height: 35px; */
}
/
deep
/
.cu-list.grid
>
.cu-item
[
class
*=
cuIcon
]
{
margin-top
:
0
;
}
/
deep
/
.nav-owner
.cu-list
.cu-item
.icon
{
flex
:
1
;
}
/
deep
/
.nav-owner
.cu-list
.cu-item
.text
{}
/
deep
/
.cu-list.menu
>
.cu-item
{
min-height
:
45px
;
}
/
deep
/
.cu-list.menu
>
.cu-item.arrow
:before
{
content
:
"全部\e6a3"
;
font-size
:
12px
;
width
:
36px
;
color
:
#999
;
}
.menu-cur
{
font-size
:
12px
;
vertical-align
:
middle
;
position
:
absolute
;
display
:
inline-flex
;
align-items
:
center
;
justify-content
:
center
;
box-sizing
:
border-box
;
padding
:
0px
8px
;
height
:
48
rpx
;
font-family
:
Helvetica
Neue
,
Helvetica
,
sans-serif
;
white-space
:
nowrap
;
top
:
0
;
right
:
0
;
}
.message-info
{
background-color
:
#ff5500
;
color
:
white
;
width
:
24px
;
height
:
24px
;
border-radius
:
12px
;
font-size
:
12px
;
color
:
white
!important
;
}
.setting-menu
{
background-color
:
white
;
width
:
96
rpx
;
height
:
96
rpx
;
line-height
:
96
rpx
;
border-radius
:
24px
;
display
:
inline-block
;
/* padding: 8px; */
border-radius
:
48
rpx
;
}
.setting-menu
img
{
width
:
64
rpx
;
height
:
64
rpx
;
display
:
inline-block
;
}
</
style
>
</
style
>
\ No newline at end of file
pages/user/setting.vue
0 → 100644
View file @
572fba7c
<
template
>
<view
class=
"bg-white"
style=
"height: 100vh;"
>
<cu-header
bgColor=
"bg-blue"
:isBack=
"true"
>
<block
slot=
"content"
>
{{
title
}}
</block>
</cu-header>
<view>
<view
class=
" flex bg-white cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius"
>
<view
class=
"cu-item arrow animation-slide-bottom"
>
<view
class=
"content flex justify-between"
@
tap=
"goTopage('department')"
>
<view>
<text
class=
"cuIcon-calendar text-blue margin-right-sm"
></text>
<text
class=
"text-grey"
>
部门管理
</text>
</view>
</view>
</view>
<view
class=
"cu-item arrow animation-slide-bottom"
>
<view
class=
"content flex justify-between"
@
tap=
"goTopage('txl')"
>
<view>
<text
class=
"cuIcon-read text-blue margin-right-sm"
></text>
<text
class=
"text-grey"
>
通讯录
</text>
</view>
</view>
</view>
<view
class=
"cu-item arrow animation-slide-bottom"
>
<view
class=
"content flex justify-between"
@
tap=
"goTopage('glysetting')"
>
<view>
<text
class=
"cuIcon-my text-blue margin-right-sm"
></text>
<text
class=
"text-grey"
>
管理员设置
</text>
</view>
</view>
</view>
<view
class=
"cu-item arrow animation-slide-bottom"
>
<view
class=
"content flex justify-between"
@
tap=
"goTopage('gsinfo')"
>
<view>
<text
class=
"cuIcon-servicefill text-blue margin-right-sm"
></text>
<text
class=
"text-grey"
>
关于我们
</text>
</view>
<view>
</view>
</view>
</view>
<view
v-if=
"showV"
class=
"cu-item arrow animation-slide-bottom"
>
<view
class=
"content flex justify-between"
>
<view>
<text
class=
"cuIcon-info text-blue margin-right-sm"
></text>
<text
class=
"text-grey"
>
当前版本
</text>
</view>
<view
style=
"font-size: 14px;"
>
{{
V
}}
</view>
</view>
</view>
<!--
<view
class=
"cu-item arrow animation-slide-bottom"
:style=
"[
{animationDelay: '0.1s'}]" >
<view
class=
"content flex justify-between"
>
<view>
<text
class=
"cuIcon-vip text-yellow margin-right-sm"
></text>
<text
class=
"text-grey"
>
当前版本
</text>
</view>
<view>
<text
class=
"text-grey"
></text>
</view>
</view>
</view>
-->
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
:
function
(){
return
{
fileSizeString
:
"0kb"
,
title
:
"系统设置"
,
showV
:
false
,
V
:
0
}
},
watch
:
{
// cur: {
// immediate: true,
// handler() {
// this.formatSize()
// },
// },
},
computed
:
{
isSuperuser
()
{
return
this
.
$store
.
state
.
isSuperuser
}
},
methods
:{
goTopage
(
e
){
this
.
$Router
.
push
({
name
:
e
})
},
clearCache
()
{
let
that
=
this
;
let
os
=
plus
.
os
.
name
;
if
(
os
==
'Android'
)
{
let
main
=
plus
.
android
.
runtimeMainActivity
();
let
sdRoot
=
main
.
getCacheDir
();
let
files
=
plus
.
android
.
invoke
(
sdRoot
,
"listFiles"
);
let
len
=
files
.
length
;
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
let
filePath
=
''
+
files
[
i
];
// 没有找到合适的方法获取路径,这样写可以转成文件路径
plus
.
io
.
resolveLocalFileSystemURL
(
filePath
,
function
(
entry
)
{
if
(
entry
.
isDirectory
)
{
entry
.
removeRecursively
(
function
(
entry
)
{
//递归删除其下的所有文件及子目录
uni
.
showToast
({
title
:
'缓存清理完成'
,
duration
:
2000
});
that
.
formatSize
();
// 重新计算缓存
},
function
(
e
)
{
console
.
log
(
e
.
message
)
});
}
else
{
entry
.
remove
();
}
},
function
(
e
)
{
console
.
log
(
'文件路径读取失败'
)
});
}
}
else
{
// ios
plus
.
cache
.
clear
(
function
()
{
uni
.
showToast
({
title
:
'缓存清理完成'
,
duration
:
2000
});
that
.
formatSize
();
});
}},
// 计算缓存
formatSize
()
{
let
that
=
this
;
plus
.
cache
.
calculate
(
function
(
size
)
{
let
sizeCache
=
parseInt
(
size
);
if
(
sizeCache
==
0
)
{
that
.
fileSizeString
=
"0B"
;
}
else
if
(
sizeCache
<
1024
)
{
that
.
fileSizeString
=
sizeCache
+
"B"
;
}
else
if
(
sizeCache
<
1048576
)
{
that
.
fileSizeString
=
(
sizeCache
/
1024
).
toFixed
(
2
)
+
"KB"
;
}
else
if
(
sizeCache
<
1073741824
)
{
that
.
fileSizeString
=
(
sizeCache
/
1048576
).
toFixed
(
2
)
+
"MB"
;
}
else
{
that
.
fileSizeString
=
(
sizeCache
/
1073741824
).
toFixed
(
2
)
+
"GB"
;
}
});
}
},
onLoad
(
d
)
{
let
that
=
this
//#ifdef APP-PLUS
let
platform
=
uni
.
getSystemInfoSync
().
platform
;
if
(
platform
==
'android'
){
that
.
showV
=
true
plus
.
runtime
.
getProperty
(
plus
.
runtime
.
appid
,
function
(
wgtinfo
)
{
that
.
V
=
wgtinfo
.
version
})
}
//#endif
}
}
</
script
>
<
style
>
</
style
>
pages/user/userdetail.vue
View file @
572fba7c
<
template
>
<
template
>
<view>
<view>
<cu-custom
bgColor=
"bg-blue"
:isBack=
"true"
>
<block
slot=
"content"
>
{{
title
}}
</block>
</cu-custom>
<scroll-view
scroll-y
class=
"page"
>
<scroll-view
scroll-y
class=
"page"
>
<cu-custom
bgColor=
"bg-gradual-pink"
:isBack=
"true"
>
<block
slot=
"backText"
>
返回
</block>
<block
slot=
"content"
>
用户详情
</block>
<view
slot=
"right"
@
tap=
"rightClick"
>
编辑
</view>
</cu-custom>
<!-- list列表 -->
<view
class=
"cu-list menu"
>
<view
class=
"cu-list menu"
>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.1s'}]">
<view
class=
"content"
>
<text
class=
"text-grey"
>
头像
</text>
</view>
<view
class=
"action"
>
<view
class=
"cu-avatar round sm"
:style=
"
{backgroundImage: 'url(' + personalMsg.avatar + ')'}">
</view>
</view>
</view>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.2s'}]">
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.2s'}]">
<view
class=
"content"
>
<view
class=
"content"
>
<text
class=
"text-grey"
>
姓名
</text>
<text
class=
"text-grey"
>
姓名
</text>
</view>
</view>
<view
class=
"action"
>
<view
class=
"action"
>
<text
class=
"text-grey"
>
{{
personalMsg
.
real
name
}}
</text>
<text
class=
"text-grey"
>
{{
userinfo
.
user
name
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.3s'}]">
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.3s'}]">
<view
class=
"content"
>
<view
class=
"content"
>
<text
class=
"text-grey"
>
性别
</text>
<text
class=
"text-grey"
>
手机号
</text>
</view>
<view
class=
"action"
>
<text
class=
"text-grey"
>
{{
personalMsg
.
sex
}}
</text>
</view>
</view>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.4s'}]">
<view
class=
"content"
>
<text
class=
"text-grey"
>
生日
</text>
</view>
<view
class=
"action"
>
<text
class=
"text-grey"
>
{{
personalMsg
.
birthday
}}
</text>
</view>
</view>
</view>
<view
class=
"cu-list menu"
>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.5s'}]">
<view
class=
"content"
>
<text
class=
"text-grey"
>
对外信息展示
</text>
</view>
<view
class=
"action"
>
<text
class=
"text-grey"
>
{{
getSubStringText
(
personalMsg
.
realname
+
'@'
+
personalMsg
.
orgCode
,
11
)
}}
</text>
</view>
</view>
</view>
<view
class=
"cu-list menu"
>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.6s'}]">
<view
class=
"content"
>
<text
class=
"text-grey"
>
所在部门
</text>
</view>
<view
class=
"action"
>
<text
class=
"text-grey"
>
{{
personalMsg
.
orgCode
}}
</text>
</view>
</view>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.7s'}]">
<view
class=
"content"
>
<text
class=
"text-grey"
>
工号
</text>
</view>
</view>
<view
class=
"action"
>
<view
class=
"action"
>
<text
class=
"text-grey"
>
{{
personalMsg
.
workNo
}}
</text>
<text
class=
"text-grey"
>
{{
userinfo
.
phone
||
"未设置"
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.8s'}]">
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.3s'}]">
<view
class=
"content"
>
<text
class=
"text-grey"
>
状态
</text>
</view>
<view
class=
"action"
>
<text
class=
"text-grey"
>
{{
personalMsg
.
status
}}
</text>
</view>
</view>
</view>
<view
class=
"cu-list menu"
>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.9s'}]">
<view
class=
"content"
>
<view
class=
"content"
>
<text
class=
"text-grey"
>
手机
</text>
<text
class=
"text-grey"
>
邮箱
</text>
</view>
</view>
<view
class=
"action"
>
<view
class=
"action"
>
<text
class=
"text-grey"
>
{{
personalMsg
.
phone
}}
</text>
<text
class=
"text-grey"
>
{{
userinfo
.
email
||
"未设置"
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '
1
s'}]">
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '
0.3
s'}]">
<view
class=
"content"
>
<view
class=
"content"
>
<text
class=
"text-grey"
>
邮箱
</text>
<text
class=
"text-grey"
>
部门
</text>
</view>
</view>
<view
class=
"action"
>
<view
class=
"action"
>
<text
class=
"text-grey"
>
{{
personalMsg
.
email
}}
</text>
<text
class=
"text-grey"
>
{{
userinfo
.
bmmc
||
"未设置"
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"cu-list menu"
>
<view
class=
"cu-list menu"
>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '1.1s'}]">
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '0.5s'}]">
<view
class=
"content"
>
<text
class=
"text-grey"
>
职务
</text>
</view>
<view
class=
"action"
>
<text
class=
"text-grey"
>
{{
personalMsg
.
post
}}
</text>
</view>
</view>
<view
class=
"cu-item animation-slide-bottom"
:style=
"[
{animationDelay: '1.2s'}]">
<view
class=
"content"
>
<text
class=
"text-grey"
>
身份
</text>
</view>
<view
class=
"action"
>
<text
class=
"text-grey"
>
{{
personalMsg
.
identity
}}
</text>
</view>
</view>
<view
class=
"cu-item animation-slide-bottom"
v-if=
"personalMsg.identity =='上级'"
>
<view
class=
"content"
>
<view
class=
"content"
>
<text
class=
"text-grey"
>
负责部门
</text>
<text
class=
"text-grey"
>
修改密码
</text>
</view>
</view>
<view
class=
"action"
>
<view
class=
"action"
>
<text
class=
"text-grey
"
>
{{
personalMsg
.
departIds
}}
</text>
<text
class=
"text-grey
"
@
tap=
"modify()"
style=
"color: cornflowerblue;cursor: pointer;"
>
{{
'前往修改'
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
api
from
'@/api/api.js'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
personalMsg
:{
userid
:
""
,
avatar
:
''
,
userinfo
:{},
realname
:
''
,
apiUser
:
"kzzx/user/query"
,
username
:
''
,
title
:
"个人信息"
sex
:
1
,
birthday
:
new
Date
(),
orgCode
:
''
,
workNo
:
''
,
status
:
1
,
phone
:
''
,
telephone
:
''
,
email
:
''
,
post
:
''
,
departIds
:
''
,
identity
:
''
,
},
userUrl
:
'/sys/user/queryById'
,
positionUrl
:
'/sys/position/list'
,
departUrl
:
'/sys/user/userDepartList'
};
};
},
},
onLoad
()
{
onLoad
()
{
...
@@ -176,55 +88,28 @@
...
@@ -176,55 +88,28 @@
url: '/pages/user/useredit?item='+item
url: '/pages/user/useredit?item='+item
}); */
}); */
},
},
modify
(){
this
.
$Router
.
push
({
name
:
"modifyPw"
})
},
loadinfo
(){
loadinfo
(){
this
.
$http
.
get
(
this
.
userUrl
,{
params
:{
id
:
this
.
$store
.
getters
.
userid
}}).
then
(
res
=>
{
let
that
=
this
console
.
log
(
"用户"
,
res
)
uni
.
getStorage
({
if
(
res
.
data
.
success
)
{
key
:
'userinfo'
,
let
result
=
res
.
data
.
result
success
:
function
(
e
){
if
(
result
.
avatar
&&
result
.
avatar
.
length
>
0
)
that
.
userid
=
e
.
data
.
userkey
this
.
personalMsg
.
avatar
=
api
.
getFileAccessHttpUrl
(
result
.
avatar
)
that
.
$http
.
post
(
that
.
apiUser
,{
id
:
that
.
userid
}).
then
(
e
=>
{
this
.
personalMsg
.
realname
=
result
.
realname
if
(
e
.
data
.
success
){
this
.
personalMsg
.
username
=
result
.
username
that
.
userinfo
=
e
.
data
.
data
.
records
[
0
]
this
.
personalMsg
.
post
=
result
.
post
}
else
{
this
.
personalMsg
.
sex
=
result
.
sex
===
1
?
'男'
:
'女'
this
.
personalMsg
.
birthday
=
result
.
birthday
==
null
?
'无'
:
result
.
birthday
this
.
personalMsg
.
departIds
=
result
.
departIds
this
.
personalMsg
.
workNo
=
result
.
workNo
this
.
personalMsg
.
phone
=
result
.
phone
this
.
personalMsg
.
telephone
=
result
.
telephone
==
null
?
'无'
:
result
.
telephone
this
.
personalMsg
.
email
=
result
.
email
this
.
personalMsg
.
post
=
result
.
post
this
.
personalMsg
.
identity
=
result
.
identity
===
1
?
'普通成员'
:
'上级'
this
.
personalMsg
.
status
=
result
.
status
===
1
?
'正常'
:
'冻结'
this
.
personalMsg
.
orgCode
=
result
.
orgCode
}
}).
catch
(
e
=>
{
console
.
log
(
"请求错误"
,
e
)
})
this
.
$http
.
get
(
this
.
departUrl
,{
params
:{
userId
:
this
.
$store
.
getters
.
userid
}}).
then
(
res
=>
{
if
(
res
.
success
)
{
for
(
let
item
of
res
.
result
){
this
.
personalMsg
.
orgCode
=
item
.
title
this
.
personalMsg
.
departIds
=
item
.
title
}
}
}).
catch
(
e
=>
{
console
.
log
(
"请求错误"
,
e
)
})
this
.
$http
.
get
(
this
.
positionUrl
).
then
(
res
=>
{
if
(
res
.
success
)
{
let
postArr
=
res
.
result
.
records
for
(
let
item
of
postArr
){
if
(
this
.
personalMsg
.
post
==
item
.
code
){
this
.
personalMsg
.
post
=
item
.
name
}
}
}
})
},
fail
()
{
}
}
}).
catch
(
e
=>
{
})
console
.
log
(
"请求错误"
,
e
)
})
},
},
}
}
}
}
...
...
static/icon/tx.jpg
0 → 100644
View file @
572fba7c
87.9 KB
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