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 50e613f5
authored
Nov 22, 2020
by
xinlaa
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
员工活码接口调试等
1 parent
5b061b16
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
128 additions
and
48 deletions
linkwe-ui/src/api/common.js
linkwe-ui/src/api/drainageCode/staff.js
linkwe-ui/src/components/SelectMaterial/index.vue
linkwe-ui/src/components/SelectUser.vue
linkwe-ui/src/views/drainageCode/staff/add.vue
linkwe-ui/src/api/common.js
0 → 100644
View file @
50e613f
import
request
from
'@/utils/request'
/**
* 下载网络连接文件
* @param {*} params
{
url=文件路径&
name=文件名称,带后缀
}
*/
export
function
download
(
params
)
{
return
request
({
url
:
'/common/download/url'
,
params
,
})
}
linkwe-ui/src/api/drainageCode/staff.js
View file @
50e613f
...
@@ -79,7 +79,8 @@ export function update(data) {
...
@@ -79,7 +79,8 @@ export function update(data) {
"weEmpleCodeTags": [{
"weEmpleCodeTags": [{
"tagId": "标签id",
"tagId": "标签id",
"tagName": "标签"
"tagName": "标签"
}]
}],
mediaId: ''
}
}
*/
*/
export
function
add
(
data
)
{
export
function
add
(
data
)
{
...
@@ -91,8 +92,20 @@ export function add(data) {
...
@@ -91,8 +92,20 @@ export function add(data) {
}
}
/**
/**
* 根据id获取员工活码详情
* 批量新增员工活码
* @param {*} params
* @param {*} data
*/
export
function
batchAdd
(
data
)
{
return
request
({
url
:
service
+
'/batchAdd'
,
method
:
'post'
,
data
,
})
}
/**
* 删除员工活码
* @param {*} id
*/
*/
export
function
remove
(
id
)
{
export
function
remove
(
id
)
{
return
request
({
return
request
({
...
@@ -100,3 +113,18 @@ export function remove(id) {
...
@@ -100,3 +113,18 @@ export function remove(id) {
method
:
'delete'
,
method
:
'delete'
,
})
})
}
}
/**
*获取员工二维码
* @param {*} params
{
userIds=员工id,多个逗号隔离&
departmentIds=部门id,多个逗号隔离
}
*/
export
function
getDetail
(
params
)
{
return
request
({
url
:
service
+
'/getQrcode'
,
params
,
})
}
linkwe-ui/src/components/SelectMaterial/index.vue
View file @
50e613f
...
@@ -19,6 +19,11 @@ export default {
...
@@ -19,6 +19,11 @@ export default {
type
:
String
,
type
:
String
,
default
:
'0'
,
default
:
'0'
,
},
},
// 显示哪些素材类型标签
showArr
:
{
type
:
Array
,
default
:
()
=>
[
0
,
1
],
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -66,11 +71,11 @@ export default {
...
@@ -66,11 +71,11 @@ export default {
<el-dialog
title=
"选择素材"
:visible
.
sync=
"Pvisible"
width=
"650px"
>
<el-dialog
title=
"选择素材"
:visible
.
sync=
"Pvisible"
width=
"650px"
>
<div>
<div>
<el-tabs
v-model=
"Ptype"
>
<el-tabs
v-model=
"Ptype"
>
<el-tab-pane
name=
"0"
>
<el-tab-pane
name=
"0"
v-if=
"showArr.includes(0)"
>
<span
slot=
"label"
>
<i
class=
"el-icon-date"
></i>
文本
</span>
<span
slot=
"label"
>
<i
class=
"el-icon-date"
></i>
文本
</span>
<list
type=
"4"
@
change=
"changeText"
>
</list>
<list
type=
"4"
@
change=
"changeText"
>
</list>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
name=
"1"
>
<el-tab-pane
name=
"1"
v-if=
"showArr.includes(1)"
>
<span
slot=
"label"
>
<i
class=
"el-icon-date"
></i>
图片
</span>
<span
slot=
"label"
>
<i
class=
"el-icon-date"
></i>
图片
</span>
<list
type=
"0"
@
change=
"changeImage"
>
</list>
<list
type=
"0"
@
change=
"changeImage"
>
</list>
</el-tab-pane>
</el-tab-pane>
...
...
linkwe-ui/src/components/SelectUser.vue
View file @
50e613f
...
@@ -19,6 +19,11 @@ export default {
...
@@ -19,6 +19,11 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
default
:
true
,
default
:
true
,
},
},
// 是否单选
isSigleSelect
:
{
type
:
Boolean
,
default
:
false
,
},
},
},
data
()
{
data
()
{
let
isOnlyLeaf
=
this
.
isOnlyLeaf
let
isOnlyLeaf
=
this
.
isOnlyLeaf
...
@@ -60,7 +65,7 @@ export default {
...
@@ -60,7 +65,7 @@ export default {
element
.
key
=
createUniqueString
()
element
.
key
=
createUniqueString
()
})
})
let
_data
=
this
.
handleTree
(
data
)
let
_data
=
this
.
handleTree
(
data
)
console
.
log
(
'd'
,
data
)
//
console.log('d', data)
resolve
(
_data
)
resolve
(
_data
)
// api.getList({ department: _data[0].id }).then(({ rows, total }) => {
// api.getList({ department: _data[0].id }).then(({ rows, total }) => {
// _data && rows.unshift(..._data);
// _data && rows.unshift(..._data);
...
@@ -77,16 +82,26 @@ export default {
...
@@ -77,16 +82,26 @@ export default {
})
})
}
}
},
},
// 选择变化
handleCheckChange
(
data
,
checked
,
indeterminate
)
{
handleCheckChange
(
data
,
checked
,
indeterminate
)
{
checked
debugger
?
this
.
userList
.
push
(
data
)
if
(
checked
)
{
:
this
.
userList
.
splice
(
this
.
userList
.
indexOf
(
data
),
1
)
if
(
this
.
isSigleSelect
)
{
// 单选清空
let
userList
=
[]
}
this
.
userList
.
push
(
data
)
}
else
{
this
.
userList
.
splice
(
this
.
userList
.
indexOf
(
data
),
1
)
}
// console.log(data, checked, indeterminate);
// console.log(data, checked, indeterminate);
},
},
// 确 定
submit
()
{
submit
()
{
this
.
Pvisible
=
false
this
.
Pvisible
=
false
this
.
$emit
(
'success'
,
this
.
userList
)
this
.
$emit
(
'success'
,
this
.
userList
)
},
},
// 取消选择
cancle
(
key
)
{
cancle
(
key
)
{
this
.
$refs
.
tree
.
setChecked
(
key
,
false
)
this
.
$refs
.
tree
.
setChecked
(
key
,
false
)
},
},
...
@@ -108,7 +123,7 @@ setChecked
...
@@ -108,7 +123,7 @@ setChecked
lazy
lazy
accordion
accordion
show-checkbox
show-checkbox
check-on-click-node
:check-on-click-node=
"false"
:expand-on-click-node=
"true"
:expand-on-click-node=
"true"
:load=
"loadNode"
:load=
"loadNode"
:props=
"defaultProps"
:props=
"defaultProps"
...
...
linkwe-ui/src/views/drainageCode/staff/add.vue
View file @
50e613f
<
script
>
<
script
>
import
{
getDetail
,
add
,
update
}
from
'@/api/drainageCode/staff'
import
{
getDetail
,
add
,
update
}
from
'@/api/drainageCode/staff'
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
SelectMaterial
from
'@/components/SelectMaterial'
export
default
{
export
default
{
components
:
{
PhoneDialog
,
SelectTag
,
SelectUser
},
components
:
{
PhoneDialog
,
SelectTag
,
SelectUser
,
SelectMaterial
},
data
()
{
data
()
{
return
{
return
{
dialogVisibleSelectUser
:
false
,
dialogVisibleSelectUser
:
false
,
dialogVisibleSelectTag
:
false
,
dialogVisibleSelectTag
:
false
,
dialogVisibleSelectMaterial
:
false
,
dialogVisibleSelectWel
:
false
,
dialogVisibleSelectWel
:
false
,
// 遮罩层
// 遮罩层
loading
:
false
,
loading
:
false
,
...
@@ -19,32 +22,13 @@ export default {
...
@@ -19,32 +22,13 @@ export default {
weEmpleCodeTags
:
[],
weEmpleCodeTags
:
[],
weEmpleCodeUseScops
:
[],
weEmpleCodeUseScops
:
[],
},
},
tableData
:
[
welQuery
:
{
welcomeMsg
:
''
},
{
welLoading
:
false
,
date
:
'2016-05-02'
,
welList
:
[],
name
:
'王小虎'
,
welSelected
:
{},
address
:
'上海市普陀区金沙江路 1518 弄'
,
},
{
date
:
'2016-05-04'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1517 弄'
,
},
{
date
:
'2016-05-01'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1519 弄'
,
},
{
date
:
'2016-05-03'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1516 弄'
,
},
],
}
}
},
},
created
()
{
created
()
{
debugger
let
id
=
this
.
$route
.
query
.
id
let
id
=
this
.
$route
.
query
.
id
id
&&
this
.
getData
(
id
)
id
&&
this
.
getData
(
id
)
},
},
...
@@ -64,6 +48,8 @@ export default {
...
@@ -64,6 +48,8 @@ export default {
tagName
:
d
.
name
,
tagName
:
d
.
name
,
}))
}))
},
},
// 选择素材确认按钮
submitSelectMaterial
(
text
,
image
,
file
)
{},
/** 获取详情 */
/** 获取详情 */
getData
(
id
)
{
getData
(
id
)
{
this
.
loading
=
true
this
.
loading
=
true
...
@@ -72,6 +58,20 @@ export default {
...
@@ -72,6 +58,20 @@ export default {
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
/** 获取欢迎语列表 */
getWelList
()
{
this
.
welLoading
=
true
getList
(
this
.
welQuery
).
then
(({
rows
})
=>
{
this
.
welList
=
rows
this
.
welLoading
=
false
})
},
// 欢迎语确认按钮
selectWelcome
()
{
this
.
form
.
welcomeMsg
=
this
.
welSelected
.
welcomeMsg
this
.
form
.
mediaId
=
this
.
welSelected
.
mediaId
this
.
dialogVisibleSelectWel
=
false
},
submit
()
{
submit
()
{
this
.
loading
=
true
this
.
loading
=
true
add
(
this
.
form
).
then
(({
data
})
=>
{
add
(
this
.
form
).
then
(({
data
})
=>
{
...
@@ -170,13 +170,18 @@ export default {
...
@@ -170,13 +170,18 @@ export default {
>
添加图片
</el-button
>
添加图片
</el-button
>
>
</el-popover>
-->
</el-popover>
-->
<el-button
icon=
"el-icon-plus"
size=
"mini"
>
添加图片
</el-button>
<el-button
icon=
"el-icon-plus"
size=
"mini"
@
click=
"dialogVisibleSelectMaterial = true"
>
添加图片
</el-button
>
</el-card>
</el-card>
<el-button
<el-button
icon=
"el-icon-plus"
icon=
"el-icon-plus"
type=
"primary"
type=
"primary"
size=
"mini"
size=
"mini"
@
click=
"
dialogVisibleSelectWel = true
"
@
click=
"
getWelList(), (dialogVisibleSelectWel = true)
"
>
从欢迎语模板选取
</el-button
>
从欢迎语模板选取
</el-button
>
>
<div
class=
"tip"
>
<div
class=
"tip"
>
...
@@ -217,9 +222,11 @@ export default {
...
@@ -217,9 +222,11 @@ export default {
<!-- 选择使用员工弹窗 -->
<!-- 选择使用员工弹窗 -->
<SelectUser
<SelectUser
:key=
"form.codeType"
:visible
.
sync=
"dialogVisibleSelectUser"
:visible
.
sync=
"dialogVisibleSelectUser"
title=
"选择使用员工"
title=
"选择使用员工"
:isOnlyLeaf=
"false"
:isOnlyLeaf=
"false"
:isSigleSelect=
"form.codeType == 1"
@
success=
"selectedUser"
@
success=
"selectedUser"
></SelectUser>
></SelectUser>
...
@@ -231,6 +238,15 @@ export default {
...
@@ -231,6 +238,15 @@ export default {
>
>
</SelectTag>
</SelectTag>
<!-- 选择素材弹窗 -->
<SelectMaterial
:visible
.
sync=
"dialogVisibleSelectMaterial"
type=
"1"
:showArr=
"[1]"
@
success=
"submitSelectMaterial"
>
</SelectMaterial>
<el-dialog
<el-dialog
title=
"选择欢迎语"
title=
"选择欢迎语"
:visible
.
sync=
"dialogVisibleSelectWel"
:visible
.
sync=
"dialogVisibleSelectWel"
...
@@ -240,24 +256,26 @@ export default {
...
@@ -240,24 +256,26 @@ export default {
<el-input
<el-input
class=
"welcome-input"
class=
"welcome-input"
placeholder=
"请输入关键字"
placeholder=
"请输入关键字"
v-model=
"
input3
"
v-model=
"
welQuery.welcomeMsg
"
>
>
<el-button
slot=
"append"
>
查询
</el-button>
<el-button
slot=
"append"
@
click=
"getWelList"
>
查询
</el-button>
</el-input>
</el-input>
<el-table
<el-table
ref=
"singleTable
"
v-loading=
"welLoading
"
:data=
"
tableData
"
:data=
"
welList
"
:max-height=
"300"
:max-height=
"300"
:show-header=
"false"
:show-header=
"false"
highlight-current-row
highlight-current-row
@
current-change=
"handleCurrentChange"
@
current-change=
"(val) => (welSelected = val)"
style=
"width: 100%"
>
>
<el-table-column
property=
"date"
></el-table-column>
<el-table-column
<el-table-column
width=
"60"
show-overflow-tooltip
>
property=
"welcomeMsg"
show-overflow-tooltip
></el-table-column>
<el-table-column
width=
"60"
>
<template
slot-scope=
"
{ row }">
<template
slot-scope=
"
{ row }">
<i
<i
v-if=
"
row.checke
d"
v-if=
"
welSelected.id === row.i
d"
class=
"el-icon-check"
class=
"el-icon-check"
style=
"color: rgb(65, 133, 244); font-size: 25px;"
style=
"color: rgb(65, 133, 244); font-size: 25px;"
></i>
></i>
...
@@ -267,9 +285,7 @@ export default {
...
@@ -267,9 +285,7 @@ export default {
</div>
</div>
<div
slot=
"footer"
>
<div
slot=
"footer"
>
<el-button
@
click=
"dialogVisibleSelectWel = false"
>
取 消
</el-button>
<el-button
@
click=
"dialogVisibleSelectWel = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisibleSelectWel = false"
<el-button
type=
"primary"
@
click=
"selectWelcome"
>
确 定
</el-button>
>
确 定
</el-button
>
</div>
</div>
</el-dialog>
</el-dialog>
</div>
</div>
...
...
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