Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xichonght
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
zhangdishen
xichonght
Commits
10604261
Commit
10604261
authored
Nov 06, 2019
by
zhangdishen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mhy' into 'master'
优化导出excel的返回信息 See merge request
!87
parents
6f57362b
98ad3721
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
98 additions
and
78 deletions
+98
-78
importBaseInfoByExcel.vue
xichongSys/src/views/Myvue/importBaseInfoByExcel.vue
+12
-16
importByExcel.vue
xichongSys/src/views/Myvue/importByExcel.vue
+23
-17
importGrantInfoByExcel.vue
xichongSys/src/views/Myvue/importGrantInfoByExcel.vue
+21
-15
importPayInfoByExcel.vue
xichongSys/src/views/Myvue/importPayInfoByExcel.vue
+21
-15
importRightsRecordByExcel.vue
xichongSys/src/views/Myvue/importRightsRecordByExcel.vue
+21
-15
No files found.
xichongSys/src/views/Myvue/importBaseInfoByExcel.vue
View file @
10604261
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
:auto-upload=
"false"
>
:auto-upload=
"false"
>
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
,且不能超过10MB
</div>
</el-upload>
</el-upload>
<el-button
<el-button
style=
"margin-top: 10px"
style=
"margin-top: 10px"
...
@@ -103,11 +103,11 @@
...
@@ -103,11 +103,11 @@
this
.
loading
=
false
;
this
.
loading
=
false
;
return
false
;
return
false
;
}
}
// if (uploadedList.includes(file.name)
) {
if
(
file
.
size
>
50
*
1024
*
1024
)
{
// this.$message.warning(file.name + "已被选中过,请勿重复选择
");
this
.
$message
.
warning
(
file
.
name
+
"文件大于50MB,无法上传
"
);
// return
false;
this
.
loading
=
false
;
// }
return
false
;
// uploadedList.push(file.name);
}
},
},
async
uploadSuccess
(
response
)
{
async
uploadSuccess
(
response
)
{
this
.
fileList
=
[];
this
.
fileList
=
[];
...
@@ -123,21 +123,17 @@
...
@@ -123,21 +123,17 @@
duration
:
0
duration
:
0
});
});
},
},
async
uploadError
(
response
)
{
async
uploadError
(
error
,
file
,
fileList
)
{
this
.
fileList
=
[];
this
.
fileList
=
[];
this
.
dialogTitle
=
"导入结果"
;
this
.
dialogTitle
=
"导入结果"
;
this
.
dialogContent
=
"导入失败"
;
this
.
dialogContent
=
"导入失败"
;
// this.dialogVisible = true;
// this.dialogVisible = true;
this
.
loading
=
false
;
this
.
loading
=
false
;
// console.log(response);
this
.
$message
({
this
.
$alert
(
response
.
data
,
'导入结果'
,
{
type
:
"error"
,
confirmButtonText
:
'确定'
,
message
:
"系统错误"
,
callback
:
action
=>
{
showClose
:
true
,
// this.$message({
duration
:
3000
// type: 'info',
// message: `action: ${ action }`
// });
}
});
});
},
},
}
}
...
...
xichongSys/src/views/Myvue/importByExcel.vue
View file @
10604261
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
:auto-upload=
"false"
>
:auto-upload=
"false"
>
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
,且不能超过10MB
</div>
</el-upload>
</el-upload>
<el-button
style=
"margin-top: 10px"
size=
"small"
type=
"success"
@
click=
"submitUpload1"
>
数据导入
</el-button>
<el-button
style=
"margin-top: 10px"
size=
"small"
type=
"success"
@
click=
"submitUpload1"
>
数据导入
</el-button>
</el-tab-pane>
</el-tab-pane>
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
:auto-upload=
"false"
>
:auto-upload=
"false"
>
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
,且不能超过10MB
</div>
</el-upload>
</el-upload>
<el-button
style=
"margin-top: 10px"
size=
"small"
type=
"success"
@
click=
"submitUpload2"
>
数据导入
</el-button>
<el-button
style=
"margin-top: 10px"
size=
"small"
type=
"success"
@
click=
"submitUpload2"
>
数据导入
</el-button>
</el-tab-pane>
</el-tab-pane>
...
@@ -172,7 +172,7 @@
...
@@ -172,7 +172,7 @@
:auto-upload=
"false"
>
:auto-upload=
"false"
>
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
,且不能超过10MB
</div>
</el-upload>
</el-upload>
<el-button
style=
"margin-top: 10px"
size=
"small"
type=
"success"
@
click=
"submitUpload3"
>
数据导入
</el-button>
<el-button
style=
"margin-top: 10px"
size=
"small"
type=
"success"
@
click=
"submitUpload3"
>
数据导入
</el-button>
</el-tab-pane>
</el-tab-pane>
...
@@ -229,11 +229,11 @@
...
@@ -229,11 +229,11 @@
this
.
loading
=
false
;
this
.
loading
=
false
;
return
false
;
return
false
;
}
}
// if (uploadedList.includes(file.name)
) {
if
(
file
.
size
>
50
*
1024
*
1024
)
{
// this.$message.warning(file.name + "已被选中过,请勿重复选择
");
this
.
$message
.
warning
(
file
.
name
+
"文件大于50MB,无法上传
"
);
// return
false;
this
.
loading
=
false
;
// }
return
false
;
// uploadedList.push(file.name);
}
},
},
async
uploadSuccess
(
response
)
{
async
uploadSuccess
(
response
)
{
this
.
fileList
=
[];
this
.
fileList
=
[];
...
@@ -255,16 +255,22 @@
...
@@ -255,16 +255,22 @@
this
.
dialogContent
=
"导入失败"
;
this
.
dialogContent
=
"导入失败"
;
// this.dialogVisible = true;
// this.dialogVisible = true;
this
.
loading
=
false
;
this
.
loading
=
false
;
console
.
log
(
response
);
this
.
$message
({
this
.
$alert
(
response
.
data
,
'导入结果'
,
{
type
:
"error"
,
confirmButtonText
:
'确定'
,
message
:
"系统错误"
,
callback
:
action
=>
{
showClose
:
true
,
// this.$message({
duration
:
3000
// type: 'info',
// message: `action: ${ action }`
// });
}
});
});
// console.log(response);
// this.$alert(response.data, '导入结果', {
// confirmButtonText: '确定',
// callback: action => {
// // this.$message({
// // type: 'info',
// // message: `action: ${ action }`
// // });
// }
// });
},
},
}
}
}
}
...
...
xichongSys/src/views/Myvue/importGrantInfoByExcel.vue
View file @
10604261
...
@@ -134,7 +134,7 @@
...
@@ -134,7 +134,7 @@
:auto-upload=
"false"
>
:auto-upload=
"false"
>
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
,且不能超过10MB
</div>
</el-upload>
</el-upload>
<el-button
<el-button
style=
"margin-top: 10px"
style=
"margin-top: 10px"
...
@@ -187,11 +187,11 @@
...
@@ -187,11 +187,11 @@
this
.
loading
=
false
;
this
.
loading
=
false
;
return
false
;
return
false
;
}
}
// if (uploadedList.includes(file.name)
) {
if
(
file
.
size
>
50
*
1024
*
1024
)
{
// this.$message.warning(file.name + "已被选中过,请勿重复选择
");
this
.
$message
.
warning
(
file
.
name
+
"文件大于50MB,无法上传
"
);
// return
false;
this
.
loading
=
false
;
// }
return
false
;
// uploadedList.push(file.name);
}
},
},
async
uploadSuccess
(
response
)
{
async
uploadSuccess
(
response
)
{
this
.
fileList
=
[];
this
.
fileList
=
[];
...
@@ -213,16 +213,22 @@
...
@@ -213,16 +213,22 @@
this
.
dialogContent
=
"导入失败"
;
this
.
dialogContent
=
"导入失败"
;
// this.dialogVisible = true;
// this.dialogVisible = true;
this
.
loading
=
false
;
this
.
loading
=
false
;
// console.log(response);
this
.
$message
({
this
.
$alert
(
response
.
data
,
'导入结果'
,
{
type
:
"error"
,
confirmButtonText
:
'确定'
,
message
:
"系统错误"
,
callback
:
action
=>
{
showClose
:
true
,
// this.$message({
duration
:
3000
// type: 'info',
// message: `action: ${ action }`
// });
}
});
});
// console.log(response);
// this.$alert(response.data, '导入结果', {
// confirmButtonText: '确定',
// callback: action => {
// // this.$message({
// // type: 'info',
// // message: `action: ${ action }`
// // });
// }
// });
},
},
}
}
}
}
...
...
xichongSys/src/views/Myvue/importPayInfoByExcel.vue
View file @
10604261
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
:auto-upload=
"false"
>
:auto-upload=
"false"
>
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
,且不能超过10MB
</div>
</el-upload>
</el-upload>
<el-button
<el-button
style=
"margin-top: 10px"
style=
"margin-top: 10px"
...
@@ -105,11 +105,11 @@
...
@@ -105,11 +105,11 @@
this
.
loading
=
false
;
this
.
loading
=
false
;
return
false
;
return
false
;
}
}
// if (uploadedList.includes(file.name)
) {
if
(
file
.
size
>
50
*
1024
*
1024
)
{
// this.$message.warning(file.name + "已被选中过,请勿重复选择
");
this
.
$message
.
warning
(
file
.
name
+
"文件大于50MB,无法上传
"
);
// return
false;
this
.
loading
=
false
;
// }
return
false
;
// uploadedList.push(file.name);
}
},
},
async
uploadSuccess
(
response
)
{
async
uploadSuccess
(
response
)
{
this
.
fileList
=
[];
this
.
fileList
=
[];
...
@@ -131,16 +131,22 @@
...
@@ -131,16 +131,22 @@
this
.
dialogContent
=
"导入失败"
;
this
.
dialogContent
=
"导入失败"
;
// this.dialogVisible = true;
// this.dialogVisible = true;
this
.
loading
=
false
;
this
.
loading
=
false
;
// console.log(response);
this
.
$message
({
this
.
$alert
(
response
.
data
,
'导入结果'
,
{
type
:
"error"
,
confirmButtonText
:
'确定'
,
message
:
"系统错误"
,
callback
:
action
=>
{
showClose
:
true
,
// this.$message({
duration
:
3000
// type: 'info',
// message: `action: ${ action }`
// });
}
});
});
// console.log(response);
// this.$alert(response.data, '导入结果', {
// confirmButtonText: '确定',
// callback: action => {
// // this.$message({
// // type: 'info',
// // message: `action: ${ action }`
// // });
// }
// });
},
},
}
}
}
}
...
...
xichongSys/src/views/Myvue/importRightsRecordByExcel.vue
View file @
10604261
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
:auto-upload=
"false"
>
:auto-upload=
"false"
>
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
,且不能超过10MB
</div>
</el-upload>
</el-upload>
<el-button
<el-button
style=
"margin-top: 10px"
style=
"margin-top: 10px"
...
@@ -99,11 +99,11 @@
...
@@ -99,11 +99,11 @@
this
.
loading
=
false
;
this
.
loading
=
false
;
return
false
;
return
false
;
}
}
// if (uploadedList.includes(file.name)
) {
if
(
file
.
size
>
50
*
1024
*
1024
)
{
// this.$message.warning(file.name + "已被选中过,请勿重复选择
");
this
.
$message
.
warning
(
file
.
name
+
"文件大于50MB,无法上传
"
);
// return
false;
this
.
loading
=
false
;
// }
return
false
;
// uploadedList.push(file.name);
}
},
},
async
uploadSuccess
(
response
)
{
async
uploadSuccess
(
response
)
{
this
.
fileList
=
[];
this
.
fileList
=
[];
...
@@ -125,16 +125,22 @@
...
@@ -125,16 +125,22 @@
this
.
dialogContent
=
"导入失败"
;
this
.
dialogContent
=
"导入失败"
;
// this.dialogVisible = true;
// this.dialogVisible = true;
this
.
loading
=
false
;
this
.
loading
=
false
;
// console.log(response);
this
.
$message
({
this
.
$alert
(
response
.
data
,
'导入结果'
,
{
type
:
"error"
,
confirmButtonText
:
'确定'
,
message
:
"系统错误"
,
callback
:
action
=>
{
showClose
:
true
,
// this.$message({
duration
:
3000
// type: 'info',
// message: `action: ${ action }`
// });
}
});
});
// console.log(response);
// this.$alert(response.data, '导入结果', {
// confirmButtonText: '确定',
// callback: action => {
// // this.$message({
// // type: 'info',
// // message: `action: ${ action }`
// // });
// }
// });
},
},
}
}
}
}
...
...
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