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
a6dd5135
Commit
a6dd5135
authored
Aug 21, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
process
parent
4c322e84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
100 deletions
+27
-100
process.vue
pages/import/process.vue
+27
-100
No files found.
pages/import/process.vue
View file @
a6dd5135
...
...
@@ -14,7 +14,7 @@
<span>
导入到
</span>
</FormItem>
<FormItem>
<dictionary
code=
"import.im.page"
style=
"width:160px"
></dictionary>
<dictionary
code=
"import.im.page"
style=
"width:160px"
@
on-change=
"pageChange"
></dictionary>
</FormItem>
<FormItem>
<div
class=
"tip mr20"
>
共
{{
excelData
.
length
}}
条数据
</div>
...
...
@@ -56,6 +56,7 @@
<
script
>
import
Api
from
"./api"
;
import
XLSX
from
"xlsx"
;
import
{
Switch
}
from
"view-design"
;
export
default
{
name
:
"Edit"
,
data
()
{
...
...
@@ -289,7 +290,7 @@ export default {
},
},
],
columns1
:
[
columns1
:
[
{
key
:
"userName"
,
title
:
this
.
l
(
"userName"
),
...
...
@@ -309,7 +310,7 @@ export default {
]);
},
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
...
...
@@ -317,96 +318,6 @@ export default {
high
:
true
,
code
:
"User.base.status"
,
},
{
key
:
"departmentId"
,
title
:
this
.
l
(
"departmentId"
),
align
:
"right"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"departmentTitle"
,
title
:
this
.
l
(
"departmentTitle"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"roleTitles"
,
title
:
this
.
l
(
"roleTitles"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
,
class
:
params
.
row
.
roleTitles
==
null
||
params
.
row
.
roleTitles
==
""
?
"empower"
:
"detail"
,
},
on
:
{
click
:
()
=>
this
.
authorize
(
params
.
row
.
id
)
},
},
params
.
row
.
roleTitles
==
null
||
params
.
row
.
roleTitles
==
""
?
"授权"
:
params
.
row
.
roleTitles
),
]);
},
},
{
key
:
"accountId"
,
title
:
this
.
l
(
"accountId"
),
hide
:
true
,
align
:
"left"
,
},
// {
// key: 'userType',
// title: this.l('userType'),
// hide: true,
// align: 'left'
// },
{
key
:
"phone"
,
title
:
this
.
l
(
"phone"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"email"
,
title
:
this
.
l
(
"email"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"licensedToWork"
,
title
:
this
.
l
(
"licensedToWork"
),
align
:
"left"
,
},
{
key
:
"positionId"
,
title
:
this
.
l
(
"positionId"
),
align
:
"left"
,
high
:
true
,
code
:
"User.base.position"
,
},
{
key
:
"titleId"
,
title
:
this
.
l
(
"titleId"
),
align
:
"left"
,
high
:
true
,
code
:
"User.base.jobtitle"
,
},
],
excelData
:
[
{
...
...
@@ -480,13 +391,7 @@ export default {
created
()
{
this
.
tdHeightExcel
=
window
.
innerHeight
-
180
;
//导出对列表头进行预加载start
let
tempCol
=
this
.
$u
.
clone
(
this
.
columns
);
tempCol
.
forEach
((
ele
,
index
)
=>
{
if
(
ele
.
key
==
"action"
)
{
ele
.
hide
=
true
;
}
});
this
.
columnsImport
=
tempCol
;
this
.
loadColum
(
this
.
columns
);
this
.
$api
.
get
(
`
${
systemUrl
}
/Department/GetDepartments`
).
then
((
r
)
=>
{
this
.
departArr
=
r
.
result
.
items
;
});
...
...
@@ -530,6 +435,16 @@ export default {
}
});
},
//重新处理colum
loadColum
(
columns
)
{
let
tempCol
=
this
.
$u
.
clone
(
columns
);
tempCol
.
forEach
((
ele
,
index
)
=>
{
if
(
ele
.
key
==
"action"
)
{
ele
.
hide
=
true
;
}
});
this
.
columnsImport
=
tempCol
;
},
//导入excel文件
async
beforeUpload
(
file
)
{
this
.
workBook
=
{};
...
...
@@ -627,6 +542,18 @@ export default {
sheetClick
(
val
)
{
this
.
dealSheet
(
val
);
},
pageChange
(
val
)
{
switch
(
val
)
{
case
0
:
this
.
loadColum
(
this
.
columns
);
break
;
case
1
:
this
.
loadColum
(
this
.
columns1
);
break
;
default
:
this
.
loadColum
(
this
.
columns
);
}
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
...
...
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