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 bd45b149
authored
Dec 27, 2021
by
test
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
任务宝状态类型补全;群发附件传参调整
1 parent
ced63aee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
120 additions
and
121 deletions
linkwe-ui/src/views/application/taskGroup.vue
linkwe-ui/src/views/groupMessage/add.vue
linkwe-ui/src/views/application/taskGroup.vue
View file @
bd45b14
<
script
>
import
*
as
api
from
'@/api/task'
import
*
as
api
from
'@/api/task'
export
default
{
name
:
'Group'
,
data
()
{
return
{
query
:
{
pageNum
:
1
,
pageSize
:
10
,
taskName
:
''
,
startTime
:
''
,
overTime
:
''
,
fissionType
:
1
},
dateRange
:
[],
tableData
:
[],
total
:
0
,
loading
:
false
}
},
created
()
{
this
.
getList
()
export
default
{
name
:
'Group'
,
data
()
{
return
{
query
:
{
pageNum
:
1
,
pageSize
:
10
,
taskName
:
''
,
startTime
:
''
,
overTime
:
''
,
fissionType
:
1
},
dateRange
:
[],
tableData
:
[],
total
:
0
,
loading
:
false
}
},
created
()
{
this
.
getList
()
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
`
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
`
<div>是通过管理员统一下发群发消息的任务,将消息推送给员工,员工点击任务按钮进行发送,将任务裂变海报以 H5 网页链接的形式发送给客户。此方式也会消耗一月四次客户群发触达的次数限制。</div>
`
)
},
methods
:
{
setChange
(
e
)
{
if
(
e
)
{
this
.
query
.
startTime
=
e
[
0
]
this
.
query
.
overTime
=
e
[
1
]
}
else
{
this
.
query
.
startTime
=
''
this
.
query
.
overTime
=
''
}
)
},
resetFn
()
{
this
.
query
=
{
pageNum
:
1
,
pageSize
:
10
,
taskName
:
''
,
startTime
:
''
,
overTime
:
''
,
fissionType
:
1
methods
:
{
setChange
(
e
)
{
if
(
e
)
{
this
.
query
.
startTime
=
e
[
0
]
this
.
query
.
overTime
=
e
[
1
]
}
else
{
this
.
query
.
startTime
=
''
this
.
query
.
overTime
=
''
}
},
resetFn
()
{
this
.
query
=
{
pageNum
:
1
,
pageSize
:
10
,
taskName
:
''
,
startTime
:
''
,
overTime
:
''
,
fissionType
:
1
}
this
.
dateRange
=
[]
this
.
getList
()
},
getList
(
data
)
{
this
.
loading
=
true
let
params
=
Object
.
assign
({},
this
.
query
,
data
)
api
.
getList
(
params
).
then
(({
rows
,
total
})
=>
{
this
.
tableData
=
rows
this
.
total
=
+
total
this
.
loading
=
false
})
},
resetForm
()
{
},
toDetail
(
row
)
{
this
.
$router
.
push
({
path
:
`taskDetail?id=
${
row
.
id
}
`
})
},
newAdd
()
{
this
.
$router
.
push
({
path
:
'addTask'
})
},
toEdit
(
row
)
{
this
.
$router
.
push
({
path
:
`addTask?id=
${
row
.
id
}
`
})
}
this
.
dateRange
=
[]
this
.
getList
()
},
getList
(
data
)
{
this
.
loading
=
true
let
params
=
Object
.
assign
({},
this
.
query
,
data
)
api
.
getList
(
params
).
then
(({
rows
,
total
})
=>
{
this
.
tableData
=
rows
this
.
total
=
+
total
this
.
loading
=
false
})
},
resetForm
()
{},
toDetail
(
row
)
{
this
.
$router
.
push
({
path
:
`taskDetail?id=
${
row
.
id
}
`
})
},
newAdd
()
{
this
.
$router
.
push
({
path
:
'addTask'
})
},
toEdit
(
row
)
{
this
.
$router
.
push
({
path
:
`addTask?id=
${
row
.
id
}
`
})
}
}
}
</
script
>
<
template
>
...
...
@@ -87,33 +87,13 @@ export default {
<el-input
v-model=
"query.taskName"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"添加日期"
>
<el-date-picker
v-model=
"dateRange"
@
change=
"setChange"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
align=
"right"
></el-date-picker>
<el-date-picker
v-model=
"dateRange"
@
change=
"setChange"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
align=
"right"
></el-date-picker>
</el-form-item>
<el-form-item
label=
" "
>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"primary"
:loading=
"loading"
@
click=
"getList(
{ pageNum: 1 })"
>查询
</el-button
>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"primary"
:loading=
"loading"
@
click=
"getList(
{ pageNum: 1 })">查询
</el-button>
<el-button
@
click=
"resetFn"
type=
"success"
>
清空
</el-button>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"primary"
@
click=
"newAdd()"
style=
"background: #FA7216;color: #FFFFFF;border-color:#FA7216"
>
新增任务
</el-button
>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"primary"
@
click=
"newAdd()"
style=
"background: #FA7216;color: #FFFFFF;border-color:#FA7216"
>
新增任务
</el-button>
</el-form-item>
</el-form>
<el-table
:data=
"tableData"
>
...
...
@@ -121,7 +101,8 @@ export default {
<el-table-column
prop=
"fissNum"
label=
"裂变客户数量"
>
</el-table-column>
<el-table-column
prop=
"fissStatus"
label=
"活动状态"
>
<template
slot-scope=
"scope"
>
<p>
{{
scope
.
row
.
fissStatus
===
1
?
'进行中'
:
'已结束'
}}
</p>
<!-- -1-发送失败 0-待发送 1-进行中 2-已结束 -->
<p>
{{
scope
.
row
.
fissStatus
===
1
?
'进行中'
:
scope
.
row
.
fissStatus
===
-
1
?
'发送失败'
:
scope
.
row
.
fissStatus
===
0
?
'待发送'
:
'已结束'
}}
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"startTime"
label=
"活动时间"
>
...
...
@@ -131,32 +112,12 @@ export default {
</el-table-column>
<el-table-column
prop=
"operation"
label=
"操作"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"toDetail(scope.row)"
v-hasPermi=
"['enterpriseWechat:view']"
size=
"medium"
type=
"text"
icon=
"el-icon-view"
></el-button>
<el-button
v-if=
"scope.row.fissStatus != 2"
@
click=
"toEdit(scope.row)"
v-hasPermi=
"['enterpriseWechat:edit']"
size=
"medium"
type=
"text"
icon=
"el-icon-edit-outline"
style=
"color:#E74E59"
></el-button>
<el-button
@
click=
"toDetail(scope.row)"
v-hasPermi=
"['enterpriseWechat:view']"
size=
"medium"
type=
"text"
icon=
"el-icon-view"
></el-button>
<el-button
v-if=
"scope.row.fissStatus != 2"
@
click=
"toEdit(scope.row)"
v-hasPermi=
"['enterpriseWechat:edit']"
size=
"medium"
type=
"text"
icon=
"el-icon-edit-outline"
style=
"color:#E74E59"
></el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
</div>
</template>
...
...
linkwe-ui/src/views/groupMessage/add.vue
View file @
bd45b14
...
...
@@ -341,11 +341,49 @@
}
return
dest
},
resetData
(
list
)
{
let
arr
=
[]
if
(
list
&&
list
.
length
)
{
list
.
forEach
(
dd
=>
{
if
(
dd
.
msgType
===
'0'
)
{
let
obj
=
{
msgType
:
'image'
,
picUrl
:
dd
.
materialUrl
}
arr
.
push
(
obj
)
}
else
if
(
dd
.
msgType
===
'8'
)
{
let
ob
=
{
msgType
:
'link'
,
title
:
dd
.
materialName
,
linkUrl
:
dd
.
materialUrl
}
arr
.
push
(
ob
)
}
else
if
(
dd
.
msgType
===
'9'
)
{
let
ff
=
{
msgType
:
'miniprogram'
,
appId
:
dd
.
digest
,
title
:
dd
.
materialName
,
picUrl
:
dd
.
coverUrl
,
linkUrl
:
dd
.
materialUrl
}
arr
.
push
(
ff
)
}
})
}
return
arr
},
save
(
materialData
)
{
let
data
=
Object
.
assign
({},
this
.
form
,
{
console
.
log
(
materialData
)
let
list
=
this
.
resetData
(
materialData
.
materialMsgList
)
let
myObj
=
{
content
:
materialData
.
welcomeMsg
,
attachmentsList
:
materialData
.
materialMsgList
})
attachments
:
[{
content
:
materialData
.
welcomeMsg
,
msgType
:
'text'
}]
}
myObj
.
attachments
.
push
(...
list
)
let
data
=
Object
.
assign
({},
this
.
form
,
myObj
)
data
.
senderList
=
[]
data
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
if
(
data
.
chatType
===
1
)
{
...
...
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