Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-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
youjj
cloud-platform-ui
Commits
20387399
Commit
20387399
authored
May 06, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加导入按钮
parent
a466a462
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
index.vue
src/views/branchCompany/stock/index.vue
+22
-0
No files found.
src/views/branchCompany/stock/index.vue
View file @
20387399
...
@@ -7,6 +7,10 @@
...
@@ -7,6 +7,10 @@
<el-button
class=
"filter-item"
v-if=
"btn_add"
style=
"margin-left: 10px;"
@
click=
"handleCreate"
<el-button
class=
"filter-item"
v-if=
"btn_add"
style=
"margin-left: 10px;"
@
click=
"handleCreate"
type=
"primary"
icon=
"edit"
>
添加
type=
"primary"
icon=
"edit"
>
添加
</el-button>
</el-button>
<form
methods=
"post"
enctype=
"multipart/form-data"
style=
"display:inline-block;margin-left:10px;;"
>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
@
click=
"choiceImg"
>
导入
</el-button>
<input
ref=
"filElem"
type=
"file"
name=
"file"
class=
"upload-file"
@
change=
"getFile($event)"
style=
"display:none;"
>
</form>
</div>
</div>
<el-table
:key=
'tableKey'
:data=
"list"
v-loading
.
body=
"listLoading"
<el-table
:key=
'tableKey'
:data=
"list"
v-loading
.
body=
"listLoading"
...
@@ -136,6 +140,7 @@
...
@@ -136,6 +140,7 @@
getToken
getToken
}
from
'utils/auth'
;
}
from
'utils/auth'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
mapGetters
}
from
'vuex'
;
import
axios
from
'axios'
;
import
rsCode
from
'../../../utils/rsCode'
;
import
rsCode
from
'../../../utils/rsCode'
;
export
default
{
export
default
{
...
@@ -417,6 +422,23 @@
...
@@ -417,6 +422,23 @@
this
.
listQuery
.
limit
=
val
;
this
.
listQuery
.
limit
=
val
;
this
.
getList
();
this
.
getList
();
},
},
choiceImg
(){
this
.
$refs
.
filElem
.
dispatchEvent
(
new
MouseEvent
(
'click'
))
},
getFile
(
event
){
let
formData
=
new
FormData
();
formData
.
append
(
'file'
,
event
.
target
.
files
[
0
]);
let
config
=
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
}
axios
.
post
(
'/vehicle/branchCompany/stock/importExcel'
,
formData
,
config
).
then
(
function
(
res
)
{
if
(
res
.
status
===
2000
)
{
/*这里做处理*/
}
})
},
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
listQuery
.
page
=
val
;
this
.
listQuery
.
page
=
val
;
this
.
getList
();
this
.
getList
();
...
...
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