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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
131 additions
and
49 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 = {
projectName
:
'boutique'
,
...
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 @@
</view>
</
template
>
<
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'
export
default
{
mixins
:
[
point
],
...
...
@@ -85,15 +90,11 @@ export default {
isHigh
:
false
,
currentIndex
:
0
,
levelIndex
:
100
,
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
:
'平板接待月度无扣分记录'
}
],
groupList
:
[],
couponList
:
[],
badgeList
:
[],
tabelTh
:
[{
title
:
'积分区间'
,
width
:
8
}],
tabelTr
:
[{
content
:
'奖惩规则(每月)'
}]
tabelTr
:
[{
content
:
'奖惩规则(每月)'
}]
,
}
},
props
:
{
...
...
@@ -105,10 +106,19 @@ export default {
mounted
()
{
const
{
isHigh
}
=
this
.
transfer
||
{}
this
.
isHigh
=
isHigh
console
.
log
(
this
.
transfer
);
this
.
getLevelConfig
()
},
methods
:
{
getLevelConfig
()
{
GROUP_LIST
.
forEach
(
item
=>
{
if
(
this
.
transfer
.
levelConfig
.
find
(
i
=>
i
.
levelName
==
item
.
title
))
{
this
.
groupList
.
push
(
item
)
}
})
},
getHtml
(
val
)
{
return
val
.
replace
(
/
\n
/g
,
'<br/>'
)
if
(
val
)
return
val
.
replace
(
/
\n
/g
,
'<br/>'
)
},
getDetail
(
countDate
)
{
this
.
getRule
(
1
)
...
...
@@ -140,7 +150,6 @@ export default {
const
findData
=
res
.
find
(
i
=>
i
.
medalType
==
item
.
medalType
)
return
{
...
item
,
...
findData
}
})
console
.
log
(
this
.
groupList
)
}
if
(
levelType
==
1
)
{
const
th
=
res
.
map
(
item
=>
{
...
...
components/HomeFrame/components/Point/Ranking.vue
View file @
5722a63
...
...
@@ -30,20 +30,34 @@
<view
class=
"point-body"
>
<view
class=
"point-detail"
>
<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-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
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>
<view
class=
"desc-wrap"
>
<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-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
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>
</view>
...
...
@@ -53,6 +67,33 @@
</view>
</
template
>
<
script
>
const
POINT_LIST
=
[
{
id
:
0
,
title
:
'积分排行'
,
src
:
require
(
'@/assets/images/point/point_bg.png'
),
style
:
'background: #fef2cb99;'
,
isCrown
:
true
},
{
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'
),
style
:
'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
},
{
id
:
3
,
title
:
'平板接待精英'
,
src
:
require
(
'@/assets/images/point/ipad_bg.png'
),
style
:
'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
}
]
import
point
from
'@/mixin/point'
import
{
get
}
from
'lodash'
export
default
{
...
...
@@ -64,52 +105,47 @@ export default {
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
:
[
{
src
:
require
(
'@/assets/images/point/point_bg.png'
),
style
:
'background: #fef2cb99;'
,
isCrown
:
true
},
// {
// src: require('@/assets/images/point/study_bg.png'),
// style: 'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
// },
{
src
:
require
(
'@/assets/images/point/diligent_bg.png'
),
style
:
'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
},
{
src
:
require
(
'@/assets/images/point/ipad_bg.png'
),
style
:
'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
}
],
pointList
:
[],
}
},
props
:
{
transfer
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
mounted
()
{},
mounted
()
{
},
methods
:
{
getDetail
(
countDate
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
if
(
i
!=
0
)
{
this
.
getList
(
countDate
,
i
+
1
)
getLevelConfig
(
countDate
)
{
let
i
=
0
POINT_LIST
.
forEach
(
item
=>
{
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
)
{
this
.
getDetail
(
countDate
)
},
getList
(
countDate
,
rankingType
)
{
console
.
log
(
rankingType
);
uni
.
$api
.
pointApi
.
pointMonthRanking
({
countDate
,
rankingType
}).
then
(
res
=>
{
const
i
=
rankingType
?
rankingType
:
0
getList
(
countDate
,
rankingType
,
index
)
{
const
params
=
{
countDate
}
if
(
rankingType
!=
0
)
params
.
rankingType
=
rankingType
uni
.
$api
.
pointApi
.
pointMonthRanking
(
params
).
then
(
res
=>
{
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
let
myInfo
=
res
.
find
(
i
=>
i
.
staffPhone
==
userInfo
.
phone
)
if
(
rankingType
)
{
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
);
this
.
$set
(
this
.
pointList
,
index
,
{
...
this
.
pointList
[
index
],
list
:
res
,
...
myInfo
})
})
}
}
...
...
@@ -119,6 +155,7 @@ export default {
.point-box
{
position
:
relative
;
}
.nav-bar
{
width
:
100%
;
height
:
96
rpx
;
...
...
@@ -126,6 +163,7 @@ export default {
margin-bottom
:
12
rpx
;
display
:
flex
;
align-items
:
center
;
.back
{
height
:
100%
;
aspect-ratio
:
1
/
1
;
...
...
@@ -134,18 +172,22 @@ export default {
justify-content
:
center
;
pointer-events
:
auto
;
}
.month-box
{
flex
:
1
;
.month-tabs
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.tab-mid
{
font-size
:
32
rpx
;
color
:
#1a1a1a
;
margin
:
0
120
rpx
;
}
}
.tab-prev
,
.tab-next
{
display
:
flex
;
...
...
@@ -155,11 +197,13 @@ export default {
border-radius
:
50%
;
height
:
48
rpx
;
background
:
#ffffff
;
.tab-icon
{
margin-left
:
-4
rpx
;
margin-top
:
4
rpx
;
}
}
.tab-next
{
.tab-icon
{
margin-left
:
2
rpx
;
...
...
@@ -167,32 +211,39 @@ export default {
}
}
}
.point-body
{
border-radius
:
32
rpx
;
width
:
calc
(
100vw
-
128
rpx
);
margin
:
0
64
rpx
;
height
:
calc
(
100vh
-
100
rpx
);
.body-top
{
display
:
flex
;
align-items
:
center
;
margin-left
:
80
rpx
;
.level-image
{
width
:
120
rpx
;
height
:
120
rpx
;
}
.level-desc
{
margin-left
:
40
rpx
;
.level-name
{
font-size
:
36
rpx
;
color
:
#1a1a1a
;
line-height
:
60
rpx
;
font-weight
:
700
;
}
.level-num
{
font-size
:
24
rpx
;
color
:
#808291
;
}
}
.level-score
{
font-weight
:
700
;
font-size
:
80
rpx
;
...
...
@@ -200,24 +251,28 @@ export default {
margin-left
:
64
rpx
;
}
}
.point-detail
{
display
:
flex
;
flex-wrap
:
nowrap
;
width
:
100%
;
overflow-x
:
auto
;
gap
:
48
rpx
;
.point-item
{
width
:
688
rpx
;
background
:
#ffffff73
;
box-shadow
:
inset
0
0
16
rpx
0
#ffffff
;
border-radius
:
32
rpx
;
height
:
calc
(
100vh
-
200
rpx
);
.item-header
{
image
{
width
:
688
rpx
;
height
:
128
rpx
;
}
}
.item-body
{
height
:
128
rpx
;
border-radius
:
24
rpx
;
...
...
@@ -225,6 +280,7 @@ export default {
display
:
flex
;
align-items
:
center
;
padding
:
0
32
rpx
;
.item-logo
{
width
:
80
rpx
;
height
:
80
rpx
;
...
...
@@ -237,6 +293,7 @@ export default {
text-align
:
center
;
box-sizing
:
border-box
;
}
.item-image
{
width
:
80
rpx
;
box-sizing
:
border-box
;
...
...
@@ -247,38 +304,46 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
image
{
width
:
56
rpx
;
height
:
56
rpx
;
}
}
.item-name
{
font-size
:
30
rpx
;
color
:
#181a1f
;
margin-left
:
20
rpx
;
}
.item-prize
{
flex
:
1
;
text-align
:
right
;
margin-right
:
48
rpx
;
image
{
width
:
148
rpx
;
height
:
56
rpx
;
}
}
.item-medal
{
margin-left
:
16
rpx
;
image
{
width
:
48
rpx
;
height
:
48
rpx
;
}
}
.item-num
{
font-size
:
32
rpx
;
color
:
#181a1f
;
margin-left
:
auto
;
}
}
.desc-wrap
{
height
:
calc
(
100%
-
292
rpx
);
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