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 5acd95c0
authored
Nov 17, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交一客一群
1 parent
6d1f54ff
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
210 additions
and
121 deletions
src/api/modules/groupGuest.js
src/config/env.development.js
src/router/index.js
src/setup/single.js
src/views/guestGroup/add.vue
src/views/guestGroup/components/preview.vue
src/views/guestGroup/components/selectEmp.vue
src/views/guestGroup/components/selectMembers.vue
src/views/guestGroup/components/welcomeWords.vue
src/views/guestGroup/index.vue
src/api/modules/groupGuest.js
View file @
5acd95c
...
@@ -8,10 +8,60 @@
...
@@ -8,10 +8,60 @@
*/
*/
import
{
http
}
from
'@/main'
import
{
http
}
from
'@/main'
const
URL
=
'/rop-scrm-entmicro/router'
const
URL
=
'/rop-scrm-entmicro/router'
const
PATH
=
'org.ore.api.one.'
const
PATH
=
'org.ore.api.one.
template.
'
const
templateList
=
params
=>
{
const
templateList
=
params
=>
{
params
.
method
=
`
${
PATH
}
template.list`
params
.
method
=
`
${
PATH
}
list`
return
http
({
url
:
URL
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
const
insert
=
params
=>
{
params
.
method
=
`
${
PATH
}
insert`
return
http
({
url
:
URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
update
=
params
=>
{
params
.
method
=
`
${
PATH
}
update`
return
http
({
url
:
URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
detail
=
params
=>
{
params
.
method
=
`
${
PATH
}
detail`
return
http
({
url
:
URL
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
const
status
=
params
=>
{
params
.
method
=
`
${
PATH
}
status`
return
http
({
url
:
URL
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
const
listDepartmentTree
=
params
=>
{
params
.
method
=
'cn.com.glsx.entmicro.department.listDepartmentTree'
return
http
({
return
http
({
url
:
URL
,
url
:
URL
,
method
:
'GET'
,
method
:
'GET'
,
...
@@ -21,5 +71,10 @@ const templateList = params => {
...
@@ -21,5 +71,10 @@ const templateList = params => {
}
}
export
default
{
export
default
{
templateList
templateList
,
insert
,
detail
,
status
,
update
,
listDepartmentTree
}
}
src/config/env.development.js
View file @
5acd95c
...
@@ -23,7 +23,7 @@ module.exports = {
...
@@ -23,7 +23,7 @@ module.exports = {
*/
*/
request
:
{
request
:
{
// baseURL: 'http://scrm.test.glsx.com.cn', // 测试
// baseURL: 'http://scrm.test.glsx.com.cn', // 测试
baseURL
:
'http://192.168.
1.65
:8064'
,
baseURL
:
'http://192.168.
2.42
:8064'
,
// 设置超时时间
// 设置超时时间
timeout
:
180000
,
timeout
:
180000
,
// 携带凭证
// 携带凭证
...
...
src/router/index.js
View file @
5acd95c
...
@@ -25,11 +25,11 @@ VueRouter.prototype.push = function push(location) {
...
@@ -25,11 +25,11 @@ VueRouter.prototype.push = function push(location) {
// }
// }
function
getRoutes
(
routesData
)
{
function
getRoutes
(
routesData
)
{
return
routesData
.
reduce
((
routes
,
route
)
=>
{
return
routesData
.
reduce
((
routes
,
route
)
=>
{
routes
.
push
({
...
route
,
component
:
()
=>
import
(
'@/views'
+
route
.
path
+
'.vue'
)
})
routes
.
push
({
...
route
,
component
:
()
=>
import
(
'@/views'
+
route
.
com
path
+
'.vue'
)
})
return
routes
return
routes
},
[])
},
[])
}
}
export
{
export
{
VueRouter
,
VueRouter
,
routes
,
routes
,
getRoutes
getRoutes
...
...
src/setup/single.js
View file @
5acd95c
...
@@ -10,15 +10,16 @@
...
@@ -10,15 +10,16 @@
import
Vue
from
'vue'
import
Vue
from
'vue'
import
{
message
}
from
'@/plugins/element.js'
import
{
message
}
from
'@/plugins/element.js'
import
{
fetchConfig
}
from
'@/config'
import
{
fetchConfig
}
from
'@/config'
import
{
GLButton
,
GLTable
}
from
'glsx-components'
//权限按钮 (根据权限动态创建)
import
{
GLButton
,
GLTable
}
from
'glsx-components'
//权限按钮 (根据权限动态创建)
import
{
Http
,
utils
}
from
'glsx-common'
import
{
Http
,
utils
}
from
'glsx-common'
import
render
from
'./render'
import
render
from
'./render'
import
{
routes
}
from
'@/router'
import
{
routes
}
from
'@/router'
export
async
function
start
()
{
export
async
function
start
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
return
if
(
window
.
__POWERED_BY_QIANKUN__
)
return
const
{
response
,
request
,
sign
,
secret
}
=
await
fetchConfig
(
true
)
const
{
response
,
request
,
sign
,
secret
}
=
await
fetchConfig
(
true
)
Vue
.
prototype
.
$http
=
new
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
'mini-f27a0943-8fbf-4b21-a7a1-8e82a117ba39-rop'
}
})
Vue
.
prototype
.
$http
=
new
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
'mini-3ab7a37c-3bfa-4a83-bbf8-9e59c6e10330-rop'
}
})
Vue
.
use
(
GLButton
,
GLTable
,
{
permissions
:
[
'1-1-1-1'
,
'2-1-1-1'
,
'3-1-1-1'
]
})
Vue
.
prototype
.
$http_common
=
new
Http
({
response
,
signWay
:
"md5"
,
request
:
'http://qcdidicb.glsx.net:7060'
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
'mini-3ab7a37c-3bfa-4a83-bbf8-9e59c6e10330-rop'
}
})
Vue
.
use
(
GLButton
,
GLTable
,
{
permissions
:
[
'1-1-1-1'
,
'2-1-1-1'
,
'3-1-1-1'
]
})
render
(
'/'
,
routes
)
render
(
'/'
,
routes
)
}
}
src/views/guestGroup/add.vue
View file @
5acd95c
This diff is collapsed.
Click to expand it.
src/views/guestGroup/components/preview.vue
View file @
5acd95c
...
@@ -3,26 +3,30 @@
...
@@ -3,26 +3,30 @@
<div
class=
"preview-content"
>
<div
class=
"preview-content"
>
<div
class=
"preview-time"
>
{{
currentTime
}}
</div>
<div
class=
"preview-time"
>
{{
currentTime
}}
</div>
<div
class=
"preview-info"
v-for=
"item in previewList"
:key=
"item.id"
>
<div
class=
"preview-info"
v-for=
"item in previewList"
:key=
"item.id"
>
<img
class=
"avatar"
src=
"
../../..
/assets/logo.png"
alt=
""
/>
<img
class=
"avatar"
src=
"
@
/assets/logo.png"
alt=
""
/>
<template
v-if=
"item.
type == 'text'
"
>
<template
v-if=
"item.
attType == 1
"
>
<div
class=
"preview-text text"
>
{{
item
.
c
ontent
}}
</div>
<div
class=
"preview-text text"
>
{{
item
.
attC
ontent
}}
</div>
</
template
>
</
template
>
<
template
v-else-if=
"item.
type == 'link'
"
>
<
template
v-else-if=
"item.
attType == 4
"
>
<div
class=
"preview-text preview-link"
>
<div
class=
"preview-text preview-link"
>
{{
item
.
url
}}
{{
item
.
attContent
.
url
}}
<img
src=
"
../../..
/assets/guestCustom/preview-link.png"
alt=
""
/>
<img
src=
"
@
/assets/guestCustom/preview-link.png"
alt=
""
/>
</div>
</div>
</
template
>
</
template
>
<
template
v-else-if=
"item.
type == 'img'
"
>
<
template
v-else-if=
"item.
attType == 2
"
>
<el-image
style=
"width: 100px"
:src=
"item.
url
"
fit=
"contain"
></el-image>
<el-image
style=
"width: 100px"
:src=
"item.
attContent
"
fit=
"contain"
></el-image>
</
template
>
</
template
>
<
template
v-else-if=
"item.type == 'applet'"
>
<
template
v-else-if=
"item.attType == 3"
>
<!--
<el-image
style=
"width: 100px"
:src=
"item.attContent"
fit=
"contain"
></el-image>
-->
<video
style=
"width: 100px"
:src=
"item.attContent"
></video>
</
template
>
<
template
v-else-if=
"item.attType == 5"
>
<div
class=
"preview-text text preview-applet"
>
<div
class=
"preview-text text preview-applet"
>
<div
class=
"preview-applet-title"
>
<div
class=
"preview-applet-title"
>
<img
:src=
"item.a
ppleIcon
"
alt=
""
/>
<img
:src=
"item.a
ttContent.picUrl
"
alt=
""
/>
<span>
{{
item
.
title
}}
</span>
<span>
{{
item
.
attContent
.
title
}}
</span>
</div>
</div>
{{
item
.
content
}}
{{
item
.
attContent
.
page
}}
</div>
</div>
</
template
>
</
template
>
</div>
</div>
...
@@ -88,10 +92,11 @@ export default {
...
@@ -88,10 +92,11 @@ export default {
}
}
.preview-text
{
.preview-text
{
position
:
relative
;
position
:
relative
;
max-width
:
1
90
px
;
max-width
:
1
69
px
;
color
:
#333
;
color
:
#333
;
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
4px
;
border-radius
:
4px
;
word-wrap
:
break-word
;
}
}
.text
{
.text
{
font-size
:
16px
;
font-size
:
16px
;
...
...
src/views/guestGroup/components/selectEmp.vue
View file @
5acd95c
...
@@ -18,13 +18,19 @@
...
@@ -18,13 +18,19 @@
height: treeHeight + 20 + 'px'
height: treeHeight + 20 + 'px'
}"
}"
>
>
<GLTable
ref=
"saleTable"
:tableData=
"tableEmpData"
:tableParams=
"tableParams"
:hasNum=
"false"
:hasPage=
"false"
@
selectionTable=
"selectionTable"
></GLTable>
<GLTable
ref=
"saleTable"
:tableData=
"tableEmpData"
:tableParams=
"tableParams"
:hasNum=
"false"
:hasPage=
"false"
@
selectionTable=
"selectionTable"
>
<div
class=
"table-btns"
slot=
"optionBtns"
slot-scope=
"scope"
>
<el-button
type=
"text"
v-show=
"!group.staffName"
@
click=
"selectGroup(scope.scope)"
>
设为群主
</el-button>
<el-button
type=
"text"
v-show=
"group.staffName && scope.scope.staffName == group.staffName"
@
click=
"cancelGroup"
>
取消群主
</el-button>
</div>
</GLTable>
</el-col>
</el-col>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'selectEmp'
,
name
:
'selectEmp'
,
props
:
[
'selectData'
],
data
()
{
data
()
{
return
{
return
{
treeHeight
:
0
,
treeHeight
:
0
,
...
@@ -52,19 +58,41 @@ export default {
...
@@ -52,19 +58,41 @@ export default {
{
{
label
:
'职务'
,
label
:
'职务'
,
prop
:
'staffTitle'
prop
:
'staffTitle'
},
{
label
:
''
,
prop
:
'optionBtns'
,
addHtml
:
'optionBtns'
,
fixed
:
'right'
}
}
]
]
},
},
tableEmpData
:
[]
tableEmpData
:
[],
group
:
{},
allGroup
:
[],
employeeList
:
[]
}
}
},
},
methods
:
{
methods
:
{
selectionTable
(
val
)
{
selectionTable
(
val
)
{
console
.
log
(
val
)
this
.
$emit
(
'selectTable'
,
val
)
this
.
$emit
(
'selectTable'
,
val
)
this
.
allGroup
=
val
const
hasGroup
=
val
.
find
(
item
=>
item
.
id
==
this
.
group
.
id
)
if
(
!
hasGroup
)
{
this
.
cancelGroup
()
}
},
},
listDepartmentTree
()
{
listDepartmentTree
()
{
this
.
$apis
.
emp
.
listDepartmentTree
({
id
:
1
}).
then
(
res
=>
{
this
.
$apis
.
groupGuest
.
listDepartmentTree
({
merchantId
:
10001001
,
addChildrensFlag
:
true
}).
then
(
res
=>
{
this
.
listTree
=
res
this
.
listTree
=
res
this
.
listTree
[
0
].
entmicroStaffResponses
=
this
.
getEmployee
(
this
.
listTree
)
console
.
log
(
this
.
listTree
)
this
.
selectData
.
forEach
(
i
=>
{
const
row
=
this
.
getEmployee
(
this
.
listTree
).
find
(
j
=>
j
.
id
==
i
.
staffId
)
console
.
log
(
row
)
this
.
clearSelect
(
row
)
})
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
document
.
getElementsByClassName
(
'el-tree-node__expand-icon'
)[
0
].
click
()
document
.
getElementsByClassName
(
'el-tree-node__expand-icon'
)[
0
].
click
()
document
.
getElementsByClassName
(
'el-tree-node__content'
)[
0
].
click
()
document
.
getElementsByClassName
(
'el-tree-node__content'
)[
0
].
click
()
...
@@ -72,30 +100,59 @@ export default {
...
@@ -72,30 +100,59 @@ export default {
})
})
},
},
clearSelect
(
row
)
{
clearSelect
(
row
)
{
console
.
log
(
row
,
'2222'
)
this
.
$refs
.
saleTable
.
$refs
.
salelistMutiTable
.
toggleRowSelection
(
row
)
this
.
$refs
.
saleTable
.
$refs
.
salelistMutiTable
.
toggleRowSelection
(
row
)
},
},
clearSelection
()
{
clearSelection
()
{
console
.
log
(
2222
)
this
.
$refs
.
saleTable
.
$refs
.
salelistMutiTable
.
clearSelection
()
this
.
$refs
.
saleTable
.
$refs
.
salelistMutiTable
.
clearSelection
()
},
},
handleNodeClick
(
data
)
{
handleNodeClick
(
data
)
{
this
.
departmentId
=
data
.
id
this
.
departmentId
=
data
.
id
this
.
listEntmicroStaff
()
this
.
tableEmpData
=
data
.
entmicroStaffResponses
// this.listEntmicroStaff()
},
},
listEntmicroStaff
(
staffName
)
{
selectGroup
(
data
)
{
let
params
=
{
console
.
log
(
data
)
departmentId
:
this
.
departmentId
,
this
.
group
=
data
staffName
:
staffName
?
staffName
:
this
.
staffName
,
const
obj
=
this
.
allGroup
.
find
(
item
=>
item
.
id
==
data
.
id
)
merchantid
:
this
.
$globalState
.
session
.
merchantId
if
(
!
obj
)
this
.
$refs
.
saleTable
.
$refs
.
salelistMutiTable
.
toggleRowSelection
(
data
)
}
this
.
$emit
(
'group'
,
this
.
group
)
this
.
$apis
.
emp
.
listEntmicroStaff
(
params
).
then
(
res
=>
{
},
this
.
tableEmpData
=
res
cancelGroup
()
{
this
.
group
=
{}
this
.
$emit
(
'group'
,
this
.
group
)
},
getEmployee
(
d
,
arr
=
[])
{
d
.
forEach
(
i
=>
{
if
(
i
.
entmicroStaffResponses
)
{
i
.
entmicroStaffResponses
.
forEach
(
j
=>
{
arr
.
push
(
j
)
})
}
if
(
i
.
children
)
{
this
.
getEmployee
(
i
.
children
,
arr
)
}
})
})
return
arr
}
}
// listEntmicroStaff(staffName) {
// let params = {
// departmentId: this.departmentId,
// staffName: staffName ? staffName : this.staffName,
// merchantid: this.$globalState.session.merchantId
// }
// this.$apis.emp.listEntmicroStaff(params).then(res => {
// this.tableEmpData = res
// })
// }
},
},
mounted
()
{
mounted
()
{
let
clientHeight
=
document
.
documentElement
.
clientHeight
let
clientHeight
=
document
.
documentElement
.
clientHeight
this
.
treeHeight
=
clientHeight
-
450
this
.
treeHeight
=
clientHeight
-
450
this
.
listDepartmentTree
()
this
.
listDepartmentTree
()
console
.
log
(
this
.
selectData
,
'.....'
)
}
}
}
}
</
script
>
</
script
>
...
...
src/views/guestGroup/components/selectMembers.vue
View file @
5acd95c
...
@@ -13,28 +13,14 @@
...
@@ -13,28 +13,14 @@
</div>
</div>
<div>
<div>
<div
class=
"select-sale-panel"
>
<div
class=
"select-sale-panel"
>
<select-emp
@
selectTable=
"selectTable"
ref=
"selectEmpTabel"
></select-emp>
<select-emp
:selectData=
"selectData"
@
group=
"handlGroup"
@
selectTable=
"selectTable"
ref=
"selectEmpTabel"
></select-emp>
<div
class=
"popper__arrow"
></div>
<div
class=
"popper__arrow"
></div>
</div>
</div>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"请选择跟进员工类型"
>
<el-form-item
label=
"群主"
>
<div
class=
"emp-type"
>
<el-tag
v-show=
"group.staffName"
closable
@
close=
"cancelGroup"
>
{{
group
.
staffName
}}
</el-tag>
<div
@
click=
"handleType(index)"
:class=
"
{ checked: typeIndex == index }" class="emp-type-btn" v-for="(item, index) in empType" :key="index">
{{
item
.
followName
}}
<i
class=
"el-icon-error"
@
click=
"delEmpType(item, index)"
v-if=
"!item.commonFlag"
></i>
</div>
</div>
<div
class=
"sale-select"
>
<el-input
size=
"small"
v-model=
"empTypeValue"
placeholder=
"添加类型名称"
maxlength=
"8"
show-word-limit
></el-input>
<div><el-button
size=
"small"
class=
"sale-select-btn"
type=
"primary"
@
click=
"addEmpType"
>
新增
</el-button></div>
</div>
<div
class=
"sale-type-desc"
>
跟进员工类型最多新增30个,已新增
{{
empType
.
length
-
3
}}
个
</div>
</el-form-item>
</el-form-item>
<!--
<el-form-item
style=
"text-align: center"
>
<el-button
@
click=
"onCancel"
size=
"small"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"onSubmit"
size=
"small"
>
确定
</el-button>
</el-form-item>
-->
</el-form>
</el-form>
</div>
</div>
</
template
>
</
template
>
...
@@ -42,6 +28,7 @@
...
@@ -42,6 +28,7 @@
import
selectEmp
from
'./selectEmp.vue'
import
selectEmp
from
'./selectEmp.vue'
export
default
{
export
default
{
name
:
'SelectMembers'
,
name
:
'SelectMembers'
,
props
:
[
'selectData'
],
components
:
{
components
:
{
selectEmp
selectEmp
},
},
...
@@ -50,10 +37,11 @@ export default {
...
@@ -50,10 +37,11 @@ export default {
addForm
:
{},
addForm
:
{},
typeIndex
:
0
,
typeIndex
:
0
,
empType
:
[],
empType
:
[],
empTypeValue
:
''
,
//
empTypeValue: '',
newTag
:
''
,
newTag
:
''
,
innerTags
:
[],
innerTags
:
[],
dialog_temp
:
{}
dialog_temp
:
{},
group
:
{}
}
}
},
},
methods
:
{
methods
:
{
...
@@ -67,16 +55,9 @@ export default {
...
@@ -67,16 +55,9 @@ export default {
}
}
},
},
selectTable
(
val
)
{
selectTable
(
val
)
{
console
.
log
(
val
)
this
.
innerTags
=
val
this
.
innerTags
=
val
},
},
listEntFollowerType
()
{
this
.
$apis
.
emp
.
listEntFollowerType
({
merchantId
:
this
.
$globalState
.
session
.
merchantId
}).
then
(
res
=>
{
this
.
empType
=
res
})
},
handleType
(
index
)
{
this
.
typeIndex
=
index
},
foucusTagInput
()
{
foucusTagInput
()
{
if
(
this
.
readOnly
||
!
this
.
$el
.
querySelector
(
'.tag-input'
))
{
if
(
this
.
readOnly
||
!
this
.
$el
.
querySelector
(
'.tag-input'
))
{
return
return
...
@@ -85,58 +66,33 @@ export default {
...
@@ -85,58 +66,33 @@ export default {
}
}
},
},
remove
(
row
)
{
remove
(
row
)
{
console
.
log
(
row
,
'111'
)
this
.
$refs
.
selectEmpTabel
.
clearSelect
(
row
)
this
.
$refs
.
selectEmpTabel
.
clearSelect
(
row
)
},
},
//查询
//查询
searchEmp
()
{
searchEmp
()
{
this
.
$refs
.
selectEmpTabel
.
list
EntmicroStaff
(
this
.
newTag
)
this
.
$refs
.
selectEmpTabel
.
list
DepartmentTree
(
this
.
newTag
)
},
},
addEmpType
()
{
handlGroup
(
val
)
{
if
(
!
this
.
empTypeValue
)
{
console
.
log
(
val
)
this
.
$message
.
error
(
'请输入类型名称'
)
this
.
group
=
val
return
},
}
cancelGroup
()
{
if
(
this
.
empType
.
length
==
33
)
{
this
.
$refs
.
selectEmpTabel
.
cancelGroup
()
this
.
$message
.
error
(
'跟进员工类型最多新增30个'
)
},
onSubmit
()
{
if
(
this
.
innerTags
.
length
==
0
)
{
this
.
$message
({
message
:
'请选择成员'
,
type
:
'error'
})
return
return
}
}
let
params
=
{
let
userIds
=
[]
followName
:
this
.
empTypeValue
,
this
.
innerTags
.
forEach
(
item
=>
{
merchantid
:
this
.
$globalState
.
session
.
merchantId
userIds
.
push
(
item
.
userId
)
}
this
.
$apis
.
emp
.
saveFollowerType
(
params
).
then
(
res
=>
{
this
.
listEntFollowerType
()
})
this
.
empTypeValue
=
''
},
delEmpType
(
item
,
index
)
{
this
.
$apis
.
emp
.
deleteFollowerType
({
id
:
item
.
id
}).
then
(
res
=>
{
if
(
res
)
{
this
.
listEntFollowerType
()
this
.
typeIndex
=
0
}
})
})
}
}
// onSubmit() {
// if (this.innerTags.length == 0) {
// this.$message({
// message: '请选择员工',
// type: 'error'
// })
// return
// }
// let userIds = []
// this.innerTags.forEach(item => {
// userIds.push(item.userId)
// })
// this.$emit('handSelectdEmp', this.empType[this.typeIndex].id, userIds)
// },
// onCancel() {
// this.$emit('closeDrawer')
// }
},
mounted
()
{
this
.
listEntFollowerType
()
}
}
}
}
</
script
>
</
script
>
...
...
src/views/guestGroup/components/welcomeWords.vue
View file @
5acd95c
This diff is collapsed.
Click to expand it.
src/views/guestGroup/index.vue
View file @
5acd95c
...
@@ -8,18 +8,18 @@
...
@@ -8,18 +8,18 @@
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
<search-form
class=
"searchTop border-shadow"
:formModel=
"searchForm"
:formList=
"searchFormData"
@
searchTable=
"searchTable"
@
syncClick=
"syncClick"
>
<search-form
class=
"searchTop border-shadow"
:formModel=
"searchForm"
:formList=
"searchFormData"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<span
class=
"inline-b"
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"
:
tableData=
"tableData"
:searchForm=
"searchFormData
"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
>
<GLTable
ref=
"gueastGroup"
:
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"
>
{{
i
.
name
}}
(
{{
i
.
tips
}}
);
</span>
<span
v-for=
"(i, index) in scope.scope.userList"
:key=
"index"
>
{{
i
.
staffName
}}
(
{{
i
.
departmentName
}}
);
</span>
</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' }">
{{
s
tatusText
(
scope
.
scope
.
status
)
}}
</span>
<span
class=
"statusText"
:class=
"
{ 'red-text': scope.scope.status === '2', 'green-text': scope.scope.status === '1' }">
{{
s
cope
.
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>
...
@@ -40,7 +40,7 @@ export default {
...
@@ -40,7 +40,7 @@ export default {
{
{
type
:
'input'
,
type
:
'input'
,
inputType
:
'text'
,
inputType
:
'text'
,
prop
:
'
org
Name'
,
prop
:
'
group
Name'
,
label
:
'组名'
,
label
:
'组名'
,
placeholder
:
'请输入组名搜索'
placeholder
:
'请输入组名搜索'
}
}
...
@@ -48,7 +48,7 @@ export default {
...
@@ -48,7 +48,7 @@ export default {
// 表格
// 表格
getListApi
:
this
.
$apis
.
groupGuest
.
templateList
,
getListApi
:
this
.
$apis
.
groupGuest
.
templateList
,
tableParams
:
{
tableParams
:
{
listName
:
'
data
'
,
listName
:
''
,
tableOption
:
false
,
tableOption
:
false
,
otherOptions
:
{
otherOptions
:
{
label
:
'启用开关'
label
:
'启用开关'
...
@@ -180,17 +180,13 @@ export default {
...
@@ -180,17 +180,13 @@ export default {
//搜索表格
//搜索表格
searchTable
()
{
searchTable
()
{
console
.
log
(
this
.
searchForm
)
console
.
log
(
this
.
searchForm
)
// this.$refs.gueastGroup.refreshTable()
this
.
$refs
.
gueastGroup
.
refreshTable
()
},
statusText
(
val
)
{
console
.
log
(
val
)
return
val
===
'1'
?
'启用'
:
'停用'
},
},
btnClick
(
name
,
rowData
)
{
btnClick
(
name
,
rowData
)
{
console
.
log
(
name
)
console
.
log
(
name
)
switch
(
name
)
{
switch
(
name
)
{
case
'create'
:
case
'create'
:
this
.
$router
.
push
(
'/guestGroup/add/'
+
1
)
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
)
...
@@ -202,10 +198,29 @@ export default {
...
@@ -202,10 +198,29 @@ export default {
type
:
'warning'
type
:
'warning'
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
$message
({
const
params
=
{
type
:
'success'
,
id
:
rowData
.
id
,
message
:
'操作成功!'
status
:
rowData
.
status
==
1
?
2
:
1
,
})
merchantId
:
1
}
this
.
$apis
.
groupGuest
.
status
(
params
)
.
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
)
{
this
.
searchTable
()
this
.
$message
({
type
:
'success'
,
message
:
'操作成功!'
})
}
})
.
catch
(
err
=>
{
this
.
$message
({
type
:
'error'
,
message
:
err
.
message
})
})
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$message
({
this
.
$message
({
...
...
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