Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5722a638
authored
Mar 19, 2025
by
huyue
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
学习之星修改为可配置
1 parent
ab09f500
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
129 additions
and
47 deletions
api/module/point.js
components/HomeFrame/components/Point/LevelMedal.vue
components/HomeFrame/components/Point/Ranking.vue
components/HomeFrame/components/Point/index.vue
api/module/point.js
View file @
5722a63
...
@@ -181,5 +181,13 @@ module.exports = {
...
@@ -181,5 +181,13 @@ module.exports = {
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
data
...
data
})
})
},
/** 查询勋章列表 */
searchLevelConfig
(
data
)
{
return
http
.
post
({
method
:
'dj.api.car.boutique.resident.level.config.page'
,
projectName
:
'boutique'
,
...
data
})
}
}
}
}
components/HomeFrame/components/Point/LevelMedal.vue
View file @
5722a63
...
@@ -75,6 +75,11 @@
...
@@ -75,6 +75,11 @@
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
const
GROUP_LIST
=
[
{
title
:
'学习之星'
,
style
:
'background: #FFFAED;'
,
medalType
:
1
,
logo
:
require
(
'@/assets/images/point/study_star.png'
),
logo_grey
:
require
(
'@/assets/images/point/study_grey.png'
),
content
:
'月度学习类积分排名前10名'
},
{
title
:
'全勤之星'
,
style
:
'background: #FFFAED;'
,
medalType
:
2
,
logo
:
require
(
'@/assets/images/point/time_star.png'
),
logo_grey
:
require
(
'@/assets/images/point/time_grey.png'
),
content
:
'当月全勤准时打卡,不包含请假特批'
},
{
title
:
'平板接待精英'
,
style
:
'background: #FFFAED;'
,
medalType
:
3
,
logo
:
require
(
'@/assets/images/point/elite_star.png'
),
logo_grey
:
require
(
'@/assets/images/point/elite_grey.png'
),
content
:
'平板接待月度无扣分记录'
}
]
import
point
from
'@/mixin/point'
import
point
from
'@/mixin/point'
export
default
{
export
default
{
mixins
:
[
point
],
mixins
:
[
point
],
...
@@ -85,15 +90,11 @@ export default {
...
@@ -85,15 +90,11 @@ export default {
isHigh
:
false
,
isHigh
:
false
,
currentIndex
:
0
,
currentIndex
:
0
,
levelIndex
:
100
,
levelIndex
:
100
,
groupList
:
[
groupList
:
[],
// { title: '学习之星', style: 'background: #FFFAED;', medalType: 1, logo: require('@/assets/images/point/study_star.png'), logo_grey: require('@/assets/images/point/study_grey.png'), content: '月度学习类积分排名前10名' },
{
title
:
'全勤之星'
,
style
:
'background: #FFFAED;'
,
medalType
:
2
,
logo
:
require
(
'@/assets/images/point/time_star.png'
),
logo_grey
:
require
(
'@/assets/images/point/time_grey.png'
),
content
:
'当月全勤准时打卡,不包含请假特批'
},
{
title
:
'平板接待精英'
,
style
:
'background: #FFFAED;'
,
medalType
:
3
,
logo
:
require
(
'@/assets/images/point/elite_star.png'
),
logo_grey
:
require
(
'@/assets/images/point/elite_grey.png'
),
content
:
'平板接待月度无扣分记录'
}
],
couponList
:
[],
couponList
:
[],
badgeList
:
[],
badgeList
:
[],
tabelTh
:
[{
title
:
'积分区间'
,
width
:
8
}],
tabelTh
:
[{
title
:
'积分区间'
,
width
:
8
}],
tabelTr
:
[{
content
:
'奖惩规则(每月)'
}]
tabelTr
:
[{
content
:
'奖惩规则(每月)'
}]
,
}
}
},
},
props
:
{
props
:
{
...
@@ -105,10 +106,19 @@ export default {
...
@@ -105,10 +106,19 @@ export default {
mounted
()
{
mounted
()
{
const
{
isHigh
}
=
this
.
transfer
||
{}
const
{
isHigh
}
=
this
.
transfer
||
{}
this
.
isHigh
=
isHigh
this
.
isHigh
=
isHigh
console
.
log
(
this
.
transfer
);
this
.
getLevelConfig
()
},
},
methods
:
{
methods
:
{
getLevelConfig
()
{
GROUP_LIST
.
forEach
(
item
=>
{
if
(
this
.
transfer
.
levelConfig
.
find
(
i
=>
i
.
levelName
==
item
.
title
))
{
this
.
groupList
.
push
(
item
)
}
})
},
getHtml
(
val
)
{
getHtml
(
val
)
{
return
val
.
replace
(
/
\n
/g
,
'<br/>'
)
if
(
val
)
return
val
.
replace
(
/
\n
/g
,
'<br/>'
)
},
},
getDetail
(
countDate
)
{
getDetail
(
countDate
)
{
this
.
getRule
(
1
)
this
.
getRule
(
1
)
...
@@ -140,7 +150,6 @@ export default {
...
@@ -140,7 +150,6 @@ export default {
const
findData
=
res
.
find
(
i
=>
i
.
medalType
==
item
.
medalType
)
const
findData
=
res
.
find
(
i
=>
i
.
medalType
==
item
.
medalType
)
return
{
...
item
,
...
findData
}
return
{
...
item
,
...
findData
}
})
})
console
.
log
(
this
.
groupList
)
}
}
if
(
levelType
==
1
)
{
if
(
levelType
==
1
)
{
const
th
=
res
.
map
(
item
=>
{
const
th
=
res
.
map
(
item
=>
{
...
...
components/HomeFrame/components/Point/Ranking.vue
View file @
5722a63
...
@@ -30,20 +30,34 @@
...
@@ -30,20 +30,34 @@
<view
class=
"point-body"
>
<view
class=
"point-body"
>
<view
class=
"point-detail"
>
<view
class=
"point-detail"
>
<view
class=
"point-item"
v-for=
"(item, index) in pointList"
:key=
"index"
>
<view
class=
"point-item"
v-for=
"(item, index) in pointList"
:key=
"index"
>
<view
class=
"item-header"
><image
:src=
"item.src"
/></view>
<view
class=
"item-header"
>
<image
:src=
"item.src"
/>
</view>
<view
class=
"item-body"
:style=
"item.style"
>
<view
class=
"item-body"
:style=
"item.style"
>
<view
class=
"item-logo"
v-if=
"item.ranking > 3"
>
{{
item
.
ranking
}}
</view>
<view
class=
"item-logo"
v-if=
"item.ranking > 3"
>
{{
item
.
ranking
}}
</view>
<view
class=
"item-image"
v-else
><image
:src=
"require(`@/assets/images/point/$
{index == 0 ? 'crown_' : 'prize_'}${item.ranking || 1}.png`)" />
</view>
<view
class=
"item-image"
v-else
>
<image
:src=
"require(`@/assets/images/point/$
{index == 0 ? 'crown_' : 'prize_'}${item.ranking || 1}.png`)" />
</view>
<view
class=
"item-name"
>
{{
item
.
staffName
}}
</view>
<view
class=
"item-name"
>
{{
item
.
staffName
}}
</view>
<view
v-if=
"item.badgeList && item.badgeList.length"
:class=
"
{ 'item-prize': index == 0, 'item-medal': index != 0 }">
<image
:src=
"index == 0 ? pointImg[item.badgeList[0].growthType - 1] : starImg[index - 1]"
/></view>
<view
v-if=
"item.badgeList && item.badgeList.length"
:class=
"
{ 'item-prize': index == 0, 'item-medal': index != 0 }">
<image
:src=
"index == 0 ? pointImg[item.badgeList[0].growthType - 1] : starImg[index - 1]"
/>
</view>
<view
class=
"item-num"
>
{{
item
.
pointValue
}}
</view>
<view
class=
"item-num"
>
{{
item
.
pointValue
}}
</view>
</view>
</view>
<view
class=
"desc-wrap"
>
<view
class=
"desc-wrap"
>
<view
class=
"item-body"
v-for=
"(l, i) in item.list"
:key=
"i"
>
<view
class=
"item-body"
v-for=
"(l, i) in item.list"
:key=
"i"
>
<view
class=
"item-logo"
v-if=
"l.ranking > 3"
>
{{
l
.
ranking
}}
</view>
<view
class=
"item-logo"
v-if=
"l.ranking > 3"
>
{{
l
.
ranking
}}
</view>
<view
class=
"item-image"
v-else
><image
:src=
"require(`@/assets/images/point/$
{index == 0 ? 'crown_' : 'prize_'}${l.ranking || 0}.png`)" />
</view>
<view
class=
"item-image"
v-else
>
<image
:src=
"require(`@/assets/images/point/$
{index == 0 ? 'crown_' : 'prize_'}${l.ranking || 0}.png`)" />
</view>
<view
class=
"item-name"
>
{{
l
.
staffName
}}
</view>
<view
class=
"item-name"
>
{{
l
.
staffName
}}
</view>
<view
v-if=
"l.badgeList && l.badgeList.length"
:class=
"
{ 'item-prize': index == 0, 'item-medal': index != 0 }">
<image
:src=
"index == 0 ? pointImg[l.badgeList[0].growthType - 1] : starImg[index - 1]"
/></view>
<view
v-if=
"l.badgeList && l.badgeList.length"
:class=
"
{ 'item-prize': index == 0, 'item-medal': index != 0 }">
<image
:src=
"index == 0 ? pointImg[l.badgeList[0].growthType - 1] : starImg[index - 1]"
/>
</view>
<view
class=
"item-num"
>
{{
l
.
pointValue
}}
</view>
<view
class=
"item-num"
>
{{
l
.
pointValue
}}
</view>
</view>
</view>
</view>
</view>
...
@@ -53,63 +67,85 @@
...
@@ -53,63 +67,85 @@
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
point
from
'@/mixin/point'
const
POINT_LIST
=
[
import
{
get
}
from
'lodash'
export
default
{
mixins
:
[
point
],
data
()
{
return
{
selectItem
:
{},
detail
:
[],
currentIndex
:
0
,
pointImg
:
[
require
(
'@/assets/images/point/bronze_ranking.png'
),
require
(
'@/assets/images/point/silver_ranking.png'
),
require
(
'@/assets/images/point/masonry_ranking.png'
)],
starImg
:
[
require
(
'@/assets/images/point/study_star.png'
),
require
(
'@/assets/images/point/time_star.png'
),
require
(
'@/assets/images/point/elite_star.png'
)],
pointList
:
[
{
{
id
:
0
,
title
:
'积分排行'
,
src
:
require
(
'@/assets/images/point/point_bg.png'
),
src
:
require
(
'@/assets/images/point/point_bg.png'
),
style
:
'background: #fef2cb99;'
,
style
:
'background: #fef2cb99;'
,
isCrown
:
true
isCrown
:
true
},
},
// {
// src: require('@/assets/images/point/study_bg.png'),
// style: 'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
// },
{
{
id
:
1
,
title
:
'学习之星'
,
src
:
require
(
'@/assets/images/point/study_bg.png'
),
style
:
'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
},
{
id
:
2
,
title
:
'全勤之星'
,
src
:
require
(
'@/assets/images/point/diligent_bg.png'
),
src
:
require
(
'@/assets/images/point/diligent_bg.png'
),
style
:
'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
style
:
'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
},
},
{
{
id
:
3
,
title
:
'平板接待精英'
,
src
:
require
(
'@/assets/images/point/ipad_bg.png'
),
src
:
require
(
'@/assets/images/point/ipad_bg.png'
),
style
:
'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
style
:
'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
}
}
],
]
import
point
from
'@/mixin/point'
import
{
get
}
from
'lodash'
export
default
{
mixins
:
[
point
],
data
()
{
return
{
selectItem
:
{},
detail
:
[],
currentIndex
:
0
,
pointImg
:
[
require
(
'@/assets/images/point/bronze_ranking.png'
),
require
(
'@/assets/images/point/silver_ranking.png'
),
require
(
'@/assets/images/point/masonry_ranking.png'
)],
starImg
:
[
require
(
'@/assets/images/point/study_star.png'
),
require
(
'@/assets/images/point/time_star.png'
),
require
(
'@/assets/images/point/elite_star.png'
)],
pointList
:
[],
}
},
props
:
{
transfer
:
{
type
:
Object
,
default
:
()
=>
{
}
}
}
},
},
mounted
()
{},
mounted
()
{
},
methods
:
{
methods
:
{
getDetail
(
countDate
)
{
getLevelConfig
(
countDate
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
i
=
0
if
(
i
!=
0
)
{
POINT_LIST
.
forEach
(
item
=>
{
this
.
getList
(
countDate
,
i
+
1
)
if
(
item
.
title
==
'积分排行'
)
{
}
this
.
pointList
.
push
(
item
)
this
.
getList
(
countDate
,
item
.
id
,
i
)
i
++
}
else
if
(
this
.
transfer
.
levelConfig
.
find
(
i
=>
i
.
levelName
==
item
.
title
))
{
this
.
pointList
.
push
(
item
)
this
.
getList
(
countDate
,
item
.
id
,
i
)
i
++
}
}
this
.
getList
(
countDate
)
})
},
getDetail
(
countDate
)
{
this
.
getLevelConfig
(
countDate
)
},
},
updateDetail
(
countDate
)
{
updateDetail
(
countDate
)
{
this
.
getDetail
(
countDate
)
this
.
getDetail
(
countDate
)
},
},
getList
(
countDate
,
rankingType
)
{
getList
(
countDate
,
rankingType
,
index
)
{
console
.
log
(
rankingType
);
const
params
=
{
uni
.
$api
.
pointApi
.
pointMonthRanking
({
countDate
,
rankingType
}).
then
(
res
=>
{
countDate
const
i
=
rankingType
?
rankingType
:
0
}
if
(
rankingType
!=
0
)
params
.
rankingType
=
rankingType
uni
.
$api
.
pointApi
.
pointMonthRanking
(
params
).
then
(
res
=>
{
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
let
myInfo
=
res
.
find
(
i
=>
i
.
staffPhone
==
userInfo
.
phone
)
let
myInfo
=
res
.
find
(
i
=>
i
.
staffPhone
==
userInfo
.
phone
)
if
(
rankingType
)
{
this
.
$set
(
this
.
pointList
,
index
,
{
...
this
.
pointList
[
index
],
list
:
res
,
...
myInfo
})
this
.
$set
(
this
.
pointList
,
i
-
1
,
{
...
this
.
pointList
[
i
-
1
],
list
:
res
,
...
myInfo
})
}
else
{
this
.
$set
(
this
.
pointList
,
i
,
{
...
this
.
pointList
[
i
],
list
:
res
,
...
myInfo
})
}
console
.
log
(
this
.
pointList
);
})
})
}
}
}
}
...
@@ -119,6 +155,7 @@ export default {
...
@@ -119,6 +155,7 @@ export default {
.point-box
{
.point-box
{
position
:
relative
;
position
:
relative
;
}
}
.nav-bar
{
.nav-bar
{
width
:
100%
;
width
:
100%
;
height
:
96
rpx
;
height
:
96
rpx
;
...
@@ -126,6 +163,7 @@ export default {
...
@@ -126,6 +163,7 @@ export default {
margin-bottom
:
12
rpx
;
margin-bottom
:
12
rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
.back
{
.back
{
height
:
100%
;
height
:
100%
;
aspect-ratio
:
1
/
1
;
aspect-ratio
:
1
/
1
;
...
@@ -134,18 +172,22 @@ export default {
...
@@ -134,18 +172,22 @@ export default {
justify-content
:
center
;
justify-content
:
center
;
pointer-events
:
auto
;
pointer-events
:
auto
;
}
}
.month-box
{
.month-box
{
flex
:
1
;
flex
:
1
;
.month-tabs
{
.month-tabs
{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
.tab-mid
{
.tab-mid
{
font-size
:
32
rpx
;
font-size
:
32
rpx
;
color
:
#1a1a1a
;
color
:
#1a1a1a
;
margin
:
0
120
rpx
;
margin
:
0
120
rpx
;
}
}
}
}
.tab-prev
,
.tab-prev
,
.tab-next
{
.tab-next
{
display
:
flex
;
display
:
flex
;
...
@@ -155,11 +197,13 @@ export default {
...
@@ -155,11 +197,13 @@ export default {
border-radius
:
50%
;
border-radius
:
50%
;
height
:
48
rpx
;
height
:
48
rpx
;
background
:
#ffffff
;
background
:
#ffffff
;
.tab-icon
{
.tab-icon
{
margin-left
:
-4
rpx
;
margin-left
:
-4
rpx
;
margin-top
:
4
rpx
;
margin-top
:
4
rpx
;
}
}
}
}
.tab-next
{
.tab-next
{
.tab-icon
{
.tab-icon
{
margin-left
:
2
rpx
;
margin-left
:
2
rpx
;
...
@@ -167,32 +211,39 @@ export default {
...
@@ -167,32 +211,39 @@ export default {
}
}
}
}
}
}
.point-body
{
.point-body
{
border-radius
:
32
rpx
;
border-radius
:
32
rpx
;
width
:
calc
(
100vw
-
128
rpx
);
width
:
calc
(
100vw
-
128
rpx
);
margin
:
0
64
rpx
;
margin
:
0
64
rpx
;
height
:
calc
(
100vh
-
100
rpx
);
height
:
calc
(
100vh
-
100
rpx
);
.body-top
{
.body-top
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-left
:
80
rpx
;
margin-left
:
80
rpx
;
.level-image
{
.level-image
{
width
:
120
rpx
;
width
:
120
rpx
;
height
:
120
rpx
;
height
:
120
rpx
;
}
}
.level-desc
{
.level-desc
{
margin-left
:
40
rpx
;
margin-left
:
40
rpx
;
.level-name
{
.level-name
{
font-size
:
36
rpx
;
font-size
:
36
rpx
;
color
:
#1a1a1a
;
color
:
#1a1a1a
;
line-height
:
60
rpx
;
line-height
:
60
rpx
;
font-weight
:
700
;
font-weight
:
700
;
}
}
.level-num
{
.level-num
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
color
:
#808291
;
color
:
#808291
;
}
}
}
}
.level-score
{
.level-score
{
font-weight
:
700
;
font-weight
:
700
;
font-size
:
80
rpx
;
font-size
:
80
rpx
;
...
@@ -200,24 +251,28 @@ export default {
...
@@ -200,24 +251,28 @@ export default {
margin-left
:
64
rpx
;
margin-left
:
64
rpx
;
}
}
}
}
.point-detail
{
.point-detail
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
nowrap
;
flex-wrap
:
nowrap
;
width
:
100%
;
width
:
100%
;
overflow-x
:
auto
;
overflow-x
:
auto
;
gap
:
48
rpx
;
gap
:
48
rpx
;
.point-item
{
.point-item
{
width
:
688
rpx
;
width
:
688
rpx
;
background
:
#ffffff73
;
background
:
#ffffff73
;
box-shadow
:
inset
0
0
16
rpx
0
#ffffff
;
box-shadow
:
inset
0
0
16
rpx
0
#ffffff
;
border-radius
:
32
rpx
;
border-radius
:
32
rpx
;
height
:
calc
(
100vh
-
200
rpx
);
height
:
calc
(
100vh
-
200
rpx
);
.item-header
{
.item-header
{
image
{
image
{
width
:
688
rpx
;
width
:
688
rpx
;
height
:
128
rpx
;
height
:
128
rpx
;
}
}
}
}
.item-body
{
.item-body
{
height
:
128
rpx
;
height
:
128
rpx
;
border-radius
:
24
rpx
;
border-radius
:
24
rpx
;
...
@@ -225,6 +280,7 @@ export default {
...
@@ -225,6 +280,7 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
padding
:
0
32
rpx
;
padding
:
0
32
rpx
;
.item-logo
{
.item-logo
{
width
:
80
rpx
;
width
:
80
rpx
;
height
:
80
rpx
;
height
:
80
rpx
;
...
@@ -237,6 +293,7 @@ export default {
...
@@ -237,6 +293,7 @@ export default {
text-align
:
center
;
text-align
:
center
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.item-image
{
.item-image
{
width
:
80
rpx
;
width
:
80
rpx
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -247,38 +304,46 @@ export default {
...
@@ -247,38 +304,46 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
image
{
image
{
width
:
56
rpx
;
width
:
56
rpx
;
height
:
56
rpx
;
height
:
56
rpx
;
}
}
}
}
.item-name
{
.item-name
{
font-size
:
30
rpx
;
font-size
:
30
rpx
;
color
:
#181a1f
;
color
:
#181a1f
;
margin-left
:
20
rpx
;
margin-left
:
20
rpx
;
}
}
.item-prize
{
.item-prize
{
flex
:
1
;
flex
:
1
;
text-align
:
right
;
text-align
:
right
;
margin-right
:
48
rpx
;
margin-right
:
48
rpx
;
image
{
image
{
width
:
148
rpx
;
width
:
148
rpx
;
height
:
56
rpx
;
height
:
56
rpx
;
}
}
}
}
.item-medal
{
.item-medal
{
margin-left
:
16
rpx
;
margin-left
:
16
rpx
;
image
{
image
{
width
:
48
rpx
;
width
:
48
rpx
;
height
:
48
rpx
;
height
:
48
rpx
;
}
}
}
}
.item-num
{
.item-num
{
font-size
:
32
rpx
;
font-size
:
32
rpx
;
color
:
#181a1f
;
color
:
#181a1f
;
margin-left
:
auto
;
margin-left
:
auto
;
}
}
}
}
.desc-wrap
{
.desc-wrap
{
height
:
calc
(
100%
-
292
rpx
);
height
:
calc
(
100%
-
292
rpx
);
overflow-y
:
auto
;
overflow-y
:
auto
;
...
...
components/HomeFrame/components/Point/index.vue
View file @
5722a63
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment