From 3471290659516cf21db3211a9053daff5f283e03 Mon Sep 17 00:00:00 2001
From: zhuguifei <312353457@qq.com>
Date: 星期五, 20 三月 2026 15:50:18 +0800
Subject: [PATCH] feat: 基础数据仪器管理、判定依据、判定依据明细

---
 ruoyi-plus-soybean/src/views/qm/checkitem/modules/checkitem-operate-drawer.vue |   36 +++++++++++++++++++++++++++++++++++-
 1 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/ruoyi-plus-soybean/src/views/qm/checkitem/modules/checkitem-operate-drawer.vue b/ruoyi-plus-soybean/src/views/qm/checkitem/modules/checkitem-operate-drawer.vue
index 4037161..e4af1c5 100755
--- a/ruoyi-plus-soybean/src/views/qm/checkitem/modules/checkitem-operate-drawer.vue
+++ b/ruoyi-plus-soybean/src/views/qm/checkitem/modules/checkitem-operate-drawer.vue
@@ -6,6 +6,7 @@
   fetchGetRid,
   fetchUpdateCheckitem
 } from '@/service/api/qm/checkitem';
+import { fetchGetInstrumentList } from '@/service/api/md/instrument';
 import { useFormRules, useNaiveForm } from '@/hooks/common/form';
 import { $t } from '@/locales';
 
@@ -76,6 +77,7 @@
 
 const model = ref<Model>(createDefaultModel());
 const ridOptions = ref<{ label: string; value: string | number }[]>([]);
+const instrumentOptions = ref<{ label: string; value: string | number }[]>([]);
 
 async function fetchRidOptions(searchText?: string) {
   const params: any = {};
@@ -96,6 +98,26 @@
 
 function handleRidSelectSearch(query: string) {
   fetchRidOptions(query);
+}
+
+async function fetchInstrumentOptions(searchText?: string) {
+  const params: any = {};
+  if (searchText) {
+    params.instrumentName = searchText;
+  }
+  const { data } = await fetchGetInstrumentList(params);
+  if (data && data.rows) {
+    instrumentOptions.value = data.rows.map(item => ({
+      label: item.instrumentName,
+      value: item.instrumentCode
+    }));
+  } else {
+    instrumentOptions.value = [];
+  }
+}
+
+function handleInstrumentSelectSearch(query: string) {
+  fetchInstrumentOptions(query);
 }
 
 
@@ -139,6 +161,8 @@
 
   // Fetch options for rid
   await fetchRidOptions();
+  // Fetch options for instrument
+  await fetchInstrumentOptions();
 
   if (props.operateType === 'add' && props.stdCode) {
     model.value.stdCode = props.stdCode;
@@ -202,7 +226,17 @@
         <NFormItem label="妫�楠岄」鎻忚堪" path="itemDes">
           <NInput v-model:value="model.itemDes" placeholder="璇疯緭鍏ユ楠岄」鎻忚堪" />
         </NFormItem>
-
+        <NFormItem label="妫�娴嬩华鍣�" path="instrumentCode">
+          <NSelect
+            v-model:value="model.instrumentCode"
+            :options="instrumentOptions"
+            placeholder="璇烽�夋嫨妫�娴嬩华鍣�"
+            clearable
+            filterable
+            @search="handleInstrumentSelectSearch"
+            @focus="() => fetchInstrumentOptions()"
+          />
+        </NFormItem>
         <NFormItem label="浠櫒鎻忚堪" path="instrumentDes">
           <NInput v-model:value="model.instrumentDes" placeholder="璇疯緭鍏ヤ华鍣ㄦ弿杩�" />
         </NFormItem>

--
Gitblit v1.9.3