| | |
| | | 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){ |
| | | 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, |
| | | label: item.title, |
| | |
| | | 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, |
| | | label: item.title, |
| | | prop: item.field, |
| | | formatter:formatter, |
| | | sortable:item.sort, |
| | | hide:item.hidden, |
| | | search: this.options.tableConfig.queryColumns.some(qItem=>{ |
| | | return qItem.field==item.field |
| | | }) |
| | |
| | | this.params=paramsData; |
| | | }, |
| | | setValue(){ |
| | | console.log('确定') |
| | | if(this.selectionList.length==0){ |
| | | this.$message.warning( '没有选择数据'); |
| | | return false; |
| | |
| | | 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=>{ |