From 8bd549c42f20faeedd0f2f1264e2f5003f2db3db Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 21 三月 2025 13:15:08 +0800
Subject: [PATCH] 下载更改
---
src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue | 41 +++++++++++++++++++++--------------------
1 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue
index e92119c..e6489d7 100644
--- a/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue
+++ b/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue
@@ -1,10 +1,12 @@
<template>
<div>
- <el-dialog :title="operationType === 'add' ? '鏂板' : '缂栬緫'" :visible.sync="editFormDia" width="500px" @close="closeDia">
+ <el-dialog :title="operationType === 'add' ? '鏂板' : '缂栬緫'" :visible.sync="editFormDia" width="500px"
+ @close="closeDia">
<el-form ref="editForm" :model="editForm" :rules="editFormRules" label-width="120px" label-position="right">
<el-form-item label="鍦烘墍锛�" prop="laboratoryId">
<el-select v-model="editForm.laboratoryId" clearable placeholder="璇烽�夋嫨" size="small" style="width: 100%">
- <el-option v-for="item in laboratoryList" :key="item.value" :label="item.label" :value="item.value"></el-option>
+ <el-option v-for="item in laboratoryList" :key="item.value" :label="item.label"
+ :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="妫�楠屽璞★細" prop="specimenName">
@@ -13,12 +15,13 @@
<el-form-item label="妫�楠屽璞N锛�" prop="specimenNameEn">
<el-input v-model="editForm.specimenNameEn" clearable size="small"></el-input>
</el-form-item>
- <el-form-item label="瀵硅薄浠e彿锛�" prop="code">
+ <!-- <el-form-item label="瀵硅薄浠e彿锛�" prop="code">
<el-input v-model="editForm.code" clearable size="small"></el-input>
- </el-form-item>
+ </el-form-item> -->
<el-form-item label="瀵硅薄绫诲瀷锛�" prop="objectType">
<el-select v-model="editForm.objectType" clearable placeholder="璇烽�夋嫨" size="small" style="width: 100%">
- <el-option v-for="item in dict.type.object_type" :key="item.value" :label="item.label" :value="item.value"></el-option>
+ <el-option v-for="item in dict.type.product_classification" :key="item.value" :label="item.label"
+ :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-form>
@@ -32,13 +35,13 @@
<script>
-import {obtainItemParameterList} from "@/api/structural/laboratoryScope";
-import {addTestObject, upTestObject} from "@/api/structural/capability";
+import { obtainItemParameterList } from "@/api/structural/laboratoryScope";
+import { addTestObject, upTestObject } from "@/api/structural/capability";
export default {
name: "EditForm",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
- dicts: ['object_type'],
+ dicts: ['product_classification'],
components: {},
data() {
// 杩欓噷瀛樻斁鏁版嵁
@@ -50,7 +53,7 @@
laboratoryId: '', // 鍦烘墍
specimenName: '', // 妫�楠屽璞�
specimenNameEn: '', // 妫�楠屽璞N
- code: '', // 瀵硅薄浠e彿
+ // code: '', // 瀵硅薄浠e彿
objectType: '', // 瀵硅薄绫诲瀷
},
laboratoryList: [],
@@ -61,8 +64,8 @@
specimenName: [
{ required: true, message: '璇疯緭鍏ユ楠屽璞�', trigger: 'blur' }
],
- code: [
- { required: true, message: '璇疯緭鍏ュ璞′唬鍙�', trigger: 'blur' }
+ objectType: [
+ { required: true, message: '璇疯緭鍏ュ璞$被鍨�', trigger: 'change' }
],
},
operationType: ''
@@ -70,22 +73,22 @@
},
// 鏂规硶闆嗗悎
methods: {
- openDia (type, row) {
+ openDia(type, row) {
this.operationType = type
this.obtainItemParameterList()
this.editFormDia = true
if (type === 'add') {
this.resetForm("editForm");
} else {
- this.editForm = {...row}
+ this.editForm = { ...row }
}
},
// 鎻愪氦缂栬緫
- handleEdit () {
+ handleEdit() {
this.$refs.editForm.validate(valid => {
if (valid) {
this.editLoad = true
- if(this.editForm.id){
+ if (this.editForm.id) {
// 淇敼
upTestObject(this.editForm).then(res => {
this.editLoad = false
@@ -98,7 +101,7 @@
}).catch(e => {
this.editLoad = false
})
- }else{
+ } else {
// 鏂板
addTestObject(this.editForm).then(res => {
this.editLoad = false
@@ -116,7 +119,7 @@
})
},
// 鍏抽棴寮规
- closeDia () {
+ closeDia() {
this.editFormDia = false
this.resetForm("editForm");
},
@@ -137,6 +140,4 @@
}
</script>
-<style scoped>
-
-</style>
+<style scoped></style>
--
Gitblit v1.9.3