Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-custom
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 b773cd75
authored
Jan 10, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交 一客一群
1 parent
94031874
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1106 additions
and
238 deletions
package.json
src/App.vue
src/api/modules/groupGuest.js
src/assets/empty.png
src/config/index.js
src/main.js
src/utils/util.js
src/views/guestGroup/add.vue
src/views/guestGroup/components/selectFollow.vue
src/views/guestGroup/components/selectMember.vue
src/views/guestGroup/components/selectMembers.vue
src/views/guestGroup/detail.vue
src/views/guestGroup/index.vue
package.json
View file @
b773cd7
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
"dependencies"
:
{
"dependencies"
:
{
"axios"
:
"^0.21.1"
,
"axios"
:
"^0.21.1"
,
"core-js"
:
"^3.4.4"
,
"core-js"
:
"^3.4.4"
,
"dayjs"
:
"^1.10.7"
,
"echarts"
:
"^5.2.0"
,
"echarts"
:
"^5.2.0"
,
"element-ui"
:
"^2.4.5"
,
"element-ui"
:
"^2.4.5"
,
"glsx-common"
:
"^1.4.6"
,
"glsx-common"
:
"^1.4.6"
,
...
@@ -46,4 +47,4 @@
...
@@ -46,4 +47,4 @@
"> 1%"
,
"> 1%"
,
"last 2 versions"
"last 2 versions"
]
]
}
}
\ No newline at end of file
\ No newline at end of file
src/App.vue
View file @
b773cd7
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
</div>
</div>
<img
src=
"./assets/logo.png"
alt=
""
srcset=
""
/>
<img
src=
"./assets/logo.png"
alt=
""
srcset=
""
/>
</div>
-->
</div>
-->
<keep-alive
exclude=
"clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd"
>
<keep-alive
exclude=
"clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd
,guestGroupDetail
"
>
<router-view></router-view>
<router-view></router-view>
</keep-alive>
</keep-alive>
</div>
</div>
...
...
src/api/modules/groupGuest.js
View file @
b773cd7
...
@@ -10,6 +10,7 @@ import { http } from '@/main'
...
@@ -10,6 +10,7 @@ import { http } from '@/main'
const
URL
=
'/rop-scrm-entmicro/router'
const
URL
=
'/rop-scrm-entmicro/router'
const
PATH
=
'entmicro.api.one.template.'
const
PATH
=
'entmicro.api.one.template.'
const
WURL
=
'/rop-scrm-wechat/router'
const
WURL
=
'/rop-scrm-wechat/router'
const
PATH2
=
'entmicro.api.group.'
const
templateList
=
params
=>
{
const
templateList
=
params
=>
{
params
.
method
=
`
${
PATH
}
page`
params
.
method
=
`
${
PATH
}
page`
...
@@ -102,7 +103,17 @@ const getStatus = params => {
...
@@ -102,7 +103,17 @@ const getStatus = params => {
}
}
//一客一群详情页
//一客一群详情页
const
getListApi
=
params
=>
{
const
getListApi
=
params
=>
{
params
.
method
=
`
${
PATH
}
page`
params
.
method
=
`
${
PATH
}
detail`
return
http
({
url
:
URL
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
const
customerList
=
params
=>
{
params
.
method
=
`
${
PATH2
}
template.customer.page`
return
http
({
return
http
({
url
:
URL
,
url
:
URL
,
method
:
'GET'
,
method
:
'GET'
,
...
@@ -111,6 +122,15 @@ const getListApi = params => {
...
@@ -111,6 +122,15 @@ const getListApi = params => {
})
})
}
}
const
getFollower
=
params
=>
{
params
.
method
=
'entmicro.api.staff.listFollowerStaffByPage'
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
export
default
{
templateList
,
templateList
,
...
@@ -122,5 +142,7 @@ export default {
...
@@ -122,5 +142,7 @@ export default {
nameVaild
,
nameVaild
,
getStatus
,
getStatus
,
updateNameVaild
,
updateNameVaild
,
getListApi
getListApi
,
customerList
,
getFollower
}
}
src/assets/empty.png
0 → 100644
View file @
b773cd7
1.45 KB
src/config/index.js
View file @
b773cd7
...
@@ -12,11 +12,11 @@ let cfg = require('./conf.js')
...
@@ -12,11 +12,11 @@ let cfg = require('./conf.js')
import
{
Http
}
from
'glsx-common'
import
{
Http
}
from
'glsx-common'
let
timeout
=
30000
//超时时间
let
timeout
=
30000
//超时时间
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
//
if (isEnv) {
if
(
isEnv
)
{
//
let { request } = cfg
let
{
request
}
=
cfg
//
Object.assign(request, { timeout })
Object
.
assign
(
request
,
{
timeout
})
//
return Promise.resolve(cfg)
return
Promise
.
resolve
(
cfg
)
//
}
}
// https://oss-config.test.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base
// https://oss-config.test.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base
// https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config
// https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config
return
new
Http
({
request
:{
timeout
:
3000
}}).
get
(
'https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config'
)
return
new
Http
({
request
:{
timeout
:
3000
}}).
get
(
'https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config'
)
...
...
src/main.js
View file @
b773cd7
...
@@ -29,6 +29,7 @@ Vue.config.productionTip = false
...
@@ -29,6 +29,7 @@ Vue.config.productionTip = false
Vue
.
prototype
.
$apis
=
apis
Vue
.
prototype
.
$apis
=
apis
Vue
.
use
(
glsxTable
);
Vue
.
use
(
glsxTable
);
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
size
=
'small'
// Vue.prototype.btn_size = 'mini'
// Vue.prototype.btn_size = 'mini'
Vue
.
prototype
.
$Constants
=
Constants
Vue
.
prototype
.
$Constants
=
Constants
Vue
.
prototype
.
$Utils
=
Util
Vue
.
prototype
.
$Utils
=
Util
...
...
src/utils/util.js
0 → 100644
View file @
b773cd7
import
{
Message
}
from
'element-ui'
let
util
=
{}
util
.
cloneText
=
function
(
message
)
{
let
input
=
document
.
createElement
(
'input'
)
input
.
value
=
message
document
.
body
.
appendChild
(
input
)
input
.
select
()
input
.
setSelectionRange
(
0
,
input
.
value
.
length
),
document
.
execCommand
(
'Copy'
)
document
.
body
.
removeChild
(
input
)
Message
.
success
(
'复制成功'
)
}
util
.
getBeforeDate
=
function
(
sign
=
'-'
)
{
let
day
=
new
Date
();
let
month
=
day
.
getMonth
()
+
1
;
let
date
=
day
.
getDate
();
if
(
month
<
10
)
month
=
'0'
+
month
;
if
(
date
<
10
)
date
=
'0'
+
date
;
var
s
=
day
.
getFullYear
()
+
sign
+
month
+
sign
+
date
;
return
s
;
}
util
.
getBeforeMonth
=
function
(
days
)
{
let
month
=
new
Date
().
getMonth
()
+
1
;
let
year
=
new
Date
().
getFullYear
();
let
arr
=
new
Array
();
for
(
let
i
=
0
;
i
<
days
;
i
++
)
{
if
(
month
<=
0
)
{
year
=
year
-
1
;
month
=
month
+
12
;
}
if
(
month
<
10
)
month
=
'0'
+
month
;
arr
[
i
]
=
year
+
'年'
+
month
+
'月'
month
--
}
return
arr
;
}
/**
* 格式化时间
* @param {Array} time
*/
util
.
formatTime
=
function
(
time
)
{
return
{
startTime
:
time
?
time
[
0
]
+
' '
+
'00:00:00'
:
''
,
endTime
:
time
?
time
[
1
]
+
' '
+
'23:59:59'
:
''
}
}
util
.
tringToDate
=
function
(
dateStr
,
separator
)
{
if
(
!
separator
)
{
separator
=
"-"
;
}
var
dateArr
=
dateStr
.
split
(
separator
);
var
year
=
parseInt
(
dateArr
[
0
]);
var
month
;
//处理月份为04这样的情况
if
(
dateArr
[
1
].
indexOf
(
"0"
)
==
0
)
{
month
=
parseInt
(
dateArr
[
1
].
substring
(
1
));
}
else
{
month
=
parseInt
(
dateArr
[
1
]);
}
var
day
=
parseInt
(
dateArr
[
2
]);
var
date
=
new
Date
(
year
,
month
-
1
,
day
);
return
date
;
}
util
.
getDay
=
function
(
num
,
str
=
'-'
)
{
var
today
=
new
Date
();
var
nowTime
=
today
.
getTime
();
var
ms
=
24
*
3600
*
1000
*
num
;
today
.
setTime
(
parseInt
(
nowTime
+
ms
));
var
oYear
=
today
.
getFullYear
();
var
oMoth
=
(
today
.
getMonth
()
+
1
).
toString
();
if
(
oMoth
.
length
<=
1
)
oMoth
=
'0'
+
oMoth
;
var
oDay
=
today
.
getDate
().
toString
();
if
(
oDay
.
length
<=
1
)
oDay
=
'0'
+
oDay
;
return
oYear
+
str
+
oMoth
+
str
+
oDay
;
}
util
.
openUrl
=
function
(
url
)
{
const
link
=
document
.
createElement
(
'a'
)
link
.
href
=
url
link
.
target
=
'_blank'
link
.
rel
=
'opener'
link
.
click
()
}
util
.
downloadIamge
=
function
(
imgsrc
,
name
=
new
Date
().
getTime
())
{
//下载图片地址和图片名
var
image
=
new
Image
();
// 解决跨域 Canvas 污染问题
image
.
setAttribute
(
"crossOrigin"
,
"anonymous"
);
image
.
onload
=
function
()
{
var
canvas
=
document
.
createElement
(
"canvas"
);
canvas
.
width
=
image
.
width
;
canvas
.
height
=
image
.
height
;
var
context
=
canvas
.
getContext
(
"2d"
);
context
.
drawImage
(
image
,
0
,
0
,
image
.
width
,
image
.
height
);
var
url
=
canvas
.
toDataURL
(
"image/png"
);
//得到图片的base64编码数据
var
a
=
document
.
createElement
(
"a"
);
// 生成一个a元素
var
event
=
new
MouseEvent
(
"click"
);
// 创建一个单击事件
a
.
download
=
name
||
"photo"
;
// 设置图片名称
a
.
href
=
url
;
// 将生成的URL设置为a.href属性
a
.
dispatchEvent
(
event
);
// 触发a的单击事件
};
image
.
src
=
imgsrc
;
}
export
default
util
\ No newline at end of file
\ No newline at end of file
src/views/guestGroup/add.vue
View file @
b773cd7
...
@@ -11,19 +11,59 @@
...
@@ -11,19 +11,59 @@
<span>
企业主体信息需要认证,才可使用该功能。
</span>
<span>
企业主体信息需要认证,才可使用该功能。
</span>
</div>
</div>
<el-form
:model=
"basicForm"
:rules=
"basicRules"
ref=
"basicForm"
label-width=
"124px"
>
<el-form
:model=
"basicForm"
:rules=
"basicRules"
ref=
"basicForm"
label-width=
"124px"
>
<el-form-item
label=
"自定义群名"
prop=
"orgName"
>
<el-form-item
label=
"自定义群名"
prop=
"groupName"
>
<el-input
v-model=
"basicForm.groupName"
size=
"small"
placeholder=
"为群聊设个自定义组名,如“VIP服务群”"
maxlength=
"10"
></el-input>
<el-input
v-model=
"basicForm.groupName"
size=
"small"
placeholder=
"为群聊设个自定义组名,如“VIP服务群”"
maxlength=
"10"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"群聊命名规则"
prop=
"rule"
>
<el-form-item
label=
"群聊命名规则"
prop=
"groupNameRule"
>
<el-radio-group
v-model=
"basicForm.rule"
>
<el-radio-group
<template
v-if=
"(rule, index) in nameRules"
>
v-model=
"basicForm.groupNameRule"
<el-radio
:label=
"rule.id"
:key=
"index"
>
{{
rule
.
rule
}}
</el-radio>
style=
"line-height: 40px; font-size: 14px; max-width: 600px;"
</
template
>
>
<el-radio
v-for=
"(rule, index) in nameRules"
:label=
"rule.id"
:key=
"index"
>
{{
rule
.
rule
}}
<span
class=
"rule-tips"
>
{{
rule
.
tips
}}
</span></el-radio>
</el-radio-group>
</el-radio-group>
<
div
class=
"form-tips"
>
群聊名称后缀将以日期及序号进行累加,如“新车售后一组211011-1群”
</div
>
<
!--
<div
class=
"form-tips"
>
群聊名称后缀将以日期及序号进行累加,如“新车售后一组211011-1群”
</div>
--
>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"userList"
>
<el-form-item
prop=
"followList"
>
<label
slot=
"label"
class=
"required"
>
默认成员
</label>
<label
slot=
"label"
class=
"required"
>
跟进专员
</label>
<el-button
size=
"small"
@
click=
"openFollow"
>
<i
class=
"el-icon-plus"
></i>
选择跟进专员
</el-button>
<span
class=
"label-text"
>
已选择
<span>
{{
basicForm
.
followList
?
basicForm
.
followList
.
length
:
0
}}
</span>
人
</span>
<div
:key=
"key"
class=
"sale-select"
v-show=
"basicForm.followList.length"
>
<div
class=
"el-input-tag input-tag-wrapper"
>
<div
style=
"max-height: 64px"
>
<el-tag
v-for=
"(tag, idx) in basicForm.followList"
:key=
"idx"
type=
"info"
closable
:disable-transitions=
"false"
@
close=
"removeFollow(idx)"
>
<i
class=
"el-icon-user-solid"
></i>
{{
tag
.
staffName
}}
</el-tag>
</div>
</div>
</div>
<!--
<div
class=
"form-tips"
>
必须配置至少1个跟进专员
</div>
-->
</el-form-item>
<el-form-item>
<label
slot=
"label"
>
默认成员
</label>
<el-button
size=
"small"
@
click=
"openMembers"
>
<el-button
size=
"small"
@
click=
"openMembers"
>
<i
class=
"el-icon-plus"
></i>
<i
class=
"el-icon-plus"
></i>
选择成员
选择成员
...
@@ -33,17 +73,24 @@
...
@@ -33,17 +73,24 @@
<span>
{{
basicForm
.
userList
?
basicForm
.
userList
.
length
:
0
}}
</span>
<span>
{{
basicForm
.
userList
?
basicForm
.
userList
.
length
:
0
}}
</span>
人
人
</span>
</span>
<div
:key=
"key"
class=
"sale-select"
v-show=
"basicForm.userList"
>
<div
:key=
"key"
class=
"sale-select"
v-show=
"basicForm.userList
.length
"
>
<div
class=
"el-input-tag input-tag-wrapper"
>
<div
class=
"el-input-tag input-tag-wrapper"
>
<div
style=
"max-height: 64px"
>
<div
style=
"max-height: 64px"
>
<el-tag
v-for=
"(tag, idx) in basicForm.userList"
:key=
"idx"
type=
"info"
closable
:disable-transitions=
"false"
@
close=
"remove(tag, idx)"
>
<el-tag
v-for=
"(tag, idx) in basicForm.userList"
:key=
"idx"
type=
"info"
closable
:disable-transitions=
"false"
@
close=
"remove(tag, idx)"
>
<i
class=
"el-icon-user-solid"
></i>
<i
class=
"el-icon-user-solid"
></i>
{{
tag
.
staffName
}}
{{
tag
.
staffName
}}
</el-tag>
</el-tag>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"form-tips"
>
必须配置2个及以上成员
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<!-- 编辑入群欢迎语 -->
<!-- 编辑入群欢迎语 -->
...
@@ -72,102 +119,122 @@
...
@@ -72,102 +119,122 @@
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
确定
</el-button>
<el-button
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
@
click=
"handleCancel"
>
取消
</el-button>
</div>
</div>
<basic-dialog
:title=
"'选择成员'"
:width=
"'712px'"
:isVisible=
"membersVisible"
@
confirmDialog=
"handleConfirm"
@
closeDialog=
"handleClose"
>
<basic-dialog
<SelectMembers
v-if=
"membersVisible"
:key=
"key"
:selectData
.
sync=
"selectData"
ref=
"membersForm"
></SelectMembers>
:title=
"'选择成员'"
</basic-dialog>
:width=
"'1142px'"
:isVisible=
"membersVisible"
@
confirmDialog=
"handleConfirm"
@
closeDialog=
"membersVisible = !membersVisible"
>
<!--
<SelectMembers
islord=
"false"
:selectData=
"selectData"
ref=
"membersForm"
></SelectMembers>
-->
<SelectMember
ref=
"membersForm"
v-if=
"membersVisible"
:selectData=
"selectData"
></SelectMember>
</basic-dialog>
<!--
<SelectMember
ref=
"membersForm"
></SelectMember>
-->
<select-follow
@
selectTable=
"selectTable"
ref=
"selectEmpForm"
></select-follow>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Vue
from
'vue'
import
Vue
from
'vue'
// import WelcomeWords from './components/welcomeWords.vue'
// import WelcomeWords from './components/welcomeWords.vue'
import
SelectMembers
from
'./components/selectMembers.vue'
import
SelectMember
from
'./components/selectMember.vue'
import
SelectFollow
from
'./components/selectFollow.vue'
// import Preview from './components/preview.vue'
// import Preview from './components/preview.vue'
export
default
{
export
default
{
name
:
'guestGroupAdd'
,
name
:
'guestGroupAdd'
,
components
:
{
components
:
{
// WelcomeWords,
// WelcomeWords,
SelectMembers
SelectMember
,
SelectFollow
// Preview
// Preview
},
},
data
()
{
data
()
{
const
validatorUser
=
(
rule
,
value
,
callback
)
=>
{
const
validatorUser
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
this
.
$route
.
params
.
id
)
{
console
.
log
(
this
.
basicForm
.
userList
)
if
(
this
.
$refs
.
membersForm
)
this
.
basicForm
.
userList
=
this
.
$refs
.
membersForm
.
innerTags
const
followList
=
this
.
basicForm
.
followList
if
(
this
.
basicForm
.
userList
)
{
let
userList
=
[]
if
(
this
.
basicForm
.
userList
.
length
<
2
)
{
if
(
this
.
basicForm
.
userList
&&
this
.
basicForm
.
userList
.
length
)
{
callback
(
new
Error
(
'至少配置2个及以上成员'
))
userList
=
this
.
basicForm
.
followList
.
concat
(
this
.
basicForm
.
userList
)
}
else
{
callback
()
}
}
else
{
}
else
{
callback
(
new
Error
(
'请选择默认成员'
))
userList
=
this
.
basicForm
.
followList
}
}
}
else
{
console
.
log
(
userList
)
if
(
value
)
{
if
(
!
this
.
basicForm
.
followList
.
length
)
{
if
(
value
.
length
<
2
)
{
callback
(
new
Error
(
'请选择跟进专员'
))
callback
(
new
Error
(
'至少配置2个及以上成员'
))
}
else
{
callback
()
}
}
else
{
}
else
{
callback
(
new
Error
(
'请选择默认成员'
))
console
.
log
(
this
.
basicForm
.
followList
)
}
if
(
userList
.
length
<
2
)
{
}
this
.
$message
({
}
type
:
'error'
,
const
nameVaild
=
(
rule
,
value
,
callback
)
=>
{
message
:
'必须配置2个及以上成员'
console
.
log
(
this
.
$route
.
params
.
id
)
})
if
(
value
)
{
// callback(new Error('必须配置2个及以上成员'))
const
params
=
{
templateName
:
value
}
let
api
=
'nameVaild'
if
(
this
.
$route
.
params
.
id
)
{
params
.
id
=
this
.
$route
.
params
.
id
api
=
'updateNameVaild'
}
this
.
$apis
.
groupGuest
[
api
](
params
).
then
(
res
=>
{
if
(
res
)
{
callback
(
new
Error
(
'群聊名称不可重复'
))
}
else
{
}
else
{
callback
()
callback
()
}
}
})
}
}
}
}
// const nameVaild = (rule, value, callback) => {
// console.log(this.$route.params.id)
// if (value) {
// const params = {
// templateName: value
// }
// let api = 'nameVaild'
// if (this.$route.params.id) {
// params.id = this.$route.params.id
// api = 'updateNameVaild'
// }
// this.$apis.groupGuest[api](params).then(res => {
// if (res) {
// callback(new Error('群聊名称不可重复'))
// } else {
// callback()
// }
// })
// }
// }
return
{
return
{
eventBus
:
new
Vue
(),
eventBus
:
new
Vue
(),
basicForm
:
{},
basicForm
:
{
followList
:
[],
userList
:
[],
groupNameRule
:
1
},
nameRules
:
[
nameRules
:
[
{
{
rule
:
'自定义群名'
,
rule
:
'车系+客户昵称+自定义群名'
,
tips
:
'(车系/客户昵称自动填充,例:“奥迪A6Carr_VIP服务群”)'
,
id
:
1
id
:
1
},
},
{
{
rule
:
'车系+客户昵称+自定义群名 (车系/客户昵称自动填充,例:“奥迪A6Carr_VIP服务群”)'
,
rule
:
'车系+车牌号+自定义群名'
,
tips
:
'(车系/客户昵称自动填充,例:“日产轩逸粤B·1V566_VIP服务群”)'
,
id
:
2
id
:
2
},
},
{
{
rule
:
'
车系+车牌号+自定义群名 (车系/客户昵称自动填充,例:“日产轩逸粤B·1V566_VIP服务群”)
'
,
rule
:
'
自定义群名
'
,
id
:
3
id
:
0
}
}
,
],
],
basicRules
:
{
basicRules
:
{
orgName
:
[{
required
:
true
,
message
:
'请输入组名'
,
trigger
:
'change'
}],
groupName
:
[
groupName
:
[
{
required
:
true
,
message
:
'请输入群聊名称'
,
trigger
:
'change'
}
,
{
required
:
true
,
message
:
'请输入群聊名称'
,
trigger
:
'change'
}
{
validator
:
nameVaild
,
trigger
:
'blur'
}
//
{ validator: nameVaild, trigger: 'blur' }
],
],
userList
:
[
groupNameRule
:
[{
required
:
true
,
message
:
'请选择群聊命名规则'
,
trigger
:
'change'
}],
followList
:
[
// { required: true, message: '请选择默认成员', trigger: 'change' },
// { required: true, message: '请选择默认成员', trigger: 'change' },
{
validator
:
validatorUser
,
trigger
:
'
blur
'
}
{
validator
:
validatorUser
,
trigger
:
'
change
'
}
]
]
},
},
membersVisible
:
false
,
membersVisible
:
false
,
key
:
new
Date
(),
key
:
new
Date
(),
previewFlag
:
false
,
previewFlag
:
false
,
selectData
:
[],
selectData
:
[],
editStatus
:
false
editStatus
:
false
,
// 跟进专员
followVisible
:
false
}
}
},
},
watch
:
{
watch
:
{
...
@@ -176,7 +243,14 @@ export default {
...
@@ -176,7 +243,14 @@ export default {
this
.
editStatus
=
true
this
.
editStatus
=
true
},
},
deep
:
true
deep
:
true
}
},
// membersVisible(val) {
// console.log(val)
// if (!val) {
// this.$refs.membersForm.resetSearch()
// }
// }
},
},
mounted
()
{
mounted
()
{
if
(
this
.
$route
.
params
)
{
if
(
this
.
$route
.
params
)
{
...
@@ -191,57 +265,59 @@ export default {
...
@@ -191,57 +265,59 @@ export default {
methods
:
{
methods
:
{
openMembers
()
{
openMembers
()
{
this
.
membersVisible
=
!
this
.
membersVisible
this
.
membersVisible
=
!
this
.
membersVisible
// if (this.membersVisible && this.$route.params.id) {
},
// this.$nextTick(() => {
openFollow
()
{
// this.key = new Date()
console
.
log
(
this
.
basicForm
.
followList
)
// console.log(this.$refs.membersForm)
this
.
$refs
.
selectEmpForm
.
init
(
this
.
basicForm
.
followList
)
// this.$refs.membersForm.selectTable(this.basicForm.userList)
// if (this.basicForm.userList && this.basicForm.userList.length != 0) {
// this.basicForm.userList.map(item => {
// if (item.masterStatus == 1) {
// this.selectData = this.basicForm.userList
// }
// })
// }
// })
// }
},
},
handleSubmit
()
{
handleSubmit
()
{
// const previewList = this.$refs.welcome.previewList
console
.
log
(
this
.
basicForm
)
this
.
$refs
.
basicForm
.
validate
(
valid
=>
{
this
.
$refs
.
basicForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
const
params
=
{
const
params
=
{
// attachmentList: this.$refs.welcome.previewList,
groupName
:
this
.
basicForm
.
groupName
,
orgName
:
this
.
basicForm
.
orgName
,
groupNameRule
:
this
.
basicForm
.
groupNameRule
groupName
:
this
.
basicForm
.
groupName
}
const
followList
=
this
.
basicForm
.
followList
.
map
(
item
=>
{
return
{
staffId
:
item
.
staffId
,
staffName
:
item
.
staffName
,
follow
:
1
}
}
// if (this.$refs.welcome.previewList) params.attachmentList = this.$refs.welcome.previewList
})
params
.
userList
=
this
.
basicForm
.
userList
.
map
(
item
=>
{
let
memberList
=
[]
if
(
this
.
basicForm
.
userList
&&
this
.
basicForm
.
userList
.
map
.
length
)
{
memberList
=
this
.
basicForm
.
userList
.
map
(
i
=>
{
return
{
return
{
staffId
:
item
.
staffId
staffId
:
i
.
staffId
,
staffName
:
i
.
staffName
,
follow
:
0
}
}
})
})
let
apiName
=
'insert'
}
if
(
this
.
basicForm
.
id
)
{
params
.
userList
=
followList
.
concat
(
memberList
)
apiName
=
'update'
let
apiName
=
'insert'
params
.
id
=
this
.
basicForm
.
id
if
(
this
.
basicForm
.
id
)
{
}
apiName
=
'update'
this
.
$apis
.
groupGuest
[
apiName
](
params
)
params
.
id
=
this
.
basicForm
.
id
.
then
(
res
=>
{
}
if
(
res
)
{
console
.
log
(
params
)
this
.
$message
({
this
.
$apis
.
groupGuest
[
apiName
](
params
)
type
:
'success'
,
.
then
(
res
=>
{
message
:
'操作成功!'
if
(
res
)
{
})
this
.
$router
.
push
(
'/guestGroup/index'
)
}
})
.
catch
(
err
=>
{
this
.
$message
({
this
.
$message
({
type
:
'
error
'
,
type
:
'
success
'
,
message
:
err
.
message
message
:
'操作成功!'
})
})
this
.
$router
.
push
(
'/guestGroup/index'
)
}
})
.
catch
(
err
=>
{
this
.
$message
({
type
:
'error'
,
message
:
err
.
message
})
})
})
}
}
})
})
},
},
...
@@ -249,15 +325,18 @@ export default {
...
@@ -249,15 +325,18 @@ export default {
this
.
$apis
.
groupGuest
.
detail
({
id
}).
then
(
res
=>
{
this
.
$apis
.
groupGuest
.
detail
({
id
}).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
basicForm
=
{
this
.
basicForm
=
{
orgName
:
res
.
orgName
,
groupName
:
res
.
groupName
,
groupName
:
res
.
groupName
,
id
:
res
.
id
,
id
:
res
.
id
,
merchantId
:
1
,
groupNameRule
:
res
.
groupNameRule
userList
:
res
.
userList
// userList: res.userList
// attachmentList: res.attachmentList
}
if
(
res
.
userList
&&
res
.
userList
.
length
)
{
this
.
selectData
=
res
.
userList
.
filter
(
item
=>
item
.
follow
==
0
)
this
.
basicForm
.
userList
=
this
.
selectData
this
.
basicForm
.
followList
=
res
.
userList
.
filter
(
item
=>
item
.
follow
==
1
)
}
}
// this.$refs.welcome.updateList(res.attachmentList
)
console
.
log
(
this
.
basicForm
)
this
.
selectData
=
res
.
userList
//
this.selectData = res.userList
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
this
.
editStatus
=
false
})
})
...
@@ -265,8 +344,6 @@ export default {
...
@@ -265,8 +344,6 @@ export default {
})
})
},
},
handleCancel
()
{
handleCancel
()
{
// this.$router.go(-1)
// this.$router.push({ path: '/guestGroup/index' })
if
(
this
.
editStatus
)
{
if
(
this
.
editStatus
)
{
this
.
$confirm
(
'当前有内容信息未保存,是否继续返回?'
,
'提示'
,
{
this
.
$confirm
(
'当前有内容信息未保存,是否继续返回?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
@@ -295,43 +372,23 @@ export default {
...
@@ -295,43 +372,23 @@ export default {
},
},
// 成员弹窗
// 成员弹窗
handleConfirm
()
{
handleConfirm
()
{
if
(
this
.
$refs
.
membersForm
.
innerTags
.
length
==
0
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请选择成员'
})
}
else
if
(
this
.
$refs
.
membersForm
.
innerTags
.
length
==
1
)
{
this
.
$message
({
type
:
'error'
,
message
:
'必须配置两个及以上成员'
})
}
else
{
// this.$refs.membersForm.resetSearch()
this
.
basicForm
.
userList
=
this
.
$refs
.
membersForm
.
innerTags
this
.
basicForm
.
userList
=
this
.
$refs
.
membersForm
.
innerTags
this
.
selectData
=
this
.
basicForm
.
userList
this
.
selectData
=
this
.
basicForm
.
userList
this
.
openMembers
()
this
.
openMembers
()
}
},
},
handleClose
()
{
handleClose
()
{
// this.openMembers()
// this.$refs.membersForm.resetSearch()
this
.
membersVisible
=
false
this
.
membersVisible
=
false
// if (this.$route.params.id) {
},
// this.$nextTick(() => {
selectTable
(
item
)
{
// this.$refs.membersForm.selectTable(this.basicForm.userList)
this
.
basicForm
.
followList
=
item
.
map
(
item
=>
{
// if (this.basicForm.userList && this.basicForm.userList.length != 0) {
return
{
// this.basicForm.userList.map(item => {
staffId
:
item
.
id
,
// if (item.masterStatus) {
staffName
:
item
.
staffName
// this.basicForm.group = item
}
// this.$refs.membersForm.group = item
})
// this.selectData = this.basicForm.userList
},
// }
removeFollow
(
idx
)
{
// })
this
.
basicForm
.
followList
.
splice
(
idx
,
1
)
// }
// })
// } else {
// this.selectData = []
// }
}
}
}
}
}
}
...
@@ -499,4 +556,13 @@ export default {
...
@@ -499,4 +556,13 @@ export default {
margin-right
:
8px
;
margin-right
:
8px
;
}
}
}
}
.rule-tips
{
font-size
:
14px
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
14px
;
}
.required
:before
{
margin-right
:
5px
;
}
</
style
>
</
style
>
src/views/guestGroup/components/selectFollow.vue
0 → 100644
View file @
b773cd7
<
template
>
<div
class=
"square-main"
v-loading=
"loading"
>
<el-dialog
title=
"选择跟进专员"
:visible
.
sync=
"dialogVisible"
width=
"50%"
:before-close=
"handleClose"
>
<el-form
:inline=
"true"
:model=
"tableSearchForm"
>
<el-form-item
size=
"small"
label=
"员工"
>
<el-input
v-model=
"tableSearchForm.staffName"
placeholder=
"请输入员工姓名"
></el-input>
</el-form-item>
<el-form-item
size=
"small"
>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</el-form-item>
</el-form>
<div
class=
"table-box"
>
<GLTable
v-if=
"dialogVisible"
ref=
"table"
:layout=
"layout"
:tableData=
"tableData"
:hasNum=
"false"
:tableTotal=
"tableTotal"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
@
refreshTable=
"handleSearch"
@
selectionTable=
"selectionTable"
@
row-click=
"rowClick"
></GLTable>
<div
class=
"form-tips"
>
必须配置至少1个跟进专员
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<a
class=
"dialog-jump"
@
click=
"jumpUrl"
>
新增专员
</a>
<el-button
size=
"small"
@
click=
"handleCancel"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click
.
native=
"handleSelect"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
utils
}
from
'glsx-common'
import
util
from
'@/utils/util'
export
default
{
name
:
'SelectFollow'
,
data
()
{
return
{
loading
:
false
,
dialogVisible
:
false
,
tableSearchForm
:
{},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
tableParams
:
{
listName
:
'data'
,
tableOption
:
false
,
// 行数据的key
mutiSelectUniqueKey
:
'id'
,
// 多选ref的名称
mutiSelectName
:
'salelist'
,
tableColumns
:
[
{
label
:
'姓名'
,
prop
:
'staffName'
},
{
label
:
'部门'
,
prop
:
'departmentName'
},
{
label
:
'跟进专员类型'
,
prop
:
'followerTypeName'
}
]
},
layout
:
''
,
tableData
:
[],
tableTotal
:
0
,
selectItem
:
[],
selectEmp
:
[]
}
},
methods
:
{
jumpUrl
()
{
util
.
openUrl
(
location
.
origin
+
'/home/followUp/index'
)
},
getFollower
()
{
var
params
=
{
...
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableSearchForm
)),
pageSize
:
this
.
$refs
.
table
.
page
.
pageSize
,
pageNum
:
this
.
$refs
.
table
.
page
.
pageNum
}
this
.
$apis
.
groupGuest
.
getFollower
(
params
).
then
(
res
=>
{
this
.
tableData
=
res
.
data
this
.
tableTotal
=
res
.
count
if
(
res
.
count
>
10
)
{
this
.
layout
=
'pager'
}
this
.
tableData
.
forEach
(
item
=>
{
this
.
selectEmp
.
forEach
((
itm
,
index
)
=>
{
if
(
itm
.
staffId
==
item
.
relationId
)
{
this
.
$refs
.
table
.
$refs
.
salelistMutiTable
.
toggleRowSelection
(
item
)
this
.
selectEmp
.
splice
(
index
,
1
)
}
})
})
})
},
init
(
item
)
{
this
.
tableSearchForm
=
{}
this
.
selectEmp
=
JSON
.
parse
(
JSON
.
stringify
(
item
))
this
.
dialogVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
table
.
page
.
pageNum
=
1
this
.
getFollower
()
})
},
handleSearch
()
{
this
.
getFollower
()
},
selectionTable
(
val
)
{
this
.
selectItem
=
val
},
handleClose
()
{
this
.
handleCancel
()
},
rowClick
(
row
)
{
this
.
$refs
.
table
.
$refs
.
salelistMutiTable
.
toggleRowSelection
(
row
)
},
handleCancel
:
utils
.
debounce
(
function
()
{
this
.
dialogVisible
=
false
this
.
$refs
.
table
.
$refs
.
salelistMutiTable
.
clearSelection
()
},
300
),
handleSelect
:
utils
.
debounce
(
function
()
{
this
.
loading
=
true
let
selectEmp
=
this
.
selectEmp
.
map
(
item
=>
{
return
{
relationId
:
item
.
staffId
,
staffName
:
item
.
staffName
}
})
const
selectItem
=
this
.
selectItem
.
concat
(
selectEmp
)
if
(
selectItem
.
length
==
0
)
{
this
.
$message
.
error
(
'请选择员工'
)
return
}
this
.
loading
=
false
this
.
dialogVisible
=
false
this
.
$emit
(
'selectTable'
,
this
.
selectItem
.
concat
(
selectEmp
))
this
.
$refs
.
table
.
$refs
.
salelistMutiTable
.
clearSelection
()
},
300
)
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.dialog-jump
{
color
:
#5850FF
;
float
:
left
;
line-height
:
24px
;
text-decoration
:
underline
;
cursor
:
pointer
;
}
.square-main
{
/deep/
{
.el-table
{
height
:
40vh
;
overflow-y
:
auto
;
}
.el-table
::before
{
left
:
0
;
bottom
:
0
;
width
:
100%
;
height
:
0px
;
}
}
}
.form-tips
{
position
:
absolute
;
bottom
:
0
;
right
:
0
;
font-size
:
12px
;
color
:
#999
;
line-height
:
32px
;
}
.table-box
{
position
:
relative
;
}
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/guestGroup/components/selectMember.vue
0 → 100644
View file @
b773cd7
<
template
>
<div
class=
"member-wrapper"
>
<div
class=
"member-left"
>
<div
class=
"member-title"
>
预选
<span>
仅筛选有外部客户联系人的成员
</span>
</div>
<div
class=
"member-content"
>
<el-form
:inline=
"true"
class=
"member-form"
:model=
"searchForm"
@
submit
.
native
.
prevent
>
<el-form-item
label=
"所在门店/部门"
style=
"margin-bottom: 0;"
>
<el-popover
ref=
"popover"
placement=
"bottom"
width=
"215"
trigger=
"click"
v-model=
"popoverVisible"
@
show=
"onShowPopover"
@
hide=
"onHidePopover"
>
<el-tree
class=
"select-tree"
:data=
"treeData"
:props=
"defaultProps"
default-expand-all
@
node-click=
"handleNodeClick"
></el-tree>
<el-input
v-model=
"searchForm.department"
slot=
"reference"
:size=
"size"
readonly
placeholder=
"请选择所在门店/部门"
:class=
"
{ 'rotate': popoverVisible }"
suffix-icon="el-icon-arrow-down"
@keyup.enter.native="search"
>
</el-input>
</el-popover>
</el-form-item>
<el-form-item
label=
"姓名"
style=
"margin-bottom: 0;"
>
<el-input
:size=
"size"
v-model
.
trim=
"searchForm.name"
@
keyup
.
enter
.
native=
"search"
clearable
placeholder=
"请输入姓名搜索"
></el-input>
</el-form-item>
<!--
<el-form-item>
<el-checkbox
v-model=
"searchForm.checked"
>
仅看跟进专员
</el-checkbox>
</el-form-item>
-->
<el-form-item
style=
"margin-bottom: 0;"
>
<el-button
type=
"primary"
:size=
"size"
@
click=
"search"
>
查询
</el-button>
</el-form-item>
</el-form>
<div
class=
"table-content"
>
<GLTable
v-loading=
"loading"
ref=
"empTable"
:tableData=
"tableEmpData"
:tableParams=
"tableParams"
:hasNum=
"false"
:hasPage=
"false"
:noDataImg=
"url"
@
selectionTable=
"selectionTable"
@
row-click=
"rowClick"
>
<div
slot=
"staffName"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
staffName
}}
</span>
<span
class=
"staff-title"
v-show=
"scope.scope.staffTitle"
>
{{
scope
.
scope
.
staffTitle
}}
</span>
</div>
</GLTable>
</div>
</div>
<!--
<div
class=
"member-checked"
>
<el-checkbox
v-model=
"searchForm.checked"
>
仅看跟进专员
</el-checkbox>
</div>
-->
</div>
<div
class=
"member-right"
>
<div
class=
"member-title"
>
已选
</div>
<div
class=
"member-name"
>
成员名称(
{{
innerTags
.
length
}}
项)
</div>
<div
class=
"input-tag-wrapper"
>
<div
class=
"tag-box"
>
<el-tag
v-for=
"(tag, idx) in innerTags"
:key=
"idx"
type=
"info"
closable
:disable-transitions=
"false"
@
close=
"remove(tag)"
>
<i
class=
"el-icon-user-solid"
></i>
{{
tag
.
staffName
}}
</el-tag>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
url
from
"@/assets/empty.png"
export
default
{
name
:
'SelectMember'
,
props
:
[
'selectData'
],
data
()
{
return
{
url
:
url
,
searchForm
:
{},
treeData
:
[],
defaultProps
:
{
children
:
'children'
,
label
:
'departmentName'
},
popoverVisible
:
false
,
loading
:
false
,
// 表格参数
tableParams
:
{
checkSelectKey
:
'id'
,
checkSelectVal
:
[],
listName
:
'list'
,
// 行数据的key
mutiSelectUniqueKey
:
'id'
,
// 多选ref的名称
mutiSelectName
:
'salelist'
,
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
tableColumns
:
[
{
label
:
'姓名'
,
prop
:
'staffName'
,
addHtml
:
'staffName'
},
{
label
:
'所在门店/部门'
,
prop
:
'departmentName'
}
]
},
tableEmpData
:
[],
allTreeData
:
[],
currentTreeData
:
[],
innerTags
:
[]
}
},
mounted
()
{
this
.
listDepartmentTree
()
},
methods
:
{
selectionTable
(
val
)
{
console
.
log
(
val
)
this
.
innerTags
=
val
// this.$emit('selectTable', val)
},
// 清空搜索条件
resetSearch
()
{
this
.
searchForm
=
{}
this
.
tableEmpData
=
this
.
allTreeData
},
// 显示时触发
onShowPopover
()
{
this
.
popoverVisible
=
true
},
// 隐藏时触发
onHidePopover
()
{
this
.
popoverVisible
=
false
},
listDepartmentTree
()
{
const
params
=
{
addChildrensFlag
:
true
}
if
(
this
.
islord
)
{
// 是否群主
params
.
islord
=
this
.
islord
}
this
.
loading
=
true
console
.
log
(
this
.
selectData
)
// params.isHavCustomer = true
this
.
$apis
.
groupGuest
.
listDepartmentTree
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
loading
=
false
if
(
res
)
{
this
.
tableEmpData
=
this
.
getEmployee
(
res
)
this
.
allTreeData
=
this
.
getEmployee
(
res
)
this
.
currentTreeData
=
this
.
getEmployee
(
res
)
this
.
treeData
=
res
this
.
tableEmpData
.
length
?
(
this
.
$refs
.
empTable
.
tableHeightValues
=
'250px'
)
:
this
.
$refs
.
empTable
.
setTableHeightFun
()
if
(
this
.
selectData
&&
this
.
selectData
.
length
)
{
this
.
selectData
.
forEach
(
item
=>
{
this
.
$refs
.
empTable
.
$refs
.
salelistMutiTable
.
toggleRowSelection
(
item
)
})
}
}
else
{
this
.
treeData
=
[]
}
})
},
handleNodeClick
(
data
)
{
console
.
log
(
data
)
this
.
searchForm
.
department
=
data
.
departmentName
this
.
currentTreeData
=
data
this
.
onHidePopover
()
},
getEmployee
(
d
,
arr
=
[])
{
d
.
reverse
().
forEach
(
i
=>
{
if
(
i
.
entmicroStaffResponses
)
{
i
.
entmicroStaffResponses
.
forEach
(
j
=>
{
const
flag
=
arr
.
find
(
m
=>
m
.
id
==
j
.
id
)
if
(
!
flag
)
{
arr
.
push
(
j
)
}
})
}
if
(
i
.
children
)
{
this
.
getEmployee
(
i
.
children
,
arr
)
}
})
return
arr
},
search
()
{
this
.
tableEmpData
=
[]
const
data
=
this
.
currentTreeData
const
keyword
=
this
.
searchForm
.
name
let
arr
=
[]
// this.loading = true
console
.
log
(
keyword
,
data
,
this
.
tableEmpData
)
if
(
data
instanceof
Array
)
{
data
.
forEach
(
i
=>
{
if
(
i
.
staffName
.
indexOf
(
keyword
)
!=
-
1
)
{
this
.
tableEmpData
.
push
(
i
)
}
})
}
else
if
(
data
instanceof
Object
)
{
if
(
data
.
entmicroStaffResponses
)
{
if
(
keyword
)
{
data
.
entmicroStaffResponses
.
forEach
(
i
=>
{
if
(
i
.
staffName
.
indexOf
(
keyword
)
!=
-
1
)
{
this
.
tableEmpData
.
push
(
i
)
}
})
}
else
{
this
.
tableEmpData
=
this
.
tableEmpData
.
concat
(
data
.
entmicroStaffResponses
)
}
}
if
(
data
.
children
)
{
data
.
children
.
forEach
(
i
=>
{
if
(
i
.
entmicroStaffResponses
)
{
i
.
entmicroStaffResponses
.
forEach
(
j
=>
{
if
(
keyword
)
{
if
(
j
.
staffName
.
indexOf
(
keyword
)
!=
-
1
)
{
const
flag
=
this
.
tableEmpData
.
find
(
m
=>
m
.
id
==
j
.
id
)
if
(
!
flag
)
{
this
.
tableEmpData
.
push
(
j
)
}
}
}
else
{
const
flag
=
this
.
tableEmpData
.
find
(
m
=>
m
.
id
==
j
.
id
)
if
(
!
flag
)
{
this
.
tableEmpData
.
push
(
j
)
}
}
})
}
})
}
}
},
remove
(
item
)
{
this
.
$refs
.
empTable
.
$refs
.
salelistMutiTable
.
toggleRowSelection
(
item
)
},
rowClick
(
row
)
{
this
.
$refs
.
empTable
.
$refs
.
salelistMutiTable
.
toggleRowSelection
(
row
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
.el-input.el-input--suffix.rotate
.el-input__suffix
.el-icon-arrow-down
{
transform
:
rotate
(
-180deg
);
}
.select-tree
{
max-height
:
400px
;
overflow-y
:
scroll
;
}
.staff-title
{
position
:
relative
;
font-size
:
12px
;
padding
:
0
10px
;
line-height
:
12px
;
color
:
#999
;
&::before
{
content
:
''
;
position
:
absolute
;
top
:
50%
;
left
:
5px
;
transform
:
translateY
(
-50%
);
display
:
inline-block
;
width
:
1px
;
height
:
12px
;
background-color
:
#999
;
}
}
.member-wrapper
{
display
:
flex
;
.member-title
{
font-size
:
16px
;
font-weight
:
500
;
line-height
:
22px
;
margin-bottom
:
6px
;
span
{
display
:
inline-block
;
padding-left
:
5px
;
font-size
:
12px
;
color
:
#999
;
}
}
.member-left
{
width
:
800px
;
.member-content
{
border
:
1px
solid
#eee
;
.member-form
{
padding
:
10px
20px
;
}
.table-content
{
max-height
:
456px
;
overflow
:
auto
;
border
:
1px
solid
#eee
;
}
}
.member-checked
{
text-align
:
right
;
margin-top
:
10px
;
}
}
.member-right
{
width
:
286px
;
margin-left
:
14px
;
.member-name
{
font-size
:
14px
;
color
:
#333
;
line-height
:
20px
;
padding
:
18px
;
border
:
1px
solid
#eee
;
}
}
}
.tag-box
{
height
:
100%
;
}
.input-tag-wrapper
{
position
:
relative
;
font-size
:
14px
;
border
:
1px
solid
#eee
;
border-top
:
none
;
box-sizing
:
border-box
;
color
:
#606266
;
display
:
inline-block
;
padding
:
8px
10px
;
line-height
:
32px
;
transition
:
border-color
0.2s
cubic-bezier
(
0.645
,
0.045
,
0.355
,
1
);
width
:
100%
;
height
:
calc
(
100%
-
86px
);
display
:
flex
;
align-items
:
center
;
max-height
:
500px
;
overflow
:
auto
;
//
margin-bottom
:
10px
;
i
{
color
:
#75acff
;
margin-right
:
3px
;
font-size
:
14px
;
}
/
deep
/
input
{
/* input { */
/* background-color: red!important; 调试用的样式 */
outline
:
none
!important
;
border
:
none
!important
;
}
/
deep
/
.el-input
{
min-width
:
150px
;
width
:
auto
;
flex
:
1
;
}
}
.el-tag
{
margin-right
:
10px
;
line-height
:
22px
;
margin-bottom
:
5px
;
height
:
24px
;
}
</
style
>
src/views/guestGroup/components/selectMembers.vue
View file @
b773cd7
...
@@ -102,11 +102,7 @@ export default {
...
@@ -102,11 +102,7 @@ export default {
this
.
innerTags
.
forEach
(
item
=>
{
this
.
innerTags
.
forEach
(
item
=>
{
userIds
.
push
(
item
.
userId
)
userIds
.
push
(
item
.
userId
)
})
})
// this.$emit('handSelectdEmp', this.empType[this.typeIndex].id, userIds)
}
}
// onCancel() {
// this.$emit('closeDrawer')
// }
},
},
mounted
()
{}
mounted
()
{}
}
}
...
...
src/views/guestGroup/detail.vue
View file @
b773cd7
...
@@ -11,14 +11,13 @@
...
@@ -11,14 +11,13 @@
<img
src=
"@/assets/guestCustom/chat-logo.png"
alt=
""
/>
<img
src=
"@/assets/guestCustom/chat-logo.png"
alt=
""
/>
</div>
</div>
<div
class=
"group-name-info"
>
<div
class=
"group-name-info"
>
<div>
初始群聊名称
</div>
<div>
{{
groupInfo
.
groupName
}}
</div>
<div
class=
"group-name-info-count"
>
13
人
</div>
<div
class=
"group-name-info-count"
>
{{
groupInfo
.
userList
?
groupInfo
.
userList
.
length
:
0
}}
人
</div>
</div>
</div>
</div>
</div>
<div
class=
"text-info"
>
<div
class=
"text-info"
>
已建群数量:
已建群数量:
<span
class=
"group-number"
>
13
</span>
<span
class=
"group-number"
>
{{
groupInfo
.
groupCount
}}
</span>
个群组
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -30,27 +29,38 @@
...
@@ -30,27 +29,38 @@
<div
class=
"commissioner"
>
<div
class=
"commissioner"
>
<div
class=
"text-info"
>
跟进专员:
</div>
<div
class=
"text-info"
>
跟进专员:
</div>
<div
class=
"entmicro"
>
<div
class=
"entmicro"
>
<div
class=
"entmicro-tag"
v-for=
"(tag, idx) in
userList"
:key=
"idx
"
>
<div
class=
"entmicro-tag"
v-for=
"(tag, idx) in
followList"
:key=
"tag.id
"
>
<el-tag
type=
"info"
v-if=
"idx
<
9
"
:disable-transitions=
"false"
>
<el-tag
type=
"info"
v-if=
"idx
<
6
"
:disable-transitions=
"false"
>
<i
class=
"el-icon-user-solid"
></i>
<i
class=
"el-icon-user-solid"
></i>
{{
tag
.
staffName
}}{{
tag
.
departmentName
?
`(${tag.departmentName
}
)`
:
''
}}
{{
tag
.
staffName
}}{{
tag
.
departmentName
?
`(${tag.departmentName
}
)`
:
''
}}
<
/el-tag
>
<
/el-tag
>
<
el
-
tag
type
=
"info"
v
-
if
=
"followList.length > 6 && idx == 6"
>
<
el
-
popover
placement
=
"top"
width
=
"600"
trigger
=
"hover"
>
<
span
slot
=
"reference"
>
...({{
followList
.
length
}}
)
<
/span
>
<
div
class
=
"entmicro-hover"
>
<
el
-
tag
type
=
"info"
v
-
for
=
"(i, index) in followList"
:
key
=
"index"
:
disable
-
transitions
=
"false"
>
<
i
class
=
"el-icon-user-solid"
><
/i
>
{{
i
.
staffName
}}
{{
i
.
departmentName
?
`(${i.departmentName
}
)`
:
''
}}
<
/el-tag
>
<
/div
>
<
/el-popover
>
<
/el-tag
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"commissioner"
>
<
div
class
=
"commissioner"
>
<
div
class
=
"text-info"
>
入群成员:
<
/div
>
<
div
class
=
"text-info"
>
入群成员:
<
/div
>
<
div
class
=
"entmicro"
>
<
div
class
=
"entmicro"
>
<
div
class
=
"entmicro-tag"
v
-
for
=
"(tag, idx) in
userList"
:
key
=
"idx
"
>
<
div
class
=
"entmicro-tag"
v
-
for
=
"(tag, idx) in
memberList"
:
key
=
"tag.id
"
>
<
el
-
tag
type
=
"info"
v
-
if
=
"idx <
9
"
:
disable
-
transitions
=
"false"
>
<
el
-
tag
type
=
"info"
v
-
if
=
"idx <
6
"
:
disable
-
transitions
=
"false"
>
<
i
class
=
"el-icon-user-solid"
><
/i
>
<
i
class
=
"el-icon-user-solid"
><
/i
>
{{
tag
.
staffName
}}
{{
tag
.
departmentName
?
`(${tag.departmentName
}
)`
:
''
}}
{{
tag
.
staffName
}}
{{
tag
.
departmentName
?
`(${tag.departmentName
}
)`
:
''
}}
<
/el-tag
>
<
/el-tag
>
<
el
-
tag
type
=
"info"
v
-
if
=
"
userList.length > 9 && idx == 9
"
>
<
el
-
tag
type
=
"info"
v
-
if
=
"
memberList.length > 6 && idx == 6
"
>
<
el
-
popover
placement
=
"top"
width
=
"600"
trigger
=
"hover"
content
=
"这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
>
<
el
-
popover
placement
=
"top"
width
=
"600"
trigger
=
"hover"
>
<
span
slot
=
"reference"
>
...({{
us
erList
.
length
}}
)
<
/span
>
<
span
slot
=
"reference"
>
...({{
memb
erList
.
length
}}
)
<
/span
>
<
div
class
=
"entmicro-hover"
>
<
div
class
=
"entmicro-hover"
>
<
el
-
tag
type
=
"info"
v
-
for
=
"(i, index) in
us
erList"
:
key
=
"index"
:
disable
-
transitions
=
"false"
>
<
el
-
tag
type
=
"info"
v
-
for
=
"(i, index) in
memb
erList"
:
key
=
"index"
:
disable
-
transitions
=
"false"
>
<
i
class
=
"el-icon-user-solid"
><
/i
>
<
i
class
=
"el-icon-user-solid"
><
/i
>
{{
i
.
staffName
}}
{{
i
.
departmentName
?
`(${i.departmentName
}
)`
:
''
}}
{{
i
.
staffName
}}
{{
i
.
departmentName
?
`(${i.departmentName
}
)`
:
''
}}
<
/el-tag
>
<
/el-tag
>
...
@@ -70,39 +80,56 @@
...
@@ -70,39 +80,56 @@
<
i
class
=
"el-icon-refresh"
><
/i
>
<
i
class
=
"el-icon-refresh"
><
/i
>
更新数据
更新数据
<
/div
>
<
/div
>
<
div
class
=
"text-info"
>
更新于:
2021
-
12
-
27
14
:
47
<
/div
>
<
div
class
=
"text-info"
>
更新于:
{{
currentTime
}}
<
/div
>
<
/div
>
<
/div
>
<
GLTable
class
=
"table"
@
setTableFinishFun
=
"setTableFinishFun
"
ref
=
"groupDetail"
:
hasNum
=
"false"
:
getListApi
=
"getListApi"
:
beforeSearchFn
=
"beforeSearchFn"
:
noDataImg
=
"url"
:
pageConf
=
"pageConf"
:
tableParams
=
"tableParams"
:
tableData
=
"tableData"
>
<
GLTable
class
=
"table"
:
searchForm
=
"searchForm
"
ref
=
"groupDetail"
:
hasNum
=
"false"
:
getListApi
=
"getListApi"
:
beforeSearchFn
=
"beforeSearchFn"
:
noDataImg
=
"url"
:
pageConf
=
"pageConf"
:
tableParams
=
"tableParams"
:
tableData
=
"tableData"
>
<
span
slot
=
"customerName"
slot
-
scope
=
"scope"
>
<
span
slot
=
"customerName"
slot
-
scope
=
"scope"
>
<
div
class
=
"customer"
>
<
div
class
=
"customer"
>
<
div
class
=
"customer-img"
>
<
!--
<
div
class
=
"customer-img"
>
<
img
src
=
"@/assets/guestCustom/chat-logo.png"
alt
=
""
/>
<
img
src
=
"@/assets/guestCustom/chat-logo.png"
alt
=
""
/>
<
/div
>
<
/div>
--
>
<
div
class
=
"customer-name"
>
<
div
class
=
"customer-name"
>
{{
scope
.
scope
.
customerName
}}
{{
scope
.
scope
.
customerName
}}
<
label
class
=
"origin"
>
{{
scope
.
scope
.
type
==
1
?
'@微信'
:
'@企微'
}}
<
/label
>
<
label
class
=
"origin"
>
{{
WECHANT_TYPE
[
scope
.
scope
.
type
]
}}
<
/label
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/span
>
<
/span
>
<
div
slot
=
"groupOwner"
slot
-
scope
=
"scope"
>
<
div
slot
=
"groupOwner"
slot
-
scope
=
"scope"
>
<
el
-
tag
type
=
"info"
:
disable
-
transitions
=
"false"
>
<
el
-
tag
type
=
"info"
:
disable
-
transitions
=
"false"
>
<
i
class
=
"el-icon-user-solid"
><
/i
>
<
i
class
=
"el-icon-user-solid"
><
/i
>
{{
scope
.
scope
.
createdBy
}}
{{
scope
.
scope
.
departmentName
?
`(${scope.scope.departmentName
}
)`
:
''
}}
{{
scope
.
scope
.
lordName
}}
{{
scope
.
scope
.
departmentName
?
`(${scope.scope.departmentName
}
)`
:
''
}}
<
/el-tag
>
<
/el-tag
>
<
/div
>
<
/div
>
<
span
slot
=
"status"
slot
-
scope
=
"scope"
>
<
span
slot
=
"status"
class
=
"table-status"
slot
-
scope
=
"scope"
>
<
span
class
=
"statusText"
:
class
=
"
{
'red-text'
:
scope
.
scope
.
status
===
'2'
}"
>
{{
scope
.
scope
.
status
==
'1
'
?
'使用'
:
'解散于'
}}
<
/span
>
<
span
class
=
"statusText"
:
class
=
"
{
'red-text'
:
scope
.
scope
.
delFlag
===
'-1'
}"
>
{{
scope
.
scope
.
delFlag
==
'0
'
?
'使用'
:
'解散于'
}}
<
/span
>
<
span
v
-
if
=
"scope.scope.
status === '2
'"
class
=
"gray-text"
>
{{
scope
.
scope
.
cancelTime
}}
<
/span
>
<
span
v
-
if
=
"scope.scope.
delFlag === '-1
'"
class
=
"gray-text"
>
{{
scope
.
scope
.
cancelTime
}}
<
/span
>
<
/span
>
<
/span
>
<
/GLTable
>
<
/GLTable
>
<
/div
>
<
/div
>
<
div
class
=
"footer-panel"
:
style
=
"
{
left
:
footerLeft
+
'px'
,
width
:
footerWidth
+
'px'
}
"
>
<el-button @click="
handleCancel
"
>
取消
<
/el-button
>
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
script
>
<
script
>
const
WECHANT_TYPE
=
{
1
:
'@微信'
,
2
:
'@企微'
}
import
*
as
dayjs
from
'dayjs'
export
default
{
export
default
{
name
:
'guestGroupDetail'
,
data
()
{
data
()
{
return
{
return
{
// getListApi: this.$apis.groupGuest.getListApi,
WECHANT_TYPE
:
WECHANT_TYPE
,
searchForm
:
{
}
,
// getListApi: this.$apis.groupGuest.customerList,
tableData
:
[
tableData
:
[
{
{
id
:
1
,
id
:
1
,
...
@@ -110,9 +137,9 @@ export default {
...
@@ -110,9 +137,9 @@ export default {
type
:
1
,
//1微信2企微
type
:
1
,
//1微信2企微
orgName
:
'守候专用服务一组'
,
orgName
:
'守候专用服务一组'
,
createdTime
:
'2021-06-26 09:00:00 '
,
createdTime
:
'2021-06-26 09:00:00 '
,
status
:
'1'
,
//1使用 2
停用
delFlag
:
'0'
,
//0使用 -1
停用
groupName
:
'三人干饭小组'
,
groupName
:
'三人干饭小组'
,
createdBy
:
'刘益玲'
,
lordName
:
'刘益玲'
,
departmentName
:
'财务管理中心'
departmentName
:
'财务管理中心'
}
,
}
,
{
{
...
@@ -122,9 +149,9 @@ export default {
...
@@ -122,9 +149,9 @@ export default {
orgName
:
'守候专用服务一组'
,
orgName
:
'守候专用服务一组'
,
createdTime
:
'2021-06-26 09:00:00'
,
createdTime
:
'2021-06-26 09:00:00'
,
cancelTime
:
'2021年7月22日'
,
cancelTime
:
'2021年7月22日'
,
status
:
'2'
,
//1使用 2
停用
delFlag
:
'-1'
,
//0使用 -1
停用
groupName
:
'三人干饭小组'
,
groupName
:
'三人干饭小组'
,
createdBy
:
'刘益玲(财务管理中心)
'
lordName
:
'刘益玲
'
}
}
],
],
tableParams
:
{
tableParams
:
{
...
@@ -145,20 +172,20 @@ export default {
...
@@ -145,20 +172,20 @@ export default {
{
{
label
:
'现群名称'
,
label
:
'现群名称'
,
prop
:
'groupName'
,
prop
:
'groupName'
,
width
:
240
align
:
'left'
}
,
}
,
{
{
label
:
'现群主'
,
label
:
'现群主'
,
prop
:
'createdBy'
,
prop
:
'createdBy'
,
minWidth
:
'180px'
,
minWidth
:
'180px'
,
addHtml
:
'groupOwner'
addHtml
:
'groupOwner'
,
align
:
'left'
}
,
}
,
{
{
label
:
'状态'
,
label
:
'状态'
,
prop
:
'status'
,
prop
:
'status'
,
width
:
'180px
'
,
addHtml
:
'status
'
,
a
ddHtml
:
'status
'
a
lign
:
'left
'
}
}
]
]
}
,
}
,
...
@@ -172,7 +199,8 @@ export default {
...
@@ -172,7 +199,8 @@ export default {
userId
:
'GL1029'
,
userId
:
'GL1029'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
0
}
,
}
,
{
{
id
:
1111
,
id
:
1111
,
...
@@ -182,7 +210,8 @@ export default {
...
@@ -182,7 +210,8 @@ export default {
userId
:
'GL0667'
,
userId
:
'GL0667'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
0
}
,
}
,
{
{
id
:
1112
,
id
:
1112
,
...
@@ -192,7 +221,8 @@ export default {
...
@@ -192,7 +221,8 @@ export default {
userId
:
'GL0376'
,
userId
:
'GL0376'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
1
}
,
}
,
{
{
id
:
1113
,
id
:
1113
,
...
@@ -202,7 +232,8 @@ export default {
...
@@ -202,7 +232,8 @@ export default {
userId
:
'GL1388'
,
userId
:
'GL1388'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
0
}
,
}
,
{
{
id
:
1114
,
id
:
1114
,
...
@@ -212,7 +243,8 @@ export default {
...
@@ -212,7 +243,8 @@ export default {
userId
:
'GL0778'
,
userId
:
'GL0778'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
0
}
,
}
,
{
{
id
:
1115
,
id
:
1115
,
...
@@ -222,7 +254,8 @@ export default {
...
@@ -222,7 +254,8 @@ export default {
userId
:
'GL0640'
,
userId
:
'GL0640'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
0
}
,
}
,
{
{
id
:
1116
,
id
:
1116
,
...
@@ -232,7 +265,8 @@ export default {
...
@@ -232,7 +265,8 @@ export default {
userId
:
'GL1485'
,
userId
:
'GL1485'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
0
}
,
}
,
{
{
id
:
1117
,
id
:
1117
,
...
@@ -242,7 +276,8 @@ export default {
...
@@ -242,7 +276,8 @@ export default {
userId
:
'524'
,
userId
:
'524'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
1
}
,
}
,
{
{
id
:
1118
,
id
:
1118
,
...
@@ -252,7 +287,8 @@ export default {
...
@@ -252,7 +287,8 @@ export default {
userId
:
'GL1678'
,
userId
:
'GL1678'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
0
}
,
}
,
{
{
id
:
1119
,
id
:
1119
,
...
@@ -262,7 +298,8 @@ export default {
...
@@ -262,7 +298,8 @@ export default {
userId
:
'GL1744'
,
userId
:
'GL1744'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
0
}
,
}
,
{
{
id
:
1120
,
id
:
1120
,
...
@@ -272,7 +309,8 @@ export default {
...
@@ -272,7 +309,8 @@ export default {
userId
:
'GL1759'
,
userId
:
'GL1759'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
0
}
,
}
,
{
{
id
:
1121
,
id
:
1121
,
...
@@ -282,7 +320,8 @@ export default {
...
@@ -282,7 +320,8 @@ export default {
userId
:
'test001'
,
userId
:
'test001'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
0
}
,
}
,
{
{
id
:
1122
,
id
:
1122
,
...
@@ -292,17 +331,8 @@ export default {
...
@@ -292,17 +331,8 @@ export default {
userId
:
'GL1775'
,
userId
:
'GL1775'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
}
,
follow
:
0
{
id
:
1123
,
templateId
:
87
,
staffId
:
26196
,
staffName
:
'黄嘉泰'
,
userId
:
'GL1775'
,
departmentName
:
null
,
masterStatus
:
null
,
delFlag
:
0
}
,
}
,
{
{
id
:
1124
,
id
:
1124
,
...
@@ -312,7 +342,8 @@ export default {
...
@@ -312,7 +342,8 @@ export default {
userId
:
'GL1744'
,
userId
:
'GL1744'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
1
}
,
}
,
{
{
id
:
1125
,
id
:
1125
,
...
@@ -322,7 +353,8 @@ export default {
...
@@ -322,7 +353,8 @@ export default {
userId
:
'GL0667'
,
userId
:
'GL0667'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
follow
:
0
}
,
}
,
{
{
id
:
1126
,
id
:
1126
,
...
@@ -332,30 +364,69 @@ export default {
...
@@ -332,30 +364,69 @@ export default {
userId
:
'GL1485'
,
userId
:
'GL1485'
,
departmentName
:
null
,
departmentName
:
null
,
masterStatus
:
null
,
masterStatus
:
null
,
delFlag
:
0
delFlag
:
0
,
}
,
follow
:
0
{
id
:
1127
,
templateId
:
87
,
staffId
:
26255
,
staffName
:
'胡庚美'
,
userId
:
'GL0376'
,
departmentName
:
null
,
masterStatus
:
null
,
delFlag
:
0
}
}
]
],
userId
:
''
,
groupInfo
:
{
}
,
followList
:
[],
memberList
:
[],
currentTime
:
''
}
}
}
,
}
,
created
()
{
console
.
log
(
this
.
$route
.
params
.
id
)
this
.
userId
=
this
.
$route
.
params
.
id
this
.
getGroupList
(
this
.
$route
.
params
.
id
)
}
,
mounted
()
{
let
clientHeight
=
document
.
documentElement
.
clientHeight
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
boxHeight
=
clientHeight
-
200
}
,
methods
:
{
methods
:
{
//更新数据
//更新数据
refreshData
()
{
refreshData
()
{
this
.
$refs
.
groupDetail
.
refreshTable
()
this
.
$refs
.
groupDetail
.
refreshTable
()
this
.
$set
(
this
,
'currentTime'
,
dayjs
(
new
Date
()).
format
(
'YYYY-MM-DD HH:mm:ss'
))
}
,
}
,
setTableFinishFun
()
{
setTableFinishFun
()
{
if
(
this
.
$refs
.
groupDetail
.
data
&&
!
this
.
$refs
.
groupDetail
.
data
.
length
)
{
if
(
this
.
$refs
.
groupDetail
.
data
&&
!
this
.
$refs
.
groupDetail
.
data
.
length
)
{
this
.
$refs
.
groupDetail
.
setTableHeightFun
()
this
.
$refs
.
groupDetail
.
setTableHeightFun
()
}
}
}
,
getGroupList
(
id
)
{
// const id = this.userId
this
.
$apis
.
groupGuest
.
getListApi
({
id
}
).
then
(
res
=>
{
if
(
res
)
{
this
.
followList
=
[]
this
.
memberList
=
[]
this
.
currentTime
=
dayjs
(
new
Date
()).
format
(
'YYYY-MM-DD HH:mm:ss'
)
this
.
groupInfo
=
res
if
(
res
.
userList
&&
res
.
userList
.
length
)
{
res
.
userList
.
forEach
(
item
=>
{
if
(
item
.
follow
==
1
)
{
this
.
followList
.
push
(
item
)
}
else
{
this
.
memberList
.
push
(
item
)
}
}
)
}
}
}
)
}
,
handleCancel
()
{
this
.
$router
.
push
(
'/guestGroup/index'
)
}
,
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchForm
=
{
templateId
:
this
.
userId
}
resolve
()
}
)
}
}
}
}
}
}
...
@@ -464,6 +535,7 @@ export default {
...
@@ -464,6 +535,7 @@ export default {
&
.
updata
{
&
.
updata
{
color
:
#
5850
ff
;
color
:
#
5850
ff
;
margin
:
0
10
px
0
20
px
;
margin
:
0
10
px
0
20
px
;
cursor
:
pointer
;
i
.
el
-
icon
-
refresh
{
i
.
el
-
icon
-
refresh
{
font
-
size
:
14
px
;
font
-
size
:
14
px
;
color
:
#
5850
ff
;
color
:
#
5850
ff
;
...
@@ -527,4 +599,20 @@ i {
...
@@ -527,4 +599,20 @@ i {
color
:
#
666666
;
color
:
#
666666
;
padding
:
0
6
px
!
important
;
padding
:
0
6
px
!
important
;
}
}
.
table
-
status
{
display
:
flex
;
align
-
items
:
center
;
}
.
footer
-
panel
{
display
:
flex
;
align
-
items
:
center
;
justify
-
content
:
center
;
position
:
fixed
;
bottom
:
0
px
;
height
:
64
px
;
width
:
100
%
;
background
:
#
ffffff
;
box
-
shadow
:
0
px
-
1
px
1
px
0
px
rgba
(
88
,
80
,
255
,
0.1
);
}
<
/style>
<
/style>
\ No newline at end of file
\ No newline at end of file
src/views/guestGroup/index.vue
View file @
b773cd7
<
template
>
<
template
>
<div
class=
"scrm-sub-client-container"
>
<div
class=
"scrm-sub-client-container"
>
<div
class=
"btn-header"
>
<div
class=
"btn-header"
>
<
!--
<el-button
class=
"addBtn"
@
click=
"btnClick('create')"
>
新建群组
</el-button>
--
>
<
el-button
class=
"addBtn"
@
click=
"btnClick('create')"
>
新建群组
</el-button
>
<GLButton
class=
"addBtn"
@
click=
"btnClick('create')"
fn=
"新建群组"
>
新建群组
</GLButton>
<GLButton
class=
"addBtn"
@
click=
"btnClick('create')"
fn=
"新建群组"
>
新建群组
</GLButton>
<span
class=
"toptips"
>
<span
class=
"toptips"
>
<span>
配置群聊不会自动拉群,邀请客户入群后群聊才会正式生效,一个客户默认拉一个群聊。
</span>
<span>
配置群聊不会自动拉群,邀请客户入群后群聊才会正式生效,一个客户默认拉一个群聊。
</span>
...
@@ -9,13 +9,25 @@
...
@@ -9,13 +9,25 @@
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
<search-form
class=
"searchTop border-shadow"
:formModel=
"searchForm"
:formList=
"searchFormData"
>
<search-form
class=
"searchTop border-shadow"
:formModel=
"searchForm"
:formList=
"searchFormData"
>
<span
class=
"inline-b"
style=
"float: right"
slot=
"form-slot"
>
<span
class=
"inline-b"
style=
"float: right"
slot=
"form-slot"
>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
</span>
</search-form>
</search-form>
<!-- 表格区域 开始 -->
<!-- 表格区域 开始 -->
<GLTable
ref=
"gueastGroup"
@
setTableFinishFun=
"setTableFinishFun"
:noDataImg=
"url"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
>
<GLTable
ref=
"gueastGroup"
@
setTableFinishFun=
"setTableFinishFun"
:noDataImg=
"url"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
>
<div
slot=
"entmicro-name"
class=
"entmicro"
slot-scope=
"scope"
>
<div
slot=
"entmicro-name"
class=
"entmicro"
slot-scope=
"scope"
>
<!--
<span
v-for=
"(i, index) in scope.scope.userList"
:key=
"index"
>
<!--
<span
v-for=
"(i, index) in scope.scope.userList"
:key=
"index"
>
{{
i
.
staffName
}}{{
i
.
departmentName
?
`(${i.departmentName
}
)`
:
''
}}
{{
i
.
staffName
}}{{
i
.
departmentName
?
`(${i.departmentName
}
)`
:
''
}}
...
@@ -29,10 +41,20 @@
...
@@ -29,10 +41,20 @@
{{
tag
.
staffName
}}
{{
tag
.
departmentName
?
`(${tag.departmentName
}
)`
:
''
}}
{{
tag
.
staffName
}}
{{
tag
.
departmentName
?
`(${tag.departmentName
}
)`
:
''
}}
<
/el-tag
>
<
/el-tag
>
<
el
-
tag
type
=
"info"
v
-
if
=
"scope.scope.userList.length > 9 && idx == 9"
>
<
el
-
tag
type
=
"info"
v
-
if
=
"scope.scope.userList.length > 9 && idx == 9"
>
<
el
-
popover
placement
=
"top"
width
=
"600"
trigger
=
"hover"
content
=
"这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
>
<
el
-
popover
placement
=
"top"
width
=
"600"
trigger
=
"hover"
content
=
"这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
>
<
span
slot
=
"reference"
>
...({{
scope
.
scope
.
userList
.
length
}}
)
<
/span
>
<
span
slot
=
"reference"
>
...({{
scope
.
scope
.
userList
.
length
}}
)
<
/span
>
<
div
class
=
"entmicro-hover"
>
<
div
class
=
"entmicro-hover"
>
<
el
-
tag
type
=
"info"
v
-
for
=
"(i, index) in scope.scope.userList"
:
key
=
"index"
:
disable
-
transitions
=
"false"
>
<
el
-
tag
type
=
"info"
v
-
for
=
"(i, index) in scope.scope.userList"
:
key
=
"index"
:
disable
-
transitions
=
"false"
>
<
i
class
=
"el-icon-user-solid"
><
/i
>
<
i
class
=
"el-icon-user-solid"
><
/i
>
{{
i
.
staffName
}}
{{
i
.
departmentName
?
`(${i.departmentName
}
)`
:
''
}}
{{
i
.
staffName
}}
{{
i
.
departmentName
?
`(${i.departmentName
}
)`
:
''
}}
<
/el-tag
>
<
/el-tag
>
...
@@ -42,17 +64,25 @@
...
@@ -42,17 +64,25 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
span
slot
=
"status"
slot
-
scope
=
"scope"
>
<
span
slot
=
"status"
slot
-
scope
=
"scope"
>
<
span
class
=
"statusText"
:
class
=
"
{
'red-text'
:
scope
.
scope
.
status
===
'2'
,
'green-text'
:
scope
.
scope
.
status
===
'1'
}"
>
{{
scope
.
scope
.
status
==
'1'
?
'启用'
:
'停用'
}}
<
/span
>
<
span
class
=
"statusText"
:
class
=
"
{
'red-text'
:
scope
.
scope
.
status
===
'2'
,
'green-text'
:
scope
.
scope
.
status
===
'1'
}"
>
{{
scope
.
scope
.
status
==
'1'
?
'启用'
:
'停用'
}}
<
/span
>
<
/span
>
<
/span
>
<
div
class
=
"table-btns"
slot
=
"optionBtns"
slot
-
scope
=
"scope"
>
<
div
class
=
"table-btns"
slot
=
"optionBtns"
slot
-
scope
=
"scope"
>
<!--
<
el
-
button
type
=
"text"
@
click
=
"btnClick('edit', scope.scope)"
>
修改
<
/el-button> --
>
<
el
-
button
type
=
"text"
@
click
=
"btnClick('edit', scope.scope)"
>
修改
<
/el-button
>
<
el
-
button
type
=
"text"
@
click
=
"btnClick('detail', scope.scope)"
>
查看详情
<
/el-button
>
<
GLButton
type
=
"text"
@
click
=
"btnClick('detail', scope.scope)"
fn
=
"客户群详情"
>
查看详情
<
/GLButton
>
<
GLButton
type
=
"text"
@
click
=
"btnClick('detail', scope.scope)"
fn
=
"客户群详情"
>
查看详情
<
/GLButton
>
<
GLButton
type
=
"text"
@
click
=
"btnClick('edit', scope.scope)"
fn
=
"修改群组"
>
修改
<
/GLButton
>
<
GLButton
type
=
"text"
@
click
=
"btnClick('edit', scope.scope)"
fn
=
"修改群组"
>
修改
<
/GLButton
>
<
GLButton
type
=
"text"
@
click
=
"btnClick('status', scope.scope)"
fn
=
"启用禁用"
>
{{
scope
.
scope
.
status
==
1
?
'停用'
:
'启用'
}}
<
/GLButton
>
<
GLButton
type
=
"text"
@
click
=
"btnClick('status', scope.scope)"
fn
=
"启用禁用"
>
{{
scope
.
scope
.
status
==
1
?
'停用'
:
'启用'
}}
<
/GLButton
>
<!--
<
el
-
button
<!--
<
el
-
button
type
=
"text"
type
=
"text"
@
click
=
"btnClick('status', scope.scope)"
@
click
=
"btnClick('status', scope.scope)"
>
{{
scope
.
scope
.
status
==
1
?
'停用'
:
'启用'
}}
<
/el-button>
--
>
>
{{
scope
.
scope
.
status
==
1
?
'停用'
:
'启用'
}}
<
/el-button>--
>
<
/div
>
<
/div
>
<
/GLTable
>
<
/GLTable
>
<!--
表格区域
end
-->
<!--
表格区域
end
-->
...
@@ -89,7 +119,7 @@ export default {
...
@@ -89,7 +119,7 @@ export default {
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'群聊名称'
,
label
:
'群聊名称'
,
prop
:
'
org
Name'
,
prop
:
'
group
Name'
,
width
:
200
width
:
200
}
,
}
,
{
{
...
@@ -247,7 +277,7 @@ export default {
...
@@ -247,7 +277,7 @@ export default {
btnClick
(
name
,
rowData
)
{
btnClick
(
name
,
rowData
)
{
switch
(
name
)
{
switch
(
name
)
{
case
'create'
:
case
'create'
:
this
.
$router
.
push
(
'/guestGroup/add'
)
this
.
$router
.
push
(
'/guestGroup/add
/-1
'
)
break
break
case
'edit'
:
case
'edit'
:
this
.
$router
.
push
(
'/guestGroup/add/'
+
rowData
.
id
)
this
.
$router
.
push
(
'/guestGroup/add/'
+
rowData
.
id
)
...
...
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