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 6dcf1d0d
authored
Jun 14, 2023
by
ext.wangyuman1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户朋友圈模块
1 parent
572438de
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
171 additions
and
94 deletions
vue3-lw-pc/src/api/circle.js
vue3-lw-pc/src/components/ContentCenter/AddMaterial.vue
vue3-lw-pc/src/components/ContentCenter/MaterialCenter/index.vue
vue3-lw-pc/src/config.js
vue3-lw-pc/src/views/friendCircle/list.vue
vue3-lw-pc/src/views/friendCircle/publish.vue
vue3-lw-pc/src/api/circle.js
View file @
6dcf1d0
...
...
@@ -23,10 +23,10 @@ export function syncHMoments(data) {
})
}
// 朋友圈
企业
详情
// 朋友圈 详情
export
function
getDetail
(
id
)
{
return
request
({
url
:
service
+
'/moments/
findMomentsDetail
/'
+
id
,
url
:
service
+
'/moments/
get
/'
+
id
,
})
}
...
...
@@ -62,4 +62,11 @@ export function numMoments(data) {
method
:
'post'
,
data
:
data
,
})
}
\ No newline at end of file
}
// 朋友圈 提醒执行
export
function
reminderMoments
(
data
)
{
return
request
({
url
:
service
+
'/moments/reminder/execution/'
+
data
,
})
}
vue3-lw-pc/src/components/ContentCenter/AddMaterial.vue
View file @
6dcf1d0
...
...
@@ -210,7 +210,7 @@
<el-button
@
click=
"getCancel"
v-if=
"moduleType !== 4"
>
取消
</el-button>
<el-button
type=
"primary"
v-loading=
"talkLoading"
@
click=
"tackSubmit"
>
确定
</el-button>
</
template
>
<
template
v-else-if=
"otherType === 3 && moduleType !== 2"
>
<
template
v-else-if=
"otherType === 3 && moduleType !== 2
&& !detail
"
>
<el-button
@
click=
"goBack"
>
取消
</el-button>
<el-button
type=
"primary"
v-loading=
"talkLoading"
@
click=
"tackSubmit"
>
确定
</el-button>
</
template
>
...
...
@@ -411,6 +411,11 @@ export default {
type
:
Boolean
,
default
:
true
,
},
// 是否为详情页面
detail
:
{
type
:
Boolean
,
default
:
false
,
},
},
watch
:
{
baseData
(
val
)
{
...
...
@@ -586,8 +591,17 @@ export default {
this
.
talkList
=
val
this
.
$emit
(
'phoneData'
,
this
.
talkList
)
},
getItemArry
(
val
)
{
getItemArry
(
val
,
length
)
{
this
.
talkList
=
this
.
talkList
.
concat
(
val
)
if
(
this
.
otherType
===
3
)
{
this
.
maxlength
=
length
if
(
this
.
maxlength
===
9
)
{
this
.
fontType
=
'图片类型的附件'
}
else
{
this
.
fontType
=
'其他类型的附件'
}
}
// 当手机为非内嵌时
this
.
$emit
(
'phoneData'
,
this
.
talkList
)
},
...
...
@@ -637,13 +651,22 @@ export default {
// 新建话术
tackSubmit
()
{
this
.
talkLoading
=
true
if
([
3
,
4
].
includes
(
this
.
moduleType
)
&&
!
this
.
talkForm
.
templateInfo
)
{
if
([
3
,
4
].
includes
(
this
.
moduleType
)
&&
!
this
.
talkForm
.
templateInfo
&&
this
.
otherType
!==
3
)
{
this
.
templateInfo
=
'请输入'
+
this
.
lableOne
this
.
talkLoading
=
false
return
}
else
{
this
.
templateInfo
=
''
}
if
(
this
.
otherType
===
3
)
{
if
(
!
this
.
talkForm
.
templateInfo
&&
!
this
.
talkList
.
length
)
{
this
.
templateInfo
=
'文本或附件内容至少填写一种'
this
.
talkLoading
=
false
return
}
else
{
this
.
templateInfo
=
''
}
}
if
(
!
this
.
talkForm
.
userIds
&&
this
.
tplType
==
2
)
{
this
.
userInfo
=
'请选择员工'
this
.
talkLoading
=
false
...
...
@@ -856,7 +879,7 @@ export default {
this
.
talkList
=
this
.
baseData
.
attachments
}
this
.
dealType
()
if
(
this
.
otherType
===
3
||
this
.
tplType
==
3
)
{
if
(
this
.
tplType
==
3
)
{
this
.
maxlength
=
1
}
else
{
this
.
maxlength
=
9
...
...
vue3-lw-pc/src/components/ContentCenter/MaterialCenter/index.vue
View file @
6dcf1d0
...
...
@@ -131,6 +131,11 @@ export default {
this
.
dialogVisibel
=
val
},
},
maxlength
:
{
handler
(
val
)
{
this
.
maxlength2
=
val
},
},
},
computed
:
{},
components
:
{
...
...
@@ -152,6 +157,7 @@ export default {
ids
:
[],
// 选中数组
itemArry
:
[],
// 选中数组
inx
:
0
,
maxlength2
:
9
,
// 最大确认数
}
},
methods
:
{
...
...
@@ -208,40 +214,54 @@ export default {
},
changeBox
(
event
,
obj
)
{
event
.
preventDefault
()
this
.
ids
=
[]
this
.
paneList
.
forEach
((
item
)
=>
{
if
(
item
.
list
&&
item
.
list
.
length
)
{
item
.
list
.
forEach
((
item1
)
=>
{
this
.
ids
.
push
(
item1
)
})
}
})
if
(
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength
||
this
.
ids
.
length
+
this
.
talkListLength
===
this
.
maxlength
)
&&
!
obj
.
isCheck
)
{
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength
+
'个素材,已新建'
+
this
.
talkListLength
+
'个素材'
)
return
}
obj
.
isCheck
=
!
obj
.
isCheck
if
(
obj
.
isCheck
)
{
this
.
paneList
[
this
.
picindex
].
list
.
push
(
obj
)
}
else
{
this
.
paneList
[
this
.
picindex
].
list
=
this
.
paneList
[
this
.
picindex
].
list
.
filter
((
list
)
=>
{
return
list
.
id
!==
obj
.
id
let
setStatus
=
true
if
(
this
.
isFriends
)
{
// 如果是朋友圈的
this
.
maxlength2
=
9
this
.
paneList
.
forEach
((
item
,
i
)
=>
{
if
(
item
.
list
.
length
>
0
&&
i
!==
0
)
{
this
.
$message
.
error
(
'仅允许选择一种类型的素材'
)
setStatus
=
false
return
}
})
}
this
.
ids
=
[]
this
.
paneList
.
forEach
((
item
)
=>
{
if
(
item
.
list
&&
item
.
list
.
length
)
{
item
.
list
.
forEach
((
item1
)
=>
{
this
.
ids
.
push
(
item1
)
if
(
setStatus
)
{
this
.
ids
=
[]
this
.
paneList
.
forEach
((
item
)
=>
{
if
(
item
.
list
&&
item
.
list
.
length
)
{
item
.
list
.
forEach
((
item1
)
=>
{
this
.
ids
.
push
(
item1
)
})
}
})
if
(
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength2
||
this
.
ids
.
length
+
this
.
talkListLength
===
this
.
maxlength2
)
&&
!
obj
.
isCheck
)
{
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength2
+
'个素材,已新建'
+
this
.
talkListLength
+
'个素材'
)
return
}
obj
.
isCheck
=
!
obj
.
isCheck
if
(
obj
.
isCheck
)
{
this
.
paneList
[
this
.
picindex
].
list
.
push
(
obj
)
}
else
{
this
.
paneList
[
this
.
picindex
].
list
=
this
.
paneList
[
this
.
picindex
].
list
.
filter
((
list
)
=>
{
return
list
.
id
!==
obj
.
id
})
}
})
this
.
ids
=
[]
this
.
paneList
.
forEach
((
item
)
=>
{
if
(
item
.
list
&&
item
.
list
.
length
)
{
item
.
list
.
forEach
((
item1
)
=>
{
this
.
ids
.
push
(
item1
)
})
}
})
}
},
centerCancel
()
{
this
.
dialogVisibel
=
false
...
...
@@ -262,12 +282,12 @@ export default {
this
.
ids
=
[]
},
centerSubmit
()
{
if
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength
)
{
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength
+
'个素材'
)
if
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength
2
)
{
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength
2
+
'个素材'
)
return
}
else
{
this
.
dialogVisibel
=
false
this
.
$emit
(
'itemArry'
,
this
.
ids
)
this
.
$emit
(
'itemArry'
,
this
.
ids
,
this
.
maxlength2
)
this
.
$emit
(
'update:choseDialog'
,
this
.
dialogVisibel
)
this
.
$refs
.
multipleTable
.
forEach
((
item
)
=>
{
item
.
clearSelection
()
...
...
@@ -276,7 +296,21 @@ export default {
this
.
clearPaneList
()
}
},
// 单个选择
handleSelect
(
select
,
row
)
{
if
(
this
.
isFriends
)
{
// 如果是朋友圈的
this
.
maxlength2
=
1
this
.
paneList
.
forEach
((
item
,
i
)
=>
{
if
(
item
.
list
.
length
>
0
&&
i
!==
+
this
.
index
)
{
this
.
$message
.
error
(
'仅允许选择一种类型的素材'
)
return
}
})
if
(
this
.
paneList
[
this
.
index
].
list
.
length
>
0
)
{
this
.
$message
.
error
(
'除图片素材可选9条数据,其他类型仅可选择一条数据'
)
}
}
let
list
=
this
.
paneList
[
this
.
index
].
list
let
falg
=
false
if
(
list
.
length
)
{
...
...
@@ -295,13 +329,16 @@ export default {
})
}
this
.
getIds
()
if
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength
)
{
if
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength
2
)
{
this
.
$nextTick
(()
=>
{
if
(
this
.
index
)
this
.
$refs
.
multipleTable
[
this
.
inx
].
toggleRowSelection
(
row
,
false
)
})
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength
+
'个素材,已新建'
+
this
.
talkListLength
+
'个素材'
)
if
(
!
this
.
isFriends
)
{
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength2
+
'个素材,已新建'
+
this
.
talkListLength
+
'个素材'
)
}
this
.
paneList
[
this
.
index
].
list
=
this
.
paneList
[
this
.
index
].
list
.
filter
((
item
)
=>
{
return
item
.
id
!=
row
.
id
})
...
...
@@ -309,6 +346,16 @@ export default {
}
},
selectAll
(
select
)
{
if
(
this
.
isFriends
)
{
// 如果是朋友圈的
this
.
maxlength2
=
1
// this.paneList.forEach((item, i) => {
// if (item.list.length > 0 && i !== +this.index) {
// this.$message.error('仅允许选择一种类型的素材')
// return
// }
// })
}
if
(
select
.
length
)
{
// 全选
this
.
paneList
[
this
.
index
].
list
=
select
...
...
@@ -317,13 +364,16 @@ export default {
this
.
paneList
[
this
.
index
].
list
=
[]
}
this
.
getIds
()
if
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength
)
{
if
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength
2
)
{
select
.
forEach
((
item
)
=>
{
this
.
$refs
.
multipleTable
[
this
.
inx
].
toggleAllSelection
(
item
,
false
)
})
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength
+
'个素材,已新建'
+
this
.
talkListLength
+
'个素材'
)
if
(
!
this
.
isFriends
)
{
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength2
+
'个素材,已新建'
+
this
.
talkListLength
+
'个素材'
)
}
this
.
paneList
[
this
.
index
].
list
=
[]
this
.
getIds
()
}
...
...
@@ -338,30 +388,6 @@ export default {
}
})
},
// 多选框选中数据
// handleSelectionChange(selection) {
// let list = JSON.parse(JSON.stringify(this.paneList[this.index].list))
// this.paneList[this.index].list = selection
// this.ids = []
// this.paneList.forEach((item) => {
// if (item.list && item.list.length) {
// item.list.forEach((item1) => {
// this.ids.push(item1)
// })
// }
// })
// if (this.ids.length + this.talkListLength > this.maxlength) {
// this.paneList[this.index].list = list
// this.ids = []
// this.paneList.forEach((item) => {
// if (item.list && item.list.length) {
// item.list.forEach((item1) => {
// this.ids.push(item1)
// })
// }
// })
// }
// },
// 处理文件类型
filType
(
file
)
{
let
filecontent
=
JSON
.
parse
(
JSON
.
stringify
(
file
))
...
...
@@ -385,13 +411,6 @@ export default {
}
else
{
this
.
inx
=
index
}
// if (this.picindex === 0) {
// // 不包含文本
// this.inx = this.index - 1
// } else if (this.picindex === 1) {
// // 包含文本
// }
},
},
}
...
...
vue3-lw-pc/src/config.js
View file @
6dcf1d0
...
...
@@ -62,8 +62,8 @@ let config = {
services
:
{
wecom
:
'/open'
,
system
:
env
.
SYSTEM_API
,
//
system: 'http://192.168.4.168:6180',
//
system: env.SYSTEM_API,
system
:
'http://192.168.4.168:6180'
,
common
:
'/common'
,
},
...
...
vue3-lw-pc/src/views/friendCircle/list.vue
View file @
6dcf1d0
...
...
@@ -97,7 +97,7 @@
<
template
#
default=
"{ row }"
>
<el-button
text
@
click=
"remind(row.id)"
v-if=
"row.status === 2"
>
提醒执行
</el-button>
<el-button
text
@
click=
"detailFn(row.id)"
>
统计
</el-button>
<el-button
text
@
click=
"detailFn(row
.id
)"
>
查看
</el-button>
<el-button
text
@
click=
"detailFn(row)"
>
查看
</el-button>
<el-button
text
@
click=
"cease(row.id)"
v-if=
"row.status !== 3"
>
停止
</el-button>
</
template
>
</el-table-column>
...
...
@@ -116,7 +116,7 @@
:defaultValues=
"userArray"
@
success=
"getSelectUser"
></SelectUser>
<el-dialog
title=
"详情"
v-model=
"detailDialogVisible"
width=
"40%"
>
<
!-- <
el-dialog title="详情" v-model="detailDialogVisible" width="40%">
<el-form label-position="right" label-width="100px">
<span style="margin-left: 40px; font-size: 16px">内容:</span>
<template v-for="(data, index) in detail.otherContent" :key="index">
...
...
@@ -164,12 +164,12 @@
</span>
</template>
</el-form>
</el-dialog>
</el-dialog>
-->
</div>
</template>
<
script
>
import
moment
from
'moment'
import
{
getEnterpriceList
,
syncHMoments
,
getDetail
,
cancel
Moments
}
from
'@/api/circle'
import
{
getEnterpriceList
,
syncHMoments
,
cancelMoments
,
reminder
Moments
}
from
'@/api/circle'
export
default
{
name
:
'enterprise'
,
components
:
{},
...
...
@@ -192,8 +192,8 @@ export default {
loading
:
false
,
tableData
:
[],
total
:
0
,
detailDialogVisible
:
false
,
detail
:
{},
//
detailDialogVisible: false,
//
detail: {},
sendType
:
[
{
label
:
'企微群发'
,
value
:
0
},
{
label
:
'成员群发'
,
value
:
1
},
...
...
@@ -233,12 +233,19 @@ export default {
break
}
},
remind
()
{
remind
(
id
)
{
this
.
$confirm
(
'提醒执行将针对本任务未执行的成员再次催促执行,是否确认提醒?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
})
.
then
(()
=>
{})
.
then
(()
=>
{
reminderMoments
(
id
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
msgSuccess
(
res
.
msg
)
this
.
getList
()
}
})
})
.
catch
(()
=>
{})
},
cease
(
id
)
{
...
...
@@ -274,13 +281,34 @@ export default {
this
.
query
.
executeEndTime
=
''
}
},
detailFn
(
id
)
{
this
.
detailDialogVisible
=
true
getDetail
(
id
).
then
((
dd
)
=>
{
if
(
dd
.
code
===
200
)
{
this
.
detail
=
dd
.
data
detailFn
(
row
)
{
let
type
=
''
// 朋友圈类型 1:非同步型 2:企业同步型 3:个人同步型
if
(
row
.
isLwPush
===
1
)
{
// 非同步型
type
=
1
}
else
if
(
row
.
isLwPush
===
0
)
{
// 同步型
if
(
row
.
type
===
0
)
{
// 企业同步型
type
=
2
}
else
if
(
row
.
type
===
1
)
{
// 个人同步型
type
=
3
}
}
this
.
$router
.
push
({
path
:
'/customerMaintain/friendCircle/publish'
,
query
:
{
type
,
id
:
row
.
id
,
},
})
// this.detailDialogVisible = true
// getDetail(id).then((dd) => {
// if (dd.code === 200) {
// this.detail = dd.data
// }
// })
},
syncFn
()
{
syncHMoments
(
2
).
then
((
res
)
=>
{
...
...
vue3-lw-pc/src/views/friendCircle/publish.vue
View file @
6dcf1d0
This diff is collapsed.
Click to expand it.
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