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

安全质量大屏

parent 2e28047b
......@@ -4,7 +4,7 @@
<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="columnsStyle['title']">{{ row.title }}</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>
......@@ -23,6 +23,10 @@ export default {
type: Boolean,
default: true
},
titleIndependentStyle:{
type: Boolean,
default: false
},
columnsStyle:{
type: Object,
default: function () {
......@@ -33,9 +37,9 @@ export default {
type: Array,
default:function(){
return [
{title: '标题列', column: [{key: '字段', value: '0'}]},
{title: '标题列', column: [{key: '字段', value: '0'}]},
{title: '标题列', column: [{key: '字段', value: '0'}]}
{title: '标题列',titleStyle:{}, column: [{key: '字段', value: '0'}]},
{title: '标题列',titleStyle:{}, column: [{key: '字段', value: '0'}]},
{title: '标题列',titleStyle:{}, column: [{key: '字段', value: '0'}]}
];
}
},
......
......@@ -5,7 +5,7 @@
<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"/>
<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%;" >
......@@ -380,7 +380,15 @@ export default {
if(safetyArray.length>0){
safetyArray.forEach(function (row) {
var item={};
item.title=row;
item.title=row.data;
if(row.type==='10'){
item.titleStyle=[{color:'yellow'}];
}else if(row.type==='20'){
item.titleStyle=[{color:'red'}];
}else{
item.titleStyle=[{color:'white'}];
}
safetyArr.push(item);
});
this.arSafeList=safetyArr;
......@@ -484,16 +492,25 @@ export default {
seryCar.data.push(car[2]);
this.car_options.series=[];
this.car_options.series.push(seryCar);
// 最大高度
var maxDataCar = Math.max.apply(null, seryCar.data);
this.car_options.yAxis.max=maxDataCar*1.1;
this.car.setOption(this.car_options);
var seryShip=this.getcarShipTrainCss();
seryShip.data=ship;
this.ship_options.series=[];
this.ship_options.series.push(seryShip);
// 最大高度
var maxDataShip = Math.max.apply(null, seryShip.data);
this.ship_options.yAxis.max=maxDataShip*1.1;
this.ship.setOption(this.ship_options);
var seryTrain=this.getcarShipTrainCss();
seryTrain.data=train;
this.train_options.series=[];
this.train_options.series.push(seryTrain);
// 最大高度
var maxDataTrain = Math.max.apply(null, seryTrain.data);
this.train_options.yAxis.max=maxDataTrain*1.1;
this.train.setOption(this.train_options);
// 当班车数
this.arCarSum[0].value=countToday.car;
......
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