From 0e7df1d78841c4121acd9b072565f7b1bf748023 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 06 三月 2025 16:44:13 +0800
Subject: [PATCH] 能力范围bug修改
---
src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue | 32 +++++++++++++-------------------
src/views/structural/capabilityAndLaboratory/capability/index.vue | 26 ++------------------------
2 files changed, 15 insertions(+), 43 deletions(-)
diff --git a/src/views/structural/capabilityAndLaboratory/capability/index.vue b/src/views/structural/capabilityAndLaboratory/capability/index.vue
index 273644e..47973df 100644
--- a/src/views/structural/capabilityAndLaboratory/capability/index.vue
+++ b/src/views/structural/capabilityAndLaboratory/capability/index.vue
@@ -31,8 +31,8 @@
@keyup.enter.native="refreshTable()">
</el-input>
</el-form-item>
- <el-form-item label="妫�楠屽璞�" prop="specimenName">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="itemParameterForm.specimenName"
+ <el-form-item label="妫�楠屽璞�" prop="sample">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="itemParameterForm.sample"
@keyup.enter.native="refreshTable()">
</el-input>
</el-form-item>
@@ -210,28 +210,6 @@
{ label: '妫�楠屽璞N', prop: 'specimenNameEn' },
{ label: '浜у搧', prop: 'product' },
{ label: '瀵硅薄浠e彿', prop: 'code' },
- {
- label: '瀵硅薄绫诲瀷', prop: 'objectType',
- dataType: 'tag',
- formatData: (params) => {
- if (params == 1) {
- return '鍘熸潗鏂�'
- } else if (params == 2) {
- return '鎴愬搧'
- } else {
- return '杈呮潗'
- }
- },
- formatType: (params) => {
- if (params == 1) {
- return 'success'
- } else if (params == 2) {
- return 'info'
- } else {
- return 'warning'
- }
- }
- },
{ label: '鍒涘缓浜�', prop: 'createUserName' },
{ label: '鏇存柊浜�', prop: 'updateUserName' },
{ label: '鍒涘缓鏃堕棿', prop: 'createTime' },
diff --git a/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue
index e92119c..d2ac2e6 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">
@@ -15,11 +17,6 @@
</el-form-item>
<el-form-item label="瀵硅薄浠e彿锛�" prop="code">
<el-input v-model="editForm.code" clearable size="small"></el-input>
- </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-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@@ -32,8 +29,8 @@
<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",
@@ -51,7 +48,6 @@
specimenName: '', // 妫�楠屽璞�
specimenNameEn: '', // 妫�楠屽璞N
code: '', // 瀵硅薄浠e彿
- objectType: '', // 瀵硅薄绫诲瀷
},
laboratoryList: [],
editFormRules: {
@@ -70,22 +66,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 +94,7 @@
}).catch(e => {
this.editLoad = false
})
- }else{
+ } else {
// 鏂板
addTestObject(this.editForm).then(res => {
this.editLoad = false
@@ -116,7 +112,7 @@
})
},
// 鍏抽棴寮规
- closeDia () {
+ closeDia() {
this.editFormDia = false
this.resetForm("editForm");
},
@@ -137,6 +133,4 @@
}
</script>
-<style scoped>
-
-</style>
+<style scoped></style>
--
Gitblit v1.9.3