Browse Source

fix:消毒液ui优化

master
guoapeng 2 weeks ago
parent
commit
0db26f4d76
  1. 11
      src/components/liquid/LiquidLevel.vue
  2. 41
      src/views/seal/index.vue

11
src/components/liquid/LiquidLevel.vue

@ -64,7 +64,7 @@ const liquidHeight = computed(() => {
} }
.liquid-level-container { .liquid-level-container {
position: relative; position: relative;
height: 60vh;; /* 根据实际调整 */
height: 60vh; /* 根据实际调整 */
} }
.liquid-level-img-l { .liquid-level-img-l {
height: 62.5vh; height: 62.5vh;
@ -79,7 +79,7 @@ const liquidHeight = computed(() => {
left: 0; left: 0;
width: 100%; width: 100%;
background: linear-gradient(to top, #0099ff, #7fc8fa); /* 颜色渐变,可按需调整 */ background: linear-gradient(to top, #0099ff, #7fc8fa); /* 颜色渐变,可按需调整 */
min-height: .8rem;
min-height: 0.8rem;
border-radius: 0 0 20px 20px; border-radius: 0 0 20px 20px;
} }
.liquid-level-middle { .liquid-level-middle {
@ -89,13 +89,14 @@ const liquidHeight = computed(() => {
position: absolute; position: absolute;
width: 50%; width: 50%;
z-index: 1; z-index: 1;
margin-left: 23%
margin-left: 23%;
} }
.current-level { .current-level {
width: 100%;
display: flex;
justify-content: center;
position: absolute; position: absolute;
top: 2rem; top: 2rem;
left: 50%;
transform: translateX(-50%);
font-size: 1.3rem; font-size: 1.3rem;
font-weight: bold; font-weight: bold;
.text { .text {

41
src/views/seal/index.vue

@ -23,9 +23,7 @@ const leakRemainingTime = computed(() => sealStore.leakRemainingTime)
const currentPressure = computed(() => sealStore.currentPressure) const currentPressure = computed(() => sealStore.currentPressure)
const diffPressure = computed<number>(() => { const diffPressure = computed<number>(() => {
if (sealInfo.value.workState === 'leakTesting') { if (sealInfo.value.workState === 'leakTesting') {
return Math.abs(
Number(currentPressure.value) - Number(initialPressure.value),
)
return Math.abs(Number(currentPressure.value) - Number(initialPressure.value))
} }
return 0 return 0
}) })
@ -46,16 +44,16 @@ watch(
) )
onMounted(async () => { onMounted(async () => {
const res = await sendCmd({ className: 'AirLeakDetectTest', fnName: 'getServiceConfig', params: { inflationTimeMs: 0.3 } })
const res = await sendCmd({
className: 'AirLeakDetectTest',
fnName: 'getServiceConfig',
params: { inflationTimeMs: 0.3 },
})
inflationTime.value = res.inflationTimeMs inflationTime.value = res.inflationTimeMs
}) })
const stopText = computed(() =>
sealInfo.value.workState === 'stopping' ? '停止中...' : '停止测试',
)
const stopDisabled = computed(() =>
sealInfo.value.workState === 'stopping' || sealInfo.value.workState === 'idle',
)
const stopText = computed(() => (sealInfo.value.workState === 'stopping' ? '停止中...' : '停止测试'))
const stopDisabled = computed(() => sealInfo.value.workState === 'stopping' || sealInfo.value.workState === 'idle')
function onStartTest() { function onStartTest() {
const statusName = getDeviceStatus() const statusName = getDeviceStatus()
@ -74,7 +72,9 @@ function onStartTest() {
FtMessage.error('指令发送失败,请稍候再试') FtMessage.error('指令发送失败,请稍候再试')
} }
}) })
.finally(() => { loading.value = false })
.finally(() => {
loading.value = false
})
} }
function onFinishTest() { function onFinishTest() {
@ -86,7 +86,9 @@ function onFinishTest() {
FtMessage.success('测试已停止') FtMessage.success('测试已停止')
} }
}) })
.finally(() => { loading.value = false })
.finally(() => {
loading.value = false
})
} }
function handleConfirm(value: string) { function handleConfirm(value: string) {
@ -195,7 +197,7 @@ function handleConfirm(value: string) {
v-model="inputValue" v-model="inputValue"
:is-visible="keyboardVisible" :is-visible="keyboardVisible"
:keyboard-type="keyboardType" :keyboard-type="keyboardType"
@update-keyboard-visible="(visible: boolean) => keyboardVisible = visible"
@update-keyboard-visible="(visible: boolean) => (keyboardVisible = visible)"
@confirm="handleConfirm" @confirm="handleConfirm"
@close="keyboardVisible = false" @close="keyboardVisible = false"
/> />
@ -209,7 +211,7 @@ function handleConfirm(value: string) {
height: $main-container-height; height: $main-container-height;
gap: 10px; gap: 10px;
.seal-left { .seal-left {
background: #FFFFFF;
background: #ffffff;
grid-column: 1 / 3; grid-column: 1 / 3;
box-shadow: 0px 1px 5px 0px rgba(9, 39, 62, 0.15); box-shadow: 0px 1px 5px 0px rgba(9, 39, 62, 0.15);
background: $gradient-color; background: $gradient-color;
@ -230,10 +232,11 @@ function handleConfirm(value: string) {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: #F6FAFE;
width: 16rem;
background: #f6fafe;
//width: 16rem;
height: 5rem; height: 5rem;
border-radius: 15px; border-radius: 15px;
padding: 0 2 0px;
} }
.seal-time-text { .seal-time-text {
font-size: 1.5rem; font-size: 1.5rem;
@ -242,7 +245,7 @@ function handleConfirm(value: string) {
} }
.seal-test-time { .seal-test-time {
font-size: 24px; font-size: 24px;
color: #2892F3;
color: #2892f3;
} }
.seal-time-statue { .seal-time-statue {
height: 3rem; height: 3rem;
@ -284,7 +287,7 @@ function handleConfirm(value: string) {
font-size: 20px; font-size: 20px;
} }
.title-text-kpa { .title-text-kpa {
color: #409EFF;
color: #409eff;
} }
.title-kpa-pl { .title-kpa-pl {
padding-left: 5px; padding-left: 5px;
@ -317,7 +320,7 @@ function handleConfirm(value: string) {
width: 25vw; width: 25vw;
height: 12vh; height: 12vh;
border-radius: 12px; border-radius: 12px;
color: #FFFFFF;
color: #ffffff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

Loading…
Cancel
Save