Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 e4ec0185
authored
Nov 03, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/front_end_1.5'
2 parents
04636262
5c4deabc
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
202 additions
and
263 deletions
linkwe-mobile/src/views/communityOperating/keywords/panel.vue
linkwe-mobile/src/views/communityOperating/task/list.vue
linkwe-mobile/src/views/groupCode/index.vue
linkwe-ui/src/components/SelectTag.vue
linkwe-ui/src/views/customerManage/customer.vue
linkwe-ui/src/views/groupMessage/add.vue
linkwe-ui/src/views/material/poster.vue
linkwe-mobile/src/views/communityOperating/keywords/panel.vue
View file @
e4ec018
...
@@ -97,7 +97,7 @@ export default {
...
@@ -97,7 +97,7 @@ export default {
)
)
}
catch
(
err
)
{
}
catch
(
err
)
{
_this
.
$toast
.
clear
()
_this
.
$toast
.
clear
()
_this
.
$dialog
({
message
:
'err
'
+
JSON
.
stringify
(
err
)
})
_this
.
$dialog
({
message
:
'err
:'
+
err
.
name
+
','
+
err
.
message
})
}
}
},
},
touchStart
()
{
touchStart
()
{
...
...
linkwe-mobile/src/views/communityOperating/task/list.vue
View file @
e4ec018
...
@@ -7,19 +7,26 @@
...
@@ -7,19 +7,26 @@
<div
class=
"type-area"
>
<div
class=
"type-area"
>
<van-button
round
size=
"small"
@
click=
"taskType = 0"
:type=
"taskType === 0 ? 'info' : 'default'"
>
全部
</van-button>
<van-button
round
size=
"small"
@
click=
"taskType = 0"
:type=
"taskType === 0 ? 'info' : 'default'"
>
全部
</van-button>
<van-button
round
size=
"small"
@
click=
"taskType = 1"
:type=
"taskType === 1 ? 'info' : 'default'"
>
老客标签建群
</van-button>
<van-button
round
size=
"small"
@
click=
"taskType = 1"
:type=
"taskType === 1 ? 'info' : 'default'"
<van-button
round
size=
"small"
@
click=
"taskType = 2"
:type=
"taskType === 2 ? 'info' : 'default'"
>
群SOP
</van-button>
>
老客标签建群
</van-button
>
<van-button
round
size=
"small"
@
click=
"taskType = 2"
:type=
"taskType === 2 ? 'info' : 'default'"
>
群SOP
</van-button
>
</div>
</div>
<template
v-if=
"!tasks || tasks.length === 0"
>
<template
v-if=
"!tasks || tasks.length === 0"
>
<van-empty
description=
"暂无数据"
/>
<van-empty
description=
"暂无数据"
/>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<template
<template
v-for=
"task in tasks"
>
v-for=
"task in tasks"
>
<template
v-if=
"task.type === 1"
>
<template
v-if=
"task.type === 1"
>
<OldCustomerPanel
:key=
"task.taskId"
:task=
"task"
:state=
"isDone ? true : false"
@
refresh=
"getTasks"
></OldCustomerPanel>
<OldCustomerPanel
:key=
"task.taskId"
:task=
"task"
:state=
"isDone ? true : false"
@
refresh=
"getTasks"
></OldCustomerPanel>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<SOPPanel
:key=
"task.ruleId"
:task=
"task"
:state=
"isDone ? true : false"
@
refresh=
"getTasks"
></SOPPanel>
<SOPPanel
:key=
"task.ruleId"
:task=
"task"
:state=
"isDone ? true : false"
@
refresh=
"getTasks"
></SOPPanel>
...
@@ -41,79 +48,81 @@ import SOPPanel from '../SOP/panel'
...
@@ -41,79 +48,81 @@ import SOPPanel from '../SOP/panel'
export
default
{
export
default
{
components
:
{
OldCustomerPanel
,
SOPPanel
},
components
:
{
OldCustomerPanel
,
SOPPanel
},
data
()
{
data
()
{
return
{
return
{
isDone
:
0
,
// 0: 待处理 1: 已处理
isDone
:
0
,
// 0: 待处理 1: 已处理
taskType
:
0
,
// 任务类型 0:全部 1:老客标签建群 2:群SOP
taskType
:
0
,
// 任务类型 0:全部 1:老客标签建群 2:群SOP
loading
:
false
,
// 加载状态
loading
:
false
,
// 加载状态
todo
:
[],
// 待处理数据
todo
:
[],
// 待处理数据
done
:
[]
,
// 已处理数据
done
:
[]
// 已处理数据
}
}
},
},
methods
:
{
methods
:
{
// 获取老客标签建群和群SOP任务数据
// 获取老客标签建群和群SOP任务数据
getTasks
()
{
getTasks
()
{
this
.
loading
=
true
this
.
loading
=
true
getTasks
(
this
.
$store
.
state
.
userId
,
this
.
taskType
).
then
((
res
)
=>
{
getTasks
(
this
.
$store
.
state
.
userId
,
this
.
taskType
)
if
(
res
.
code
===
200
)
{
.
then
((
res
)
=>
{
this
.
todo
=
res
.
todo
||
[]
if
(
res
.
code
===
200
)
{
this
.
done
=
res
.
done
||
[]
this
.
todo
=
res
.
todo
||
[]
}
else
{
this
.
done
=
res
.
done
||
[]
}
}
else
{
this
.
loading
=
false
}
}).
catch
((
error
)
=>
{
this
.
loading
=
false
this
.
loading
=
false
})
})
.
catch
((
error
)
=>
{
},
this
.
loading
=
false
})
}
},
},
computed
:
{
computed
:
{
userId
()
{
userId
()
{
return
this
.
$store
.
state
.
userId
return
this
.
$store
.
state
.
userId
},
},
tasks
()
{
tasks
()
{
if
(
this
.
isDone
===
1
)
return
this
.
done
if
(
this
.
isDone
===
1
)
return
this
.
done
return
this
.
todo
return
this
.
todo
}
,
}
},
},
watch
:
{
watch
:
{
taskType
(
val
)
{
taskType
(
val
)
{
if
(
this
.
userId
)
this
.
getTasks
()
if
(
this
.
userId
)
this
.
getTasks
()
},
},
userId
(
val
)
{
userId
(
val
)
{
if
(
val
)
{
if
(
val
)
{
this
.
getTasks
()
this
.
getTasks
()
}
}
}
}
},
},
created
()
{
created
()
{
document
.
title
=
'消息群发'
this
.
taskType
=
parseInt
(
this
.
$route
.
query
.
type
)
this
.
taskType
=
parseInt
(
this
.
$route
.
query
.
type
)
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.type-area
{
.type-area
{
padding
:
8px
;
padding
:
8px
;
background-color
:
#f2f2f2
;
background-color
:
#f2f2f2
;
.van-button
{
.van-button
{
margin
:
0
3px
;
margin
:
0
3px
;
}
}
}
}
.overlay
{
.overlay
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
.van-loading
{
.van-loading
{
margin
:
auto
;
margin
:
auto
;
}
}
}
}
</
style
>
</
style
>
linkwe-mobile/src/views/groupCode/index.vue
View file @
e4ec018
...
@@ -24,18 +24,9 @@
...
@@ -24,18 +24,9 @@
<van-button
type=
"danger"
@
click=
"dialog = true"
>
无法加群?
</van-button>
<van-button
type=
"danger"
@
click=
"dialog = true"
>
无法加群?
</van-button>
</div>
</div>
<van-dialog
<van-dialog
v-model=
"dialog"
class=
"service-dialog"
:showConfirmButton=
"false"
:closeOnClickOverlay=
"true"
>
v-model=
"dialog"
class=
"service-dialog"
:showConfirmButton=
"false"
:closeOnClickOverlay=
"true"
>
<div>
<div>
<van-image
<van-image
:src=
"code.serviceQrCode"
width=
"200"
>
</van-image>
:src=
"code.serviceQrCode"
width=
"200"
>
</van-image>
<div
class=
"service-message"
>
<div
class=
"service-message"
>
{{
code
.
tipMsg
}}
{{
code
.
tipMsg
}}
...
@@ -53,102 +44,105 @@
...
@@ -53,102 +44,105 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getDetail
}
from
'@/api/groupCode'
import
{
getDetail
}
from
'@/api/groupCode'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
groupCodeUUID
:
''
,
// 群活码ID
groupCodeUUID
:
''
,
// 群活码ID
code
:
{
code
:
{
activityName
:
''
,
// 活码名称
activityName
:
''
,
// 活码名称
guide
:
''
,
// 加群引导语
guide
:
''
,
// 加群引导语
actualQRCode
:
''
,
// 实际群码
actualQRCode
:
''
,
// 实际群码
isOpenTip
:
''
,
// 是否显示无法加群提示
isOpenTip
:
''
,
// 是否显示无法加群提示
tipMsg
:
''
,
// 无法加群提示语
tipMsg
:
''
,
// 无法加群提示语
serviceQrCode
:
''
,
// 客服二维码
serviceQrCode
:
''
,
// 客服二维码
groupName
:
''
,
// 实际群名称
groupName
:
''
// 实际群名称
},
},
dialog
:
false
,
dialog
:
false
,
message
:
'抱歉,暂无可用实际群码'
,
message
:
'抱歉,暂无可用实际群码'
}
}
},
},
methods
:
{
methods
:
{
// 获取群活码详情
// 获取群活码详情
getDetail
()
{
getDetail
()
{
if
(
!
this
.
groupCodeUUID
)
return
if
(
!
this
.
groupCodeUUID
)
return
getDetail
(
this
.
groupCodeUUID
).
then
(({
data
,
msg
})
=>
{
getDetail
(
this
.
groupCodeUUID
)
.
then
(({
data
,
msg
})
=>
{
this
.
code
=
Object
.
assign
(
this
.
code
,
data
)
this
.
code
=
Object
.
assign
(
this
.
code
,
data
)
if
(
msg
)
this
.
message
=
msg
if
(
msg
)
this
.
message
=
msg
}).
catch
(()
=>
{})
})
},
.
catch
(()
=>
{})
},
}
},
created
()
{
created
()
{
this
.
groupCodeUUID
=
this
.
$route
.
query
.
id
document
.
title
=
'群活码'
this
.
groupCodeUUID
=
this
.
$route
.
query
.
id
this
.
getDetail
()
this
.
getDetail
()
},
}
}
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.code-wrapper
{
.code-wrapper
{
margin
:
20px
10px
;
margin
:
20px
10px
;
.header
{
.header
{
font-size
:
18px
;
font-size
:
18px
;
margin
:
20px
10px
;
margin
:
20px
10px
;
text-align
:
center
;
text-align
:
center
;
}
}
.welcome
{
.welcome
{
font-size
:
16px
;
font-size
:
16px
;
color
:
#AAAAAA
;
color
:
#aaaaaa
;
margin
:
20px
10px
60px
;
margin
:
20px
10px
60px
;
}
}
.code-name
{
.code-name
{
font-size
:
20px
;
font-size
:
20px
;
margin
:
20px
10px
2px
;
margin
:
20px
10px
2px
;
font-weight
:
bold
;
font-weight
:
bold
;
text-align
:
center
;
text-align
:
center
;
}
}
.code-image
{
.code-image
{
text-align
:
center
;
text-align
:
center
;
margin-bottom
:
100px
;
margin-bottom
:
100px
;
}
}
.service
{
.service
{
text-align
:
center
;
text-align
:
center
;
.van-button
{
.van-button
{
border-radius
:
4px
;
border-radius
:
4px
;
height
:
36px
;
height
:
36px
;
}
}
}
}
}
}
.service-dialog
{
.service-dialog
{
text-align
:
center
;
text-align
:
center
;
border-radius
:
0
;
border-radius
:
0
;
padding
:
20px
;
padding
:
20px
;
.service-message
{
.service-message
{
margin-bottom
:
30px
;
margin-bottom
:
30px
;
}
}
.tip
{
.tip
{
font-size
:
12px
;
font-size
:
12px
;
color
:
#AAAAAA
;
color
:
#aaaaaa
;
}
}
.close
{
.close
{
position
:
absolute
;
position
:
absolute
;
top
:
10px
;
top
:
10px
;
right
:
10px
;
right
:
10px
;
}
}
}
}
</
style
>
</
style
>
linkwe-ui/src/components/SelectTag.vue
View file @
e4ec018
...
@@ -8,20 +8,21 @@ export default {
...
@@ -8,20 +8,21 @@ export default {
// 添加标签显隐
// 添加标签显隐
visible
:
{
visible
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
},
},
title
:
{
title
:
{
type
:
String
,
type
:
String
,
default
:
'选择标签'
,
default
:
'选择标签'
},
},
selected
:
{
selected
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
,
default
:
()
=>
[]
},
},
// add: 打标签,remove: 移除标签
type
:
{
type
:
{
type
:
String
,
type
:
String
,
default
:
'add'
,
default
:
'add'
}
,
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -29,7 +30,7 @@ export default {
...
@@ -29,7 +30,7 @@ export default {
listOneArray
:
[],
listOneArray
:
[],
selectedGroup
:
''
,
// 选择的标签分组
selectedGroup
:
''
,
// 选择的标签分组
removeTag
:
[],
removeTag
:
[],
Pselected
:
[]
,
Pselected
:
[]
}
}
},
},
watch
:
{
watch
:
{
...
@@ -51,7 +52,7 @@ export default {
...
@@ -51,7 +52,7 @@ export default {
}
}
// this.list = JSON.parse(JSON.stringify(this.list))
// this.list = JSON.parse(JSON.stringify(this.list))
},
},
list
(
val
)
{
list
(
val
)
{
if
(
this
.
type
===
'add'
)
{
if
(
this
.
type
===
'add'
)
{
this
.
Pselected
=
[]
this
.
Pselected
=
[]
this
.
selected
.
forEach
((
element
)
=>
{
this
.
selected
.
forEach
((
element
)
=>
{
...
@@ -74,8 +75,8 @@ export default {
...
@@ -74,8 +75,8 @@ export default {
},
},
set
(
val
)
{
set
(
val
)
{
this
.
$emit
(
'update:visible'
,
val
)
this
.
$emit
(
'update:visible'
,
val
)
}
,
}
}
,
}
},
},
created
()
{
created
()
{
this
.
getList
()
this
.
getList
()
...
@@ -110,8 +111,8 @@ export default {
...
@@ -110,8 +111,8 @@ export default {
},
},
toJson
(
data
)
{
toJson
(
data
)
{
return
JSON
.
stringify
(
data
)
return
JSON
.
stringify
(
data
)
}
,
}
}
,
}
}
}
</
script
>
</
script
>
...
@@ -121,40 +122,25 @@ export default {
...
@@ -121,40 +122,25 @@ export default {
<span
class=
"mr20"
>
选择分组
</span>
<span
class=
"mr20"
>
选择分组
</span>
<el-select
v-model=
"selectedGroup"
placeholder=
"请选择"
>
<el-select
v-model=
"selectedGroup"
placeholder=
"请选择"
>
<el-option
label=
"所有标签"
value
></el-option>
<el-option
label=
"所有标签"
value
></el-option>
<el-option
<el-option
v-for=
"(item, index) in list"
:key=
"index"
:label=
"item.gourpName"
:value=
"item.groupId"
></el-option>
v-for=
"(item, index) in list"
:key=
"index"
:label=
"item.gourpName"
:value=
"item.groupId"
></el-option>
</el-select>
</el-select>
<div
class=
"mt20"
v-if=
"Pvisible"
>
<div
class=
"mt20"
v-if=
"Pvisible"
>
<el-checkbox-group
v-if=
"type !== 'remove'"
v-model=
"Pselected"
>
<el-checkbox-group
v-if=
"type !== 'remove'"
v-model=
"Pselected"
>
<template
v-for=
"(item, index) in list"
>
<template
v-for=
"(item, index) in list"
>
<div
<div
class=
"bfc-d mr30 mb10"
v-if=
"item.groupId === selectedGroup || !selectedGroup"
:key=
"index"
>
class=
"bfc-d mr30"
v-if=
"item.groupId === selectedGroup || !selectedGroup"
:key=
"index"
>
<template
v-for=
"(unit, unique) in item.weTags"
>
<template
v-for=
"(unit, unique) in item.weTags"
>
<el-checkbox
<el-checkbox
v-if=
"unit.name.trim()"
:label=
"unit"
:key=
"index + '' + unique"
>
{{
v-if=
"unit.name.trim()"
unit
.
name
:label=
"unit"
}}
</el-checkbox>
:key=
"index + '' + unique"
>
{{
unit
.
name
}}
</el-checkbox
>
</
template
>
</
template
>
</div>
</div>
</template>
</template>
</el-checkbox-group>
</el-checkbox-group>
<el-checkbox-group
v-else
v-model=
"Pselected"
>
<el-checkbox-group
v-else
v-model=
"Pselected"
>
<
template
v-for=
"(item, index) in removeTag"
>
<
template
v-for=
"(item, index) in removeTag"
>
<el-checkbox
<el-checkbox
v-if=
"item.groupId === selectedGroup || !selectedGroup"
:label=
"item"
:key=
"index"
>
{{
v-if=
"item.groupId === selectedGroup || !selectedGroup"
item
.
name
.
trim
()
||
'(空的无效标签,请移除)'
:label=
"item"
}}
</el-checkbox>
:key=
"index"
>
{{
item
.
name
.
trim
()
||
'(空的无效标签,请移除)'
}}
</el-checkbox
>
</
template
>
</
template
>
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
...
...
linkwe-ui/src/views/customerManage/customer.vue
View file @
e4ec018
...
@@ -81,11 +81,11 @@ export default {
...
@@ -81,11 +81,11 @@ export default {
if
(
element
.
tagIds
&&
element
.
tagNames
)
{
if
(
element
.
tagIds
&&
element
.
tagNames
)
{
element
.
tagIds
=
element
.
tagIds
.
split
(
','
)
element
.
tagIds
=
element
.
tagIds
.
split
(
','
)
element
.
tagNames
=
element
.
tagNames
.
split
(
','
)
element
.
tagNames
=
element
.
tagNames
.
split
(
','
)
rows
.
tags
=
[]
element
.
tags
=
[]
element
.
tagIds
.
forEach
((
unit
,
index
)
=>
{
element
.
tagIds
.
forEach
((
unit
,
index
)
=>
{
rows
.
tags
.
push
({
element
.
tags
.
push
({
tagId
:
unit
,
tagId
:
unit
,
tag
Id
:
element
.
tagNames
[
index
]
tag
Names
:
element
.
tagNames
[
index
]
})
})
})
})
}
}
...
@@ -144,7 +144,7 @@ export default {
...
@@ -144,7 +144,7 @@ export default {
let
repeat
=
[]
let
repeat
=
[]
this
.
multipleSelection
.
forEach
((
element
)
=>
{
this
.
multipleSelection
.
forEach
((
element
)
=>
{
element
.
tags
&&
element
.
tags
&&
element
.
tags
.
split
(
','
).
forEach
((
unit
)
=>
{
element
.
tags
.
forEach
((
unit
)
=>
{
// 判断是否有重复标签
// 判断是否有重复标签
let
isRepeat
=
this
.
selectedTag
.
some
((
d
)
=>
{
let
isRepeat
=
this
.
selectedTag
.
some
((
d
)
=>
{
return
d
.
tagId
===
unit
.
tagId
return
d
.
tagId
===
unit
.
tagId
...
@@ -154,14 +154,12 @@ export default {
...
@@ -154,14 +154,12 @@ export default {
repeat
.
push
(
unit
.
tagName
)
repeat
.
push
(
unit
.
tagName
)
return
return
}
}
let
filter
=
this
.
listTagOneArray
.
find
((
d
)
=>
{
let
filter
=
this
.
listTagOneArray
.
find
((
d
)
=>
{
return
d
.
tagId
===
unit
.
tagId
return
d
.
tagId
===
unit
.
tagId
})
})
// 如果没有匹配到,则说明该便签处于异常状态,可能已被删除或破坏
// 如果没有匹配到,则说明该便签处于异常状态,可能已被删除或破坏
if
(
!
filter
)
{
if
(
!
filter
)
{
hasErrorTag
.
push
(
unit
.
tagName
)
hasErrorTag
.
push
(
unit
.
tagName
)
isError
=
true
return
return
}
}
...
@@ -178,7 +176,7 @@ export default {
...
@@ -178,7 +176,7 @@ export default {
}
}
this
.
tagDialogType
=
{
this
.
tagDialogType
=
{
title
:
(
type
===
'add'
?
'增加标签'
:
'移出标签'
)
+
(
repeat
.
length
?
'(重复的标签已去重显示)'
:
''
),
title
:
'标签管理'
+
(
repeat
.
length
?
'(重复的标签已去重显示)'
:
''
),
type
:
type
type
:
type
}
}
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
...
@@ -234,11 +232,11 @@ export default {
...
@@ -234,11 +232,11 @@ export default {
addTag
:
selected
,
addTag
:
selected
,
userId
:
this
.
multipleSelection
[
0
].
firstUserId
userId
:
this
.
multipleSelection
[
0
].
firstUserId
}
}
let
apiType
=
{
//
let apiType = {
add
:
'makeLabel'
,
//
add: 'makeLabel',
remove
:
'removeLabel'
//
remove: 'removeLabel'
}
//
}
api
[
apiType
[
this
.
tagDialogType
.
type
]]
(
data
).
then
(()
=>
{
api
.
makeLabel
(
data
).
then
(()
=>
{
this
.
msgSuccess
(
'操作成功'
)
this
.
msgSuccess
(
'操作成功'
)
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
this
.
getList
()
this
.
getList
()
...
@@ -260,7 +258,7 @@ export default {
...
@@ -260,7 +258,7 @@ export default {
handleSelection
(
selection
,
row
)
{
handleSelection
(
selection
,
row
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
table
.
clearSelection
()
this
.
$refs
.
table
.
clearSelection
()
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
)
this
.
$refs
.
table
.
toggleRowSelection
(
row
)
})
})
},
},
goRoute
(
row
)
{
goRoute
(
row
)
{
...
@@ -333,17 +331,17 @@ export default {
...
@@ -333,17 +331,17 @@ export default {
<el-button
<el-button
v-hasPermi=
"['customerManage/customer:makeTag']"
v-hasPermi=
"['customerManage/customer:makeTag']"
type=
"primary"
type=
"primary"
@
click=
"makeTag(
'add'
)"
@
click=
"makeTag()"
:disabled=
"multipleSelection.length !== 1"
:disabled=
"multipleSelection.length !== 1"
>
打标签
</el-button
>
标签管理
</el-button
>
>
<el-button
<
!-- <
el-button
v-hasPermi="['customerManage:customer:removeTag']"
v-hasPermi="['customerManage:customer:removeTag']"
type="primary"
type="primary"
@click="makeTag('remove')"
@click="makeTag('remove')"
:disabled="multipleSelection.length !== 1"
:disabled="multipleSelection.length !== 1"
>移除标签</el-button
>移除标签</el-button
>
>
-->
</div>
</div>
</div>
</div>
...
@@ -355,7 +353,7 @@ export default {
...
@@ -355,7 +353,7 @@ export default {
@
select=
"handleSelection"
@
select=
"handleSelection"
@
selection-change=
"handleSelectionChange"
@
selection-change=
"handleSelectionChange"
>
>
<el-table-column
type=
"selection"
align=
"center"
width=
"55"
></el-table-column>
<el-table-column
type=
"selection"
align=
"center"
width=
"55"
>
</el-table-column>
<el-table-column
label=
"客户"
prop=
"name"
align=
"center"
>
<el-table-column
label=
"客户"
prop=
"name"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<div
class=
"cp"
@
click=
"goRoute(row)"
>
<div
class=
"cp"
@
click=
"goRoute(row)"
>
...
...
linkwe-ui/src/views/groupMessage/add.vue
View file @
e4ec018
...
@@ -58,19 +58,21 @@ export default {
...
@@ -58,19 +58,21 @@ export default {
computed
:
{
computed
:
{
// 是否显示选择的客户标签
// 是否显示选择的客户标签
isOnlyTag
()
{
isOnlyTag
()
{
return
this
.
form
.
tag
[
0
]
&&
this
.
form
.
pushType
==
0
return
this
.
form
.
tag
[
0
]
&&
this
.
form
.
pushType
==
0
&&
this
.
form
.
pushRange
==
1
},
},
// 是否显示选择范围后的文字说明
// 是否显示选择范围后的文字说明
isSelectedText
()
{
isSelectedText
()
{
return
this
.
userParty
[
0
]
||
this
.
isOnlyTag
return
this
.
userParty
[
0
]
||
this
.
isOnlyTag
||
this
.
form
.
pushRange
==
0
},
},
// 选择范围后的文字说明
// 选择范围后的文字说明
selectedText
()
{
selectedText
()
{
return
`将发送消息给
${
return
this
.
form
.
pushType
==
0
&&
this
.
form
.
pushRange
==
0
this
.
userParty
[
0
]
?
this
.
userParty
[
0
].
name
+
'等部门或成员的'
:
''
?
'全部客户'
}
$
{
this
.
userParty
[
0
]
&&
this
.
isOnlyTag
?
',且'
:
''
}${
:
`将发送消息给
${
this
.
userParty
[
0
]
?
this
.
userParty
[
0
].
name
+
'等部门或成员的'
:
''
}${
this
.
isOnlyTag
?
'满足'
+
this
.
form
.
tag
[
0
].
name
+
'等标签的'
:
''
this
.
userParty
[
0
]
&&
this
.
isOnlyTag
?
',且'
:
''
}
$
{
this
.
form
.
pushType
==
0
?
'客户'
:
'客户群'
}
`
}
$
{
this
.
isOnlyTag
?
'满足'
+
this
.
form
.
tag
[
0
].
name
+
'等标签的'
:
''
}${
this
.
form
.
pushType
==
0
?
'客户'
:
'客户群'
}
`
}
}
},
},
created() {
created() {
...
@@ -108,11 +110,7 @@ export default {
...
@@ -108,11 +110,7 @@ export default {
methods: {
methods: {
// 显示选择客户范围弹窗
// 显示选择客户范围弹窗
showRangeDialog() {
showRangeDialog() {
this
[
this[this.form.pushType == 0 ? 'dialogVisibleSelectCustomer' : 'dialogVisibleSelectUser'] = true
this
.
form
.
pushType
==
0
?
'dialogVisibleSelectCustomer'
:
'dialogVisibleSelectUser'
]
=
true
},
},
// 选择添加人确认按钮
// 选择添加人确认按钮
selectedUser(users) {
selectedUser(users) {
...
@@ -191,31 +189,16 @@ export default {
...
@@ -191,31 +189,16 @@ export default {
<
template
>
<
template
>
<div
v-loading=
"loading"
>
<div
v-loading=
"loading"
>
<div
class=
"flex content-wrap"
>
<div
class=
"flex content-wrap"
>
<el-form
<el-form
style=
"margin-right: 170px;"
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
style=
"margin-right: 170px;"
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"群发类型"
prop=
"pushType"
>
<el-form-item
label=
"群发类型"
prop=
"pushType"
>
<el-radio-group
v-model=
"form.pushType"
>
<el-radio-group
v-model=
"form.pushType"
>
<el-radio
<el-radio
v-for=
"dict in statusOptions"
:key=
"dict.value"
:label=
"dict.value"
>
{{
dict
.
label
}}
</el-radio>
v-for=
"dict in statusOptions"
:key=
"dict.value"
:label=
"dict.value"
>
{{
dict
.
label
}}
</el-radio
>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
label=
"发送范围"
prop=
"pushRange"
>
<el-form-item
label=
"发送范围"
prop=
"pushRange"
>
<span
v-show=
"isSelectedText"
>
{{
selectedText
}}
</span>
<span
v-show=
"isSelectedText"
>
{{
selectedText
}}
</span>
<el-button
type=
"text"
size=
"medium"
@
click=
"showRangeDialog()"
>
{{
<el-button
type=
"text"
size=
"medium"
@
click=
"showRangeDialog()"
>
{{
isSelectedText
isSelectedText
?
'修改'
:
form
.
pushType
==
0
?
'选择发送客户'
:
'按群主选择客户群'
?
'修改'
:
form
.
pushType
==
0
?
'选择发送客户'
:
'按群主选择客户群'
}}
</el-button>
}}
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
label=
"发送时间"
prop=
"settingTime"
>
<el-form-item
label=
"发送时间"
prop=
"settingTime"
>
...
@@ -255,10 +238,7 @@ export default {
...
@@ -255,10 +238,7 @@ export default {
<!--
<el-tab-pane
name=
"2"
>
<!--
<el-tab-pane
name=
"2"
>
<span
slot=
"label"
>
<i
class=
"el-icon-date"
></i>
文件
</span>
<span
slot=
"label"
>
<i
class=
"el-icon-date"
></i>
文件
</span>
</el-tab-pane>
-->
</el-tab-pane>
-->
<el-button
<el-button
type=
"primary"
class=
"mt20"
@
click=
"dialogVisibleSelectMaterial = true"
type=
"primary"
class=
"mt20"
@
click=
"dialogVisibleSelectMaterial = true"
>
从素材库选择
</el-button
>
从素材库选择
</el-button
>
>
<!--
<el-tab-pane
label=
"配置管理"
name=
"second"
>
<!--
<el-tab-pane
label=
"配置管理"
name=
"second"
>
...
@@ -275,16 +255,8 @@ export default {
...
@@ -275,16 +255,8 @@ export default {
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<!-- 预览 -->
<!-- 预览 -->
<PhoneDialog
<PhoneDialog
:message=
"form.textMessage.content || '请输入欢迎语'"
:isOther=
"!!form.imageMessage.pic_url"
>
:message=
"form.textMessage.content || '请输入欢迎语'"
<el-image
style=
"border-radius: 6px;"
:src=
"form.imageMessage.pic_url"
fit=
"fit"
>
</el-image>
:isOther=
"!!form.imageMessage.pic_url"
>
<el-image
style=
"border-radius: 6px;"
:src=
"form.imageMessage.pic_url"
fit=
"fit"
>
</el-image>
</PhoneDialog>
</PhoneDialog>
</div>
</div>
<div
class=
"mt15"
style=
"margin-left: 40px;"
>
<div
class=
"mt15"
style=
"margin-left: 40px;"
>
...
@@ -308,12 +280,7 @@ export default {
...
@@ -308,12 +280,7 @@ export default {
<div
class=
"input-wrap"
@
click=
"dialogVisibleSelectUser = true"
>
<div
class=
"input-wrap"
@
click=
"dialogVisibleSelectUser = true"
>
<span
class=
"placeholder"
v-if=
"!userParty.length"
>
请选择
</span>
<span
class=
"placeholder"
v-if=
"!userParty.length"
>
请选择
</span>
<template
v-else
>
<template
v-else
>
<el-tag
<el-tag
type=
"info"
v-for=
"(unit, unique) in userParty"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag>
type=
"info"
v-for=
"(unit, unique) in userParty"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag
>
</
template
>
</
template
>
</div>
</div>
</el-form-item>
</el-form-item>
...
@@ -321,24 +288,15 @@ export default {
...
@@ -321,24 +288,15 @@ export default {
<div
class=
"input-wrap"
@
click=
"dialogVisibleSelectTag = true"
>
<div
class=
"input-wrap"
@
click=
"dialogVisibleSelectTag = true"
>
<span
class=
"placeholder"
v-if=
"!form.tag.length"
>
请选择
</span>
<span
class=
"placeholder"
v-if=
"!form.tag.length"
>
请选择
</span>
<
template
v-else
>
<
template
v-else
>
<el-tag
<el-tag
type=
"info"
v-for=
"(unit, unique) in form.tag"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag>
type=
"info"
v-for=
"(unit, unique) in form.tag"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag
>
</
template
>
</
template
>
</div>
</div>
</el-form-item>
</el-form-item>
</div>
</div>
</el-form>
</el-form>
<div
slot=
"footer"
>
<div
slot=
"footer"
>
<el-button
@
click=
"dialogVisibleSelectCustomer = false"
<el-button
@
click=
"dialogVisibleSelectCustomer = false"
>
取 消
</el-button>
>
取 消
</el-button
<el-button
type=
"primary"
@
click=
"dialogVisibleSelectCustomer = false"
>
确 定
</el-button>
>
<el-button
type=
"primary"
@
click=
"dialogVisibleSelectCustomer = false"
>
确 定
</el-button
>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -351,12 +309,7 @@ export default {
...
@@ -351,12 +309,7 @@ export default {
></SelectUser>
></SelectUser>
<!-- 选择标签弹窗 -->
<!-- 选择标签弹窗 -->
<SelectTag
<SelectTag
:visible
.
sync=
"dialogVisibleSelectTag"
title=
"选择标签"
:selected=
"form.tag"
@
success=
"submitSelectTag"
>
:visible
.
sync=
"dialogVisibleSelectTag"
title=
"选择标签"
:selected=
"form.tag"
@
success=
"submitSelectTag"
>
</SelectTag>
</SelectTag>
<SelectMaterial
<SelectMaterial
...
...
linkwe-ui/src/views/material/poster.vue
View file @
e4ec018
...
@@ -21,7 +21,6 @@ export default {
...
@@ -21,7 +21,6 @@ export default {
preview
:
false
,
// 预览弹出显示隐藏
preview
:
false
,
// 预览弹出显示隐藏
edit
:
false
// 编辑弹出显示隐藏
edit
:
false
// 编辑弹出显示隐藏
},
},
materialSelected
:
''
,
// 图片url
rangeErrorMsg
:
''
,
rangeErrorMsg
:
''
,
form
:
{
form
:
{
title
:
''
,
// 海报名称
title
:
''
,
// 海报名称
...
@@ -32,6 +31,7 @@ export default {
...
@@ -32,6 +31,7 @@ export default {
// sort: '', // 海报排序
// sort: '', // 海报排序
// jump: [], // 跳转页面
// jump: [], // 跳转页面
delFlag
:
0
,
// 是否启用
delFlag
:
0
,
// 是否启用
backgroundImgPath
:
''
,
// 图片url
mediaId
:
''
// 图片id
mediaId
:
''
// 图片id
},
},
rules
:
{
rules
:
{
...
@@ -88,10 +88,10 @@ export default {
...
@@ -88,10 +88,10 @@ export default {
categoryId
:
data
.
categoryId
,
categoryId
:
data
.
categoryId
,
type
:
data
.
type
,
type
:
data
.
type
,
delFlag
:
data
.
delFlag
,
delFlag
:
data
.
delFlag
,
backgroundImgPath
:
data
.
backgroundImgPath
,
posterJSON
:
JSON
.
parse
(
data
.
otherField
)
posterJSON
:
JSON
.
parse
(
data
.
otherField
)
}
}
this
.
posterSubassemblyList
=
data
.
posterSubassemblyList
||
[]
this
.
posterSubassemblyList
=
data
.
posterSubassemblyList
||
[]
this
.
materialSelected
=
data
.
backgroundImgPath
}
else
{
}
else
{
// 新增,清除编辑的数据
// 新增,清除编辑的数据
this
.
form
=
{}
this
.
form
=
{}
...
@@ -238,11 +238,11 @@ export default {
...
@@ -238,11 +238,11 @@ export default {
},
},
// 设置海报背景
// 设置海报背景
setPosterBackgroundImage
()
{
setPosterBackgroundImage
()
{
if
(
!
this
.
materialSelected
)
{
if
(
!
this
.
form
.
backgroundImgPath
)
{
return
return
}
}
let
canvas
=
this
.
canvas
let
canvas
=
this
.
canvas
new
fabric
.
Image
.
fromURL
(
this
.
materialSelected
,
(
img
)
=>
{
new
fabric
.
Image
.
fromURL
(
this
.
form
.
backgroundImgPath
,
(
img
)
=>
{
// img.set({
// img.set({
// // 通过scale来设置图片大小,这里设置和画布一样大
// // 通过scale来设置图片大小,这里设置和画布一样大
// // scaleX: canvas.width / img.width,
// // scaleX: canvas.width / img.width,
...
@@ -315,7 +315,7 @@ export default {
...
@@ -315,7 +315,7 @@ export default {
submitSelectMaterial
(
text
,
image
,
file
)
{
submitSelectMaterial
(
text
,
image
,
file
)
{
if
(
this
.
isBackgroundImage
)
{
if
(
this
.
isBackgroundImage
)
{
this
.
form
.
mediaId
=
image
.
id
this
.
form
.
mediaId
=
image
.
id
this
.
materialSelected
=
image
.
materialUrl
this
.
form
.
backgroundImgPath
=
image
.
materialUrl
this
.
setPosterBackgroundImage
()
this
.
setPosterBackgroundImage
()
this
.
dialogVisibleSelectMaterial
=
false
this
.
dialogVisibleSelectMaterial
=
false
}
else
{
}
else
{
...
@@ -324,7 +324,7 @@ export default {
...
@@ -324,7 +324,7 @@ export default {
},
},
//
//
save
(
isBack
)
{
save
(
isBack
)
{
if
(
this
.
materialSelected
===
''
)
{
if
(
!
this
.
form
.
backgroundImgPath
)
{
this
.
rangeErrorMsg
=
'请选择背景图片'
this
.
rangeErrorMsg
=
'请选择背景图片'
return
return
}
else
{
}
else
{
...
@@ -379,7 +379,6 @@ export default {
...
@@ -379,7 +379,6 @@ export default {
Object
.
assign
(
Object
.
assign
(
{
{
// backgroundImgPath: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2980445260,41238050&fm=26&gp=0.jpg',
// backgroundImgPath: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2980445260,41238050&fm=26&gp=0.jpg',
backgroundImgPath
:
this
.
materialSelected
,
posterSubassemblyList
:
posterSubList
posterSubassemblyList
:
posterSubList
},
},
form
form
...
@@ -433,7 +432,7 @@ export default {
...
@@ -433,7 +432,7 @@ export default {
</el-dialog>
</el-dialog>
<el-dialog
<el-dialog
title=
"海报编辑"
title=
"海报编辑"
width=
"
80%
"
width=
"
1180px
"
v-if=
"dialog.edit"
v-if=
"dialog.edit"
:visible
.
sync=
"dialog.edit"
:visible
.
sync=
"dialog.edit"
:before-close=
"beforeCloseDialog"
:before-close=
"beforeCloseDialog"
...
@@ -504,10 +503,10 @@ export default {
...
@@ -504,10 +503,10 @@ export default {
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
label=
"背景图片"
:required=
"true"
:error=
"rangeErrorMsg"
>
<el-form-item
label=
"背景图片"
:required=
"true"
:error=
"rangeErrorMsg"
>
<div
v-if=
"
materialSelected !== ''
"
>
<div
v-if=
"
form.backgroundImgPath
"
>
<el-image
<el-image
style=
"width: 100px; height: 100px; cursor: pointer;border-radius: 6px;"
style=
"width: 100px; height: 100px; cursor: pointer;border-radius: 6px;"
:src=
"
materialSelected
"
:src=
"
form.backgroundImgPath
"
fit=
"fit"
fit=
"fit"
>
>
</el-image>
</el-image>
...
@@ -625,7 +624,7 @@ export default {
...
@@ -625,7 +624,7 @@ export default {
position
:
relative
;
position
:
relative
;
vertical-align
:
top
;
vertical-align
:
top
;
overflow
:
auto
;
overflow
:
auto
;
max-width
:
50
0px
;
max-width
:
45
0px
;
max-height
:
700px
;
max-height
:
700px
;
}
}
#tbody-containerui-image-editor-controls
{
#tbody-containerui-image-editor-controls
{
...
...
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