From a9561a3189d50f0e33d693b5226ea56adda06a08 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期四, 30 十月 2025 23:07:25 +0800
Subject: [PATCH] 巡检编辑和扫码
---
src/pages/routingInspection/index.vue | 20
src/pages/routingInspection/product_card/index.vue | 400 ++++++++++--------
src/pages/routingInspection/detail/indexJX.vue | 696 ++++++++++++++++++++------------
src/pages/routingInspection/detail/indexLS.vue | 98 ++++
4 files changed, 753 insertions(+), 461 deletions(-)
diff --git a/src/pages/routingInspection/detail/indexJX.vue b/src/pages/routingInspection/detail/indexJX.vue
index 715d85d..754374e 100644
--- a/src/pages/routingInspection/detail/indexJX.vue
+++ b/src/pages/routingInspection/detail/indexJX.vue
@@ -1,285 +1,463 @@
<template>
- <view class="list">
- <div class="inspection-report">
- <!-- 鍩烘湰淇℃伅妯″潡 -->
- <wd-row>
- <text class="title">{{ "鍩烘湰淇℃伅" }}</text>
- <wd-col :span="24">
- <wd-form-item label="鏃ユ湡"
- prop="recordDate">{{ formatDate(recordData.fixedInfo?.recordDate)}}</wd-form-item>
- <wd-form-item label="鐝"
- prop="workShift">{{formatValue(recordData.fixedInfo?.workShift)}}</wd-form-item>
- <wd-form-item label="鍨嬪彿瑙勬牸" prop="model">{{ formatValue(recordData.fixedInfo?.model)}}</wd-form-item>
- <wd-form-item label="鎴愬搧绾跨洏鍙�"
- prop="systemNo">{{ formatValue(recordData.fixedInfo?.systemNo)}}</wd-form-item>
- <wd-form-item label="璁板綍浜�"
- prop="createUserName">{{ formatValue(recordData.fixedInfo?.createUserName) }}</wd-form-item>
- <wd-form-item label="鏈哄彴"
- prop="deviceModel">{{ formatValue(recordData.fixedInfo?.deviceModel)}}</wd-form-item>
- <wd-form-item label="浜у搧绫诲埆"
- prop="productType">{{ formatValue(recordData.fixedInfo?.productType)}}</wd-form-item>
- <wd-form-item label="鐢熶骇闀垮害"
- prop="actuallyLength">{{ formatValue(recordData.fixedInfo?.actuallyLength, "m")}}</wd-form-item>
- <wd-form-item label="寮犲姏璁剧疆"
- prop="twistTension">{{ formatValue(recordData.fixedInfo?.twistTension, "N/m") }}</wd-form-item>
- <wd-form-item label="缁炲埗澶栧緞"
- prop="twistDiameter">{{ formatValue(recordData.inspectionResult?.twistDiameter, "mm") }}</wd-form-item>
- </wd-col>
- </wd-row>
- <!-- 鑷璁板綍璇︽儏妯″潡 -->
- <wd-row>
- <text class="title">{{ "鑷璁板綍璇︽儏" }}</text>
- <wd-col :span="24">
- <wd-form-item label="璁板綍浣嶇疆"
- prop="recordPosition">{{ recordData.structureInfo?.recordPosition || "-" }}</wd-form-item>
- <wd-form-item label="璁板綍浜�"
- prop="createUserName">{{ recordData.structureInfo?.createUserName || "-"}}</wd-form-item>
- <wd-form-item label="鐘舵��" prop="status">
- <wd-tag custom-class="space"
- :type="getStatusType(recordData.structureInfo?.status)">{{ getStatusText(recordData.structureInfo?.status) }}</wd-tag>
- </wd-form-item>
- </wd-col>
- </wd-row>
- <!-- 缁撴瀯妫�鏌ユā鍧� -->
- <wd-row>
- <text class="title">{{ "缁撴瀯妫�鏌�" }}</text>
- <wd-col :span="24">
- <wd-form-item label="鎴愬搧缁撴瀯"
- prop="inspectStructure">{{recordData.structureInfo.structureRecordResult.inspectStructure.structureFormula || "-"}}</wd-form-item>
- </wd-col>
- </wd-row>
- <wd-row v-if="recordData.structureInfo.structureRecordResult.inspectStructure.structureItems">
- <text class="title">{{ "缁撴瀯鏍囧噯鍊煎拰瀹炴祴" }}</text>
- <wd-col :span="24"
- v-for="(item, index) in recordData.structureInfo.structureRecordResult.inspectStructure.structureItems"
- :key="index" style="padding-bottom: 10px;">
- <wd-form-item :label="formatValue(item.structureName)" label-width="400rpx"
- style="color: red;"></wd-form-item>
- <wd-form-item label="鏍囧噯鍊�" prop="structureValue">{{formatValue(item.structureValue)}}</wd-form-item>
- <wd-form-item label="瀹炴祴鏍规暟"
- prop="actualValue1">{{formatValue(item.actualValue1, "鏍�")}}</wd-form-item>
- <wd-form-item label="瀹炴祴鐩村緞"
- prop="actualValue2">{{formatValue(item.actualValue2, "mm")}}</wd-form-item>
- </wd-col>
- </wd-row>
- <!-- 缁炵嚎宸ヨ壓璐ㄩ噺鎺у埗妯″潡 -->
- <wd-row v-if="recordData.structureInfo?.structureRecordResult?.inspectTwist">
- <text class="title">{{ "缁炵嚎宸ヨ壓璐ㄩ噺鎺у埗" }}</text>
- <wd-col :span="24" v-for="(item, index) in recordData.structureInfo.structureRecordResult.inspectTwist"
- :key="index" style="padding-bottom: 10px;">
- <wd-form-item :label="formatValue(item.twistName)" label-width="400rpx"
- style="color: red;"></wd-form-item>
- <wd-form-item label="缁炲悜" prop="direction">{{ formatValue(item.direction) }}</wd-form-item>
- <wd-form-item label="鑺傝窛" prop="pitch">{{ formatValue(item.pitch, "mm") }}</wd-form-item>
- <wd-form-item label="鑺傚緞姣�" prop="pitchRatio">{{ formatValue(item.pitchRatio) }}</wd-form-item>
- </wd-col>
- </wd-row>
- <!-- 澶栬鍜岀粨璁烘ā鍧� -->
- <wd-row>
- <text class="title">{{ "澶栬鍜岀粨璁�" }}</text>
- <wd-col :span="24">
- <wd-form-item label="缁撹"
- prop="conclusion">{{formatValue(recordData.structureInfo.structureRecordResult.conclusion)}}</wd-form-item>
- <wd-form-item label="浜у搧澶栬"
- prop="productAppearance">{{formatProductAppearance(recordData.structureInfo.structureRecordResult.productAppearance)}}</wd-form-item>
- </wd-col>
- </wd-row>
- <!-- 宸℃缁撴灉妯″潡 -->
- <wd-row>
- <text class="title">{{ "宸℃缁撴灉" }}</text>
- <wd-col :span="24">
- <wd-form-item label="鏍峰搧鏄惁榻愬叏"
- prop="sampleComplete">{{formatValue(recordData.inspectionResult?.sampleComplete)}}</wd-form-item>
- </wd-col>
- </wd-row>
- <!-- 闄勪欢妯″潡 -->
- <wd-row class="attachment-section">
- <text class="title">{{ "闄勪欢" }}</text>
- <!-- 鐢� flex 瀹瑰櫒鍖呰9鍥剧墖鍒楋紝瀹炵幇鑷姩鎹㈣ -->
- <view class="attachment-grid">
- <wd-col v-for="(file, index) in recordData.structureInfo.files" :key="index"
- class="attachment-item">
- <wd-img :width="80" :height="80" :src="file.url" @click="previewImage(file.url)">
- <template #error>
- <view class="error-wrap">鍔犺浇澶辫触</view>
- </template>
- <template #loading>
- <view class="loading-wrap">
- <wd-loading />
- </view>
- </template>
- </wd-img>
- </wd-col>
- </view>
- </wd-row>
- </div>
- <wd-popup v-model="show" custom-style="border-radius:32rpx;" @close="handleClose">
- <div class="image-preview">
- <img :src="previewImageUrl" alt="棰勮鍥剧墖" style="width: 100%; height: auto" />
- </div>
- </wd-popup>
- </view>
+ <view class="fixed-header">
+ <view class="header-container">
+ <wd-button
+ icon="file-add"
+ :round="false"
+ size="small"
+ custom-class="add_btn"
+ @click="editList"
+ v-if="!isEdit"
+ >
+ 缂栬緫
+ </wd-button>
+ <wd-button
+ icon="close"
+ type="info"
+ :round="false"
+ size="small"
+ custom-class="add_btn"
+ @click="close"
+ v-if="isEdit"
+ >
+ 鍙栨秷
+ </wd-button>
+ <wd-button
+ icon="check"
+ type="success"
+ :round="false"
+ size="small"
+ custom-class="add_btn"
+ @click="saveList"
+ v-if="isEdit"
+ >
+ 淇濆瓨
+ </wd-button>
+ <view class="placeholder"></view>
+ <view class="scan-wrapper" @click="openScan">
+ <wd-icon name="scan" size="24px" color="#0D867F"></wd-icon>
+ </view>
+ </view>
+ </view>
+ <view class="list">
+ <!-- 鍩烘湰淇℃伅妯″潡 -->
+ <wd-row>
+ <view style="margin: 10rpx">
+ <text class="title">{{ "鍩烘湰淇℃伅" }}</text>
+ </view>
+ <wd-col :span="24">
+ <wd-form-item label="鏃ユ湡" prop="recordDate">
+ {{ formatDate(recordData.fixedInfo?.recordDate) }}
+ </wd-form-item>
+ <wd-form-item label="鐝" prop="workShift">
+ {{ formatValue(recordData.fixedInfo?.workShift) }}
+ </wd-form-item>
+ <wd-form-item label="鍨嬪彿瑙勬牸" prop="model">
+ {{ formatValue(recordData.fixedInfo?.model) }}
+ </wd-form-item>
+ <wd-form-item label="鎴愬搧绾跨洏鍙�" prop="systemNo">
+ {{ formatValue(recordData.fixedInfo?.systemNo) }}
+ </wd-form-item>
+ <wd-form-item label="璁板綍浜�" prop="createUserName">
+ {{ formatValue(recordData.fixedInfo?.createUserName) }}
+ </wd-form-item>
+ <wd-form-item label="鏈哄彴" prop="deviceModel">
+ {{ formatValue(recordData.fixedInfo?.deviceModel) }}
+ </wd-form-item>
+ <wd-form-item label="浜у搧绫诲埆" prop="productType">
+ {{ formatValue(recordData.fixedInfo?.productType) }}
+ </wd-form-item>
+ <wd-form-item label="鐢熶骇闀垮害" prop="actuallyLength">
+ {{ formatValue(recordData.fixedInfo?.actuallyLength, "m") }}
+ </wd-form-item>
+ <wd-form-item label="寮犲姏璁剧疆" prop="twistTension">
+ {{ formatValue(recordData.fixedInfo?.twistTension, "N/m") }}
+ </wd-form-item>
+ <wd-form-item label="缁炲埗澶栧緞" prop="twistDiameter">
+ {{ formatValue(recordData.inspectionResult?.twistDiameter, "mm") }}
+ </wd-form-item>
+ </wd-col>
+ </wd-row>
+ <!-- 鑷璁板綍璇︽儏妯″潡 -->
+ <wd-row>
+ <view style="margin: 10rpx">
+ <text class="title">{{ "鑷璁板綍璇︽儏" }}</text>
+ </view>
+ <wd-col :span="24">
+ <wd-form-item label="璁板綍浣嶇疆" prop="recordPosition">
+ {{ recordData.structureInfo?.recordPosition || "-" }}
+ </wd-form-item>
+ <wd-form-item label="璁板綍浜�" prop="createUserName">
+ {{ recordData.structureInfo?.createUserName || "-" }}
+ </wd-form-item>
+ <wd-form-item label="鐘舵��" prop="status">
+ <wd-tag custom-class="space" :type="getStatusType(recordData.structureInfo?.status)">
+ {{ getStatusText(recordData.structureInfo?.status) }}
+ </wd-tag>
+ </wd-form-item>
+ </wd-col>
+ </wd-row>
+ <!-- 缁撴瀯妫�鏌ユā鍧� -->
+ <wd-row>
+ <view style="margin: 10rpx">
+ <text class="title">{{ "缁撴瀯妫�鏌�" }}</text>
+ </view>
+ <wd-col :span="24">
+ <wd-form-item label="鎴愬搧缁撴瀯" prop="inspectStructure">
+ {{
+ recordData.structureInfo.structureRecordResult.inspectStructure.structureFormula || "-"
+ }}
+ </wd-form-item>
+ </wd-col>
+ </wd-row>
+ <wd-row v-if="recordData.structureInfo.structureRecordResult.inspectStructure.structureItems">
+ <view style="margin: 10rpx">
+ <text class="title">{{ "缁撴瀯鏍囧噯鍊煎拰瀹炴祴" }}</text>
+ </view>
+ <wd-col
+ :span="24"
+ v-for="(item, index) in recordData.structureInfo.structureRecordResult.inspectStructure
+ .structureItems"
+ :key="index"
+ style="padding-bottom: 10px"
+ >
+ <wd-form-item
+ :label="formatValue(item.structureName)"
+ label-width="400rpx"
+ style="color: red"
+ ></wd-form-item>
+ <wd-form-item label="鏍囧噯鍊�" prop="structureValue">
+ {{ formatValue(item.structureValue) }}
+ </wd-form-item>
+ <wd-form-item label="瀹炴祴鏍规暟" prop="actualValue1">
+ {{ formatValue(item.actualValue1, "鏍�") }}
+ </wd-form-item>
+ <wd-form-item label="瀹炴祴鐩村緞" prop="actualValue2">
+ {{ formatValue(item.actualValue2, "mm") }}
+ </wd-form-item>
+ </wd-col>
+ </wd-row>
+ <!-- 缁炵嚎宸ヨ壓璐ㄩ噺鎺у埗妯″潡 -->
+ <wd-row v-if="recordData.structureInfo?.structureRecordResult?.inspectTwist">
+ <view style="margin: 10rpx">
+ <text class="title">{{ "缁炵嚎宸ヨ壓璐ㄩ噺鎺у埗" }}</text>
+ </view>
+ <wd-col
+ :span="24"
+ v-for="(item, index) in recordData.structureInfo.structureRecordResult.inspectTwist"
+ :key="index"
+ style="padding-bottom: 10px"
+ >
+ <wd-form-item
+ :label="formatValue(item.twistName)"
+ label-width="400rpx"
+ style="color: red"
+ ></wd-form-item>
+ <wd-form-item label="缁炲悜" prop="direction">
+ {{ formatValue(item.direction) }}
+ </wd-form-item>
+ <wd-form-item label="鑺傝窛" prop="pitch">{{ formatValue(item.pitch, "mm") }}</wd-form-item>
+ <wd-form-item label="鑺傚緞姣�" prop="pitchRatio">
+ {{ formatValue(item.pitchRatio) }}
+ </wd-form-item>
+ </wd-col>
+ </wd-row>
+ <!-- 澶栬鍜岀粨璁烘ā鍧� -->
+ <wd-row>
+ <view style="margin: 10rpx">
+ <text class="title">{{ "澶栬鍜岀粨璁�" }}</text>
+ </view>
+ <wd-col :span="24">
+ <wd-form-item label="缁撹" prop="conclusion">
+ {{ formatValue(recordData.structureInfo.structureRecordResult.conclusion) }}
+ </wd-form-item>
+ <wd-form-item label="浜у搧澶栬" prop="productAppearance">
+ {{
+ formatProductAppearance(
+ recordData.structureInfo.structureRecordResult.productAppearance
+ )
+ }}
+ </wd-form-item>
+ </wd-col>
+ </wd-row>
+ <!-- 宸℃缁撴灉妯″潡 -->
+ <wd-row>
+ <view style="margin: 10rpx">
+ <text class="title">{{ "宸℃缁撴灉" }}</text>
+ </view>
+ <wd-col :span="24">
+ <wd-form-item label="鏍峰搧鏄惁榻愬叏" prop="sampleComplete">
+ {{ formatValue(recordData.inspectionResult?.sampleComplete) }}
+ </wd-form-item>
+ </wd-col>
+ </wd-row>
+ <!-- 闄勪欢妯″潡 -->
+ <wd-row class="attachment-section">
+ <view style="margin: 10rpx">
+ <text class="title">{{ "闄勪欢" }}</text>
+ </view>
+ <!-- 鐢� flex 瀹瑰櫒鍖呰9鍥剧墖鍒楋紝瀹炵幇鑷姩鎹㈣ -->
+ <view class="attachment-grid">
+ <wd-col
+ v-for="(file, index) in recordData.structureInfo.files"
+ :key="index"
+ class="attachment-item"
+ >
+ <wd-img :width="80" :height="80" :src="file.url" @click="previewImage(file.url)">
+ <template #error>
+ <view class="error-wrap">鍔犺浇澶辫触</view>
+ </template>
+ <template #loading>
+ <view class="loading-wrap">
+ <wd-loading />
+ </view>
+ </template>
+ </wd-img>
+ </wd-col>
+ </view>
+ </wd-row>
+ <wd-popup v-model="show" custom-style="border-radius:32rpx;" @close="handleClose">
+ <div class="image-preview">
+ <img :src="previewImageUrl" alt="棰勮鍥剧墖" style="width: 100%; height: auto" />
+ </div>
+ </wd-popup>
+ </view>
</template>
<script setup lang="ts">
- import { onLoad } from "@dcloudio/uni-app";
- import RoutingInspectionApi from "@/api/routingInspection/routingInspection";
+import { onLoad } from "@dcloudio/uni-app";
+import RoutingInspectionApi from "@/api/routingInspection/routingInspection";
- const paramsId = ref("");
- const recordData = ref<any>({});
- const show = ref(false);
+const paramsId = ref("");
+const recordData = ref<any>({});
+const show = ref(false);
const previewImageUrl = ref("");
-
- // 鐘舵�佺被鍨嬫槧灏�
- const getStatusType = (status : number) => {
- switch (status) {
- case 0:
- return "warning"; // 寰呭贰妫�
- case 1:
- return "danger"; // 宸查┏鍥�
- case 2:
- return "info"; // 寰呭鏍�
- case 3:
- return "success"; // 閫氳繃
- default:
- return "info";
- }
- };
+const isEdit = ref(false);
- // 鐘舵�佹枃鏈槧灏�
- const getStatusText = (status : number) => {
- switch (status) {
- case 0:
- return "寰呭贰妫�";
- case 1:
- return "宸查┏鍥�";
- case 2:
- return "寰呭鏍�";
- case 3:
- return "閫氳繃";
- default:
- return "鏈煡";
- }
- };
+// 鐘舵�佺被鍨嬫槧灏�
+const getStatusType = (status: number) => {
+ switch (status) {
+ case 0:
+ return "warning"; // 寰呭贰妫�
+ case 1:
+ return "danger"; // 宸查┏鍥�
+ case 2:
+ return "info"; // 寰呭鏍�
+ case 3:
+ return "success"; // 閫氳繃
+ default:
+ return "info";
+ }
+};
- // 鑾峰彇澶栬鏂囨湰
- const getAppearanceText = (appearance : string[]) => {
- if (!appearance || appearance.length === 0) return "-";
- return appearance.join("銆�");
- };
+// 鐘舵�佹枃鏈槧灏�
+const getStatusText = (status: number) => {
+ switch (status) {
+ case 0:
+ return "寰呭贰妫�";
+ case 1:
+ return "宸查┏鍥�";
+ case 2:
+ return "寰呭鏍�";
+ case 3:
+ return "閫氳繃";
+ default:
+ return "鏈煡";
+ }
+};
- // 鏍煎紡鍖栦骇鍝佸瑙傛樉绀�
- const formatProductAppearance = (productAppearance : string[]) => {
- if (!productAppearance || productAppearance.length === 0) return "-";
- return productAppearance.join("銆�");
- };
+// 鑾峰彇澶栬鏂囨湰
+const getAppearanceText = (appearance: string[]) => {
+ if (!appearance || appearance.length === 0) return "-";
+ return appearance.join("銆�");
+};
- // 鏍煎紡鍖栨暟鍊兼樉绀�
- const formatValue = (value : any, unit ?: string) => {
- if (value === null || value === undefined || value === "") return "-";
- return unit ? `${value}${unit}` : value;
- };
+// 鏍煎紡鍖栦骇鍝佸瑙傛樉绀�
+const formatProductAppearance = (productAppearance: string[]) => {
+ if (!productAppearance || productAppearance.length === 0) return "-";
+ return productAppearance.join("銆�");
+};
- // 鏍煎紡鍖栨棩鏈熸樉绀�
- const formatDate = (date : string) => {
- if (!date) return "-";
- return new Date(date).toLocaleDateString("zh-CN", {
- year: "numeric",
- month: "2-digit",
- day: "2-digit"
- });
- };
+// 鏍煎紡鍖栨暟鍊兼樉绀�
+const formatValue = (value: any, unit?: string) => {
+ if (value === null || value === undefined || value === "") return "-";
+ return unit ? `${value}${unit}` : value;
+};
- // 鏍煎紡鍖栫粨鏋勫�兼樉绀�
- const formatStructureValue = (value1 : any, value2 : any) => {
- const val1 = value1 || "-";
- const val2 = value2 ? `${value2}mm` : "-";
- return { count: val1, diameter: val2 };
- };
+// 鏍煎紡鍖栨棩鏈熸樉绀�
+const formatDate = (date: string) => {
+ if (!date) return "-";
+ return new Date(date).toLocaleDateString("zh-CN", {
+ year: "numeric",
+ month: "2-digit",
+ day: "2-digit",
+ });
+};
- const getDetailData = async (id : string, deviceType : string) => {
- try {
- let response;
- // 鑾峰彇缁炵嚎鍗曚釜缁撴瀯
- response = await RoutingInspectionApi.getStrandedInspectionStructureInfoById({
- id: id,
- });
- recordData.value = response.data;
- console.log(recordData.value);
- } catch (error) {
- console.error("鑾峰彇璇︽儏澶辫触:", error);
- }
- };
+// 鏍煎紡鍖栫粨鏋勫�兼樉绀�
+const formatStructureValue = (value1: any, value2: any) => {
+ const val1 = value1 || "-";
+ const val2 = value2 ? `${value2}mm` : "-";
+ return { count: val1, diameter: val2 };
+};
- onLoad((options : any) => {
- paramsId.value = options.id;
- getDetailData(options.id, options.deviceType);
- });
+const getDetailData = async (id: string, deviceType: string) => {
+ try {
+ let response;
+ // 鑾峰彇缁炵嚎鍗曚釜缁撴瀯
+ response = await RoutingInspectionApi.getStrandedInspectionStructureInfoById({
+ id: id,
+ });
+ recordData.value = response.data;
+ console.log(recordData.value);
+ } catch (error) {
+ console.error("鑾峰彇璇︽儏澶辫触:", error);
+ }
+};
- const previewImage = (url : string) => {
- previewImageUrl.value = url;
- show.value = true;
- };
+onLoad((options: any) => {
+ paramsId.value = options.id;
+ getDetailData(options.id, options.deviceType);
+});
- const handleClose = () => {
- show.value = false;
- };
+const previewImage = (url: string) => {
+ previewImageUrl.value = url;
+ show.value = true;
+};
+
+const handleClose = () => {
+ show.value = false;
+};
+
+// 缂栬緫鍒楄〃
+const editList = () => {};
+
+// 鍏抽棴
+const close = () => {};
+
+// 淇濆瓨鍒楄〃
+const saveList = async () => {
+ // try {
+ // let response;
+ // // 淇濆瓨鍒楄〃
+ // response = await RoutingInspectionApi.saveStrandedInspectionStructureInfo({
+ // id: paramsId.value,
+ // structureInfo: recordData.value.structureInfo,
+ // });
+ // if (response.code === 200) {
+ // uni.showToast({
+ // title: "淇濆瓨鎴愬姛",
+ // icon: "success",
+ // });
+ // // 鍒锋柊璇︽儏鏁版嵁
+ // getDetailData(paramsId.value, recordData.value.deviceType);
+ // } else {
+ // uni.showToast({
+ // title: response.msg || "淇濆瓨澶辫触",
+ // icon: "error",
+ // });
+ // }
+ // } catch (error) {
+ // console.error("淇濆瓨鍒楄〃澶辫触:", error);
+ // uni.showToast({
+ // title: "淇濆瓨澶辫触",
+ // icon: "error",
+ // });
+ // }
+};
</script>
<style lang="scss" scoped>
- .list {
- height: calc(100vh - 80px);
- padding: 12px;
- background: #f3f9f8;
+.placeholder {
+ flex: 1;
+}
+.fixed-header {
+ position: fixed;
+ top: 44;
+ left: 0;
+ right: 0;
+ background: #f3f9f8;
+ z-index: 999;
+ padding: 12px;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+ min-height: 60px;
+ box-sizing: border-box;
+ overflow: visible;
+}
- :deep() {
- .round {
- border-radius: 4px;
- }
- }
- }
+.header-container {
+ display: flex;
+ align-items: center;
+ width: 100%;
+ gap: 10px;
+}
- .title {
- position: relative;
- margin-left: 10px;
- font-size: 16px;
- font-weight: 500;
- color: #0d867f;
- }
+.search-wrapper {
+ flex: 1;
+ min-width: 0;
+}
- .title::after {
- position: absolute;
- content: "";
- top: 4px;
- left: -10px;
- width: 4px;
- height: 16px;
- background: #0d867f;
- border-radius: 2px;
- }
+:deep(.search-wrapper .wd-search) {
+ width: 100% !important;
+ min-width: 0 !important;
+}
- .attachment-section {
- width: 100%;
- }
+.scan-wrapper {
+ width: 38px;
+ height: 38px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 6px;
+ flex-shrink: 0;
+}
- .attachment-grid {
- display: flex;
- flex-wrap: wrap;
- /* 瓒呭嚭鑷姩鎹㈣ */
- gap: 10px;
- /* 鍥剧墖涔嬮棿鐨勯棿璺� */
- padding: 10px 0;
- }
+.list {
+ padding: 12px;
- .attachment-item {
- width: calc(25% - 10px);
- /* 姣忚4寮狅紝闂磋窛鐢眊ap鎺у埗锛岄渶璁$畻瀹藉害 */
- box-sizing: border-box;
- }
+ padding-top: 84px;
+ background: #f3f9f8;
+ min-height: 100vh;
+ box-sizing: border-box;
+}
- /* 閫傞厤灏忓睆骞曪紝鍙皟鏁存瘡琛屾暟閲忥紙濡傛瘡琛�2寮狅級 */
- @media (max-width: 768px) {
- .attachment-item {
- width: calc(25% - 10px);
- }
- }
+.title {
+ position: relative;
+ margin-left: 10px;
+ font-size: 16px;
+ font-weight: 500;
+ color: #0d867f;
+}
+
+.title::after {
+ position: absolute;
+ content: "";
+ top: 4px;
+ left: -10px;
+ width: 4px;
+ height: 16px;
+ background: #0d867f;
+ border-radius: 2px;
+}
+
+.attachment-section {
+ width: 100%;
+}
+
+.attachment-grid {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 10px;
+ padding: 10px 0;
+}
+
+.attachment-item {
+ width: calc(25% - 10px);
+ box-sizing: border-box;
+}
+
+@media (max-width: 768px) {
+ .attachment-item {
+ width: calc(25% - 10px);
+ }
+}
</style>
\ No newline at end of file
diff --git a/src/pages/routingInspection/detail/indexLS.vue b/src/pages/routingInspection/detail/indexLS.vue
index 08c7ecf..ad3ccac 100644
--- a/src/pages/routingInspection/detail/indexLS.vue
+++ b/src/pages/routingInspection/detail/indexLS.vue
@@ -1,9 +1,51 @@
<template>
+ <view class="fixed-header">
+ <view class="header-container">
+ <wd-button
+ icon="file-add"
+ :round="false"
+ size="small"
+ custom-class="add_btn"
+ @click="editList"
+ v-if="!isEdit"
+ >
+ 缂栬緫
+ </wd-button>
+ <wd-button
+ icon="close"
+ type="info"
+ :round="false"
+ size="small"
+ custom-class="add_btn"
+ @click="close"
+ v-if="isEdit"
+ >
+ 鍙栨秷
+ </wd-button>
+ <wd-button
+ icon="check"
+ type="success"
+ :round="false"
+ size="small"
+ custom-class="add_btn"
+ @click="saveList"
+ v-if="isEdit"
+ >
+ 淇濆瓨
+ </wd-button>
+ <view class="placeholder"></view>
+ <view class="scan-wrapper" @click="openScan">
+ <wd-icon name="scan" size="24px" color="#0D867F"></wd-icon>
+ </view>
+ </view>
+ </view>
<view class="list">
<div class="inspection-report">
<!-- 鍩烘湰淇℃伅妯″潡 -->
<wd-row>
- <text class="title">{{ "鍩烘湰淇℃伅" }}</text>
+ <view style="margin: 10rpx">
+ <text class="title">{{ "鍩烘湰淇℃伅" }}</text>
+ </view>
<wd-col :span="24">
<wd-form-item label="鏃ユ湡" prop="recordDate">
{{ formatDate(detailData.fixedInfo?.recordDate) }}
@@ -40,7 +82,9 @@
</wd-row>
<!-- 鑷璁板綍璇︽儏妯″潡 -->
<wd-row>
- <text class="title">{{ "鑷璁板綍璇︽儏" }}</text>
+ <view style="margin: 10rpx">
+ <text class="title">{{ "鑷璁板綍璇︽儏" }}</text>
+ </view>
<wd-col :span="24">
<wd-form-item label="宸℃鍛�" prop="processInspectionUserName">
{{ detailData.processInspectionUserName || "-" }}
@@ -54,7 +98,9 @@
</wd-row>
<!-- 妫�楠岀粨鏋� -->
<wd-row>
- <text class="title">{{ "妫�楠岀粨鏋�" }}</text>
+ <view style="margin: 10rpx">
+ <text class="title">{{ "妫�楠岀粨鏋�" }}</text>
+ </view>
<wd-col :span="24">
<wd-form-item label="鍗曚笣鐩村緞" prop="dia">
{{ formatValue(detailData.inspectionResult?.dia, "mm") || "-" }}
@@ -91,7 +137,9 @@
</wd-row>
<!-- 宸℃缁撴灉 -->
<wd-row v-if="detailData.processInspectionResult?.isFully">
- <text class="title">{{ "宸℃缁撴灉" }}</text>
+ <view style="margin: 10rpx">
+ <text class="title">{{ "宸℃缁撴灉" }}</text>
+ </view>
<wd-col :span="24">
<wd-form-item label="閾濇潌鍓嶃�佷腑銆佸熬鏍峰搧鏄惁榻愬叏" prop="processInspectionUserName">
<wd-tag
@@ -105,7 +153,9 @@
</wd-row>
<!-- 闄勪欢妯″潡 -->
<wd-row class="attachment-section" v-if="detailData.files && detailData.files.length > 0">
- <text class="title">{{ "闄勪欢" }}</text>
+ <view style="margin: 10rpx">
+ <text class="title">{{ "闄勪欢" }}</text>
+ </view>
<view class="attachment-grid">
<wd-col v-for="(file, index) in detailData.files" :key="index" class="attachment-item">
<wd-img :width="80" :height="80" :src="file.url" @click="previewImage(file.url)">
@@ -138,6 +188,7 @@
const detailData = ref<any>({});
const show = ref(false);
const previewImageUrl = ref("");
+const isEdit = ref(false);
// 鐘舵�佺被鍨嬫槧灏�
const getStatusType = (status: number) => {
@@ -233,6 +284,43 @@
const handleClose = () => {
show.value = false;
};
+
+// 缂栬緫鍒楄〃
+const editList = () => {};
+
+// 鍏抽棴
+const close = () => {};
+
+// 淇濆瓨鍒楄〃
+const saveList = async () => {
+ // try {
+ // let response;
+ // // 淇濆瓨鍒楄〃
+ // response = await RoutingInspectionApi.saveStrandedInspectionStructureInfo({
+ // id: paramsId.value,
+ // structureInfo: recordData.value.structureInfo,
+ // });
+ // if (response.code === 200) {
+ // uni.showToast({
+ // title: "淇濆瓨鎴愬姛",
+ // icon: "success",
+ // });
+ // // 鍒锋柊璇︽儏鏁版嵁
+ // getDetailData(paramsId.value, recordData.value.deviceType);
+ // } else {
+ // uni.showToast({
+ // title: response.msg || "淇濆瓨澶辫触",
+ // icon: "error",
+ // });
+ // }
+ // } catch (error) {
+ // console.error("淇濆瓨鍒楄〃澶辫触:", error);
+ // uni.showToast({
+ // title: "淇濆瓨澶辫触",
+ // icon: "error",
+ // });
+ // }
+};
</script>
<style lang="scss" scoped>
.list {
diff --git a/src/pages/routingInspection/index.vue b/src/pages/routingInspection/index.vue
index 4e9a33a..7979244 100644
--- a/src/pages/routingInspection/index.vue
+++ b/src/pages/routingInspection/index.vue
@@ -10,17 +10,14 @@
</view>
</wd-col>
</wd-row>
- <wd-tabs v-model="tab" auto-line-width slidable="always" map-num>
- <wd-tab
- v-for="(item, index) in patrolList"
+ <wd-tabs v-model="tab" auto-line-width slidable="always" :map-num="patrolList.length">
+ <wd-tab
+ v-for="(item, index) in patrolList"
:key="index"
:title="`${item.deviceModel}锛堝緟妫�鏌�${item.pendingNum}鏉★級`"
class="tab_bg"
>
- <ProductList
- :api="RoutingInspectionApi.getInspectListByPatrol"
- :ProList="item"
- />
+ <ProductList :api="RoutingInspectionApi.getInspectListByPatrol" :ProList="item" />
</wd-tab>
</wd-tabs>
<Scan ref="scanRef" emitName="scan" />
@@ -42,8 +39,7 @@
const userInfo: any = computed(() => userStore.userInfo);
const toast = useToast();
const tab = ref<number>(0);
-const patrolList = ref<any[]>([]);// 宸℃璁惧鍒楄〃鏁版嵁
-
+const patrolList = ref<any[]>([]); // 宸℃璁惧鍒楄〃鏁版嵁
const handlePatrolData = (index: number, count: number) => {
// 鍙互鍦ㄨ繖閲屾洿鏂扮壒瀹氬贰妫�璁惧鐨勫緟妫�鏌ユ暟閲�
@@ -74,9 +70,9 @@
type: "宸℃",
data: {
total: 0,
- records: []
- }
- }
+ records: [],
+ },
+ },
};
};
};
diff --git a/src/pages/routingInspection/product_card/index.vue b/src/pages/routingInspection/product_card/index.vue
index 9b14232..9316cbc 100644
--- a/src/pages/routingInspection/product_card/index.vue
+++ b/src/pages/routingInspection/product_card/index.vue
@@ -1,205 +1,235 @@
<template>
- <wd-card class="card_bg" @click="handleCardClick">
- <template #title>
- <view class="flex justify-between w-full">
- <text class="font-medium text-[#252525]">鏈哄彴: {{ data[map.deviceModel] }}</text>
- <wd-tag color="#0D867F" bg-color="#E7F4EC">
- <text class="text-xs">{{ data[map.model] }}</text>
- </wd-tag>
- </view>
- </template>
- <wd-row class="my-2">
- <wd-col :span="24">
- <view class="flex">
- <view class="icon_box">
- <wd-icon name="folder" color="#0D867F"></wd-icon>
- </view>
- <text class="text-[#646874] mx-2">
- 棣栨鍗曞彿:
- <text class="text-[#252525]">{{ data[map.firstNo] }}</text>
- </text>
- </view>
- </wd-col>
- </wd-row>
- <wd-row class="my-2">
- <wd-col :span="24">
- <view class="flex">
- <view class="icon_box">
- <wd-icon name="folder" color="#0D867F"></wd-icon>
- </view>
- <text class="text-[#646874] mx-2">
- 鐝:
- <text class="text-[#252525]">{{ data[map.workShift] }}</text>
- </text>
- </view>
- </wd-col>
- </wd-row>
- <wd-row class="my-2">
- <wd-col :span="24">
- <view class="flex">
- <view class="icon_box">
- <wd-icon name="folder" color="#0D867F"></wd-icon>
- </view>
- <text class="text-[#646874] mx-2">
- 鐝粍:
- <text class="text-[#252525]">{{ data[map.teamName] }}</text>
- </text>
- </view>
- </wd-col>
- </wd-row>
- <wd-row class="my-2">
- <wd-col :span="24">
- <view class="flex">
- <view class="icon_box">
- <wd-icon name="folder" color="#0D867F"></wd-icon>
- </view>
- <text class="text-[#646874] mx-2">
- 棰嗙敤鏉嗗彿:
- <text class="text-[#252525]">{{ data[map.poleNumber] }}</text>
- </text>
- </view>
- </wd-col>
- </wd-row>
- <wd-col :span="12">
- <view class="flex">
- <view class="icon_box">
- <wd-icon name="folder" color="#0D867F"></wd-icon>
- </view>
- <text class="text-[#646874] mx-2">
- 鏉嗗瀷鍙�:
- <text class="text-[#252525]">{{ data[map.poleModel] }}</text>
- </text>
- </view>
- </wd-col>
- <wd-row class="my-2">
- <wd-col :span="12">
- <view class="flex">
- <view class="icon_box">
- <wd-icon name="folder" color="#0D867F"></wd-icon>
- </view>
- <text class="text-[#646874] mx-2">
- 鐢熶骇杞存暟:
- <text class="text-[#252525]">{{ data[map.outputNumber] }}</text>
- </text>
- </view>
- </wd-col>
-
- </wd-row>
- <wd-row class="my-2">
- <wd-col :span="12">
- <view class="flex">
- <view class="icon_box">
- <wd-icon name="folder" color="#0D867F"></wd-icon>
- </view>
- <text class="text-[#646874] mx-2">
- 鑷浜�:
- <text class="text-[#252525]">{{ data[map.inspectPerson] }}</text>
- </text>
- </view>
- </wd-col>
- <wd-col :span="12">
- <view class="flex">
- <view class="icon_box">
- <wd-icon name="folder" color="#0D867F"></wd-icon>
- </view>
- <text class="text-[#646874] mx-2">
- 鐘舵��:
- <text class="text-[#252525]">{{ data[map.status] == 1 ? "琚┏鍥�" : "宸℃" }}</text>
- </text>
- </view>
- </wd-col>
- </wd-row>
- <wd-row class="my-2">
- <wd-col :span="16">
- <view class="flex">
- <view class="icon_box">
- <wd-icon name="folder" color="#0D867F"></wd-icon>
- </view>
- <text class="text-[#646874] mx-2">
- 璁板綍鏃堕棿:
- <text class="text-[#252525]">{{ data[map.recordDate] }}</text>
- </text>
- </view>
- </wd-col>
- <wd-col :span="8">
- <view class="flex">
- <wd-button v-if="data[map.status] == 1" size="small" type="primary" @click.stop="showRejectPopup = true"
- style="margin-left: auto;">
- 鏌ョ湅椹冲洖淇℃伅
- </wd-button>
- </view>
- </wd-col>
- </wd-row>
- </wd-card>
-<wd-popup v-model="showRejectPopup" title="椹冲洖淇℃伅" custom-style="border-radius:32rpx;height: 500rpx;width: 600rpx;">
- <wd-card v-for="(item, index) in data.rejectList" :key="index"
- :class="index % 2 === 0 ? 'reject-card-bg-1' : 'reject-card-bg-2'"
- style="margin-bottom: 15px; padding: 10px; border-radius: 8px;">
- <view class="content">
- <view>
- <view style="display: flex; justify-content: space-between; align-items: center; color: rgba(0,0,0,0.85); font-size: 14px; margin-bottom: 8px;">
- <view>{{ item.rejectPerson }}</view>
- <view>{{ item.rejectTime }}</view>
+ <wd-card class="card_bg" @click="handleCardClick">
+ <template #title>
+ <view class="flex justify-between w-full">
+ <text class="font-medium text-[#252525]">鏈哄彴: {{ data[map.deviceModel] }}</text>
+ <wd-tag color="#0D867F" bg-color="#E7F4EC">
+ <text class="text-xs">{{ data[map.model] }}</text>
+ </wd-tag>
+ </view>
+ </template>
+ <wd-row class="my-2">
+ <wd-col :span="24">
+ <view class="flex">
+ <view class="icon_box">
+ <wd-icon name="folder" color="#0D867F"></wd-icon>
+ </view>
+ <text class="text-[#646874] mx-2">
+ 棣栨鍗曞彿:
+ <text class="text-[#252525]">{{ data[map.firstNo] }}</text>
+ </text>
</view>
- <view style="color: rgba(0,0,0,0.85); font-size: 14px; word-break: break-word; overflow-wrap: break-word; max-width: 100%; padding: 5px 0;">
- {{ item.rejectReason.reason }}
+ </wd-col>
+ </wd-row>
+ <wd-row class="my-2">
+ <wd-col :span="24">
+ <view class="flex">
+ <view class="icon_box">
+ <wd-icon name="folder" color="#0D867F"></wd-icon>
+ </view>
+ <text class="text-[#646874] mx-2">
+ 鐝:
+ <text class="text-[#252525]">{{ data[map.workShift] }}</text>
+ </text>
+ </view>
+ </wd-col>
+ </wd-row>
+ <wd-row class="my-2">
+ <wd-col :span="24">
+ <view class="flex">
+ <view class="icon_box">
+ <wd-icon name="folder" color="#0D867F"></wd-icon>
+ </view>
+ <text class="text-[#646874] mx-2">
+ 鐝粍:
+ <text class="text-[#252525]">{{ data[map.teamName] }}</text>
+ </text>
+ </view>
+ </wd-col>
+ </wd-row>
+ <wd-row class="my-2">
+ <wd-col :span="24">
+ <view class="flex">
+ <view class="icon_box">
+ <wd-icon name="folder" color="#0D867F"></wd-icon>
+ </view>
+ <text class="text-[#646874] mx-2">
+ 棰嗙敤鏉嗗彿:
+ <text class="text-[#252525]">{{ data[map.poleNumber] }}</text>
+ </text>
+ </view>
+ </wd-col>
+ </wd-row>
+ <wd-col :span="12">
+ <view class="flex">
+ <view class="icon_box">
+ <wd-icon name="folder" color="#0D867F"></wd-icon>
+ </view>
+ <text class="text-[#646874] mx-2">
+ 鏉嗗瀷鍙�:
+ <text class="text-[#252525]">{{ data[map.poleModel] }}</text>
+ </text>
+ </view>
+ </wd-col>
+ <wd-row class="my-2">
+ <wd-col :span="12">
+ <view class="flex">
+ <view class="icon_box">
+ <wd-icon name="folder" color="#0D867F"></wd-icon>
+ </view>
+ <text class="text-[#646874] mx-2">
+ 鐢熶骇杞存暟:
+ <text class="text-[#252525]">{{ data[map.outputNumber] }}</text>
+ </text>
+ </view>
+ </wd-col>
+ </wd-row>
+ <wd-row class="my-2">
+ <wd-col :span="12">
+ <view class="flex">
+ <view class="icon_box">
+ <wd-icon name="folder" color="#0D867F"></wd-icon>
+ </view>
+ <text class="text-[#646874] mx-2">
+ 鑷浜�:
+ <text class="text-[#252525]">{{ data[map.inspectPerson] }}</text>
+ </text>
+ </view>
+ </wd-col>
+ <wd-col :span="12">
+ <view class="flex">
+ <view class="icon_box">
+ <wd-icon name="folder" color="#0D867F"></wd-icon>
+ </view>
+ <text class="text-[#646874] mx-2">
+ 鐘舵��:
+ <text class="text-[#252525]">{{ data[map.status] == 1 ? "琚┏鍥�" : "宸℃" }}</text>
+ </text>
+ </view>
+ </wd-col>
+ </wd-row>
+ <wd-row class="my-2">
+ <wd-col :span="16">
+ <view class="flex">
+ <view class="icon_box">
+ <wd-icon name="folder" color="#0D867F"></wd-icon>
+ </view>
+ <text class="text-[#646874] mx-2">
+ 璁板綍鏃堕棿:
+ <text class="text-[#252525]">{{ data[map.recordDate] }}</text>
+ </text>
+ </view>
+ </wd-col>
+ <wd-col :span="8">
+ <view class="flex">
+ <wd-button
+ v-if="data[map.status] == 1"
+ size="small"
+ type="primary"
+ @click.stop="showRejectPopup = true"
+ style="margin-left: auto"
+ >
+ 鏌ョ湅椹冲洖淇℃伅
+ </wd-button>
+ </view>
+ </wd-col>
+ </wd-row>
+ </wd-card>
+ <wd-popup
+ v-model="showRejectPopup"
+ title="椹冲洖淇℃伅"
+ custom-style="border-radius:32rpx;height: 800rpx;width: 600rpx;"
+ >
+ <wd-card
+ v-for="(item, index) in data.rejectList"
+ :key="index"
+ :class="index % 2 === 0 ? 'reject-card-bg-1' : 'reject-card-bg-2'"
+ style="margin-bottom: 8px; padding: 10px; border-radius: 8px"
+ >
+ <view class="content">
+ <view>
+ <view
+ style="
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ color: rgba(0, 0, 0, 0.85);
+ font-size: 14px;
+ margin-bottom: 8px;
+ "
+ >
+ <view>{{ item.rejectPerson }}</view>
+ <view>{{ item.rejectTime }}</view>
+ </view>
+ <view
+ style="
+ color: rgba(0, 0, 0, 0.85);
+ font-size: 14px;
+ word-break: break-word;
+ overflow-wrap: break-word;
+ max-width: 100%;
+ padding: 5px 0;
+ "
+ >
+ {{ item.rejectReason.reason }}
+ </view>
</view>
</view>
- </view>
- </wd-card>
-</wd-popup>
+ </wd-card>
+ </wd-popup>
</template>
<script setup lang="ts">
import { ref } from "vue";
-const emit = defineEmits(['click']);
- defineProps({
- data: {
- type: Object,
- default: () => { },
- },
- map: {
- type: Object,
- default: () => { },
- },
- });
-const showRejectPopup = ref<boolean>(false)
+const emit = defineEmits(["click"]);
+defineProps({
+ data: {
+ type: Object,
+ default: () => {},
+ },
+ map: {
+ type: Object,
+ default: () => {},
+ },
+});
+const showRejectPopup = ref<boolean>(false);
const handleCardClick = () => {
- emit('click');
+ emit("click");
};
</script>
<style lang="scss" scoped>
- .card_bg {
- box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.05);
- padding-bottom: 10px;
- }
+.card_bg {
+ box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.05);
+ padding-bottom: 10px;
+}
- // 娣诲姞锛氫袱绉嶄笉鍚岀殑鑳屾櫙鑹叉牱寮�
- .reject-card-bg-1 {
- background-color: #f5f7fa;
- }
-
- .reject-card-bg-2 {
- background-color: #eef2f7;
- }
+// 娣诲姞锛氫袱绉嶄笉鍚岀殑鑳屾櫙鑹叉牱寮�
+.reject-card-bg-1 {
+ background-color: #f5f7fa;
+}
- .page-class {
- :deep() {
- .custom-shadow {
- box-shadow: 0 3px 1px -2px rgb(0 0 0 / 20%), 0 2px 2px 0 rgb(0 0 0 / 14%), 0 1px 5px 0 rgb(0 0 0 / 12%);
- }
+.reject-card-bg-2 {
+ background-color: #eef2f7;
+}
+
+.page-class {
+ :deep() {
+ .custom-shadow {
+ box-shadow: 0 3px 1px -2px rgb(0 0 0 / 20%), 0 2px 2px 0 rgb(0 0 0 / 14%),
+ 0 1px 5px 0 rgb(0 0 0 / 12%);
}
}
+}
- .header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
+.header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
- // 淇敼锛氳皟鏁村唴瀹瑰尯鍩熺殑鏍峰紡
- .content {
- padding: 5px;
- }
+// 淇敼锛氳皟鏁村唴瀹瑰尯鍩熺殑鏍峰紡
+.content {
+ padding: 5px;
+}
</style>
\ No newline at end of file
--
Gitblit v1.9.3