Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cdsf-static-bg
Project
Overview
Details
Activity
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
姜雷
cdsf-static-bg
Commits
7b4f8b79
Commit
7b4f8b79
authored
Oct 31, 2018
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加导出
parent
10b1d039
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
3 deletions
+40
-3
fetch.js
src/api/fetch.js
+1
-1
publicCar.js
src/api/management/publicCar.js
+13
-0
repair.js
src/api/management/repair.js
+14
-0
publicCar.vue
src/containers/management/publicCar/publicCar.vue
+6
-1
repair.vue
src/containers/management/repair/repair.vue
+6
-1
No files found.
src/api/fetch.js
View file @
7b4f8b79
...
...
@@ -45,7 +45,7 @@ service.interceptors.response.use(response => {
if
(
res
.
code
!==
1000
)
{
if
(
response
.
headers
&&
response
.
headers
[
'content-type'
]
===
'application/octet-stream'
/application
\/
octet-stream/
.
test
(
response
.
headers
[
'content-type'
])
)
{
return
response
;
}
...
...
src/api/management/publicCar.js
View file @
7b4f8b79
import
fetch
from
'@/api/fetch'
;
import
downloadUrl
from
'@/utils/download'
;
export
const
fetchApplyList
=
entity
=>
fetch
({
...
...
@@ -13,3 +14,15 @@ export const dealApply = entity =>
method
:
'post'
,
data
:
entity
,
});
export
const
exportApplyList
=
entity
=>
fetch
({
url
:
'/publicCar/export/manager/teacherAppoCar'
,
method
:
'post'
,
data
:
entity
,
responseType
:
'blob'
,
timeout
:
120000
,
}).
then
(
res
=>
{
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
res
.
headers
});
let
fileName
=
res
.
headers
[
'content-disposition'
].
split
(
'='
)[
1
];
downloadUrl
(
blob
,
fileName
);
});
src/api/management/repair.js
View file @
7b4f8b79
import
fetch
from
'@/api/fetch'
;
import
downloadUrl
from
'@/utils/download'
;
export
const
fetchApplyList
=
entity
=>
fetch
({
...
...
@@ -13,3 +14,16 @@ export const dealApply = entity =>
method
:
'post'
,
data
:
entity
,
});
export
const
exportApplyList
=
entity
=>
fetch
({
url
:
'/repair/export/manager/userRepair'
,
method
:
'post'
,
data
:
entity
,
responseType
:
'blob'
,
timeout
:
120000
,
}).
then
(
res
=>
{
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
res
.
headers
});
let
fileName
=
res
.
headers
[
'content-disposition'
].
split
(
'='
)[
1
];
downloadUrl
(
blob
,
fileName
);
});
src/containers/management/publicCar/publicCar.vue
View file @
7b4f8b79
...
...
@@ -22,6 +22,7 @@
</el-date-picker>
</div>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"searchList"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-download"
@
click=
"exportList"
>
导出
</el-button>
</el-form>
<div
class=
"tabel-wrap"
>
<el-table
border
v-loading=
"loading"
:data=
"list"
style=
"width: 100%"
>
...
...
@@ -161,7 +162,7 @@
import
listMixin
from
'@/mixin/listPage.js'
;
import
{
mapGetters
,
mapActions
}
from
'vuex'
;
import
store
from
'./store.js'
;
import
{
dealApply
}
from
'@/api/management/publicCar.js'
;
import
{
dealApply
,
exportApplyList
}
from
'@/api/management/publicCar.js'
;
// import printJS from 'print-js';
export
default
{
...
...
@@ -227,6 +228,10 @@ export default {
let
item
=
list
.
find
(
item
=>
item
.
checked
);
return
item
?
item
.
name
:
''
;
},
exportList
()
{
const
filters
=
this
.
getFilters
();
exportApplyList
(
filters
);
},
showEditDialog
(
type
,
data
)
{
this
.
editType
=
type
;
if
(
this
.
carPlateOptions
.
length
==
0
)
{
...
...
src/containers/management/repair/repair.vue
View file @
7b4f8b79
...
...
@@ -31,6 +31,7 @@
</el-date-picker>
</div>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"searchList"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-download"
@
click=
"exportList"
>
导出
</el-button>
</el-form>
<div
class=
"tabel-wrap"
>
<el-table
border
v-loading=
"loading"
:data=
"list"
style=
"width: 100%"
>
...
...
@@ -106,7 +107,7 @@
import
listMixin
from
'@/mixin/listPage.js'
;
import
{
mapGetters
,
mapActions
}
from
'vuex'
;
import
store
from
'./store.js'
;
import
{
dealApply
}
from
'@/api/management/repair.js'
;
import
{
dealApply
,
exportApplyList
}
from
'@/api/management/repair.js'
;
export
default
{
beforeRouteEnter
(
to
,
from
,
next
)
{
...
...
@@ -171,6 +172,10 @@ export default {
let
item
=
this
.
dealStateOptions
.
find
(
item
=>
item
.
value
==
val
);
return
item
?
item
.
label
:
val
;
},
exportList
()
{
const
filters
=
this
.
getFilters
();
exportApplyList
(
filters
);
},
showEditDialog
(
type
,
data
)
{
this
.
editType
=
type
;
this
.
selected
=
{
...
...
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