From 53bc8cc8fd330d5e2a4a3698967548a0b74a395a Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期五, 23 十月 2026 18:09:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/business/inspectionTask/inspection.vue | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index 4c7cafe..5e92482 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -177,9 +177,9 @@
<span class="template-panel__unit">鈩�</span>
</el-form-item>
<el-form-item label="妫�娴嬫椂闂�:">
- <el-date-picker v-model="currentOtherForm.detectionTime" :disabled="state > 1" type="date"
- value-format="YYYY-MM-DD" placeholder="璇烽�夋嫨鏃ユ湡" size="small" style="width: 160px"
- @change="(m) => subOtherForm(m, 'detectionTime')"></el-date-picker>
+ <el-date-picker v-model="currentOtherForm.detectionTimeRange" :disabled="state > 1" type="daterange"
+ value-format="YYYY-MM-DD" range-separator="鑷�" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" size="small" style="width: 260px"
+ @change="(m) => subOtherForm(m, 'detectionTimeRange')"></el-date-picker>
</el-form-item>
<el-form-item label="妫�娴嬪湴鐐�:">
<el-input v-model="currentOtherForm.detectionPlace" :disabled="state > 1" clearable placeholder="璇疯緭鍏ユ娴嬪湴鐐�"
@@ -490,6 +490,7 @@
<script>
// Vue3 娌℃湁 this.$createElement锛堜笅闈㈢敤 h 閫� VNode 褰� $msgbox 鐨� message锛�
import { h } from 'vue'
+import { readDetectionTimeRange, isCompleteDetectionTimeRange, toDetectionTimePayload } from '@/utils/detectionTimeRange'
import excelFunction from "@/utils/excelFountion";
import limsTable from "@/components/Table/lims-table.vue";
import UnPassDialog from "../unpass/components/unPassDialog.vue";
@@ -613,7 +614,7 @@
inspectionItem: 1,
inspectionItemSubclass: "20(甯告俯)",
},
- // 妫�娴嬫潯浠朵笌妫�楠岀粨璁烘寜妯℃澘 id 鍒嗙粍锛歿 [templateId]: { temperature, detectionTime, detectionPlace, deviceIds, insResult } }
+ // 妫�娴嬫潯浠朵笌妫�楠岀粨璁烘寜妯℃澘 id 鍒嗙粍锛歿 [templateId]: { temperature, detectionTimeRange, detectionPlace, deviceIds, insResult } }
otherForm: {},
equipForm: {
value0: null,
@@ -742,7 +743,7 @@
return (
this.otherForm[this.currentTable] || {
temperature: null,
- detectionTime: null,
+ detectionTimeRange: null,
detectionPlace: null,
deviceIds: [],
insResult: null,
@@ -1035,7 +1036,7 @@
(this.insOrder.templateConditions || []).forEach((item) => {
this.otherForm[item.templateId] = {
temperature: item.temperature != null ? item.temperature : null,
- detectionTime: item.detectionTime != null ? item.detectionTime : null,
+ detectionTimeRange: readDetectionTimeRange(item),
detectionPlace: item.detectionPlace != null ? item.detectionPlace : null,
deviceIds: Array.isArray(item.deviceIds) ? [...item.deviceIds] : [],
insResult: item.insResult != null ? item.insResult : null,
@@ -1181,7 +1182,7 @@
if (!this.otherForm[templateId]) {
this.otherForm[templateId] = {
temperature: null,
- detectionTime: null,
+ detectionTimeRange: null,
detectionPlace: null,
deviceIds: [],
insResult: null,
@@ -1197,7 +1198,9 @@
payload.templateId = this.currentTable;
if (type === "deviceIds") {
payload.deviceIds = Array.isArray(m) ? [...m] : [];
- } else if (type === "detectionTime" || type === "detectionPlace") {
+ } else if (type === "detectionTimeRange") {
+ Object.assign(payload, toDetectionTimePayload(m));
+ } else if (type === "detectionPlace") {
payload[type] = m === "" || m == null ? null : m;
} else {
payload[type] = Number(m);
@@ -1783,7 +1786,7 @@
if (this.insOrder.ifsOrderType !== "02wg") {
if (!form.temperature) missing.push(`璇峰~鍐欍��${m.templateName}銆嶇殑娓╁害`);
}
- if (!form.detectionTime) missing.push(`璇烽�夋嫨銆�${m.templateName}銆嶇殑妫�娴嬫椂闂碻);
+ if (!isCompleteDetectionTimeRange(form.detectionTimeRange)) missing.push(`璇烽�夋嫨銆�${m.templateName}銆嶇殑妫�娴嬫椂闂碻);
if (!form.detectionPlace) missing.push(`璇峰~鍐欍��${m.templateName}銆嶇殑妫�娴嬪湴鐐筦);
if (!form.deviceIds || form.deviceIds.length === 0) {
missing.push(`璇烽�夋嫨銆�${m.templateName}銆嶇殑璁惧`);
@@ -1909,7 +1912,7 @@
id: this.insOrder.id,
templateId: template.templateId,
temperature: form.temperature == null ? null : form.temperature,
- detectionTime: form.detectionTime || null,
+ ...toDetectionTimePayload(form.detectionTimeRange),
detectionPlace: form.detectionPlace || null,
});
}));
@@ -2239,7 +2242,9 @@
},
handleDown(row) {
downFile({ id: row.id }).then((res) => {
- this.$download.saveAs(res.data.fileUrl, row.fileName)
+ const resourcePath = Number(res.data.type) === 1 ? "/img/" : "/word/";
+ const fileUrl = this.javaApi + resourcePath + encodeURIComponent(res.data.fileUrl);
+ this.$download.saveAs(fileUrl, row.fileName);
})
.catch((error) => { });
},
--
Gitblit v1.9.3