Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
仟微科技
Link Wechat
提交
50e613f5
Link Wechat
项目概览
仟微科技
/
Link Wechat
通知
48
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Link Wechat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
50e613f5
编写于
11月 22, 2020
作者:
X
xinlaa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
员工活码接口调试等
上级
5b061b16
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
128 addition
and
48 deletion
+128
-48
linkwe-ui/src/api/common.js
linkwe-ui/src/api/common.js
+16
-0
linkwe-ui/src/api/drainageCode/staff.js
linkwe-ui/src/api/drainageCode/staff.js
+31
-3
linkwe-ui/src/components/SelectMaterial/index.vue
linkwe-ui/src/components/SelectMaterial/index.vue
+7
-2
linkwe-ui/src/components/SelectUser.vue
linkwe-ui/src/components/SelectUser.vue
+20
-5
linkwe-ui/src/views/drainageCode/staff/add.vue
linkwe-ui/src/views/drainageCode/staff/add.vue
+54
-38
未找到文件。
linkwe-ui/src/api/common.js
0 → 100644
浏览文件 @
50e613f5
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
浏览文件 @
50e613f5
...
...
@@ -79,7 +79,8 @@ export function update(data) {
"weEmpleCodeTags": [{
"tagId": "标签id",
"tagName": "标签"
}]
}],
mediaId: ''
}
*/
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
)
{
return
request
({
...
...
@@ -100,3 +113,18 @@ export function remove(id) {
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
浏览文件 @
50e613f5
...
...
@@ -19,6 +19,11 @@ export default {
type
:
String
,
default
:
'
0
'
,
},
// 显示哪些素材类型标签
showArr
:
{
type
:
Array
,
default
:
()
=>
[
0
,
1
],
},
},
data
()
{
return
{
...
...
@@ -66,11 +71,11 @@ export default {
<el-dialog
title=
"选择素材"
:visible.sync=
"Pvisible"
width=
"650px"
>
<div>
<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>
<list
type=
"4"
@
change=
"changeText"
>
</list>
</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>
<list
type=
"0"
@
change=
"changeImage"
>
</list>
</el-tab-pane>
...
...
linkwe-ui/src/components/SelectUser.vue
浏览文件 @
50e613f5
...
...
@@ -19,6 +19,11 @@ export default {
type
:
Boolean
,
default
:
true
,
},
// 是否单选
isSigleSelect
:
{
type
:
Boolean
,
default
:
false
,
},
},
data
()
{
let
isOnlyLeaf
=
this
.
isOnlyLeaf
...
...
@@ -60,7 +65,7 @@ export default {
element
.
key
=
createUniqueString
()
})
let
_data
=
this
.
handleTree
(
data
)
console
.
log
(
'
d
'
,
data
)
//
console.log('d', data)
resolve
(
_data
)
// api.getList({ department: _data[0].id }).then(({ rows, total }) => {
// _data && rows.unshift(..._data);
...
...
@@ -77,16 +82,26 @@ export default {
})
}
},
// 选择变化
handleCheckChange
(
data
,
checked
,
indeterminate
)
{
checked
?
this
.
userList
.
push
(
data
)
:
this
.
userList
.
splice
(
this
.
userList
.
indexOf
(
data
),
1
)
debugger
if
(
checked
)
{
if
(
this
.
isSigleSelect
)
{
// 单选清空
let
userList
=
[]
}
this
.
userList
.
push
(
data
)
}
else
{
this
.
userList
.
splice
(
this
.
userList
.
indexOf
(
data
),
1
)
}
// console.log(data, checked, indeterminate);
},
// 确 定
submit
()
{
this
.
Pvisible
=
false
this
.
$emit
(
'
success
'
,
this
.
userList
)
},
// 取消选择
cancle
(
key
)
{
this
.
$refs
.
tree
.
setChecked
(
key
,
false
)
},
...
...
@@ -108,7 +123,7 @@ setChecked
lazy
accordion
show-checkbox
check-on-click-node
:check-on-click-node=
"false"
:expand-on-click-node=
"true"
:load=
"loadNode"
:props=
"defaultProps"
...
...
linkwe-ui/src/views/drainageCode/staff/add.vue
浏览文件 @
50e613f5
<
script
>
import
{
getDetail
,
add
,
update
}
from
'
@/api/drainageCode/staff
'
import
{
getList
}
from
'
@/api/drainageCode/welcome
'
import
PhoneDialog
from
'
@/components/PhoneDialog
'
import
SelectUser
from
'
@/components/SelectUser
'
import
SelectTag
from
'
@/components/SelectTag
'
import
SelectMaterial
from
'
@/components/SelectMaterial
'
export
default
{
components
:
{
PhoneDialog
,
SelectTag
,
SelectUser
},
components
:
{
PhoneDialog
,
SelectTag
,
SelectUser
,
SelectMaterial
},
data
()
{
return
{
dialogVisibleSelectUser
:
false
,
dialogVisibleSelectTag
:
false
,
dialogVisibleSelectMaterial
:
false
,
dialogVisibleSelectWel
:
false
,
// 遮罩层
loading
:
false
,
...
...
@@ -19,32 +22,13 @@ export default {
weEmpleCodeTags
:
[],
weEmpleCodeUseScops
:
[],
},
tableData
:
[
{
date
:
'
2016-05-02
'
,
name
:
'
王小虎
'
,
address
:
'
上海市普陀区金沙江路 1518 弄
'
,
},
{
date
:
'
2016-05-04
'
,
name
:
'
王小虎
'
,
address
:
'
上海市普陀区金沙江路 1517 弄
'
,
},
{
date
:
'
2016-05-01
'
,
name
:
'
王小虎
'
,
address
:
'
上海市普陀区金沙江路 1519 弄
'
,
},
{
date
:
'
2016-05-03
'
,
name
:
'
王小虎
'
,
address
:
'
上海市普陀区金沙江路 1516 弄
'
,
},
],
welQuery
:
{
welcomeMsg
:
''
},
welLoading
:
false
,
welList
:
[],
welSelected
:
{},
}
},
created
()
{
debugger
let
id
=
this
.
$route
.
query
.
id
id
&&
this
.
getData
(
id
)
},
...
...
@@ -64,6 +48,8 @@ export default {
tagName
:
d
.
name
,
}))
},
// 选择素材确认按钮
submitSelectMaterial
(
text
,
image
,
file
)
{},
/** 获取详情 */
getData
(
id
)
{
this
.
loading
=
true
...
...
@@ -72,6 +58,20 @@ export default {
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
()
{
this
.
loading
=
true
add
(
this
.
form
).
then
(({
data
})
=>
{
...
...
@@ -170,13 +170,18 @@ export default {
>
添加图片
</el-button
>
</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-button
icon=
"el-icon-plus"
type=
"primary"
size=
"mini"
@
click=
"
dialogVisibleSelectWel = true
"
@
click=
"
getWelList(), (dialogVisibleSelectWel = true)
"
>
从欢迎语模板选取
</el-button
>
<div
class=
"tip"
>
...
...
@@ -217,9 +222,11 @@ export default {
<!-- 选择使用员工弹窗 -->
<SelectUser
:key=
"form.codeType"
:visible.sync=
"dialogVisibleSelectUser"
title=
"选择使用员工"
:isOnlyLeaf=
"false"
:isSigleSelect=
"form.codeType == 1"
@
success=
"selectedUser"
></SelectUser>
...
...
@@ -231,6 +238,15 @@ export default {
>
</SelectTag>
<!-- 选择素材弹窗 -->
<SelectMaterial
:visible.sync=
"dialogVisibleSelectMaterial"
type=
"1"
:showArr=
"[1]"
@
success=
"submitSelectMaterial"
>
</SelectMaterial>
<el-dialog
title=
"选择欢迎语"
:visible.sync=
"dialogVisibleSelectWel"
...
...
@@ -240,24 +256,26 @@ export default {
<el-input
class=
"welcome-input"
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-table
ref=
"singleTable
"
:data=
"
tableData
"
v-loading=
"welLoading
"
:data=
"
welList
"
:max-height=
"300"
:show-header=
"false"
highlight-current-row
@
current-change=
"handleCurrentChange"
style=
"width: 100%"
@
current-change=
"(val) => (welSelected = val)"
>
<el-table-column
property=
"date"
></el-table-column>
<el-table-column
width=
"60"
show-overflow-tooltip
>
<el-table-column
property=
"welcomeMsg"
show-overflow-tooltip
></el-table-column>
<el-table-column
width=
"60"
>
<template
slot-scope=
"
{ row }">
<i
v-if=
"
row.checke
d"
v-if=
"
welSelected.id === row.i
d"
class=
"el-icon-check"
style=
"color: rgb(65, 133, 244); font-size: 25px;"
></i>
...
...
@@ -267,9 +285,7 @@ export default {
</div>
<div
slot=
"footer"
>
<el-button
@
click=
"dialogVisibleSelectWel = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisibleSelectWel = false"
>
确 定
</el-button
>
<el-button
type=
"primary"
@
click=
"selectWelcome"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录