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
56358d80
Commit
56358d80
authored
May 24, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加导出
parent
a8cd38c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
1 deletion
+44
-1
index.vue
src/views/baseInfo/branchCompany/index.vue
+22
-1
index.vue
src/views/baseInfo/campsite/index.vue
+22
-0
No files found.
src/views/baseInfo/branchCompany/index.vue
View file @
56358d80
...
...
@@ -14,11 +14,14 @@
<el-option
v-for=
"item in cityRegions4Query"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
v-if=
"branchCompany_btn_add"
style=
"margin-left: 10px;"
@
click=
"handleCreate"
type=
"primary"
icon=
"edit"
>
添加
</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>
</el-form>
</div>
...
...
@@ -167,6 +170,7 @@
</template>
<
script
>
import
axios
from
'axios'
;
import
{
page
,
addObj
,
...
...
@@ -522,6 +526,23 @@
}
});
},
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/importExcel'
,
formData
,
config
).
then
(
function
(
res
)
{
if
(
res
.
status
===
2000
)
{
/*这里做处理*/
}
})
},
resetTemp
()
{
this
.
form
=
{
id
:
undefined
,
...
...
src/views/baseInfo/campsite/index.vue
View file @
56358d80
...
...
@@ -19,6 +19,10 @@
<el-button
class=
"filter-item"
v-if=
"campsite_btn_add"
style=
"margin-left: 10px;"
@
click=
"handleCreate"
type=
"primary"
icon=
"edit"
>
添加
</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>
</el-form>
</div>
...
...
@@ -167,6 +171,7 @@
</template>
<
script
>
import
axios
from
'axios'
;
import
{
page
,
addObj
,
...
...
@@ -498,6 +503,23 @@
}
});
},
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/campsite/importExcel'
,
formData
,
config
).
then
(
function
(
res
)
{
if
(
res
.
status
===
2000
)
{
/*这里做处理*/
}
})
},
cancel
(
formName
)
{
this
.
dialogFormVisible
=
false
;
this
.
$refs
[
formName
].
resetFields
();
...
...
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