From 5384750e59bbb27c54e090100429c48eaba46df0 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 20 十一月 2025 10:15:20 +0800
Subject: [PATCH] fix: 完成拉丝自检、原材料自检优化

---
 src/pages/production/wire/selfInspect/index.vue |  677 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 606 insertions(+), 71 deletions(-)

diff --git a/src/pages/production/wire/selfInspect/index.vue b/src/pages/production/wire/selfInspect/index.vue
index 37f3733..fcb49a0 100644
--- a/src/pages/production/wire/selfInspect/index.vue
+++ b/src/pages/production/wire/selfInspect/index.vue
@@ -1,103 +1,571 @@
 <template>
   <view class="list">
-    <z-paging ref="pagingRef" v-model="cardList" :fixed="false" @query="getList">
-      <template #top>
-        <CardTitle title="鎷変笣鑷" :hideAction="false" />
+    <CardTitle title="鑷绠$悊" :hideAction="false" :full="false">
+      <template #action>
+        <wd-button
+          icon="file-add"
+          :round="false"
+          size="small"
+          custom-class="add_btn"
+          @click="handleOpenAddDialog"
+        >
+          鏂板鑷
+        </wd-button>
       </template>
-      <wd-card v-for="(item, index) in cardList" :key="index" type="rectangle" custom-class="round">
+    </CardTitle>
+
+    <!-- 鑷鍒楄〃锛堝崱鐗囨牱寮忥級 -->
+    <view class="inspection-list">
+      <wd-card
+        v-for="(item, index) in dataList"
+        :key="item.id || index"
+        class="card_bg"
+        style="margin-bottom: 12px"
+      >
         <template #title>
-          <view class="flex justify-between">
-            <view>
-              <wd-icon name="a-rootlist" color="#0D867F"></wd-icon>
-              <text class="text-[#252525] ml-2 font-medium">{{ item.inspectionProject }}</text>
+          <view class="flex justify-between w-full">
+            <view class="flex items-center">
+              <wd-icon name="file" color="#0D867F" size="20px"></wd-icon>
+              <text class="font-medium text-[#252525] ml-2">鑷璁板綍 #{{ index + 1 }}</text>
             </view>
-            <view class="text-[#A8A8A8]" @click="toEdit">缂栬緫</view>
+            <view class="flex gap-2">
+              <wd-button
+                plain
+                type="primary"
+                size="small"
+                @click="handleEdit(item)"
+                style="margin-right: 10px"
+              >
+                缂栬緫
+              </wd-button>
+              <wd-button plain type="error" size="small" @click="handleDelete(item)">
+                鍒犻櫎
+              </wd-button>
+            </view>
           </view>
         </template>
-        <ProductionCard :data="cardAttr" :value="item" color="#0D867F" />
+
+        <view class="card-content">
+          <!-- 鍩烘湰淇℃伅 -->
+          <view class="info-section">
+            <view class="section-header">
+              <wd-icon name="info" color="#0D867F" size="16px"></wd-icon>
+              <text class="section-title">鍩烘湰淇℃伅</text>
+            </view>
+            <view class="info-grid">
+              <view class="info-item">
+                <text class="info-label">鑷鏃堕棿:</text>
+                <text class="info-value">{{ item.fixedInfo?.recordDate || "-" }}</text>
+              </view>
+              <view class="info-item">
+                <text class="info-label">鏈哄彴:</text>
+                <text class="info-value">{{ item.fixedInfo?.deviceModel || "-" }}</text>
+              </view>
+              <view class="info-item">
+                <text class="info-label">鐝粍:</text>
+                <text class="info-value">{{ item.fixedInfo?.teamName || "-" }}</text>
+              </view>
+              <view class="info-item">
+                <text class="info-label">棣栨鍗曞彿:</text>
+                <text class="info-value">{{ item.fixedInfo?.firstNo || "-" }}</text>
+              </view>
+            </view>
+          </view>
+
+          <!-- 鍘熸潗鏂欎俊鎭� -->
+          <view class="info-section">
+            <view class="section-header">
+              <wd-icon name="folder" color="#0D867F" size="16px"></wd-icon>
+              <text class="section-title">鍘熸潗鏂欎俊鎭�</text>
+            </view>
+            <view class="info-grid">
+              <view class="info-item">
+                <text class="info-label">鍨嬪彿:</text>
+                <text class="info-value">{{ item.fixedInfo?.poleModel || "-" }}</text>
+              </view>
+              <view class="info-item">
+                <text class="info-label">鎵规:</text>
+                <text class="info-value">{{ item.fixedInfo?.poleNumber || "-" }}</text>
+              </view>
+              <view class="info-item">
+                <text class="info-label">鐢熶骇杞存暟:</text>
+                <text class="info-value">{{ item.fixedInfo?.outputNumber || "-" }}</text>
+              </view>
+              <view class="info-item">
+                <text class="info-label">瀹氬緞妯″叿:</text>
+                <text class="info-value">{{ item.fixedInfo?.lastSlot || "-" }}</text>
+              </view>
+            </view>
+          </view>
+
+          <!-- 鍗曚笣鐩村緞 -->
+          <view class="info-section">
+            <view class="section-header">
+              <wd-icon name="setting" color="#0D867F" size="16px"></wd-icon>
+              <text class="section-title">鍗曚笣鐩村緞(mm)</text>
+            </view>
+            <view class="info-grid">
+              <view class="info-item">
+                <text class="info-label">瑙勬牸鍨嬪彿:</text>
+                <text class="info-value">{{ item.fixedInfo?.model || "-" }}</text>
+              </view>
+              <view class="info-item">
+                <text class="info-label">鏈�澶у��:</text>
+                <text class="info-value">
+                  {{
+                    item.inspectionResult?.maxDia !== null &&
+                    item.inspectionResult?.maxDia !== undefined
+                      ? item.inspectionResult.maxDia
+                      : "-"
+                  }}
+                </text>
+              </view>
+              <view class="info-item">
+                <text class="info-label">鏈�灏忓��:</text>
+                <text class="info-value">
+                  {{
+                    item.inspectionResult?.minDia !== null &&
+                    item.inspectionResult?.minDia !== undefined
+                      ? item.inspectionResult.minDia
+                      : "-"
+                  }}
+                </text>
+              </view>
+            </view>
+          </view>
+
+          <!-- 鎴愮洏璐ㄩ噺 -->
+          <view class="info-section">
+            <view class="section-header">
+              <wd-icon name="check" color="#0D867F" size="16px"></wd-icon>
+              <text class="section-title">鎴愮洏璐ㄩ噺</text>
+            </view>
+            <view class="info-grid">
+              <view class="info-item">
+                <text class="info-label">鍗风粫绱у瘑:</text>
+                <text class="info-value">
+                  {{ item.inspectionResult?.windingTightness || "鏄�" }}
+                </text>
+              </view>
+              <view class="info-item">
+                <text class="info-label">鎺掑垪鏁撮綈:</text>
+                <text class="info-value">
+                  {{ item.inspectionResult?.arrangementNeatness || "鏄�" }}
+                </text>
+              </view>
+              <view class="info-item-full">
+                <text class="info-label">澶栧眰閾濈嚎绂讳晶鏉胯竟缂樿窛绂�(mm):</text>
+                <text
+                  class="info-value"
+                  :style="{
+                    color: item.inspectionResult?.aluminumWireDistance < 25 ? '#f56c6c' : '',
+                  }"
+                >
+                  {{ item.inspectionResult?.aluminumWireDistance || "-" }}
+                </text>
+              </view>
+            </view>
+          </view>
+
+          <!-- 鍏朵粬淇℃伅 -->
+          <view class="info-section">
+            <view class="section-header">
+              <wd-icon name="more" color="#0D867F" size="16px"></wd-icon>
+              <text class="section-title">鍏朵粬淇℃伅</text>
+            </view>
+            <view class="info-grid">
+              <view class="info-item-full">
+                <text class="info-label">澶栬璐ㄩ噺:</text>
+                <text class="info-value">
+                  {{ getAppearanceLabel(item.inspectionResult?.appearance) }}
+                </text>
+              </view>
+              <view class="info-item">
+                <text class="info-label">鎴愬搧妯″悗鎺ュご鎯呭喌:</text>
+                <text class="info-value">{{ item.inspectionResult?.jointCondition || "鏃�" }}</text>
+              </view>
+              <view class="info-item">
+                <text class="info-label">缁撹:</text>
+                <text
+                  class="info-value"
+                  :style="{
+                    color: item.inspectionResult?.conclusion === '鍚堟牸' ? '#67c23a' : '#f56c6c',
+                    fontWeight: '500',
+                  }"
+                >
+                  {{ item.inspectionResult?.conclusion || "鍚堟牸" }}
+                </text>
+              </view>
+              <view class="info-item">
+                <text class="info-label">璁板綍浜�:</text>
+                <text class="info-value">{{ item.fixedInfo?.createUserName || "-" }}</text>
+              </view>
+            </view>
+          </view>
+        </view>
       </wd-card>
-    </z-paging>
-    <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup">
-      <view class="action px-3">
-        <wd-button type="text" @click="cancel">鍙栨秷</wd-button>
-        <wd-button type="text" @click="submit">纭畾</wd-button>
-      </view>
-      <SelfInspectForm />
+    </view>
+
+    <!-- 鏂板/缂栬緫寮规 -->
+    <wd-popup v-model="dialogVisible" position="bottom" custom-class="yl-popup">
+      <SelfInspectForm
+        :visible="dialogVisible"
+        :form-data="currentFormData"
+        :appearance-options="appearanceOptions"
+        :previous-appearance-value="previousAppearanceValueMap.get(currentFormData?.id || '')"
+        @update:visible="dialogVisible = $event"
+        @submit="handleFormSubmit"
+        @close="handleCloseDialog"
+      />
     </wd-popup>
+
     <wd-toast />
   </view>
 </template>
 
 <script setup lang="ts">
 import CardTitle from "@/components/card-title/index.vue";
-import ProductionCard from "../../components/ProductionCard.vue";
-import { useToast } from "wot-design-uni";
-import SelfInspectForm from "./form.vue";
+import { useToast, dayjs } from "wot-design-uni";
+import { onLoad } from "@dcloudio/uni-app";
+import { ref } from "vue";
 import ManageApi from "@/api/product/manage";
+import SelfInspectForm from "./form.vue";
 
-const pagingRef = ref();
-const paramsId = ref();
 const toast = useToast();
-const dialog = reactive({
-  visible: false,
-});
-const cardAttr = ref<any[]>([
-  {
-    label: "鍗曚綅",
-    prop: "inspectionUnit",
-  },
-  {
-    label: "鏍囧噯鍊�",
-    prop: "standardValue",
-  },
-  {
-    label: "鑷鍊�",
-    prop: "inspectionItem",
-  },
-  {
-    label: "鑷缁撴灉",
-    prop: "inspectionResult",
-    color: "#FF1E1E",
-  },
-]);
-const cardList = ref<any[]>([]);
+const wireId = ref<string>("");
+const poleModel = ref<string>("");
+const poleNumber = ref<string>("");
 
-// const addReport = () => {
-//   dialog.visible = true;
-// };
+// 鏁版嵁鍒楄〃
+const dataList = ref<any[]>([]);
+const loading = ref(false);
 
-const toEdit = () => {
-  uni.navigateTo({
-    url: "/pages/production/wire/selfInspect/edit",
-  });
-};
-const submit = () => {
-  toast.show("鎻愪氦");
-  dialog.visible = false;
+// 澶栬閫夐」
+const appearanceOptions = ref<Array<{ label: string; value: string | number }>>([]);
+
+// 瀛樺偍姣忚澶栬璐ㄩ噺鐨勪箣鍓嶇殑鍊�
+const previousAppearanceValueMap = ref<Map<string, string[]>>(new Map());
+
+// 寮规鐩稿叧
+const dialogVisible = ref(false);
+const currentFormData = ref<any>(null);
+
+// 鍔犺浇澶栬瀛楀吀鏁版嵁
+const loadAppearanceDict = async () => {
+  try {
+    const qualityRes = await ManageApi.dictAPI("draw_appearance_quality");
+    if (qualityRes.data && Array.isArray(qualityRes.data)) {
+      appearanceOptions.value = qualityRes.data.map((item: any) => ({
+        label: item.dictLabel || "",
+        value: item.dictValue || "",
+      }));
+    }
+  } catch (error) {
+    console.error("鍔犺浇澶栬瀛楀吀澶辫触:", error);
+  }
 };
 
-const cancel = () => {
-  toast.show("鍙栨秷");
-  dialog.visible = false;
+// 鑾峰彇澶栬鏍囩
+const getAppearanceLabel = (value: string | string[]) => {
+  if (Array.isArray(value) && value.length > 0) {
+    const labels = value.map((v) => {
+      const option = appearanceOptions.value.find((item) => item.value === v);
+      return option ? option.label : v;
+    });
+    return labels.join(", ");
+  }
+  if (typeof value === "string" && value) {
+    const option = appearanceOptions.value.find((item) => item.value === value);
+    return option ? option.label : value;
+  }
+  return "鏃�";
 };
 
-const getList = async () => {
-  const { data } = await ManageApi.getSelfInspection({
-    outPutId: paramsId.value,
-    type: "鎷変笣",
-  });
-  pagingRef.value.complete(data);
+// 鑾峰彇鏁版嵁
+const getData = async () => {
+  if (!wireId.value) return;
+
+  loading.value = true;
+  try {
+    const { code, data } = await ManageApi.getSelfInspection({
+      wireId: wireId.value,
+      poleModel: poleModel.value,
+      poleNumber: poleNumber.value,
+    });
+
+    if (code === 200) {
+      dataList.value = data || [];
+      // 鍒濆鍖栨瘡琛岀殑 previousAppearanceValue
+      dataList.value.forEach((item) => {
+        if (item.id) {
+          previousAppearanceValueMap.value.set(
+            item.id,
+            JSON.parse(JSON.stringify(item.inspectionResult?.appearance || []))
+          );
+        }
+      });
+    }
+  } catch (error) {
+    console.error("鑾峰彇鑷鏁版嵁澶辫触:", error);
+    toast.error("鑾峰彇鑷鏁版嵁澶辫触");
+  } finally {
+    loading.value = false;
+  }
 };
 
-onLoad((options: any) => {
-  paramsId.value = options.id;
+// 瀛樺偍浠庢帴鍙h幏鍙栫殑鍘熷鏁版嵁锛堢敤浜庝繚瀛樻椂琛ュ厖缂哄け瀛楁锛�
+const originalApiData = ref<any>(null);
+
+// 鎵撳紑鏂板寮规
+const handleOpenAddDialog = async () => {
+  const newItem = {
+    id: `temp_${Date.now()}`,
+    fixedInfo: {
+      firstNo: "",
+      recordDate: dayjs().format("YYYY-MM-DD"),
+      deviceModel: "",
+      teamName: "",
+      workShift: "",
+      poleModel: poleModel.value || "",
+      poleNumber: poleNumber.value || "",
+      outputNumber: "",
+      lastSlot: "",
+      model: "",
+      createUserName: "",
+      id: null,
+      teamId: null,
+      wireId: wireId.value ? Number(wireId.value) : null,
+    },
+    inspectionResult: {
+      maxDia: null,
+      minDia: null,
+      appearance: ["鏃犲瑙傞棶棰�"],
+      windingTightness: "鏄�",
+      arrangementNeatness: "鏄�",
+      aluminumWireDistance: 25,
+      jointCondition: "鏃�",
+      conclusion: "鍚堟牸",
+      dia: null,
+      twistedLayer: null,
+      wireId: wireId.value ? String(wireId.value) : null,
+    },
+    isEditing: true,
+    isNew: true,
+  };
+
+  // 璋冪敤API鑾峰彇榛樿鏁版嵁
+  try {
+    const { code, data } = await ManageApi.getDrawInspectStyleByGetDrawInspect({
+      wireId: wireId.value,
+      poleModel: poleModel.value,
+      poleNumber: poleNumber.value,
+    });
+
+    if (code === 200 && data) {
+      // 淇濆瓨鍘熷鎺ュ彛鏁版嵁锛岀敤浜庢彁浜ゆ椂琛ュ厖缂哄け瀛楁
+      originalApiData.value = JSON.parse(JSON.stringify(data));
+
+      if (data.fixedInfo) {
+        const clonedFixedInfo = JSON.parse(JSON.stringify(data.fixedInfo));
+        // 鍚堝苟鏁版嵁锛屼繚鐣欒〃鍗曚腑宸叉湁鐨勫�硷紝琛ュ厖鎺ュ彛杩斿洖鐨勫��
+        Object.assign(newItem.fixedInfo, clonedFixedInfo, {
+          // 纭繚杩欎簺瀛楁浠庢帴鍙f暟鎹腑鑾峰彇
+          id: clonedFixedInfo.id || null,
+          teamId: clonedFixedInfo.teamId || null,
+          wireId: clonedFixedInfo.wireId || (wireId.value ? Number(wireId.value) : null),
+        });
+      }
+      if (data.drawWireInfo) {
+        const clonedDrawWireInfo = JSON.parse(JSON.stringify(data.drawWireInfo));
+        // 鍚堝苟鏁版嵁锛屼繚鐣欒〃鍗曚腑宸叉湁鐨勫�硷紝琛ュ厖鎺ュ彛杩斿洖鐨勫��
+        Object.assign(newItem.inspectionResult, clonedDrawWireInfo, {
+          // 纭繚杩欎簺瀛楁浠庢帴鍙f暟鎹腑鑾峰彇
+          dia: clonedDrawWireInfo.dia || null,
+          twistedLayer: clonedDrawWireInfo.twistedLayer || null,
+          wireId: clonedDrawWireInfo.wireId || (wireId.value ? String(wireId.value) : null),
+        });
+      }
+    }
+  } catch (error) {
+    console.error("鑾峰彇榛樿鏁版嵁澶辫触:", error);
+  }
+
+  currentFormData.value = JSON.parse(JSON.stringify(newItem));
+  previousAppearanceValueMap.value.set(
+    currentFormData.value.id,
+    JSON.parse(JSON.stringify(currentFormData.value.inspectionResult.appearance || []))
+  );
+  dialogVisible.value = true;
+};
+
+// 缂栬緫鑷
+const handleEdit = async (row: any) => {
+  // 缂栬緫鏃朵篃闇�瑕佽幏鍙栨帴鍙f暟鎹紝纭繚鏈夋墍鏈夊繀瑕佸瓧娈�
+  try {
+    const { code, data } = await ManageApi.getDrawInspectStyleByGetDrawInspect({
+      wireId: wireId.value,
+      poleModel: poleModel.value,
+      poleNumber: poleNumber.value,
+    });
+
+    if (code === 200 && data) {
+      originalApiData.value = JSON.parse(JSON.stringify(data));
+    }
+  } catch (error) {
+    console.error("鑾峰彇榛樿鏁版嵁澶辫触:", error);
+  }
+
+  currentFormData.value = JSON.parse(JSON.stringify(row));
+  previousAppearanceValueMap.value.set(
+    row.id,
+    JSON.parse(JSON.stringify(row.inspectionResult.appearance || []))
+  );
+  dialogVisible.value = true;
+};
+
+// 琛ㄥ崟鎻愪氦
+const handleFormSubmit = async (formData: any) => {
+  const aluminumWireDistance = formData.inspectionResult.aluminumWireDistance;
+  if (aluminumWireDistance < 25) {
+    toast.error("澶栧眰閾濈嚎绂讳晶鏉胯竟缂樿窛绂讳笉鑳戒綆浜�25mm");
+    return;
+  }
+
+  // 鏋勫缓鎻愪氦鏁版嵁锛岀‘淇濆寘鍚墍鏈夊繀瑕佸瓧娈�
+  const saveData: any = {
+    fixedInfo: JSON.parse(JSON.stringify(formData.fixedInfo)),
+    inspectionResult: JSON.parse(JSON.stringify(formData.inspectionResult)),
+    wireId: wireId.value,
+  };
+
+  // 缂栬緫鏃讹紝纭繚 fixedInfo.id 琚纭紶閫�
+  // 浼樺厛浣跨敤 formData 涓殑 id锛堢紪杈戞椂搴旇瀛樺湪锛�
+  if (formData.fixedInfo?.id !== null && formData.fixedInfo?.id !== undefined) {
+    saveData.fixedInfo.id = formData.fixedInfo.id;
+  } else if (!formData.isNew) {
+    // 濡傛灉涓嶆槸鏂板锛屽皾璇曚粠鏁版嵁鍒楄〃涓煡鎵� id
+    const existingItem = dataList.value.find((item) => item.id === formData.id);
+    if (existingItem?.fixedInfo?.id) {
+      saveData.fixedInfo.id = existingItem.fixedInfo.id;
+    }
+  }
+
+  // 濡傛灉鏄粠鎺ュ彛鑾峰彇鐨勬暟鎹紝琛ュ厖琛ㄥ崟涓病鏈夌殑瀛楁
+  if (originalApiData.value) {
+    // 琛ュ厖 fixedInfo 涓己澶辩殑瀛楁
+    if (originalApiData.value.fixedInfo) {
+      const apiFixedInfo = originalApiData.value.fixedInfo;
+      // 纭繚杩欎簺瀛楁瀛樺湪锛堝鏋滆〃鍗曚腑娌℃湁锛屼娇鐢ㄦ帴鍙h繑鍥炵殑鍊硷級
+      // 鍙湁鍦� saveData.fixedInfo.id 涓嶅瓨鍦ㄦ椂鎵嶄娇鐢ㄦ帴鍙h繑鍥炵殑 id
+      if (apiFixedInfo.id !== undefined && !saveData.fixedInfo.id) {
+        saveData.fixedInfo.id = apiFixedInfo.id;
+      }
+      if (apiFixedInfo.teamId !== undefined) {
+        saveData.fixedInfo.teamId = apiFixedInfo.teamId;
+      }
+      if (apiFixedInfo.wireId !== undefined) {
+        saveData.fixedInfo.wireId = apiFixedInfo.wireId;
+      }
+      // 琛ュ厖鍏朵粬鍙兘缂哄け鐨勫瓧娈�
+      if (apiFixedInfo.recordDate && !saveData.fixedInfo.recordDate) {
+        saveData.fixedInfo.recordDate = apiFixedInfo.recordDate;
+      }
+    }
+
+    // 琛ュ厖 inspectionResult 涓己澶辩殑瀛楁
+    if (originalApiData.value.drawWireInfo) {
+      const apiInspectionResult = originalApiData.value.drawWireInfo;
+      // 纭繚杩欎簺瀛楁瀛樺湪锛堝鏋滆〃鍗曚腑娌℃湁锛屼娇鐢ㄦ帴鍙h繑鍥炵殑鍊硷級
+      if (apiInspectionResult.dia !== undefined) {
+        saveData.inspectionResult.dia = apiInspectionResult.dia;
+      }
+      if (apiInspectionResult.twistedLayer !== undefined) {
+        saveData.inspectionResult.twistedLayer = apiInspectionResult.twistedLayer;
+      }
+      if (apiInspectionResult.wireId !== undefined) {
+        saveData.inspectionResult.wireId = apiInspectionResult.wireId;
+      }
+    }
+  }
+
+  // 纭繚 wireId 瀛楁瀛樺湪
+  if (!saveData.fixedInfo.wireId && wireId.value) {
+    saveData.fixedInfo.wireId = Number(wireId.value);
+  }
+  if (!saveData.inspectionResult.wireId && wireId.value) {
+    saveData.inspectionResult.wireId = String(wireId.value);
+  }
+
+  try {
+    const { code, data } = await ManageApi.addSelfInspection(saveData);
+
+    if (code === 200) {
+      toast.success("淇濆瓨鎴愬姛");
+      dialogVisible.value = false;
+      originalApiData.value = null; // 娓呯┖鍘熷鏁版嵁
+      previousAppearanceValueMap.value.delete(formData.id);
+      await getData();
+    } else {
+      toast.error(data || "淇濆瓨澶辫触");
+    }
+  } catch (error) {
+    console.error("淇濆瓨澶辫触:", error);
+    toast.error("淇濆瓨澶辫触");
+  }
+};
+
+// 鍏抽棴寮规
+const handleCloseDialog = () => {
+  dialogVisible.value = false;
+  currentFormData.value = null;
+  originalApiData.value = null; // 娓呯┖鍘熷鏁版嵁
+};
+
+// 鍒犻櫎鑷
+const handleDelete = async (row: any) => {
+  try {
+    const res = await uni.showModal({
+      title: "鎻愮ず",
+      content: "纭畾鍒犻櫎璇ヨ嚜妫�璁板綍鍚楋紵",
+    });
+
+    if (res.confirm) {
+      if (row.fixedInfo?.id && !row.isNew) {
+        const { code } = await ManageApi.deleteSelfInspection(row.fixedInfo.id);
+
+        if (code === 200) {
+          toast.success("鍒犻櫎鎴愬姛");
+          await getData();
+        } else {
+          toast.error("鍒犻櫎澶辫触");
+        }
+      } else {
+        const index = dataList.value.findIndex((item) => item.id === row.id);
+        if (index !== -1) {
+          dataList.value.splice(index, 1);
+          toast.success("鍒犻櫎鎴愬姛");
+        }
+      }
+    }
+  } catch (error) {
+    console.error("鍒犻櫎鑷澶辫触:", error);
+    toast.error("鍒犻櫎澶辫触");
+  }
+};
+
+onLoad(async (options: any) => {
+  wireId.value = options.wireId || "";
+  poleModel.value = options.poleModel || "";
+  poleNumber.value = options.poleNumber || "";
+  await loadAppearanceDict();
+  await getData();
 });
 </script>
 
 <style lang="scss" scoped>
 .list {
-  height: calc(100vh - 30px);
-  padding: 12px;
+  min-height: calc(100vh - 30px);
+  padding: 12px 4px;
   background: #f3f9f8;
 
   :deep() {
@@ -107,8 +575,75 @@
   }
 }
 
-.action {
+.inspection-list {
+  margin-top: 12px;
+}
+
+.card_bg {
+  box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.05);
+  padding-bottom: 10px;
+  border-radius: 8px;
+  overflow: hidden;
+}
+
+.card-content {
+  padding: 0 4px;
+}
+
+.info-section {
+  margin-bottom: 16px;
+
+  &:last-child {
+    margin-bottom: 0;
+  }
+}
+
+.section-header {
   display: flex;
-  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 12px;
+  padding-bottom: 8px;
+  border-bottom: 1px solid #e6e6e6;
+}
+
+.section-title {
+  font-size: 14px;
+  font-weight: 600;
+  color: #252525;
+  margin-left: 6px;
+}
+
+.info-grid {
+  display: grid;
+  grid-template-columns: repeat(2, 1fr);
+  gap: 12px 16px;
+}
+
+.info-item {
+  display: flex;
+  align-items: flex-start;
+  min-height: 24px;
+}
+
+.info-item-full {
+  display: flex;
+  align-items: flex-start;
+  min-height: 24px;
+  grid-column: 1 / -1;
+}
+
+.info-label {
+  font-size: 13px;
+  color: #646874;
+  margin-right: 8px;
+  white-space: nowrap;
+  flex-shrink: 0;
+}
+
+.info-value {
+  font-size: 13px;
+  color: #252525;
+  flex: 1;
+  word-break: break-all;
 }
 </style>

--
Gitblit v1.9.3