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

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

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