From 41acc01d0056630ac11083cf31397f2462acaf4e Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期五, 06 三月 2026 11:28:39 +0800
Subject: [PATCH] 一些编辑功能隐藏
---
src/pages/equipmentManagement/inspection/detail.vue | 1364 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 687 insertions(+), 677 deletions(-)
diff --git a/src/pages/equipmentManagement/inspection/detail.vue b/src/pages/equipmentManagement/inspection/detail.vue
index 4b62205..8a88ac2 100644
--- a/src/pages/equipmentManagement/inspection/detail.vue
+++ b/src/pages/equipmentManagement/inspection/detail.vue
@@ -1,20 +1,25 @@
<template>
<view class="inspection-detail">
<!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
- <PageHeader title="璁惧宸℃璇︽儏" @back="goBack" />
-
+ <PageHeader title="宸℃绠$悊璇︽儏"
+ @back="goBack" />
<!-- 璁惧淇℃伅鍗$墖 -->
<view class="device-card">
<view class="device-header">
<view class="device-icon">
- <up-icon name="settings" size="24" color="#1890ff"></up-icon>
+ <up-icon name="settings"
+ size="24"
+ color="#1890ff"></up-icon>
</view>
<view class="device-info">
<text class="device-name">{{ deviceInfo.deviceName }}</text>
<text class="device-code">{{ deviceInfo.deviceCode }}</text>
</view>
- <view class="qr-scan" @click="scanDeviceQR">
- <up-icon name="scan" size="20" color="#1890ff"></up-icon>
+ <view class="qr-scan"
+ @click="scanDeviceQR">
+ <up-icon name="scan"
+ size="20"
+ color="#1890ff"></up-icon>
<text class="scan-text">鎵爜</text>
</view>
</view>
@@ -33,134 +38,131 @@
</view>
</view>
</view>
-
<!-- 宸℃椤圭洰娓呭崟 -->
<view class="inspection-items">
<view class="section-title">
- <up-icon name="list" size="18" color="#333"></up-icon>
+ <up-icon name="list"
+ size="18"
+ color="#333"></up-icon>
<text class="title-text">宸℃椤圭洰娓呭崟</text>
<text class="progress-text">({{ completedItems }}/{{ totalItems }})</text>
</view>
-
<view class="items-list">
- <view
- v-for="(item, index) in inspectionItems"
- :key="index"
- class="inspection-item"
- :class="{ 'completed': item.completed, 'abnormal': item.isAbnormal }"
- >
- <view class="item-header" @click="toggleItem(index)">
+ <view v-for="(item, index) in inspectionItems"
+ :key="index"
+ class="inspection-item"
+ :class="{ 'completed': item.completed, 'abnormal': item.isAbnormal }">
+ <view class="item-header"
+ @click="toggleItem(index)">
<view class="item-left">
- <view class="checkbox" :class="{ 'checked': item.completed }">
- <up-icon v-if="item.completed" name="checkmark" size="14" color="#ffffff"></up-icon>
+ <view class="checkbox"
+ :class="{ 'checked': item.completed }">
+ <up-icon v-if="item.completed"
+ name="checkmark"
+ size="14"
+ color="#ffffff"></up-icon>
</view>
<text class="item-name">{{ item.name }}</text>
</view>
<view class="item-status">
- <u-tag v-if="item.isAbnormal" type="error" size="mini">寮傚父</u-tag>
- <u-tag v-else-if="item.completed" type="success" size="mini">姝e父</u-tag>
- <u-tag v-else type="info" size="mini">寰呮</u-tag>
+ <u-tag v-if="item.isAbnormal"
+ type="error"
+ size="mini">寮傚父</u-tag>
+ <u-tag v-else-if="item.completed"
+ type="success"
+ size="mini">姝e父</u-tag>
+ <u-tag v-else
+ type="info"
+ size="mini">寰呮</u-tag>
</view>
</view>
-
<!-- 灞曞紑鐨勮鎯呭唴瀹� -->
- <view v-if="item.expanded" class="item-content">
+ <view v-if="item.expanded"
+ class="item-content">
<view class="item-description">
<text class="desc-text">{{ item.description }}</text>
</view>
-
<!-- 宸℃缁撴灉閫夋嫨 -->
<view class="result-section">
<text class="section-label">宸℃缁撴灉锛�</text>
<view class="result-options">
- <u-radio-group v-model="item.result" @change="onResultChange(index, $event)">
- <u-radio
- v-for="option in resultOptions"
- :key="option.value"
- :label="option.value"
- :name="option.label"
- size="small"
- >
+ <u-radio-group v-model="item.result"
+ @change="onResultChange(index, $event)">
+ <u-radio v-for="option in resultOptions"
+ :key="option.value"
+ :label="option.value"
+ :name="option.label"
+ size="small">
{{ option.label }}
</u-radio>
</u-radio-group>
</view>
</view>
-
<!-- 寮傚父鎯呭喌鎻忚堪 -->
- <view v-if="item.result === 'abnormal'" class="abnormal-section">
+ <view v-if="item.result === 'abnormal'"
+ class="abnormal-section">
<text class="section-label">寮傚父鎻忚堪锛�</text>
- <up-textarea
- v-model="item.abnormalDesc"
- placeholder="璇疯缁嗘弿杩板紓甯告儏鍐�"
- :maxlength="200"
- count
- height="80"
- ></up-textarea>
+ <up-textarea v-model="item.abnormalDesc"
+ placeholder="璇疯缁嗘弿杩板紓甯告儏鍐�"
+ :maxlength="200"
+ count
+ height="80"></up-textarea>
</view>
-
<!-- 鍥剧墖涓婁紶 -->
<view class="upload-section">
<text class="section-label">鐜板満鐓х墖锛�</text>
- <up-upload
- :fileList="item.images"
- @afterRead="(event) => afterRead(event, index, 'images')"
- @delete="(event) => deleteFile(event, index, 'images')"
- name="images"
- multiple
- :maxCount="5"
- :previewImage="true"
- >
+ <up-upload :fileList="item.images"
+ @afterRead="(event) => afterRead(event, index, 'images')"
+ @delete="(event) => deleteFile(event, index, 'images')"
+ name="images"
+ multiple
+ :maxCount="5"
+ :previewImage="true">
<view class="upload-btn">
- <up-icon name="camera" size="20" color="#999"></up-icon>
+ <up-icon name="camera"
+ size="20"
+ color="#999"></up-icon>
<text class="upload-text">娣诲姞鐓х墖</text>
</view>
</up-upload>
</view>
-
<!-- 瑙嗛涓婁紶 -->
<view class="upload-section">
<text class="section-label">鐜板満瑙嗛锛�</text>
- <up-upload
- :fileList="item.videos"
- @afterRead="(event) => afterRead(event, index, 'videos')"
- @delete="(event) => deleteFile(event, index, 'videos')"
- name="videos"
- :maxCount="2"
- accept="video"
- >
+ <up-upload :fileList="item.videos"
+ @afterRead="(event) => afterRead(event, index, 'videos')"
+ @delete="(event) => deleteFile(event, index, 'videos')"
+ name="videos"
+ :maxCount="2"
+ accept="video">
<view class="upload-btn">
- <up-icon name="play-circle" size="20" color="#999"></up-icon>
+ <up-icon name="play-circle"
+ size="20"
+ color="#999"></up-icon>
<text class="upload-text">娣诲姞瑙嗛</text>
</view>
</up-upload>
</view>
-
<!-- 澶囨敞 -->
<view class="remark-section">
<text class="section-label">澶囨敞锛�</text>
- <up-textarea
- v-model="item.remark"
- placeholder="璇疯緭鍏ュ娉ㄤ俊鎭紙鍙�夛級"
- :maxlength="100"
- count
- height="60"
- ></up-textarea>
+ <up-textarea v-model="item.remark"
+ placeholder="璇疯緭鍏ュ娉ㄤ俊鎭紙鍙�夛級"
+ :maxlength="100"
+ count
+ height="60"></up-textarea>
</view>
</view>
</view>
</view>
</view>
-
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
<view class="bottom-actions">
- <u-button
- type="primary"
- size="large"
- :disabled="!canSubmit"
- @click="submitInspection"
- :loading="submitting"
- >
+ <u-button type="primary"
+ size="large"
+ :disabled="!canSubmit"
+ @click="submitInspection"
+ :loading="submitting">
{{ allCompleted ? '鎻愪氦宸℃璁板綍' : `缁х画宸℃ (${completedItems}/${totalItems})` }}
</u-button>
</view>
@@ -168,638 +170,646 @@
</template>
<script setup>
-import { ref, computed, onMounted } from 'vue'
-import { onShow } from '@dcloudio/uni-app'
-import PageHeader from '@/components/PageHeader.vue'
-import { submitInspectionRecord } from '@/api/equipmentManagement/inspection'
-import dayjs from 'dayjs'
+ import { ref, computed, onMounted } from "vue";
+ import { onShow } from "@dcloudio/uni-app";
+ import PageHeader from "@/components/PageHeader.vue";
+ import { submitInspectionRecord } from "@/api/equipmentManagement/inspection";
+ import dayjs from "dayjs";
-// 璁惧淇℃伅
-const deviceInfo = ref({})
+ // 璁惧淇℃伅
+ const deviceInfo = ref({});
-// 宸℃椤圭洰鍒楄〃
-const inspectionItems = ref([])
+ // 宸℃椤圭洰鍒楄〃
+ const inspectionItems = ref([]);
-// 鎻愪氦鐘舵��
-const submitting = ref(false)
+ // 鎻愪氦鐘舵��
+ const submitting = ref(false);
-// 宸℃缁撴灉閫夐」
-const resultOptions = [
- { label: '姝e父', value: 'normal' },
- { label: '寮傚父', value: 'abnormal' }
-]
+ // 宸℃缁撴灉閫夐」
+ const resultOptions = [
+ { label: "姝e父", value: "normal" },
+ { label: "寮傚父", value: "abnormal" },
+ ];
-// 鏄剧ず鎻愮ず淇℃伅
-const showToast = (message) => {
- uni.showToast({
- title: message,
- icon: 'none'
- })
-}
+ // 鏄剧ず鎻愮ず淇℃伅
+ const showToast = message => {
+ uni.showToast({
+ title: message,
+ icon: "none",
+ });
+ };
-// 璁$畻灞炴��
-const totalItems = computed(() => inspectionItems.value.length)
-const completedItems = computed(() => inspectionItems.value.filter(item => item.completed).length)
-const allCompleted = computed(() => completedItems.value === totalItems.value && totalItems.value > 0)
-const canSubmit = computed(() => completedItems.value > 0)
+ // 璁$畻灞炴��
+ const totalItems = computed(() => inspectionItems.value.length);
+ const completedItems = computed(
+ () => inspectionItems.value.filter(item => item.completed).length
+ );
+ const allCompleted = computed(
+ () => completedItems.value === totalItems.value && totalItems.value > 0
+ );
+ const canSubmit = computed(() => completedItems.value > 0);
-// 杩斿洖涓婁竴椤�
-const goBack = () => {
- if (completedItems.value > 0) {
- uni.showModal({
- title: '鎻愮ず',
- content: '褰撳墠鏈夋湭淇濆瓨鐨勫贰妫�璁板綍锛岀‘瀹氳绂诲紑鍚楋紵',
- success: (res) => {
- if (res.confirm) {
- uni.navigateBack()
+ // 杩斿洖涓婁竴椤�
+ const goBack = () => {
+ if (completedItems.value > 0) {
+ uni.showModal({
+ title: "鎻愮ず",
+ content: "褰撳墠鏈夋湭淇濆瓨鐨勫贰妫�璁板綍锛岀‘瀹氳绂诲紑鍚楋紵",
+ success: res => {
+ if (res.confirm) {
+ uni.navigateBack();
+ }
+ },
+ });
+ } else {
+ uni.navigateBack();
+ }
+ };
+
+ // 鎵弿璁惧浜岀淮鐮�
+ const scanDeviceQR = () => {
+ uni.scanCode({
+ success: res => {
+ console.log("鎵爜缁撴灉锛�", res);
+ if (res.result.includes(deviceInfo.value.deviceCode)) {
+ showToast("璁惧纭鎴愬姛");
+ // 璁板綍鎵爜鏃堕棿
+ deviceInfo.value.scanTime = new Date().toISOString();
+ } else {
+ showToast("璁惧浜岀淮鐮佷笉鍖归厤");
}
+ },
+ fail: err => {
+ console.log("鎵爜澶辫触锛�", err);
+ showToast("鎵爜澶辫触");
+ },
+ });
+ };
+
+ // 鍒囨崲宸℃椤圭洰
+ const toggleItem = index => {
+ inspectionItems.value[index].expanded =
+ !inspectionItems.value[index].expanded;
+ };
+
+ // 宸℃缁撴灉鏀瑰彉
+ const onResultChange = (index, value) => {
+ const item = inspectionItems.value[index];
+ item.result = value;
+ item.completed = true;
+ item.isAbnormal = value === "abnormal";
+
+ // 濡傛灉閫夋嫨姝e父锛屾竻绌哄紓甯告弿杩�
+ if (value === "normal") {
+ item.abnormalDesc = "";
+ }
+ };
+
+ // 鏂囦欢涓婁紶鍚庡鐞�
+ const afterRead = async (event, index, type) => {
+ const { file } = event;
+ const item = inspectionItems.value[index];
+
+ // 妯℃嫙涓婁紶杩囩▼
+ uni.showLoading({ title: "涓婁紶涓�..." });
+
+ try {
+ // 杩欓噷搴旇璋冪敤瀹為檯鐨勪笂浼燗PI
+ await new Promise(resolve => setTimeout(resolve, 1000));
+
+ // 娣诲姞鍒板搴旂殑鏂囦欢鍒楄〃
+ if (type === "images") {
+ item.images = item.images || [];
+ item.images.push({
+ url: file.url,
+ name: file.name,
+ size: file.size,
+ });
+ } else if (type === "videos") {
+ item.videos = item.videos || [];
+ item.videos.push({
+ url: file.url,
+ name: file.name,
+ size: file.size,
+ });
}
- })
- } else {
- uni.navigateBack()
- }
-}
-// 鎵弿璁惧浜岀淮鐮�
-const scanDeviceQR = () => {
- uni.scanCode({
- success: (res) => {
- console.log('鎵爜缁撴灉锛�', res)
- if (res.result.includes(deviceInfo.value.deviceCode)) {
- showToast('璁惧纭鎴愬姛')
- // 璁板綍鎵爜鏃堕棿
- deviceInfo.value.scanTime = new Date().toISOString()
- } else {
- showToast('璁惧浜岀淮鐮佷笉鍖归厤')
+ uni.hideLoading();
+ showToast("涓婁紶鎴愬姛");
+ } catch (error) {
+ uni.hideLoading();
+ showToast("涓婁紶澶辫触");
+ }
+ };
+
+ // 鍒犻櫎鏂囦欢
+ const deleteFile = (event, index, type) => {
+ const item = inspectionItems.value[index];
+ if (type === "images") {
+ item.images.splice(event.index, 1);
+ } else if (type === "videos") {
+ item.videos.splice(event.index, 1);
+ }
+ };
+
+ // 鎻愪氦宸℃璁板綍
+ const submitInspection = async () => {
+ if (!canSubmit.value) {
+ showToast("璇疯嚦灏戝畬鎴愪竴椤瑰贰妫�");
+ return;
+ }
+
+ // 妫�鏌ュ紓甯搁」鐩槸鍚﹀~鍐欎簡鎻忚堪
+ const abnormalItems = inspectionItems.value.filter(item => item.isAbnormal);
+ for (const item of abnormalItems) {
+ if (!item.abnormalDesc || item.abnormalDesc.trim() === "") {
+ showToast(`璇峰~鍐�"${item.name}"鐨勫紓甯告弿杩癭);
+ return;
}
- },
- fail: (err) => {
- console.log('鎵爜澶辫触锛�', err)
- showToast('鎵爜澶辫触')
}
- })
-}
-// 鍒囨崲宸℃椤圭洰
-const toggleItem = (index) => {
- inspectionItems.value[index].expanded = !inspectionItems.value[index].expanded
-}
+ submitting.value = true;
-// 宸℃缁撴灉鏀瑰彉
-const onResultChange = (index, value) => {
- const item = inspectionItems.value[index]
- item.result = value
- item.completed = true
- item.isAbnormal = value === 'abnormal'
-
- // 濡傛灉閫夋嫨姝e父锛屾竻绌哄紓甯告弿杩�
- if (value === 'normal') {
- item.abnormalDesc = ''
- }
-}
+ try {
+ const recordData = {
+ deviceId: deviceInfo.value.id,
+ deviceCode: deviceInfo.value.deviceCode,
+ inspectionDate: dayjs().format("YYYY-MM-DD"),
+ inspector: deviceInfo.value.inspector,
+ scanTime: deviceInfo.value.scanTime,
+ items: inspectionItems.value.map(item => ({
+ name: item.name,
+ result: item.result,
+ completed: item.completed,
+ isAbnormal: item.isAbnormal,
+ abnormalDesc: item.abnormalDesc,
+ images: item.images || [],
+ videos: item.videos || [],
+ remark: item.remark,
+ })),
+ completedAt: new Date().toISOString(),
+ };
-// 鏂囦欢涓婁紶鍚庡鐞�
-const afterRead = async (event, index, type) => {
- const { file } = event
- const item = inspectionItems.value[index]
-
- // 妯℃嫙涓婁紶杩囩▼
- uni.showLoading({ title: '涓婁紶涓�...' })
-
- try {
- // 杩欓噷搴旇璋冪敤瀹為檯鐨勪笂浼燗PI
- await new Promise(resolve => setTimeout(resolve, 1000))
-
- // 娣诲姞鍒板搴旂殑鏂囦欢鍒楄〃
- if (type === 'images') {
- item.images = item.images || []
- item.images.push({
- url: file.url,
- name: file.name,
- size: file.size
- })
- } else if (type === 'videos') {
- item.videos = item.videos || []
- item.videos.push({
- url: file.url,
- name: file.name,
- size: file.size
- })
+ // 妯℃嫙API璋冪敤
+ await new Promise(resolve => setTimeout(resolve, 2000));
+
+ // 瀹為檯API璋冪敤
+ // await submitInspectionRecord(recordData)
+
+ showToast("宸℃璁板綍鎻愪氦鎴愬姛");
+
+ // 杩斿洖鍒楄〃椤甸潰
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 1500);
+ } catch (error) {
+ showToast("鎻愪氦澶辫触锛岃閲嶈瘯");
+ } finally {
+ submitting.value = false;
}
-
- uni.hideLoading()
- showToast('涓婁紶鎴愬姛')
- } catch (error) {
- uni.hideLoading()
- showToast('涓婁紶澶辫触')
- }
-}
+ };
-// 鍒犻櫎鏂囦欢
-const deleteFile = (event, index, type) => {
- const item = inspectionItems.value[index]
- if (type === 'images') {
- item.images.splice(event.index, 1)
- } else if (type === 'videos') {
- item.videos.splice(event.index, 1)
- }
-}
-
-// 鎻愪氦宸℃璁板綍
-const submitInspection = async () => {
- if (!canSubmit.value) {
- showToast('璇疯嚦灏戝畬鎴愪竴椤瑰贰妫�')
- return
- }
-
- // 妫�鏌ュ紓甯搁」鐩槸鍚﹀~鍐欎簡鎻忚堪
- const abnormalItems = inspectionItems.value.filter(item => item.isAbnormal)
- for (const item of abnormalItems) {
- if (!item.abnormalDesc || item.abnormalDesc.trim() === '') {
- showToast(`璇峰~鍐�"${item.name}"鐨勫紓甯告弿杩癭)
- return
+ // 鍒濆鍖栨暟鎹�
+ const initData = () => {
+ // 浠庡瓨鍌ㄤ腑鑾峰彇褰撳墠宸℃淇℃伅
+ const currentInspection = uni.getStorageSync("currentInspection");
+ if (currentInspection) {
+ deviceInfo.value = currentInspection;
}
- }
-
- submitting.value = true
-
- try {
- const recordData = {
- deviceId: deviceInfo.value.id,
- deviceCode: deviceInfo.value.deviceCode,
- inspectionDate: dayjs().format('YYYY-MM-DD'),
- inspector: deviceInfo.value.inspector,
- scanTime: deviceInfo.value.scanTime,
- items: inspectionItems.value.map(item => ({
- name: item.name,
- result: item.result,
- completed: item.completed,
- isAbnormal: item.isAbnormal,
- abnormalDesc: item.abnormalDesc,
- images: item.images || [],
- videos: item.videos || [],
- remark: item.remark
- })),
- completedAt: new Date().toISOString()
- }
-
- // 妯℃嫙API璋冪敤
- await new Promise(resolve => setTimeout(resolve, 2000))
-
- // 瀹為檯API璋冪敤
- // await submitInspectionRecord(recordData)
-
- showToast('宸℃璁板綍鎻愪氦鎴愬姛')
-
- // 杩斿洖鍒楄〃椤甸潰
- setTimeout(() => {
- uni.navigateBack()
- }, 1500)
-
- } catch (error) {
- showToast('鎻愪氦澶辫触锛岃閲嶈瘯')
- } finally {
- submitting.value = false
- }
-}
-// 鍒濆鍖栨暟鎹�
-const initData = () => {
- // 浠庡瓨鍌ㄤ腑鑾峰彇褰撳墠宸℃淇℃伅
- const currentInspection = uni.getStorageSync('currentInspection')
- if (currentInspection) {
- deviceInfo.value = currentInspection
- }
-
- // 妯℃嫙宸℃椤圭洰鏁版嵁
- inspectionItems.value = [
- {
- name: '璁惧澶栬妫�鏌�',
- description: '妫�鏌ヨ澶囧瑙傛槸鍚︽湁鎹熷潖銆侀攬铓�銆佸彉褰㈢瓑寮傚父鎯呭喌',
- completed: false,
- expanded: false,
- result: '',
- isAbnormal: false,
- abnormalDesc: '',
- images: [],
- videos: [],
- remark: ''
- },
- {
- name: '杩愯鐘舵�佹鏌�',
- description: '妫�鏌ヨ澶囪繍琛屾槸鍚︽甯革紝鏈夋棤寮傚父澹伴煶銆佹尟鍔ㄧ瓑',
- completed: false,
- expanded: false,
- result: '',
- isAbnormal: false,
- abnormalDesc: '',
- images: [],
- videos: [],
- remark: ''
- },
- {
- name: '瀹夊叏瑁呯疆妫�鏌�',
- description: '妫�鏌ュ悇绫诲畨鍏ㄨ缃槸鍚﹀畬濂斤紝瀹夊叏鏍囪瘑鏄惁娓呮櫚',
- completed: false,
- expanded: false,
- result: '',
- isAbnormal: false,
- abnormalDesc: '',
- images: [],
- videos: [],
- remark: ''
- },
- {
- name: '鐜鏉′欢妫�鏌�',
- description: '妫�鏌ヨ澶囧懆鍥寸幆澧冩槸鍚︾鍚堣姹傦紝閫氶銆佺収鏄庣瓑鏄惁姝e父',
- completed: false,
- expanded: false,
- result: '',
- isAbnormal: false,
- abnormalDesc: '',
- images: [],
- videos: [],
- remark: ''
- },
- {
- name: '浠〃璇绘暟璁板綍',
- description: '璁板綍鐩稿叧浠〃鐨勮鏁帮紝妫�鏌ユ槸鍚﹀湪姝e父鑼冨洿鍐�',
- completed: false,
- expanded: false,
- result: '',
- isAbnormal: false,
- abnormalDesc: '',
- images: [],
- videos: [],
- remark: ''
- }
- ]
-}
+ // 妯℃嫙宸℃椤圭洰鏁版嵁
+ inspectionItems.value = [
+ {
+ name: "璁惧澶栬妫�鏌�",
+ description: "妫�鏌ヨ澶囧瑙傛槸鍚︽湁鎹熷潖銆侀攬铓�銆佸彉褰㈢瓑寮傚父鎯呭喌",
+ completed: false,
+ expanded: false,
+ result: "",
+ isAbnormal: false,
+ abnormalDesc: "",
+ images: [],
+ videos: [],
+ remark: "",
+ },
+ {
+ name: "杩愯鐘舵�佹鏌�",
+ description: "妫�鏌ヨ澶囪繍琛屾槸鍚︽甯革紝鏈夋棤寮傚父澹伴煶銆佹尟鍔ㄧ瓑",
+ completed: false,
+ expanded: false,
+ result: "",
+ isAbnormal: false,
+ abnormalDesc: "",
+ images: [],
+ videos: [],
+ remark: "",
+ },
+ {
+ name: "瀹夊叏瑁呯疆妫�鏌�",
+ description: "妫�鏌ュ悇绫诲畨鍏ㄨ缃槸鍚﹀畬濂斤紝瀹夊叏鏍囪瘑鏄惁娓呮櫚",
+ completed: false,
+ expanded: false,
+ result: "",
+ isAbnormal: false,
+ abnormalDesc: "",
+ images: [],
+ videos: [],
+ remark: "",
+ },
+ {
+ name: "鐜鏉′欢妫�鏌�",
+ description: "妫�鏌ヨ澶囧懆鍥寸幆澧冩槸鍚︾鍚堣姹傦紝閫氶銆佺収鏄庣瓑鏄惁姝e父",
+ completed: false,
+ expanded: false,
+ result: "",
+ isAbnormal: false,
+ abnormalDesc: "",
+ images: [],
+ videos: [],
+ remark: "",
+ },
+ {
+ name: "浠〃璇绘暟璁板綍",
+ description: "璁板綍鐩稿叧浠〃鐨勮鏁帮紝妫�鏌ユ槸鍚﹀湪姝e父鑼冨洿鍐�",
+ completed: false,
+ expanded: false,
+ result: "",
+ isAbnormal: false,
+ abnormalDesc: "",
+ images: [],
+ videos: [],
+ remark: "",
+ },
+ ];
+ };
-onMounted(() => {
- initData()
-})
+ onMounted(() => {
+ initData();
+ });
-onShow(() => {
- // 椤甸潰鏄剧ず鏃跺埛鏂版暟鎹�
-})
+ onShow(() => {
+ // 椤甸潰鏄剧ず鏃跺埛鏂版暟鎹�
+ });
</script>
<style scoped lang="scss">
-.inspection-detail {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- min-height: 100vh;
- padding-bottom: 80px;
- position: relative;
-
- &::before {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- height: 200px;
- background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
- z-index: 0;
+ .inspection-detail {
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ min-height: 100vh;
+ padding-bottom: 80px;
+ position: relative;
+
+ &::before {
+ content: "";
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ height: 200px;
+ background: linear-gradient(
+ 135deg,
+ rgba(102, 126, 234, 0.8) 0%,
+ rgba(118, 75, 162, 0.8) 100%
+ );
+ z-index: 0;
+ }
}
-}
-.device-card {
- background: rgba(255, 255, 255, 0.95);
- backdrop-filter: blur(15px);
- margin: 10px 20px;
- border-radius: 20px;
- padding: 24px;
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
- border: 1px solid rgba(255, 255, 255, 0.2);
- position: relative;
- z-index: 1;
- transition: all 0.3s ease;
-
- &:hover {
- transform: translateY(-2px);
- box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
- }
-}
+ .device-card {
+ background: rgba(255, 255, 255, 0.95);
+ backdrop-filter: blur(15px);
+ margin: 10px 20px;
+ border-radius: 20px;
+ padding: 24px;
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
+ border: 1px solid rgba(255, 255, 255, 0.2);
+ position: relative;
+ z-index: 1;
+ transition: all 0.3s ease;
-.device-header {
- display: flex;
- align-items: center;
- gap: 16px;
- margin-bottom: 20px;
-}
-
-.device-icon {
- width: 56px;
- height: 56px;
- background: linear-gradient(135deg, #667eea, #764ba2);
- border-radius: 16px;
- display: flex;
- align-items: center;
- justify-content: center;
- box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
- transition: all 0.3s ease;
-
- &:hover {
- transform: scale(1.05);
- }
-}
-
-.device-info {
- flex: 1;
- display: flex;
- flex-direction: column;
- gap: 6px;
-}
-
-.device-name {
- font-size: 20px;
- font-weight: 600;
- color: #1a1a1a;
- line-height: 1.3;
-}
-
-.device-code {
- font-size: 13px;
- color: #8c8c8c;
- font-weight: 500;
- padding: 4px 12px;
- background: rgba(140, 140, 140, 0.1);
- border-radius: 12px;
- display: inline-block;
- width: fit-content;
-}
-
-.qr-scan {
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 6px;
- padding: 12px 16px;
- background: linear-gradient(135deg, #52c41a, #389e0d);
- border-radius: 12px;
- box-shadow: 0 4px 15px rgba(82, 196, 26, 0.3);
- transition: all 0.3s ease;
-
- &:hover {
- transform: scale(1.05);
- box-shadow: 0 6px 20px rgba(82, 196, 26, 0.4);
- }
-
- &:active {
- transform: scale(0.98);
- }
-}
-
-.scan-text {
- font-size: 13px;
- color: #ffffff;
- font-weight: 600;
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-}
-
-.device-details {
- display: flex;
- flex-direction: column;
- gap: 12px;
- background: rgba(248, 250, 252, 0.8);
- border-radius: 16px;
- padding: 16px;
- backdrop-filter: blur(10px);
-}
-
-.detail-item {
- display: flex;
- align-items: center;
- font-size: 14px;
- padding: 8px 0;
- transition: all 0.2s ease;
-
- &:hover {
- background: rgba(255, 255, 255, 0.5);
- margin: 0 -8px;
- padding-left: 8px;
- padding-right: 8px;
- border-radius: 8px;
- }
-}
-
-.label {
- color: #595959;
- min-width: 80px;
- font-weight: 500;
-}
-
-.value {
- color: #262626;
- flex: 1;
- font-weight: 500;
-}
-
-.inspection-items {
- margin: 10px 20px;
- position: relative;
- z-index: 1;
-}
-
-.section-title {
- display: flex;
- align-items: center;
- gap: 12px;
- padding: 20px 0;
- border-bottom: 1px solid rgba(255, 255, 255, 0.2);
- background: rgba(255, 255, 255, 0.95);
- backdrop-filter: blur(15px);
- border-radius: 16px;
- padding: 20px;
- margin-bottom: 16px;
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
-}
-
-.title-text {
- font-size: 18px;
- font-weight: 600;
- color: #1a1a1a;
- flex: 1;
-}
-
-.progress-text {
- font-size: 15px;
- font-weight: 600;
- background: linear-gradient(135deg, #667eea, #764ba2);
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- background-clip: text;
-}
-
-.items-list {
- background: rgba(255, 255, 255, 0.95);
- backdrop-filter: blur(15px);
- border-radius: 20px;
- overflow: hidden;
- margin-top: 0;
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
- border: 1px solid rgba(255, 255, 255, 0.2);
-}
-
-.inspection-item {
- border-bottom: 1px solid rgba(0, 0, 0, 0.06);
- transition: all 0.3s ease;
-
- &:last-child {
- border-bottom: none;
- }
-
- &.completed {
- background: rgba(82, 196, 26, 0.05);
- border-left: 4px solid #52c41a;
- }
-
- &.abnormal {
- background: rgba(255, 77, 79, 0.05);
- border-left: 4px solid #ff4d4f;
- }
-
- &:hover {
- background: rgba(102, 126, 234, 0.05);
- }
-}
-
-.item-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 15px;
- cursor: pointer;
-}
-
-.item-left {
- display: flex;
- align-items: center;
- gap: 12px;
- flex: 1;
-}
-
-.checkbox {
- width: 20px;
- height: 20px;
- border: 2px solid #d9d9d9;
- border-radius: 4px;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: all 0.3s;
-
- &.checked {
- background: #52c41a;
- border-color: #52c41a;
- }
-}
-
-.item-name {
- font-size: 15px;
- color: #333;
- font-weight: 500;
-}
-
-.item-status {
- flex-shrink: 0;
-}
-
-.item-content {
- padding: 0 15px 20px;
- border-top: 1px solid #f5f5f5;
-}
-
-.item-description {
- padding: 15px 0;
-}
-
-.desc-text {
- font-size: 14px;
- color: #666;
- line-height: 1.5;
-}
-
-.result-section,
-.abnormal-section,
-.upload-section,
-.remark-section {
- margin-top: 15px;
-}
-
-.section-label {
- display: block;
- font-size: 14px;
- color: #333;
- margin-bottom: 8px;
- font-weight: 500;
-}
-
-.result-options {
- display: flex;
- gap: 20px;
-}
-
-.upload-btn {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- width: 88px;
- height: 88px;
- border: 2px dashed rgba(102, 126, 234, 0.3);
- border-radius: 16px;
- background: rgba(102, 126, 234, 0.05);
- gap: 8px;
- transition: all 0.3s ease;
-
- &:hover {
- border-color: rgba(102, 126, 234, 0.5);
- background: rgba(102, 126, 234, 0.1);
- transform: translateY(-2px);
- box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
- }
-
- &:active {
- transform: translateY(0);
- }
-}
-
-.upload-text {
- font-size: 13px;
- color: #667eea;
- font-weight: 500;
-}
-
-.bottom-actions {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- background: rgba(255, 255, 255, 0.95);
- backdrop-filter: blur(20px);
- padding: 20px;
- border-top: 1px solid rgba(255, 255, 255, 0.2);
- box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
- z-index: 10;
-
- button {
- height: 48px;
- border-radius: 16px;
- font-weight: 600;
- font-size: 16px;
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
-
&:hover {
transform: translateY(-2px);
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
-
+ }
+
+ .device-header {
+ display: flex;
+ align-items: center;
+ gap: 16px;
+ margin-bottom: 20px;
+ }
+
+ .device-icon {
+ width: 56px;
+ height: 56px;
+ background: linear-gradient(135deg, #667eea, #764ba2);
+ border-radius: 16px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
+ transition: all 0.3s ease;
+
+ &:hover {
+ transform: scale(1.05);
+ }
+ }
+
+ .device-info {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ gap: 6px;
+ }
+
+ .device-name {
+ font-size: 20px;
+ font-weight: 600;
+ color: #1a1a1a;
+ line-height: 1.3;
+ }
+
+ .device-code {
+ font-size: 13px;
+ color: #8c8c8c;
+ font-weight: 500;
+ padding: 4px 12px;
+ background: rgba(140, 140, 140, 0.1);
+ border-radius: 12px;
+ display: inline-block;
+ width: fit-content;
+ }
+
+ .qr-scan {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 6px;
+ padding: 12px 16px;
+ background: linear-gradient(135deg, #52c41a, #389e0d);
+ border-radius: 12px;
+ box-shadow: 0 4px 15px rgba(82, 196, 26, 0.3);
+ transition: all 0.3s ease;
+
+ &:hover {
+ transform: scale(1.05);
+ box-shadow: 0 6px 20px rgba(82, 196, 26, 0.4);
+ }
+
+ &:active {
+ transform: scale(0.98);
+ }
+ }
+
+ .scan-text {
+ font-size: 13px;
+ color: #ffffff;
+ font-weight: 600;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
+ }
+
+ .device-details {
+ display: flex;
+ flex-direction: column;
+ gap: 12px;
+ background: rgba(248, 250, 252, 0.8);
+ border-radius: 16px;
+ padding: 16px;
+ backdrop-filter: blur(10px);
+ }
+
+ .detail-item {
+ display: flex;
+ align-items: center;
+ font-size: 14px;
+ padding: 8px 0;
+ transition: all 0.2s ease;
+
+ &:hover {
+ background: rgba(255, 255, 255, 0.5);
+ margin: 0 -8px;
+ padding-left: 8px;
+ padding-right: 8px;
+ border-radius: 8px;
+ }
+ }
+
+ .label {
+ color: #595959;
+ min-width: 80px;
+ font-weight: 500;
+ }
+
+ .value {
+ color: #262626;
+ flex: 1;
+ font-weight: 500;
+ }
+
+ .inspection-items {
+ margin: 10px 20px;
+ position: relative;
+ z-index: 1;
+ }
+
+ .section-title {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ padding: 20px 0;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.2);
+ background: rgba(255, 255, 255, 0.95);
+ backdrop-filter: blur(15px);
+ border-radius: 16px;
+ padding: 20px;
+ margin-bottom: 16px;
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
+ }
+
+ .title-text {
+ font-size: 18px;
+ font-weight: 600;
+ color: #1a1a1a;
+ flex: 1;
+ }
+
+ .progress-text {
+ font-size: 15px;
+ font-weight: 600;
+ background: linear-gradient(135deg, #667eea, #764ba2);
+ -webkit-background-clip: text;
+ -webkit-text-fill-color: transparent;
+ background-clip: text;
+ }
+
+ .items-list {
+ background: rgba(255, 255, 255, 0.95);
+ backdrop-filter: blur(15px);
+ border-radius: 20px;
+ overflow: hidden;
+ margin-top: 0;
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
+ border: 1px solid rgba(255, 255, 255, 0.2);
+ }
+
+ .inspection-item {
+ border-bottom: 1px solid rgba(0, 0, 0, 0.06);
+ transition: all 0.3s ease;
+
+ &:last-child {
+ border-bottom: none;
+ }
+
+ &.completed {
+ background: rgba(82, 196, 26, 0.05);
+ border-left: 4px solid #52c41a;
+ }
+
+ &.abnormal {
+ background: rgba(255, 77, 79, 0.05);
+ border-left: 4px solid #ff4d4f;
+ }
+
+ &:hover {
+ background: rgba(102, 126, 234, 0.05);
+ }
+ }
+
+ .item-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 15px;
+ cursor: pointer;
+ }
+
+ .item-left {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ flex: 1;
+ }
+
+ .checkbox {
+ width: 20px;
+ height: 20px;
+ border: 2px solid #d9d9d9;
+ border-radius: 4px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ transition: all 0.3s;
+
+ &.checked {
+ background: #52c41a;
+ border-color: #52c41a;
+ }
+ }
+
+ .item-name {
+ font-size: 15px;
+ color: #333;
+ font-weight: 500;
+ }
+
+ .item-status {
+ flex-shrink: 0;
+ }
+
+ .item-content {
+ padding: 0 15px 20px;
+ border-top: 1px solid #f5f5f5;
+ }
+
+ .item-description {
+ padding: 15px 0;
+ }
+
+ .desc-text {
+ font-size: 14px;
+ color: #666;
+ line-height: 1.5;
+ }
+
+ .result-section,
+ .abnormal-section,
+ .upload-section,
+ .remark-section {
+ margin-top: 15px;
+ }
+
+ .section-label {
+ display: block;
+ font-size: 14px;
+ color: #333;
+ margin-bottom: 8px;
+ font-weight: 500;
+ }
+
+ .result-options {
+ display: flex;
+ gap: 20px;
+ }
+
+ .upload-btn {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ width: 88px;
+ height: 88px;
+ border: 2px dashed rgba(102, 126, 234, 0.3);
+ border-radius: 16px;
+ background: rgba(102, 126, 234, 0.05);
+ gap: 8px;
+ transition: all 0.3s ease;
+
+ &:hover {
+ border-color: rgba(102, 126, 234, 0.5);
+ background: rgba(102, 126, 234, 0.1);
+ transform: translateY(-2px);
+ box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
+ }
+
&:active {
transform: translateY(0);
}
}
-}
+
+ .upload-text {
+ font-size: 13px;
+ color: #667eea;
+ font-weight: 500;
+ }
+
+ .bottom-actions {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ background: rgba(255, 255, 255, 0.95);
+ backdrop-filter: blur(20px);
+ padding: 20px;
+ border-top: 1px solid rgba(255, 255, 255, 0.2);
+ box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
+ z-index: 10;
+
+ button {
+ height: 48px;
+ border-radius: 16px;
+ font-weight: 600;
+ font-size: 16px;
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
+
+ &:hover {
+ transform: translateY(-2px);
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
+ }
+
+ &:active {
+ transform: translateY(0);
+ }
+ }
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.3