| | |
| | | message: "请输入" + item.field, |
| | | trigger: "blur" |
| | | }]; |
| | | /*item.formatter=function(d,thisItem){ |
| | | var vciWebComboxStore = layui.vciWebComboxStore; |
| | | return vciWebComboxStore.getComboxText(thisItem.enumCode,d[thisItem.field]); |
| | | };*/ |
| | | item.formatter=function(d){ |
| | | return d.field || d.data.field |
| | | }; |
| | | } |
| | | return { |
| | | ...item, |
| | |
| | | let formatter=item.template || item.templet; |
| | | if(typeof formatter == "string" && formatter !=''){ |
| | | formatter=eval("(" + formatter + ")") |
| | | }else{ |
| | | formatter=function (d){ |
| | | if(d[item.field]!=undefined){ |
| | | return d[item.field] |
| | | }else if(d.data[item.field] !=undefined){ |
| | | return d.data[item.field] |
| | | }else { |
| | | return '' |
| | | } |
| | | } |
| | | } |
| | | return { |
| | | ...item, |
| | |
| | | this.data = res.data.data.records; |
| | | this.page.total=res.data.data.total; |
| | | } |
| | | this.data=this.data.map(item => { |
| | | item.data=item.data || {} |
| | | return { |
| | | ...item |
| | | } |
| | | }) |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }).catch(error=>{ |