北交大 客流站场仿真界面 代码调整
This commit is contained in:
parent
756aca9281
commit
fece30a51d
@ -52,18 +52,22 @@ class ESolidStand extends Group {
|
|||||||
// 紧急停车
|
// 紧急停车
|
||||||
model.emergencyClosed && this.setColor(this.style.StationStand.solidStand.spareColor);
|
model.emergencyClosed && this.setColor(this.style.StationStand.solidStand.spareColor);
|
||||||
} else {
|
} else {
|
||||||
model.num && model.num > 0 && this.handlePassagerColor(model.num);
|
this.handlePassagerColor(model.num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePassagerColor(num) {
|
handlePassagerColor(num) {
|
||||||
const passagerNum = parseInt(num);
|
if (num && num > 0) {
|
||||||
if (passagerNum < 40) {
|
const passagerNum = parseInt(num);
|
||||||
this.setColor('#29a909');
|
if (passagerNum < 40) {
|
||||||
} else if (passagerNum < 80 && passagerNum > 40) {
|
this.setColor('#29a909');
|
||||||
this.setColor('#ffa500');
|
} else if (passagerNum < 80 && passagerNum > 40) {
|
||||||
|
this.setColor('#ffa500');
|
||||||
|
} else {
|
||||||
|
this.setColor('#F00');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.setColor('#F00');
|
this.setColor('#29a909');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -378,7 +378,8 @@ export default class Train extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handlePassagerColor(num) {
|
handlePassagerColor(num) {
|
||||||
if (num && num > 0) {
|
if (num) {
|
||||||
|
// && num > 0
|
||||||
const passagerNum = parseInt(num);
|
const passagerNum = parseInt(num);
|
||||||
if (passagerNum < 40) {
|
if (passagerNum < 40) {
|
||||||
this.trainB && this.trainB.setTrainColor('#29a909');
|
this.trainB && this.trainB.setTrainColor('#29a909');
|
||||||
@ -394,9 +395,9 @@ export default class Train extends Group {
|
|||||||
this.trainR && this.trainR.setColor('#F00');
|
this.trainR && this.trainR.setColor('#F00');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// this.trainB && this.trainB.setTrainColor('#606060');
|
this.trainB && this.trainB.setTrainColor('#29a909');
|
||||||
this.trainL && this.trainL.setColor(this.style.Train.trainHead.trainHeadFillColor);
|
this.trainL && this.trainL.setColor('#29a909');
|
||||||
this.trainR && this.trainR.setColor(this.style.Train.trainHead.trainHeadFillColor);
|
this.trainR && this.trainR.setColor('#29a909');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,21 @@
|
|||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<menu-system-time ref="menuSystemTime" :offset="15" :group="group" />
|
<menu-system-time ref="menuSystemTime" :offset="15" :group="group" />
|
||||||
|
<div class="trainExample">
|
||||||
|
<div class="trainExampleName">列车/车站 颜色图例</div>
|
||||||
|
<div class="eachTrainExample">
|
||||||
|
<span class="smallExample" />
|
||||||
|
<span class="eachTrainExampleName">0 ~ 40</span>
|
||||||
|
</div>
|
||||||
|
<div class="eachTrainExample">
|
||||||
|
<span class="mediumExample" />
|
||||||
|
<span class="eachTrainExampleName">40 ~ 80</span>
|
||||||
|
</div>
|
||||||
|
<div class="eachTrainExample">
|
||||||
|
<span class="bigExample" />
|
||||||
|
<span class="eachTrainExampleName">80及以上</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -138,8 +153,8 @@ export default {
|
|||||||
async subscribe() {
|
async subscribe() {
|
||||||
this.clearSubscribe();
|
this.clearSubscribe();
|
||||||
const header = { group: this.group || '', 'X-Token': getToken() };
|
const header = { group: this.group || '', 'X-Token': getToken() };
|
||||||
creatSubscribe(`${jl3dTopic}\/${this.$route.query.group}`, header);
|
|
||||||
creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header);
|
creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header);
|
||||||
|
creatSubscribe(`${jl3dTopic}\/${this.$route.query.group}`, header);
|
||||||
await this.$store.dispatch('training/setHasSubscribed');
|
await this.$store.dispatch('training/setHasSubscribed');
|
||||||
},
|
},
|
||||||
clearSubscribe() {
|
clearSubscribe() {
|
||||||
@ -173,4 +188,29 @@ export default {
|
|||||||
right: 15px;
|
right: 15px;
|
||||||
bottom: 15px;
|
bottom: 15px;
|
||||||
}
|
}
|
||||||
|
.trainExample{
|
||||||
|
position: absolute;
|
||||||
|
width: 260px;
|
||||||
|
padding: 10px;
|
||||||
|
left: 20px;
|
||||||
|
top: 20px;
|
||||||
|
color: #fff;
|
||||||
|
border: 1px #fff solid;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.trainExampleName{margin-bottom: 10px;}
|
||||||
|
.eachTrainExample{margin-top: 5px;}
|
||||||
|
.smallExample,.mediumExample,.bigExample{
|
||||||
|
width: 50px;
|
||||||
|
height: 20px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.eachTrainExampleName{
|
||||||
|
vertical-align: top;
|
||||||
|
line-height: 23px;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
.smallExample{background: #29a909;}
|
||||||
|
.mediumExample{background: #ffa500;}
|
||||||
|
.bigExample{background: #F00;}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user