Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-pay
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 88c231c4
authored
Dec 21, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
群发提交代码
1 parent
80fe5717
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
645 additions
and
47 deletions
package.json
src/components/glsx-dialog/index.vue
src/views/customerTransform/addCustomer.vue
src/views/customerTransform/components/Emotion.vue
src/views/customerTransform/components/basicInfo.vue
src/views/customerTransform/components/emotionWords.vue
src/views/customerTransform/components/tag-textarea.vue
src/views/customerTransform/components/welcomeWords.vue
src/views/customerTransform/detaiCustomeGroup.vue
src/views/customerTransform/detailCustomer.vue
src/views/customerTransform/index.vue
src/views/home/index.vue
package.json
View file @
88c231c
...
...
@@ -13,7 +13,7 @@
"el-tree-transfer"
:
"^2.2.6"
,
"element-ui"
:
"^2.4.5"
,
"glsx-common"
:
"^1.4.6"
,
"glsx-components"
:
"^1.2.
5
"
,
"glsx-components"
:
"^1.2.
6
"
,
"lodash"
:
"^4.17.21"
,
"vue"
:
"^2.6.10"
,
"vue-router"
:
"^3.1.3"
,
...
...
src/components/glsx-dialog/index.vue
View file @
88c231c
...
...
@@ -72,10 +72,6 @@ export default {
type
:
String
,
default
:
''
},
title
:
{
type
:
String
,
default
:
''
},
isVisible
:
{
type
:
Boolean
,
default
:
false
...
...
src/views/customerTransform/addCustomer.vue
View file @
88c231c
This diff is collapsed.
Click to expand it.
src/views/customerTransform/components/Emotion.vue
0 → 100644
View file @
88c231c
<
template
>
<div
class=
"ly-emotion"
>
<slot></slot>
</div>
</
template
>
<
script
>
export
default
{
name
:
'ly-emotion'
,
mounted
()
{
const
name
=
this
.
$el
.
innerHTML
const
list
=
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
,
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
,
'酷'
,
'冷汗'
,
'抓狂'
,
'吐'
,
'偷笑'
,
'可爱'
,
'白眼'
,
'傲慢'
,
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
,
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
,
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
,
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
,
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
,
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
,
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
,
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
,
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
,
'磕头'
,
'回头'
,
'跳绳'
,
'挥手'
,
'激动'
,
'街舞'
,
'献吻'
,
'左太极'
,
'右太极'
]
let
index
=
list
.
indexOf
(
name
)
let
imgHTML
=
`<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/
${
index
}
.gif">`
this
.
$nextTick
(()
=>
{
this
.
$el
.
innerHTML
=
imgHTML
})
},
}
</
script
>
<
style
scoped
>
.ly-emotion
{
display
:
inline-block
}
.ly-static-emotion
{
width
:
24px
;
height
:
24px
;
display
:
inline-block
;
}
</
style
>
\ No newline at end of file
src/views/customerTransform/components/basicInfo.vue
View file @
88c231c
<
template
>
<div
class=
"container"
>
<div
class=
"title"
>
基础信息
</div>
<div
class=
"content"
>
<div
class=
"
detail-
content"
>
<div
class=
"content-info"
>
<div
class=
"content-text"
>
<div
class=
"detail-item"
>
<div
class=
"detail-label"
>
创建者:
</div>
<div
class=
"detail-value"
>
{{
basicInfo
.
createdName
?
basicInfo
.
createdName
:
'-'
}}
</div>
<div
class=
"detail-value"
>
<el-tag
v-if=
"basicInfo.createdName"
type=
"info"
>
<i
class=
"el-icon-user-solid"
></i>
{{
basicInfo
.
createdName
}}
</el-tag>
<span
v-else
>
-
</span>
<!--
{{
basicInfo
.
createdName
?
basicInfo
.
createdName
:
'-'
}}
-->
</div>
</div>
<div
class=
"detail-item"
>
<div
class=
"detail-label"
>
群发内容:
</div>
<div
class=
"detail-value"
>
[共
{{
basicInfo
.
attachmentList
?
basicInfo
.
attachmentList
.
length
:
'0'
}}
条]
</div>
<div
class=
"detail-tips"
>
详见右侧视图
</div>
</div>
<div
class=
"detail-item"
v-show=
"form == 'customer'"
>
<div
class=
"detail-label"
>
群发类型:
</div>
...
...
@@ -18,23 +32,99 @@
</div>
<div
class=
"detail-item"
>
<div
class=
"detail-label"
>
发送时间:
</div>
<div
class=
"detail-value"
>
{{
basicInfo
.
sendTime
?
basicInfo
.
sendTime
:
'-
-
'
}}
</div>
<div
class=
"detail-value"
>
{{
basicInfo
.
sendTime
?
basicInfo
.
sendTime
:
'-'
}}
</div>
</div>
<div
class=
"detail-item"
>
<div
class=
"detail-item"
style=
"margin-bottom: 0;"
>
<div
class=
"detail-label"
>
群发对象:
</div>
<div
class=
"detail-value"
>
<span
v-for=
"(item, index) in basicInfo.userList"
:key=
"item.id"
>
在
<span
v-for=
"(item, index) in basicInfo.userList"
class=
"el-tag-item"
:key=
"item.id"
>
<el-tag
type=
"info"
v-if=
"index
< 5
"
>
<i
class=
"el-icon-user-solid"
></i>
{{
item
.
staffName
}}
</el-tag>
<el-tag
type=
"info"
v-if=
"basicInfo.userList.length > 5 && index == 5"
>
<el-popover
placement=
"top"
width=
"300"
trigger=
"hover"
>
<span
slot=
"reference"
>
...(
{{
basicInfo
.
userList
.
length
}}
)
</span>
<div
class=
"entmicro-hover"
>
<el-tag
type=
"info"
v-for=
"(i, index) in basicInfo.userList"
:key=
"index"
:disable-transitions=
"false"
>
{{
i
.
staffName
}}
</el-tag>
</div>
</el-popover>
</el-tag>
</span>
里满足以下条件中的
{{
basicInfo
.
customerCount
?
basicInfo
.
customerCount
:
0
}}
个
{{
form
==
'customer'
?
'客户'
:
'群聊'
}}
<!-- v-if="selectType == 2"
<span
v-for=
"(item, index) in basicInfo.userList"
:key=
"item.id"
>
[
{{
item
.
staffName
}}
]
<span
v-show=
"basicInfo.userList.length -1 != index"
>
、
</span>
</span>
</span>
-->
</div>
</div>
<div
class=
"detail-item"
>
<div
class=
"detail-label"
>
群发内容:
</div>
<div
class=
"detail-value"
>
[共
{{
basicInfo
.
attachmentList
?
basicInfo
.
attachmentList
.
length
:
'0'
}}
条]
</div>
<div
class=
"detail-tips"
>
详见右侧视图
</div>
<div
class=
"detail-condition"
v-if=
"form == 'customer' && basicInfo.selectType == 2"
>
<div
class=
"detail-condition-item"
>
<span
class=
"name"
>
性别
</span>
<span>
{{
SEX_TYPE
[
basicInfo
.
condition
.
sex
]
}}
</span>
</div>
<div
v-if=
"basicInfo.condition.startTime"
class=
"detail-condition-item"
>
<span
class=
"name"
>
添加时间
</span>
<span>
{{
basicInfo
.
condition
.
startTime
?
basicInfo
.
condition
.
startTime
.
split
(
' '
)[
0
]
:
'-'
}}
至
{{
basicInfo
.
condition
.
endTime
?
basicInfo
.
condition
.
endTime
.
split
(
' '
)[
0
]
:
'-'
}}
</span>
</div>
<div
class=
"detail-condition-item"
v-if=
"basicInfo.condition.chatName"
>
<span
class=
"name"
>
所在群聊
</span>
<span
v-for=
"(item, index) in basicInfo.condition.chatName.split(',')"
class=
"el-tag-item"
:key=
"index"
>
<el-tag
v-if=
"index
< 3
"
type=
"info"
>
{{
item
}}
</el-tag>
<el-tag
type=
"info"
v-if=
"basicInfo.condition.chatName.split(',').length > 3 && index == 3"
>
<el-popover
placement=
"top"
width=
"300"
trigger=
"hover"
>
<span
slot=
"reference"
>
...(
{{
basicInfo
.
condition
.
chatName
.
split
(
','
).
length
}}
)
</span>
<div
class=
"entmicro-hover"
>
<el-tag
type=
"info"
v-for=
"(i, index) in basicInfo.condition.chatName.split(',')"
:key=
"index"
:disable-transitions=
"false"
>
{{
i
}}
</el-tag>
</div>
</el-popover>
</el-tag>
</span>
</div>
<div
class=
"detail-condition-item"
v-if=
"basicInfo.condition.tagName"
>
<span
class=
"name"
>
标签筛选
</span>
<span
v-for=
"(itm, idx) in basicInfo.condition.tagName.split(',')"
class=
"el-tag-item"
:key=
"idx"
>
<el-tag
v-if=
"idx
< 3
"
type=
"info"
>
{{
itm
}}
</el-tag>
<el-tag
type=
"info"
v-if=
"basicInfo.condition.tagName.split(',').length > 3 && idx == 3"
>
<el-popover
placement=
"top"
width=
"300"
trigger=
"hover"
>
<span
slot=
"reference"
>
...(
{{
basicInfo
.
condition
.
tagName
.
split
(
','
).
length
}}
)
</span>
<div
class=
"entmicro-hover"
>
<el-tag
type=
"info"
v-for=
"(i, index) in basicInfo.condition.tagName.split(',')"
:key=
"index"
:disable-transitions=
"false"
>
{{
i
}}
</el-tag>
</div>
</el-popover>
</el-tag>
</span>
</div>
</div>
</div>
<div
class=
"title"
>
数据统计
</div>
...
...
@@ -91,7 +181,14 @@ const STATUS = {
'-1'
:
'创建失败'
,
'0'
:
'创建成功'
,
'1'
:
'发送成功'
,
'2'
:
'发送失败'
'2'
:
'发送失败'
,
'3'
:
'待发送'
}
const
SEX
=
{
null
:
'全部'
,
'1'
:
'男'
,
'2'
:
'女'
,
'0'
:
'未知性别'
}
import
*
as
dayjs
from
'dayjs'
...
...
@@ -105,13 +202,17 @@ export default {
data
()
{
return
{
STATUS_TYPE
:
STATUS
,
basicInfo
:
{},
SEX_TYPE
:
SEX
,
basicInfo
:
{
condition
:
{}
},
statistic
:
{}
}
},
mounted
()
{
this
.
getCustomerDetail
(
this
.
id
)
this
.
getStatistic
()
// console.log(this.basicInfo)
},
methods
:
{
getCustomerDetail
(
id
)
{
...
...
@@ -152,7 +253,7 @@ export default {
color
:
#333
;
border-bottom
:
1px
solid
#d8d8d8
;
}
.content
{
.
detail-
content
{
display
:
flex
;
align-items
:
flex-end
;
justify-content
:
space-between
;
...
...
@@ -162,20 +263,72 @@ export default {
padding
:
20px
24px
40px
0
;
.content-info
{
width
:
calc
(
100%
-
360px
);
.content-text
{
padding-left
:
52px
;
height
:
400px
;
}
.detail-item
{
display
:
flex
;
align-items
:
center
;
font-size
:
14px
;
color
:
#333
;
line-height
:
20px
;
margin-bottom
:
24px
;
.detail-label
{
width
:
70px
;
}
.detail-tips
{
margin-left
:
8px
;
color
:
#939393
;
}
.el-tag-item
{
margin-right
:
10px
;
&:last-child
{
margin-right
:
0
;
}
}
i
{
color
:
#75acff
;
margin-right
:
3px
;
font-size
:
14px
;
}
}
.detail-condition
{
display
:
flex
;
width
:
calc
(
100%
-
66px
);
margin-left
:
72px
;
margin-top
:
13px
;
border-radius
:
2px
;
font-size
:
14px
;
color
:
#333333
;
flex-wrap
:
wrap
;
//
div
:
nth-child
(
odd
)
{
//
border-right
:
none
;
//
}
div
:nth-child
(
2
),
div
:nth-child
(
4
)
{
border-left
:
none
;
}
div
:nth-child
(
3
),
div
:nth-child
(
4
)
{
border-top
:
none
;
}
&
-item
{
width
:
calc
(
50%
-
2px
);
min-width
:
327px
;
height
:
40px
;
line-height
:
40px
;
background
:
#f7f7f7
;
border
:
1px
solid
#d8d8d8
;
.name
{
display
:
inline-block
;
width
:
68px
;
padding-left
:
10px
;
color
:
#999999
;
}
}
}
.statistics-info
{
display
:
flex
;
...
...
@@ -216,4 +369,11 @@ export default {
}
}
}
.el-tag
{
margin-right
:
6px
;
cursor
:
pointer
;
}
.el-popover
.el-tag
{
margin-bottom
:
6px
;
}
</
style
>
src/views/customerTransform/components/emotionWords.vue
0 → 100644
View file @
88c231c
<
template
>
<div>
<div
class=
"emotion-box"
:style=
"
{ height: height + 'px' }">
<div
class=
"emotion-box-line"
v-for=
"(line, i) in list"
:key=
"i"
>
<emotion
class=
"emotion-item"
v-for=
"(item, i) in line"
:key=
"i"
@
click
.
native=
"clickHandler(item)"
>
{{
item
}}
</emotion>
</div>
</div>
</div>
</
template
>
<
script
>
import
Emotion
from
'./Emotion'
export
default
{
props
:
{
height
:
{
type
:
Number
,
default
:
200
}
},
data
()
{
return
{
list
:
[
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
],
[
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
],
[
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
],
[
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
],
[
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
],
[
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
],
[
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
],
[
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
],
[
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
],
[
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
],
[
'磕头'
,
'回头'
,
'跳绳'
,
'挥手'
,
'激动'
,
'街舞'
,
'左太极'
,
'右太极'
]
]
}
},
methods
:
{
clickHandler
(
i
)
{
let
emotion
=
`
${
i
}
`
this
.
$emit
(
'emotion'
,
emotion
)
}
},
components
:
{
Emotion
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.emotion-box
{
z-index
:
2004
;
background-color
:
#fff
;
border-radius
:
2px
;
box-shadow
:
0
2px
12px
0
rgba
(
0
,
0
,
0
,
0.15
);
width
:
300px
;
box-sizing
:
border-box
;
padding
:
5px
;
overflow
:
hidden
;
overflow-y
:
auto
;
}
.emotion-box-line
{
display
:
flex
;
}
.emotion-item
{
flex
:
1
;
text-align
:
center
;
cursor
:
pointer
;
/deep/
{
img
{
width
:
24px
;
}
}
}
</
style
>
\ No newline at end of file
src/views/customerTransform/components/tag-textarea.vue
View file @
88c231c
<
template
>
<div
class=
"w-textarea"
ref=
"wTextarea"
>
<div
contenteditable=
"true"
class=
"w-textarea_input"
ref=
"wTextareaContent"
contenteditable=
"true"
:id=
"contentId"
@
click=
"inputClick($event)"
@
focus=
"isLocked = true"
...
...
@@ -121,11 +121,60 @@ export default {
addTag
(
text
)
{
// 创建模版标签
let
node
=
document
.
createElement
(
this
.
tag
)
if
(
navigator
.
userAgent
.
indexOf
(
'Firefox'
)
>
0
)
{
node
.
setAttribute
(
'contenteditable'
,
'false'
)
}
node
.
innerText
=
text
// 添加id便于删除
node
.
id
=
this
.
getGuid
()
this
.
insertNode
(
node
)
},
addNode
()
{
let
target
=
this
.
$refs
.
wTextareaContent
this
.
updateData
(
target
.
innerHTML
)
},
promiseAdd
(
item
,
num
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
document
.
querySelector
(
'.w-textarea_input'
).
innerHTML
+=
item
document
.
querySelector
(
'.w-textarea_input'
).
focus
()
resolve
()
},
num
*
100
)
})
},
promiseAddNode
(
item
,
num
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
document
.
querySelector
(
'.w-textarea_input'
).
innerHTML
+=
item
document
.
querySelector
(
'.w-textarea_input'
).
focus
()
resolve
()
},
num
*
100
)
})
},
addContent
(
attContent
)
{
attContent
.
forEach
(
async
(
item
,
index
)
=>
{
await
this
.
promiseAdd
(
item
,
index
)
this
.
addTag
(
'@昵称'
)
// await this.promiseAddNode(item, index)
// this.addNode()
// t2(item)
})
// for (let i = 0; i < attContent.length; i++) {
// if (attContent[i] || (i == 0 && !attContent[i])) {
// document.querySelector('.w-textarea_input').innerHTML += attContent[i]
// document.querySelector('.w-textarea_input').focus()
// document.querySelector('.w-textarea_input').click()
// this.$nextTick(()=>{
// this.addTag('@昵称')
// })
// }
// // 代码格式
// // (function(a) {})(b)
// }
},
addLink
(
text
,
url
)
{
// 创建a标签
let
node
=
document
.
createElement
(
'a'
)
...
...
@@ -134,6 +183,12 @@ export default {
node
.
target
=
'blank'
this
.
insertNode
(
node
)
},
addImg
(
url
)
{
// 创建a标签
let
node
=
document
.
createElement
(
'img'
)
node
.
src
=
url
this
.
insertNode
(
node
)
},
insertNode
(
node
)
{
// 在内容中插入标签
// 删掉选中的内容(如有)
...
...
@@ -142,19 +197,267 @@ export default {
this
.
savedRange
.
insertNode
(
node
)
// 更新双向绑定数据
let
target
=
this
.
$refs
.
wTextareaContent
// this.updateData(target.innerHTML)
if
(
navigator
.
userAgent
.
indexOf
(
'Firefox'
)
>
0
||
navigator
.
userAgent
.
indexOf
(
'QQBrowser'
)
>
0
)
{
this
.
updateData
(
target
.
innerHTML
+
' '
)
}
else
{
this
.
updateData
(
target
.
innerHTML
)
}
this
.
currentText
=
target
.
innerText
let
htm
=
target
.
innerHTML
const
list
=
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
,
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
,
'酷'
,
'冷汗'
,
'抓狂'
,
'吐'
,
'偷笑'
,
'可爱'
,
'白眼'
,
'傲慢'
,
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
,
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
,
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
,
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
,
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
,
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
,
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
,
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
,
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
,
'磕头'
,
'回头'
,
'跳绳'
,
'挥手'
,
'激动'
,
'街舞'
,
'献吻'
,
'左太极'
,
'右太极'
]
const
cutImg
=
htm
.
replaceAll
(
'<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/'
,
''
)
const
replaceImg
=
cutImg
.
replace
(
/
(\d){1,2}
.gif">/g
,
function
(
str
)
{
let
s
=
list
[
str
.
split
(
'.'
)[
0
]]
return
`[
${
s
}
]`
})
let
Textnode
=
document
.
createElement
(
'div'
)
Textnode
.
innerHTML
=
replaceImg
this
.
currentText
=
Textnode
.
innerText
this
.
$emit
(
'updateText'
,
this
.
currentText
)
},
placeCaretAtEnd
(
el
)
{
//传入光标要去的jq节点对象
el
.
focus
()
if
(
typeof
window
.
getSelection
!=
'undefined'
&&
typeof
document
.
createRange
!=
'undefined'
)
{
var
range
=
document
.
createRange
()
range
.
selectNodeContents
(
el
)
range
.
collapse
(
false
)
var
sel
=
window
.
getSelection
()
sel
.
removeAllRanges
()
sel
.
addRange
(
range
)
}
else
if
(
typeof
document
.
body
.
createTextRange
!=
'undefined'
)
{
var
textRange
=
document
.
body
.
createTextRange
()
textRange
.
moveToElementText
(
el
)
textRange
.
collapse
(
false
)
textRange
.
select
()
}
},
handleInput
(
target
)
{
// 即时更新数据
this
.
updateData
(
target
.
innerHTML
)
this
.
currentText
=
target
.
innerText
let
htm
=
target
.
innerHTML
console
.
log
(
htm
)
const
list
=
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
,
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
,
'酷'
,
'冷汗'
,
'抓狂'
,
'吐'
,
'偷笑'
,
'可爱'
,
'白眼'
,
'傲慢'
,
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
,
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
,
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
,
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
,
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
,
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
,
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
,
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
,
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
,
'磕头'
,
'回头'
,
'跳绳'
,
'挥手'
,
'激动'
,
'街舞'
,
'献吻'
,
'左太极'
,
'右太极'
]
const
cutImg
=
htm
.
replaceAll
(
'<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/'
,
''
)
console
.
log
(
cutImg
)
const
replaceImg
=
cutImg
.
replace
(
/
(\d){1,2}
.gif">/g
,
function
(
str
)
{
let
s
=
list
[
str
.
split
(
'.'
)[
0
]]
return
`[
${
s
}
]`
})
let
Textnode
=
document
.
createElement
(
'div'
)
Textnode
.
innerHTML
=
replaceImg
this
.
currentText
=
Textnode
.
innerText
this
.
$emit
(
'updateText'
,
this
.
currentText
)
},
handleDelete
(
e
)
{
...
...
@@ -170,6 +473,7 @@ export default {
}
},
inputClick
(
e
)
{
console
.
log
(
this
.
tag
.
toUpperCase
(),
e
.
target
.
nodeName
,
e
)
// 监听点击事件
this
.
isLocked
=
true
const
TAG_NAME
=
e
.
target
.
nodeName
...
...
@@ -227,6 +531,10 @@ export default {
cursor
:
default
;
-webkit-user-modify
:
read-only
!important
;
}
img
{
width
:
24px
;
height
:
24px
;
}
.active
{
background
:
#dcdfe6
;
}
...
...
@@ -242,13 +550,14 @@ $textColor: #666;
box-sizing
:
border-box
;
//
border-radius
:
4px
;
border
:
1px
solid
$
borderColor
;
overflow
:
hidden
;
min-height
:
200px
;
//
margin-bottom
:
15px
;
overflow
:
hidden
;
position
:
relative
;
&_input
{
width
:
100%
;
min-height
:
2
00px
;
min-height
:
1
00px
;
box-sizing
:
border-box
;
padding
:
10px
;
line-height
:
1.5
;
...
...
src/views/customerTransform/components/welcomeWords.vue
View file @
88c231c
This diff is collapsed.
Click to expand it.
src/views/customerTransform/detaiCustomeGroup.vue
View file @
88c231c
...
...
@@ -168,7 +168,7 @@ export default {
this
.
handleSearch
()
this
.
$message
({
type
:
'success'
,
message
:
'已提醒
!
'
message
:
'已提醒'
})
// this.$set(this.employeelist[index], 'isRemind', true)
})
...
...
src/views/customerTransform/detailCustomer.vue
View file @
88c231c
...
...
@@ -186,7 +186,7 @@ export default {
this
.
getStaffList
(
this
.
activeIndex
)
this
.
$message
({
type
:
'success'
,
message
:
'已提醒
!
'
message
:
'已提醒'
})
// this.$set(this.employeelist[index], 'remindStatus', true)
})
...
...
src/views/customerTransform/index.vue
View file @
88c231c
...
...
@@ -14,12 +14,19 @@
</div>
<div
v-if=
"activeIndex == 1"
class=
"container"
>
<div
class=
"container-header"
>
<el-button
<
!--
<
el-button
type=
"primary"
size=
"small
"
:size=
"size
"
icon=
"el-icon-plus"
@
click=
"btnClick('create', 1)"
>
新建群发
</el-button>
>
新建群发
</el-button>
-->
<GLButton
type=
"primary"
:size=
"size"
icon=
"el-icon-plus"
fn=
"新建客户群发"
@
click=
"btnClick('create', 1)"
>
新建群发
</GLButton>
<div
class=
"text"
>
企业统一选择要发送的客户,由添加客户的成员确认后发送给客户,消息内容仅管理员和负责人可创建。
</div>
</div>
<!-- 表格区域 开始 -->
...
...
@@ -39,24 +46,35 @@
</span>
</div>
<div
class=
"table-btns"
slot=
"optionBtns"
slot-scope=
"scope"
>
<el-button
type=
"text"
:disabled=
"scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1)"
@
click=
"btnClick('remind', 1, scope.scope)"
>
提醒发送
</el-button>
<el-button
type=
"text"
@
click=
"btnClick('detail', 1, scope.scope)"
>
详情
</el-button>
<span
v-if=
"scope.scope.status == -1"
style=
"color: #EB4E4E;"
>
创建失败
</span>
<span
v-else
>
<el-button
type=
"text"
:disabled=
"scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1)"
@
click=
"btnClick('remind', 1, scope.scope)"
>
提醒发送
</el-button>
<!--
<GLButton
type=
"text"
fn=
"客户群发详情"
@
click=
"btnClick('detail', 1, scope.scope)"
>
详情
</GLButton>
-->
<el-button
type=
"text"
@
click=
"btnClick('detail', 1, scope.scope)"
>
详情
</el-button>
</span>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<div
v-if=
"activeIndex == 2"
class=
"container"
>
<div
class=
"container-header"
>
<el-button
<
!--
<
el-button
type=
"primary"
size=
"small
"
:size=
"size
"
icon=
"el-icon-plus"
@
click=
"btnClick('create', 2)"
>
新建群发
</el-button>
>
新建群发
</el-button>
-->
<GLButton
type=
"primary"
:size=
"size"
fn=
"新建客户群群发"
icon=
"el-icon-plus"
@
click=
"btnClick('create', 2)"
>
新建群发
</GLButton>
<div
class=
"text"
>
管理员或负责人统一创建内容,群主收到通知后,可选择他管理的客户群并群发。
</div>
</div>
<!-- 表格区域 开始 -->
...
...
@@ -76,12 +94,16 @@
</span>
</div>
<div
class=
"table-btns"
slot=
"optionBtns"
slot-scope=
"scope"
>
<el-button
type=
"text"
:disabled=
"scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1)"
@
click=
"btnClick('remind', 2, scope.scope)"
>
提醒发送
</el-button>
<el-button
type=
"text"
@
click=
"btnClick('detail', 2, scope.scope)"
>
详情
</el-button>
<span
v-if=
"scope.scope.status == -1"
style=
"color: #EB4E4E;"
>
创建失败
</span>
<span
v-else
>
<el-button
type=
"text"
:disabled=
"scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1)"
@
click=
"btnClick('remind', 2, scope.scope)"
>
提醒发送
</el-button>
<!--
<GLButton
type=
"text"
fn=
"客户群群发详情"
@
click=
"btnClick('detail', 2, scope.scope)"
>
详情
</GLButton>
-->
<el-button
type=
"text"
@
click=
"btnClick('detail', 2, scope.scope)"
>
详情
</el-button>
</span>
</div>
</GLTable>
<!-- 表格区域 end -->
...
...
src/views/home/index.vue
View file @
88c231c
...
...
@@ -18,13 +18,21 @@
</div>
<div
class=
"marketing-content"
>
{{
item
.
content
}}
</div>
<div
class=
"marketing-btn"
>
<el-button
<GLButton
style=
"width: 118px;"
display=
"disabled"
type=
"primary"
:size=
"size"
:fn=
"item.linkName"
@
click=
"jumpPage(item.path)"
>
{{
item
.
linkName
}}
</GLButton>
<!--
<el-button
style=
"width: 118px;"
:disabled=
"!$globalState.routers.find(i => i.compath == item.path)"
type=
"primary"
size=
"small"
@
click=
"jumpPage(item.path)"
>
{{
item
.
linkName
}}
</el-button>
>
{{
item
.
linkName
}}
</el-button>
-->
</div>
</div>
</div>
...
...
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