update
This commit is contained in:
parent
3409e7dd8a
commit
776ba572da
@ -32,7 +32,7 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getRuntime()
|
||||
this.getRuntime();
|
||||
setInterval(this.getRuntime, 1000 * 60 * 60);
|
||||
},
|
||||
methods: {
|
||||
|
@ -73,9 +73,12 @@ export default {
|
||||
this.$set(this.rdata[2], "value", `${min}分${sec}秒`);
|
||||
}, 1000);
|
||||
},
|
||||
kilnPressure: function(val) {
|
||||
this.pressure = val.split("")
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["fireDirection", "lastFireChangeTime", "fireChangeTime"]),
|
||||
...mapState(["fireDirection", "lastFireChangeTime", "fireChangeTime", "kilnPressure"]),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<span
|
||||
v-for="(val, index) in runtime"
|
||||
:key="index"
|
||||
:class="{ digit: true, dot: press == '.' ? true : false }"
|
||||
:class="{ digit: true, dot: val == '.' ? true : false }"
|
||||
>{{ val }}</span
|
||||
>
|
||||
<span>天</span>
|
||||
@ -21,9 +21,21 @@ export default {
|
||||
runtime: "0012".split(""),
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {},
|
||||
mounted() {
|
||||
this.getRuntime();
|
||||
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>
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
></div>
|
||||
<div
|
||||
class="arrow ar-top-right"
|
||||
:class="bottomRightArrowRolling === '运行' ? 'ar-running' : ''"
|
||||
:class="topRightArrowRolling === '运行' ? 'ar-running' : ''"
|
||||
></div>
|
||||
<div
|
||||
class="arrow ar-bottom-left"
|
||||
|
Loading…
Reference in New Issue
Block a user