Commit 61808aa1 authored by 车宾's avatar 车宾

feat(成品车存放区,中涂作业区):功能联调。添加 统计车辆实时总数

parent 733995c5
......@@ -533,6 +533,10 @@
>
<p>{{query['HDG1-204'].busNo}}</p>
</div>
<!-- 实时车辆 -->
<div class="onlineNum">
<p>总量 <span>{{ this.onlineNum? this.onlineNum : '0' }}</span></p>
</div>
<Tooltip
ref="toolRef"
:query="BusInformation"
......@@ -586,18 +590,15 @@ export default {
getComplexionPaintInformation () {
this.$fetch('area-controller/realTime-get', { areaNo: '6' })
.then(res => {
// console.log(res);
// this.query = _.cloneDeep(res);
for (let i = 0; i < res.length; i++) {
if (res[i].code === '6') {
console.log(res[i]);
this.query = _.cloneDeep(res[i].stationMap);
for (let item of res) {
if (item.code === '6') {
this.query = item.stationMap;
// 获取当前在线人数
this.onlineNum = _.clone(res[i].onlineNum);
console.log(this.onlineNum)
this.onlineNum = _.clone(item.onlineNum);
console.log(this.onlineNum);
break;
}
}
console.log(this.query);
})
.catch(error => {
reject(error);
......@@ -607,7 +608,7 @@ export default {
judgeCarTypeAndcarStationstyle (outOrIn, station) {
// 判断有无车体定位信息
if (this.carPostionInfo.hasOwnProperty(station)) {
return 'isPositioned'
return 'isPositioned';
} else {
if (outOrIn === 'OTHER') {
return 'carOutFactory';
......@@ -636,26 +637,31 @@ export default {
},
// 查询车辆定位
getCarPostion () {
let queryParams = { orderNo: '1111', workOrderNo: '' }
let queryParams = { orderNo: '1111', workOrderNo: '' };
// 请求接口
this.$fetch('area-controller/busNo-get', {queryParams}).then(res => {
this.carPostionInfo = _.cloneDeep(res)
})
this.$fetch('area-controller/busNo-get', { queryParams }).then(
res => {
this.carPostionInfo = _.cloneDeep(res);
}
);
},
// 轮询请求接口
pollingGetInterface () {
// 查询车辆定位
console.log('2222', this.$route.query)
if (this.$route.query.hasOwnProperty('orderNo') || this.$route.query.hasOwnProperty('workOrderNo')) {
this.getCarPostion()
console.log('2222', this.$route.query);
if (
this.$route.query.hasOwnProperty('orderNo') ||
this.$route.query.hasOwnProperty('workOrderNo')
) {
this.getCarPostion();
}
// 获取面色/漆作业区实时信息
this.getComplexionPaintInformation()
this.getComplexionPaintInformation();
this.timer = setInterval(() => {
this.carPostionInfo = {}
this.carPostionInfo = {};
// 获取面色/漆作业区实时信息
this.getComplexionPaintInformation()
}, 20000)
this.getComplexionPaintInformation();
}, 20000);
}
}
};
......@@ -665,6 +671,20 @@ export default {
min-height: 100%;
background: rgba(0, 7, 12, 1);
.onlineNum {
position: absolute;
color: #ffffff;
z-index: 999;
right: 300px;
top: 50px;
color: #00b4ff;
font-size: 16px;
font-weight: 750;
span {
margin: 30px;
font-size: 24px;
}
}
.paint-content {
position: relative;
margin: 0 auto;
......@@ -749,7 +769,7 @@ export default {
.paint-row-13-3,
.paint-row-13-5 {
position: absolute;
width: 140px;
width: 100px;
height: 40px;
cursor: pointer;
background: url("../../../assets/images/Monitor/monitor_car.png")
......@@ -758,7 +778,7 @@ export default {
background-position: 0 16px;
p {
font-size: 14px;
font-size: 12px;
margin: 0;
color: #ffffff;
font-weight: bold;
......
......@@ -433,6 +433,10 @@
>
<p>{{query['HDG1-66'].busNo}}</p>
</div>
<!-- 实时车辆 -->
<div class="onlineNum">
<p>总量 <span>{{ this.onlineNum? this.onlineNum : '0' }}</span></p>
</div>
<Tooltip
ref="toolRef"
:query="BusInformation"
......@@ -459,52 +463,53 @@ export default {
query: {},
// 根据车身号获得当前车体信息
BusInformation: {
'saleOrderNo': '201905201252',
'planOrderNo': '83848484',
'code': 'EDSCSFDGVG',
'busType': 'car',
'orderSize': '20',
'unit': 'From China',
'shop': '二号车间',
'line': '4-25'
saleOrderNo: '201905201252',
planOrderNo: '83848484',
code: 'EDSCSFDGVG',
busType: 'car',
orderSize: '20',
unit: 'From China',
shop: '二号车间',
line: '4-25'
}
};
},
mounted () {
this.pollingGetInterface();
console.log('2222', this.timer)
console.log('2222', this.timer);
},
beforeDestroy () {
clearInterval(this.timer)
clearInterval(this.timer);
},
methods: {
// 点击车位弹出车体信息
clickBtn (row) {
console.log(row)
console.log(row);
this.$refs.toolRef.$refs.tooltip.style.visibility = 'visible';
let left = window.event.clientX;
let top = window.event.clientY;
this.$refs.toolRef.$refs.tooltip.style.top = top - 100 + 'px';
this.$refs.toolRef.$refs.tooltip.style.left = left - 100 + 'px';
this.$fetch('area-controller/busNo-get', {busNo: row}).then(res => {
this.$fetch('area-controller/busNo-get', { busNo: row })
.then(res => {
console.log('res', res);
// this.BusInformation = _.cloneDeep(res);
}).catch(error => {
reject(error)
})
.catch(error => {
reject(error);
});
},
// 查询电泳实时信息
getElectrophoresisInformation () {
this.$fetch('area-controller/realTime-get', { areaNo: '2' })
.then(res => {
console.log('getall', res);
for (let i = 0; i < res.length; i++) {
if (res[i].code === '2') {
console.log(res[i]);
this.query = _.cloneDeep(res[i].stationMap);
for (let item of res) {
if (item.code === '2') {
this.query = item.stationMap;
// 获取当前在线人数
this.onlineNum = _.clone(res[i].onlineNum);
console.log(this.onlineNum)
this.onlineNum = _.clone(item.onlineNum);
console.log(this.onlineNum);
break;
}
}
})
......@@ -516,7 +521,7 @@ export default {
judgeCarTypeAndcarStationstyle (outOrIn, station) {
// 判断有无车体定位信息
if (this.carPostionInfo.hasOwnProperty(station)) {
return 'isPositioned'
return 'isPositioned';
} else {
if (outOrIn === 'OTHER') {
return 'carOutFactory';
......@@ -527,25 +532,30 @@ export default {
},
// 查询车辆定位
getCarPostion () {
let queryParams = { orderNo: '1111', workOrderNo: '' }
let queryParams = { orderNo: '1111', workOrderNo: '' };
// 请求接口
this.$fetch('area-controller/busNo-get', {queryParams}).then(res => {
this.carPostionInfo = _.cloneDeep(res)
})
this.$fetch('area-controller/busNo-get', { queryParams }).then(
res => {
this.carPostionInfo = _.cloneDeep(res);
}
);
},
// 轮询请求接口
pollingGetInterface () {
// 查询车辆定位
if (this.$route.query.hasOwnProperty('orderNo') || this.$route.query.hasOwnProperty('workOrderNo')) {
this.getCarPostion()
if (
this.$route.query.hasOwnProperty('orderNo') ||
this.$route.query.hasOwnProperty('workOrderNo')
) {
this.getCarPostion();
}
// 获取电泳作业区实时信息
this.getElectrophoresisInformation()
this.getElectrophoresisInformation();
this.timer = setInterval(() => {
this.carPostionInfo = {}
this.carPostionInfo = {};
// 获取电泳作业区实时信息
this.getElectrophoresisInformation()
}, 20000)
this.getElectrophoresisInformation();
}, 20000);
}
}
};
......@@ -555,13 +565,27 @@ export default {
.page-pack {
min-height: 100%;
background: rgba(0, 7, 12, 1);
.onlineNum {
position: absolute;
color: #ffffff;
z-index: 999;
right: 300px;
top: 50px;
color: #00b4ff;
font-size: 16px;
font-weight: 750;
span {
margin: 30px;
font-size: 24px;
}
}
.elect-content {
position: relative;
margin: 0 auto;
width: 1600px;
height: 900px;
background: url("../../../assets/images/Monitor/monitor_electrophoresis.png") no-repeat;
background: url("../../../assets/images/Monitor/monitor_electrophoresis.png")
no-repeat;
.elect-row-1-1,
.elect-row-1-2,
.elect-row-1-3,
......@@ -615,7 +639,7 @@ export default {
.elect-row-13-4,
.elect-row-13-5 {
position: absolute;
width: 90px;
width: 100px;
height: 40px;
cursor: pointer;
background: url("../../../assets/images/Monitor/monitor_car.png")
......@@ -624,7 +648,7 @@ export default {
background-position: 0 16px;
p {
font-size: 14px;
font-size: 12px;
margin: 0;
color: #ffffff;
font-weight: bold;
......@@ -834,7 +858,8 @@ export default {
.elect-row-13-2 {
left: 708px;
}
.elect-row-8-4,.elect-row-9-5 {
.elect-row-8-4,
.elect-row-9-5 {
left: 830px;
}
.carOutFactory {
......
This diff is collapsed.
......@@ -193,6 +193,18 @@
>
<p>{{query['HDG5-16'].busNo}}</p>
</div>
<div
class="putty-row-5-6"
@click="clickBtn(query['HDG5-17'].busNo)"
v-if="query.hasOwnProperty('HDG5-17') && query['HDG5-17'].state !== 'FREE'"
:class="judgeCarTypeAndcarStationstyle(query['HDG5-17'].busType, 'HDG5-17')"
>
<p>{{query['HDG5-17'].busNo}}</p>
</div>
</div>
<!-- 实时车辆 -->
<div class="onlineNum">
<p>总量 <span>{{ this.onlineNum? this.onlineNum : '0' }}</span></p>
</div>
<!-- 信息展示弹窗 -->
<Tooltip
......@@ -236,18 +248,15 @@ export default {
getPuttyInformation () {
this.$fetch('area-controller/realTime-get', { areaNo: '4' })
.then(res => {
console.log(res);
for (let i = 0; i < res.length; i++) {
if (res[i].code === '4') {
this.query = _.cloneDeep(res[i].stationMap);
console.log(this.query);
for (let item of res) {
if (item.code === '4') {
this.query = item.stationMap;
// 获取当前在线人数
this.onlineNum = _.clone(res[i].onlineNum);
this.onlineNum = _.clone(item.onlineNum);
console.log(this.onlineNum);
break;
}
}
// 1.for of(数组)
// 2.foreach(数组)
})
.catch(error => {
reject(error);
......@@ -257,7 +266,7 @@ export default {
judgeCarTypeAndcarStationstyle (outOrIn, station) {
// 判断有无车体定位信息
if (this.carPostionInfo.hasOwnProperty(station)) {
return 'isPositioned'
return 'isPositioned';
} else {
if (outOrIn === 'OTHER') {
return 'carOutFactory';
......@@ -287,25 +296,30 @@ export default {
},
// 查询车辆定位
getCarPostion () {
let queryParams = { orderNo: '', workOrderNo: '' }
let queryParams = { orderNo: '', workOrderNo: '' };
// 请求接口
this.$fetch('area-controller/busNo-get', {queryParams}).then(res => {
this.carPostionInfo = _.cloneDeep(res)
})
this.$fetch('area-controller/busNo-get', { queryParams }).then(
res => {
this.carPostionInfo = _.cloneDeep(res);
}
);
},
// 轮询请求接口
pollingGetInterface () {
// 查询车辆定位
if (this.$route.query.hasOwnProperty('orderNo') || this.$route.query.hasOwnProperty('workOrderNo')) {
this.getCarPostion()
if (
this.$route.query.hasOwnProperty('orderNo') ||
this.$route.query.hasOwnProperty('workOrderNo')
) {
this.getCarPostion();
}
// 获取腻子作业区实时信息
this.getPuttyInformation()
this.getPuttyInformation();
this.timer = setInterval(() => {
this.carPostionInfo = {}
this.carPostionInfo = {};
// 获取腻子作业区实时信息
this.getPuttyInformation()
}, 20000)
this.getPuttyInformation();
}, 20000);
}
}
};
......@@ -314,7 +328,20 @@ export default {
.page-body {
min-height: 100%;
background: rgba(0, 7, 12, 1);
.onlineNum {
position: absolute;
color: #ffffff;
z-index: 999;
right: 300px;
top: 50px;
color: #00b4ff;
font-size: 16px;
font-weight: 750;
span {
margin: 30px;
font-size: 24px;
}
}
.putty-content {
position: relative;
margin: 0 auto;
......
......@@ -283,6 +283,10 @@
<p>{{query['HDG1-56'].busNo}}</p>
</div>
</div>
<!-- 实时车辆 -->
<div class="onlineNum">
<p>总量 <span>{{ this.onlineNum? this.onlineNum : '0' }}</span></p>
</div>
<!-- 信息展示弹窗 -->
<Tooltip
ref="toolRef"
......@@ -325,23 +329,20 @@ export default {
this.pollingGetInterface();
},
beforeDestroy () {
clearInterval(this.timer)
clearInterval(this.timer);
},
methods: {
// 获取钣金车存放区实时信息
getSheetMetalInformation () {
this.$fetch('area-controller/realTime-get', { areaNo: '1' })
.then(res => {
// this.query = _.cloneDeep(res);
// console.log(this.query);
console.log(res);
for (let i = 0; i < res.length; i++) {
if (res[i].code === '1') {
this.query = _.cloneDeep(res[i].stationMap);
console.log(this.query)
for (let item of res) {
if (item.code === '1') {
this.query = item.stationMap;
// 获取当前在线人数
this.onlineNum = _.clone(res[i].onlineNum);
console.log(this.onlineNum)
this.onlineNum = _.clone(item.onlineNum);
console.log(this.onlineNum);
break;
}
}
})
......@@ -372,7 +373,7 @@ export default {
judgeCarTypeAndcarStationstyle (outOrIn, station) {
// 判断有无车体定位信息
if (this.carPostionInfo.hasOwnProperty(station)) {
return 'isPositioned'
return 'isPositioned';
} else {
if (outOrIn === 'OTHER') {
return 'carOutFactory';
......@@ -383,25 +384,30 @@ export default {
},
// 查询车辆定位
getCarPostion () {
let queryParams = { orderNo: '1111', workOrderNo: '' }
let queryParams = { orderNo: '1111', workOrderNo: '' };
// 请求接口
this.$fetch('area-controller/busNo-get', {queryParams}).then(res => {
this.carPostionInfo = _.cloneDeep(res)
})
this.$fetch('area-controller/busNo-get', { queryParams }).then(
res => {
this.carPostionInfo = _.cloneDeep(res);
}
);
},
// 轮询请求接口
pollingGetInterface () {
// 查询车辆定位
if (this.$route.query.hasOwnProperty('orderNo') || this.$route.query.hasOwnProperty('workOrderNo')) {
this.getCarPostion()
if (
this.$route.query.hasOwnProperty('orderNo') ||
this.$route.query.hasOwnProperty('workOrderNo')
) {
this.getCarPostion();
}
// 获取钣金作业区实时信息
this.getSheetMetalInformation()
this.getSheetMetalInformation();
this.timer = setInterval(() => {
this.carPostionInfo = {}
this.carPostionInfo = {};
// 获取钣金作业区实时信息
this.getSheetMetalInformation()
}, 20000)
this.getSheetMetalInformation();
}, 20000);
}
}
};
......@@ -411,7 +417,20 @@ export default {
.page-pack {
min-height: 100%;
background: rgba(0, 7, 12, 1);
.onlineNum {
position: absolute;
color: #ffffff;
z-index: 999;
right: 300px;
top: 50px;
color: #00b4ff;
font-size: 16px;
font-weight: 750;
span {
margin: 30px;
font-size: 24px;
}
}
.container-pack {
position: relative;
margin: 0 auto;
......@@ -424,7 +443,8 @@ export default {
width: 140px;
height: 50px;
cursor: pointer;
background: url("../../../assets/images/Monitor/monitor_car.png") no-repeat;
background: url("../../../assets/images/Monitor/monitor_car.png")
no-repeat;
background-size: 35px 18px;
background-position: 0 16px;
......
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