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 36bb7161
authored
Mar 30, 2022
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
end
1 parent
5945b3bf
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
218 additions
and
229 deletions
src/api/modules/channel.js
src/components/screenTag/index.vue
src/components/selectEmp/index.vue
src/components/welcome/activityModel.vue
src/config/index.js
src/setup/qiankun.js
src/utils/dom.js
src/utils/emo.js
src/utils/fns.js
src/utils/util.js
src/views/channel/components/channelStatistics.vue
src/views/channel/components/empDetail.vue
src/views/channel/index.vue
src/views/market/config.vue
src/views/market/index.vue
src/views/marketing/config.vue
src/views/overview/components/linechart.vue
src/views/square/index.vue
src/api/modules/channel.js
View file @
36bb716
...
...
@@ -32,7 +32,7 @@ const querylabeltree = params => {
params
.
method
=
'scrm.api.datahub.labelgroup.queryLabelTree'
params
.
sessionId
=
session
return
http_tag
({
url
:
'
http://ismv.branch.glsx.com.cn
/rop-scrm-datahub/router'
,
url
:
'/rop-scrm-datahub/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
...
...
src/components/screenTag/index.vue
View file @
36bb716
...
...
@@ -10,7 +10,7 @@
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
</div>
<div
class=
"checkbox-group-box"
:style=
"
{ height: heightBox + 'px' }">
<div
class=
"checkbox-group-box"
v-loading=
"loading"
:style=
"
{ height: heightBox + 'px' }">
<div
style=
"margin-bottom: 8px"
class=
"checkbox-box"
v-for=
"(item, index) in labelTreeRets"
:key=
"index"
@
click
.
self=
"item.checked = !item.checked"
>
<span
class=
"el-tree-node__expand-icon el-icon-caret-right"
:class=
"
{ expanded: item.checked }" @click.self="item.checked = !item.checked">
</span>
{{
item
.
labelGroup
.
name
}}
...
...
@@ -57,6 +57,7 @@ export default {
name
:
'activityModel'
,
data
()
{
return
{
loading
:
false
,
heightBox
:
200
,
dialogVisible
:
false
,
labelGroupName
:
''
,
...
...
@@ -142,7 +143,7 @@ export default {
this
.
querylabeltree
()
},
querylabeltree
(
selectItem
)
{
console
.
log
(
selectItem
,
'-----'
)
this
.
loading
=
true
this
.
$apis
.
channel
.
querylabeltree
({
labelTreeReq
:
{
...
...
@@ -215,6 +216,9 @@ export default {
this
.
labelTreeRetSelect
=
utils
.
deepClone
(
this
.
labelTreeRets
)
}
}
this
.
$nextTick
(()
=>
{
this
.
loading
=
false
})
})
},
remove
(
item
,
idx
)
{
...
...
@@ -229,8 +233,6 @@ export default {
}
else
{
tag
.
tagChecked
=
null
}
// }
}
})
})
...
...
src/components/selectEmp/index.vue
View file @
36bb716
...
...
@@ -61,7 +61,7 @@ export default {
},
methods
:
{
jumpUrl
()
{
util
.
openUrl
(
location
.
origin
+
'/
home
/followUp/index'
)
util
.
openUrl
(
location
.
origin
+
'/
settings
/followUp/index'
)
},
getFollower
()
{
var
params
=
{
...
...
@@ -100,11 +100,11 @@ export default {
handleClose
()
{
this
.
handleCancel
()
},
handleCancel
:
utils
.
debounce
(
function
()
{
handleCancel
:
utils
.
debounce
(
function
()
{
this
.
dialogVisible
=
false
this
.
$refs
.
table
.
$refs
.
salelistMutiTable
.
clearSelection
()
},
300
),
handleSelect
:
utils
.
debounce
(
function
()
{
handleSelect
:
utils
.
debounce
(
function
()
{
this
.
loading
=
true
let
selectEmp
=
this
.
selectEmp
.
map
(
item
=>
{
return
{
...
...
@@ -124,11 +124,11 @@ export default {
},
300
)
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.dialog-jump
{
color
:
#5850
FF
;
color
:
#5850
ff
;
float
:
left
;
line-height
:
24px
;
text-decoration
:
underline
;
...
...
@@ -148,4 +148,4 @@ export default {
}
}
}
</
style
>
\ No newline at end of file
</
style
>
src/components/welcome/activityModel.vue
View file @
36bb716
...
...
@@ -196,10 +196,10 @@ export default {
},
merchantOpen
()
{
let
channel
=
null
if
(
location
.
host
==
'scrm.cgacar.com'
)
{
if
(
location
.
host
==
'scrm.cgacar.com'
)
{
channel
=
2
}
this
.
$apis
.
marketing
.
merchantOpen
({
merchantId
:
this
.
$globalState
.
session
.
merchantId
,
channel
}).
then
(
res
=>
{
this
.
$apis
.
marketing
.
merchantOpen
({
merchantId
:
this
.
$globalState
.
session
.
merchantId
,
channel
}).
then
(
res
=>
{
this
.
openFlag
=
res
.
openFlag
})
},
...
...
@@ -237,7 +237,7 @@ export default {
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.square-main
{
...
...
@@ -374,4 +374,4 @@ export default {
}
}
}
</
style
>
\ No newline at end of file
</
style
>
src/config/index.js
View file @
36bb716
...
...
@@ -12,17 +12,16 @@ let cfg = require('./conf.js')
import
{
Http
}
from
'glsx-common'
let
timeout
=
30000
//超时时间
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
if
(
isEnv
)
{
let
{
request
}
=
cfg
Object
.
assign
(
request
,
{
timeout
})
return
Promise
.
resolve
(
cfg
)
}
return
new
Http
({
request
:
{
timeout
:
100000
}}).
get
(
' https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config'
)
// return new Http({request: { timeout: 100000}}).get(' http://192.168.3.171:7300/mock/618a32851072f92988f05a17/drainage/config')
if
(
isEnv
)
{
let
{
request
}
=
cfg
Object
.
assign
(
request
,
{
timeout
})
return
Promise
.
resolve
(
cfg
)
}
// return new Http({ request: { timeout: 100000 } }).get(' https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
return
new
Http
({
request
:
{
timeout
:
100000
}
}).
get
(
'https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config'
)
}
export
const
config
=
{
install
(
vue
,
cfg
)
{
vue
.
prototype
.
$config
=
cfg
}
}
\ No newline at end of file
install
(
vue
,
cfg
)
{
vue
.
prototype
.
$config
=
cfg
}
}
src/setup/qiankun.js
View file @
36bb716
...
...
@@ -17,35 +17,35 @@ let routes = []
let
router
=
null
let
instance
=
null
export
async
function
bootstrap
({
name
,
id
,
history
,
common
,
messenger
,
globalState
,
routerBase
})
{
const
{
response
,
request
,
sign
,
secret
,
request_common
,
sign_common
,
request_tag
}
=
await
fetchConfig
(
false
)
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$globalState
=
globalState
Vue
.
prototype
.
$common
=
common
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_tag
=
new
common
.
Http
({
response
,
request
:
request_tag
,
sign
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
signWay
:
"md5"
,
request
:
request_common
,
sign
:
sign_common
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
const
routesData
=
common
.
utils
.
deepClone
(
globalState
.
routers
)
routes
=
getRoutes
(
routesData
)
subscribe
({
messenger
})
Vue
.
use
(
GLButton
,
{
routes
,
routerBase
})
const
{
response
,
request
,
sign
,
secret
,
request_common
,
sign_common
,
request_tag
}
=
await
fetchConfig
(
false
)
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$globalState
=
globalState
Vue
.
prototype
.
$common
=
common
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_tag
=
new
common
.
Http
({
response
,
request
:
request_tag
,
sign
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
signWay
:
'md5'
,
request
:
request_common
,
sign
:
sign_common
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
const
routesData
=
common
.
utils
.
deepClone
(
globalState
.
routers
)
routes
=
getRoutes
(
routesData
)
subscribe
({
messenger
})
Vue
.
use
(
GLButton
,
{
routes
,
routerBase
})
}
export
async
function
mount
(
props
)
{
console
.
log
(
'11111'
,
props
)
const
insts
=
render
(
props
.
routerBase
,
routes
)
router
=
insts
.
router
instance
=
insts
.
vm
console
.
log
(
'11111'
,
props
)
const
insts
=
render
(
props
.
routerBase
,
routes
)
router
=
insts
.
router
instance
=
insts
.
vm
}
export
async
function
unmount
()
{
instance
.
$destroy
()
instance
.
$el
.
innerHTML
=
''
instance
=
null
router
=
null
instance
.
$destroy
()
instance
.
$el
.
innerHTML
=
''
instance
=
null
router
=
null
}
function
subscribe
({
messenger
})
{
messenger
.
subscribe
(
v
=>
{
console
.
log
(
`监听到子应用
${
v
.
from
}
发来消息:`
,
v
)
})
}
\ No newline at end of file
messenger
.
subscribe
(
v
=>
{
console
.
log
(
`监听到子应用
${
v
.
from
}
发来消息:`
,
v
)
})
}
src/utils/dom.js
View file @
36bb716
import
{
isFunction
}
from
'./fns'
export
function
matchesSelectorToParentElements
(
el
,
selector
,
baseNode
)
{
export
function
matchesSelectorToParentElements
(
el
,
selector
,
baseNode
)
{
let
node
=
el
const
matchesSelectorFunc
=
[
'matches'
,
'webkitMatchesSelector'
,
'mozMatchesSelector'
,
'msMatchesSelector'
,
'oMatchesSelector'
].
find
(
func
=>
isFunction
(
node
[
func
]))
const
matchesSelectorFunc
=
[
'matches'
,
'webkitMatchesSelector'
,
'mozMatchesSelector'
,
'msMatchesSelector'
,
'oMatchesSelector'
].
find
(
func
=>
isFunction
(
node
[
func
]))
if
(
!
isFunction
(
node
[
matchesSelectorFunc
]))
return
false
...
...
@@ -22,16 +16,13 @@ export function matchesSelectorToParentElements (el, selector, baseNode) {
return
false
}
export
function
getComputedSize
(
$el
)
{
export
function
getComputedSize
(
$el
)
{
const
style
=
window
.
getComputedStyle
(
$el
)
return
[
parseFloat
(
style
.
getPropertyValue
(
'width'
),
10
),
parseFloat
(
style
.
getPropertyValue
(
'height'
),
10
)
]
return
[
parseFloat
(
style
.
getPropertyValue
(
'width'
),
10
),
parseFloat
(
style
.
getPropertyValue
(
'height'
),
10
)]
}
export
function
addEvent
(
el
,
event
,
handler
)
{
export
function
addEvent
(
el
,
event
,
handler
)
{
if
(
!
el
)
{
return
}
...
...
@@ -44,7 +35,7 @@ export function addEvent (el, event, handler) {
}
}
export
function
removeEvent
(
el
,
event
,
handler
)
{
export
function
removeEvent
(
el
,
event
,
handler
)
{
if
(
!
el
)
{
return
}
...
...
src/utils/emo.js
View file @
36bb716
const
emoji
=
[
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
],
[
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
],
[
'酷'
,
'囧'
,
'抓狂'
,
'吐'
,
'微笑'
,
'愉快'
,
'白眼'
,
'傲慢'
],
[
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
],
[
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
],
[
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
],
[
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
],
[
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
],
[
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
],
[
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
],
[
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
],
[
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
],
[
'磕头'
,
'回头'
,
'跳绳'
,
'投降'
,
'挥手'
,
'激动'
,
'街舞'
,
'左太极'
],
[
'右太极'
,
'嘿哈'
,
'捂脸'
,
'奸笑'
,
'机智'
,
'皱眉'
,
'耶'
,
'社会社会'
],
[
'让我看看'
,
'666'
,
'红包'
,
'蜡烛'
,
'烟花'
,
'福'
,
'庆祝'
,
'爆竹'
],
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
],
[
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
],
[
'酷'
,
'囧'
,
'抓狂'
,
'吐'
,
'微笑'
,
'愉快'
,
'白眼'
,
'傲慢'
],
[
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
],
[
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
],
[
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
],
[
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
],
[
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
],
[
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
],
[
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
],
[
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
],
[
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
],
[
'磕头'
,
'回头'
,
'跳绳'
,
'投降'
,
'挥手'
,
'激动'
,
'街舞'
,
'左太极'
],
[
'右太极'
,
'嘿哈'
,
'捂脸'
,
'奸笑'
,
'机智'
,
'皱眉'
,
'耶'
,
'社会社会'
],
[
'让我看看'
,
'666'
,
'红包'
,
'蜡烛'
,
'烟花'
,
'福'
,
'庆祝'
,
'爆竹'
]
]
export
default
emoji
\ No newline at end of file
export
default
emoji
src/utils/fns.js
View file @
36bb716
export
function
isFunction
(
func
)
{
return
(
typeof
func
===
'function'
||
Object
.
prototype
.
toString
.
call
(
func
)
===
'[object Function]'
)
export
function
isFunction
(
func
)
{
return
typeof
func
===
'function'
||
Object
.
prototype
.
toString
.
call
(
func
)
===
'[object Function]'
}
export
function
snapToGrid
(
grid
,
pendingX
,
pendingY
,
scale
=
1
)
{
export
function
snapToGrid
(
grid
,
pendingX
,
pendingY
,
scale
=
1
)
{
const
[
scaleX
,
scaleY
]
=
typeof
scale
===
'number'
?
[
scale
,
scale
]
:
scale
const
x
=
Math
.
round
(
(
pendingX
/
scaleX
)
/
grid
[
0
])
*
grid
[
0
]
const
y
=
Math
.
round
(
(
pendingY
/
scaleY
)
/
grid
[
1
])
*
grid
[
1
]
const
x
=
Math
.
round
(
pendingX
/
scaleX
/
grid
[
0
])
*
grid
[
0
]
const
y
=
Math
.
round
(
pendingY
/
scaleY
/
grid
[
1
])
*
grid
[
1
]
return
[
x
,
y
]
}
export
function
getSize
(
el
)
{
export
function
getSize
(
el
)
{
const
rect
=
el
.
getBoundingClientRect
()
return
[
parseInt
(
rect
.
width
),
parseInt
(
rect
.
height
)
]
return
[
parseInt
(
rect
.
width
),
parseInt
(
rect
.
height
)]
}
export
function
computeWidth
(
parentWidth
,
left
,
right
)
{
export
function
computeWidth
(
parentWidth
,
left
,
right
)
{
return
parentWidth
-
left
-
right
}
export
function
computeHeight
(
parentHeight
,
top
,
bottom
)
{
export
function
computeHeight
(
parentHeight
,
top
,
bottom
)
{
return
parentHeight
-
top
-
bottom
}
export
function
restrictToBounds
(
value
,
min
,
max
)
{
export
function
restrictToBounds
(
value
,
min
,
max
)
{
if
(
min
!==
null
&&
value
<
min
)
{
return
min
}
...
...
src/utils/util.js
View file @
36bb716
import
{
Message
}
from
'element-ui'
let
util
=
{}
util
.
cloneText
=
function
(
message
)
{
let
input
=
document
.
createElement
(
'input'
)
input
.
value
=
message
document
.
body
.
appendChild
(
input
)
input
.
select
()
input
.
setSelectionRange
(
0
,
input
.
value
.
length
),
document
.
execCommand
(
'Copy'
)
document
.
body
.
removeChild
(
input
)
Message
.
success
(
'复制成功'
)
util
.
cloneText
=
function
(
message
)
{
let
input
=
document
.
createElement
(
'input'
)
input
.
value
=
message
document
.
body
.
appendChild
(
input
)
input
.
select
()
input
.
setSelectionRange
(
0
,
input
.
value
.
length
),
document
.
execCommand
(
'Copy'
)
document
.
body
.
removeChild
(
input
)
Message
.
success
(
'复制成功'
)
}
util
.
getBeforeDate
=
function
(
sign
=
'-'
)
{
let
day
=
new
Date
();
let
month
=
day
.
getMonth
()
+
1
;
let
date
=
day
.
getDate
();
if
(
month
<
10
)
month
=
'0'
+
month
;
if
(
date
<
10
)
date
=
'0'
+
date
;
var
s
=
day
.
getFullYear
()
+
sign
+
month
+
sign
+
date
;
return
s
;
util
.
getBeforeDate
=
function
(
sign
=
'-'
)
{
let
day
=
new
Date
()
let
month
=
day
.
getMonth
()
+
1
let
date
=
day
.
getDate
()
if
(
month
<
10
)
month
=
'0'
+
month
if
(
date
<
10
)
date
=
'0'
+
date
var
s
=
day
.
getFullYear
()
+
sign
+
month
+
sign
+
date
return
s
}
util
.
getBeforeMonth
=
function
(
days
)
{
let
month
=
new
Date
().
getMonth
()
+
1
;
let
year
=
new
Date
().
getFullYear
();
let
arr
=
new
Array
();
for
(
let
i
=
0
;
i
<
days
;
i
++
)
{
if
(
month
<=
0
)
{
year
=
year
-
1
;
month
=
month
+
12
;
}
if
(
month
<
10
)
month
=
'0'
+
month
;
arr
[
i
]
=
year
+
'年'
+
month
+
'月'
month
--
util
.
getBeforeMonth
=
function
(
days
)
{
let
month
=
new
Date
().
getMonth
()
+
1
let
year
=
new
Date
().
getFullYear
()
let
arr
=
new
Array
()
for
(
let
i
=
0
;
i
<
days
;
i
++
)
{
if
(
month
<=
0
)
{
year
=
year
-
1
month
=
month
+
12
}
return
arr
;
if
(
month
<
10
)
month
=
'0'
+
month
arr
[
i
]
=
year
+
'年'
+
month
+
'月'
month
--
}
return
arr
}
/**
* 格式化时间
* @param {Array} time
*/
util
.
formatTime
=
function
(
time
)
{
return
{
startTime
:
time
?
time
[
0
]
+
' '
+
'00:00:00'
:
''
,
endTime
:
time
?
time
[
1
]
+
' '
+
'23:59:59'
:
''
}
util
.
formatTime
=
function
(
time
)
{
return
{
startTime
:
time
?
time
[
0
]
+
' '
+
'00:00:00'
:
''
,
endTime
:
time
?
time
[
1
]
+
' '
+
'23:59:59'
:
''
}
}
util
.
tringToDate
=
function
(
dateStr
,
separator
)
{
if
(
!
separator
)
{
separator
=
"-"
;
}
var
dateArr
=
dateStr
.
split
(
separator
);
var
year
=
parseInt
(
dateArr
[
0
]);
var
month
;
//处理月份为04这样的情况
if
(
dateArr
[
1
].
indexOf
(
"0"
)
==
0
)
{
month
=
parseInt
(
dateArr
[
1
].
substring
(
1
));
}
else
{
month
=
parseInt
(
dateArr
[
1
]);
}
var
day
=
parseInt
(
dateArr
[
2
]);
var
date
=
new
Date
(
year
,
month
-
1
,
day
);
return
date
;
util
.
tringToDate
=
function
(
dateStr
,
separator
)
{
if
(
!
separator
)
{
separator
=
'-'
}
var
dateArr
=
dateStr
.
split
(
separator
)
var
year
=
parseInt
(
dateArr
[
0
])
var
month
//处理月份为04这样的情况
if
(
dateArr
[
1
].
indexOf
(
'0'
)
==
0
)
{
month
=
parseInt
(
dateArr
[
1
].
substring
(
1
))
}
else
{
month
=
parseInt
(
dateArr
[
1
])
}
var
day
=
parseInt
(
dateArr
[
2
])
var
date
=
new
Date
(
year
,
month
-
1
,
day
)
return
date
}
util
.
getDay
=
function
(
num
,
str
=
'-'
)
{
var
today
=
new
Date
();
var
nowTime
=
today
.
getTime
();
var
ms
=
24
*
3600
*
1000
*
num
;
today
.
setTime
(
parseInt
(
nowTime
+
ms
));
var
oYear
=
today
.
getFullYear
();
var
oMoth
=
(
today
.
getMonth
()
+
1
).
toString
();
if
(
oMoth
.
length
<=
1
)
oMoth
=
'0'
+
oMoth
;
var
oDay
=
today
.
getDate
().
toString
();
if
(
oDay
.
length
<=
1
)
oDay
=
'0'
+
oDay
;
return
oYear
+
str
+
oMoth
+
str
+
oDay
;
util
.
getDay
=
function
(
num
,
str
=
'-'
)
{
var
today
=
new
Date
()
var
nowTime
=
today
.
getTime
()
var
ms
=
24
*
3600
*
1000
*
num
today
.
setTime
(
parseInt
(
nowTime
+
ms
))
var
oYear
=
today
.
getFullYear
()
var
oMoth
=
(
today
.
getMonth
()
+
1
).
toString
()
if
(
oMoth
.
length
<=
1
)
oMoth
=
'0'
+
oMoth
var
oDay
=
today
.
getDate
().
toString
()
if
(
oDay
.
length
<=
1
)
oDay
=
'0'
+
oDay
return
oYear
+
str
+
oMoth
+
str
+
oDay
}
util
.
openUrl
=
function
(
url
)
{
const
link
=
document
.
createElement
(
'a'
)
link
.
href
=
url
link
.
target
=
'_blank'
link
.
rel
=
'opener'
link
.
click
()
util
.
openUrl
=
function
(
url
)
{
const
link
=
document
.
createElement
(
'a'
)
link
.
href
=
url
link
.
target
=
'_blank'
link
.
rel
=
'opener'
link
.
click
()
}
util
.
downloadIamge
=
function
(
imgsrc
,
name
=
new
Date
().
getTime
())
{
//下载图片地址和图片名
var
image
=
new
Image
();
// 解决跨域 Canvas 污染问题
image
.
setAttribute
(
"crossOrigin"
,
"anonymous"
);
image
.
onload
=
function
()
{
var
canvas
=
document
.
createElement
(
"canvas"
);
canvas
.
width
=
image
.
width
;
canvas
.
height
=
image
.
height
;
var
context
=
canvas
.
getContext
(
"2d"
);
context
.
drawImage
(
image
,
0
,
0
,
image
.
width
,
image
.
height
);
var
url
=
canvas
.
toDataURL
(
"image/png"
);
//得到图片的base64编码数据
util
.
downloadIamge
=
function
(
imgsrc
,
name
=
new
Date
().
getTime
())
{
//下载图片地址和图片名
var
image
=
new
Image
()
// 解决跨域 Canvas 污染问题
image
.
setAttribute
(
'crossOrigin'
,
'anonymous'
)
image
.
onload
=
function
()
{
var
canvas
=
document
.
createElement
(
'canvas'
)
canvas
.
width
=
image
.
width
canvas
.
height
=
image
.
height
var
context
=
canvas
.
getContext
(
'2d'
)
context
.
drawImage
(
image
,
0
,
0
,
image
.
width
,
image
.
height
)
var
url
=
canvas
.
toDataURL
(
'image/png'
)
//得到图片的base64编码数据
var
a
=
document
.
createElement
(
"a"
);
// 生成一个a元素
var
event
=
new
MouseEvent
(
"click"
);
// 创建一个单击事件
a
.
download
=
name
||
"photo"
;
// 设置图片名称
a
.
href
=
url
;
// 将生成的URL设置为a.href属性
a
.
dispatchEvent
(
event
);
// 触发a的单击事件
};
image
.
src
=
imgsrc
;
var
a
=
document
.
createElement
(
'a'
)
// 生成一个a元素
var
event
=
new
MouseEvent
(
'click'
)
// 创建一个单击事件
a
.
download
=
name
||
'photo'
// 设置图片名称
a
.
href
=
url
// 将生成的URL设置为a.href属性
a
.
dispatchEvent
(
event
)
// 触发a的单击事件
}
image
.
src
=
imgsrc
}
export
default
util
\ No newline at end of file
export
default
util
src/views/channel/components/channelStatistics.vue
View file @
36bb716
...
...
@@ -156,7 +156,7 @@ export default {
this
.
codeSearch
()
},
handleTab
()
{
this
.
createTime
=
[]
;
this
.
createTime
=
[]
this
.
trendType
=
this
.
timeRadio
this
.
createTime
=
''
this
.
endTime
=
''
...
...
@@ -171,7 +171,7 @@ export default {
},
codeSearch
()
{
var
params
=
{
...
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableSearchForm
)),
...
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableSearchForm
)),
pageSize
:
this
.
$refs
.
table
.
page
.
pageSize
,
pageNum
:
this
.
$refs
.
table
.
page
.
pageNum
,
startTime
:
this
.
startTime
,
...
...
@@ -260,7 +260,7 @@ export default {
this
.
getFollower
()
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.channel-main
{
...
...
@@ -345,4 +345,4 @@ export default {
}
}
}
</
style
>
\ No newline at end of file
</
style
>
src/views/channel/components/empDetail.vue
View file @
36bb716
...
...
@@ -32,7 +32,7 @@
</
template
>
<
template
slot=
"customerName"
slot-scope=
"scope"
>
<div
class=
"form-row"
>
<img
:src=
"scope.scope.avatar"
v-if=
"scope.scope.avatar"
>
<img
:src=
"scope.scope.avatar"
v-if=
"scope.scope.avatar"
/
>
{{
scope
.
scope
.
customerName
}}
<span
style=
"color: #5850ff"
>
{{
scope
.
scope
.
type
==
1
?
'@微信'
:
'@企微'
}}
</span>
</div>
...
...
@@ -89,22 +89,22 @@ export default {
console
.
log
(
cellValue
)
return
cellValue
.
customerSex
==
1
?
'男'
:
'女'
},
width
:
'80px'
,
width
:
'80px'
},
{
label
:
'状态'
,
prop
:
'status'
,
addHtml
:
'status'
,
width
:
'80px'
,
width
:
'80px'
},
{
label
:
'跟进员工'
,
prop
:
'followStaff'
,
width
:
'80px'
,
width
:
'80px'
},
{
label
:
'添加时间'
,
prop
:
'addTime'
,
prop
:
'addTime'
},
{
label
:
'操作'
,
...
...
@@ -168,7 +168,7 @@ export default {
this
.
createTime
=
[]
this
.
pStatus
=
null
this
.
staffIds
=
null
this
.
timeStatus
=
true
;
this
.
timeStatus
=
true
if
(
value
==
'day'
&&
!
day
)
{
this
.
createTime
=
[
util
.
getDay
(
0
),
util
.
getDay
(
0
)]
this
.
timeStatus
=
false
...
...
@@ -221,12 +221,12 @@ export default {
handleDetail
(
scope
)
{
this
.
$history
.
push
(
'/custom/clientManage/clientDetail?id='
+
scope
.
oneId
)
},
handleCancel
:
utils
.
debounce
(
function
()
{
handleCancel
:
utils
.
debounce
(
function
()
{
this
.
dialogVisible
=
false
},
300
)
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.dialog-jump
{
...
...
@@ -238,7 +238,8 @@ export default {
}
.emp-form
{
/deep/
{
.el-date-editor,.el-input
{
.el-date-editor,
.el-input
{
width
:
215px
;
}
}
...
...
@@ -267,4 +268,4 @@ export default {
vertical-align
:
middle
;
}
}
</
style
>
\ No newline at end of file
</
style
>
src/views/channel/index.vue
View file @
36bb716
...
...
@@ -4,7 +4,7 @@
<el-tab-pane
label=
"渠道码列表"
name=
"first"
></el-tab-pane>
<el-tab-pane
label=
"数据统计"
name=
"second"
></el-tab-pane>
</el-tabs>
<channel-list
v-if=
"activeName == 'first'"
:aaa=
"aaa"
></channel-list>
<channel-list
v-if=
"activeName == 'first'"
></channel-list>
<channel-statistics
v-if=
"activeName == 'second'"
></channel-statistics>
</div>
</
template
>
...
...
@@ -20,8 +20,7 @@ export default {
},
data
()
{
return
{
activeName
:
'first'
,
aaa
:
9
,
activeName
:
'first'
}
},
methods
:
{
...
...
@@ -59,7 +58,7 @@ export default {
this
.
wxTips
()
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.channel-main
{
...
...
@@ -69,4 +68,4 @@ export default {
}
}
}
</
style
>
\ No newline at end of file
</
style
>
src/views/market/config.vue
View file @
36bb716
...
...
@@ -311,7 +311,7 @@ export default {
},
watch
:
{
'addForm.content'
:
{
handler
:
function
()
{
handler
:
function
()
{
this
.
content
=
[]
let
str
=
this
.
addForm
.
content
let
num
=
70
...
...
@@ -347,7 +347,7 @@ export default {
deep
:
true
},
tagging
:
{
handler
:
function
()
{
handler
:
function
()
{
this
.
taggingLength
=
0
this
.
tagging
.
forEach
(
item
=>
{
this
.
taggingLength
+=
item
.
labelList
.
length
...
...
@@ -357,7 +357,7 @@ export default {
deep
:
true
},
labeling
:
{
handler
:
function
()
{
handler
:
function
()
{
if
(
this
.
labeling
.
length
==
0
)
{
this
.
contactNum
=
0
this
.
filterTagging
=
[]
...
...
@@ -526,7 +526,7 @@ export default {
this
.
$message
.
error
(
'请选择客户标签'
)
return
}
if
(
this
.
selectType
==
1
&&
this
.
contactNum
==
0
)
{
if
(
this
.
selectType
==
1
&&
this
.
contactNum
==
0
)
{
this
.
$message
.
error
(
'智能营销客户为空'
)
return
}
...
...
@@ -672,7 +672,7 @@ export default {
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.channel-main-welcome
{
...
...
@@ -1151,4 +1151,4 @@ export default {
}
}
}
</
style
>
\ No newline at end of file
</
style
>
src/views/market/index.vue
View file @
36bb716
...
...
@@ -5,7 +5,7 @@
<i
class=
"el-icon-plus"
></i>
新增营销
</GLButton>
<!--
<GLButton
type=
"primary"
@
click=
"addConfig"
size=
"small"
fn=
"新增"
mode=
"el-button"
>
新增营销
</GLButton>
-->
<label>
结合门店营销活动,指定客户创建智能营销,提高活动转化率
</label>
<el-popover
placement=
"top"
width=
"400"
trigger=
"hover"
content=
"通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。"
>
...
...
@@ -146,7 +146,7 @@ export default {
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.square-main-header
{
...
...
@@ -333,4 +333,4 @@ export default {
}
}
}
</
style
>
\ No newline at end of file
</
style
>
src/views/marketing/config.vue
View file @
36bb716
...
...
@@ -28,8 +28,8 @@
<div
class=
"drainage-form-item"
v-if=
"editStatus"
>
<label
class=
"is-require"
>
跟进员工
</label>
<el-popover
placement=
"top"
width=
"400"
trigger=
"hover"
content=
"通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。"
>
<img
src=
"@/assets/img/question.png"
slot=
"reference"
class=
"count-item-question"
/>
</el-popover>
<img
src=
"@/assets/img/question.png"
slot=
"reference"
class=
"count-item-question"
/>
</el-popover>
<div>
<el-button
size=
"small"
@
click=
"handleAddEmp"
>
<i
class=
"el-icon-plus"
></i>
...
...
@@ -70,7 +70,7 @@
</div>
</div>
<div
class=
"form-tips"
>
共可输入500字,70字內(含70字)计一条,超过70字,按70字/条计费。
</div>
<div
class=
"form-tips"
>
提示:当前短信已有{{ addForm.content.length }}字,按{{
content.length
}}条短信发送且计费。
</div>
<div
class=
"form-tips"
>
提示:当前短信已有{{ addForm.content.length }}字,按{{
content.length
}}条短信发送且计费。
</div>
</el-form-item>
<el-form-item
label=
"审核通知人:"
>
短信内容审核结果会通过企微消息的形式发送给设置的员工,员工可以及时跟进。
</el-form-item>
<el-form-item
label=
"自动打标签"
>
...
...
@@ -102,7 +102,7 @@
<img
src=
"@/assets/img/marketing/phone.png"
/>
<div
class=
"preview-content"
>
<div
class=
"preview-info"
>
<div
class=
"preview-text text"
v-for=
"(item,index) in content"
:key=
"index"
>
{{ item }}
</div>
<div
class=
"preview-text text"
v-for=
"(item,
index) in content"
:key=
"index"
>
{{ item }}
</div>
</div>
</div>
</div>
...
...
@@ -189,7 +189,7 @@ export default {
},
watch
:
{
'addForm.content'
:
{
handler
:
function
()
{
handler
:
function
()
{
this
.
content
=
[]
let
str
=
this
.
addForm
.
content
let
num
=
70
...
...
@@ -331,8 +331,8 @@ export default {
}
},
mounted
()
{
this
.
resize
()
;
window
.
addEventListener
(
'resize'
,
()
=>
{
this
.
resize
()
window
.
addEventListener
(
'resize'
,
()
=>
{
this
.
resize
()
})
let
{
id
}
=
this
.
$route
.
params
...
...
@@ -343,7 +343,7 @@ export default {
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.footer-panel
{
...
...
@@ -704,4 +704,4 @@ export default {
}
}
}
</
style
>
\ No newline at end of file
</
style
>
src/views/overview/components/linechart.vue
View file @
36bb716
...
...
@@ -60,12 +60,12 @@ export default {
},
dataZoom
:
[
{
startValue
:
lengthC
-
29
,
startValue
:
lengthC
-
29
,
endValue
:
lengthC
},
{
type
:
'inside'
,
startValue
:
lengthC
-
29
,
startValue
:
lengthC
-
29
,
endValue
:
lengthC
}
],
...
...
@@ -94,11 +94,11 @@ export default {
]
}
option
&&
myChart
.
setOption
(
option
)
option
&&
myChart
.
setOption
(
option
)
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
.chart-line
{
...
...
@@ -115,4 +115,4 @@ export default {
margin-bottom
:
12px
;
}
}
</
style
>
\ No newline at end of file
</
style
>
src/views/square/index.vue
View file @
36bb716
...
...
@@ -60,7 +60,7 @@
<echart-circle
bgColor=
"#5AD8A6"
coustomId=
"coustomId_2"
:lineData=
"[countAll.unInfoCount, countAll.totalCount - countAll.unInfoCount]"
></echart-circle>
<div
class=
"coustom-echart-desc"
>
<div
class=
"coustom-echart-title"
>
人群占比
</div>
<div
class=
"coustom-echart-num"
>
<div
class=
"coustom-echart-num"
>
<span
class=
"detail-content"
>
{{
countAll
.
unInfoCount
}}
/
{{
countAll
.
totalCount
}}
<GLButton
@
click=
"jumpDetail"
class=
"detail-btn"
fn=
"客户明细"
mode=
"label"
></GLButton>
...
...
@@ -77,7 +77,7 @@
<echart-circle
bgColor=
"#5D7092"
coustomId=
"coustomId_3"
:lineData=
"[countAll.unRenewCount, countAll.totalCount - countAll.unRenewCount]"
></echart-circle>
<div
class=
"coustom-echart-desc"
>
<div
class=
"coustom-echart-title"
>
人群占比
</div>
<div
class=
"coustom-echart-num"
>
<div
class=
"coustom-echart-num"
>
<span
class=
"detail-content"
>
{{
countAll
.
unRenewCount
}}
/
{{
countAll
.
totalCount
}}
<GLButton
@
click=
"jumpDetail"
class=
"detail-btn"
fn=
"客户明细"
mode=
"label"
></GLButton>
...
...
@@ -94,7 +94,7 @@
<echart-circle
bgColor=
"#5B8FF9"
coustomId=
"coustomId_4"
:lineData=
"[countAll.unRegularCount, countAll.totalCount - countAll.unRegularCount]"
></echart-circle>
<div
class=
"coustom-echart-desc"
>
<div
class=
"coustom-echart-title"
>
人群占比
</div>
<div
class=
"coustom-echart-num"
>
<div
class=
"coustom-echart-num"
>
<span
class=
"detail-content"
>
{{
countAll
.
unRegularCount
}}
/
{{
countAll
.
totalCount
}}
<GLButton
@
click=
"jumpDetail"
class=
"detail-btn"
fn=
"客户明细"
mode=
"label"
></GLButton>
...
...
@@ -289,7 +289,7 @@ export default {
this
.
findLogin
()
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.detail-content
{
...
...
@@ -488,4 +488,4 @@ export default {
padding
:
20px
;
margin-top
:
20px
;
}
</
style
>
\ No newline at end of file
</
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