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 edcc4c88
authored
Dec 15, 2021
by
test
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
朋友圈数据格式调整
1 parent
5ce0151f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
67 deletions
linkwe-ui/src/views/friendCircle/enterprise.vue
linkwe-ui/src/views/friendCircle/index.vue
linkwe-ui/src/views/friendCircle/publish.vue
linkwe-ui/src/views/friendCircle/enterprise.vue
View file @
edcc4c8
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
<el-table-column
show-overflow-tooltip
prop=
"content"
label=
"朋友圈内容"
>
<el-table-column
show-overflow-tooltip
prop=
"content"
label=
"朋友圈内容"
>
<template
slot-scope=
"
{ row }">
<template
slot-scope=
"
{ row }">
<el-image
v-if=
"row.contentType === 'image'"
:src=
"row.content"
fit=
"fit"
:preview-src-list=
"[row.content]"
style=
"width: 100px; height: 100px"
></el-image>
<el-image
v-if=
"row.contentType === 'image'"
:src=
"row.content"
fit=
"fit"
:preview-src-list=
"[row.content]"
style=
"width: 100px; height: 100px"
></el-image>
<video
v-else-if=
"row.contentType === 'video'"
style=
"width: 100px; height: 100px;"
:src=
"row.content"
></video>
<div
v-else
>
{{
row
.
content
}}
</div>
<div
v-else
>
{{
row
.
content
}}
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -87,22 +88,27 @@
...
@@ -87,22 +88,27 @@
<SelectUser
:visible
.
sync=
"dialogVisible"
title=
"组织架构"
:defaultValues=
"userArray"
@
success=
"getSelectUser"
></SelectUser>
<SelectUser
:visible
.
sync=
"dialogVisible"
title=
"组织架构"
:defaultValues=
"userArray"
@
success=
"getSelectUser"
></SelectUser>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailDialogVisible"
width=
"40%"
>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailDialogVisible"
width=
"40%"
>
<el-form
label-position=
"right"
label-width=
"100px"
>
<el-form
label-position=
"right"
label-width=
"100px"
>
<
el-form-item
label=
"内容:
"
>
<
template
v-for=
"(data, index) in detail.otherContent
"
>
{{detail.content}}
<el-form-item
label=
"内容:"
v-if=
"data.annexType === 'text'"
>
</el-form-item>
{{
data
.
other
}}
<el-form-item
v-if=
"detail.otherContent"
label=
" "
>
</el-form-item
>
<
template
v-for=
"(data, index) in detail.otherContent
"
>
<
el-form-item
label=
" "
v-if=
"data.annexType === 'image'
"
>
<div
style=
"display:inline-block;margin-right:10px;"
v-if=
"data.annexType === 'image'"
>
<div
style=
"display:inline-block;margin-right:10px;"
>
<el-image
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></el-image>
<el-image
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></el-image>
</div>
</div>
<div
style=
"display:inline-block;margin-right:10px;"
v-else-if=
"data.annexType === 'video'"
>
</el-form-item>
<video
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></video>
<el-form-item
label=
" "
v-if=
"data.annexType === 'video'"
>
<div
style=
"display:inline-block;margin-right:10px;"
v-else-if=
""
>
<video
style=
"width: 200px; height: 200px"
:src=
"data.annexUrl"
controls
></video>
</div>
</div>
<div
style=
"display:inline-block;margin-right:10px;"
v-else-if=
"data.annexType === 'link'"
>
</el-form-item>
<video
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></video>
<el-form-item
label=
" "
v-if=
"data.annexType === 'link'"
>
<div
style=
"display:inline-block;margin-right:10px;"
>
<span
style=
"width: 100px; height: 100px"
>
{{
data
.
annexUrl
}}
</span>
</div>
</div>
</
template
>
</el-form-item>
</el-form-item>
</
template
>
<el-form-item
label=
"已发送员工"
v-if=
"detail.addUserName"
>
<el-form-item
label=
"已发送员工"
v-if=
"detail.addUserName"
>
<el-tag
v-for=
"(data, key) in detail.addUserName.split(',')"
:key=
"key"
>
{{data}}
</el-tag>
<el-tag
v-for=
"(data, key) in detail.addUserName.split(',')"
:key=
"key"
>
{{data}}
</el-tag>
</el-form-item>
</el-form-item>
...
@@ -212,8 +218,8 @@
...
@@ -212,8 +218,8 @@
if
(
this
.
lastSyncTime
)
{
if
(
this
.
lastSyncTime
)
{
let
date1
=
moment
(
this
.
lastSyncTime
)
let
date1
=
moment
(
this
.
lastSyncTime
)
let
date2
=
moment
()
let
date2
=
moment
()
let
date3
=
date2
.
diff
(
date1
,
'minute'
)
let
date3
=
date2
.
diff
(
date1
,
'minute'
)
const
h
=
Math
.
floor
(
date3
/
60
)
const
h
=
Math
.
floor
(
date3
/
60
)
console
.
log
(
h
)
console
.
log
(
h
)
if
(
h
>=
2
)
{
if
(
h
>=
2
)
{
this
.
disable
=
false
this
.
disable
=
false
...
...
linkwe-ui/src/views/friendCircle/index.vue
View file @
edcc4c8
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
<el-table-column
show-overflow-tooltip
prop=
"content"
label=
"朋友圈内容"
>
<el-table-column
show-overflow-tooltip
prop=
"content"
label=
"朋友圈内容"
>
<template
slot-scope=
"
{ row }">
<template
slot-scope=
"
{ row }">
<el-image
v-if=
"row.contentType === 'image'"
:src=
"row.content"
fit=
"fit"
:preview-src-list=
"[row.content]"
style=
"width: 100px; height: 100px"
></el-image>
<el-image
v-if=
"row.contentType === 'image'"
:src=
"row.content"
fit=
"fit"
:preview-src-list=
"[row.content]"
style=
"width: 100px; height: 100px"
></el-image>
<video
v-else-if=
"row.contentType === 'video'"
style=
"width: 100px; height: 100px"
:src=
"row.content"
></video>
<div
v-else
>
{{
row
.
content
}}
</div>
<div
v-else
>
{{
row
.
content
}}
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -52,22 +53,26 @@
...
@@ -52,22 +53,26 @@
<SelectUser
:visible
.
sync=
"dialogVisible"
title=
"组织架构"
:defaultValues=
"userArray"
@
success=
"getSelectUser"
></SelectUser>
<SelectUser
:visible
.
sync=
"dialogVisible"
title=
"组织架构"
:defaultValues=
"userArray"
@
success=
"getSelectUser"
></SelectUser>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailDialogVisible"
width=
"40%"
>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailDialogVisible"
width=
"40%"
>
<el-form
label-position=
"right"
label-width=
"100px"
>
<el-form
label-position=
"right"
label-width=
"100px"
>
<
el-form-item
label=
"内容:
"
>
<
template
v-for=
"(data, index) in detail.otherContent
"
>
{{detail.content}}
<el-form-item
label=
"内容:"
v-if=
"data.annexType === 'text'"
>
</el-form-item>
{{
data
.
other
}}
<el-form-item
v-if=
"detail.otherContent"
label=
" "
>
</el-form-item
>
<
template
v-for=
"(data, index) in detail.otherContent
"
>
<
el-form-item
label=
" "
v-if=
"data.annexType === 'image'
"
>
<div
style=
"display:inline-block;margin-right:10px;"
v-if=
"data.annexType === 'image'"
>
<div
style=
"display:inline-block;margin-right:10px;"
>
<el-image
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></el-image>
<el-image
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></el-image>
</div>
</div>
<div
style=
"display:inline-block;margin-right:10px;"
v-else-if=
"data.annexType === 'video'"
>
</el-form-item>
<video
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></video>
<el-form-item
label=
" "
v-if=
"data.annexType === 'video'"
>
<div
style=
"display:inline-block;margin-right:10px;"
v-else-if=
""
>
<video
style=
"width: 200px; height: 200px"
:src=
"data.annexUrl"
controls
></video>
</div>
</div>
<div
style=
"display:inline-block;margin-right:10px;"
v-else-if=
"data.annexType === 'link'"
>
</el-form-item>
<video
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></video>
<el-form-item
label=
" "
v-if=
"data.annexType === 'link'"
>
<div
style=
"display:inline-block;margin-right:10px;"
>
<span
style=
"width: 100px; height: 100px"
>
{{
data
.
annexUrl
}}
</span>
</div>
</div>
</
template
>
</
el-form-item
>
</
el-form-item
>
</
template
>
<el-form-item
label=
"点赞客户:"
v-if=
"detail.pointCustomerName"
>
<el-form-item
label=
"点赞客户:"
v-if=
"detail.pointCustomerName"
>
<el-tag
v-for=
"(data, key) in detail.pointCustomerName.split(',')"
:key=
"key"
>
{{data}}
</el-tag>
<el-tag
v-for=
"(data, key) in detail.pointCustomerName.split(',')"
:key=
"key"
>
{{data}}
</el-tag>
</el-form-item>
</el-form-item>
...
@@ -177,8 +182,8 @@
...
@@ -177,8 +182,8 @@
if
(
this
.
lastSyncTime
)
{
if
(
this
.
lastSyncTime
)
{
let
date1
=
moment
(
this
.
lastSyncTime
)
let
date1
=
moment
(
this
.
lastSyncTime
)
let
date2
=
moment
()
let
date2
=
moment
()
let
date3
=
date2
.
diff
(
date1
,
'minute'
)
let
date3
=
date2
.
diff
(
date1
,
'minute'
)
const
h
=
Math
.
floor
(
date3
/
60
)
const
h
=
Math
.
floor
(
date3
/
60
)
console
.
log
(
h
)
console
.
log
(
h
)
if
(
h
>=
2
)
{
if
(
h
>=
2
)
{
this
.
disable
=
false
this
.
disable
=
false
...
...
linkwe-ui/src/views/friendCircle/publish.vue
View file @
edcc4c8
...
@@ -4,11 +4,11 @@
...
@@ -4,11 +4,11 @@
<el-col>
<el-col>
<el-form
label-width=
"110px"
label-position=
"right"
>
<el-form
label-width=
"110px"
label-position=
"right"
>
<div
class=
"g-card g-pad20"
>
<div
class=
"g-card g-pad20"
>
<el-form-item
label=
"可见客户"
required
>
<el-form-item
label=
"可见客户"
required
>
<el-radio-group
v-model=
"form.scopeType"
>
<el-radio-group
v-model=
"form.scopeType"
>
<el-radio
:label=
"1"
>
全部可见
</el-radio>
<el-radio
:label=
"1"
>
全部可见
</el-radio>
<el-radio
:label=
"0"
>
部分可见
</el-radio>
<el-radio
:label=
"0"
>
部分可见
</el-radio>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
label=
"客户标签"
v-if=
"form.scopeType === 0"
>
<el-form-item
label=
"客户标签"
v-if=
"form.scopeType === 0"
>
<el-tag
sizi=
"mini"
v-for=
"(unit, key) in selectedTagList"
:key=
"key"
>
{{
unit
.
name
}}
</el-tag>
<el-tag
sizi=
"mini"
v-for=
"(unit, key) in selectedTagList"
:key=
"key"
>
{{
unit
.
name
}}
</el-tag>
...
@@ -67,44 +67,44 @@
...
@@ -67,44 +67,44 @@
</el-form-item>
</el-form-item>
</div>
</div>
</div>
</div>
<!-- 添加附件 -->
<!-- 添加附件 -->
<div
class=
"g-card g-pad20 add-continue"
v-show=
"form.otherContent.length
<
= 8
&&
form.contentType !== 'video'
&&
form.contentType !== 'link'">
<div
class=
"g-card g-pad20 add-continue"
v-show=
"form.otherContent.length
<
= 8
&&
form.contentType !== 'video'
&&
form.contentType !== 'link'">
<el-dropdown
style=
"margin-left: 10px"
@
command=
"onInsertMaterial"
>
<el-dropdown
style=
"margin-left: 10px"
@
command=
"onInsertMaterial"
>
<div
style=
"display: flex; align-items: center"
>
<div
style=
"display: flex; align-items: center"
>
<img
style=
"margin-right: 5px"
:src=
"require('@/assets/drainageCode/plus-circle.png')"
alt=
""
/>
继续添加附件
<img
style=
"margin-right: 5px"
:src=
"require('@/assets/drainageCode/plus-circle.png')"
alt=
""
/>
继续添加附件
</div>
</div>
<el-dropdown-menu
slot=
"dropdown"
trigger=
"click"
>
<el-dropdown-menu
slot=
"dropdown"
trigger=
"click"
>
<!--
<el-dropdown-item
:command=
"4"
>
<!--
<el-dropdown-item
:command=
"4"
>
<el-button
type=
"text"
>
文字
</el-button>
<el-button
type=
"text"
>
文字
</el-button>
</el-dropdown-item>
-->
</el-dropdown-item>
-->
<el-dropdown-item
v-if=
"form.contentType === 'image' || form.otherContent.length === 0"
:command=
"'image'"
>
<el-dropdown-item
v-if=
"form.contentType === 'image' || form.otherContent.length === 0"
:command=
"'image'"
>
<el-button
type=
"text"
>
图片
</el-button>
<el-button
type=
"text"
>
图片
</el-button>
</el-dropdown-item>
</el-dropdown-item>
<el-dropdown-item
v-if=
"form.otherContent.length === 0"
:command=
"'video'"
>
<el-dropdown-item
v-if=
"form.otherContent.length === 0"
:command=
"'video'"
>
<el-button
type=
"text"
>
视频
</el-button>
<el-button
type=
"text"
>
视频
</el-button>
</el-dropdown-item>
</el-dropdown-item>
<el-dropdown-item
v-if=
"form.otherContent.length === 0"
:command=
"'link'"
>
<el-dropdown-item
v-if=
"form.otherContent.length === 0"
:command=
"'link'"
>
<el-button
type=
"text"
>
网页
</el-button>
<el-button
type=
"text"
>
网页
</el-button>
</el-dropdown-item>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
</div>
</div>
<el-form-item
label-width=
"0"
style=
"margin-top: 20px; margin-bottom: 0"
>
<el-form-item
label-width=
"0"
style=
"margin-top: 20px; margin-bottom: 0"
>
<el-button
@
click=
"onBackStep"
>
取消
</el-button>
<el-button
@
click=
"onBackStep"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submit"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"submit"
>
保存
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</el-col>
</el-col>
</el-row>
</el-row>
<!-- 选择标签弹窗 -->
<!-- 选择标签弹窗 -->
<SelectTag
:visible
.
sync=
"dialogVisibleSelectTag"
:defaultValues=
"selectedTagList"
@
success=
"submitSelectTag"
>
<SelectTag
:visible
.
sync=
"dialogVisibleSelectTag"
:defaultValues=
"selectedTagList"
@
success=
"submitSelectTag"
>
</SelectTag>
</SelectTag>
<SelectUser
:defaultValues=
"selectedUserList"
:visible
.
sync=
"dialogVisibleSelectUser"
title=
"选择使用员工"
@
success=
"selectedUser"
></SelectUser>
<SelectUser
:defaultValues=
"selectedUserList"
:visible
.
sync=
"dialogVisibleSelectUser"
title=
"选择使用员工"
@
success=
"selectedUser"
></SelectUser>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
gotoPublish
}
from
'@/api/circle'
import
{
gotoPublish
}
from
'@/api/circle'
import
SelectTag
from
'@/components/SelectTag'
import
SelectTag
from
'@/components/SelectTag'
import
SelectUser
from
'@/components/SelectUser'
import
SelectUser
from
'@/components/SelectUser'
import
upload
from
'@/components/Upload'
import
upload
from
'@/components/Upload'
...
@@ -130,14 +130,14 @@ import { gotoPublish } from '@/api/circle'
...
@@ -130,14 +130,14 @@ import { gotoPublish } from '@/api/circle'
loading
:
false
,
loading
:
false
,
selectedUserList
:
[],
selectedUserList
:
[],
dialogVisibleSelectUser
:
false
,
dialogVisibleSelectUser
:
false
,
dialogVisibleSelectTag
:
false
,
dialogVisibleSelectTag
:
false
,
selectedTagList
:[]
selectedTagList
:
[]
}
}
},
},
mounted
()
{
mounted
()
{
},
},
methods
:
{
methods
:
{
selectedFn
()
{
selectedFn
()
{
this
.
dialogVisibleSelectTag
=
true
this
.
dialogVisibleSelectTag
=
true
},
},
submitSelectTag
(
data
)
{
submitSelectTag
(
data
)
{
...
@@ -155,7 +155,7 @@ import { gotoPublish } from '@/api/circle'
...
@@ -155,7 +155,7 @@ import { gotoPublish } from '@/api/circle'
this
.
form
.
otherContent
.
push
({
this
.
form
.
otherContent
.
push
({
annexType
:
e
,
annexType
:
e
,
annexUrl
:
''
,
annexUrl
:
''
,
contentError
:
''
contentError
:
''
})
})
},
},
onRemoveMaterial
(
index
)
{
onRemoveMaterial
(
index
)
{
...
@@ -175,7 +175,7 @@ import { gotoPublish } from '@/api/circle'
...
@@ -175,7 +175,7 @@ import { gotoPublish } from '@/api/circle'
dd
.
contentError
=
'内容不能为空'
dd
.
contentError
=
'内容不能为空'
goto
=
false
goto
=
false
}
else
{
}
else
{
dd
.
contentError
=
''
dd
.
contentError
=
''
}
}
})
})
return
goto
return
goto
...
@@ -202,7 +202,8 @@ import { gotoPublish } from '@/api/circle'
...
@@ -202,7 +202,8 @@ import { gotoPublish } from '@/api/circle'
delete
dd
.
contentError
delete
dd
.
contentError
if
(
dd
.
annexType
===
'link'
)
{
if
(
dd
.
annexType
===
'link'
)
{
let
reUrl
=
/
(
http|https
)
:
\/\/([\w
.
]
+
\/?)\S
*/
let
reUrl
=
/
(
http|https
)
:
\/\/([\w
.
]
+
\/?)\S
*/
if
(
!
reUrl
.
test
(
dd
.
content
))
{
if
(
!
reUrl
.
test
(
dd
.
annexUrl
))
{
console
.
log
(
123
)
goto
=
false
goto
=
false
dd
.
contentError
=
'必须以 http://或 https://开头'
dd
.
contentError
=
'必须以 http://或 https://开头'
}
}
...
@@ -218,7 +219,7 @@ import { gotoPublish } from '@/api/circle'
...
@@ -218,7 +219,7 @@ import { gotoPublish } from '@/api/circle'
})
})
}
}
}
}
}
}
}
}
}
}
...
...
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