Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 375735a8
authored
Feb 28, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新客自动拉群
1 parent
8c944576
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
500 additions
and
209 deletions
linkwe-ui/src/api/communityOperating/newCustomer.js
linkwe-ui/src/components/PhoneDialog.vue
linkwe-ui/src/components/SelectQrCode.vue
linkwe-ui/src/views/communityOperating/newCustomer/aev.vue
linkwe-ui/src/views/communityOperating/newCustomer/list.vue
linkwe-ui/src/views/drainageCode/staff/list.vue
linkwe-ui/src/api/communityOperating/newCustomer.js
0 → 100644
View file @
375735a
import
request
from
'@/utils/request'
const
service
=
window
.
CONFIG
.
services
.
wecom
+
'/communityNewGroup'
/**
* 获取新客自动拉群列表
* @param {*} params
*
*/
export
function
getList
(
params
)
{
return
request
({
url
:
service
+
'/list'
,
method
:
'get'
,
params
,
})
}
/**
* 获取新客自动拉群详情
* @param {*} params
*
*/
export
function
getDetail
(
id
)
{
return
request
({
url
:
service
+
'/'
+
id
,
method
:
'get'
,
})
}
/**
* 新增新客自动拉群
* @param {Object} data
{
"activityScene": "string",
"groupCodeId": 0,
"isJoinConfirmFriends": true,
"mediaId": 0,
"qrCode": "string",
"weEmpleCodeTags": [
{
"delFlag": 0,
"empleCodeId": 0,
"id": 0,
"tagId": "string",
"tagName": "string"
}
],
"weEmpleCodeUseScops": [
{
"businessId": "string",
"businessIdType": 0,
"businessName": "string",
"delFlag": 0,
"empleCodeId": 0,
"id": 0,
"mobile": "string"
}
],
"welcomeMsg": "string"
}
*/
export
function
add
(
data
)
{
return
request
({
url
:
service
+
'/add'
,
method
:
'post'
,
data
,
})
}
/**
* 修改新客自动拉群
* @param {*} data
{
"activityScene": "string",
"groupCodeId": 0,
"isJoinConfirmFriends": true,
"mediaId": 0,
"qrCode": "string",
"weEmpleCodeTags": [
{
"delFlag": 0,
"empleCodeId": 0,
"id": 0,
"tagId": "string",
"tagName": "string"
}
],
"weEmpleCodeUseScops": [
{
"businessId": "string",
"businessIdType": 0,
"businessName": "string",
"delFlag": 0,
"empleCodeId": 0,
"id": 0,
"mobile": "string"
}
],
"welcomeMsg": "string"
}
*/
export
function
update
(
data
)
{
return
request
({
url
:
service
+
'/update'
,
method
:
'put'
,
data
,
})
}
/**
* 删除新客自动拉群
* @param {*} ids
*/
export
function
remove
(
ids
)
{
return
request
({
url
:
service
+
'/delete'
+
ids
,
method
:
'DELETE'
,
})
}
linkwe-ui/src/components/PhoneDialog.vue
View file @
375735a
...
@@ -27,24 +27,26 @@ export default {
...
@@ -27,24 +27,26 @@ export default {
<div
class=
"top"
>
小微
</div>
<div
class=
"top"
>
小微
</div>
<div
class=
"small"
>
仟微科技-企微
</div>
<div
class=
"small"
>
仟微科技-企微
</div>
<div
class=
"time"
>
凌晨2:20
</div>
<div
class=
"time"
>
凌晨2:20
</div>
<div
class=
"flex msg-li"
>
<ul
class=
"msg-ul"
>
<el-avatar
<li
class=
"flex msg-li"
>
shape=
"square"
<el-avatar
size=
"small"
shape=
"square"
:src=
"require('@/assets/image/profile.jpg')"
size=
"small"
></el-avatar>
:src=
"require('@/assets/image/profile.jpg')"
<div
class=
"msg"
>
{{
message
}}
</div>
></el-avatar>
</div>
<div
class=
"msg"
>
{{
message
}}
</div>
<div
class=
"flex msg-li"
v-if=
"isOther"
>
</li>
<el-avatar
<li
class=
"flex msg-li"
v-if=
"isOther"
>
shape=
"square"
<el-avatar
size=
"small"
shape=
"square"
:src=
"require('@/assets/image/profile.jpg')"
size=
"small"
></el-avatar>
:src=
"require('@/assets/image/profile.jpg')"
<div
class=
"msg"
style=
"line-height: 0; padding: 5px;"
>
></el-avatar>
<slot></slot>
<div
class=
"msg"
style=
"line-height: 0; padding: 5px;"
>
</div>
<slot></slot>
</div>
</div>
</li>
</ul>
</div>
</div>
</
template
>
</
template
>
...
@@ -68,6 +70,12 @@ export default {
...
@@ -68,6 +70,12 @@ export default {
transform
:
scale
(
0.8
);
transform
:
scale
(
0.8
);
padding
:
10px
0
5px
;
padding
:
10px
0
5px
;
}
}
.msg-ul
{
margin
:
0
;
padding
:
0
;
max-height
:
80%
;
overflow
:
auto
;
}
.msg-li
{
.msg-li
{
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
...
...
linkwe-ui/src/components/SelectQrCode.vue
0 → 100644
View file @
375735a
<
script
>
import
{
getList
}
from
'@/api/drainageCode/group'
export
default
{
components
:
{},
props
:
{
// 添加标签显隐
visible
:
{
type
:
Boolean
,
default
:
false
,
},
title
:
{
type
:
String
,
default
:
'选择群活码'
,
},
selected
:
{
type
:
Array
,
default
:
()
=>
[],
},
},
data
()
{
return
{
loading
:
true
,
// 遮罩层
query
:
{
pageNum
:
1
,
pageSize
:
10
,
activityName
:
''
,
createBy
:
''
,
beginTime
:
''
,
endTime
:
''
,
},
list
:
[],
// 列表
total
:
0
,
// 总条数
radio
:
''
,
}
},
watch
:
{},
computed
:
{
Pvisible
:
{
get
()
{
return
this
.
visible
},
set
(
val
)
{
this
.
$emit
(
'update:visible'
,
val
)
},
},
Ptype
:
{
get
()
{
return
this
.
type
},
set
(
val
)
{
this
.
$emit
(
'update:type'
,
val
)
},
},
},
created
()
{
this
.
getList
()
},
mounted
()
{},
methods
:
{
// 获取列表
getList
(
page
)
{
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
getList
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
total
=
+
total
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
})
},
submit
()
{
this
.
Pvisible
=
false
this
.
$emit
(
'success'
,
this
.
radio
)
},
},
}
</
script
>
<
template
>
<el-dialog
title=
"选择素材"
:visible
.
sync=
"Pvisible"
width=
"650px"
append-to-body
>
<div>
<el-form
ref=
"form"
:model=
"query"
label-width=
""
>
<el-form-item
label=
""
>
<el-input
v-model=
"query.activityName"
class=
"ml10 mr10"
style=
"width: 150px;"
placeholder=
"请输入名称"
@
keydown
.
enter=
"getList(1)"
></el-input>
<el-button
v-hasPermi=
"['contacts:organization:query']"
icon=
"el-icon-search"
circle
@
click=
"getList(1)"
></el-button>
<el-pagination
class=
"fr"
@
current-change=
"getList"
:current-page=
"query.pageNum"
:page-size=
"query.pageSize"
layout=
"prev, pager, next"
:total=
"total"
></el-pagination>
</el-form-item>
</el-form>
<el-table
:data=
"list"
v-loading=
"loading"
>
<el-table-column
width=
"30"
>
<template
slot-scope=
"scope"
>
<el-radio
v-model=
"radio"
:label=
"scope.row"
>
'
</el-radio>
</
template
>
</el-table-column>
<el-table-column
prop=
"activityName"
label=
"活码名称"
align=
"center"
></el-table-column>
<el-table-column
prop=
"activityDesc"
label=
"活码描述"
align=
"center"
width=
"160"
>
<
template
#
default=
"{ row }"
>
<el-popover
placement=
"bottom"
width=
"200"
trigger=
"hover"
:content=
"row.activityDesc"
>
<div
slot=
"reference"
class=
"table-desc overflow-ellipsis"
>
{{
row
.
activityDesc
}}
</div>
</el-popover>
</
template
>
</el-table-column>
<el-table-column
prop=
"codeUrl"
label=
"活码样式"
align=
"center"
width=
"130"
>
<
template
#
default=
"{ row }"
>
<el-popover
placement=
"bottom"
trigger=
"hover"
>
<el-image
slot=
"reference"
:src=
"row.codeUrl"
class=
"code-image--small"
></el-image>
<el-image
:src=
"row.codeUrl"
class=
"code-image"
>
</el-image>
</el-popover>
</
template
>
</el-table-column>
<el-table-column
label=
"实际群码总数"
align=
"center"
>
<
template
#
default=
"{ row }"
>
<el-button
type=
"text"
@
click=
"handleRealCodeDialogOpen(row.id, -1)"
>
{{
(
row
.
actualList
&&
row
.
actualList
.
length
)
||
0
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
prop=
"availableCodes"
label=
"可用实际群码数"
align=
"center"
>
<
template
#
default=
"{ row }"
>
<el-popover
v-if=
"row.aboutToExpireCodes > 0"
placement=
"bottom"
width=
"200"
trigger=
"hover"
:content=
"'有' + row.aboutToExpireCodes + '个实际群码即将过期。'"
>
<i
slot=
"reference"
class=
"el-icon-warning expire-icon"
></i>
</el-popover>
<el-button
type=
"text"
@
click=
"handleRealCodeDialogOpen(row.id, 0)"
>
{{
row
.
availableCodes
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
<div
slot=
"footer"
>
<el-button
@
click=
"Pvisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submit"
>
确 定
</el-button>
</div>
</el-dialog>
</template>
<
style
lang=
"scss"
scoped
>
.code-image
{
width
:
200px
;
height
:
200px
;
}
.code-image--small
{
width
:
50px
;
height
:
50px
;
}
.expire-icon
{
color
:
red
;
}
</
style
>
linkwe-ui/src/views/communityOperating/newCustomer/aev.vue
View file @
375735a
...
@@ -4,36 +4,60 @@ import { getList } from '@/api/drainageCode/welcome'
...
@@ -4,36 +4,60 @@ import { getList } from '@/api/drainageCode/welcome'
import
PhoneDialog
from
'@/components/PhoneDialog'
import
PhoneDialog
from
'@/components/PhoneDialog'
import
SelectUser
from
'@/components/SelectUser'
import
SelectUser
from
'@/components/SelectUser'
import
SelectTag
from
'@/components/SelectTag'
import
SelectTag
from
'@/components/SelectTag'
import
Select
Material
from
'@/components/SelectMaterial
'
import
Select
QrCode
from
'@/components/SelectQrCode
'
export
default
{
export
default
{
components
:
{
PhoneDialog
,
SelectTag
,
SelectUser
,
Select
Material
},
components
:
{
PhoneDialog
,
SelectTag
,
SelectUser
,
Select
QrCode
},
data
()
{
data
()
{
return
{
return
{
dialogVisibleSelectUser
:
false
,
dialogVisibleSelectUser
:
false
,
dialogVisibleSelectTag
:
false
,
dialogVisibleSelectTag
:
false
,
dialogVisibleSelectMaterial
:
false
,
dialogVisibleSelectQrCode
:
false
,
dialogVisibleSelectWel
:
false
,
// 遮罩层
// 遮罩层
loading
:
false
,
loading
:
false
,
// 表单参数
// 表单参数
form
:
{
form
:
{
codeType
:
1
,
activityScene
:
''
,
groupCodeId
:
0
,
isJoinConfirmFriends
:
true
,
mediaId
:
0
,
qrCode
:
''
,
qrCode
:
''
,
isJoinConfirmFriends
:
0
,
weEmpleCodeTags
:
[
weEmpleCodeTags
:
[],
{
weEmpleCodeUseScops
:
[],
delFlag
:
0
,
empleCodeId
:
0
,
id
:
0
,
tagId
:
'string'
,
tagName
:
'string'
,
},
],
weEmpleCodeUseScops
:
[
{
businessId
:
'string'
,
businessIdType
:
0
,
businessName
:
'string'
,
delFlag
:
0
,
empleCodeId
:
0
,
id
:
0
,
mobile
:
'string'
,
},
],
welcomeMsg
:
''
,
},
},
rules
:
Object
.
freeze
({
activityScene
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
weEmpleCodeUseScops
:
[
{
required
:
true
,
message
:
'必填项'
,
trigger
:
'change'
},
],
welcomeMsg
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
qrCode
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'change'
}],
}),
materialSelected
:
''
,
materialSelected
:
''
,
welQuery
:
{
welcomeMsg
:
''
},
welLoading
:
false
,
welList
:
[],
welSelected
:
{},
type
:
{
1
:
'单人'
,
2
:
'多人'
,
3
:
'批量单人'
},
}
}
},
},
created
()
{
created
()
{
let
id
=
this
.
$route
.
query
.
id
let
id
=
this
.
$route
.
query
.
id
id
&&
this
.
getDetail
(
id
)
id
&&
this
.
getDetail
(
id
)
this
.
$route
.
meta
.
title
=
(
id
?
'编辑'
:
'新建'
)
+
'新客自动拉群'
},
},
methods
:
{
methods
:
{
/** 获取详情 */
/** 获取详情 */
...
@@ -46,15 +70,6 @@ export default {
...
@@ -46,15 +70,6 @@ export default {
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
/** 获取欢迎语列表 */
getWelList
()
{
this
.
welLoading
=
true
getList
(
this
.
welQuery
).
then
(({
rows
})
=>
{
this
.
welList
=
rows
this
.
$refs
.
table
.
$forceUpdate
()
this
.
welLoading
=
false
})
},
codeTypeChange
()
{
codeTypeChange
()
{
this
.
form
.
weEmpleCodeUseScops
=
[]
this
.
form
.
weEmpleCodeUseScops
=
[]
this
.
form
.
qrCode
=
''
this
.
form
.
qrCode
=
''
...
@@ -83,22 +98,16 @@ export default {
...
@@ -83,22 +98,16 @@ export default {
tagName
:
d
.
name
,
tagName
:
d
.
name
,
}))
}))
},
},
// 选择
素材
确认按钮
// 选择
二维码
确认按钮
submitSelect
Material
(
text
,
image
,
file
)
{
submitSelect
QrCode
(
text
,
image
,
file
)
{
this
.
form
.
mediaId
=
image
.
id
this
.
form
.
mediaId
=
image
.
id
this
.
materialSelected
=
image
.
materialUrl
this
.
materialSelected
=
image
.
materialUrl
this
.
dialogVisibleSelect
Material
=
false
this
.
dialogVisibleSelect
QrCode
=
false
},
},
removeMaterial
()
{
removeMaterial
()
{
this
.
form
.
mediaId
=
''
this
.
form
.
mediaId
=
''
this
.
materialSelected
=
''
this
.
materialSelected
=
''
},
},
// 欢迎语确认按钮
selectWelcome
()
{
this
.
form
.
welcomeMsg
=
this
.
welSelected
.
welcomeMsg
this
.
form
.
mediaId
=
this
.
welSelected
.
mediaId
this
.
dialogVisibleSelectWel
=
false
},
submit
()
{
submit
()
{
if
(
!
this
.
form
.
weEmpleCodeUseScops
.
length
)
{
if
(
!
this
.
form
.
weEmpleCodeUseScops
.
length
)
{
this
.
msgError
(
'请至少选择一名使用员工'
)
this
.
msgError
(
'请至少选择一名使用员工'
)
...
@@ -120,7 +129,7 @@ export default {
...
@@ -120,7 +129,7 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"wrap"
v-loading=
"loading"
>
<div
class=
"wrap"
v-loading=
"loading"
>
<el-form
:model=
"form"
ref=
"form"
label-width=
"100px"
>
<el-form
:model=
"form"
ref=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"活码名称"
prop=
"activityScene"
>
<el-form-item
label=
"活码名称"
prop=
"activityScene"
>
<el-input
<el-input
v-model=
"form.activityScene"
v-model=
"form.activityScene"
...
@@ -130,7 +139,7 @@ export default {
...
@@ -130,7 +139,7 @@ export default {
clearable
clearable
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"使用员工"
>
<el-form-item
label=
"使用员工"
prop=
"weEmpleCodeUseScops"
>
<!-- closable -->
<!-- closable -->
<el-tag
<el-tag
size=
"medium"
size=
"medium"
...
@@ -149,7 +158,7 @@ export default {
...
@@ -149,7 +158,7 @@ export default {
>
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"加群引导语"
prop=
"
isJoinConfirmFriends
"
>
<el-form-item
label=
"加群引导语"
prop=
"
welcomeMsg
"
>
<el-input
<el-input
type=
"textarea"
type=
"textarea"
v-model=
"form.welcomeMsg"
v-model=
"form.welcomeMsg"
...
@@ -160,18 +169,21 @@ export default {
...
@@ -160,18 +169,21 @@ export default {
clearable
clearable
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"选择群活码"
prop=
"activityScene"
>
<el-form-item
label=
"选择群活码"
prop=
"qrCode"
>
<el-image
v-if=
"form.qrCode"
:src=
"form.qrCode"
class=
"code-image"
>
</el-image>
<el-button
<el-button
type=
"primary"
type=
"primary"
plain
plain
class=
"ml10"
class=
"ml10"
icon=
"el-icon-plus"
icon=
"el-icon-plus"
size=
"mini"
size=
"mini"
@
click=
"dialogVisibleSelect
User
= true"
@
click=
"dialogVisibleSelect
QrCode
= true"
>
{{
form
.
weEmpleCodeUseScops
.
length
?
'修改'
:
'添加
'
}}
</el-button
>
{{
form
.
qrCode
?
'修改'
:
'选择
'
}}
</el-button
>
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
扫码
标签"
prop=
"weEmpleCodeTags"
>
<el-form-item
label=
"
新客户
标签"
prop=
"weEmpleCodeTags"
>
<!-- closable -->
<!-- closable -->
<el-tag
<el-tag
size=
"medium"
size=
"medium"
...
@@ -237,58 +249,12 @@ export default {
...
@@ -237,58 +249,12 @@ export default {
>
>
</SelectTag>
</SelectTag>
<!-- 选择素材弹窗 -->
<!-- 选择二维码弹窗 -->
<SelectMaterial
<SelectQrCode
:visible
.
sync=
"dialogVisibleSelectMaterial"
:visible
.
sync=
"dialogVisibleSelectQrCode"
type=
"1"
@
success=
"submitSelectQrCode"
:showArr=
"[1]"
@
success=
"submitSelectMaterial"
>
</SelectMaterial>
<el-dialog
key=
"a"
title=
"选择欢迎语"
:visible
.
sync=
"dialogVisibleSelectWel"
width=
"500"
>
>
<div>
</SelectQrCode>
<el-input
class=
"welcome-input"
placeholder=
"请输入关键字"
v-model=
"welQuery.welcomeMsg"
>
<el-button
slot=
"append"
@
click=
"getWelList"
>
查询
</el-button>
</el-input>
<el-table
ref=
"table"
v-loading=
"welLoading"
:data=
"welList"
:max-height=
"300"
:show-header=
"false"
highlight-current-row
@
current-change=
"(val) => (welSelected = val)"
>
<el-table-column
property=
"welcomeMsg"
show-overflow-tooltip
></el-table-column>
<el-table-column
width=
"60"
>
<template
slot-scope=
"
{ row }">
<i
v-if=
"welSelected.id === row.id"
class=
"el-icon-check"
style=
"color: rgb(65, 133, 244); font-size: 25px;"
></i>
</
template
>
</el-table-column>
</el-table>
</div>
<div
slot=
"footer"
>
<el-button
@
click=
"dialogVisibleSelectWel = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"selectWelcome"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -310,6 +276,8 @@ export default {
...
@@ -310,6 +276,8 @@ export default {
width
:
80%
;
width
:
80%
;
margin
:
0
auto
20px
;
margin
:
0
auto
20px
;
}
}
.el-icon-error
{
.code-image
{
width
:
100px
;
height
:
100px
;
}
}
</
style
>
</
style
>
linkwe-ui/src/views/communityOperating/newCustomer/list.vue
View file @
375735a
<
script
>
<
script
>
import
*
as
api
from
'@/api/c
ustomer'
import
{
getList
,
remove
}
from
'@/api/communityOperating/newC
ustomer'
export
default
{
export
default
{
components
:
{},
components
:
{},
...
@@ -9,7 +9,7 @@ export default {
...
@@ -9,7 +9,7 @@ export default {
query
:
{
query
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
nam
e
:
''
,
activityScen
e
:
''
,
beginTime
:
''
,
// "开始时间",
beginTime
:
''
,
// "开始时间",
endTime
:
''
,
// "结束时间"
endTime
:
''
,
// "结束时间"
},
},
...
@@ -20,18 +20,13 @@ export default {
...
@@ -20,18 +20,13 @@ export default {
dialogVisible
:
false
,
dialogVisible
:
false
,
disabled
:
false
,
disabled
:
false
,
loading
:
false
,
loading
:
false
,
rules
:
Object
.
freeze
({
name
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
corpId
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
corpSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
contactSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
}),
status
:
[
'正常'
,
'停用'
],
status
:
[
'正常'
,
'停用'
],
pushType
:
{
pushType
:
{
0
:
'发给客户'
,
0
:
'发给客户'
,
1
:
'发给客户群'
,
1
:
'发给客户群'
,
},
},
queryUser
:
[],
// 搜索框选择的添加人
queryUser
:
[],
// 搜索框选择的添加人
ids
:
[],
}
}
},
},
watch
:
{},
watch
:
{},
...
@@ -69,27 +64,71 @@ export default {
...
@@ -69,27 +64,71 @@ export default {
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
type
||
!
data
?
(
this
.
disabled
=
false
)
:
(
this
.
disabled
=
true
)
type
||
!
data
?
(
this
.
disabled
=
false
)
:
(
this
.
disabled
=
true
)
},
},
submit
()
{
goRoute
(
id
)
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
api
[
this
.
form
.
id
?
'update'
:
'add'
](
this
.
form
)
.
then
(()
=>
{
this
.
msgSuccess
(
'操作成功'
)
this
.
dialogVisible
=
false
this
.
getList
(
!
this
.
form
.
id
&&
1
)
})
.
catch
(()
=>
{
this
.
dialogVisible
=
false
})
}
})
},
goRoute
(
id
,
path
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/communityOperating/newCustomerAev'
,
path
:
'/communityOperating/newCustomerAev'
,
query
:
{
id
},
query
:
{
id
},
})
})
},
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
((
item
)
=>
item
.
id
)
},
/** 删除按钮操作 */
remove
(
id
)
{
const
ids
=
id
||
this
.
ids
this
.
$confirm
(
'是否确认删除?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(
function
()
{
return
remove
(
ids
)
})
.
then
(()
=>
{
this
.
getList
()
this
.
msgSuccess
(
'删除成功'
)
})
.
catch
(
function
()
{})
},
download
(
id
,
userName
,
activityScene
)
{
let
name
=
userName
+
'-'
+
activityScene
+
'.png'
download
(
id
).
then
((
res
)
=>
{
if
(
res
!=
null
)
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/zip'
})
let
url
=
window
.
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'a'
)
// 创建a标签
link
.
href
=
url
link
.
download
=
name
// 重命名文件
link
.
click
()
URL
.
revokeObjectURL
(
url
)
// 释放内存
}
})
},
/** 批量下载 */
downloadBatch
(
qrCode
)
{
this
.
$confirm
(
'是否确认下载所有图片吗?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(()
=>
{
return
downloadBatch
(
this
.
ids
+
''
)
// window.open(downloadBatch(this.ids))
})
.
then
((
res
)
=>
{
if
(
res
!=
null
)
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/zip'
})
let
url
=
window
.
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'a'
)
// 创建a标签
link
.
href
=
url
link
.
download
=
'批量员工活码.zip'
// 重命名文件
link
.
click
()
URL
.
revokeObjectURL
(
url
)
// 释放内存
}
})
.
catch
(
function
()
{})
},
},
},
}
}
</
script
>
</
script
>
...
@@ -156,11 +195,11 @@ export default {
...
@@ -156,11 +195,11 @@ export default {
客户通过员工活码添加员工,自动发送入群引导语、群活码,客户扫码入群。 -->
客户通过员工活码添加员工,自动发送入群引导语、群活码,客户扫码入群。 -->
</div>
</div>
<div>
<div>
<el-button
type=
"primary"
@
click=
"
goRoute
()"
>
批量下载
</el-button>
<el-button
type=
"primary"
@
click=
"
download
()"
>
批量下载
</el-button>
<el-button
<el-button
v-hasPermi=
"['customerManage:customer:export']"
v-hasPermi=
"['customerManage:customer:export']"
type=
"cyan"
type=
"cyan"
@
click=
"
exportCustomer
"
@
click=
"
remove()
"
>
批量删除
</el-button
>
批量删除
</el-button
>
>
</div>
</div>
...
@@ -168,7 +207,11 @@ export default {
...
@@ -168,7 +207,11 @@ export default {
<!-- <el-card shadow="never" :body-style="{padding: '20px 0 0'}">
<!-- <el-card shadow="never" :body-style="{padding: '20px 0 0'}">
</el-card>-->
</el-card>-->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<el-table-column
prop=
"createTime"
label=
"活码名称"
align=
"center"
>
<el-table-column
prop=
"createTime"
label=
"活码名称"
align=
"center"
>
</el-table-column>
</el-table-column>
...
@@ -222,13 +265,13 @@ export default {
...
@@ -222,13 +265,13 @@ export default {
width=
"180"
width=
"180"
class-name=
"small-padding fixed-width"
class-name=
"small-padding fixed-width"
>
>
<
template
slot-scope=
"
scope
"
>
<
template
slot-scope=
"
{ row }
"
>
<el-button
<el-button
v-hasPermi=
"['enterpriseWechat:edit']"
v-hasPermi=
"['enterpriseWechat:edit']"
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
icon=
"el-icon-edit"
icon=
"el-icon-edit"
@
click=
"
edit(scope.row, 1
)"
@
click=
"
goRoute(row.id
)"
>
编辑
</el-button
>
编辑
</el-button
>
>
<el-button
<el-button
...
@@ -236,7 +279,7 @@ export default {
...
@@ -236,7 +279,7 @@ export default {
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
icon=
"el-icon-view"
icon=
"el-icon-view"
@
click=
"
edit(scope.row, 0
)"
@
click=
"
download(row
)"
>
下载
</el-button
>
下载
</el-button
>
>
<el-button
<el-button
...
@@ -244,7 +287,7 @@ export default {
...
@@ -244,7 +287,7 @@ export default {
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
icon=
"el-icon-edit"
icon=
"el-icon-edit"
@
click=
"
edit(scope.row, 1
)"
@
click=
"
remove(row.id
)"
>
删除
</el-button
>
删除
</el-button
>
>
</
template
>
</
template
>
...
@@ -258,74 +301,5 @@ export default {
...
@@ -258,74 +301,5 @@ export default {
:limit
.
sync=
"query.pageSize"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
@
pagination=
"getList()"
/>
/>
<el-dialog
title=
"查看企业微信号"
:visible
.
sync=
"dialogVisible"
>
<el-form
ref=
"form"
label-position=
"right"
:model=
"form"
:rules=
"rules"
label-width=
"160px"
:disabled=
"disabled"
>
<el-form-item
label=
"企业名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
:disabled=
"form.id"
></el-input>
</el-form-item>
<el-form-item
label=
"企业ID(CorpID)"
prop=
"corpId"
>
<el-input
:disabled=
"form.id"
v-model=
"form.corpId"
style=
"width: 80%"
placeholder=
"可在新闻公告应用的生日祝福等场景使用"
></el-input>
<el-link
class=
"fr"
type=
"primary"
>
如何获取?
</el-link>
</el-form-item>
<!-- <el-form-item label="Token">
<el-input disabled id="copy-input" v-model="form.name" placeholder="成员唯一标识,不支持更改,不支持中文"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input">复制</el-button>
</el-form-item>
<el-form-item label="EncodingAESKey">
<el-input disabled id="copy-input1" v-model="form.name"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input1">复制</el-button>
</el-form-item>-->
<el-form-item
label=
"服务商secret"
prop=
"providerSecret"
>
<el-input
v-model=
"form.providerSecret"
style=
"width: 80%"
></el-input>
<el-link
class=
"fr"
type=
"primary"
>
如何获取?
</el-link>
</el-form-item>
<el-form-item
label=
"通讯录管理secret"
prop=
"corpSecret"
>
<el-input
v-model=
"form.corpSecret"
style=
"width: 80%"
></el-input>
<el-link
class=
"fr"
type=
"primary"
>
如何获取?
</el-link>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.contactSecret">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将成员、部门的增删改以及成员的标签变更实时的同步到仟微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item
label=
"外部联系人管理secret"
prop=
"contactSecret"
>
<el-input
v-model=
"form.contactSecret"
></el-input>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.model">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将企业客户的添加、编辑以及主动删除客户和被动被客户删除实时的同步到仟微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item
label=
"企业微信扫码登陆回调地址"
prop=
"wxQrLoginRedirectUri"
>
<el-input
v-model=
"form.wxQrLoginRedirectUri"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submit"
v-show=
"!disabled"
>
确 定
</el-button
>
</div>
</el-dialog>
</div>
</div>
</template>
</template>
linkwe-ui/src/views/drainageCode/staff/list.vue
View file @
375735a
...
@@ -268,7 +268,7 @@ export default {
...
@@ -268,7 +268,7 @@ export default {
v-hasPermi=
"['wecom:code:remove']"
v-hasPermi=
"['wecom:code:remove']"
type=
"primary"
type=
"primary"
size=
"mini"
size=
"mini"
@
click=
"remove"
@
click=
"remove
()
"
>
删除
</el-button
>
删除
</el-button
>
>
<el-button
<el-button
...
...
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