Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
glsx-posters
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f1b21ee5
authored
Jun 12, 2023
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
6月需求
1 parent
91ee7c38
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
121 additions
and
12 deletions
src/utils/emo.ts
src/views/dj/gladNews.vue
src/views/dj/interface.ts
src/views/dj/morning.vue
src/views/dj/morningInterface.ts
src/views/dj/personalGoodNews.vue
src/views/dj/personalInterface.ts
src/utils/emo.ts
0 → 100644
View file @
f1b21ee
/*
* @Description: 表情列表
* @Author: huyue
* @Date: 2023-06-08 17:32:17
* @LastEditors: huyue
* @LastEditTime: 2023-06-08 17:32:40
*/
const
emoji
=
[
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
],
[
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
],
[
'酷'
,
'囧'
,
'抓狂'
,
'吐'
,
'微笑'
,
'愉快'
,
'白眼'
,
'傲慢'
],
[
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
],
[
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
],
[
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
],
[
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
],
[
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
],
[
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
],
[
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
],
[
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
],
[
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
],
[
'磕头'
,
'回头'
,
'跳绳'
,
'投降'
,
'挥手'
,
'激动'
,
'街舞'
,
'左太极'
],
[
'右太极'
,
'嘿哈'
,
'捂脸'
,
'奸笑'
,
'机智'
,
'皱眉'
,
'耶'
,
'社会社会'
],
[
'让我看看'
,
'666'
,
'红包'
,
'蜡烛'
,
'烟花'
,
'福'
,
'庆祝'
,
'爆竹'
]
]
export
default
emoji
\ No newline at end of file
\ No newline at end of file
src/views/dj/gladNews.vue
View file @
f1b21ee
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-10-10 15:26:23
* @Date: 2022-10-10 15:26:23
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-0
3-13 17:02:29
* @LastEditTime: 2023-0
6-12 10:32:03
-->
-->
<
template
>
<
template
>
<div
class=
"wrapper-good"
>
<div
class=
"wrapper-good"
>
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
</div>
</div>
<!-- 定位模块脱离文档流,用一个空白块代替位置 -->
<!-- 定位模块脱离文档流,用一个空白块代替位置 -->
<div
class=
"empty-bg"
></div>
<div
class=
"empty-bg"
></div>
<div
class=
"shop-name"
>
<div
class=
"shop-name"
v-if=
"data.goodsSwitch"
>
<div
<div
class=
"name-item"
class=
"name-item"
v-for=
"(i, ind) in data.dataInfo!.goodsNameList"
v-for=
"(i, ind) in data.dataInfo!.goodsNameList"
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
alt=
""
alt=
""
/>
/>
</div>
</div>
<div
class=
"ranking-box"
>
<div
class=
"ranking-box"
v-if=
"data.dataInfo!.rankList!.length != 0"
>
<div
class=
"ranking-list"
>
<div
class=
"ranking-list"
>
<div
class=
"ranking-title"
>
员工产值排名
</div>
<div
class=
"ranking-title"
>
员工产值排名
</div>
<div
<div
...
@@ -124,7 +124,7 @@
...
@@ -124,7 +124,7 @@
import
{
reactive
,
onMounted
,
inject
}
from
"vue"
;
import
{
reactive
,
onMounted
,
inject
}
from
"vue"
;
import
{
djReq
}
from
"../../utils/request"
;
import
{
djReq
}
from
"../../utils/request"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
GladDataInfo
,
GladParams
,
GladData
,
StaffData
}
from
"./interface"
;
import
{
GladDataInfo
,
GladParams
,
GladData
,
StaffData
,
RankItem
}
from
"./interface"
;
const
route
=
useRoute
();
const
route
=
useRoute
();
// 获取全局对象
// 获取全局对象
...
@@ -135,7 +135,9 @@ const data = reactive<Partial<GladDataInfo>>({
...
@@ -135,7 +135,9 @@ const data = reactive<Partial<GladDataInfo>>({
medals
:
[
"first"
,
"second"
,
"third"
],
medals
:
[
"first"
,
"second"
,
"third"
],
dataInfo
:
<
GladData
>
{
dataInfo
:
<
GladData
>
{
staff
:
<
StaffData
>
{},
staff
:
<
StaffData
>
{},
rankList
:
[
<
RankItem
>
{}]
},
},
goodsSwitch
:
true
});
});
const
getInfo
=
async
()
=>
{
const
getInfo
=
async
()
=>
{
...
@@ -143,6 +145,8 @@ const getInfo = async () => {
...
@@ -143,6 +145,8 @@ const getInfo = async () => {
"dj.api.smarcarlife.staffDayReport.getSaGoodNewsData"
,
"dj.api.smarcarlife.staffDayReport.getSaGoodNewsData"
,
query
query
);
);
const
switchList
=
data
.
dataInfo
?.
switchList
||
[]
data
.
goodsSwitch
=
switchList
.
find
(
item
=>
item
.
switchType
===
401
)?.
switchStatus
===
'Y'
};
};
const
getImageUrl
=
(
name
:
any
,
path
=
"goodNews"
)
=>
{
const
getImageUrl
=
(
name
:
any
,
path
=
"goodNews"
)
=>
{
return
new
URL
(
`./
${
path
}
/
${
name
}
.png?v=
${
global
.
version
}
`
,
global
.
$imgUrl
)
return
new
URL
(
`./
${
path
}
/
${
name
}
.png?v=
${
global
.
version
}
`
,
global
.
$imgUrl
)
...
...
src/views/dj/interface.ts
View file @
f1b21ee
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-11-16 18:18:59
* @Date: 2022-11-16 18:18:59
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-0
3-08 16:30:24
* @LastEditTime: 2023-0
6-09 16:29:42
*/
*/
export
interface
ReportData
{
export
interface
ReportData
{
time
?:
string
;
time
?:
string
;
...
@@ -54,6 +54,7 @@ export interface GladParams {
...
@@ -54,6 +54,7 @@ export interface GladParams {
export
interface
GladDataInfo
{
export
interface
GladDataInfo
{
medals
:
string
[];
medals
:
string
[];
dataInfo
:
GladData
;
dataInfo
:
GladData
;
goodsSwitch
:
boolean
;
}
}
export
interface
GladData
{
export
interface
GladData
{
rankList
?:
RankItem
[];
rankList
?:
RankItem
[];
...
@@ -62,6 +63,7 @@ export interface GladData {
...
@@ -62,6 +63,7 @@ export interface GladData {
merchantName
?:
string
;
merchantName
?:
string
;
staff
:
StaffData
;
staff
:
StaffData
;
merchantUpgradeCount
:
number
;
merchantUpgradeCount
:
number
;
switchList
:
SwitchType
[];
}
}
export
interface
RankItem
{
export
interface
RankItem
{
staffName
:
string
;
staffName
:
string
;
...
@@ -83,3 +85,8 @@ export interface StaffData {
...
@@ -83,3 +85,8 @@ export interface StaffData {
unitPricePerCustomer
:
number
;
unitPricePerCustomer
:
number
;
conversionRate
:
number
;
conversionRate
:
number
;
}
}
export
interface
SwitchType
{
switchType
:
number
;
switchStatus
:
string
;
}
src/views/dj/morning.vue
View file @
f1b21ee
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2023-04-03 14:13:32
* @Date: 2023-04-03 14:13:32
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-0
4-24 11:00:14
* @LastEditTime: 2023-0
6-09 14:58:21
-->
-->
<!--
<!--
* @Description:
* @Description:
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"mold-box"
style=
"padding-bottom: 48px"
>
<div
class=
"mold-box"
style=
"padding-bottom: 48px"
v-if=
"data.showCustomeFollow"
>
<div
class=
"mold-title"
>
<div
class=
"mold-title"
>
<img
class=
"title-name"
:src=
"getImageUrl('title-name')"
alt=
""
/>
<img
class=
"title-name"
:src=
"getImageUrl('title-name')"
alt=
""
/>
<div
class=
"merchant-name"
>
客户跟进
</div>
<div
class=
"merchant-name"
>
客户跟进
</div>
...
@@ -196,13 +196,18 @@ const data = reactive<Partial<DataInfo>>({
...
@@ -196,13 +196,18 @@ const data = reactive<Partial<DataInfo>>({
customerInvitationList
:
[],
customerInvitationList
:
[],
monthlyOrderMoneyTotalGrowth
:
0
,
monthlyOrderMoneyTotalGrowth
:
0
,
waitToInviteNum
:
0
,
waitToInviteNum
:
0
,
switchList
:
[]
},
},
showCustomeFollow
:
true
});
});
const
getInfo
=
async
()
=>
{
const
getInfo
=
async
()
=>
{
data
.
posterInfo
=
await
djReq
(
data
.
posterInfo
=
await
djReq
(
"dj.api.smartcarlife.orderSummary.getShopMerchantOrderReport"
,
"dj.api.smartcarlife.orderSummary.getShopMerchantOrderReport"
,
query
query
);
);
const
switchList
=
data
.
posterInfo
?.
switchList
||
[]
data
.
showCustomeFollow
=
switchList
.
find
(
item
=>
item
.
switchType
===
201
)?.
switchStatus
===
'Y'
console
.
log
(
switchList
.
find
(
item
=>
item
.
switchType
===
201
)?.
switchStatus
===
'Y'
);
};
};
const
getImageUrl
=
(
name
:
any
,
path
=
"dj"
)
=>
{
const
getImageUrl
=
(
name
:
any
,
path
=
"dj"
)
=>
{
return
new
URL
(
`./
${
path
}
/
${
name
}
.png?v=
${
global
.
version
}
`
,
global
.
$imgUrl
)
return
new
URL
(
`./
${
path
}
/
${
name
}
.png?v=
${
global
.
version
}
`
,
global
.
$imgUrl
)
...
...
src/views/dj/morningInterface.ts
View file @
f1b21ee
...
@@ -3,13 +3,14 @@
...
@@ -3,13 +3,14 @@
* @Author: huyue
* @Author: huyue
* @Date: 2023-04-19 11:48:06
* @Date: 2023-04-19 11:48:06
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-0
4-24 10:20:43
* @LastEditTime: 2023-0
6-09 14:15:16
*/
*/
export
interface
Params
{
export
interface
Params
{
merchantId
?:
number
|
string
;
merchantId
?:
number
|
string
;
}
}
export
interface
DataInfo
{
export
interface
DataInfo
{
posterInfo
:
PosterInfo
;
posterInfo
:
PosterInfo
;
showCustomeFollow
:
boolean
;
}
}
export
interface
PosterInfo
{
export
interface
PosterInfo
{
...
@@ -32,6 +33,12 @@ export interface PosterInfo {
...
@@ -32,6 +33,12 @@ export interface PosterInfo {
monthlyOrderMoneyTotalGrowthExist
?:
boolean
;
monthlyOrderMoneyTotalGrowthExist
?:
boolean
;
yesterdayNotUpgradeOrderNum
?:
number
;
yesterdayNotUpgradeOrderNum
?:
number
;
monthlyNotUpgradeOrderNum
?:
number
;
monthlyNotUpgradeOrderNum
?:
number
;
switchList
:
SwitchType
[];
}
export
interface
SwitchType
{
switchType
:
number
;
switchStatus
:
string
;
}
}
export
interface
CustomerList
{
export
interface
CustomerList
{
...
...
src/views/dj/personalGoodNews.vue
View file @
f1b21ee
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<
div
class
=
"label"
>
客户姓名
<
/div>
<
div
class
=
"label"
>
客户姓名
<
/div>
<
div
class
=
"value"
>
{{
data
.
newsInfo
!
.
customerName
}}
<
/div>
<
div
class
=
"value"
>
{{
data
.
newsInfo
!
.
customerName
}}
<
/div>
<
/div>
<
/div>
<
div
class
=
"customer-item"
>
<
div
class
=
"customer-item"
v
-
if
=
"data.carTypeSwitch"
>
<
div
class
=
"label"
>
客户车型
<
/div>
<
div
class
=
"label"
>
客户车型
<
/div>
<
div
class
=
"value"
>
<
div
class
=
"value"
>
{{
data
.
newsInfo
!
.
carBrand
}}
-
{{
data
.
newsInfo
!
.
carBrand
}}
-
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
{{
data
.
newsInfo
!
.
carSeriesName
}}
{{
data
.
newsInfo
!
.
carSeriesName
}}
<
/div>
<
/div>
<
/div>
<
/div>
<
div
class
=
"customer-item"
v
-
if
=
"data.newsInfo!.channelType != 2"
>
<
div
class
=
"customer-item"
v
-
if
=
"data.
goodsSwitch && data.
newsInfo!.channelType != 2"
>
<
div
class
=
"label"
>
开单商品
<
/div>
<
div
class
=
"label"
>
开单商品
<
/div>
<
div
class
=
"value"
>
<
div
class
=
"value"
>
<
div
<
div
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
<
/div>
<
/div>
<
/div>
<
/div>
<
/div>
<
/div>
<
div
v
-
if
=
"data.scriptSwitch"
class
=
"customer-info html-info"
v
-
html
=
"data.content"
><
/div>
<
div
class
=
"tips-text"
>
感谢您前期的铺垫和大力支持,加油!
<
/div>
<
div
class
=
"tips-text"
>
感谢您前期的铺垫和大力支持,加油!
<
/div>
<
div
class
=
"logo"
>
<
div
class
=
"logo"
>
<
img
class
=
"red-logo"
:
src
=
"getImageUrl('logo')"
alt
=
""
/>
<
img
class
=
"red-logo"
:
src
=
"getImageUrl('logo')"
alt
=
""
/>
...
@@ -78,7 +79,8 @@
...
@@ -78,7 +79,8 @@
<
/div>
<
/div>
<
/template>
<
/template>
<
script
lang
=
"ts"
setup
>
<
script
lang
=
"ts"
setup
>
import
{
reactive
,
onMounted
,
inject
}
from
"vue"
;
import
emoji
from
'../../utils/emo'
;
import
{
ref
,
reactive
,
onMounted
,
inject
}
from
"vue"
;
import
{
djReq
}
from
"../../utils/request"
;
import
{
djReq
}
from
"../../utils/request"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
Params
,
DataInfo
,
NewsInfo
,
StaffInfo
}
from
"./personalInterface"
;
import
{
Params
,
DataInfo
,
NewsInfo
,
StaffInfo
}
from
"./personalInterface"
;
...
@@ -91,13 +93,27 @@ const data = reactive<Partial<DataInfo>>({
...
@@ -91,13 +93,27 @@ const data = reactive<Partial<DataInfo>>({
staff
:
<
StaffInfo
>
{
}
,
staff
:
<
StaffInfo
>
{
}
,
}
,
}
,
upgradeCount
:
0
,
upgradeCount
:
0
,
content
:
""
,
carTypeSwitch
:
true
,
goodsSwitch
:
true
,
payTypeSwitch
:
true
,
scriptSwitch
:
true
,
}
);
}
);
const
getInfo
=
async
()
=>
{
const
getInfo
=
async
()
=>
{
data
.
content
=
htmFormat
(
data
.
content
)
data
.
newsInfo
=
await
djReq
(
data
.
newsInfo
=
await
djReq
(
"dj.api.smarcarlife.staffDayReport.getSaPersonalGoodNewsData"
,
"dj.api.smarcarlife.staffDayReport.getSaPersonalGoodNewsData"
,
query
query
);
);
data
.
upgradeCount
=
convertToChinaNum
(
data
.
newsInfo
?.
staff
?.
upgradeCount
);
data
.
upgradeCount
=
convertToChinaNum
(
data
.
newsInfo
?.
staff
?.
upgradeCount
);
const
switchList
=
data
.
newsInfo
?.
switchList
||
[]
data
.
carTypeSwitch
=
switchList
.
find
(
item
=>
item
.
switchType
===
501
)?.
switchStatus
===
'Y'
data
.
goodsSwitch
=
switchList
.
find
(
item
=>
item
.
switchType
===
502
)?.
switchStatus
!==
'Y'
data
.
payTypeSwitch
=
switchList
.
find
(
item
=>
item
.
switchType
===
503
)?.
switchStatus
!==
'Y'
data
.
scriptSwitch
=
switchList
.
find
(
item
=>
item
.
switchType
===
504
)?.
switchStatus
!==
'Y'
if
(
data
.
scriptSwitch
)
data
.
content
=
switchList
.
find
(
item
=>
item
.
switchType
===
504
)?.
switchText
// if (data.scriptSwitch) data.content = '<div>[晕][调皮][惊讶]的首发式地方时尚短发[发呆]\n打法十大啊\n恭喜发财啊![玫瑰]\n[太阳]\n[拥抱][爱情]</div>'
console
.
log
(
data
.
scriptSwitch
);
}
;
}
;
/**
/**
* 功能:获取图片地址
* 功能:获取图片地址
...
@@ -159,6 +175,22 @@ const convertToChinaNum = (num: any) => {
...
@@ -159,6 +175,22 @@ const convertToChinaNum = (num: any) => {
return
result
;
return
result
;
}
;
}
;
// 格式化内容
const
htmFormat
=
(
val
:
any
)
=>
{
let
htm
=
val
.
replace
(
/
\[[\u
4E00-
\u
9FA56
]
{1,4
}
]/gi
,
function
(
res
)
{
let
word
=
res
.
replace
(
/
\[
|
\]
/gi
,
''
)
const
list
=
emoji
.
flat
(
Infinity
)
let
index
=
parseInt
(
list
.
indexOf
(
word
))
+
1
if
(
index
<
10
)
{
index
=
'00'
+
index
}
else
if
(
index
>=
10
&&
index
<
100
)
{
index
=
'0'
+
index
}
return
`<img class="icon-emo" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index
}
.png" alt="" />`
}
).
replace
(
/
\n
/gi
,
'<br/></div><div>'
)
return
htm
}
onMounted
(()
=>
{
onMounted
(()
=>
{
if
(
route
.
query
)
{
if
(
route
.
query
)
{
query
=
route
.
query
;
query
=
route
.
query
;
...
@@ -169,3 +201,19 @@ onMounted(() => {
...
@@ -169,3 +201,19 @@ onMounted(() => {
<
style
lang
=
"scss"
scoped
>
<
style
lang
=
"scss"
scoped
>
@
import
"src/assets/styles/personalGoodNews.scss"
;
@
import
"src/assets/styles/personalGoodNews.scss"
;
<
/style>
<
/style>
<
style
lang
=
"scss"
>
.
html
-
info
{
font
-
size
:
24
px
;
color
:
#
3
B0000
;
line
-
height
:
34
px
;
div
{
display
:
flex
;
align
-
items
:
center
;
}
.
icon
-
emo
{
width
:
24
px
;
height
:
24
px
;
line
-
height
:
24
px
;
}
}
<
/style>
\ No newline at end of file
\ No newline at end of file
src/views/dj/personalInterface.ts
View file @
f1b21ee
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2023-03-23 10:48:13
* @Date: 2023-03-23 10:48:13
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-0
5-10 16:28:35
* @LastEditTime: 2023-0
6-09 15:53:57
*/
*/
export
interface
Params
{
export
interface
Params
{
orderCode
?:
string
;
orderCode
?:
string
;
...
@@ -12,6 +12,12 @@ export interface Params {
...
@@ -12,6 +12,12 @@ export interface Params {
export
interface
DataInfo
{
export
interface
DataInfo
{
newsInfo
:
NewsInfo
;
newsInfo
:
NewsInfo
;
upgradeCount
:
number
|
string
;
upgradeCount
:
number
|
string
;
content
:
string
;
carTypeSwitch
:
boolean
;
goodsSwitch
:
boolean
;
payTypeSwitch
:
boolean
;
scriptSwitch
:
boolean
;
scriptText
:
string
;
}
}
export
interface
NewsInfo
{
export
interface
NewsInfo
{
...
@@ -27,6 +33,7 @@ export interface NewsInfo {
...
@@ -27,6 +33,7 @@ export interface NewsInfo {
sunshineInspiration
?:
string
;
sunshineInspiration
?:
string
;
goodsNames
?:
string
[];
goodsNames
?:
string
[];
channelType
?:
number
;
channelType
?:
number
;
switchList
:
SwitchType
[];
}
}
export
interface
StaffInfo
{
export
interface
StaffInfo
{
...
@@ -39,3 +46,9 @@ export interface StaffInfo {
...
@@ -39,3 +46,9 @@ export interface StaffInfo {
unitPricePerCustomer
:
number
;
unitPricePerCustomer
:
number
;
conversionRate
:
number
;
conversionRate
:
number
;
}
}
export
interface
SwitchType
{
switchType
:
number
;
switchStatus
:
string
;
switchText
:
string
;
}
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