|
@@ -3,10 +3,10 @@
|
|
<!-- <a-table :columns="columns" :data-source="data" bordered :scroll="{ x: 4750 }" :pagination="ipagination" rowKey="id"> -->
|
|
<!-- <a-table :columns="columns" :data-source="data" bordered :scroll="{ x: 4750 }" :pagination="ipagination" rowKey="id"> -->
|
|
<a-table :columns="columns" :data-source="tableData" bordered :scroll="{ x:true }" :pagination="false" rowKey="id">
|
|
<a-table :columns="columns" :data-source="tableData" bordered :scroll="{ x:true }" :pagination="false" rowKey="id">
|
|
</a-table>
|
|
</a-table>
|
|
- <div class="extra-item" style="margin-top: 20px;">
|
|
|
|
|
|
+ <!-- <div class="extra-item" style="margin-top: 20px;">
|
|
<a-button :type="selectedMode==='single'?'primary':'link'" @click="selectedMode = 'single'">单选</a-button>
|
|
<a-button :type="selectedMode==='single'?'primary':'link'" @click="selectedMode = 'single'">单选</a-button>
|
|
<a-button :type="selectedMode==='multiple'?'primary':'link'" @click="selectedMode = 'multiple'">多选</a-button>
|
|
<a-button :type="selectedMode==='multiple'?'primary':'link'" @click="selectedMode = 'multiple'">多选</a-button>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
<lineBarChart :xAxisData="xAxisData" :seriesData="seriesData" :selectedMode="selectedMode" style="height: 360px;"></lineBarChart>
|
|
<lineBarChart :xAxisData="xAxisData" :seriesData="seriesData" :selectedMode="selectedMode" style="height: 360px;"></lineBarChart>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -281,7 +281,9 @@ export default {
|
|
showSizeChanger: true,
|
|
showSizeChanger: true,
|
|
total: 0
|
|
total: 0
|
|
},
|
|
},
|
|
- selectedMode: 'single'
|
|
|
|
|
|
+ selectedMode: 'multiple',
|
|
|
|
+ // echarts
|
|
|
|
+ xAxisData: ['单台成本', '收入', '利润', '材料费', '外协费', '事务费', '专用费', '工时费', '燃动费', '管理费', '折旧费', '装机成本', '内部试验', '工时']
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -289,7 +291,10 @@ export default {
|
|
handler(newValue, oldValue){
|
|
handler(newValue, oldValue){
|
|
console.log(newValue, oldValue)
|
|
console.log(newValue, oldValue)
|
|
if(newValue){
|
|
if(newValue){
|
|
- this.tableData = newValue
|
|
|
|
|
|
+ this.tableData = newValue.compareAll
|
|
|
|
+ this.seriesData = newValue.compareOne.map(res => {
|
|
|
|
+ return
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
deep: true,
|
|
deep: true,
|
|
@@ -297,16 +302,16 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- xAxisData(){
|
|
|
|
- if(this.tableData.length === 0){
|
|
|
|
- return []
|
|
|
|
- }
|
|
|
|
- var data = this.tableData.map(res => {
|
|
|
|
- return res.taskno
|
|
|
|
- })
|
|
|
|
- console.log(data)
|
|
|
|
- return data
|
|
|
|
- },
|
|
|
|
|
|
+ // xAxisData(){
|
|
|
|
+ // if(this.tableData.length === 0){
|
|
|
|
+ // return []
|
|
|
|
+ // }
|
|
|
|
+ // var data = this.tableData.map(res => {
|
|
|
|
+ // return res.taskno
|
|
|
|
+ // })
|
|
|
|
+ // console.log(data)
|
|
|
|
+ // return data
|
|
|
|
+ // },
|
|
seriesData(){
|
|
seriesData(){
|
|
if(this.tableData.length === 0){
|
|
if(this.tableData.length === 0){
|
|
return []
|
|
return []
|
|
@@ -327,6 +332,6 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
- }
|
|
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|