Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周远喜
mes-ui
Commits
7ca70bdf
Commit
7ca70bdf
authored
Aug 19, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user 导出
parent
25e010b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
17 deletions
+13
-17
index.vue
pages/basicData/user/index.vue
+13
-17
No files found.
pages/basicData/user/index.vue
View file @
7ca70bdf
...
...
@@ -242,7 +242,6 @@ export default {
title
:
this
.
l
(
"birthday"
),
align
:
"center"
,
high
:
true
,
hide
:
true
,
type
:
"date"
,
},
{
...
...
@@ -251,7 +250,6 @@ export default {
align
:
"left"
,
high
:
true
,
code
:
"User.base.degree"
,
hide
:
true
,
},
{
key
:
"status"
,
...
...
@@ -281,6 +279,7 @@ export default {
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
...
...
@@ -306,25 +305,21 @@ export default {
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
hide
:
true
,
align
:
"left"
,
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
hide
:
true
,
align
:
"left"
,
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
l
(
"lastModifierUserId"
),
hide
:
true
,
align
:
"left"
,
},
{
key
:
"lastModificationTime"
,
title
:
this
.
l
(
"lastModificationTime"
),
hide
:
true
,
align
:
"left"
,
},
{
...
...
@@ -352,13 +347,11 @@ export default {
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
},
{
key
:
"licensedToWork"
,
title
:
this
.
l
(
"licensedToWork"
),
align
:
"left"
,
hide
:
true
,
},
{
key
:
"positionId"
,
...
...
@@ -366,7 +359,6 @@ export default {
align
:
"left"
,
high
:
true
,
code
:
"User.base.position"
,
hide
:
true
,
},
{
key
:
"titleId"
,
...
...
@@ -374,7 +366,6 @@ export default {
align
:
"left"
,
high
:
true
,
code
:
"User.base.jobtitle"
,
hide
:
true
,
},
{
title
:
"操作"
,
...
...
@@ -835,20 +826,22 @@ export default {
this
.
searchs
.
pageIndex
=
1
;
this
.
searchs
.
conditions
=
where
;
this
.
searchs
.
pageSize
=
1000
;
this
.
$api
.
post
(
this
.
action
,
this
.
searchs
).
then
((
r
)
=>
{
this
.
list
=
r
.
result
.
items
;
const
tHeader
=
[];
// 设置Excel的表格第一行的标题
const
filterVal
=
[];
//list里对象的属性
var
tempCol
=
[];
var
columnsCur
=
this
.
$refs
.
grid
.
columnsCur
;
//导出列信息
var
columnsCur
=
this
.
columns
;
//导出列标题信息griddata this.$refs.grid.columnsCur
columnsCur
.
forEach
((
el
)
=>
{
if
(
!
el
.
hide
&&
el
.
key
!=
"action"
)
{
if
(
el
.
code
)
{
tHeader
.
push
(
el
.
key
+
"DirName"
);
filterVal
.
push
(
el
.
key
+
"DirName"
);
tempCol
.
push
({
key
:
el
.
key
+
"DirName"
,
code
:
el
.
code
});
//临时存放code数据字典的字段及对应的数据字典code
//tHeader.push(el.key + "DirName");
//filterVal.push(el.key + "DirName");
//tempCol.push({ key: el.key + "DirName", code: el.code }); //临时存放code数据字典的字段及对应的数据字典code
tempCol
.
push
({
key
:
el
.
key
,
code
:
el
.
code
});
//临时存放code数据字典的字段及对应的数据字典code
}
tHeader
.
push
(
el
.
key
);
tHeader
.
push
(
this
.
l
(
el
.
key
)
);
filterVal
.
push
(
el
.
key
);
}
});
...
...
@@ -857,7 +850,7 @@ export default {
tempCol
.
forEach
((
ele
)
=>
{
e
[
ele
.
key
]
=
this
.
$u
.
dirName
(
this
.
$store
.
getters
.
dictionaryByKey
(
ele
.
code
),
e
[
ele
.
key
.
substring
(
0
,
ele
.
key
.
length
-
7
)
]
e
[
ele
.
key
]
);
});
});
...
...
@@ -880,6 +873,7 @@ export default {
ApiDepart
.
getpaged
().
then
((
r
)
=>
{
this
.
departArr
=
r
.
result
.
items
;
});
console
.
log
(
this
.
columnImport
)
},
//导入excel文件
async
beforeUpload
(
file
)
{
...
...
@@ -893,6 +887,7 @@ export default {
sheet2JSONOpts
);
this
.
$refs
.
uploadfile
.
clearFiles
();
//清除上一次上传文件列表
//对读取的excel文件数据进行处理
var
tempColums
=
tempList
[
0
];
//必须保证excel第一行数据行DirName有数据值,否则取不到所有的标题
var
arrTitle
=
Object
.
keys
(
tempColums
);
...
...
@@ -948,8 +943,9 @@ export default {
}
});
});
this
.
excelData
=
tempList
;
//
console.log(workbook);
console
.
log
(
workbook
);
return
false
;
},
//确定批量导入
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment