Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-task
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 a7a21e9e
authored
Oct 25, 2022
by
xuyl
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
emoji展示
1 parent
5fe78b53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
src/views/task/analyseTask/cpns/TaskDetails.vue
src/views/task/analyseTask/cpns/TaskDetails.vue
View file @
a7a21e9
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<template
v-if=
'item.platformMerchantMissionMaterialResponseList && item.platformMerchantMissionMaterialResponseList.length'
>
<template
v-if=
'item.platformMerchantMissionMaterialResponseList && item.platformMerchantMissionMaterialResponseList.length'
>
<div
v-for=
'(sub,idx,) in item.platformMerchantMissionMaterialResponseList'
:key=
'idx'
>
<div
v-for=
'(sub,idx,) in item.platformMerchantMissionMaterialResponseList'
:key=
'idx'
>
<template
v-if=
"sub.materialType == '1'"
>
<template
v-if=
"sub.materialType == '1'"
>
<p
>
{{
sub
.
materialContent
}}
</p>
<p
v-html=
'tramWord(sub.materialContent)'
>
</p>
</
template
>
</
template
>
<
template
v-if=
"sub.materialType == '2'"
>
<
template
v-if=
"sub.materialType == '2'"
>
<img
class=
'displayImg'
:src=
'sub.materialContent'
>
<img
class=
'displayImg'
:src=
'sub.materialContent'
>
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<
script
>
<
script
>
import
{
taskManagementApi
}
from
'@/api/taskManagement'
import
{
taskManagementApi
}
from
'@/api/taskManagement'
import
emoji
from
'@/utils/emo'
export
default
{
export
default
{
name
:
'TaskDetails'
,
name
:
'TaskDetails'
,
props
:
{
props
:
{
...
@@ -55,6 +55,20 @@ export default {
...
@@ -55,6 +55,20 @@ export default {
return
{}
return
{}
},
},
methods
:
{
methods
:
{
tramWord
(
val
)
{
let
htm
=
val
.
replace
(
/
\[([\u
4E00-
\u
9FA56
]{1,4}
|OK|NO|666
)
]/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 style='width:25px;height:25px' src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/
${
index
}
.png">`
})
return
htm
},
async
copy
(
id
)
{
async
copy
(
id
)
{
await
taskManagementApi
.
getStaffMissionLink
({
missionId
:
id
}).
then
(
res
=>
{
await
taskManagementApi
.
getStaffMissionLink
({
missionId
:
id
}).
then
(
res
=>
{
if
(
res
.
code
==
'0'
&&
res
.
data
)
{
if
(
res
.
code
==
'0'
&&
res
.
data
)
{
...
@@ -115,8 +129,4 @@ export default {
...
@@ -115,8 +129,4 @@ export default {
width
:
500px
;
width
:
500px
;
height
:
300px
;
height
:
300px
;
}
}
.displayContent
{
display
:
inline-block
;
width
:
800px
;
}
</
style
>
</
style
>
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