页面优化

yangwl
lucungang 3 months ago
parent 8ec02165b7
commit 0bd7b4bd09

@ -55,15 +55,15 @@
</div>
<div class="top-left-table">
<div class="title">巡检数据统计</div>
<el-table :data="tableTbody" height="440" :loading="loading">
<el-table-column label="时间" align="center" prop="timeCol" min-width="100" />
<el-table-column label="抽样数" align="center" prop="sampleQuality" min-width="100"/>
<el-table :data="tableTbody" height="440" :loading="loading" ref="tables">
<el-table-column label="时间" align="center" prop="timeCol" min-width="100" fixed="left" />
<el-table-column label="抽样数" align="center" prop="sampleQuality" min-width="100" fixed/>
<el-table-column label="缺陷不良" align="center" min-width="100">
<template v-for="(column, index) in tableThead">
<el-table-column align="center" :prop="'col'+index" :key="index" :label="column"/>
</template>
</el-table-column>
<el-table-column label="不良率" align="center" prop="noOkRate" min-width="100">
<el-table-column label="不良率" align="center" prop="noOkRate" min-width="100" fixed="right">
<template slot-scope="scope">
<span>{{scope.row.noOkRate}}%</span>
</template>
@ -111,7 +111,7 @@ export default {
data() {
return {
//
loading: true,
loading: false,
//
ids: [],
//
@ -170,21 +170,22 @@ export default {
// dictValue:''
// },
],
tableThead:[],
tableThead:[
],
tableTbody:[],
tableTheadTh:[],
tableBlfx:[],
echartsData:[],
dateNode:'dd',
};
},
mounted(){
this.$nextTick(()=>{
// this.$nextTick(()=>{
this.getDictData()
this.getThead()
this.getTbody()
this.getBlfx()
})
// })
// this.getEchartsTh()
@ -206,10 +207,11 @@ export default {
},
async getTbody(){
this.loading=true
// this.tableTheadTh=[]
let res=await getTableHzData(this.queryParams)
console.log('resData',res)
this.$nextTick(()=>{
this.$refs.tables.doLayout()//table
})
let xData=[]
let yData=[]
this.tableTbody=res

Loading…
Cancel
Save