|
@@ -40,34 +40,34 @@ export default {
|
|
|
props: {
|
|
|
name: {
|
|
|
type: String,
|
|
|
- default: "导出",
|
|
|
+ default: "导出"
|
|
|
},
|
|
|
fileName: {
|
|
|
type: String,
|
|
|
- default: "导出文件.xls",
|
|
|
+ default: "导出文件.xls"
|
|
|
},
|
|
|
message: {
|
|
|
type: String,
|
|
|
- default: "您确定导出",
|
|
|
+ default: "您确定导出"
|
|
|
},
|
|
|
errorMsg: {
|
|
|
type: String,
|
|
|
- default: "参数错误",
|
|
|
+ default: "参数错误"
|
|
|
},
|
|
|
flag: {
|
|
|
type: Boolean,
|
|
|
- default: false,
|
|
|
+ default: false
|
|
|
},
|
|
|
isDownList: {
|
|
|
type: Boolean,
|
|
|
- default: false,
|
|
|
+ default: false
|
|
|
},
|
|
|
ExportEnum: {
|
|
|
- type: String,
|
|
|
+ type: String
|
|
|
},
|
|
|
exportData: {
|
|
|
- type: Object,
|
|
|
- },
|
|
|
+ type: Object
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -75,7 +75,7 @@ export default {
|
|
|
isIndeterminate: true,
|
|
|
checkAll: false,
|
|
|
checked: [],
|
|
|
- chioseList: [],
|
|
|
+ chioseList: []
|
|
|
};
|
|
|
},
|
|
|
mounted() {},
|
|
@@ -91,7 +91,7 @@ export default {
|
|
|
}
|
|
|
try {
|
|
|
const res = await getFields({
|
|
|
- exportEnum: this.ExportEnum,
|
|
|
+ exportEnum: this.ExportEnum
|
|
|
});
|
|
|
this.chioseList = res.data;
|
|
|
this.checked = res.data;
|
|
@@ -114,6 +114,10 @@ export default {
|
|
|
},
|
|
|
exportDataStart() {
|
|
|
console.log(this.exportData);
|
|
|
+ if (this.flag) {
|
|
|
+ this.$message.error(this.errorMsg);
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (this.isDownList) {
|
|
|
Export(
|
|
|
this,
|
|
@@ -124,8 +128,8 @@ export default {
|
|
|
params: {
|
|
|
queryInfo: this.exportData,
|
|
|
exportEnum: this.ExportEnum,
|
|
|
- headColumns: this.checked,
|
|
|
- },
|
|
|
+ headColumns: this.checked
|
|
|
+ }
|
|
|
},
|
|
|
this.message,
|
|
|
() => {
|
|
@@ -142,8 +146,8 @@ export default {
|
|
|
params: {
|
|
|
queryInfo: this.exportData,
|
|
|
exportEnum: this.ExportEnum,
|
|
|
- headColumns: this.checked,
|
|
|
- },
|
|
|
+ headColumns: this.checked
|
|
|
+ }
|
|
|
},
|
|
|
this.message,
|
|
|
() => {
|
|
@@ -153,9 +157,8 @@ export default {
|
|
|
}
|
|
|
|
|
|
// 导出
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
-<style lang="scss" scoped>
|
|
|
-</style>
|
|
|
+<style lang="scss" scoped></style>
|