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 45b0fd28
authored
Jun 30, 2023
by
ext.wangyuman1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
朋友圈PC端
1 parent
e98ff3c3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
112 deletions
vue3-lw-pc/src/components/ContentCenter/MaterialCenter/index.vue
vue3-lw-pc/src/views/friendCircle/components/Custom.vue
vue3-lw-pc/src/views/friendCircle/components/Record.vue
vue3-lw-pc/src/views/friendCircle/components/Staff.vue
vue3-lw-pc/src/views/friendCircle/list.vue
vue3-lw-pc/src/components/ContentCenter/MaterialCenter/index.vue
View file @
45b0fd2
...
@@ -9,45 +9,33 @@
...
@@ -9,45 +9,33 @@
width=
"80%"
width=
"80%"
append-to-body
append-to-body
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
@
close=
"dialogClose"
@
close=
"dialogClose"
>
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"tabClick"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"tabClick"
>
<el-tab-pane
<el-tab-pane
v-for=
"(item, index) in paneList"
v-for=
"(item, index) in paneList"
:key=
"index"
:key=
"index"
:label=
"item.label + '(' + item.list.length + ')'"
:label=
"item.label + '(' + item.list.length + ')'"
:name=
"item.name"
:name=
"item.name"
>
>
<MaPage
ref=
"page"
:type=
"item.type"
v-slot=
"
{ list }" @listChange="listChange">
<MaPage
ref=
"page"
:type=
"item.type"
:isFriends =
'isFriends'
v-slot=
"
{ list }" @listChange="listChange">
<div
v-if=
"item.type === '0'"
>
<div
v-if=
"item.type === '0'"
>
<div
v-if=
"list && list.length"
>
<div
v-if=
"list && list.length"
>
<el-checkbox-group
v-model=
"paneList[picindex].list"
class=
"imgStyle"
>
<el-checkbox-group
v-model=
"paneList[picindex].list"
class=
"imgStyle"
>
<div
<div
class=
"imgItem"
v-for=
"(item, index) in list"
:key=
"index"
@
click=
"changeBox($event, item)"
>
class=
"imgItem"
v-for=
"(item, index) in list"
:key=
"index"
@
click=
"changeBox($event, item)"
>
<div
class=
"checkboxStyle"
>
<div
class=
"checkboxStyle"
>
<el-checkbox
<el-checkbox
:label=
"item"
:label=
"item"
style=
"width: 20px; height: 20px"
style=
"width: 20px; height: 20px"
:checked=
"item.isCheck"
:checked=
"item.isCheck"
></el-checkbox>
></el-checkbox>
<el-tooltip
<el-tooltip
:content=
"item.materialName"
:content=
"item.materialName"
placement=
"top"
placement=
"top"
:disabled=
"item.materialName ? item.materialName.length
< 6
:
true
"
:disabled=
"item.materialName ? item.materialName.length
< 6
:
true
"
>
>
<div
class=
"title ml10"
>
<div
class=
"title ml10"
>
{{
coverContent
(
item
.
materialName
,
6
)
}}
{{
coverContent
(
item
.
materialName
,
6
)
}}
</div>
</div>
</el-tooltip>
</el-tooltip>
</div>
</div>
<div
<div
class=
"img"
:style=
"
{ 'background-image': 'url(' + item.materialUrl + ')' }">
</div>
class=
"img"
:style=
"
{ 'background-image': 'url(' + item.materialUrl + ')' }"
>
</div>
</div>
</div>
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
...
@@ -55,13 +43,7 @@
...
@@ -55,13 +43,7 @@
<span>
暂无数据
</span>
<span>
暂无数据
</span>
</div>
</div>
</div>
</div>
<el-table
<el-table
:data=
"list"
ref=
"multipleTable"
@
select=
"handleSelect"
@
select-all=
"selectAll"
v-else
>
:data=
"list"
ref=
"multipleTable"
@
select=
"handleSelect"
@
select-all=
"selectAll"
v-else
>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<el-table-column
label=
"素材"
align=
"left"
>
<el-table-column
label=
"素材"
align=
"left"
>
<template
#
default=
"
{ row }">
<template
#
default=
"
{ row }">
...
@@ -119,11 +101,6 @@ export default {
...
@@ -119,11 +101,6 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
},
},
// 朋友圈
isFriends
:
{
type
:
Boolean
,
default
:
false
,
},
},
},
watch
:
{
watch
:
{
choseDialog
:
{
choseDialog
:
{
...
@@ -131,11 +108,6 @@ export default {
...
@@ -131,11 +108,6 @@ export default {
this
.
dialogVisibel
=
val
this
.
dialogVisibel
=
val
},
},
},
},
maxlength
:
{
handler
(
val
)
{
this
.
maxlength2
=
val
},
},
},
},
computed
:
{},
computed
:
{},
components
:
{
components
:
{
...
@@ -157,7 +129,6 @@ export default {
...
@@ -157,7 +129,6 @@ export default {
ids
:
[],
// 选中数组
ids
:
[],
// 选中数组
itemArry
:
[],
// 选中数组
itemArry
:
[],
// 选中数组
inx
:
0
,
inx
:
0
,
maxlength2
:
9
,
// 最大确认数
}
}
},
},
methods
:
{
methods
:
{
...
@@ -214,19 +185,6 @@ export default {
...
@@ -214,19 +185,6 @@ export default {
},
},
changeBox
(
event
,
obj
)
{
changeBox
(
event
,
obj
)
{
event
.
preventDefault
()
event
.
preventDefault
()
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
}
})
}
if
(
setStatus
)
{
this
.
ids
=
[]
this
.
ids
=
[]
this
.
paneList
.
forEach
((
item
)
=>
{
this
.
paneList
.
forEach
((
item
)
=>
{
if
(
item
.
list
&&
item
.
list
.
length
)
{
if
(
item
.
list
&&
item
.
list
.
length
)
{
...
@@ -236,13 +194,11 @@ export default {
...
@@ -236,13 +194,11 @@ export default {
}
}
})
})
if
(
if
(
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength2
||
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength
||
this
.
ids
.
length
+
this
.
talkListLength
===
this
.
maxlength2
)
&&
this
.
ids
.
length
+
this
.
talkListLength
===
this
.
maxlength
)
&&
!
obj
.
isCheck
!
obj
.
isCheck
)
{
)
{
this
.
$message
.
error
(
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength
+
'个素材,已新建'
+
this
.
talkListLength
+
'个素材'
)
'最多新建或选择'
+
this
.
maxlength2
+
'个素材,已新建'
+
this
.
talkListLength
+
'个素材'
)
return
return
}
}
obj
.
isCheck
=
!
obj
.
isCheck
obj
.
isCheck
=
!
obj
.
isCheck
...
@@ -261,7 +217,6 @@ export default {
...
@@ -261,7 +217,6 @@ export default {
})
})
}
}
})
})
}
},
},
centerCancel
()
{
centerCancel
()
{
this
.
dialogVisibel
=
false
this
.
dialogVisibel
=
false
...
@@ -282,17 +237,12 @@ export default {
...
@@ -282,17 +237,12 @@ export default {
this
.
ids
=
[]
this
.
ids
=
[]
},
},
centerSubmit
()
{
centerSubmit
()
{
if
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength2
)
{
if
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength
)
{
if
(
this
.
isFriends
)
{
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength
+
'个素材'
)
this
.
$message
.
error
(
'除图片素材可选9条数据,其他类型仅可选择一条数据,且只能选择一种类型'
)
}
else
{
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength2
+
'个素材'
)
}
return
return
}
else
{
}
else
{
this
.
dialogVisibel
=
false
this
.
dialogVisibel
=
false
this
.
$emit
(
'itemArry'
,
this
.
ids
,
this
.
maxlength2
)
this
.
$emit
(
'itemArry'
,
this
.
ids
)
this
.
$emit
(
'update:choseDialog'
,
this
.
dialogVisibel
)
this
.
$emit
(
'update:choseDialog'
,
this
.
dialogVisibel
)
this
.
$refs
.
multipleTable
.
forEach
((
item
)
=>
{
this
.
$refs
.
multipleTable
.
forEach
((
item
)
=>
{
item
.
clearSelection
()
item
.
clearSelection
()
...
@@ -301,21 +251,7 @@ export default {
...
@@ -301,21 +251,7 @@ export default {
this
.
clearPaneList
()
this
.
clearPaneList
()
}
}
},
},
// 单个选择
handleSelect
(
select
,
row
)
{
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
list
=
this
.
paneList
[
this
.
index
].
list
let
falg
=
false
let
falg
=
false
if
(
list
.
length
)
{
if
(
list
.
length
)
{
...
@@ -334,16 +270,11 @@ export default {
...
@@ -334,16 +270,11 @@ export default {
})
})
}
}
this
.
getIds
()
this
.
getIds
()
if
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength
2
)
{
if
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
if
(
this
.
index
)
this
.
$refs
.
multipleTable
[
this
.
inx
].
toggleRowSelection
(
row
,
false
)
if
(
this
.
index
)
this
.
$refs
.
multipleTable
[
this
.
inx
].
toggleRowSelection
(
row
,
false
)
})
})
if
(
!
this
.
isFriends
)
{
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength
+
'个素材,已新建'
+
this
.
talkListLength
+
'个素材'
)
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength2
+
'个素材,已新建'
+
this
.
talkListLength
+
'个素材'
)
}
this
.
paneList
[
this
.
index
].
list
=
this
.
paneList
[
this
.
index
].
list
.
filter
((
item
)
=>
{
this
.
paneList
[
this
.
index
].
list
=
this
.
paneList
[
this
.
index
].
list
.
filter
((
item
)
=>
{
return
item
.
id
!=
row
.
id
return
item
.
id
!=
row
.
id
})
})
...
@@ -351,16 +282,6 @@ export default {
...
@@ -351,16 +282,6 @@ export default {
}
}
},
},
selectAll
(
select
)
{
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
)
{
if
(
select
.
length
)
{
// 全选
// 全选
this
.
paneList
[
this
.
index
].
list
=
select
this
.
paneList
[
this
.
index
].
list
=
select
...
@@ -369,16 +290,11 @@ export default {
...
@@ -369,16 +290,11 @@ export default {
this
.
paneList
[
this
.
index
].
list
=
[]
this
.
paneList
[
this
.
index
].
list
=
[]
}
}
this
.
getIds
()
this
.
getIds
()
if
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength
2
)
{
if
(
this
.
ids
.
length
+
this
.
talkListLength
>
this
.
maxlength
)
{
select
.
forEach
((
item
)
=>
{
select
.
forEach
((
item
)
=>
{
this
.
$refs
.
multipleTable
[
this
.
inx
].
toggleAllSelection
(
item
,
false
)
this
.
$refs
.
multipleTable
[
this
.
inx
].
toggleAllSelection
(
item
,
false
)
})
})
if
(
!
this
.
isFriends
)
{
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength
+
'个素材,已新建'
+
this
.
talkListLength
+
'个素材'
)
this
.
$message
.
error
(
'最多新建或选择'
+
this
.
maxlength2
+
'个素材,已新建'
+
this
.
talkListLength
+
'个素材'
)
}
this
.
paneList
[
this
.
index
].
list
=
[]
this
.
paneList
[
this
.
index
].
list
=
[]
this
.
getIds
()
this
.
getIds
()
}
}
...
@@ -393,6 +309,30 @@ export default {
...
@@ -393,6 +309,30 @@ 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
)
{
filType
(
file
)
{
let
filecontent
=
JSON
.
parse
(
JSON
.
stringify
(
file
))
let
filecontent
=
JSON
.
parse
(
JSON
.
stringify
(
file
))
...
@@ -416,6 +356,13 @@ export default {
...
@@ -416,6 +356,13 @@ export default {
}
else
{
}
else
{
this
.
inx
=
index
this
.
inx
=
index
}
}
// if (this.picindex === 0) {
// // 不包含文本
// this.inx = this.index - 1
// } else if (this.picindex === 1) {
// // 包含文本
// }
},
},
},
},
}
}
...
@@ -489,7 +436,7 @@ export default {
...
@@ -489,7 +436,7 @@ export default {
height
:
210px
;
height
:
210px
;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
margin-right
:
2%
;
margin-right
:
2%
;
border
:
1px
solid
var
(
--border-black-9
)
;
border
:
1px
solid
#eaeaea
;
.img
{
.img
{
width
:
100%
;
width
:
100%
;
height
:
180px
;
height
:
180px
;
...
...
vue3-lw-pc/src/views/friendCircle/components/Custom.vue
View file @
45b0fd2
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<el-button
type=
"primary"
@
click=
"exportFn"
v-loading=
"exportLoading"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"exportFn"
v-loading=
"exportLoading"
>
导出
</el-button>
</div>
</div>
</div>
</div>
<el-table
v-loading=
"loading"
:data=
"tableList"
style=
"width: 100%"
>
<el-table
v-loading=
"loading"
:data=
"tableList"
style=
"width: 100%
; margin-bottom: 20px
"
>
<el-table-column
<el-table-column
label=
"客户名称"
label=
"客户名称"
align=
"center"
align=
"center"
...
...
vue3-lw-pc/src/views/friendCircle/components/Record.vue
View file @
45b0fd2
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<el-button
type=
"primary"
@
click=
"exportFn"
v-loading=
"exportLoading"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"exportFn"
v-loading=
"exportLoading"
>
导出
</el-button>
</div>
</div>
</div>
</div>
<el-table
v-loading=
"loading"
:data=
"tableList"
style=
"width: 100%"
>
<el-table
v-loading=
"loading"
:data=
"tableList"
style=
"width: 100%
; margin-bottom: 20px
"
>
<el-table-column
<el-table-column
label=
"客户名称"
label=
"客户名称"
align=
"center"
align=
"center"
...
...
vue3-lw-pc/src/views/friendCircle/components/Staff.vue
View file @
45b0fd2
...
@@ -33,11 +33,11 @@
...
@@ -33,11 +33,11 @@
<el-button
@
click=
"resetQuery"
>
清空
</el-button>
<el-button
@
click=
"resetQuery"
>
清空
</el-button>
</div>
</div>
<div>
<div>
<el-button
type=
"primary"
@
click=
"remind(id)"
>
提醒执行
</el-button>
<el-button
type=
"primary"
@
click=
"remind(id)"
v-if=
"showRemaind"
>
提醒执行
</el-button>
<el-button
type=
"primary"
@
click=
"exportFn"
v-loading=
"exportLoading"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"exportFn"
v-loading=
"exportLoading"
>
导出
</el-button>
</div>
</div>
</div>
</div>
<el-table
v-loading=
"loading"
:data=
"tableList"
style=
"width: 100%"
>
<el-table
v-loading=
"loading"
:data=
"tableList"
style=
"width: 100%
; margin-bottom: 20px
"
>
<el-table-column
<el-table-column
label=
"执行人名称"
label=
"执行人名称"
align=
"center"
align=
"center"
...
@@ -150,12 +150,15 @@ export default {
...
@@ -150,12 +150,15 @@ export default {
id
:
undefined
,
id
:
undefined
,
type
:
undefined
,
// 朋友圈类型 1:非同步型 2:企业同步型 3:个人同步型
type
:
undefined
,
// 朋友圈类型 1:非同步型 2:企业同步型 3:个人同步型
name
:
''
,
name
:
''
,
showRemaind
:
0
,
// 是否显示提醒执行 0不显示 1显示
}
}
},
},
mounted
()
{
mounted
()
{
this
.
type
=
this
.
$route
.
query
.
type
this
.
type
=
this
.
$route
.
query
.
type
this
.
id
=
this
.
$route
.
query
.
id
this
.
id
=
this
.
$route
.
query
.
id
this
.
name
=
this
.
$route
.
query
.
name
this
.
name
=
this
.
$route
.
query
.
name
this
.
showRemaind
=
+
this
.
$route
.
query
.
showRemaind
console
.
log
(
this
.
showRemaind
)
this
.
getTabTotalFn
()
this
.
getTabTotalFn
()
this
.
getTableChangeSize
()
this
.
getTableChangeSize
()
},
},
...
...
vue3-lw-pc/src/views/friendCircle/list.vue
View file @
45b0fd2
...
@@ -9,13 +9,10 @@
...
@@ -9,13 +9,10 @@
class=
"top-search"
class=
"top-search"
>
>
<el-form-item
prop=
"name"
>
<el-form-item
prop=
"name"
>
<el-input
v-model=
"query.name"
placeholder=
"请输入任务名称"
></el-input>
<el-input
v-model=
"query.name"
placeholder=
"请输入任务名称"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"createBy"
>
<el-form-item
prop=
"createBy"
>
<el-input
<el-input
v-model=
"query.createBy"
placeholder=
"请输入创建人"
></el-input>
v-model=
"query.createBy"
placeholder=
"请输入创建人"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"sendType"
>
<el-form-item
prop=
"sendType"
>
<!--
<el-input
v-model=
"query"
placeholder=
"请输入创建人"
></el-input>
-->
<!--
<el-input
v-model=
"query"
placeholder=
"请输入创建人"
></el-input>
-->
...
@@ -273,6 +270,7 @@ export default {
...
@@ -273,6 +270,7 @@ export default {
type
,
type
,
id
:
row
.
id
,
id
:
row
.
id
,
name
:
row
.
name
,
name
:
row
.
name
,
showRemaind
:
row
.
status
===
2
&&
row
.
sendType
!==
0
?
1
:
0
,
},
},
})
})
},
},
...
...
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