From ee9201d6d846db498a5195d05b73fb60e976bba3 Mon Sep 17 00:00:00 2001 From: LiLongLong <13717757313@163.com> Date: Thu, 8 May 2025 15:25:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8A=A0=E6=B6=B2=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/container.ts | 5 ++ src/types/container.d.ts | 13 +++ src/types/solution.d.ts | 2 +- src/views/container/index.vue | 61 +++++++++---- src/views/container/liquidItem.vue | 171 ++++++++++++++++++++++++++++++------- src/views/solution/index.vue | 45 +++++++--- 6 files changed, 237 insertions(+), 60 deletions(-) create mode 100644 src/types/container.d.ts diff --git a/src/apis/container.ts b/src/apis/container.ts index e69de29..d1f7375 100644 --- a/src/apis/container.ts +++ b/src/apis/container.ts @@ -0,0 +1,5 @@ +import http from 'libs/http' + +export const getContainerList = (): Promise => http.get(`/container/list`) + +export const updateContainer = (params: Container.ContainerItem): Promise => http.put(`/container`, params) diff --git a/src/types/container.d.ts b/src/types/container.d.ts new file mode 100644 index 0000000..8bfad8b --- /dev/null +++ b/src/types/container.d.ts @@ -0,0 +1,13 @@ +declare namespace Container { + interface ContainerItem { + id: number + createTime?: string + updateTime?: string + type: number + solutionId: number + pumpId: string + capacityTotal: string | number + capacityUsed: string | number + solutionName?: string + } +} diff --git a/src/types/solution.d.ts b/src/types/solution.d.ts index c06b3a7..b102ff3 100644 --- a/src/types/solution.d.ts +++ b/src/types/solution.d.ts @@ -1,6 +1,6 @@ declare namespace Solution { interface SolutionItem { - id?: number + id: number | number name: string updateTime?: string createTime?: string diff --git a/src/views/container/index.vue b/src/views/container/index.vue index b0ed49c..da43f0d 100644 --- a/src/views/container/index.vue +++ b/src/views/container/index.vue @@ -1,23 +1,49 @@ diff --git a/src/views/container/liquidItem.vue b/src/views/container/liquidItem.vue index 1163f2b..f7c9a12 100644 --- a/src/views/container/liquidItem.vue +++ b/src/views/container/liquidItem.vue @@ -1,34 +1,89 @@ @@ -36,10 +91,14 @@ const onInputBlur = (e: any) => {
{{ itemIndex + 1 }}
-
- - - +
+
+ {{ solutionInfo.solutionName }} + 选择酸液 +
+
+ +
@@ -48,7 +107,7 @@ const onInputBlur = (e: any) => {
chemical-bottle
-
+
chemical-bottle
@@ -56,12 +115,36 @@ const onInputBlur = (e: any) => {
+ +
+ + + +
+
+ + + +
+ +
@@ -70,7 +153,7 @@ const onInputBlur = (e: any) => { border: 1px solid #ccc; border-radius: 5px; margin: 10px; - width: 150px; + width: 17vw; text-align: center; border-radius: 1rem; } @@ -88,7 +171,6 @@ const onInputBlur = (e: any) => { } .bottle { filter:hue-rotate(217deg) saturate(36); - mask: linear-gradient(to bottom, transparent 70%, rgb(38, 219, 50)); /* 仅显示底部 30% */ position: absolute; } .liquied-ml{ @@ -111,11 +193,11 @@ const onInputBlur = (e: any) => { height:2.5rem; } .content-img{ - width: 80%; - height: 20vh; + height: 23vh; + width: 15vw; } .footer { - margin-top: 5px; + margin-top: 4rem; line-height: 20px; } .footer-content{ @@ -130,4 +212,33 @@ const onInputBlur = (e: any) => { .checked { text-decoration: line-through; } +.solution-select{ + display:flex; + width: 120px; + height: 25px; + text-align: center; + margin-left: 5px; + align-items: center; + background: white; + border-radius: 5px; +} +.solution-name{ + width: 100px; + height: 25px; + display: flex; + align-items: center; + justify-content: center; +} +.add-icon{ + margin-right: -4px; +} +.button-icon{ + height: 25px; + width: 25px; + margin: 3px; +} +.radio-marge{ + margin: 10px; + border: 1px solid #e0e0e0; +} diff --git a/src/views/solution/index.vue b/src/views/solution/index.vue index ea0de35..6408175 100644 --- a/src/views/solution/index.vue +++ b/src/views/solution/index.vue @@ -1,5 +1,5 @@