Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-activity-center
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 9d507379
authored
Jun 13, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
75dcbc9f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
29 deletions
src/components/verbal/index.vue
src/views/bulletin/components/dialogs/charactersDialog.vue
src/components/verbal/index.vue
View file @
9d50737
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-04-20 15:15:08
* @Date: 2023-04-20 15:15:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-06-1
0 15:19:23
* @LastEditTime: 2023-06-1
3 12:43:40
* @FilePath: \scrm-micro-battles\src\views\battle\index.vue
* @FilePath: \scrm-micro-battles\src\views\battle\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%
im
im
...
@@ -123,28 +123,37 @@ export default {
...
@@ -123,28 +123,37 @@ export default {
const
html
=
this
.
$refs
.
textContent
.
$refs
.
wTextareaContent
.
innerHTML
const
html
=
this
.
$refs
.
textContent
.
$refs
.
wTextareaContent
.
innerHTML
const
_this
=
this
const
_this
=
this
const
list
=
emoji
.
flat
(
Infinity
)
const
list
=
emoji
.
flat
(
Infinity
)
let
htm
=
html
&&
html
let
htm
=
html
&&
html
.
replace
(
/<span>
([\s\S]
*
?)
<
\/
span>/g
,
'$1'
)
.
replace
(
/<span>
([\s\S]
*
?)
<
\/
span>/g
,
'$1'
)
.
replace
(
/<img.+
?
src="https:
\/\/
img01.glsx.com.cn
\/
weapp
\/
resource
\/
saas
\/
scrm
\/
emoji
\/
/g
,
''
)
.
replace
(
/<img.+
?
src="https:
\/\/
img01.glsx.com.cn
\/
weapp
\/
resource
\/
saas
\/
scrm
\/
emoji
\/
/g
,
''
)
.
replace
(
/<br>/g
,
'\n'
)
.
replace
(
/<br>/g
,
'\n'
)
htm
=
htm
.
replace
(
/<wise.+
?
>
(
.+
?)(?:
<
\/
wise>
)
/g
,
(
str
,
v
)
=>
{
htm
=
htm
.
replace
(
/<wise.+
?
>
(
.+
?)(?:
<
\/
wise>
)
/g
,
(
str
,
v
)
=>
{
return
_this
.
mapList
[
v
]
return
_this
.
mapList
[
v
]
})
})
return
htm
&&
htm
.
replace
(
/
(\d){3}
.png">/g
,
function
(
str
)
{
return
(
htm
&&
htm
.
replace
(
/
(\d){3}
.png">/g
,
function
(
str
)
{
let
s
=
list
[
parseInt
(
str
.
split
(
'.'
)[
0
])
-
1
]
let
s
=
list
[
parseInt
(
str
.
split
(
'.'
)[
0
])
-
1
]
return
`[
${
s
}
]`
return
`[
${
s
}
]`
})
})
)
},
},
update
(
attContent
)
{
update
(
attContent
)
{
if
(
!
attContent
)
{
if
(
!
attContent
)
{
return
return
}
}
let
content
=
attContent
.
replace
(
/
(\$\{
.+
?\})
/g
,(
str
)
=>
{
let
content
=
attContent
.
replace
(
/
(\$\{
.+
?\})
/g
,
str
=>
{
console
.
log
(
str
)
for
(
let
i
in
this
.
mapList
)
{
return
if
(
this
.
mapList
[
i
]
==
str
)
{
return
`<wise id="1" contenteditable="false">
${
i
}
</wise>`
}
}
})
})
content
=
content
.
replace
(
/
\[(
.+
?)\]
/g
,
'<wise id="1" contenteditable="false">$1</wise>'
)
let
htm
=
let
htm
=
content
&&
content
.
replace
(
/
\[[\u
4E00-
\u
9FA56
]{1,4}
]/gi
,
function
(
res
)
{
content
&&
content
.
replace
(
/
\[[\u
4E00-
\u
9FA56
]{1,4}
]/gi
,
function
(
res
)
{
let
word
=
res
.
replace
(
/
\[
|
\]
/gi
,
''
)
let
word
=
res
.
replace
(
/
\[
|
\]
/gi
,
''
)
const
list
=
emoji
.
flat
(
Infinity
)
const
list
=
emoji
.
flat
(
Infinity
)
let
index
=
parseInt
(
list
.
indexOf
(
word
))
+
1
let
index
=
parseInt
(
list
.
indexOf
(
word
))
+
1
...
@@ -184,7 +193,7 @@ export default {
...
@@ -184,7 +193,7 @@ export default {
display
:
flex
;
display
:
flex
;
justify-content
:
space-around
;
justify-content
:
space-around
;
column-gap
:
20px
;
column-gap
:
20px
;
line-height
:
20px
;
line-height
:
20px
;
.add-btn
{
.add-btn
{
display
:
inline-flex
;
display
:
inline-flex
;
position
:
relative
;
position
:
relative
;
...
...
src/views/bulletin/components/dialogs/charactersDialog.vue
View file @
9d50737
...
@@ -68,15 +68,15 @@ export default {
...
@@ -68,15 +68,15 @@ export default {
name
:
'商品名称'
name
:
'商品名称'
}
}
],
],
params
:
[
'wordType'
],
params
:
[
'wordType'
],
mapList
:
{
mapList
:
{
'销售顾问用户名'
:
'${销售顾问用户名}'
,
销售顾问
:
'${销售顾问用户名}'
,
'客户姓名'
:
'${customerName}'
,
客户姓名
:
'${customerName}'
,
'车型'
:
'${carType}'
,
车型
:
'${carType}'
,
'订单总金额'
:
'${totalPrice}'
,
订单总金额
:
'${totalPrice}'
,
'阳光激励费'
:
'${sunshineInspiration}'
,
阳光激励费
:
'${sunshineInspiration}'
,
'商品名称'
:
'${goodsNames}'
商品名称
:
'${goodsNames}'
}
,
}
}
}
},
},
props
:
{
props
:
{
...
@@ -88,6 +88,17 @@ export default {
...
@@ -88,6 +88,17 @@ export default {
created
()
{
created
()
{
this
.
initData
()
this
.
initData
()
},
},
watch
:
{
isDialogVisible
(
val
)
{
console
.
log
(
val
)
if
(
val
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
verbalRef
&&
this
.
$refs
.
verbalRef
.
update
(
'${销售顾问用户名}7'
)
})
}
}
},
methods
:
{
methods
:
{
initData
()
{
initData
()
{
this
.
switchList
.
wordReport
.
forEach
(
i
=>
{
this
.
switchList
.
wordReport
.
forEach
(
i
=>
{
...
@@ -101,12 +112,12 @@ export default {
...
@@ -101,12 +112,12 @@ export default {
},
},
handlebattleConfirm
()
{
handlebattleConfirm
()
{
console
.
log
(
this
.
$refs
.
verbalRef
.
getTextValue
())
console
.
log
(
this
.
$refs
.
verbalRef
.
getTextValue
())
//
this.isDialogVisible = false
this
.
isDialogVisible
=
false
//
let switchList = []
let
switchList
=
[]
//
this.params.forEach(data => {
this
.
params
.
forEach
(
data
=>
{
//
switchList.push(this[data])
switchList
.
push
(
this
[
data
])
//
})
})
//
this.$emit('handlePreview', { key: 'wordReport', data: switchList })
this
.
$emit
(
'handlePreview'
,
{
key
:
'wordReport'
,
data
:
switchList
})
}
}
}
}
}
}
...
@@ -189,11 +200,11 @@ export default {
...
@@ -189,11 +200,11 @@ export default {
/deep/
.el-form-item__content
{
/deep/
.el-form-item__content
{
width
:
448px
;
width
:
448px
;
}
}
/
deep
/
.btn-group-panel
.btn-group
{
/
deep
/
.btn-group-panel
.btn-group
{
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
justify-content
:
none
;
justify-content
:
none
;
.add-btn
{
.add-btn
{
margin-bottom
:
5px
;
margin-bottom
:
5px
;
}
}
}
}
}
}
...
...
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