From cbf4e4e32736b7ed4f016f7ba2b6e609810fc758 Mon Sep 17 00:00:00 2001
From: huangchenhao <123673748@qq.com>
Date: Wed, 12 Nov 2025 17:28:02 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E8=B5=84=E7=AE=A1=E7=90=86=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/Equipment/EquipmentDetails.vue | 37 +-
.../views/Equipment/EquipmentManagement.vue | 261 +++++++++----
.../src/views/Material/MaterialManagement.vue | 358 ++++++++++++++----
.../src/views/SnowEventManagement/index.js | 4 +-
4 files changed, 511 insertions(+), 149 deletions(-)
diff --git a/packages/mobile/src/views/Equipment/EquipmentDetails.vue b/packages/mobile/src/views/Equipment/EquipmentDetails.vue
index d88d26a..0a2c64d 100644
--- a/packages/mobile/src/views/Equipment/EquipmentDetails.vue
+++ b/packages/mobile/src/views/Equipment/EquipmentDetails.vue
@@ -27,7 +27,16 @@
>
-
+
+
+
+
+
@@ -56,6 +65,7 @@
+
@@ -636,7 +646,7 @@ import "vant/es/toast/style";
import "vant/es/popup/style";
import { ref, onMounted, toRaw, reactive } from "vue";
import { useRouter, useRoute } from "vue-router";
-import { showToast, showLoadingToast } from "vant";
+import { showToast, showLoadingToast, showImagePreview } from "vant";
import { request } from "../../../../shared/utils/request";
const router = useRouter();
@@ -653,7 +663,9 @@ const onSelect = (action) => {
}
};
const equipmentInfo = ref({});
+const yhzInfo = ref({});
const equipmentDetailInfo = ref({});
+const photos = ref([]);
// 获取设备详情
const getEquipmentDetailInfo = async () => {
@@ -664,6 +676,7 @@ const getEquipmentDetailInfo = async () => {
});
if (res.code && res.code === "00000") {
equipmentDetailInfo.value = res.data.equipment;
+ photos.value = res.data.photos;
console.log("设备详情", toRaw(equipmentDetailInfo.value));
} else {
throw new Error(res.data.message);
@@ -674,15 +687,17 @@ const getEquipmentDetailInfo = async () => {
};
onMounted(() => {
- equipmentInfo.value = JSON.parse(decodeURIComponent(route.params.data));
- console.log("equipmentInfo", toRaw(equipmentInfo.value));
+ const data = JSON.parse(decodeURIComponent(route.params.data));
+ equipmentInfo.value = data.equipmentInfo;
+
+ yhzInfo.value = data.yhzInfo;
getEquipmentDetailInfo();
});
const onClickLeft = () => {
router.push({
name: "EquipManage",
- params: { data: encodeURIComponent(JSON.stringify(equipmentInfo.value)) },
+ params: { data: encodeURIComponent(JSON.stringify(yhzInfo.value)) },
});
};
@@ -786,7 +801,7 @@ const onDeleteConfirm = async () => {
router.push({
name: "EquipManage",
params: {
- data: encodeURIComponent(JSON.stringify(equipmentInfo.value)),
+ data: encodeURIComponent(JSON.stringify(yhzInfo.value)),
},
});
} else {
@@ -1009,6 +1024,14 @@ const onEditSubmit = async () => {
console.log("error", error);
}
};
+
+const showImage = (photos) => {
+ const photosArr = photos.map((item) => item.photoUrl);
+ showImagePreview({
+ images: photosArr,
+ closeable: true,
+ });
+};