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 d9ea537b
authored
Nov 08, 2022
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop'
2 parents
5e601931
43463031
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
182 additions
and
9 deletions
linkwe-pc/src/api/internalCollaborate/appManage.js
linkwe-pc/src/router/index.js
linkwe-pc/src/views/internalCollaborate/appManage.vue
linkwe-pc/src/views/internalCollaborate/appManage/HistoryMsg.vue
linkwe-pc/src/views/internalCollaborate/appManage/list.vue
linkwe-pc/src/api/internalCollaborate/appManage.js
View file @
d9ea537
...
@@ -14,6 +14,17 @@ export function getList() {
...
@@ -14,6 +14,17 @@ export function getList() {
}
}
/**
/**
* 同步应用信息
* @param {*} params
*/
export
function
sync
(
id
)
{
return
request
({
url
:
service
+
`/pull/
${
id
}
`
,
method
:
'get'
,
})
}
/**
* 删除
* 删除
* @param {*} params
* @param {*} params
*/
*/
...
@@ -35,7 +46,7 @@ export function remove(id) {
...
@@ -35,7 +46,7 @@ export function remove(id) {
*/
*/
export
function
add
(
data
)
{
export
function
add
(
data
)
{
return
request
({
return
request
({
url
:
service
+
'/
pull
'
,
url
:
service
+
'/
add
'
,
method
:
'post'
,
method
:
'post'
,
data
,
data
,
})
})
...
@@ -76,7 +87,7 @@ export const appMsg = {
...
@@ -76,7 +87,7 @@ export const appMsg = {
*/
*/
getList
(
params
)
{
getList
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/list'
,
url
:
service
Msg
+
'/list'
,
params
,
params
,
})
})
},
},
...
@@ -87,7 +98,7 @@ export const appMsg = {
...
@@ -87,7 +98,7 @@ export const appMsg = {
*/
*/
getDetail
(
id
)
{
getDetail
(
id
)
{
return
request
({
return
request
({
url
:
service
+
`/get/
${
id
}
`
,
url
:
service
Msg
+
`/get/
${
id
}
`
,
})
})
},
},
...
@@ -97,7 +108,7 @@ export const appMsg = {
...
@@ -97,7 +108,7 @@ export const appMsg = {
*/
*/
revoke
(
id
)
{
revoke
(
id
)
{
return
request
({
return
request
({
url
:
service
+
`/revoke/
${
id
}
`
,
url
:
service
Msg
+
`/revoke/
${
id
}
`
,
})
})
},
},
...
@@ -146,7 +157,7 @@ export const appMsg = {
...
@@ -146,7 +157,7 @@ export const appMsg = {
// 修改应用消息 data同上
// 修改应用消息 data同上
update
(
data
)
{
update
(
data
)
{
return
request
({
return
request
({
url
:
service
+
`/update/
${
data
.
id
}
`
,
url
:
service
Msg
+
`/update/
${
data
.
id
}
`
,
method
:
'PUT'
,
method
:
'PUT'
,
data
,
data
,
})
})
...
@@ -158,7 +169,7 @@ export const appMsg = {
...
@@ -158,7 +169,7 @@ export const appMsg = {
*/
*/
remove
(
id
)
{
remove
(
id
)
{
return
request
({
return
request
({
url
:
service
+
`/delete/
${
id
}
`
,
url
:
service
Msg
+
`/delete/
${
id
}
`
,
method
:
'delete'
,
method
:
'delete'
,
})
})
},
},
...
...
linkwe-pc/src/router/index.js
View file @
d9ea537
...
@@ -33,7 +33,7 @@ import visitor from '@/layout/visitor'
...
@@ -33,7 +33,7 @@ import visitor from '@/layout/visitor'
// 开发路由,总后台配置完菜单务必删除或注释,只在开发环境生效
// 开发路由,总后台配置完菜单务必删除或注释,只在开发环境生效
const
devRoutes
=
[
const
devRoutes
=
[
{
{
path
:
'/
internalCollaborat
e'
,
path
:
'/
appManag
e'
,
component
:
Layout
,
component
:
Layout
,
hidden
:
true
,
hidden
:
true
,
meta
:
{
meta
:
{
...
@@ -42,7 +42,7 @@ const devRoutes = [
...
@@ -42,7 +42,7 @@ const devRoutes = [
children
:
[
children
:
[
{
{
path
:
'list'
,
path
:
'list'
,
component
:
(
resolve
)
=>
require
([
'@/views/internalCollaborate/appManage'
],
resolve
),
component
:
(
resolve
)
=>
require
([
'@/views/internalCollaborate/appManage
/list
'
],
resolve
),
meta
:
{
meta
:
{
title
:
''
,
title
:
''
,
activeMenu
:
'/commodityCenter/commodityManage'
,
activeMenu
:
'/commodityCenter/commodityManage'
,
...
...
linkwe-pc/src/views/internalCollaborate/appManage.vue
View file @
d9ea537
...
@@ -56,6 +56,10 @@ export default {
...
@@ -56,6 +56,10 @@ export default {
this
.
loading
=
true
this
.
loading
=
true
getList
()
getList
()
.
then
(({
data
,
total
})
=>
{
.
then
(({
data
,
total
})
=>
{
data
.
forEach
((
element
)
=>
{
element
.
allowPartyName
=
(
element
.
allowPartyName
||
''
).
split
(
','
)
element
.
allowUserinfoName
=
(
element
.
allowUserinfoName
||
''
).
split
(
','
)
})
this
.
list
=
data
this
.
list
=
data
})
})
.
finally
(()
=>
{
.
finally
(()
=>
{
...
@@ -66,6 +70,9 @@ export default {
...
@@ -66,6 +70,9 @@ export default {
this
.
form
=
Object
.
assign
({},
data
||
{})
this
.
form
=
Object
.
assign
({},
data
||
{})
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
type
||
!
data
?
(
this
.
disabled
=
false
)
:
(
this
.
disabled
=
true
)
type
||
!
data
?
(
this
.
disabled
=
false
)
:
(
this
.
disabled
=
true
)
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'form'
].
clearValidate
()
})
},
},
submit
()
{
submit
()
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
...
@@ -139,7 +146,7 @@ export default {
...
@@ -139,7 +146,7 @@ export default {
<i
class=
"el-icon-folder-opened"
v-if=
"item"
></i>
{{
item
}}
<i
class=
"el-icon-folder-opened"
v-if=
"item"
></i>
{{
item
}}
</div>
</div>
</div>
-->
</div>
-->
<TagEllipsis
:list=
"item.allowPartyName
.split(',')
"
></TagEllipsis>
<TagEllipsis
:list=
"item.allowPartyName"
></TagEllipsis>
</div>
</div>
<div
class=
"list-action fr"
>
<div
class=
"list-action fr"
>
<!--
<el-button
type=
"text"
>
发送消息
</el-button>
<!--
<el-button
type=
"text"
>
发送消息
</el-button>
...
@@ -259,6 +266,7 @@ export default {
...
@@ -259,6 +266,7 @@ export default {
line-height
:
20px
;
line-height
:
20px
;
.list
{
.list
{
width
:
33%
;
width
:
33%
;
height
:
218px
;
padding
:
20px
20px
10px
;
padding
:
20px
20px
10px
;
border
:
1px
solid
#eee
;
border
:
1px
solid
#eee
;
margin
:
0
20px
20px
0
;
margin
:
0
20px
20px
0
;
...
...
linkwe-pc/src/views/internalCollaborate/appManage/HistoryMsg.vue
0 → 100644
View file @
d9ea537
<
script
>
import
{
appMsg
}
from
'@/api/internalCollaborate/appManage'
export
default
{
name
:
''
,
components
:
{},
props
:
{
id
:
{
type
:
String
,
required
:
true
,
},
},
data
()
{
return
{
query
:
{
pageNum
:
1
,
pageSize
:
10
,
title
:
''
,
status
:
''
,
id
:
this
.
id
,
},
total
:
0
,
list
:
[],
loading
:
false
,
dialogVisibleHistoryMsg
:
false
,
status
:
{
''
:
'全部状态'
,
0
:
'草稿'
,
1
:
'待发送'
,
2
:
'已发送'
,
3
:
'已撤回'
},
type
:
[
'图片'
,
'语音'
,
'视频'
,
'文件'
,
'文本'
,
'海报'
,
'活码'
,
'人群'
,
'旅程'
,
'图文'
,
'链接'
,
'小程序'
,
'文章'
,
'企业话术'
,
'客服话术'
,
],
form
:
{},
rules
:
Object
.
freeze
({
agentId
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
secret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
name
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
description
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
logoUrl
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'change'
}],
}),
}
},
computed
:
{},
watch
:
{},
created
()
{
this
.
getList
()
},
mounted
()
{},
methods
:
{
getList
(
page
)
{
// if (this.dateRange) {
// this.query.beginTime = this.dateRange[0]
// this.query.endTime = this.dateRange[1]
// } else {
// this.query.beginTime = ''
// this.query.endTime = ''
// }
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
appMsg
.
getList
(
this
.
query
)
.
then
(({
data
,
total
})
=>
{
this
.
list
=
data
})
.
finally
(()
=>
{
this
.
loading
=
false
})
},
edit
(
data
,
type
)
{
this
.
form
=
Object
.
assign
({},
data
||
{})
this
.
dialogVisible
=
true
type
||
!
data
?
(
this
.
disabled
=
false
)
:
(
this
.
disabled
=
true
)
},
submit
()
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
;(
this
.
form
.
id
?
update
:
add
)(
this
.
form
)
.
then
(()
=>
{
this
.
msgSuccess
(
'操作成功'
)
this
.
dialogVisible
=
false
this
.
getList
()
// this.getList(!this.form.id && 1)
})
.
catch
(()
=>
{
this
.
dialogVisible
=
false
})
}
})
},
remove
(
id
)
{
// const operIds = id || this.ids + ''
this
.
$confirm
(
'是否确认删除?该操作不可撤销,请谨慎操作。'
,
{
title
:
'警告'
,
type
:
'warning'
,
})
.
then
(
function
()
{
return
appMsg
.
remove
(
id
)
})
.
then
(()
=>
{
this
.
getList
()
this
.
msgSuccess
(
'删除成功'
)
})
},
},
}
</
script
>
<
template
>
<div>
<el-select
v-model=
"query.status"
placeholder=
""
>
<el-option
v-for=
"(value, key) in status"
:key=
"key"
:label=
"value"
:value=
"key"
>
</el-option>
</el-select>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"消息标题"
align=
"center"
prop=
"title"
/>
<el-table-column
prop=
"type"
label=
"类型"
align=
"center"
>
<template
slot-scope=
"
{ row }">
{{
type
[
row
.
type
]
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"status"
label=
"消息状态"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
{{
status
[
row
.
status
]
}}
</
template
>
</el-table-column>
<el-table-column
label=
"发送时间"
align=
"center"
prop=
"groupName"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"{ row }"
>
<el-button
type=
"text"
@
click=
"edit(row, 'detail')"
>
详情
</el-button>
<el-button
v-if=
"[0, 1].includes(row.status)"
type=
"text"
@
click=
"edit(row, 'edit')"
>
编辑
</el-button>
<el-button
v-if=
"row.status == 2"
type=
"text"
@
click=
"edit(row, 'revoke')"
>
撤回
</el-button>
<el-button
v-else
@
click=
"remove(scope.row.groupId)"
type=
"text"
>
删除
</el-button>
<!-- v-hasPermi="['customerManage:tag:remove']" -->
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
layout=
"prev, pager, next"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
</div>
</template>
<
style
lang=
"less"
scoped
></
style
>
linkwe-pc/src/views/internalCollaborate/appManage/list.vue
0 → 100644
View file @
d9ea537
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