From 4ff4e1d736dff5434fcd28508df83af99b54a0d4 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 20 三月 2025 13:26:34 +0800
Subject: [PATCH] 能力范围、实验室能力档案功能变更
---
src/views/login.vue | 2 +-
src/views/CNAS/process/method/standardMethod/index.vue | 34 ++++++++++++++++++++++++++++++----
src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue | 6 +++---
src/views/structural/capabilityAndLaboratory/capability/index.vue | 7 ++++++-
4 files changed, 40 insertions(+), 9 deletions(-)
diff --git a/src/views/CNAS/process/method/standardMethod/index.vue b/src/views/CNAS/process/method/standardMethod/index.vue
index 20ed971..4dc142a 100644
--- a/src/views/CNAS/process/method/standardMethod/index.vue
+++ b/src/views/CNAS/process/method/standardMethod/index.vue
@@ -53,10 +53,12 @@
<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
</div>
<div class="btn">
- <!-- <el-button size="small" @click="$refs.ValueTable.openUpload()" v-if="inPower">
- <i class="el-icon-upload2" style="color: #3a7bfa"></i>
- <span style="color: #3a7bfa">瀵煎叆</span></el-button> -->
- <el-button size="small" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
+ <el-upload ref='upload' style="display: inline;margin-right: 8px" :action="uploadAction"
+ :before-upload="beforeUpload" :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp"
+ :show-file-list="false" accept='.xls,.xlsx'>
+ <el-button size="small" type="primary">瀵煎叆</el-button>
+ </el-upload>
+ <el-button size="small" type="primary" @click="openAdd">鏂板</el-button>
</div>
</div>
<lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
@@ -130,6 +132,7 @@
},
data() {
return {
+ uploadAction: process.env.VUE_APP_BASE_API + '/standardMethod/importStandardDetails',
addPower: true,
title: "鏂板",
inPower: true,
@@ -371,6 +374,29 @@
})
.catch(() => { });
},
+ // 涓婁紶鏂囦欢
+ beforeUpload(file, fileList) {
+ if (file.size > 1024 * 1024 * 10) {
+ this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
+ this.$refs.upload.clearFiles()
+ return false;
+ } else {
+ return true;
+ }
+ },
+ onError(err, file, fileList) {
+ this.$message.error('涓婁紶澶辫触')
+ this.$refs.upload.clearFiles()
+ },
+ handleSuccessUp(response, file, fileList) {
+ this.$refs.upload.clearFiles()
+ if (response.code !== 200) {
+ this.$message.error(response.msg)
+ return
+ }
+ this.$message.success('涓婁紶鎴愬姛')
+ this.refreshTable()
+ },
},
};
</script>
diff --git a/src/views/login.vue b/src/views/login.vue
index 00dd1ea..50ed177 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -38,7 +38,7 @@
<router-link class="link-type" :to="'/register'">绔嬪嵆娉ㄥ唽</router-link>
</div>
</el-form-item>
- <el-button v-if="false" type="primary" plain @click="goLogin">闆嗗洟闆嗘垚鐧诲綍</el-button>
+ <!-- <el-button v-if="false" type="primary" plain @click="goLogin">闆嗗洟闆嗘垚鐧诲綍</el-button> -->
</el-form>
</div>
<!-- 搴曢儴 -->
diff --git a/src/views/structural/capabilityAndLaboratory/capability/index.vue b/src/views/structural/capabilityAndLaboratory/capability/index.vue
index 3fbef5c..7bbd44d 100644
--- a/src/views/structural/capabilityAndLaboratory/capability/index.vue
+++ b/src/views/structural/capabilityAndLaboratory/capability/index.vue
@@ -155,13 +155,13 @@
{ label: '璇曢獙瀹�', prop: 'sonLaboratory' },
{ label: '瑕佹眰鎻忚堪', prop: 'askTell' },
{ label: '瑕佹眰鍊�', prop: 'ask' },
+ { label: '璇曢獙鏉′欢', prop: 'radiusList' },
{ label: '璁¢噺鍗曚綅', prop: 'unit' },
{ label: '宸ユ椂(H)', prop: 'manHour' },
{ label: '棰勮鏃堕棿(H)', prop: 'manDay' },
{ label: '宸ユ椂鍒嗙粍', prop: 'manHourGroup' },
{ label: '鍒涘缓鏃堕棿', prop: 'createTime' },
{ label: '淇敼鏃堕棿', prop: 'updateTime' },
- { label: '鏉′欢', prop: 'radiusList' },
{
dataType: 'action',
fixed: 'right',
@@ -514,6 +514,11 @@
}
},
refresh() {
+ this.itemParameterForm = {
+ inspectionItem: null,
+ inspectionItemSubclass: null,
+ sample: null
+ }
this.resetForm('itemParameterForm')
this.page.current = 1
this.refreshTable()
diff --git a/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue
index ecdd9f2..e6489d7 100644
--- a/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue
+++ b/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue
@@ -64,9 +64,9 @@
specimenName: [
{ required: true, message: '璇疯緭鍏ユ楠屽璞�', trigger: 'blur' }
],
- // code: [
- // { required: true, message: '璇疯緭鍏ュ璞′唬鍙�', trigger: 'blur' }
- // ],
+ objectType: [
+ { required: true, message: '璇疯緭鍏ュ璞$被鍨�', trigger: 'change' }
+ ],
},
operationType: ''
}
--
Gitblit v1.9.3