Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-drainage
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 5503feb8
authored
Feb 22, 2022
by
yy
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
end
1 parent
60b3d6e4
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
76 additions
and
54 deletions
src/App.vue
src/api/modules/channel.js
src/components/selectTag/index.vue
src/components/welcome/activityModel.vue
src/components/welcome/tag-textarea.vue
src/views/channel/components/channelStatistics.vue
src/views/overview/index.vue
src/views/square/import.vue
src/App.vue
View file @
5503feb
...
@@ -40,7 +40,7 @@ export default {
...
@@ -40,7 +40,7 @@ export default {
}
}
#app
{
#app
{
background
:
#f4f5fa
;
background
:
#f4f5fa
;
padding
:
0px
20px
20px
4
0px
;
padding
:
0px
20px
20px
2
0px
;
position
:
absolute
;
position
:
absolute
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
width
:
100%
;
width
:
100%
;
...
...
src/api/modules/channel.js
View file @
5503feb
...
@@ -112,6 +112,7 @@ const detailChannelCode = params => {
...
@@ -112,6 +112,7 @@ const detailChannelCode = params => {
const
listChannelCodeByPage
=
params
=>
{
const
listChannelCodeByPage
=
params
=>
{
params
.
method
=
'entmicro.api.code.listChannelCodeByPage'
params
.
method
=
'entmicro.api.code.listChannelCodeByPage'
params
.
sessionId
=
session
params
.
sessionId
=
session
console
.
log
(
http
)
return
http
({
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
method
:
'POST'
,
...
...
src/components/selectTag/index.vue
View file @
5503feb
...
@@ -59,32 +59,7 @@ export default {
...
@@ -59,32 +59,7 @@ export default {
selectNum
:
0
,
selectNum
:
0
,
searchStatus
:
false
,
searchStatus
:
false
,
labelTreeRetSelect
:
[],
labelTreeRetSelect
:
[],
labelTreeRets
:
[
labelTreeRets
:
[]
{
labelGroup
:
{
id
:
'109'
,
name
:
'湖口123'
},
labelList
:
[
{
id
:
'372'
,
name
:
'12345678'
},
{
id
:
'371'
,
name
:
'7654321'
},
{
id
:
'370'
,
name
:
'1234567'
}
],
checked
:
false
,
tagChecked
:
[],
isIndeterminate
:
false
,
checkAll
:
false
},
{
labelGroup
:
{
id
:
'65'
,
name
:
'自店标签111'
},
labelList
:
[
{
id
:
'179'
,
name
:
'标签44'
},
{
id
:
'178'
,
name
:
'标签33'
},
{
id
:
'176'
,
name
:
'标签1112'
}
],
checked
:
false
,
tagChecked
:
[],
isIndeterminate
:
false
,
checkAll
:
false
}
]
}
}
},
},
watch
:
{
watch
:
{
...
@@ -150,13 +125,6 @@ export default {
...
@@ -150,13 +125,6 @@ export default {
}
}
})
})
})
})
this
.
labelTreeRets
.
forEach
(
item
=>
{
this
.
labelTreeRetSelect
.
forEach
(
itm
=>
{
if
(
itm
.
labelGroup
.
id
==
item
.
labelGroup
.
id
)
{
item
.
tagChecked
=
utils
.
deepClone
(
itm
.
tagChecked
)
}
})
})
this
.
labelTreeRets
.
forEach
((
item
,
index
)
=>
{
this
.
labelTreeRets
.
forEach
((
item
,
index
)
=>
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
handleCheckedChange
(
item
.
tagChecked
,
index
)
this
.
handleCheckedChange
(
item
.
tagChecked
,
index
)
...
@@ -196,12 +164,18 @@ export default {
...
@@ -196,12 +164,18 @@ export default {
}
}
})
})
},
},
remove
(
item
,
idx
)
{
remove
(
item
s
,
idx
)
{
item
.
tagChecked
.
splice
(
idx
,
1
)
item
s
.
tagChecked
.
splice
(
idx
,
1
)
this
.
labelTreeRets
.
forEach
(
item
=>
{
this
.
labelTreeRets
.
forEach
(
item
=>
{
this
.
labelTreeRetSelect
.
forEach
(
itm
=>
{
this
.
labelTreeRetSelect
.
forEach
(
itm
=>
{
if
(
item
.
labelGroup
.
id
==
itm
.
labelGroup
.
id
)
{
if
(
item
.
labelGroup
.
id
==
itm
.
labelGroup
.
id
)
{
item
.
tagChecked
=
utils
.
deepClone
(
itm
.
tagChecked
)
let
tagChecked
=
[]
itm
.
tagChecked
.
forEach
(
x
=>
{
tagChecked
.
push
(
x
.
id
)
})
this
.
$nextTick
(()
=>
{
item
.
tagChecked
=
item
.
labelList
.
filter
(
i
=>
tagChecked
.
includes
(
i
.
id
))
})
}
}
if
(
item
.
tagChecked
.
length
==
0
)
{
if
(
item
.
tagChecked
.
length
==
0
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
@@ -210,7 +184,6 @@ export default {
...
@@ -210,7 +184,6 @@ export default {
}
}
})
})
})
})
this
.
labelTreeRets
.
forEach
((
item
,
index
)
=>
{
this
.
labelTreeRets
.
forEach
((
item
,
index
)
=>
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
handleCheckedChange
(
item
.
tagChecked
,
index
)
this
.
handleCheckedChange
(
item
.
tagChecked
,
index
)
...
...
src/components/welcome/activityModel.vue
View file @
5503feb
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
</div>
</div>
<div
class=
"model-item-content model-item-weight"
v-show=
"activeName == 6"
>
<div
class=
"model-item-content model-item-weight"
v-show=
"activeName == 6"
>
赠送天数:
赠送天数:
<span>
{{
effectiveType
==
2
?
item
.
effective
Day
+
'天'
:
'永久有效'
}}
</span>
<span>
{{
item
.
effectiveType
==
2
?
item
.
effectived
Day
+
'天'
:
'永久有效'
}}
</span>
</div>
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 4 || activeName == 5"
></div>
<div
class=
"model-item-content"
v-show=
"activeName == 4 || activeName == 5"
></div>
<div
class=
"model-item-content model-item-contents"
v-show=
"activeName == 4"
>
<div
class=
"model-item-content model-item-contents"
v-show=
"activeName == 4"
>
...
...
src/components/welcome/tag-textarea.vue
View file @
5503feb
<
template
>
<
template
>
<div
class=
"w-textarea"
ref=
"wTextarea"
>
<div
class=
"w-textarea"
ref=
"wTextarea"
>
<div
contenteditable=
"true"
class=
"w-textarea_input"
ref=
"wTextareaContent"
:id=
"contentId"
@
click=
"inputClick($event)"
@
focus=
"onFocus"
@
blur=
"onBlur"
@
keydown
.
delete=
"handleDelete
($event)"
@
input=
"handleInput($event.target)"
></div>
<div
contenteditable=
"true"
class=
"w-textarea_input"
ref=
"wTextareaContent"
:id=
"contentId"
@
click=
"inputClick($event)"
@
focus=
"onFocus"
@
blur=
"onBlur"
@
keydown
=
"textareaKeydown
($event)"
@
input=
"handleInput($event.target)"
></div>
<!--
<div
class=
"w-textarea_tools"
v-if=
"tools.length > 0 || maxlength"
>
<!--
<div
class=
"w-textarea_tools"
v-if=
"tools.length > 0 || maxlength"
>
<button
<button
class=
"w-textarea_tools__item"
class=
"w-textarea_tools__item"
...
@@ -110,6 +110,50 @@ export default {
...
@@ -110,6 +110,50 @@ export default {
// 处理后需要调用 addTag() 或者 addLink() 将内容传回来
// 处理后需要调用 addTag() 或者 addLink() 将内容传回来
this
.
$emit
(
'add'
,
type
)
this
.
$emit
(
'add'
,
type
)
},
},
textareaKeydown
(
event
)
{
if
(
event
.
keyCode
==
13
)
{
this
.
insertHtml
(
'<br>'
)
let
nn
=
document
.
createElement
(
'br'
)
document
.
querySelector
(
'.w-textarea_input'
).
appendChild
(
nn
)
return
false
}
},
/*换行*/
insertHtml
(
html
)
{
var
sel
,
range
if
(
window
.
getSelection
)
{
// IE9 或 非IE浏览器
sel
=
window
.
getSelection
()
if
(
sel
.
getRangeAt
&&
sel
.
rangeCount
)
{
range
=
sel
.
getRangeAt
(
0
)
range
.
deleteContents
()
// Range.createContextualFragment() would be useful here but is
// non-standard and not supported in all browsers (IE9, for one)
var
el
=
document
.
createElement
(
'div'
)
el
.
innerHTML
=
html
var
frag
=
document
.
createDocumentFragment
(),
node
,
lastNode
while
((
node
=
el
.
firstChild
))
{
lastNode
=
frag
.
appendChild
(
node
)
}
range
.
insertNode
(
frag
)
// Preserve the selection
if
(
lastNode
)
{
range
=
range
.
cloneRange
()
range
.
setStartAfter
(
lastNode
)
range
.
collapse
(
true
)
sel
.
removeAllRanges
()
sel
.
addRange
(
range
)
}
}
}
else
if
(
document
.
selection
&&
document
.
selection
.
type
!=
'Control'
)
{
// IE < 9
document
.
selection
.
createRange
().
pasteHTML
(
html
)
}
this
.
currentText
=
document
.
querySelector
(
'.w-textarea_input'
).
innerHTML
this
.
$emit
(
'updateText'
,
this
.
currentText
)
},
addTag
(
text
)
{
addTag
(
text
)
{
// 创建模版标签
// 创建模版标签
let
node
=
document
.
createElement
(
this
.
tag
)
let
node
=
document
.
createElement
(
this
.
tag
)
...
@@ -220,15 +264,15 @@ export default {
...
@@ -220,15 +264,15 @@ export default {
}
}
let
htm
=
target
.
innerHTML
let
htm
=
target
.
innerHTML
const
list
=
emoji
.
flat
(
Infinity
)
const
list
=
emoji
.
flat
(
Infinity
)
const
cutImg
=
htm
.
replaceAll
(
'<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/'
,
''
)
const
cutImg
=
htm
.
replaceAll
(
'<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/'
,
''
)
.
replaceAll
(
'<wise id="1">@昵称</wise>'
,
'@昵称'
).
replaceAll
(
'<br>'
,
'\n'
)
const
replaceImg
=
cutImg
.
replace
(
/
(\d){3}
.png">/g
,
function
(
str
)
{
const
replaceImg
=
cutImg
.
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
}
]`
})
})
console
.
log
(
replaceImg
)
let
Textnode
=
document
.
createElement
(
'div'
)
let
Textnode
=
document
.
createElement
(
'div'
)
Textnode
.
innerHTML
=
replaceImg
Textnode
.
innerHTML
=
replaceImg
this
.
currentText
=
Textnode
.
innerText
.
substring
(
0
,
600
)
this
.
currentText
=
replaceImg
.
substring
(
0
,
600
)
console
.
log
(
this
.
currentText
)
this
.
$emit
(
'updateText'
,
this
.
currentText
)
this
.
$emit
(
'updateText'
,
this
.
currentText
)
},
},
placeCaretAtEnd
(
el
)
{
placeCaretAtEnd
(
el
)
{
...
@@ -254,14 +298,15 @@ export default {
...
@@ -254,14 +298,15 @@ export default {
let
htm
=
target
.
innerHTML
let
htm
=
target
.
innerHTML
console
.
log
(
htm
)
console
.
log
(
htm
)
const
list
=
emoji
.
flat
(
Infinity
)
const
list
=
emoji
.
flat
(
Infinity
)
const
cutImg
=
htm
.
replaceAll
(
'<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/'
,
''
)
const
cutImg
=
htm
.
replaceAll
(
'<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/'
,
''
)
.
replaceAll
(
'<wise id="1">@昵称</wise>'
,
'@昵称'
).
replaceAll
(
'<br>'
,
'\n'
)
const
replaceImg
=
cutImg
.
replace
(
/
(\d){3}
.png">/g
,
function
(
str
)
{
const
replaceImg
=
cutImg
.
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
}
]`
})
})
let
Textnode
=
document
.
createElement
(
'div'
)
let
Textnode
=
document
.
createElement
(
'div'
)
Textnode
.
innerHTML
=
replaceImg
Textnode
.
innerHTML
=
replaceImg
this
.
currentText
=
Textnode
.
innerText
.
substring
(
0
,
600
)
this
.
currentText
=
replaceImg
.
substring
(
0
,
600
)
console
.
log
(
this
.
currentText
)
this
.
$emit
(
'updateText'
,
this
.
currentText
)
this
.
$emit
(
'updateText'
,
this
.
currentText
)
},
},
handleDelete
(
e
)
{
handleDelete
(
e
)
{
...
@@ -295,8 +340,9 @@ export default {
...
@@ -295,8 +340,9 @@ export default {
}
}
},
},
getGuid
()
{
getGuid
()
{
return
1
// 生成随机ID
// 生成随机ID
return
`r
${
new
Date
().
getTime
()}
d
${
Math
.
ceil
(
Math
.
random
()
*
1000
)}
`
//
return `r${new Date().getTime()}d${Math.ceil(Math.random() * 1000)}`
},
},
selectHandler
()
{
selectHandler
()
{
// 监听选定文本的变动
// 监听选定文本的变动
...
...
src/views/channel/components/channelStatistics.vue
View file @
5503feb
...
@@ -171,7 +171,7 @@ export default {
...
@@ -171,7 +171,7 @@ export default {
},
},
codeSearch
()
{
codeSearch
()
{
var
params
=
{
var
params
=
{
...
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableSearchForm
)),
...
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableSearchForm
)),
pageSize
:
this
.
$refs
.
table
.
page
.
pageSize
,
pageSize
:
this
.
$refs
.
table
.
page
.
pageSize
,
pageNum
:
this
.
$refs
.
table
.
page
.
pageNum
,
pageNum
:
this
.
$refs
.
table
.
page
.
pageNum
,
startTime
:
this
.
startTime
,
startTime
:
this
.
startTime
,
...
...
src/views/overview/index.vue
View file @
5503feb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"overview-main"
>
<div
class=
"overview-main"
>
<div
class=
"overview-header"
>
<div
class=
"overview-header"
>
<span>
引流获客概览
</span>
<span>
引流获客概览
</span>
<el-popover
placement=
"top"
width=
"400"
trigger=
"hover"
content=
"引流获客通过整合活码营销、
数据
魔方,可分别针对到店用户及离店用户提供企微线上化方案。帮助门店迅速的形成企微客户池,为后续营销活动搭建起稳定高频的触达通道。"
>
<el-popover
placement=
"top"
width=
"400"
trigger=
"hover"
content=
"引流获客通过整合活码营销、
企微
魔方,可分别针对到店用户及离店用户提供企微线上化方案。帮助门店迅速的形成企微客户池,为后续营销活动搭建起稳定高频的触达通道。"
>
<img
src=
"@/assets/img/question.png"
slot=
"reference"
class=
"count-item-question"
/>
<img
src=
"@/assets/img/question.png"
slot=
"reference"
class=
"count-item-question"
/>
</el-popover>
</el-popover>
</div>
</div>
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<div
class=
"store-item"
>
<div
class=
"store-item"
>
<div
class=
"store-item-s"
>
<div
class=
"store-item-s"
>
<div
class=
"store-item-title"
>
离店用户线上化
</div>
<div
class=
"store-item-title"
>
离店用户线上化
</div>
<el-button
type=
"primary"
size=
"small"
@
click=
"jumpSquare"
>
数据
魔方
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"jumpSquare"
>
企微
魔方
</el-button>
</div>
</div>
<div
class=
"store-item-s"
>
<div
class=
"store-item-s"
>
<div
class=
"store-item-icon"
>
<div
class=
"store-item-icon"
>
...
...
src/views/square/import.vue
View file @
5503feb
...
@@ -146,10 +146,12 @@ export default {
...
@@ -146,10 +146,12 @@ export default {
},
},
downloadModel
()
{
downloadModel
()
{
this
.
$apis
.
square
.
downloadModel
({}).
then
(
res
=>
{
this
.
$apis
.
square
.
downloadModel
({}).
then
(
res
=>
{
const
link
=
document
.
createElement
(
'a'
)
if
(
res
)
{
link
.
setAttribute
(
'href'
,
res
)
//设置下载文件的url地址
const
link
=
document
.
createElement
(
'a'
)
//link.setAttribute('download', 'download'); //用于设置下载文件的文件名
link
.
setAttribute
(
'href'
,
res
)
//设置下载文件的url地址
link
.
click
()
//link.setAttribute('download', 'download'); //用于设置下载文件的文件名
link
.
click
()
}
})
})
},
},
enentDrop
(
e
)
{
enentDrop
(
e
)
{
...
@@ -187,7 +189,7 @@ export default {
...
@@ -187,7 +189,7 @@ export default {
this
.
$apis
.
common
.
pictureUpload
({
file
:
fileInfo
}).
then
(
res
=>
{
this
.
$apis
.
common
.
pictureUpload
({
file
:
fileInfo
}).
then
(
res
=>
{
this
.
fileInfo
=
res
this
.
fileInfo
=
res
this
.
importName
=
e
.
name
this
.
importName
=
e
.
name
this
.
$refs
.
file
.
value
=
''
;
this
.
$refs
.
file
.
value
=
''
})
})
}
}
}
else
{
}
else
{
...
...
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