<template>
|
<div class="qhuan">
|
<div v-for="item in datalist">
|
|
<div v-if="item.stationLocation === '2033'">
|
|
<el-button class="bun1" type="success" v-if="item.stationStatus === '1'"
|
v-on:click="selectss(1)">1号压装机</el-button>
|
|
<el-button class="bun1" type="danger" v-if="item.stationStatus === '0'"
|
v-on:click="selectss(1)">1号压装机</el-button>
|
<p>
|
1号压装机 :
|
<el-tag type="success" v-if="item.stationStatus === '1'">启用</el-tag>
|
<el-tag type="danger" v-if="item.stationStatus === '0'">禁用</el-tag>
|
</p>
|
</div>
|
|
|
<div v-if="item.stationLocation === '2043'">
|
<el-button class="bun2" type="success" v-if="item.stationStatus === '1'"
|
v-on:click="selectss(2)">2号压装机</el-button>
|
<el-button class="bun2" type="danger" v-if="item.stationStatus === '0'"
|
v-on:click="selectss(2)">2号压装机</el-button>
|
<p>
|
2号压装机 :
|
<el-tag type="success" v-if="item.stationStatus === '1'">启用</el-tag>
|
<el-tag type="danger" v-if="item.stationStatus === '0'">禁用</el-tag>
|
</p>
|
</div>
|
</div>
|
</div>
|
|
|
<div style="margin: 0px auto;width: 600px;">
|
<div>
|
<div style="color: brown;font-size: 25px;">车轮超期数量: <i style="font-size: 35px;">{{ wheelsCount }} 个</i></div>
|
</div>
|
<div>
|
<div style="color: brown;font-size: 25px;">制动盘超期数量: <i style="font-size: 35px;">{{ zdpCount }} 个</i></div>
|
</div>
|
</div>
|
|
</template>
|
<script>
|
import axios from 'axios';
|
export default {
|
data() {
|
return {
|
datalist: [],
|
zdpCount:0,
|
wheelsCount:0,
|
url: "http://192.168.12.189/:8098/api/",
|
|
};
|
},
|
mounted() {
|
// setInterval(() => {
|
this.AddTask();
|
this.StockYx();
|
// }, 5000);
|
|
},
|
created() {
|
// this.AddTask();
|
// this.selList();
|
},
|
|
methods: {
|
//切换
|
selectss(selvelue) {
|
|
axios.post("http://172.21.1.139:9291/api/StationManager/UpdateStation",{MainData: {
|
stationid: selvelue,
|
}})
|
.then(response => {
|
if(response.data.status){
|
this.AddTask();
|
}else{
|
alert(selvelue)
|
}
|
|
|
})
|
},
|
AddTask() {
|
axios.post("http://172.21.1.139:9291/api/StationManager/GetStation")
|
.then(response => {
|
if(response.status){
|
this.datalist = response.data.data;
|
}
|
|
})
|
},
|
StockYx() {
|
axios.post("http://172.21.1.139:5000/api/Task/GetStockStatue")
|
.then(response => {
|
console.log(response.data.data.zdpCount)
|
if(response.status){
|
this.wheelsCount=response.data.data.wheelsCount;
|
this.zdpCount=response.data.data.zdpCount;
|
}
|
|
})
|
}
|
|
},
|
|
props: {
|
value: String
|
}
|
|
}
|
</script>
|