Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
workbook
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
黄志强
workbook
Commits
90f68610
提交
90f68610
authored
5月 29, 2020
作者:
黄志强
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改
上级
ce7468dc
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
102 行增加
和
12 行删除
+102
-12
vue-tree.css
src/assets/css/vue-tree.css
+1
-0
approvalDetailDialog.vue
src/components/approvalDetailDialog.vue
+1
-1
AddressBook.vue
src/views/addressBook/AddressBook.vue
+100
-11
没有找到文件。
src/assets/css/vue-tree.css
浏览文件 @
90f68610
...
@@ -95,6 +95,7 @@
...
@@ -95,6 +95,7 @@
table-layout
:
fixed
;
table-layout
:
fixed
;
width
:
100%
;
width
:
100%
;
height
:
36px
;
height
:
36px
;
font-size
:
18px
;
border
:
1px
solid
#ddd
;
border
:
1px
solid
#ddd
;
border-radius
:
5px
;
border-radius
:
5px
;
background
:
#fff
;
background
:
#fff
;
...
...
src/components/approvalDetailDialog.vue
浏览文件 @
90f68610
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<span>
{{
approvalDetail
.
approvalType
}}
</span>
<span>
{{
approvalDetail
.
approvalType
}}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"姓名"
>
<el-form-item
label=
"姓名"
>
<div>
{{
approvalDetail
.
n
ame
}}
</div>
<div>
{{
approvalDetail
.
userN
ame
}}
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"请假开始时间"
>
<el-form-item
label=
"请假开始时间"
>
<div>
{{
approvalDetail
.
leaveStartTime
}}
</div>
<div>
{{
approvalDetail
.
leaveStartTime
}}
</div>
...
...
src/views/addressBook/AddressBook.vue
浏览文件 @
90f68610
<!-- 用户管理 -->
<!-- 用户管理 -->
<
template
>
<
template
>
<div
class=
'consumerManage'
>
<div
class=
'consumerManage'
>
<!--
<div
class=
"searchAdd"
>
<div
class=
"searchAdd"
>
<el-button
@
click=
"addUser"
style=
"float: right;margin-right: 30px;"
type=
"primary"
icon=
"el-icon-plus"
>
导入通讯录
</el-button>
<span
style=
"margin-right: 10px;"
>
部门
</span>
<el-button
@
click=
"postExportAddress"
style=
"float: right;margin-right: 30px;"
type=
"primary"
icon=
"el-icon-plus"
>
导出通讯录
</el-button>
<Treeselect
<el-button
@
click=
"postDownloadAddress"
style=
"float: right;margin-right: 30px;"
type=
"primary"
icon=
"el-icon-plus"
>
下载模板
</el-button>
style=
"display: inline-block;width: 30%;vertical-align: middle;"
</div>
-->
name=
"demo"
:clearable=
"false"
:searchable=
"false"
:open-on-click=
"true"
:open-on-focus=
"true"
:alwaysOpen=
"false"
:options=
"departmentOptions"
:default-expand-level=
"1"
:max-height=
"400"
placeholder=
"请选择部门"
v-model=
"department"
@
select=
"selectChangeTree"
/>
<!--
<span
style=
"margin-left: 50px;margin-right: 10px;"
>
姓名
</span>
-->
<!--
<el-input
v-model=
"userName"
style=
"width: 20%;"
placeholder=
"请输入要查找的姓名"
></el-input>
-->
<!--
<el-button
type=
"primary"
style=
"float: right;"
@
click=
"findUser"
>
查询
</el-button>
-->
</div>
<div
style=
"padding: 20px 0 24px;clear: both;"
>
<div
style=
"padding: 20px 0 24px;clear: both;"
>
<el-table
<el-table
v-show=
"showLi === false"
v-show=
"showLi === false"
:data=
"addressList"
:data=
"addressList"
style=
"width: 100%"
>
style=
"width: 100%"
>
<el-table-column
<el-table-column
prop=
"workerNum"
type=
"index"
:index=
"indexMethod"
align=
"center"
align=
"center"
label=
"工号"
>
width=
"100"
label=
"序号"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"name"
prop=
"name"
...
@@ -56,11 +74,12 @@
...
@@ -56,11 +74,12 @@
<
script
>
<
script
>
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//例如:import 《组件名称》 from '《组件路径》';
//例如:import 《组件名称》 from '《组件路径》';
import
Treeselect
from
'@riophae/vue-treeselect'
;
import
'../../assets/css/vue-tree.css'
;
export
default
{
export
default
{
name
:
"Consumer"
,
name
:
"Consumer"
,
//import引入的组件需要注入到对象中才能使用
//import引入的组件需要注入到对象中才能使用
components
:
{},
components
:
{
Treeselect
},
data
()
{
data
()
{
//这里存放数据
//这里存放数据
return
{
return
{
...
@@ -68,7 +87,11 @@
...
@@ -68,7 +87,11 @@
showLi
:
false
,
showLi
:
false
,
currentPage
:
1
,
currentPage
:
1
,
pageSize
:
10
,
pageSize
:
10
,
total
:
0
total
:
0
,
department
:
null
,
departmentOptions
:
[],
userName
:
''
,
loginData
:
''
,
};
};
},
},
//监听属性 类似于data概念
//监听属性 类似于data概念
...
@@ -77,8 +100,66 @@
...
@@ -77,8 +100,66 @@
watch
:
{},
watch
:
{},
//方法集合
//方法集合
methods
:
{
methods
:
{
getDepartment
()
{
this
.
$axios
.
postDepartmentList
().
then
((
res
)
=>
{
// console.log(res)
if
(
res
.
request
.
status
===
200
)
{
let
jsonData
=
JSON
.
stringify
(
res
.
data
);
jsonData
=
jsonData
.
replace
(
/departments/g
,
'children'
);
jsonData
=
jsonData
.
replace
(
/name/g
,
'label'
);
// console.log(JSON.parse(jsonData))
let
parseData
=
JSON
.
parse
(
jsonData
);
// this.departmentOptions = JSON.parse(jsonData);
this
.
doSearch
(
parseData
)
}
})
},
setName
(
datas
){
//遍历树 获取id数组
for
(
let
i
in
datas
){
if
(
datas
[
i
].
children
.
length
===
0
)
{
delete
datas
[
i
].
children
;
}
if
(
datas
[
i
].
children
){
this
.
setName
(
datas
[
i
].
children
);
}
}
this
.
departmentOptions
=
datas
;
return
datas
;
// this.department = datas[0].id;
// this.doSearch(datas[0].id);
},
async
doSearch
(
val
)
{
let
result
=
await
this
.
setName
(
val
);
// console.log(result)
this
.
department
=
result
[
0
].
id
;
this
.
getPersonList
(
result
[
0
].
id
)
},
getPersonList
(
val
){
let
obj
=
{
"deId"
:
val
,
"currentPage"
:
this
.
currentPage
,
"pageSize"
:
this
.
pageSize
}
this
.
$axios
.
postAllAddress
(
obj
).
then
((
res
)
=>
{
this
.
addressList
=
res
.
data
.
rows
;
this
.
total
=
res
.
data
.
totalCount
;
})
},
selectChangeTree
(
val
)
{
console
.
log
(
val
)
console
.
log
(
this
.
department
)
this
.
department
=
val
.
id
;
this
.
treeSearch
(
val
.
id
);
},
treeSearch
(
val
)
{
// 部门选择
console
.
log
(
val
)
this
.
department
=
val
;
this
.
currentPage
=
1
;
this
.
postAllAddress
();
},
postAllAddress
()
{
// 获取列表数据
postAllAddress
()
{
// 获取列表数据
let
obj
=
{
let
obj
=
{
"deId"
:
this
.
department
,
"currentPage"
:
this
.
currentPage
,
"currentPage"
:
this
.
currentPage
,
"pageSize"
:
this
.
pageSize
"pageSize"
:
this
.
pageSize
}
}
...
@@ -105,6 +186,12 @@
...
@@ -105,6 +186,12 @@
addUser
()
{
addUser
()
{
// this.$router.push({name: 'createConsumer'})
// this.$router.push({name: 'createConsumer'})
},
},
indexMethod
(
index
)
{
return
(
this
.
currentPage
-
1
)
*
this
.
pageSize
+
index
+
1
;
},
findUser
()
{
}
},
},
//生命周期 - 创建完成(可以访问当前this实例)
//生命周期 - 创建完成(可以访问当前this实例)
created
()
{
created
()
{
...
@@ -112,7 +199,9 @@
...
@@ -112,7 +199,9 @@
},
},
//生命周期 - 挂载完成(可以访问DOM元素)
//生命周期 - 挂载完成(可以访问DOM元素)
mounted
()
{
mounted
()
{
this
.
postAllAddress
();
this
.
loginData
=
JSON
.
parse
(
this
.
$Base64
.
decode
(
localStorage
.
getItem
(
'login'
)));
this
.
getDepartment
();
// this.postAllAddress();
},
},
beforeCreate
()
{
beforeCreate
()
{
},
//生命周期 - 创建之前
},
//生命周期 - 创建之前
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论