|
@@ -251,7 +251,8 @@
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getSuperFieldList();
|
|
|
+ this.getSuperFieldList();
|
|
|
+ this.setColumn()
|
|
|
},
|
|
|
computed: {
|
|
|
importExcelUrl: function(){
|
|
@@ -277,19 +278,6 @@
|
|
|
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
|
this.dataSource = res.result.records||res.result;
|
|
|
|
|
|
- if (this.type == 'max') {
|
|
|
- this.columns.push({ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia', fixed: 'right' },
|
|
|
- { title:'价格(最大值)', align:"center", dataIndex: 'maxPrice', fixed: 'right' })
|
|
|
- }
|
|
|
- if (this.type == 'min') {
|
|
|
- this.columns.splice(7,0,{ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia', fixed: 'right' },
|
|
|
- { title:'价格(最小值)', align:"center", dataIndex: 'minPrice', fixed: 'right' })
|
|
|
- }
|
|
|
- if (this.type == 'ave') {
|
|
|
- this.columns.splice(7,0,{ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia', fixed: 'right' },
|
|
|
- { title:'价格(平均值)', align:"center", dataIndex: 'avePrice', fixed: 'right' })
|
|
|
- }
|
|
|
-
|
|
|
if(res.result.total)
|
|
|
{
|
|
|
this.ipagination.total = res.result.total;
|
|
@@ -304,6 +292,20 @@
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
|
+ setColumn(){
|
|
|
+ if (this.type == 'max') {
|
|
|
+ this.columns.push({ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia', fixed: 'right' },
|
|
|
+ { title:'价格(最大值)', align:"center", dataIndex: 'maxPrice', fixed: 'right' })
|
|
|
+ }
|
|
|
+ if (this.type == 'min') {
|
|
|
+ this.columns.splice(7,0,{ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia', fixed: 'right' },
|
|
|
+ { title:'价格(最小值)', align:"center", dataIndex: 'minPrice', fixed: 'right' })
|
|
|
+ }
|
|
|
+ if (this.type == 'ave') {
|
|
|
+ this.columns.splice(7,0,{ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia', fixed: 'right' },
|
|
|
+ { title:'价格(平均值)', align:"center", dataIndex: 'avePrice', fixed: 'right' })
|
|
|
+ }
|
|
|
+ },
|
|
|
initDictConfig(){
|
|
|
},
|
|
|
getSuperFieldList(){
|
|
@@ -319,28 +321,6 @@
|
|
|
fieldList.push({type:'string',value:'remark',text:'描述',dictCode:''})
|
|
|
this.superFieldList = fieldList
|
|
|
},
|
|
|
- // getList(id,type){
|
|
|
- // this.queryParam.id = id
|
|
|
- // this.loadData(1)
|
|
|
- // if (type == 'max') {
|
|
|
- // // this.columns.push({ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia' })
|
|
|
- // // this.columns.push({ title:'价格(最大值)', align:"center", dataIndex: 'maxPrice' })
|
|
|
- // this.columns.splice(7,0,{ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia' },
|
|
|
- // { title:'价格(最大值)', align:"center", dataIndex: 'maxPrice' })
|
|
|
- // }
|
|
|
- // if (type == 'min') {
|
|
|
- // // this.columns.push({ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia' })
|
|
|
- // // this.columns.push({ title:'价格(最小值)', align:"center", dataIndex: 'minPrice' })
|
|
|
- // this.columns.splice(7,0,{ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia' },
|
|
|
- // { title:'价格(最小值)', align:"center", dataIndex: 'minPrice' })
|
|
|
- // }
|
|
|
- // if (type == 'ave') {
|
|
|
- // // this.columns.push({ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia' })
|
|
|
- // // this.columns.push({ title:'价格(平均值)', align:"center", dataIndex: 'avePrice' })
|
|
|
- // this.columns.splice(7,0,{ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia' },
|
|
|
- // { title:'价格(平均值)', align:"center", dataIndex: 'avePrice' })
|
|
|
- // }
|
|
|
- // }
|
|
|
}
|
|
|
}
|
|
|
</script>
|