产线看板调整

master
FCD 3 weeks ago
parent 7cb41a9cf5
commit 46cb5180ac

@ -451,27 +451,30 @@ export default {
// this.getdatalist(this.selectxt) // this.getdatalist(this.selectxt)
this.selectfactoryCodelist(); this.selectfactoryCodelist();
this.gettime(); this.gettime();
this.startRotation() // this.startRotation()
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.getProductionNumberPLC(); this.getProductionNumberPLC();
}, 10000); }, 10000);
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.rotationTimer) clearInterval(this.rotationTimer)
clearInterval(this.timer) clearInterval(this.timer)
}, },
methods: { methods: {
startRotation() { // startRotation() {
this.rotationTimer = setInterval(() => { // this.rotationTimer = setInterval(() => {
if(this.dictDatatype?.length > 0) { // if(this.dictDatatype?.length > 0) {
this.currentIndex = (this.currentIndex + 1) % this.dictDatatype.length // this.currentIndex = (this.currentIndex + 1) % this.dictDatatype.length
console.log(this.currentIndex + 1); // console.log(this.currentIndex + 1);
// console.log(this.dictDatatype); // // console.log(this.dictDatatype);
this.selectxtclasses = this.dictDatatype[this.currentIndex].equCode // this.selectxtclasses = this.dictDatatype[this.currentIndex].equCode
this.selectline2(this.selectxtclasses) // change // this.selectline2(this.selectxtclasses) // change
} // }
}, 60000) // }, 60000)
}, // },
back() { back() {
this.$router.push({ path: "/index" }); this.$router.push({ path: "/index" });
}, },
@ -513,7 +516,11 @@ export default {
}).then((response) => { }).then((response) => {
if (response) { if (response) {
this.dictDatatype = response; this.dictDatatype = response;
_this.selectxtclasses = _this.dictDatatype[0].equCode; if (_this.$route.query.equCode){
_this.selectxtclasses = _this.$route.query.equCode;
}else {
_this.selectxtclasses = _this.dictDatatype[0].equCode;
}
_this.getdatalist(); _this.getdatalist();
// _this.getDeviceRefreshTime(); // _this.getDeviceRefreshTime();
} }
@ -592,6 +599,9 @@ export default {
//PLC //PLC
getProductionNumberPLC(){ getProductionNumberPLC(){
const _this = this; const _this = this;
if (!_this.selectxtclasses){
return;
}
getProductionNumberPLC({ getProductionNumberPLC({
equCode: _this.selectxtclasses, equCode: _this.selectxtclasses,
factoryCode: "ds_" + _this.selectxt, factoryCode: "ds_" + _this.selectxt,

Loading…
Cancel
Save