Commit eb42b233 authored by 车宾's avatar 车宾

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

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