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/judge-details/index.vue |  262 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 262 insertions(+), 0 deletions(-)

diff --git a/ruoyi-plus-soybean/src/views/qm/judge-details/index.vue b/ruoyi-plus-soybean/src/views/qm/judge-details/index.vue
new file mode 100644
index 0000000..a7aa061
--- /dev/null
+++ b/ruoyi-plus-soybean/src/views/qm/judge-details/index.vue
@@ -0,0 +1,262 @@
+<script setup lang="tsx">
+import { ref } from 'vue';
+import { NDivider } from 'naive-ui';
+import { fetchBatchDeleteJudgeDetails, fetchGetJudgeDetailsList } from '@/service/api/qm/judge-details';
+import { useAppStore } from '@/store/modules/app';
+import { useAuth } from '@/hooks/business/auth';
+import { useDownload } from '@/hooks/business/download';
+import { defaultTransform, useNaivePaginatedTable, useTableOperate } from '@/hooks/common/table';
+import { $t } from '@/locales';
+import ButtonIcon from '@/components/custom/button-icon.vue';
+import JudgeDetailsOperateDrawer from './modules/judge-details-operate-drawer.vue';
+import JudgeDetailsSearch from './modules/judge-details-search.vue';
+
+defineOptions({
+  name: 'JudgeDetailsList'
+});
+
+
+const appStore = useAppStore();
+const { download } = useDownload();
+const { hasAuth } = useAuth();
+
+const searchParams = ref<Api.Qm.JudgeDetailsSearchParams>({
+  pageNum: 1,
+  pageSize: 10,
+  judgeId: null,
+  itemCod: null,
+  itemName: null,
+  cls: null,
+  ismix: null,
+  params: {}
+});
+
+const { columns, columnChecks, data, getData, getDataByPage, loading, mobilePagination, scrollX } =
+  useNaivePaginatedTable({
+  api: () => fetchGetJudgeDetailsList(searchParams.value),
+  transform: response => defaultTransform(response),
+  onPaginationParamsChange: params => {
+    searchParams.value.pageNum = params.page;
+    searchParams.value.pageSize = params.pageSize;
+  },
+  columns: () => [
+    {
+      type: 'selection',
+      align: 'center',
+      width: 48
+    },
+    {
+      key: 'index',
+      title: $t('common.index'),
+      align: 'center',
+      width: 64,
+      render: (_, index) => index + 1
+    },
+    {
+      key: 'judgeId',
+      title: '鍒ゅ畾涓绘爣璇�',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'itemCod',
+      title: '鍒ゅ畾椤笽TEM',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'itemName',
+      title: '鍒ゅ畾椤筃AME',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'value3',
+      title: '鏍囧噯鍊�',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'value1',
+      title: '鍒ゅ畾鍊�1',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'value2',
+      title: '鍒ゅ畾鍊�2',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'location',
+      title: '缂洪櫡浣嶇疆',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'cls',
+      title: '鍒ゅ畾绾у埆 (A,B,C,D)',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'stdscore',
+      title: '鍒嗗�兼爣鍑� (鎵e垎鏍囧噯锛屽緱鍒嗘爣鍑�),姣斿涓嶅悎鏍间竴娆℃墸澶氬皯鍒�',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'ismix',
+      title: '鏍囪姝ら」鏄惁涓哄悎鎴愰」鐩紝姣斿澶栬锛屽疄闄呬笂鍏宠仈浜嗗緢澶氬瓙椤圭洰',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'rid',
+      title: '鑻ユ瀛楁鏈塙UID鍊硷紝琛ㄦ槑瀹冨彲鑳戒负鍏朵粬椤圭洰鐨勫瓙椤癸紝姣斿鈥滅┖澶粹��,瀹冧负鐑熸敮澶栬椤圭洰鐨勫瓙椤�',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'category',
+      title: '鑼冨洿-澶囩敤',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'decisionDes',
+      title: '澶囨敞',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'updateUser',
+      title: '淇敼浜�',
+      align: 'center',
+      minWidth: 120
+    },
+    {
+      key: 'operate',
+      title: $t('common.operate'),
+      align: 'center',
+      width: 130,
+      render: row => {
+        const divider = () => {
+          if (!hasAuth('qm:judgeDetails:edit') || !hasAuth('qm:judgeDetails:remove')) {
+            return null;
+          }
+          return <NDivider vertical />;
+        };
+
+        const editBtn = () => {
+          if (!hasAuth('qm:judgeDetails:edit')) {
+            return null;
+          }
+          return (
+            <ButtonIcon
+              text
+              type="primary"
+              icon="material-symbols:drive-file-rename-outline-outline"
+              tooltipContent={$t('common.edit')}
+              onClick={() => edit(row.id)}
+            />
+          );
+        };
+
+        const deleteBtn = () => {
+          if (!hasAuth('qm:judgeDetails:remove')) {
+            return null;
+          }
+          return (
+            <ButtonIcon
+              text
+              type="error"
+              icon="material-symbols:delete-outline"
+              tooltipContent={$t('common.delete')}
+              popconfirmContent={$t('common.confirmDelete')}
+              onPositiveClick={() => handleDelete(row.id)}
+            />
+          );
+        };
+
+        return (
+          <div class="flex-center gap-8px">
+            {editBtn()}
+            {divider()}
+            {deleteBtn()}
+          </div>
+        );
+      }
+    }
+  ]
+});
+
+const { drawerVisible, operateType, editingData, handleAdd, handleEdit, checkedRowKeys, onBatchDeleted, onDeleted } =
+  useTableOperate(data, 'id', getData);
+
+async function handleBatchDelete() {
+  // request
+  const { error } = await fetchBatchDeleteJudgeDetails(checkedRowKeys.value);
+  if (error) return;
+  onBatchDeleted();
+}
+
+async function handleDelete(id: CommonType.IdType) {
+  // request
+  const { error } = await fetchBatchDeleteJudgeDetails([id]);
+  if (error) return;
+  onDeleted();
+}
+
+function edit(id: CommonType.IdType) {
+  handleEdit(id);
+}
+
+function handleExport() {
+  download('/qm/judgeDetails/export', searchParams.value, `鍒ゅ畾妯℃澘鏄庣粏_${new Date().getTime()}.xlsx`);
+}
+</script>
+
+<template>
+  <div class="min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto">
+    <JudgeDetailsSearch v-model:model="searchParams" @search="getDataByPage" />
+    <NCard title="鍒ゅ畾妯℃澘鏄庣粏鍒楄〃" :bordered="false" size="small" class="card-wrapper sm:flex-1-hidden">
+      <template #header-extra>
+        <TableHeaderOperation
+          v-model:columns="columnChecks"
+          :disabled-delete="checkedRowKeys.length === 0"
+          :loading="loading"
+          :show-add="hasAuth('qm:judgeDetails:add')"
+          :show-delete="hasAuth('qm:judgeDetails:remove')"
+          :show-export="hasAuth('qm:judgeDetails:export')"
+          @add="handleAdd"
+          @delete="handleBatchDelete"
+          @export="handleExport"
+          @refresh="getData"
+        />
+      </template>
+      <NDataTable
+        v-model:checked-row-keys="checkedRowKeys"
+        :columns="columns"
+        :data="data"
+        size="small"
+        :flex-height="!appStore.isMobile"
+        :scroll-x="scrollX"
+        :loading="loading"
+        remote
+        :row-key="row => row.id"
+        :pagination="mobilePagination"
+        class="sm:h-full"
+      />
+      <JudgeDetailsOperateDrawer
+        v-model:visible="drawerVisible"
+        :operate-type="operateType"
+        :row-data="editingData"
+        @submitted="getDataByPage"
+      />
+    </NCard>
+  </div>
+</template>
+
+<style scoped></style>

--
Gitblit v1.9.3