Browse Source

fix: 时间自动加8小时取消

master
guoapeng 2 weeks ago
parent
commit
238f1fa12e
  1. 2
      src/components/home/LineChart.vue
  2. 2
      src/stores/systemStore.ts
  3. 95
      src/views/seal/index.vue

2
src/components/home/LineChart.vue

@ -75,7 +75,7 @@ watch(
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: false, boundaryGap: false,
data: newValue.data?.map(item => formatDateTime('HH:mm:ss', item.timestamp + 8 * 60 * 60 * 1000)),
data: newValue.data?.map(item => formatDateTime('HH:mm:ss', item.timestamp)),
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',

2
src/stores/systemStore.ts

@ -138,7 +138,7 @@ export const useSystemStore = defineStore(
fnName: 'getTime', fnName: 'getTime',
} }
const res = await sendCmd(timeParams) const res = await sendCmd(timeParams)
systemTime.value = res.time + 8 * 60 * 60 * 1000
systemTime.value = res.time
} }
return { return {

95
src/views/seal/index.vue

@ -138,58 +138,48 @@ function handleConfirm(value: string) {
</div> </div>
</div> </div>
<div class="seal-right"> <div class="seal-right">
<div class="left-title">
<div class="title-text-test">
<img :src="SealInstrumentSvg" alt="仪表盘">
<div class="title-text">
气压差值
</div>
<div class="title-text title-text-kpa">
<span>{{ roundNumber(diffPressure, 2) }}</span>
<span class="title-kpa-pl">Kpa</span>
</div>
<div class="title-text-test">
<img :src="SealInstrumentSvg" alt="仪表盘">
<div class="title-text">
气压差值
</div> </div>
</div>
<div class="seal-right-btn">
<div>
<div class="seal-add-btn">
<bt-button
button-text="启动测试"
bg-color="#31CB7A"
text-color="#FFFFFF"
width="27vw"
height="7vh"
text-size="24px"
border-radius="12px"
:disabled="sealInfo.workState !== 'idle'"
min-height="4rem"
@click="onStartTest"
>
<template #icon>
<img :src="homeStart" alt="">
</template>
</bt-button>
</div>
<div class="seal-add-btn">
<bt-button
:button-text="stopText"
bg-color="#FF6767"
text-color="#FFFFFF"
width="27vw"
height="7vh"
text-size="24px"
border-radius="12px"
:disabled="stopDisabled"
min-height="4rem"
@click="onFinishTest"
>
<template #icon>
<img :src="homeFinish" alt="">
</template>
</bt-button>
</div>
<div class="title-text title-text-kpa">
<span>{{ roundNumber(diffPressure, 2) }}</span>
<span class="title-kpa-pl">Kpa</span>
</div> </div>
</div> </div>
<bt-button
button-text="启动测试"
bg-color="#31CB7A"
text-color="#FFFFFF"
width="27vw"
height="7vh"
text-size="24px"
border-radius="12px"
:disabled="sealInfo.workState !== 'idle'"
min-height="4rem"
@click="onStartTest"
>
<template #icon>
<img :src="homeStart" alt="">
</template>
</bt-button>
<bt-button
:button-text="stopText"
bg-color="#FF6767"
text-color="#FFFFFF"
width="27vw"
height="7vh"
text-size="24px"
border-radius="12px"
:disabled="stopDisabled"
min-height="4rem"
@click="onFinishTest"
>
<template #icon>
<img :src="homeFinish" alt="">
</template>
</bt-button>
</div> </div>
</main> </main>
<SoftKeyboard <SoftKeyboard
@ -236,7 +226,7 @@ function handleConfirm(value: string) {
//width: 16rem; //width: 16rem;
height: 5rem; height: 5rem;
border-radius: 15px; border-radius: 15px;
padding: 0 2 0px;
padding: 0 2px 0;
} }
.seal-time-text { .seal-time-text {
font-size: 1.5rem; font-size: 1.5rem;
@ -273,7 +263,8 @@ function handleConfirm(value: string) {
.seal-right { .seal-right {
background: $gradient-color; background: $gradient-color;
display: grid; display: grid;
grid-template-rows: repeat(2, 1fr);
grid-template-rows: repeat(3, 1fr);
gap: 20px;
.left-title { .left-title {
//padding-top: 3.5vw; //padding-top: 3.5vw;
padding-left: 2.5vw; padding-left: 2.5vw;
@ -296,7 +287,7 @@ function handleConfirm(value: string) {
} }
} }
.seal-right-btn { .seal-right-btn {
height: 30vh;
//height: 30vh;
grid-row: 2 / 4; grid-row: 2 / 4;
margin-top: -6rem; margin-top: -6rem;
display: flex; display: flex;

Loading…
Cancel
Save