Commit b2c19a5f authored by xiangjiaojunxp's avatar xiangjiaojunxp

修改对比判断的范围

parent ff02c1aa
...@@ -347,11 +347,13 @@ export default { ...@@ -347,11 +347,13 @@ export default {
let as=0; let as=0;
let d1=window.luckysheet.transToData(ddd.celldata); let d1=window.luckysheet.transToData(ddd.celldata);
let d2=window.luckysheet.transToData(exportJson.sheets[0].celldata); let d2=window.luckysheet.transToData(exportJson.sheets[0].celldata);
let r1=d1.length,r2=d2.length,c1=d1[0].length,c2=d2[0].length;
let row=(r1<=r2)?r1:r2;
let cell=(c1<=c2)?c1:c2;
let array=[]; let array=[];
let r=this.row-1; let r=this.row-1;
try { for(let i=r;i<row;i++) {
for(let i=r;i<d1.length;i++) { for (let j = 0; j <cell; j++) {
for (let j = 0; j <=d1[0].length; j++) {
//第一个表的单元格为null直接跳出 //第一个表的单元格为null直接跳出
if(d1[i][j]==null ){ if(d1[i][j]==null ){
continue continue
...@@ -438,11 +440,7 @@ export default { ...@@ -438,11 +440,7 @@ export default {
type: "success"}); type: "success"});
} }
}catch (err){
this.$message({
message: "导入失败,导入文件与对比文件有所不匹",
type: "error"});
}
} }
......
...@@ -244,9 +244,12 @@ export default { ...@@ -244,9 +244,12 @@ export default {
let as=0; let as=0;
let d1=window.luckysheet.transToData(ddd.celldata); let d1=window.luckysheet.transToData(ddd.celldata);
let d2=window.luckysheet.transToData(exportJson.sheets[0].celldata); let d2=window.luckysheet.transToData(exportJson.sheets[0].celldata);
let r1=d1.length,r2=d2.length,c1=d1[0].length,c2=d2[0].length;
let row=(r1<=r2)?r1:r2;
let cell=(c1<=c2)?c1:c2;
try { try {
for(let i=0;i<d1.length;i++) { for(let i=0;i<row;i++) {
for (let j = 0; j <=d1[0].length; j++) { for (let j = 0; j <cell; j++) {
//第一个表的单元格为null直接跳出 //第一个表的单元格为null直接跳出
if(d1[i][j]==null ){ if(d1[i][j]==null ){
continue continue
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment