From 752ea7df5717c3d54887c85d84a541efb53fa4c7 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 04 七月 2025 13:17:26 +0800
Subject: [PATCH] 过程检验页面开发联调、出厂检验开发联调、不合格管理开发联调
---
src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue | 33 ++++++++++++++++++++-------------
1 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
index efed304..cdce2c5 100644
--- a/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
@@ -3,7 +3,7 @@
<el-dialog
v-model="dialogFormVisible"
title="涓婁紶闄勪欢"
- width="70%"
+ width="50%"
@close="closeDia"
>
<div style="margin-bottom: 10px;text-align: right">
@@ -68,14 +68,14 @@
label: "鏂囦欢鍚嶇О",
prop: "name",
},
- {
- label: "涓婁紶浜�",
- prop: "unit",
- },
- {
- label: "涓婁紶鏃堕棿",
- prop: "standardValue",
- },
+ // {
+ // label: "涓婁紶浜�",
+ // prop: "createUser",
+ // },
+ // {
+ // label: "涓婁紶鏃堕棿",
+ // prop: "createTime",
+ // },
{
dataType: "action",
label: "鎿嶄綔",
@@ -85,7 +85,7 @@
name: "涓嬭浇",
type: "text",
clickFun: (row) => {
- openForm("edit", row);
+ downLoadFile(row);
},
}
],
@@ -97,7 +97,7 @@
const headers = ref({
Authorization: "Bearer " + getToken(),
});
-const uploadUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃
+const uploadUrl = ref(import.meta.env.VITE_APP_BASE_API + "/file/upload"); // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃
// 鎵撳紑寮规
const openDialog = (row) => {
@@ -106,7 +106,7 @@
getList()
}
const getList = () => {
- qualityInspectFileListPage(currentId.value).then(res => {
+ qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
tableData.value = res.data.records;
})
}
@@ -124,7 +124,10 @@
function handleUploadSuccess(res, file) {
// 濡傛灉涓婁紶鎴愬姛
if (res.code == 200) {
- uploadFile(res)
+ const fileRow = {}
+ fileRow.name = res.data.originalName
+ fileRow.url = res.data.tempPath
+ uploadFile(fileRow)
} else {
proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
}
@@ -140,6 +143,10 @@
function handleUploadError() {
proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
}
+// 涓嬭浇闄勪欢
+const downLoadFile = (row) => {
+ proxy.$download.name(row.url);
+}
// 鍒犻櫎
const handleDelete = () => {
let ids = [];
--
Gitblit v1.9.3