|
@@ -155,14 +155,15 @@ module.exports = app => {
|
|
|
if (!row[0]) { continue; }
|
|
|
if (this.ctx.helper.ValidTemplateNodeCode(row[0])) {
|
|
|
if (!this.ctx.helper.findObj(nodes, 'code', row[0])) {
|
|
|
+ const isMatchCode = row[11] && row[11] !== '' && this.ctx.helper.validMatchCode(row[11]);
|
|
|
const node = {
|
|
|
template_id: templateId,
|
|
|
node_id: nodes.length + 1,
|
|
|
node_pid: this._findParentId(row[0], nodes) || -1,
|
|
|
code: row[0],
|
|
|
name: row[1],
|
|
|
- match_type: row[11] && row[11] !== '' ? nodeConst.matchType.code : nodeConst.matchType.name,
|
|
|
- match_key: row[11] && row[11] !== '' ? row[11] : row[1],
|
|
|
+ match_type: isMatchCode ? nodeConst.matchType.code : nodeConst.matchType.name,
|
|
|
+ match_key: isMatchCode ? row[11] : row[1],
|
|
|
};
|
|
|
nodes.push(node);
|
|
|
}
|