| | |
| | | }else { |
| | | if (record.templet && typeof (record.templet) == 'string' && !validatenull(record.templet) && record.templet.indexOf("function(row,column)")>-1) { |
| | | record.formatter = eval("(" + record.templet + ")"); |
| | | //function(row,column){return row[column.property]=='true'?'是':'否'} |
| | | //function(row,column){return row[column.property]=='true' || row[column.property]=='1'?'是':'否'} |
| | | }else if(record.fieldType=="truefalse"){ |
| | | record.formatter = function(row,column){return row[column.property]=='true' || row[column.property]=='1'?'是':'否'} |
| | | } |
| | | } |
| | | }) |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | // 转换数据true和false |
| | | formatBoolean(row, column) { |
| | | if (column.fieldType === "truefalse") { |
| | | return row[column.property] =='true'? "是" : "否"; |
| | | } |
| | | return row[column.property]; |
| | | }, |
| | | // 发布 |
| | | setHandler() { |
| | | if (this.selectRow.length <= 0) { |