From d2390361b1b51414e596f490ffbcf23488ea35f7 Mon Sep 17 00:00:00 2001 From: dzq Date: Wed, 21 May 2025 17:16:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=9F=9C=E4=BD=93=E6=8A=BD=E5=B1=89=E7=BB=84=E4=BB=B6=E5=B9=B6?= =?UTF-8?q?=E9=9B=86=E6=88=90=E5=88=B0=E8=AF=A6=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在详情页中添加了编辑柜体的抽屉组件,允许用户通过点击按钮打开抽屉并编辑柜体信息。抽屉组件包含表单验证和提交功能,提交成功后刷新详情页数据。 --- .../cabinet/smart-cabinet-card/detail.vue | 29 +++-- .../edit-cabinet-drawer.vue | 100 ++++++++++++++++++ 2 files changed, 119 insertions(+), 10 deletions(-) create mode 100644 src/views/cabinet/smart-cabinet-card/edit-cabinet-drawer.vue diff --git a/src/views/cabinet/smart-cabinet-card/detail.vue b/src/views/cabinet/smart-cabinet-card/detail.vue index 46ef045..86b47c8 100644 --- a/src/views/cabinet/smart-cabinet-card/detail.vue +++ b/src/views/cabinet/smart-cabinet-card/detail.vue @@ -19,6 +19,7 @@ import Refresh from "@iconify-icons/ep/refresh"; import CellFormModal from "@/views/cabinet/cabinet-cell/cell-form-modal.vue"; import CellEditModal from "@/views/cabinet/cabinet-cell/cell-edit-modal.vue"; import { getGoodsInfo } from "@/api/shop/goods"; +import EditCabinetDrawer from "./edit-cabinet-drawer.vue"; import { CabinetMainboardDTO, deleteMainboard, getMainboardList, updateMainboard } from "@/api/cabinet/mainboards"; defineOptions({ @@ -37,7 +38,6 @@ const cabinetInfo = ref({ }); const loading = ref(false); const activeTab = ref('cells'); -const mainboardConfigVisible = ref(false); const mainboardList = ref([]); const mainboardPagination = ref({ pageSize: 5, @@ -48,6 +48,7 @@ const cabinetId = ref(0); const gatewayConfigVisible = ref(false); const shopConfigVisible = ref(false); const mainCabinetConfigVisible = ref(false); +const editCabinetDrawerVisible = ref(false); const cellList = ref([]); const cellPagination = ref({ pageSize: 5, @@ -285,15 +286,19 @@ onMounted(() => { - - {{ cabinetInfo.mainCabinet || '-' }} - {{ cabinetInfo.mainCabinetName || '-' }} - {{ cabinetInfo.mqttServerId || '-' }} - {{ cabinetInfo.operator || '-' }} - - 配置主板 - - +
+
+ + 编辑柜体 + +
+ + {{ cabinetInfo.mainCabinet || '-' }} + {{ cabinetInfo.mainCabinetName || '-' }} + {{ cabinetInfo.mqttServerId || '-' }} + {{ cabinetInfo.operator || '-' }} + +
@@ -387,6 +392,10 @@ onMounted(() => { + + + diff --git a/src/views/cabinet/smart-cabinet-card/edit-cabinet-drawer.vue b/src/views/cabinet/smart-cabinet-card/edit-cabinet-drawer.vue new file mode 100644 index 0000000..056b688 --- /dev/null +++ b/src/views/cabinet/smart-cabinet-card/edit-cabinet-drawer.vue @@ -0,0 +1,100 @@ + + + \ No newline at end of file