Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
jinmao-community-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c090f1e3
authored
May 27, 2021
by
袁晓帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改IE下不能下载和不能的导出问题
parent
0f1567b3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
8 deletions
+39
-8
config/index.js
+1
-1
src/components/page/IOC/sellCarport.vue
+36
-5
src/main.js
+2
-2
static/xls/出售车位模板.xls
+0
-0
No files found.
config/index.js
View file @
c090f1e3
...
...
@@ -12,7 +12,7 @@ module.exports = {
assetsPublicPath
:
'/'
,
// proxyTable: {
// '/api': {
// target: 'https://
test-witcase.chinajinmao.cn
',
// target: 'https://
iotservice-test.jinmaodigital.com/service
',
// changeOrigin: true,
// pathRewrite: {
// '^/api': ''
...
...
src/components/page/IOC/sellCarport.vue
View file @
c090f1e3
...
...
@@ -3,19 +3,26 @@
<div>
<div
class=
"mainContent tableCont"
>
<div
class=
"tabCont"
>
<div
style=
"display: flex;align-items: center;"
>
<el-button
class=
"addBtn"
@
click=
"addBtn"
v-if=
"isAddBtn"
>
<img
src=
"../../../../static/img/add.png"
class=
"addIcon"
/>
<span>
新增
</span>
</el-button>
<el-button
class=
"addBtn"
@
click=
"upload(1)"
v-if=
"isDownloadBtn"
><span>
导入模板下载
</span></el-button>
<el-button
class=
"addBtn"
v-if=
"isImportBtn"
>
<div
class=
"filebutton"
v-if=
"isImportBtn"
>
<div>
数据导入
</div>
<input
id=
"fileinp"
type=
"file"
name=
"fn"
@
change=
"UploadImage"
ref=
"inputer"
/>
</div>
<!--
<el-button
class=
"addBtn"
>
<el-upload
ref=
"upload"
action=
"string"
:before-upload=
"onBeforeUploadImage"
accept=
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel "
:http-request=
"UploadImage"
:show-file-list=
"false"
style=
"width: 80px;"
>
<span>
数据导入
</span>
</el-upload>
</el-button
>
</el-button>
--
>
<el-button
class=
"addBtn"
@
click=
"upload(3)"
v-if=
"isCarExportBtn"
>
<span>
数据导出
</span>
</el-button>
</div>
<div
v-if=
"adddialogVisible"
style=
"display: flex;align-items: center;padding-bottom: 10px;"
>
<el-form
:model=
"addForm"
label-width=
"80px"
style=
"display: flex;"
:rules=
"rules"
>
<el-form-item
label=
"所在楼层"
prop=
"floor"
>
...
...
@@ -28,7 +35,7 @@
<el-input
:rows=
"5"
v-model=
"addForm.carNumber"
placeholder=
"请输入车位编号"
style=
"width: 150px;"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer text-center"
style=
"margin-left: 10px;"
>
<div
slot=
"footer"
class=
"dialog-footer text-center"
style=
"margin-left: 10px;
height: 40px;
"
>
<el-button
type=
"primary"
v-on:click=
"addsubmit(type)"
>
保存
</el-button>
<el-button
class=
"ml10"
@
click=
"adddialogVisible = false"
>
取消
</el-button>
</div>
...
...
@@ -207,8 +214,12 @@ export default {
},
// 文件提交
UploadImage
(
param
)
{
let
formData
=
new
FormData
()
formData
.
append
(
'file'
,
param
.
file
)
// 要提交给后台的文件
var
inputDOM
=
this
.
$refs
.
inputer
;
var
file
=
inputDOM
.
files
;
var
formData
=
new
FormData
();
formData
.
append
(
'file'
,
file
[
0
]);
console
.
log
(
file
[
0
])
this
.
$axios
({
method
:
'post'
,
url
:
'/carParking/carImport'
,
...
...
@@ -356,4 +367,24 @@ export default {
.modelBox
{
padding-right
:
15px
;
}
.filebutton
{
position
:
relative
;
display
:
inline-block
;
overflow
:
hidden
;
border
:
1px
solid
#DF9F01
;
padding
:
4px
20px
!important
;
border-radius
:
4px
;
}
.filebutton
input
{
position
:
absolute
;
top
:
0
;
opacity
:
0
;
font-size
:
100px
;
}
.filebutton
div
{
font-size
:
12px
;
background-color
:
#FFFFFF
!important
;
color
:
#DF9F01
!important
;
border-color
:
#DF9F01
!important
;
}
</
style
>
src/main.js
View file @
c090f1e3
...
...
@@ -44,7 +44,7 @@ axios.interceptors.request.use(config => {
})
// 设置拦截器
axios
.
interceptors
.
response
.
use
(
function
(
response
)
{
console
.
log
(
response
.
config
.
url
)
// console.log(response.data
)
if
(
response
.
data
.
code
===
'0'
)
{
return
response
}
else
if
(
response
.
data
.
code
===
'BASE_00004'
)
{
...
...
@@ -52,7 +52,7 @@ axios.interceptors.response.use(function (response) {
alert
(
'登录失效,请重新登录'
,
'温馨提示'
)
router
.
push
(
'/login'
)
return
false
}
else
if
(
response
.
data
.
type
===
'application/vnd.ms-excel'
)
{
}
else
if
(
response
.
data
.
type
===
'application/vnd.ms-excel'
||
response
.
data
.
type
===
'application/vnd.ms-excel;charset=UTF-8'
)
{
return
response
}
else
{
// 在添加其他的错误码判断
...
...
static/xls/出售车位模板.xls
View file @
c090f1e3
No preview for this file type
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