|
@@ -482,7 +482,7 @@ class AnalysisExcelTree {
|
|
|
/**
|
|
|
* 构造函数
|
|
|
*/
|
|
|
- constructor(ctx, setting) {
|
|
|
+ constructor(ctx, setting, needCols) {
|
|
|
this.ctx = ctx;
|
|
|
this.setting = setting;
|
|
|
if (ctx.tender) {
|
|
@@ -511,6 +511,7 @@ class AnalysisExcelTree {
|
|
|
drawing_code: {value: ['图号'], type: colDefineType.match},
|
|
|
memo: {value: ['备注'], type: colDefineType.match},
|
|
|
};
|
|
|
+ this.needCols = needCols || ['code', 'b_code', 'pos'];
|
|
|
}
|
|
|
|
|
|
_isMatch11(tempData) {
|
|
@@ -646,9 +647,11 @@ class AnalysisExcelTree {
|
|
|
*/
|
|
|
checkColHeader(row) {
|
|
|
const colsDef = aeUtils.checkColHeader(row, this.colHeaderMatch);
|
|
|
- if (colsDef.code && colsDef.b_code && colsDef.pos) {
|
|
|
- this.colsDef = colsDef;
|
|
|
+ let check = true;
|
|
|
+ for (const col of this.needCols) {
|
|
|
+ if (!colsDef[col]) check = false;
|
|
|
}
|
|
|
+ if (check) this.colsDef = colsDef;
|
|
|
}
|
|
|
|
|
|
/**
|