Commit eb42b233 authored by 车宾's avatar 车宾

feat(腻子作业区,钣金作业区):功能联调(90%)

parent dc7f3396
...@@ -553,10 +553,12 @@ export default { ...@@ -553,10 +553,12 @@ export default {
}, },
data () { data () {
return { return {
// 定时器
timer: null,
// 当前在线人数 // 当前在线人数
onlineNum: null, onlineNum: null,
// 车体定位信息 // 车辆定位数据
busPosition: {}, carPostionInfo: {},
// 面色/漆作业区域实时信息 // 面色/漆作业区域实时信息
query: {}, query: {},
// 根据车身号获得当前车体信息 // 根据车身号获得当前车体信息
...@@ -574,11 +576,13 @@ export default { ...@@ -574,11 +576,13 @@ export default {
}, },
mounted () { mounted () {
this.getComplexionPaintInformation(); this.pollingGetInterface();
},
beforeDestroy () {
clearInterval(this.timer);
}, },
methods: { methods: {
// 查询面色/漆作业区实时信息 // 获取面色/漆作业区实时信息
getComplexionPaintInformation () { getComplexionPaintInformation () {
this.$fetch('area-controller/realTime-get', { areaNo: '6' }) this.$fetch('area-controller/realTime-get', { areaNo: '6' })
.then(res => { .then(res => {
...@@ -601,24 +605,16 @@ export default { ...@@ -601,24 +605,16 @@ export default {
}, },
// 解析车体类型及车体定位样式 // 解析车体类型及车体定位样式
judgeCarTypeAndcarStationstyle (outOrIn, station) { judgeCarTypeAndcarStationstyle (outOrIn, station) {
//根据车位编码Station 判断是否该车位已经被定位 // 判断有无车体定位信息
// let stateTemp = _.cloneDeep(this.$route.query); if (this.carPostionInfo.hasOwnProperty(station)) {
// console.log('aaa', stateTemp); return 'isPositioned'
// this.$fetch('area-controller/busNo-get', {stateTemp}).then(res => { } else {
// console.log(res);
// this.busPosition = _.cloneDeep(res);
// if (this.busPosition.hasOwnProperty(station)) {
// return 'isPositioned'
// } else {
if (outOrIn === 'OTHER') { if (outOrIn === 'OTHER') {
return 'carOutFactory'; return 'carOutFactory';
} else { } else {
return ''; return '';
} }
// } }
// }).catch(error => {
// reject(error);
// })
}, },
clickBtn (busNub) { clickBtn (busNub) {
console.log(busNub); console.log(busNub);
...@@ -637,6 +633,29 @@ export default { ...@@ -637,6 +633,29 @@ export default {
.catch(error => { .catch(error => {
reject(error); reject(error);
}); });
},
// 查询车辆定位
getCarPostion () {
let queryParams = { orderNo: '1111', workOrderNo: '' }
// 请求接口
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()
}
// 获取面色/漆作业区实时信息
this.getComplexionPaintInformation()
this.timer = setInterval(() => {
this.carPostionInfo = {}
// 获取面色/漆作业区实时信息
this.getComplexionPaintInformation()
}, 20000)
} }
} }
}; };
......
...@@ -449,10 +449,12 @@ export default { ...@@ -449,10 +449,12 @@ export default {
}, },
data () { data () {
return { return {
//定时器
timer: null,
// 车辆定位数据
carPostionInfo: {},
// 当前在线人数 // 当前在线人数
onlineNum: null, onlineNum: null,
// 车体定位信息
busPosition: {},
// 电泳作业区域实时信息 // 电泳作业区域实时信息
query: {}, query: {},
// 根据车身号获得当前车体信息 // 根据车身号获得当前车体信息
...@@ -469,8 +471,11 @@ export default { ...@@ -469,8 +471,11 @@ export default {
}; };
}, },
mounted () { mounted () {
this.getElectrophoresisInformation(); this.pollingGetInterface();
console.log(this.$route) console.log('2222', this.timer)
},
beforeDestroy () {
clearInterval(this.timer)
}, },
methods: { methods: {
// 点击车位弹出车体信息 // 点击车位弹出车体信息
...@@ -509,24 +514,38 @@ export default { ...@@ -509,24 +514,38 @@ export default {
}, },
// 解析车体类型及车体定位样式 // 解析车体类型及车体定位样式
judgeCarTypeAndcarStationstyle (outOrIn, station) { judgeCarTypeAndcarStationstyle (outOrIn, station) {
//根据车位编码Station 判断是否该车位已经被定位 // 判断有无车体定位信息
// let stateTemp = _.cloneDeep(this.$route.query); if (this.carPostionInfo.hasOwnProperty(station)) {
// console.log('aaa', stateTemp); return 'isPositioned'
// this.$fetch('area-controller/busNo-get', {stateTemp}).then(res => { } else {
// console.log(res);
// this.busPosition = _.cloneDeep(res);
// if (this.busPosition.hasOwnProperty(station)) {
// return 'isPositioned'
// } else {
if (outOrIn === 'OTHER') { if (outOrIn === 'OTHER') {
return 'carOutFactory'; return 'carOutFactory';
} else { } else {
return ''; return '';
} }
// } }
// }).catch(error => { },
// reject(error); // 查询车辆定位
// }) getCarPostion () {
let queryParams = { orderNo: '1111', workOrderNo: '' }
// 请求接口
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()
}
// 获取电泳作业区实时信息
this.getElectrophoresisInformation()
this.timer = setInterval(() => {
this.carPostionInfo = {}
// 获取电泳作业区实时信息
this.getElectrophoresisInformation()
}, 20000)
} }
} }
}; };
...@@ -596,7 +615,7 @@ export default { ...@@ -596,7 +615,7 @@ export default {
.elect-row-13-4, .elect-row-13-4,
.elect-row-13-5 { .elect-row-13-5 {
position: absolute; position: absolute;
width: 140px; width: 90px;
height: 40px; height: 40px;
cursor: pointer; cursor: pointer;
background: url("../../../assets/images/Monitor/monitor_car.png") background: url("../../../assets/images/Monitor/monitor_car.png")
......
This diff is collapsed.
...@@ -283,7 +283,6 @@ ...@@ -283,7 +283,6 @@
<p>{{query['HDG1-56'].busNo}}</p> <p>{{query['HDG1-56'].busNo}}</p>
</div> </div>
</div> </div>
<!-- 信息展示弹窗 --> <!-- 信息展示弹窗 -->
<Tooltip <Tooltip
ref="toolRef" ref="toolRef"
...@@ -301,10 +300,12 @@ export default { ...@@ -301,10 +300,12 @@ export default {
}, },
data () { data () {
return { return {
// 定时器
timer: null,
// 当前在线人数 // 当前在线人数
onlineNum: null, onlineNum: null,
// 车体定位信息 // 车辆定位数据
busPosition: {}, carPostionInfo: {},
// 钣金车存放区实时信息 // 钣金车存放区实时信息
query: {}, query: {},
// 根据车身号获得当前车体信息 // 根据车身号获得当前车体信息
...@@ -321,7 +322,10 @@ export default { ...@@ -321,7 +322,10 @@ export default {
}; };
}, },
mounted () { mounted () {
this.getSheetMetalInformation(); this.pollingGetInterface();
},
beforeDestroy () {
clearInterval(this.timer)
}, },
methods: { methods: {
// 获取钣金车存放区实时信息 // 获取钣金车存放区实时信息
...@@ -345,6 +349,7 @@ export default { ...@@ -345,6 +349,7 @@ export default {
reject(error); reject(error);
}); });
}, },
// 点击车辆工位
clickBtn (busNub) { clickBtn (busNub) {
console.log(busNub); console.log(busNub);
let left = window.event.clientX; let left = window.event.clientX;
...@@ -352,8 +357,8 @@ export default { ...@@ -352,8 +357,8 @@ export default {
console.log('left', left); console.log('left', left);
console.log('top', top); console.log('top', top);
this.$refs.toolRef.$refs.tooltip.style.visibility = 'visible'; this.$refs.toolRef.$refs.tooltip.style.visibility = 'visible';
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}px`;
this.$fetch('area-controller/busNo-get', { busNo: busNub }) this.$fetch('area-controller/busNo-get', { busNo: busNub })
.then(res => { .then(res => {
console.log('res', res); console.log('res', res);
...@@ -365,24 +370,38 @@ export default { ...@@ -365,24 +370,38 @@ export default {
}, },
// 解析车体类型及车体定位样式 // 解析车体类型及车体定位样式
judgeCarTypeAndcarStationstyle (outOrIn, station) { judgeCarTypeAndcarStationstyle (outOrIn, station) {
//根据车位编码Station 判断是否该车位已经被定位 // 判断有无车体定位信息
// let stateTemp = _.cloneDeep(this.$route.query); if (this.carPostionInfo.hasOwnProperty(station)) {
// console.log('aaa', stateTemp); return 'isPositioned'
// this.$fetch('area-controller/busNo-get', {stateTemp}).then(res => { } else {
// console.log(res);
// this.busPosition = _.cloneDeep(res);
// if (this.busPosition.hasOwnProperty(station)) {
// return 'isPositioned'
// } else {
if (outOrIn === 'OTHER') { if (outOrIn === 'OTHER') {
return 'carOutFactory'; return 'carOutFactory';
} else { } else {
return ''; return '';
} }
// } }
// }).catch(error => { },
// reject(error); // 查询车辆定位
// }) getCarPostion () {
let queryParams = { orderNo: '1111', workOrderNo: '' }
// 请求接口
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()
}
// 获取钣金作业区实时信息
this.getSheetMetalInformation()
this.timer = setInterval(() => {
this.carPostionInfo = {}
// 获取钣金作业区实时信息
this.getSheetMetalInformation()
}, 20000)
} }
} }
}; };
...@@ -405,8 +424,7 @@ export default { ...@@ -405,8 +424,7 @@ export default {
width: 140px; width: 140px;
height: 50px; height: 50px;
cursor: pointer; cursor: pointer;
background: url("../../../assets/images/Monitor/monitor_car.png") background: url("../../../assets/images/Monitor/monitor_car.png") no-repeat;
no-repeat;
background-size: 35px 18px; background-size: 35px 18px;
background-position: 0 16px; background-position: 0 16px;
...@@ -598,6 +616,18 @@ export default { ...@@ -598,6 +616,18 @@ export default {
top: 700px; top: 700px;
left: 579px; left: 579px;
} }
.carOutFactory {
background: url("../../../assets/images/Monitor/monitor_car_external.png")
no-repeat;
background-size: 35px 18px;
background-position: 0 16px;
}
.isPositioned {
background: url("../../../assets/images/Monitor/monitor_position_car.gif")
no-repeat;
background-size: 35px 18px;
background-position: 0 16px;
}
} }
} }
</style> </style>
...@@ -74,12 +74,12 @@ export default { ...@@ -74,12 +74,12 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.tooltip { .tooltip {
position: absolute; position: absolute;
padding: 20px 0 0 0; padding: 20px 0 0 0;
width: 260px; width: 260px;
height: 266px; height: 246px;
border-radius: 9px; border-radius: 9px;
background: #000000; background: #000000;
opacity: 0.8; opacity: 0.8;
......
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