This commit is contained in:
lb 2023-07-12 17:12:12 +08:00
parent 3409e7dd8a
commit 776ba572da
4 changed files with 92 additions and 77 deletions

View File

@ -32,7 +32,7 @@ export default {
}; };
}, },
mounted() { mounted() {
this.getRuntime() this.getRuntime();
setInterval(this.getRuntime, 1000 * 60 * 60); setInterval(this.getRuntime, 1000 * 60 * 60);
}, },
methods: { methods: {

View File

@ -73,9 +73,12 @@ export default {
this.$set(this.rdata[2], "value", `${min}${sec}`); this.$set(this.rdata[2], "value", `${min}${sec}`);
}, 1000); }, 1000);
}, },
kilnPressure: function(val) {
this.pressure = val.split("")
}
}, },
computed: { computed: {
...mapState(["fireDirection", "lastFireChangeTime", "fireChangeTime"]), ...mapState(["fireDirection", "lastFireChangeTime", "fireChangeTime", "kilnPressure"]),
}, },
}; };
</script> </script>

View File

@ -5,7 +5,7 @@
<span <span
v-for="(val, index) in runtime" v-for="(val, index) in runtime"
:key="index" :key="index"
:class="{ digit: true, dot: press == '.' ? true : false }" :class="{ digit: true, dot: val == '.' ? true : false }"
>{{ val }}</span >{{ val }}</span
> >
<span></span> <span></span>
@ -21,9 +21,21 @@ export default {
runtime: "0012".split(""), runtime: "0012".split(""),
}; };
}, },
created() {}, mounted() {
mounted() {}, this.getRuntime();
methods: {}, setInterval(this.getRuntime, 1000 * 60 * 60);
},
methods: {
getRuntime() {
const diff = Date.now() - new Date("2023-5-7 8:00:00");
const days = parseInt(diff / 1000 / 60 / 60 / 24);
const hours = parseInt(
(diff - days * 24 * 60 * 60 * 1000) / 1000 / 60 / 60
);
console.log("days", days);
this.runtime = (days + "").padStart(4, "0");
},
},
}; };
</script> </script>

View File

@ -21,7 +21,7 @@
></div> ></div>
<div <div
class="arrow ar-top-right" class="arrow ar-top-right"
:class="bottomRightArrowRolling === '运行' ? 'ar-running' : ''" :class="topRightArrowRolling === '运行' ? 'ar-running' : ''"
></div> ></div>
<div <div
class="arrow ar-bottom-left" class="arrow ar-bottom-left"