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 bee4f39d
authored
Nov 29, 2021
by
test
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接口调整
1 parent
3d5fcb69
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
595 additions
and
218 deletions
linkwe-ui/src/api/drainageCode/welcome.js
linkwe-ui/src/components/WelcomeContent.vue
linkwe-ui/src/components/previewInMobileClient.vue
linkwe-ui/src/views/drainageCode/welcome/add.vue
linkwe-ui/src/views/drainageCode/welcome/components/Tab.vue
linkwe-ui/src/views/drainageCode/welcome/list.vue
linkwe-ui/src/views/friendCircle/enterprise.vue
linkwe-ui/src/views/friendCircle/index.vue
linkwe-ui/src/views/friendCircle/publish.vue
linkwe-ui/src/api/drainageCode/welcome.js
View file @
bee4f39
...
@@ -4,16 +4,10 @@ const service = window.CONFIG.services.wecom + '/tlp'
...
@@ -4,16 +4,10 @@ const service = window.CONFIG.services.wecom + '/tlp'
/**
/**
* 获取欢迎语列表
* 获取欢迎语列表
* @param {*} params
* @param {*} params
{
"pageNum": "当前页",
"pageSize": "每页显示条数",
"welcomeMsg": "欢迎语关键词",
"welcomeMsgTplType": " 欢迎语模板类型:1:员工欢迎语;2:部门员工欢迎语;3:客户群欢迎语"
}
*/
*/
export
function
getList
(
params
)
{
export
function
getList
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'
/list'
,
url
:
'/wecom/tlp
/list'
,
params
params
})
})
}
}
...
@@ -22,7 +16,7 @@ export function getList(params) {
...
@@ -22,7 +16,7 @@ export function getList(params) {
* 根据欢迎语模板id获取模板使用范围
* 根据欢迎语模板id获取模板使用范围
* @param {*} id
* @param {*} id
*/
*/
export
function
getScop
(
id
)
{
export
function
getScop
(
id
)
{
return
request
({
return
request
({
url
:
service
+
'/scop/'
+
id
url
:
service
+
'/scop/'
+
id
})
})
...
@@ -49,9 +43,9 @@ export function getScop(id) {
...
@@ -49,9 +43,9 @@ export function getScop(id) {
"userIds":"ShengXiYong,SunXiWang" //员工欢迎语使用范围,员工id用逗号隔开
"userIds":"ShengXiYong,SunXiWang" //员工欢迎语使用范围,员工id用逗号隔开
}
}
*/
*/
export
function
addOrUpdate
(
data
)
{
export
function
addOrUpdate
(
data
)
{
return
request
({
return
request
({
url
:
service
+
'
/addorUpdate'
,
url
:
'/wecom/tlp
/addorUpdate'
,
method
:
'POST'
,
method
:
'POST'
,
data
data
})
})
...
@@ -81,17 +75,17 @@ export function addOrUpdate(data) {
...
@@ -81,17 +75,17 @@ export function addOrUpdate(data) {
* 删除欢迎语
* 删除欢迎语
* @param {*} ids
* @param {*} ids
*/
*/
export
function
remove
(
ids
)
{
export
function
remove
(
ids
)
{
return
request
({
return
request
({
url
:
service
+
'
/'
+
ids
,
url
:
'/wecom/tlp/remove
/'
+
ids
,
method
:
'DELETE'
method
:
'DELETE'
})
})
}
}
// 预览数据
// 预览数据
export
function
getPreview
(
id
)
{
export
function
getPreview
(
id
)
{
return
request
({
return
request
({
url
:
service
+
'
/tlp/preview'
,
url
:
'/wecom
/tlp/preview'
,
params
:
{
params
:
{
id
id
}
}
...
...
linkwe-ui/src/components/WelcomeContent.vue
View file @
bee4f39
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<!-- 附件 -->
<!-- 附件 -->
<div
class=
"g-card g-pad20"
v-for=
"(item, index) in form.materialMsgList"
:key=
"index"
>
<div
class=
"g-card g-pad20"
v-for=
"(item, index) in form.materialMsgList"
:key=
"index"
>
<!-- 文本 -->
<!-- 文本 -->
<div
class=
"my-cord"
v-if=
"item.msgType ==
4
"
>
<div
class=
"my-cord"
v-if=
"item.msgType ==
'4'
"
>
<div
class=
"operation"
>
<div
class=
"operation"
>
<div
v-if=
"showMorMaterial"
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
<div
v-if=
"showMorMaterial"
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
</el-form-item>
</el-form-item>
</div>
</div>
<!-- 图片上传 -->
<!-- 图片上传 -->
<div
class=
"my-cord"
v-else-if=
"item.msgType ==
0
"
>
<div
class=
"my-cord"
v-else-if=
"item.msgType ==
'0'
"
>
<div
class=
"operation"
>
<div
class=
"operation"
>
<div
v-if=
"showMorMaterial"
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
<div
v-if=
"showMorMaterial"
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
</el-form-item>
</el-form-item>
</div>
</div>
<!-- 图文 -->
<!-- 图文 -->
<div
class=
"my-cord"
v-else-if=
"item.msgType ==
7
"
>
<div
class=
"my-cord"
v-else-if=
"item.msgType ==
'7'
"
>
<div
class=
"operation"
>
<div
class=
"operation"
>
<div
v-if=
"showMorMaterial"
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
<div
v-if=
"showMorMaterial"
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
</el-form-item>
</el-form-item>
</div>
</div>
<!-- 小程序 -->
<!-- 小程序 -->
<div
class=
"my-cord"
v-else-if=
"item.msgType ==
8
"
>
<div
class=
"my-cord"
v-else-if=
"item.msgType ==
'8'
"
>
<div
class=
"operation"
>
<div
class=
"operation"
>
<div
v-if=
"showMorMaterial"
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
<div
v-if=
"showMorMaterial"
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
...
@@ -119,13 +119,13 @@
...
@@ -119,13 +119,13 @@
<!--
<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
:command=
"
0
"
>
<el-dropdown-item
:command=
"
'0'
"
>
<el-button
type=
"text"
>
图片
</el-button>
<el-button
type=
"text"
>
图片
</el-button>
</el-dropdown-item>
</el-dropdown-item>
<el-dropdown-item
:command=
"
7
"
>
<el-dropdown-item
:command=
"
'7'
"
>
<el-button
type=
"text"
>
图文
</el-button>
<el-button
type=
"text"
>
图文
</el-button>
</el-dropdown-item>
</el-dropdown-item>
<el-dropdown-item
:command=
"
8
"
>
<el-dropdown-item
:command=
"
'8'
"
>
<el-button
type=
"text"
>
小程序
</el-button>
<el-button
type=
"text"
>
小程序
</el-button>
</el-dropdown-item>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
...
@@ -165,7 +165,6 @@
...
@@ -165,7 +165,6 @@
<el-button
type=
"primary"
@
click=
"selectWelcome"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"selectWelcome"
>
确 定
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<SelectUser
:defaultValues=
"selectedUserList"
:visible
.
sync=
"dialogVisibleSelectUser"
title=
"选择使用员工"
@
success=
"selectedUser"
></SelectUser>
<SelectUser
:defaultValues=
"selectedUserList"
:visible
.
sync=
"dialogVisibleSelectUser"
title=
"选择使用员工"
@
success=
"selectedUser"
></SelectUser>
</div>
</div>
</template>
</template>
...
@@ -228,6 +227,7 @@
...
@@ -228,6 +227,7 @@
},
},
watch
:
{
watch
:
{
baseData
(
val
)
{
baseData
(
val
)
{
console
.
log
(
2222
)
if
(
val
.
welcomeMsg
)
{
if
(
val
.
welcomeMsg
)
{
this
.
form
=
val
this
.
form
=
val
}
}
...
@@ -336,21 +336,21 @@
...
@@ -336,21 +336,21 @@
let
materialList
=
this
.
form
.
materialMsgList
let
materialList
=
this
.
form
.
materialMsgList
const
validateFields
=
{
const
validateFields
=
{
4
:
[
'4'
:
[
{
{
checkField
:
'content'
,
checkField
:
'content'
,
errorField
:
'contentError'
,
errorField
:
'contentError'
,
errorMsg
:
'请输入文本'
errorMsg
:
'请输入文本'
}
}
],
],
0
:
[
'0'
:
[
{
{
checkField
:
'materialUrl'
,
checkField
:
'materialUrl'
,
errorField
:
'materialUrlError'
,
errorField
:
'materialUrlError'
,
errorMsg
:
'请上传图片'
errorMsg
:
'请上传图片'
}
}
],
],
7
:
[
'7'
:
[
{
{
checkField
:
'materialName'
,
checkField
:
'materialName'
,
errorField
:
'materialNameError'
,
errorField
:
'materialNameError'
,
...
@@ -362,7 +362,7 @@
...
@@ -362,7 +362,7 @@
errorMsg
:
'请输入图文链接'
errorMsg
:
'请输入图文链接'
}
}
],
],
8
:
[
'8'
:
[
{
{
checkField
:
'materialName'
,
checkField
:
'materialName'
,
errorField
:
'materialNameError'
,
errorField
:
'materialNameError'
,
...
@@ -427,14 +427,14 @@
...
@@ -427,14 +427,14 @@
if
(
checkMaterialResult
)
{
if
(
checkMaterialResult
)
{
let
goto
=
true
let
goto
=
true
this
.
form
.
materialMsgList
.
forEach
((
dd
)
=>
{
this
.
form
.
materialMsgList
.
forEach
((
dd
)
=>
{
if
(
dd
.
msgType
===
7
)
{
if
(
dd
.
msgType
===
'7'
)
{
let
reUrl
=
/
(
http|https
)
:
\/\/([\w
.
]
+
\/?)\S
*/
let
reUrl
=
/
(
http|https
)
:
\/\/([\w
.
]
+
\/?)\S
*/
if
(
!
reUrl
.
test
(
dd
.
content
))
{
if
(
!
reUrl
.
test
(
dd
.
content
))
{
goto
=
false
goto
=
false
dd
.
contentError
=
'必须以 http://或 https://开头'
dd
.
contentError
=
'必须以 http://或 https://开头'
}
}
}
}
if
(
dd
.
msgType
===
8
)
{
if
(
dd
.
msgType
===
'8'
)
{
let
htm
=
/^.*html$/
let
htm
=
/^.*html$/
if
(
!
htm
.
test
(
dd
.
content
))
{
if
(
!
htm
.
test
(
dd
.
content
))
{
goto
=
false
goto
=
false
...
...
linkwe-ui/src/components/previewInMobileClient.vue
View file @
bee4f39
...
@@ -12,17 +12,17 @@
...
@@ -12,17 +12,17 @@
</div>
</div>
<div
class=
"item"
v-for=
"(data, key) in list.materialMsgList"
:key=
"key"
>
<div
class=
"item"
v-for=
"(data, key) in list.materialMsgList"
:key=
"key"
>
<div
class=
"avatar"
><img
src=
"../assets/drainageCode/header.png"
></div>
<div
class=
"avatar"
><img
src=
"../assets/drainageCode/header.png"
></div>
<div
class=
"msg"
v-if=
"data.msgType ===
4
"
>
<div
class=
"msg"
v-if=
"data.msgType ===
'4'
"
>
<div
class=
"word"
>
<div
class=
"word"
>
{{
data
.
content
}}
{{
data
.
content
}}
</div>
</div>
</div>
</div>
<div
class=
"msg"
v-if=
"data.msgType ===
0
"
>
<div
class=
"msg"
v-if=
"data.msgType ===
'0'
"
>
<div
class=
"image"
>
<div
class=
"image"
>
<img
:src=
"data.materialUrl"
/>
<img
:src=
"data.materialUrl"
/>
</div>
</div>
</div>
</div>
<div
class=
"msg"
v-if=
"data.msgType ===
7
"
>
<div
class=
"msg"
v-if=
"data.msgType ===
'7'
"
>
<div
class=
"word-and-image"
>
<div
class=
"word-and-image"
>
<div>
<div>
{{
data
.
materialName
}}
{{
data
.
materialName
}}
...
@@ -37,16 +37,14 @@
...
@@ -37,16 +37,14 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"msg"
v-if=
"data.msgType ===
8
"
>
<div
class=
"msg"
v-if=
"data.msgType ===
'8'
"
>
<div
class=
"miniprogram"
>
<div
class=
"miniprogram"
>
<div
class=
"mini-header"
>
<div
class=
"mini-header"
>
<img
src=
"../assets/drainageCode/miniprogram-icon.png"
alt=
""
>
<img
src=
"../assets/drainageCode/miniprogram-icon.png"
alt=
""
>
{{
data
.
materialName
}}
{{
data
.
materialName
}}
</div>
</div>
<img
class=
"mini-img"
:src=
"data.coverUrl"
>
<img
class=
"mini-img"
:src=
"data.coverUrl"
>
<div
class=
"mini-footer"
>
<div
class=
"mini-footer"
>
<img
src=
"../assets/drainageCode/miniprogram-link.png"
/>
<img
src=
"../assets/drainageCode/miniprogram-link.png"
/>
小程序
小程序
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -111,14 +109,12 @@
...
@@ -111,14 +109,12 @@
default
:
{}
default
:
{}
}
}
},
},
data
()
{
data
()
{
return
{}
return
{}
},
},
watch
:
{
},
computed
:
{},
computed
:
{},
created
()
{
},
created
()
{
},
mounted
()
{
},
mounted
()
{
},
methods
:
{},
methods
:
{},
}
}
</
script
>
</
script
>
...
@@ -175,9 +171,9 @@
...
@@ -175,9 +171,9 @@
.msg
{
.msg
{
position
:
relative
;
position
:
relative
;
min-height
:
26px
;
min-height
:
26px
;
background
:
#FFFFFF
;
background
:
#ffffff
;
box-shadow
:
0px
2px
6px
0px
rgba
(
60
,
136
,
240
,
0.1
);
box-shadow
:
0px
2px
6px
0px
rgba
(
60
,
136
,
240
,
0.1
);
border
:
1px
solid
#E1EDFC
;
border
:
1px
solid
#e1edfc
;
display
:
inline-block
;
display
:
inline-block
;
border-radius
:
4px
;
border-radius
:
4px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -185,7 +181,7 @@
...
@@ -185,7 +181,7 @@
margin-left
:
5px
;
margin-left
:
5px
;
&:before
{
&:before
{
content
:
' '
;
content
:
" "
;
display
:
block
;
display
:
block
;
position
:
absolute
;
position
:
absolute
;
left
:
-5px
;
left
:
-5px
;
...
@@ -255,13 +251,8 @@
...
@@ -255,13 +251,8 @@
}
}
}
}
}
}
}
}
}
}
}
}
}
}
</
style
>
</
style
>
linkwe-ui/src/views/drainageCode/welcome/add.vue
View file @
bee4f39
<
template
>
<div>
<welcome-content
v-if=
"show"
:showTemplate=
"false"
:showMember=
"form.welcomeMsgTplType === '2'"
:showMorMaterial=
"true"
:baseData=
"materialData"
@
submit=
"getWelData"
></welcome-content>
</div>
</
template
>
<
script
>
<
script
>
import
{
addOrUpdate
,
getPreview
}
from
'@/api/drainageCode/welcome'
import
{
import
SelectMaterial
from
'@/components/SelectMaterial'
addOrUpdate
,
getPreview
import
WelcomeContent
from
'@/components/WelcomeContent.vue'
}
from
'@/api/drainageCode/welcome'
export
default
{
import
SelectMaterial
from
'@/components/SelectMaterial'
import
WelcomeContent
from
'@/components/WelcomeContent.vue'
export
default
{
components
:
{
components
:
{
SelectMaterial
,
SelectMaterial
,
WelcomeContent
WelcomeContent
},
},
props
:
{},
props
:
{},
data
()
{
data
()
{
return
{
return
{
name
:
'活码'
,
type
:
'新建'
,
materialData
:
{
materialData
:
{
welcomeMsg
:
''
,
welcomeMsg
:
''
,
materialMsgList
:
[]
materialMsgList
:
[]
...
@@ -17,123 +27,193 @@ export default {
...
@@ -17,123 +27,193 @@ export default {
dialogVisible
:
false
,
dialogVisible
:
false
,
dialogVisibleSelectMaterial
:
false
,
dialogVisibleSelectMaterial
:
false
,
form
:
{
form
:
{
//
id: '',
id
:
''
,
welcomeMsgTplType
:
''
,
welcomeMsgTplType
:
''
,
welcomeMsg
:
''
,
welcomeMsg
:
''
,
materialUrl
:
''
picUrl
:
''
,
applet
:
[],
imageText
:
[],
userIds
:
''
},
},
// 遮罩层
// 遮罩层
loading
:
false
loading
:
false
,
show
:
false
}
}
},
},
watch
:
{},
watch
:
{},
computed
:
{},
computed
:
{},
created
()
{
created
()
{
this
.
form
=
Object
.
assign
(
this
.
form
,
this
.
$route
.
query
)
this
.
form
.
id
=
this
.
$route
.
query
.
id
let
data
=
JSON
.
parse
(
localStorage
.
getItem
(
'obj'
))
this
.
form
=
Object
.
assign
(
this
.
form
,
data
)
this
.
name
=
this
.
form
.
welcomeMsgTplType
===
'1'
?
'活码'
:
this
.
form
.
welcomeMsgTplType
===
'2'
?
'员工'
:
'入群'
this
.
type
=
this
.
form
.
id
?
'编辑'
:
'新建'
this
.
$route
.
meta
.
title
=
(
this
.
form
.
id
?
'编辑'
:
'新建'
)
+
'欢迎语'
this
.
$route
.
meta
.
title
=
(
this
.
form
.
id
?
'编辑'
:
'新建'
)
+
'欢迎语'
this
.
form
.
id
&&
this
.
getData
()
this
.
form
.
id
&&
this
.
getData
()
},
},
mounted
()
{},
mounted
()
{
this
.
show
=
true
},
methods
:
{
methods
:
{
getWelData
(
data
)
{
getWelData
(
data
)
{
let
form
=
this
.
form
this
.
form
.
welcomeMsg
=
data
.
welcomeMsg
form
.
welcomeMsg
=
data
.
welcomeMsg
let
img
=
[]
// this.form.mediaId = data.mediaId
let
imgText
=
[]
// this.form.materialMsgList = data.materialMsgList
let
applet
=
[]
data
.
materialMsgList
.
forEach
((
element
)
=>
{
data
.
materialMsgList
.
forEach
((
unit
,
key
)
=>
{
// 0 图片;4文本;7图文;8小程序
if
(
unit
.
msgType
===
'0'
)
{
if
(
element
.
msgType
==
0
)
{
img
.
push
(
unit
.
materialUrl
)
;(
form
.
picUrl
||
(
form
.
picUrl
=
[])).
push
(
element
.
materialUrl
)
}
}
else
if
(
element
.
msgType
==
7
)
{
if
(
unit
.
msgType
===
'7'
)
{
;(
form
.
imageText
||
(
form
.
imageText
=
[])).
push
({
let
obj
=
{
imageTextTile
:
element
.
materialName
,
//图文标题
imageTextTile
:
unit
.
materialName
,
imageTextUrl
:
element
.
content
//图文路径
imageTextUrl
:
unit
.
content
})
}
}
else
if
(
element
.
msgType
==
8
)
{
imgText
.
push
(
obj
)
;(
form
.
applet
||
(
form
.
applet
=
[])).
push
({
}
appTile
:
element
.
materialName
,
//小程序标题
if
(
unit
.
msgType
===
'8'
)
{
appId
:
element
.
materialUrl
,
//小程序id
let
oob
=
{
appPath
:
element
.
content
,
//小程序路径
appTile
:
unit
.
materialName
,
appPic
:
element
.
coverUrl
//小程序封面
appId
:
unit
.
materialUrl
,
})
appPath
:
unit
.
content
,
appPic
:
unit
.
coverUrl
}
applet
.
push
(
oob
)
}
}
})
})
if
(
form
.
welcomeMsgTplType
===
'1'
)
{
if
(
applet
.
length
)
{
form
.
userIds
=
data
.
users
.
map
((
e
)
=>
e
.
userId
)
+
''
this
.
form
.
applet
=
applet
}
else
{
this
.
form
.
applet
=
[]
}
if
(
imgText
.
length
)
{
this
.
form
.
imageText
=
imgText
}
else
{
this
.
form
.
imageText
=
[]
}
if
(
img
.
length
)
{
this
.
form
.
picUrl
=
img
.
join
(
','
)
}
else
{
this
.
form
.
picUrl
=
''
}
if
(
this
.
form
.
welcomeMsgTplType
===
'2'
)
{
this
.
form
.
userIds
=
data
.
users
.
map
(
dd
=>
{
return
dd
.
userId
}).
join
(
','
)
}
}
form
.
picUrl
+=
''
this
.
submit
()
this
.
submit
()
},
},
getData
()
{
getData
()
{
getPreview
(
this
.
form
.
id
).
then
(({
data
})
=>
{
// getPreview(this.form.id).then(({ data }) => {
this
.
materialData
=
{}
this
.
materialData
=
this
.
form
this
.
materialData
=
data
console
.
log
(
this
.
materialData
)
this
.
materialData
.
materialMsgList
.
forEach
((
item
)
=>
{
this
.
materialData
.
materialMsgList
=
[]
item
.
msgType
=
Number
(
item
.
msgType
)
let
img
=
[]
let
imgText
=
[]
let
applet
=
[]
if
(
this
.
form
.
picUrl
)
{
this
.
form
.
picUrl
.
split
(
','
).
forEach
(
dd
=>
{
let
obj
=
{
materialUrl
:
dd
,
msgType
:
'0'
,
}
img
.
push
(
obj
)
})
})
}
if
(
this
.
form
.
imageText
&&
this
.
form
.
imageText
.
length
)
{
this
.
form
.
imageText
.
forEach
(
dd
=>
{
let
obj
=
{
materialName
:
dd
.
imageTextTile
,
content
:
dd
.
imageTextUrl
,
msgType
:
'7'
}
imgText
.
push
(
obj
)
})
}
if
(
this
.
form
.
applet
&&
this
.
form
.
applet
.
length
)
{
this
.
form
.
applet
.
forEach
(
cc
=>
{
let
obj
=
{
materialName
:
cc
.
appTile
,
materialUrl
:
cc
.
appId
,
content
:
cc
.
appPath
,
coverUrl
:
cc
.
appPic
,
msgType
:
'8'
}
applet
.
push
(
obj
)
})
})
}
this
.
materialData
.
materialMsgList
.
push
(...
img
)
this
.
materialData
.
materialMsgList
.
push
(...
imgText
)
this
.
materialData
.
materialMsgList
.
push
(...
applet
)
this
.
$forceUpdate
()
// })
},
},
submit
()
{
submit
()
{
debugger
addOrUpdate
(
this
.
form
)
addOrUpdate
(
this
.
form
)
.
then
(({
data
})
=>
{
.
then
(({
data
})
=>
{
this
.
msgSuccess
(
'操作成功'
)
this
.
msgSuccess
(
'操作成功'
)
this
.
loading
=
false
this
.
loading
=
false
// this.$router.back()
// this.$router.back()
// console.log(
form.welcomeMsgTplType === '1')
console
.
log
(
this
.
form
.
welcomeMsgTplType
===
'1'
)
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/wechat
/drainageCode/welcome/'
,
path
:
'
/drainageCode/welcome/'
,
query
:
{
query
:
{
type
:
this
.
form
.
welcomeMsgTplType
type
:
this
.
form
.
welcomeMsgTplType
.
toString
()
}
}
})
})
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
})
})
},
insertName
()
{
this
.
form
.
welcomeMsg
+=
'#客户昵称#'
},
// 选择素材确认按钮
submitSelectMaterial
(
text
,
image
,
file
)
{
this
.
form
.
mediaId
=
image
.
id
this
.
form
.
materialUrl
=
image
.
materialUrl
this
.
dialogVisibleSelectMaterial
=
false
},
removeMaterial
()
{
this
.
form
.
mediaId
=
''
this
.
form
.
materialUrl
=
''
}
}
},
}
}
}
</
script
>
</
script
>
<
template
>
<welcome-content
:showTemplate=
"false"
:showMember=
"form.welcomeMsgTplType == 2"
:showMorMaterial=
"true"
:baseData=
"materialData"
@
submit=
"getWelData"
></welcome-content>
</
template
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.page
{
.page
{
padding
:
30px
;
padding
:
30px
;
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
8px
;
border-radius
:
8px
;
}
}
.form
{
.form
{
width
:
50%
;
width
:
50%
;
max-width
:
500px
;
max-width
:
500px
;
}
}
.filter-wrap
{
.filter-wrap
{
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.list-wrap
{
.list-wrap
{
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
}
}
.crumb-
{
//
一级
页面标题
&title
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
height
:
90px
;
//
line-height
:
90px
;
font-size
:
18px
;
font-weight
:
500
;
color
:
#333
;
padding
:
0
20px
;
background
:
#fff
;
border-top-left-radius
:
4px
;
border-top-right-radius
:
4px
;
}
}
.crumb
{
font-size
:
12px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#666666
;
display
:
flex
;
}
</
style
>
</
style
>
linkwe-ui/src/views/drainageCode/welcome/components/Tab.vue
View file @
bee4f39
<
template
>
<div>
<div>
<!-- v-hasPermi="['wecom:tlp:add']" -->
<el-form
label-position=
"left"
inline
label-width=
"80px"
>
<el-form-item
label=
"欢迎语"
>
<el-input
placeholder=
"请输入欢迎语"
v-model=
"query.welcomeMsg"
style=
"width:260px;"
></el-input>
</el-form-item>
<el-form-item
label-width=
"0"
>
<!--
<el-button
v-hasPermi=
"['wecom:code:list']"
type=
"cyan"
@
click=
"getList(1)"
>
查询
</el-button>
-->
<el-button
type=
"primary"
@
click=
"getList(0)"
>
查询
</el-button>
<el-button
@
click=
"query.welcomeMsg = ''"
>
清空
</el-button>
</el-form-item>
</el-form>
<div
style=
"margin-top:20px;display:flex;justify-content:space-between;"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"goRoute()"
>
新建
{{
wel
[
type
]
}}
欢迎语
</el-button>
<div>
<el-button
style=
"align-self: flex-end;"
size=
"mini"
type=
"primary"
plain
@
click=
"removeMult()"
>
批量删除
</el-button>
</div>
</div>
</div>
<div>
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"欢迎语"
align=
"center"
prop=
"welcomeMsg"
min-width=
"250"
show-overflow-tooltip
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"showPreview(scope.row)"
>
预览
</el-button>
<el-divider
direction=
"vertical"
></el-divider>
<el-button
size=
"mini"
type=
"text"
@
click=
"goRoute(scope.row)"
>
编辑
</el-button>
<!-- v-hasPermi="['wecom:tlp:edit']" -->
<el-divider
direction=
"vertical"
></el-divider>
<el-button
size=
"mini"
type=
"text"
@
click=
"remove(scope.row.id)"
>
删除
</el-button>
<!-- v-hasPermi="['wecom:tlp:remove']" -->
</
template
>
</el-table-column>
</el-table>
<div
class=
"bottom"
>
<pagination
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
</div>
</div>
<el-dialog
title=
"预览"
:visible
.
sync=
"showPreviewDialog"
width=
"50%"
>
<div>
<preview-client
:list=
"previewData"
></preview-client>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"showPreviewDialog = false"
>
关闭
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
<
script
>
import
*
as
api
from
'@/api/drainageCode/welcome'
import
PreviewClient
from
'@/components/previewInMobileClient.vue'
export
default
{
import
{
getList
,
remove
}
from
'@/api/drainageCode/welcome'
export
default
{
name
:
'Tab'
,
name
:
'Tab'
,
components
:
{},
components
:
{
PreviewClient
},
props
:
{
props
:
{
type
:
{
type
:
{
type
:
Number
|
String
,
type
:
Number
|
String
,
default
:
'1'
,
default
:
'1'
,
},
},
},
},
data
()
{
data
()
{
return
{
return
{
ids
:
[],
// 查询参数
// 查询参数
query
:
{
query
:
{
pageNum
:
1
,
pageNum
:
1
,
...
@@ -26,110 +87,139 @@ export default {
...
@@ -26,110 +87,139 @@ export default {
2
:
'员工'
,
2
:
'员工'
,
3
:
'入群'
,
3
:
'入群'
,
},
},
showPreviewDialog
:
false
,
previewData
:
{}
}
}
},
},
watch
:
{},
watch
:
{},
computed
:
{},
computed
:
{},
created
()
{
created
()
{
this
.
query
.
welcomeMsgTplType
=
+
this
.
type
this
.
query
.
welcomeMsgTplType
=
+
this
.
type
this
.
getList
()
this
.
getList
()
},
},
mounted
()
{
},
mounted
()
{
},
methods
:
{
methods
:
{
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
((
item
)
=>
item
.
id
)
},
/** 查询 */
/** 查询 */
getList
(
page
)
{
getList
(
page
)
{
page
&&
(
this
.
query
.
pageNum
=
page
)
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
this
.
loading
=
true
api
getList
(
this
.
query
).
then
(({
rows
,
total
})
=>
{
.
getList
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
list
=
rows
this
.
total
=
+
total
this
.
total
=
+
total
this
.
loading
=
false
this
.
loading
=
false
this
.
$emit
(
'total'
,
[
this
.
type
,
this
.
total
])
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
/** 删除按钮操作 */
/** 删除按钮操作 */
remove
(
id
)
{
remove
(
id
)
{
// const operIds = id || this.ids + "";
// const operIds = id || this.ids + "";
this
.
$confirm
(
'是否确认删除吗?'
,
'警告'
,
{
this
.
$confirm
(
'是否确认删除吗?'
,
'警告'
,
{
type
:
'warning'
,
type
:
'warning'
,
})
})
.
then
(
function
()
{
.
then
(()
=>
{
return
api
.
remove
(
id
)
return
remove
(
id
)
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
getList
()
this
.
getList
()
this
.
msgSuccess
(
'删除成功'
)
this
.
msgSuccess
(
'删除成功'
)
})
})
},
},
goRoute
(
data
)
{
removeMult
()
{
if
(
!
this
.
ids
.
length
)
{
this
.
msgInfo
(
'请勾选需要删除的项!'
)
return
}
this
.
$confirm
(
'是否确认删除吗?'
,
'警告'
,
{
type
:
'warning'
,
})
.
then
(()
=>
{
return
remove
(
this
.
ids
.
join
(
','
))
})
.
then
(()
=>
{
this
.
getList
()
this
.
msgSuccess
(
'删除成功'
)
})
},
goRoute
(
data
)
{
let
query
=
{}
let
query
=
{}
if
(
data
)
{
if
(
data
)
{
let
{
id
,
welcomeMsgTplType
,
welcomeMsg
,
materialUrl
}
=
data
query
.
id
=
data
.
id
query
=
{
id
,
welcomeMsgTplType
,
welcomeMsg
,
materialUrl
}
}
else
{
}
else
{
query
.
welcomeMsgTplType
=
this
.
type
query
.
welcomeMsgTplType
=
this
.
type
}
}
this
.
$router
.
push
({
path
:
'welcomeAdd'
,
query
:
query
})
localStorage
.
setItem
(
'obj'
,
JSON
.
stringify
(
data
))
this
.
$router
.
push
({
path
:
'/drainageCode/welcomeAdd'
,
query
:
query
})
},
},
showPreview
(
data
)
{
// getPreview(data.id).then(res => {
this
.
previewData
=
data
this
.
previewData
.
materialMsgList
=
[]
let
img
=
[]
let
imgText
=
[]
let
applet
=
[]
if
(
data
.
picUrl
)
{
data
.
picUrl
.
split
(
','
).
forEach
(
dd
=>
{
let
obj
=
{
materialUrl
:
dd
,
msgType
:
'0'
,
}
img
.
push
(
obj
)
})
}
if
(
data
.
imageText
&&
data
.
imageText
.
length
)
{
data
.
imageText
.
forEach
(
dd
=>
{
let
obj
=
{
materialName
:
dd
.
imageTextTile
,
content
:
dd
.
imageTextUrl
,
msgType
:
'7'
}
imgText
.
push
(
obj
)
})
}
if
(
data
.
applet
&&
data
.
applet
.
length
)
{
data
.
applet
.
forEach
(
cc
=>
{
let
obj
=
{
materialName
:
cc
.
appTile
,
materialUrl
:
cc
.
appId
,
content
:
cc
.
appPath
,
coverUrl
:
cc
.
appPic
,
msgType
:
'8'
}
applet
.
push
(
obj
)
})
}
this
.
previewData
.
materialMsgList
.
push
(...
img
)
this
.
previewData
.
materialMsgList
.
push
(...
imgText
)
this
.
previewData
.
materialMsgList
.
push
(...
applet
)
this
.
showPreviewDialog
=
true
// })
}
},
},
}
}
</
script
>
</
script
>
<
template
>
<div>
<div
class=
"mid-action"
>
<div></div>
<div>
<el-button
v-hasPermi=
"['wecom:tlp:add']"
type=
"primary"
size=
"mini"
@
click=
"goRoute()"
>
新建
{{
wel
[
type
]
}}
欢迎语
</el-button
>
<el-input
placeholder=
"请输入内容"
prefix-icon=
"el-icon-search"
v-model=
"query.welcomeMsg"
style=
"width: 240px; margin-left: 10px;"
@
change=
"getList(0)"
></el-input>
</div>
</div>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"欢迎语"
align=
"center"
prop=
"welcomeMsg"
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"goRoute(scope.row)"
v-hasPermi=
"['wecom:tlp:edit']"
>
编辑
</el-button
>
<el-button
size=
"mini"
type=
"text"
@
click=
"remove(scope.row.id)"
v-hasPermi=
"['wecom:tlp:remove']"
>
删除
</el-button
>
</
template
>
</el-table-column>
</el-table>
</div>
</template>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
>
.header
{
padding
:
0
20px
;
}
.divider-content
{
width
:
100%
;
height
:
10px
;
background-color
:
#f5f7fb
;
}
.bottom
{
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
}
</
style
>
linkwe-ui/src/views/drainageCode/welcome/list.vue
View file @
bee4f39
<
template
>
<
template
>
<div>
<div>
<el-tabs
:value=
"active"
>
<el-tabs
:value=
"active"
>
<el-tab-pane
:label=
"`活码欢迎语($
{total1})`
" name="1">
<el-tab-pane
label=
"活码欢迎语
"
name=
"1"
>
<Tab
ref=
"tab1"
type=
"1"
@
total=
"totalChange"
></Tab>
<Tab
ref=
"tab1"
type=
"1"
@
total=
"totalChange"
></Tab>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
:label=
"`员工欢迎语($
{total2})`
" name="2">
<el-tab-pane
label=
"员工欢迎语
"
name=
"2"
>
<Tab
ref=
"tab2"
type=
"2"
@
total=
"totalChange"
></Tab>
<Tab
ref=
"tab2"
type=
"2"
@
total=
"totalChange"
></Tab>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
:label=
"`入群欢迎语($
{total3})`
" name="3">
<el-tab-pane
label=
"入群欢迎语
"
name=
"3"
>
<Tab
ref=
"tab3"
type=
"3"
@
total=
"totalChange"
></Tab>
<Tab
ref=
"tab3"
type=
"3"
@
total=
"totalChange"
></Tab>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
...
@@ -15,13 +15,13 @@
...
@@ -15,13 +15,13 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
Tab
from
'./components/Tab'
import
Tab
from
'./components/Tab'
export
default
{
export
default
{
name
:
'Welcome'
,
name
:
'Welcome'
,
components
:
{
Tab
},
components
:
{
Tab
},
props
:
{},
props
:
{},
data
()
{
data
()
{
return
{
return
{
active
:
'1'
,
active
:
'1'
,
total1
:
0
,
total1
:
0
,
...
@@ -31,8 +31,12 @@ export default {
...
@@ -31,8 +31,12 @@ export default {
},
},
watch
:
{},
watch
:
{},
computed
:
{},
computed
:
{},
created
()
{},
created
()
{
mounted
()
{
if
(
this
.
$route
.
query
.
type
)
{
this
.
active
=
this
.
$route
.
query
.
type
}
},
mounted
()
{
this
.
$store
.
dispatch
(
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
'app/setBusininessDesc'
,
`
`
...
@@ -48,11 +52,11 @@ export default {
...
@@ -48,11 +52,11 @@ export default {
// next()
// next()
// },
// },
methods
:
{
methods
:
{
totalChange
([
type
,
total
])
{
totalChange
([
type
,
total
])
{
this
[
'total'
+
type
]
=
total
this
[
'total'
+
type
]
=
total
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
></
style
>
linkwe-ui/src/views/friendCircle/enterprise.vue
View file @
bee4f39
...
@@ -85,6 +85,36 @@
...
@@ -85,6 +85,36 @@
</el-table>
</el-table>
<pagination
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
<pagination
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
<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-form
label-position=
"right"
label-width=
"100px"
>
<el-form-item
label=
"内容:"
>
{{detail.content}}
</el-form-item>
<el-form-item
v-if=
"detail.otherContent"
label=
" "
>
<
template
v-for=
"(data, index) in detail.otherContent"
>
<div
style=
"display:inline-block;margin-right:10px;"
v-if=
"data.annexType === 'image'"
>
<el-image
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></el-image>
</div>
<div
style=
"display:inline-block;margin-right:10px;"
v-else-if=
"data.annexType === 'video'"
>
<video
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></video>
</div>
<div
style=
"display:inline-block;margin-right:10px;"
v-else-if=
"data.annexType === 'link'"
>
<video
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></video>
</div>
</
template
>
</el-form-item>
<el-form-item
label=
"已发送员工"
v-if=
"detail.addUserName"
>
<el-tag
v-for=
"(data, key) in detail.addUserName.split(',')"
:key=
"key"
>
{{data}}
</el-tag>
</el-form-item>
<el-form-item
label=
"未发送员工"
v-if=
"detail.noAddUserName"
>
<el-tag
v-for=
"(data, key) in detail.noAddUserName.split(',')"
:key=
"key"
>
{{data}}
</el-tag>
</el-form-item>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"detailDialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"detailDialogVisible = false"
>
确 定
</el-button>
</span>
</el-form>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -112,7 +142,9 @@
...
@@ -112,7 +142,9 @@
loading
:
false
,
loading
:
false
,
tableData
:
[],
tableData
:
[],
total
:
0
,
total
:
0
,
lastSyncTime
:
''
lastSyncTime
:
''
,
detailDialogVisible
:
false
,
detail
:
{}
}
}
},
},
methods
:
{
methods
:
{
...
@@ -121,7 +153,12 @@
...
@@ -121,7 +153,12 @@
this
.
query
.
endTime
=
moment
(
e
[
1
]).
format
(
'YYYY-MM-DD'
)
this
.
query
.
endTime
=
moment
(
e
[
1
]).
format
(
'YYYY-MM-DD'
)
},
},
detailFn
(
id
)
{
detailFn
(
id
)
{
getDetail
(
id
)
this
.
detailDialogVisible
=
true
getDetail
(
id
).
then
(
dd
=>
{
if
(
dd
.
code
===
200
)
{
this
.
detail
=
dd
.
data
}
})
},
},
syncFn
()
{
syncFn
()
{
syncHMoments
({
filterType
:
0
}).
then
(
res
=>
{
syncHMoments
({
filterType
:
0
}).
then
(
res
=>
{
...
...
linkwe-ui/src/views/friendCircle/index.vue
View file @
bee4f39
<
template
>
<
template
>
<div>
<div>
员工动态
<div>
<el-form
:model=
"query"
label-position=
"left"
ref=
"queryForm"
:inline=
"true"
label-width=
"100px"
class=
"top-search"
>
<el-form-item
label=
"选择创建人"
prop=
"creator"
>
<el-input
:value=
"query.creator"
readonly
@
focus=
"dialogVisible = true"
placeholder=
"请选择员工"
/>
</el-form-item>
<el-form-item
label=
"时间范围"
>
<el-date-picker
v-model=
"value1"
format=
"yyyy-MM-dd"
@
change=
"setTimeChange"
type=
"daterange"
range-separator=
"——"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
<el-form-item
label-width=
"0"
>
<!-- v-hasPermi="['wecom:code:list']" -->
<el-button
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<el-button
@
click=
"resetQuery"
>
清空
</el-button>
</el-form-item>
</el-form>
</div>
<div>
<div
style=
"margin:10px 0;display:flex;"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"syncFn"
>
同步朋友圈
</el-button>
<div
class=
"time"
v-if=
"lastSyncTime"
>
最近同步:
{{
lastSyncTime
}}
</div>
<div
class=
"time"
v-else
>
暂无记录,请手动点击同步
</div>
</div>
</div>
<el-table
ref=
"table"
v-loading=
"loading"
:data=
"tableData"
style=
"width: 100%"
>
<el-table-column
show-overflow-tooltip
prop=
"content"
label=
"朋友圈内容"
>
<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>
<div
v-else
>
{{
row
.
content
}}
</div>
</
template
>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop=
"contentType"
label=
"类型"
>
<
template
slot-scope=
"{ row }"
>
<!-- image:图片;text:文本;video:视频;link:图文 -->
<div>
{{
row
.
contentType
===
'image'
?
'图片'
:
row
.
contentType
===
'text'
?
'文本'
:
row
.
contentType
===
'video'
?
'视频'
:
'图文'
}}
</div>
</
template
>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop=
"creator"
label=
"创建人"
></el-table-column>
<el-table-column
show-overflow-tooltip
prop=
"createTime"
width=
"170px"
label=
"创建时间"
></el-table-column>
<el-table-column
show-overflow-tooltip
prop=
"pointNum"
label=
"点赞数"
></el-table-column>
<el-table-column
show-overflow-tooltip
prop=
"commentNum"
label=
"评论数"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"100"
>
<
template
slot-scope=
"{ row }"
>
<el-button
type=
"text"
@
click=
"detailFn(row.momentId)"
>
详情
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
<SelectUser
:visible
.
sync=
"dialogVisible"
title=
"组织架构"
:defaultValues=
"userArray"
@
success=
"getSelectUser"
></SelectUser>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailDialogVisible"
width=
"40%"
>
<el-form
label-position=
"right"
label-width=
"100px"
>
<el-form-item
label=
"内容:"
>
{{detail.content}}
</el-form-item>
<el-form-item
v-if=
"detail.otherContent"
label=
" "
>
<
template
v-for=
"(data, index) in detail.otherContent"
>
<div
style=
"display:inline-block;margin-right:10px;"
v-if=
"data.annexType === 'image'"
>
<el-image
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></el-image>
</div>
<div
style=
"display:inline-block;margin-right:10px;"
v-else-if=
"data.annexType === 'video'"
>
<video
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></video>
</div>
<div
style=
"display:inline-block;margin-right:10px;"
v-else-if=
"data.annexType === 'link'"
>
<video
style=
"width: 100px; height: 100px"
:src=
"data.annexUrl"
></video>
</div>
</
template
>
</el-form-item>
<el-form-item
label=
"点赞客户:"
v-if=
"detail.pointCustomerName"
>
<el-tag
v-for=
"(data, key) in detail.pointCustomerName.split(',')"
:key=
"key"
>
{{data}}
</el-tag>
</el-form-item>
<el-form-item
label=
"评论客户:"
v-if=
"detail.momentCustomerName"
>
<el-tag
v-for=
"(data, key) in detail.momentCustomerName.split(',')"
:key=
"key"
>
{{data}}
</el-tag>
</el-form-item>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"detailDialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"detailDialogVisible = false"
>
确 定
</el-button>
</span>
</el-form>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
SelectUser
from
'@/components/SelectUser'
import
moment
from
'moment'
import
{
getEnterpriceList
,
syncHMoments
,
getDetail
}
from
'@/api/circle'
export
default
{
export
default
{
name
:
'friend-index'
,
name
:
'friend-index'
,
components
:
{
SelectUser
},
data
()
{
data
()
{
return
{
return
{
value1
:
[],
dialogVisible
:
false
,
userArray
:
[],
query
:
{
pageSize
:
10
,
pageNum
:
1
,
beginTime
:
''
,
endTime
:
''
,
creator
:
''
,
type
:
1
},
loading
:
false
,
tableData
:
[],
total
:
0
,
lastSyncTime
:
''
,
detailDialogVisible
:
false
,
detail
:
{}
}
}
},
},
methods
:
{
methods
:
{
setTimeChange
(
e
)
{
this
.
query
.
beginTime
=
moment
(
e
[
0
]).
format
(
'YYYY-MM-DD'
)
this
.
query
.
endTime
=
moment
(
e
[
1
]).
format
(
'YYYY-MM-DD'
)
},
detailFn
(
id
)
{
this
.
detailDialogVisible
=
true
getDetail
(
id
).
then
(
dd
=>
{
if
(
dd
.
code
===
200
)
{
this
.
detail
=
dd
.
data
}
})
},
syncFn
()
{
syncHMoments
({
filterType
:
1
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
msgSuccess
(
res
.
msg
)
this
.
getList
()
}
})
},
getSelectUser
(
data
)
{
this
.
userArray
=
data
this
.
query
.
creator
=
this
.
userArray
.
map
(
function
(
obj
,
index
)
{
return
obj
.
name
}).
join
(
","
)
},
resetQuery
()
{
this
.
query
=
{
pageSize
:
10
,
pageNum
:
1
,
beginTime
:
''
,
endTime
:
''
,
creator
:
''
,
type
:
1
},
this
.
userArray
=
[]
this
.
value1
=
[]
this
.
getList
()
},
getList
(
type
)
{
type
&&
(
this
.
query
.
pageNum
=
type
)
this
.
loading
=
true
getEnterpriceList
(
this
.
query
)
.
then
(
res
=>
{
this
.
tableData
=
res
.
rows
this
.
lastSyncTime
=
res
.
lastSyncTime
this
.
total
=
Number
(
res
.
total
)
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
})
},
},
mounted
()
{
this
.
query
.
beginTime
=
moment
(
this
.
value1
[
0
]).
format
(
'YYYY-MM-DD'
)
this
.
query
.
endTime
=
moment
(
this
.
value1
[
1
]).
format
(
'YYYY-MM-DD'
)
},
},
created
()
{
created
()
{
this
.
value1
[
1
]
=
moment
(
new
Date
()).
format
(
'YYYY-MM-DD'
)
this
.
value1
[
0
]
=
moment
(
new
Date
()).
subtract
(
1
,
'months'
).
format
(
'YYYY-MM-DD'
)
this
.
getList
()
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.time
{
margin-left
:
20px
;
color
:
#999
;
font-size
:
12px
;
align-self
:
flex-end
;
}
</
style
>
linkwe-ui/src/views/friendCircle/publish.vue
0 → 100644
View file @
bee4f39
<
template
>
<div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"circle-publish"
,
data
()
{
return
{}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
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