From c4d25912d11ab9059f8165c25a161634bb9b5e97 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 16 六月 2026 09:45:33 +0800
Subject: [PATCH] proapp 1.工作台分类修改
---
src/pages/qualityManagement/processInspection/detail.vue | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/pages/qualityManagement/processInspection/detail.vue b/src/pages/qualityManagement/processInspection/detail.vue
index 6f1ec64..798aeee 100644
--- a/src/pages/qualityManagement/processInspection/detail.vue
+++ b/src/pages/qualityManagement/processInspection/detail.vue
@@ -15,10 +15,11 @@
</view>
<text class="header-title">{{ detailData.productName || '-' }}</text>
<view class="status-tags">
- <u-tag :type="getTagType(detailData.checkResult)"
+ <u-tag v-if="detailData.checkResult"
+ :type="getTagType(detailData.checkResult)"
size="small"
class="status-tag">
- {{ detailData.checkResult || '-' }}
+ {{ detailData.checkResult }}
</u-tag>
<u-tag :type="getStateTagType(detailData.inspectState)"
size="small"
@@ -131,7 +132,7 @@
<script setup>
import { ref, onMounted } from "vue";
- import { onShow } from "@dcloudio/uni-app";
+ import { onShow, onLoad } from "@dcloudio/uni-app";
import PageHeader from "@/components/PageHeader.vue";
import dayjs from "dayjs";
import { qualityInspectParamInfo } from "@/api/qualityManagement/materialInspection.js";
@@ -204,16 +205,9 @@
}, 1500);
};
- // 鑾峰彇椤甸潰ID
- const getPageId = () => {
- const pages = getCurrentPages();
- const currentPage = pages[pages.length - 1];
- return currentPage.options.id;
- };
-
// 鑾峰彇璇︽儏鏁版嵁
const getDetail = () => {
- const id = getPageId();
+ const id = optionsId.value;
if (!id) {
showToast("鍙傛暟閿欒");
return;
@@ -263,6 +257,12 @@
onMounted(() => {
getDetail();
});
+
+ const optionsId = ref("");
+ onLoad(options => {
+ optionsId.value = options.id || "";
+ getDetail();
+ });
</script>
<style scoped lang="scss">
--
Gitblit v1.9.3