Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
SHR
/
tFIMS
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 283f9383
authored
Sep 02, 2019
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
导入按钮
1 parent
a4cfe44f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
29 deletions
src/components/d2-auth/d2-auth-btn.vue
src/router/routes.js
src/views/deviceManagement/index.vue
src/components/d2-auth/d2-auth-btn.vue
View file @
283f938
...
@@ -6,11 +6,7 @@
...
@@ -6,11 +6,7 @@
v-if=
"isInRole"
v-if=
"isInRole"
@
click=
"handleClick"
@
click=
"handleClick"
>
{{
label
}}
>
{{
label
}}
<input
v-if=
"label == '导入'"
<slot></slot>
type=
"file"
class=
"import-input"
:accept=
"accept"
@
change=
"handleImport"
/>
</el-button>
</el-button>
</
template
>
</
template
>
...
@@ -42,10 +38,6 @@ export default {
...
@@ -42,10 +38,6 @@ export default {
id
:
{
id
:
{
type
:
String
,
type
:
String
,
default
:
null
default
:
null
},
accept
:
{
type
:
String
,
default
:
null
}
}
},
},
computed
:
{
computed
:
{
...
@@ -67,23 +59,10 @@ export default {
...
@@ -67,23 +59,10 @@ export default {
methods
:
{
methods
:
{
handleClick
:
function
()
{
handleClick
:
function
()
{
this
.
$emit
(
'e-auth-click'
,
{})
this
.
$emit
(
'e-auth-click'
,
{})
},
handleImport
(
e
)
{
this
.
$emit
(
'import-file'
,
e
)
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.import-input
{
opacity
:
0
;
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
70px
;
height
:
100%
;
cursor
:
pointer
;
font-size
:
0
}
</
style
>
</
style
>
src/router/routes.js
View file @
283f938
...
@@ -181,7 +181,7 @@ export const resources = {
...
@@ -181,7 +181,7 @@ export const resources = {
}]
}]
},
},
'104'
:
{
'104'
:
{
path
:
'/
traffic
Management'
,
path
:
'/
device
Management'
,
icon
:
'train'
,
icon
:
'train'
,
name
:
'物料管理'
,
name
:
'物料管理'
,
meta
:
{
meta
:
{
...
...
src/views/deviceManagement/index.vue
View file @
283f938
...
@@ -32,14 +32,12 @@
...
@@ -32,14 +32,12 @@
label=
"导入"
label=
"导入"
class=
"import-button"
class=
"import-button"
type=
""
type=
""
accept=
".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@
import-file=
"importFile"
>
>
<
!--
<
input
<input
type=
"file"
type=
"file"
class=
"import-input"
class=
"import-input"
accept=
".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
accept=
".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@
change=
"importFile($event)"
/>
-->
@
change=
"importFile($event)"
/>
</auth-button>
</auth-button>
<auth-button
label=
"导出"
type=
""
></auth-button>
<auth-button
label=
"导出"
type=
""
></auth-button>
</el-col>
</el-col>
...
@@ -301,7 +299,7 @@ export default {
...
@@ -301,7 +299,7 @@ export default {
position
:
relative
;
position
:
relative
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
/*
.import-input {
.import-input
{
opacity
:
0
;
opacity
:
0
;
position
:
absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
...
@@ -310,5 +308,5 @@ export default {
...
@@ -310,5 +308,5 @@ export default {
height
:
100%
;
height
:
100%
;
cursor
:
pointer
;
cursor
:
pointer
;
font-size
:
0
font-size
:
0
}
*/
}
</
style
>
</
style
>
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