Commit c1ecef70 authored by 谢章伟's avatar 谢章伟

安全质量大屏

parent bb2189c0
......@@ -3,12 +3,14 @@
<table>
<tbody>
<tr v-for="(row, idx) in $props.rows" :key="idx" :style="{height: 100 / rows.length + '%'}">
<td v-if="showIcon"><div class="col_number">{{ idx + 1 }}</div></td>
<td class="winner_span" :style="titleIndependentStyle?row.titleStyle:columnsStyle['title']">{{ row.title }}</td>
<td v-for="(col, idz) in row.column" :key="idz" :style="columnsStyle[col.key]">
<p class="key_span">{{ col.key }}</p>
<p class="value_span" :style="col.valStyle">{{colFormatter[''+idz]?colFormatter[''+idz](col.value):col.value }}</p>
</td>
<div v-if="!row.blankColumn">
<td v-if="showIcon"><div class="col_number">{{ idx + 1 }}</div></td>
<td class="winner_span" :style="titleIndependentStyle?row.titleStyle:columnsStyle['title']">{{ row.title }}</td>
<td v-for="(col, idz) in row.column" :key="idz" :style="columnsStyle[col.key]">
<p class="key_span">{{ col.key }}</p>
<p class="value_span" :style="col.valStyle">{{colFormatter[''+idz]?colFormatter[''+idz](col.value):col.value }}</p>
</td>
</div>
</tr>
</tbody>
</table>
......@@ -37,9 +39,9 @@ export default {
type: Array,
default:function(){
return [
{title: '标题列',titleStyle:{}, column: [{key: '字段', value: '0'}]},
{title: '标题列',titleStyle:{}, column: [{key: '字段', value: '0'}]},
{title: '标题列',titleStyle:{}, column: [{key: '字段', value: '0'}]}
{title: '标题列',titleStyle:{},blankColumn:false, column: [{key: '字段', value: '0'}]},
{title: '标题列',titleStyle:{},blankColumn:false, column: [{key: '字段', value: '0'}]},
{title: '标题列',titleStyle:{},blankColumn:false, column: [{key: '字段', value: '0'}]}
];
}
},
......
......@@ -5,12 +5,12 @@
<div class="trade_left" style="width: 20%">
<div style="height: 37%;" >
<display-board style="height: 98%;" title="安全">
<winners-list style="height: 96%;overflow: auto;" :mouseHand="true" id="safe_list" :rows="arSafeList" :title-independent-style="true"/>
<winners-list style="height: 96%;overflow: auto;" :mouseHand="true" id="safe_list" :rows="arSafeList" :title-independent-style="true" />
</display-board>
</div>
<div style="height: 37%;" >
<display-board style="height: 100%;" title="质量">
<winners-list style="height: 96%;overflow: auto;" :mouseHand="true" id="quality_list" :rows="arQualityList"/>
<winners-list style="height: 96%;overflow: auto;" :mouseHand="true" id="quality_list" :rows="arQualityList" />
</display-board>
</div>
<div style="height: 26%;padding-top: 0.5rem" >
......@@ -377,7 +377,8 @@ export default {
// 安全
let safetyArray=res.data.safetyArray;
let safetyArr=[];
if(safetyArray.length>0){
let size=safetyArray.length;
if(size>0){
safetyArray.forEach(function (row) {
var item={};
item.title=row.data;
......@@ -388,20 +389,30 @@ export default {
}else{
item.titleStyle=[{color:'white'}];
}
safetyArr.push(item);
});
if(size<5){
for(let i=0;i<5-size;i++){
safetyArr.push({blankColumn:true});
}
}
this.arSafeList=safetyArr;
}
// 质量
let qualityArray=res.data.qualityArray;
let qualityArr=[];
if(qualityArray.length>0){
let qualitySize=qualityArray.length;
if(qualitySize>0){
qualityArray.forEach(function (row) {
var item={};
item.title=row;
qualityArr.push(item);
});
if(qualitySize<5){
for(let i=0;i<5-qualitySize;i++){
qualityArr.push({blankColumn:true});
}
}
this.arQualityList=qualityArr;
}
// 统计人员信息
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment