|
@@ -60,7 +60,9 @@ export default {
|
|
|
editBtnFlag: false,
|
|
|
};
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+ alert(this.head.length)
|
|
|
+ },
|
|
|
methods: {
|
|
|
beforeUpload(file) {
|
|
|
const isLt1M = file.size / 1024 / 1024 < 1;
|
|
@@ -74,6 +76,8 @@ export default {
|
|
|
return false;
|
|
|
},
|
|
|
handleSuccess({ results, header }) {
|
|
|
+ alert(this.head.length, header.length)
|
|
|
+ console.log(results)
|
|
|
if (!this.loading) {
|
|
|
this.loading = true;
|
|
|
if (results.length === 0) {
|
|
@@ -89,6 +93,7 @@ export default {
|
|
|
}
|
|
|
let hederOk = true;
|
|
|
this.head.forEach((v1, i1) => {
|
|
|
+
|
|
|
if (v1 !== header[i1].replace(/\s*/g, "")) {
|
|
|
console.log(v1 + "----" + header[i1]);
|
|
|
hederOk = false;
|
|
@@ -113,6 +118,7 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
this.tableData.push(model);
|
|
|
+ console.log(this.tableData)
|
|
|
});
|
|
|
} catch (e) {
|
|
|
console.log(e);
|