Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-message
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-message
Commits
59178fba
提交
59178fba
authored
2月 24, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
a8390d4e
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
113 行增加
和
32 行删除
+113
-32
common.js
src/api/common.js
+2
-2
sendContent.vue
src/pages/msgTemplate/components/sendContent.vue
+16
-0
targetUser.vue
src/pages/msgTemplate/components/targetUser.vue
+9
-3
detail.vue
src/pages/msgTemplate/detail.vue
+6
-6
index.vue
src/pages/msgTemplate/index.vue
+6
-5
index.vue
src/pages/userGroup/index.vue
+74
-16
没有找到文件。
src/api/common.js
浏览文件 @
59178fba
...
...
@@ -27,8 +27,8 @@ export function deleteTemp(id) {
/**
* 分组列表
*/
export
function
getGroupList
()
{
return
httpRequest
.
get
(
'/api/message/v1/messages/groups'
)
export
function
getGroupList
(
params
)
{
return
httpRequest
.
get
(
'/api/message/v1/messages/groups'
,
{
params
}
)
}
/**
* 分组列表详情
...
...
src/pages/msgTemplate/components/sendContent.vue
浏览文件 @
59178fba
...
...
@@ -226,6 +226,22 @@ export default {
this
.
formAll
[
content
[
item
.
channel
]].
content
=
item
.
payload
})
},
computed
:
{
stepLength
()
{
return
this
.
form
.
step3
[
0
]
}
},
watch
:
{
stepLength
()
{
const
numContent
=
{
2
:
0
,
4
:
1
,
3
:
2
,
1
:
3
}
this
.
tabIndex
=
numContent
[
this
.
form
.
step3
[
0
]]
}
},
methods
:
{
addLog
(
msg
)
{
api
...
...
src/pages/msgTemplate/components/targetUser.vue
浏览文件 @
59178fba
...
...
@@ -2,7 +2,7 @@
<div
class=
"target-box"
>
<div
class=
"target-content"
>
<div
class=
"name"
>
目标用户
</div>
<el-select
v-model=
"form.step2"
placeholder=
"请选择"
>
<el-select
v-model=
"form.step2"
placeholder=
"请选择"
@
change=
"selectChange"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
...
...
@@ -29,13 +29,18 @@ export default {
return
{
options
:
[],
value
:
''
,
totalUser
:
0
totalUser
:
0
,
allData
:
[]
}
},
mounted
()
{
this
.
groupsList
()
},
methods
:
{
selectChange
(
val
)
{
const
dataItem
=
this
.
allData
.
find
(
item
=>
{
return
item
.
id
===
val
})
this
.
totalUser
=
dataItem
.
user_total
},
groupsList
()
{
api
.
groupsList
()
...
...
@@ -46,7 +51,8 @@ export default {
label
:
item
.
name
})
})
this
.
totalUser
=
response
.
data
.
total
this
.
allData
=
response
.
data
.
data
// this.totalUser = response.data.total
})
.
finally
(()
=>
{
})
...
...
src/pages/msgTemplate/detail.vue
浏览文件 @
59178fba
...
...
@@ -14,14 +14,14 @@
</div>
<!-- v-if="form.step1 != ''" -->
<div
class=
"detail-content"
>
<activity
:form=
"form"
v-
if
=
"active === 0"
></activity>
<target-user
:form=
"form"
v-
if
=
"active === 1"
></target-user>
<trigger
:form=
"form"
v-
if
=
"active === 2"
></trigger>
<send-content
:form=
"form"
@
clickPrev=
"clickPrev"
@
clickNext=
"clickNext"
v-
if
=
"active === 3 || active === 4"
></send-content>
<activity
:form=
"form"
v-
show
=
"active === 0"
></activity>
<target-user
:form=
"form"
v-
show
=
"active === 1"
></target-user>
<trigger
:form=
"form"
v-
show
=
"active === 2"
></trigger>
<send-content
:form=
"form"
@
clickPrev=
"clickPrev"
@
clickNext=
"clickNext"
v-
show
=
"active === 3 || active === 4"
></send-content>
</div>
<div
class=
"foot-btn-box"
v-
if
=
"active != 3 && active != 4"
>
<div
class=
"foot-btn-box"
v-
show
=
"active != 3 && active != 4"
>
<div
class=
"content"
>
<el-button
@
click=
"prevBtn"
>
上一步
</el-button>
<el-button
@
click=
"prevBtn"
v-if=
"active !== 0"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"nextBtn"
>
下一步
</el-button>
</div>
</div>
...
...
src/pages/msgTemplate/index.vue
浏览文件 @
59178fba
...
...
@@ -4,13 +4,14 @@
<div
class=
"temp-title"
>
<div
class=
"search"
>
<span>
名称
</span>
<el-input
v-model=
"input"
placeholder=
"请输入
事项类型
"
class=
"input"
></el-input>
<el-input
v-model=
"input"
placeholder=
"请输入
模板名称
"
class=
"input"
></el-input>
<el-button
type=
"primary"
class=
"btn"
@
click=
"searchList"
>
搜索
</el-button>
</div>
<div
class=
"tool-btn"
>
<el-button
class=
"btn"
@
click=
"createTamp"
>
创建
</el-button>
<!--
<el-button
class=
"btn"
>
编辑
</el-button>
-->
<el-button
class=
"btn"
@
click=
"deleteTampList"
>
删除
</el-button>
<el-button
v-if=
"selectItem.length"
class=
"btn"
@
click=
"deleteTampList"
>
删除
</el-button>
<el-button
v-else
disabled
class=
"btn"
>
删除
</el-button>
</div>
</div>
<div
class=
"table-box"
>
...
...
@@ -67,7 +68,7 @@
<div
class=
"page-box"
>
<el-pagination
layout=
"prev, pager, next"
@
next-click=
"next
Page"
@
current-change=
"change
Page"
:total=
"totals"
>
</el-pagination>
</div>
...
...
@@ -148,8 +149,8 @@ export default {
path
:
'/msgTemplate/detail'
})
},
nextPage
(
)
{
this
.
page
.
page
++
changePage
(
n
)
{
this
.
page
.
page
=
n
this
.
getMsgTempList
(
this
.
page
)
},
prevPage
()
{
...
...
src/pages/userGroup/index.vue
浏览文件 @
59178fba
...
...
@@ -14,24 +14,26 @@
<div
class=
"heads"
>
用户组
<i
class=
"el-icon-circle-plus-outline"
@
click=
"addGroupPop = true"
></i></div>
<ul
class=
"list-box"
>
<template
v-for=
"(item, index) in groupData.data"
>
<li
:key=
"index"
>
<div
class=
"icon"
@
click=
"showDetail(item.id)"
></div>
<div
class=
"text"
@
click=
"showDetail(item.id)"
>
{{
item
.
name
}}
</div>
<li
:key=
"index"
:class=
"index === groupActive && 'active'"
>
<div
class=
"icon"
@
click=
"showDetail(item.id
, index
)"
></div>
<div
class=
"text"
@
click=
"showDetail(item.id
, index
)"
>
{{
item
.
name
}}
</div>
<i
class=
"el-icon-remove-outline icon-del"
@
click=
"delGroup(item.id)"
></i>
</li>
</
template
>
</ul>
<div
class=
"pages"
>
<el-pagination
:page-size=
9
layout=
"prev, pager, next"
@
current-change=
"changePage"
:total=
"groupData.total"
>
</el-pagination>
</div>
</li>
<li
class=
"card card2"
>
<div
class=
"heads"
>
用户
<i
class=
"el-icon-circle-plus-outline"
@
click=
"getAddUserList"
></i></div>
<div
class=
"heads"
>
用户
<i
class=
"el-icon-circle-plus-outline"
v-if=
"groupId !== -1"
@
click=
"getAddUserList"
></i></div>
<ul
class=
"list-box"
>
<
template
v-for=
"(item, index) in groupUset"
>
<
template
v-for=
"(item, index) in groupUset
.data
"
>
<li
:key=
"index"
>
<div
class=
"icon"
></div>
<div
class=
"text"
>
{{
item
.
nickname
}}
</div>
...
...
@@ -43,6 +45,8 @@
<div
class=
"pages"
>
<el-pagination
layout=
"prev, pager, next"
@
current-change=
"changePage2"
:page-size=
9
:total=
"groupUset.total"
>
</el-pagination>
</div>
...
...
@@ -51,8 +55,17 @@
<div
class=
"add-user-pop"
v-if=
"addGroupUserPop"
>
<div
class=
"card"
>
<div
class=
"title"
>
添加用户
</div>
<div
class=
"close"
@
click=
"addGroupUserPop = false"
>
关闭
</div>
<div
class=
"search"
>
<el-input
v-model=
"userListSearchInput"
placeholder=
"搜索用户…"
class=
"input"
></el-input>
<el-select
v-model=
"value"
placeholder=
"请选择"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-input
style=
"margin: 0 10px"
v-model=
"userListSearchInput"
placeholder=
"搜索用户…"
class=
"input"
></el-input>
<el-button
type=
"primary"
class=
"btn"
@
click=
"userListSearch"
>
搜索
</el-button>
</div>
<ul>
...
...
@@ -75,6 +88,7 @@
<div
class=
"add-user-pop"
v-if=
"addGroupPop"
>
<div
class=
"card height-min"
>
<div
class=
"title"
>
添加分组
</div>
<div
class=
"close"
@
click=
"addGroupPop = false"
>
关闭
</div>
<div
class=
"search"
>
<el-input
v-model=
"addGrounpInput"
placeholder=
"添加分组"
class=
"input"
></el-input>
<el-button
type=
"primary"
class=
"btn"
@
click=
"addGroup"
>
添加
</el-button>
...
...
@@ -88,6 +102,17 @@ import * as api from '@/api/common.js'
export
default
{
data
()
{
return
{
options
:
[{
label
:
'搜索手机号'
,
value
:
'mobile'
},
{
label
:
'搜索邮箱'
,
value
:
'email'
},
{
label
:
'搜索用户名'
,
value
:
'username'
}],
value
:
'username'
,
input
:
''
,
groupData
:
{},
groupUset
:
{},
...
...
@@ -96,23 +121,34 @@ export default {
addGrounpInput
:
''
,
userListSearchInput
:
''
,
userList
:
{},
groupId
:
-
1
groupId
:
-
1
,
groupActive
:
-
1
}
},
mounted
()
{
this
.
getGroupList
()
this
.
getGroupList
(
{
page
:
1
,
limit
:
9
}
)
},
methods
:
{
getGroupList
()
{
changePage2
(
n
)
{
this
.
showDetail
(
this
.
groupId
,
this
.
groupActive
,
{
page
:
n
,
limit
:
9
})
},
changePage
(
n
)
{
this
.
getGroupList
({
page
:
n
,
limit
:
9
})
this
.
groupActive
=
-
1
this
.
groupId
=
-
1
this
.
groupUset
=
[]
},
getGroupList
(
page
)
{
api
.
getGroupList
()
.
getGroupList
(
page
)
.
then
(
response
=>
{
this
.
groupData
=
response
.
data
})
.
finally
(()
=>
{
})
},
showDetail
(
id
)
{
showDetail
(
id
,
index
,
page
=
{
page
:
1
,
limit
:
9
})
{
this
.
groupActive
=
index
let
isId
=
0
if
(
id
)
{
this
.
groupId
=
id
...
...
@@ -121,9 +157,9 @@ export default {
isId
=
this
.
groupId
}
api
.
getGroupDetail
(
isId
,
{
page
:
1
,
limit
:
10
}
)
.
getGroupDetail
(
isId
,
page
)
.
then
(
response
=>
{
this
.
groupUset
=
response
.
data
.
data
this
.
groupUset
=
response
.
data
})
.
finally
(()
=>
{
})
...
...
@@ -136,7 +172,7 @@ export default {
.
addGroup
({
name
:
this
.
addGrounpInput
})
.
then
(
response
=>
{
if
(
response
.
code
===
0
)
{
this
.
getGroupList
()
this
.
getGroupList
(
{
page
:
1
,
limit
:
9
}
)
this
.
addGrounpInput
=
''
this
.
addGroupPop
=
false
}
...
...
@@ -157,9 +193,11 @@ export default {
},
userListSearch
()
{
api
.
userListSearch
({
nickname
:
this
.
userListSearchInput
})
.
userListSearch
({
[
this
.
value
]
:
this
.
userListSearchInput
})
.
then
(
response
=>
{
this
.
userList
=
response
.
data
if
(
response
.
code
===
0
)
{
this
.
userList
=
response
.
data
}
})
.
finally
(()
=>
{
})
...
...
@@ -253,6 +291,18 @@ export default {
.icon-del
{
font-size
:
16px
;
}
&
.active
{
.icon
{
width
:
14px
;
height
:
14px
;
background
:
url(https://zws-imgs-pub.ezijing.com/static/public/e1449dcafdae05c909db49fd5168cab1.png)
;
background-size
:
100%
100%
;
}
.text
{
color
:
#222
;
font-weight
:
bold
;
}
}
&
:hover
{
.icon
{
width
:
14px
;
...
...
@@ -345,6 +395,14 @@ export default {
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,.
3
);
.close
{
position
:
absolute
;
top
:
25px
;
right
:
20px
;
color
:
#428AFF
;
font-size
:
14px
;
cursor
:
pointer
;
}
.card
{
padding
:
0
20px
;
box-sizing
:
border-box
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论