From 1e71cfb6ec97cff6531dec65a3fb5cb24b2c18ac Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 03 十一月 2025 09:57:48 +0800
Subject: [PATCH] fix: 附件完善
---
src/pages/routingInspection/detail/indexJX.vue | 564 ++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 427 insertions(+), 137 deletions(-)
diff --git a/src/pages/routingInspection/detail/indexJX.vue b/src/pages/routingInspection/detail/indexJX.vue
index 754374e..f82336a 100644
--- a/src/pages/routingInspection/detail/indexJX.vue
+++ b/src/pages/routingInspection/detail/indexJX.vue
@@ -73,11 +73,22 @@
<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 label="缁炲埗澶栧緞" prop="twistDiameter" required>
+ <template v-if="isEdit">
+ <wd-input
+ v-model="formData.twistDiameter"
+ placeholder="璇疯緭鍏ョ粸鍒跺寰勶紙mm锛�"
+ type="number"
+ />
+ </template>
+ <template v-else>
+ {{ formatValue(formData.twistDiameter, "mm") }}
+ </template>
</wd-form-item>
</wd-col>
</wd-row>
+
<!-- 鑷璁板綍璇︽儏妯″潡 -->
<wd-row>
<view style="margin: 10rpx">
@@ -97,54 +108,76 @@
</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 label="鎴愬搧缁撴瀯" prop="structureFormula" required>
+ <template v-if="isEdit">
+ <wd-input v-model="formData.structureFormula" placeholder="璇疯緭鍏ユ垚鍝佺粨鏋�" />
+ </template>
+ <template v-else>
+ {{ formData.structureFormula || "-" }}
+ </template>
</wd-form-item>
</wd-col>
</wd-row>
- <wd-row v-if="recordData.structureInfo.structureRecordResult.inspectStructure.structureItems">
+
+ <!-- 缁撴瀯鏍囧噯鍊煎拰瀹炴祴锛堝彲缂栬緫锛� -->
+ <wd-row v-if="formData.structureItems.length">
<view style="margin: 10rpx">
<text class="title">{{ "缁撴瀯鏍囧噯鍊煎拰瀹炴祴" }}</text>
</view>
<wd-col
:span="24"
- v-for="(item, index) in recordData.structureInfo.structureRecordResult.inspectStructure
- .structureItems"
+ v-for="(item, index) in formData.structureItems"
:key="index"
style="padding-bottom: 10px"
>
<wd-form-item
+ prop="structureItemsGroup"
:label="formatValue(item.structureName)"
label-width="400rpx"
style="color: red"
+ required
></wd-form-item>
- <wd-form-item label="鏍囧噯鍊�" prop="structureValue">
+ <wd-form-item label="鏍囧噯鍊�" prop="structureValue" required>
{{ formatValue(item.structureValue) }}
</wd-form-item>
- <wd-form-item label="瀹炴祴鏍规暟" prop="actualValue1">
- {{ formatValue(item.actualValue1, "鏍�") }}
+ <wd-form-item label="瀹炴祴鏍规暟" prop="actualValue1" required>
+ <template v-if="isEdit">
+ <wd-input v-model="item.actualValue1" placeholder="璇疯緭鍏ュ疄娴嬫牴鏁�" type="number" />
+ </template>
+ <template v-else>
+ {{ formatValue(item.actualValue1, "鏍�") }}
+ </template>
</wd-form-item>
- <wd-form-item label="瀹炴祴鐩村緞" prop="actualValue2">
- {{ formatValue(item.actualValue2, "mm") }}
+ <wd-form-item label="瀹炴祴鐩村緞" prop="actualValue2" required>
+ <template v-if="isEdit">
+ <wd-input
+ v-model="item.actualValue2"
+ placeholder="璇疯緭鍏ュ疄娴嬬洿寰勶紙mm锛�"
+ type="number"
+ />
+ </template>
+ <template v-else>
+ {{ formatValue(item.actualValue2, "mm") }}
+ </template>
</wd-form-item>
</wd-col>
</wd-row>
- <!-- 缁炵嚎宸ヨ壓璐ㄩ噺鎺у埗妯″潡 -->
- <wd-row v-if="recordData.structureInfo?.structureRecordResult?.inspectTwist">
+
+ <!-- 缁炵嚎宸ヨ壓璐ㄩ噺鎺у埗锛堝彲缂栬緫锛� -->
+ <wd-row v-if="formData.inspectTwist.length">
<view style="margin: 10rpx">
<text class="title">{{ "缁炵嚎宸ヨ壓璐ㄩ噺鎺у埗" }}</text>
</view>
<wd-col
:span="24"
- v-for="(item, index) in recordData.structureInfo.structureRecordResult.inspectTwist"
+ v-for="(item, index) in formData.inspectTwist"
:key="index"
style="padding-bottom: 10px"
>
@@ -152,87 +185,319 @@
:label="formatValue(item.twistName)"
label-width="400rpx"
style="color: red"
+ prop="inspectTwistGroup"
+ required
></wd-form-item>
- <wd-form-item label="缁炲悜" prop="direction">
- {{ formatValue(item.direction) }}
+ <wd-form-item label="缁炲悜" prop="direction" required>
+ <template v-if="isEdit">
+ <wd-select-picker
+ label=""
+ v-model="item.direction"
+ :columns="twistDirectionOptions"
+ type="radio"
+ placeholder="璇烽�夋嫨缁炲悜"
+ :clearable="false"
+ ></wd-select-picker>
+ </template>
+ <template v-else>
+ {{ formatValue(item.direction) }}
+ </template>
</wd-form-item>
- <wd-form-item label="鑺傝窛" prop="pitch">{{ formatValue(item.pitch, "mm") }}</wd-form-item>
- <wd-form-item label="鑺傚緞姣�" prop="pitchRatio">
+ <wd-form-item label="鑺傝窛" prop="pitch" required>
+ <template v-if="isEdit">
+ <wd-input v-model="item.pitch" placeholder="璇疯緭鍏ヨ妭璺濓紙mm锛�" type="number" />
+ </template>
+ <template v-else>
+ {{ formatValue(item.pitch, "mm") }}
+ </template>
+ </wd-form-item>
+ <wd-form-item label="鑺傚緞姣�" prop="pitchRatio" required>
{{ 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 label="浜у搧澶栬" prop="productAppearance" required>
+ <template v-if="isEdit">
+ <wd-checkbox-group
+ v-model="formData.productAppearance"
+ inline
+ v-for="(opt, idx) in appearanceOptions"
+ :key="idx"
+ style="text-align: justify"
+ >
+ <wd-checkbox :modelValue="opt.value" style="width: 100px">
+ {{ opt.label }}
+ </wd-checkbox>
+ </wd-checkbox-group>
+ </template>
+ <template v-else>
+ {{ formatProductAppearance(formData.productAppearance) }}
+ </template>
</wd-form-item>
- <wd-form-item label="浜у搧澶栬" prop="productAppearance">
- {{
- formatProductAppearance(
- recordData.structureInfo.structureRecordResult.productAppearance
- )
- }}
+ <wd-form-item label="缁撹" prop="conclusion" required>
+ <template v-if="isEdit">
+ <wd-radio-group v-model="formData.conclusion" inline class="conclusion-radio-group">
+ <wd-radio
+ v-for="(opt, idx) in conclusionOptions"
+ :key="idx"
+ :value="opt.value"
+ shape="dot"
+ >
+ {{ opt.label }}
+ </wd-radio>
+ </wd-radio-group>
+ </template>
+ <template v-else>
+ {{ formatValue(formData.conclusion) }}
+ </template>
</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 label="鏍峰搧鏄惁榻愬叏" prop="sampleComplete" required>
+ <template v-if="isEdit">
+ <wd-radio-group v-model="formData.sampleComplete" inline class="conclusion-radio-group">
+ <wd-radio
+ v-for="(opt, idx) in sampleCompleteOptions"
+ :key="idx"
+ :value="opt.value"
+ shape="dot"
+ >
+ {{ opt.label }}
+ </wd-radio>
+ </wd-radio-group>
+ </template>
+ <template v-else>
+ {{ formatValue(formData.sampleComplete) }}
+ </template>
</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-col :span="24">
+ <AttachmentUpload
+ :detailData="detailData"
+ :isEdit="isEdit"
+ :deviceType="paramsType"
+ ref="attachmentRef"
+ v-if="detailDataLoaded"
+ />
+ </wd-col>
</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>
+ <Scan ref="scanRef" emitName="scan" />
+ <wd-toast />
</view>
</template>
<script setup lang="ts">
+import { ref, reactive, computed } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import RoutingInspectionApi from "@/api/routingInspection/routingInspection";
+import Scan from "@/components/scan/index.vue";
+import { useToast } from "wot-design-uni";
+import AttachmentUpload from "../upload.vue";
+const paramsType = ref("");
const paramsId = ref("");
-const recordData = ref<any>({});
+const recordData = ref<any>({ structureInfo: { files: [], structureRecordResult: {} } });
const show = ref(false);
const previewImageUrl = ref("");
const isEdit = ref(false);
+const tempFiles = ref<any[]>([]); // 涓存椂瀛樺偍鏂颁笂浼犵殑闄勪欢
+const deviceUid = ref("");
+const scanRef = ref();
+const toast = useToast();
+const attachmentRef = ref<any>(null);
+const detailData = reactive<any>({});
+const detailDataLoaded = ref(false);
+
+const formData = reactive({
+ twistDiameter: "", // 缁炲埗澶栧緞
+ structureFormula: "", // 鎴愬搧缁撴瀯
+ structureItems: [], // 缁撴瀯鏍囧噯鍊煎拰瀹炴祴
+ inspectTwist: [], // 缁炵嚎宸ヨ壓璐ㄩ噺鎺у埗
+ productAppearance: [] as string[], // 浜у搧澶栬锛堟敼涓烘暟缁勫瓨鍌ㄩ�変腑鍊硷級
+ conclusion: "", // 缁撹锛堟敼涓烘暟缁勫瓨鍌ㄩ�変腑鍊硷級
+ sampleComplete: "", // 鏍峰搧鏄惁榻愬叏
+});
+
+const twistDirectionOptions = [
+ { label: "宸﹀悜", value: "宸﹀悜" },
+ { label: "鍙冲悜", value: "鍙冲悜" },
+];
+
+const appearanceOptions = [
+ { label: "鏃犲瑙傞棶棰�", value: "鏃犲瑙傞棶棰�" },
+ { label: "琛ㄩ潰鍒掍激", value: "琛ㄩ潰鍒掍激" },
+ { label: "鐩村緞涓嶅潎", value: "鐩村緞涓嶅潎" },
+ { label: "鍏朵粬缂洪櫡", value: "鍏朵粬缂洪櫡" },
+];
+
+const conclusionOptions = [
+ { label: "鍚堟牸", value: "鍚堟牸" },
+ { label: "涓嶅悎鏍�", value: "涓嶅悎鏍�" },
+];
+const sampleCompleteOptions = [
+ { label: "鏄�", value: "鏄�" },
+ { label: "鍚�", value: "鍚�" },
+];
+
+const initFormData = () => {
+ const structureResult = recordData.value.structureInfo?.structureRecordResult || {};
+ const inspectionResult = recordData.value.inspectionResult || {};
+
+ formData.twistDiameter = inspectionResult.twistDiameter || "";
+ formData.structureFormula = structureResult.inspectStructure?.structureFormula || "";
+ formData.sampleComplete = inspectionResult.sampleComplete || "";
+ formData.conclusion = structureResult.conclusion || "";
+ formData.productAppearance = Array.isArray(structureResult.productAppearance)
+ ? structureResult.productAppearance
+ : structureResult.productAppearance
+ ? [structureResult.productAppearance]
+ : [];
+
+ formData.structureItems = JSON.parse(
+ JSON.stringify(structureResult.inspectStructure?.structureItems || [])
+ );
+ formData.inspectTwist = JSON.parse(JSON.stringify(structureResult.inspectTwist || []));
+
+ formData.inspectTwist.forEach((item: any) => {
+ if (!item.direction) item.direction = "";
+ });
+};
+
+const getDetailData = async (id: string, deviceType: string) => {
+ try {
+ const response = await RoutingInspectionApi.getStrandedInspectionStructureInfoById({ id });
+ recordData.value = response.data;
+ detailData.value = response.data.structureInfo;
+ console.log("detailData.value", detailData.value);
+ tempFiles.value = []; // 娓呯┖涓存椂鏂囦欢
+ initFormData(); // 鏁版嵁杩斿洖鍚庡垵濮嬪寲琛ㄥ崟
+ detailDataLoaded.value = true; // 鏁版嵁鍔犺浇瀹屾垚鍚庯紝娓叉煋瀛愮粍浠�
+ console.log("鐖剁粍浠�-鏁版嵁灏辩华鍚庢墦鍗�");
+ } catch (error) {
+ console.error("鑾峰彇璇︽儏澶辫触:", error);
+ uni.showToast({ title: "鍔犺浇澶辫触", icon: "error" });
+ }
+};
+
+// 椤甸潰鍔犺浇
+onLoad((options: any) => {
+ try {
+ paramsId.value = options.id;
+ paramsType.value = options.deviceType;
+ getDetailData(options.id, options.deviceType);
+ } catch (error) {
+ console.error("鑾峰彇璇︽儏澶辫触:", error);
+ uni.showToast({ title: "鍔犺浇澶辫触", icon: "error" });
+ }
+});
+
+// 缂栬緫妯″紡鍒囨崲
+const editList = () => {
+ isEdit.value = true;
+};
+
+// 鍙栨秷缂栬緫锛堥噸缃〃鍗曪級
+const close = () => {
+ isEdit.value = false;
+ tempFiles.value = [];
+ initFormData();
+};
+
+// 淇濆瓨缂栬緫锛堝惈蹇呭~椤规牎楠岋級
+const saveList = async () => {
+ // 1. 鍩虹瀛楁鏍¢獙
+ if (!formData.structureFormula) return uni.showToast({ title: "鎴愬搧缁撴瀯涓哄繀濉」", icon: "none" });
+ if (!formData.twistDiameter) return uni.showToast({ title: "缁炲埗澶栧緞涓哄繀濉」", icon: "none" });
+ if (!formData.productAppearance.length)
+ return uni.showToast({ title: "浜у搧澶栬涓哄繀濉」", icon: "none" });
+ if (!formData.conclusion) return uni.showToast({ title: "缁撹涓哄繀濉」", icon: "none" });
+ if (!formData.sampleComplete)
+ return uni.showToast({ title: "鏍峰搧鏄惁榻愬叏涓哄繀濉」", icon: "none" });
+ // 2. 缁撴瀯椤瑰惊鐜牎楠�
+ for (const item of formData.structureItems) {
+ if (!item.structureValue)
+ return uni.showToast({ title: `${item.structureName}鏍囧噯鍊间负蹇呭~椤筦, icon: "none" });
+ if (!item.actualValue1)
+ return uni.showToast({ title: `${item.structureName}瀹炴祴鏍规暟涓哄繀濉」`, icon: "none" });
+ if (!item.actualValue2)
+ return uni.showToast({ title: `${item.structureName}瀹炴祴鐩村緞涓哄繀濉」`, icon: "none" });
+ }
+
+ // 3. 缁炵嚎宸ヨ壓椤瑰惊鐜牎楠�
+ for (const item of formData.inspectTwist) {
+ if (!item.direction)
+ return uni.showToast({ title: `${item.twistName}缁炲悜涓哄繀濉」`, icon: "none" });
+ if (!item.pitch) return uni.showToast({ title: `${item.twistName}鑺傝窛涓哄繀濉」`, icon: "none" });
+ if (!item.pitchRatio)
+ return uni.showToast({ title: `${item.twistName}鑺傚緞姣斾负蹇呭~椤筦, icon: "none" });
+ }
+ console.log("1111", deviceUid.value);
+ if (!deviceUid.value) return uni.showToast({ title: "璇锋壂鎻忎簩缁寸爜", icon: "none" });
+ const { newFiles } = attachmentRef.value.getSubmitFiles();
+ console.log("newFiles", newFiles);
+ const allFileIds = [...newFiles];
+ try {
+ const res = await RoutingInspectionApi.strandedPatrolCheckInspection({
+ deviceUid: deviceUid.value,
+ id: paramsId.value,
+ result: {
+ twistDiameter: formData.twistDiameter,
+ structureFormula: formData.structureFormula,
+ structureItems: formData.structureItems,
+ inspectTwist: formData.inspectTwist,
+ productAppearance: formData.productAppearance,
+ conclusion: formData.conclusion,
+ sampleComplete: formData.sampleComplete,
+ },
+ inspectionResult: {
+ sampleComplete: formData.sampleComplete,
+ },
+ processInspectionAttachmentList: allFileIds,
+ });
+
+ if (res.code === 200) {
+ uni.showToast({ title: "淇濆瓨鎴愬姛", icon: "success" });
+ isEdit.value = false;
+ getDetailData(paramsId.value, paramsType.value);
+ } else {
+ uni.showModal({ title: res.msg || "淇濆瓨澶辫触", icon: "error" });
+ }
+ } catch (e) {
+ console.error("淇濆瓨澶辫触:", e);
+ uni.showModal({ title: e.message || "淇濆瓨澶辫触", icon: "error" });
+ }
+};
+
+const handleClose = () => {
+ show.value = false;
+};
// 鐘舵�佺被鍨嬫槧灏�
const getStatusType = (status: number) => {
@@ -266,12 +531,6 @@
}
};
-// 鑾峰彇澶栬鏂囨湰
-const getAppearanceText = (appearance: string[]) => {
- if (!appearance || appearance.length === 0) return "-";
- return appearance.join("銆�");
-};
-
// 鏍煎紡鍖栦骇鍝佸瑙傛樉绀�
const formatProductAppearance = (productAppearance: string[]) => {
if (!productAppearance || productAppearance.length === 0) return "-";
@@ -294,82 +553,40 @@
});
};
-// 鏍煎紡鍖栫粨鏋勫�兼樉绀�
-const formatStructureValue = (value1: any, value2: any) => {
- const val1 = value1 || "-";
- const val2 = value2 ? `${value2}mm` : "-";
- return { count: val1, diameter: val2 };
+const openScan = () => {
+ scanRef.value.triggerScan();
};
-
-const getDetailData = async (id: string, deviceType: string) => {
+const getScanCode = (params: any) => {
+ console.log("瀹屾暣鍙傛暟锛�", params);
+ let codeObj = {};
try {
- let response;
- // 鑾峰彇缁炵嚎鍗曚釜缁撴瀯
- response = await RoutingInspectionApi.getStrandedInspectionStructureInfoById({
- id: id,
- });
- recordData.value = response.data;
- console.log(recordData.value);
- } catch (error) {
- console.error("鑾峰彇璇︽儏澶辫触:", error);
+ codeObj = JSON.parse(params.code);
+ } catch (err) {
+ console.error("JSON瑙f瀽澶辫触锛�", err);
+ toast.error("鎵爜鏁版嵁寮傚父");
+ return;
}
+ deviceUid.value = codeObj?.uid;
+ toast.success("鎵爜鎴愬姛");
};
-
-onLoad((options: any) => {
- paramsId.value = options.id;
- getDetailData(options.id, options.deviceType);
+// 纭繚鍏堢Щ闄ゅ啀娣诲姞鐩戝惉
+const setupScanListener = () => {
+ uni.$off("scan", getScanCode); // 鍏堢Щ闄ゆ棫鐨�
+ uni.$on("scan", getScanCode); // 鍐嶆坊鍔犳柊鐨�
+};
+onUnmounted(() => {
+ // 寮�鍚箍鎾洃鍚簨浠�
+ uni.$off("scan", getScanCode);
+ console.log("绂诲紑1");
});
-
-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",
- // });
- // }
-};
+onMounted(() => {
+ // 寮�鍚箍鎾洃鍚簨浠�
+ setupScanListener();
+ console.log("鏄剧ず1");
+});
</script>
+
<style lang="scss" scoped>
-.placeholder {
- flex: 1;
-}
.fixed-header {
position: fixed;
top: 44;
@@ -391,14 +608,8 @@
gap: 10px;
}
-.search-wrapper {
+.placeholder {
flex: 1;
- min-width: 0;
-}
-
-:deep(.search-wrapper .wd-search) {
- width: 100% !important;
- min-width: 0 !important;
}
.scan-wrapper {
@@ -413,11 +624,11 @@
.list {
padding: 12px;
-
padding-top: 84px;
background: #f3f9f8;
min-height: 100vh;
box-sizing: border-box;
+ overflow-y: auto;
}
.title {
@@ -439,6 +650,20 @@
border-radius: 2px;
}
+// 浜у搧澶栬鍜岀粨璁洪�夋嫨鍣ㄦ牱寮忥紙涓�琛屼袱涓級
+.checkbox-group {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 16rpx;
+ padding: 8rpx 0;
+}
+
+.checkbox-item {
+ width: calc(50% - 8rpx);
+ margin-bottom: 8rpx;
+}
+
+// 闄勪欢鐩稿叧鏍峰紡
.attachment-section {
width: 100%;
}
@@ -453,6 +678,39 @@
.attachment-item {
width: calc(25% - 10px);
box-sizing: border-box;
+ position: relative;
+}
+
+.upload-btn {
+ width: 80px;
+ height: 80px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border: 1px dashed #ccc;
+ border-radius: 4px;
+ box-sizing: border-box;
+}
+
+.upload-icon {
+ font-size: 32px;
+ color: #0d867f;
+}
+
+// 闄勪欢鍒犻櫎鍥炬爣
+.delete-icon {
+ position: absolute;
+ top: -8px;
+ right: -8px;
+ width: 24px;
+ height: 24px;
+ background-color: rgba(255, 0, 0, 0.8);
+ color: white;
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 10;
}
@media (max-width: 768px) {
@@ -460,4 +718,36 @@
width: calc(25% - 10px);
}
}
-</style>
\ No newline at end of file
+
+// 缂栬緫妯″紡涓嬭〃鍗曠粍浠舵牱寮忎紭鍖�
+:deep(.wd-form-item) {
+ margin-bottom: 8rpx;
+}
+
+:deep(.wd-input, .wd-select, .wd-radio-group, .wd-checkbox-group) {
+ width: 100%;
+ box-sizing: border-box;
+}
+
+:deep(.wd-form-item__label) {
+ &::after {
+ content: "*";
+ color: red;
+ margin-left: 4rpx;
+ }
+}
+
+// 淇閫夋嫨鍣ㄦ牱寮�
+:deep(.wd-select) {
+ width: 100%;
+}
+
+:deep(.wd-checkbox) {
+ margin-right: 0;
+}
+.conclusion-radio-group {
+ display: flex;
+ align-items: flex-start; // 鍨傜洿鏂瑰悜椤堕儴瀵归綈锛堜笂绉诲叧閿級
+ gap: 20rpx; // 閫夐」涔嬮棿鐨勯棿璺�
+}
+</style>
--
Gitblit v1.9.3