/**
* Created by Jacky.gao on 2016/9/18.
*/
export default class Cell{
constructor(row,col,cellData){
row.cells.push(this);
this.row=row;
this.col=col;
this.init(cellData);
}
init(cellData){
this.td=$(`
| `);
this.initCell(cellData);
}
toXml(){
let xml="";
}else if(this.type==='condition'){
xml+=">";
if(!this.cellCondition){
throw "请配置好条件.";
}
xml+=this.cellCondition.toXml();
}else if(this.type==='score'){
if(!this.inputType){
throw "请配置好分值";
}
const contentXml=this.inputType.toXml();
if(contentXml===''){
throw "请配置好分值";
}
xml+=">";
xml+=contentXml;
}else if(this.type==='custom'){
if(!this.inputType){
throw "请配置好自定义值";
}
const contentXml=this.inputType.toXml();
if(contentXml===''){
throw "请配置好自定义值";
}
xml+=">";
xml+=contentXml;
}
xml+="";
return xml;
}
};