yangg 8 сар өмнө
parent
commit
6fd8751000
50 өөрчлөгдсөн 1165 нэмэгдсэн , 81 устгасан
  1. 1 1
      .env.development
  2. 0 0
      dist/index.html
  3. 0 1
      dist/static/css/chunk-1fc7ba22.efe80884.css
  4. 1 0
      dist/static/css/chunk-4552e990.8677f655.css
  5. 0 0
      dist/static/css/chunk-4c2b6424.775a21e3.css
  6. 0 0
      dist/static/css/chunk-5d225980.01443ad7.css
  7. 0 0
      dist/static/css/chunk-6ccd69af.38ae0502.css
  8. 0 0
      dist/static/js/app.3c15f597.js
  9. 0 0
      dist/static/js/chunk-0ec56e2a.91db65cf.js
  10. 0 0
      dist/static/js/chunk-10bfc27e.ebc46c0d.js
  11. 0 0
      dist/static/js/chunk-11ff1a32.e2ba12cb.js
  12. 0 0
      dist/static/js/chunk-138f7583.79cc62e6.js
  13. 0 0
      dist/static/js/chunk-1fc7ba22.2d6a2c05.js
  14. 0 0
      dist/static/js/chunk-23008ed8.9411633c.js
  15. 0 0
      dist/static/js/chunk-2d0d3705.21f5449a.js
  16. 0 0
      dist/static/js/chunk-35464144.0be55ba7.js
  17. 0 0
      dist/static/js/chunk-386d37cb.eee59c8f.js
  18. 0 0
      dist/static/js/chunk-41b10f99.13e73ca8.js
  19. 0 0
      dist/static/js/chunk-43013872.bc592c8a.js
  20. 0 0
      dist/static/js/chunk-44eee83d.66a17293.js
  21. 0 0
      dist/static/js/chunk-4552e990.e867adf7.js
  22. 0 0
      dist/static/js/chunk-4ac7f82e.1163ea78.js
  23. 1 1
      dist/static/js/chunk-4c2b6424.fa10b857.js
  24. 0 0
      dist/static/js/chunk-52f685c2.15c78ebe.js
  25. 0 0
      dist/static/js/chunk-5a3bdf57.8395308d.js
  26. 0 0
      dist/static/js/chunk-5d225980.b4e22967.js
  27. 0 0
      dist/static/js/chunk-61ace01d.7385a321.js
  28. 0 0
      dist/static/js/chunk-647b97bd.2adf3224.js
  29. 0 0
      dist/static/js/chunk-6a80e4ca.616f6b07.js
  30. 0 0
      dist/static/js/chunk-6ccd69af.2bd3a865.js
  31. 0 0
      dist/static/js/chunk-6ddf6871.db561e80.js
  32. 0 0
      dist/static/js/chunk-708604c0.f07d9e96.js
  33. 0 0
      dist/static/js/chunk-712c0160.a84727d1.js
  34. 0 0
      dist/static/js/chunk-7a88741c.1640940a.js
  35. 0 0
      dist/static/js/chunk-7dbc1954.8917e30b.js
  36. 0 0
      dist/static/js/chunk-9235c1ae.79d4525f.js
  37. 0 0
      dist/static/js/chunk-a577192a.26c9ea20.js
  38. 0 0
      dist/static/js/chunk-c5d7799a.24c180eb.js
  39. 0 0
      dist/static/js/chunk-ca61fc30.a8fd7d2a.js
  40. 0 0
      dist/static/js/chunk-d09dbc1a.e2555748.js
  41. 0 0
      dist/static/js/chunk-d4c547ca.c01646be.js
  42. 0 0
      dist/static/js/chunk-libs.bbc2abc2.js
  43. 2 0
      package.json
  44. 109 0
      src/api/knowledge.js
  45. 367 1
      src/views/dashboard/admin/components/LineChart.vue
  46. 100 0
      src/views/dashboard/admin/components/instruChart.vue
  47. 8 0
      src/views/dashboard/admin/index.vue
  48. 6 3
      src/views/knowledgeMenu/category/knowledgeSet.vue
  49. 175 74
      src/views/middPage/index.vue
  50. 395 0
      src/views/middPage/list.vue

+ 1 - 1
.env.development

@@ -2,5 +2,5 @@
 ENV = 'development'
 port = 8080
 # base api
-VUE_APP_BASE_API = 'http://192.168.1.200:8084'
+VUE_APP_BASE_API = 'http://192.168.1.188:8084'
 #192.168.1.200

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/index.html


+ 0 - 1
dist/static/css/chunk-1fc7ba22.efe80884.css

@@ -1 +0,0 @@
-.midd-page[data-v-1b93a10c]{padding:20px}.el-icon-edit[data-v-1b93a10c]{font-size:14px;color:#409eff}[data-v-1b93a10c] .model-gen-1{background-color:#e6f3ff!important}[data-v-1b93a10c] .model-gen-1.el-table__cell{background-color:#e6f3ff!important;color:#333!important}[data-v-1b93a10c] .model-gen-2{background-color:#f0e6ff!important}[data-v-1b93a10c] .model-gen-2.el-table__cell{background-color:#f0e6ff!important;color:#333!important}

+ 1 - 0
dist/static/css/chunk-4552e990.8677f655.css

@@ -0,0 +1 @@
+.midd-page[data-v-e429baea]{padding:20px}.el-icon-edit[data-v-e429baea]{font-size:14px;color:#409eff}[data-v-e429baea] .model-gen-1{background-color:#e6f3ff!important}[data-v-e429baea] .model-gen-1.el-table__cell{background-color:#e6f3ff!important;color:#333!important}[data-v-e429baea] .model-gen-2{background-color:#f0e6ff!important}[data-v-e429baea] .model-gen-2.el-table__cell{background-color:#f0e6ff!important;color:#333!important}.header[data-v-e429baea]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:15px 0}.h_left p[data-v-e429baea]{margin-top:0}.search-container[data-v-e429baea]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.search-box[data-v-e429baea]{width:350px}.custom-search-input[data-v-e429baea] :deep(.el-input__inner){height:40px;line-height:40px;border-right:none;border-radius:4px 0 0 4px}.custom-search-input[data-v-e429baea] :deep(.el-input-group__append){padding:0;border:none;background-color:transparent}.custom-search-input[data-v-e429baea] :deep(.el-input-group__append .el-button){height:40px;padding:0 20px;border-radius:0 4px 4px 0;margin:0}.custom-search-input[data-v-e429baea] :deep(.el-input__inner:hover){border-color:#dcdfe6}.custom-search-input[data-v-e429baea] :deep(.el-input__inner:focus){border-color:#409eff}

+ 0 - 0
dist/static/css/chunk-05d6d838.775a21e3.css → dist/static/css/chunk-4c2b6424.775a21e3.css


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/css/chunk-5d225980.01443ad7.css


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/css/chunk-6ccd69af.38ae0502.css


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/app.3c15f597.js


+ 0 - 0
dist/static/js/chunk-0ec56e2a.55afe8c8.js → dist/static/js/chunk-0ec56e2a.91db65cf.js


+ 0 - 0
dist/static/js/chunk-10bfc27e.e798ff81.js → dist/static/js/chunk-10bfc27e.ebc46c0d.js


+ 0 - 0
dist/static/js/chunk-11ff1a32.da4246f8.js → dist/static/js/chunk-11ff1a32.e2ba12cb.js


+ 0 - 0
dist/static/js/chunk-138f7583.c5a8883a.js → dist/static/js/chunk-138f7583.79cc62e6.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-1fc7ba22.2d6a2c05.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-23008ed8.9411633c.js


+ 0 - 0
dist/static/js/chunk-2d0d3705.ba054746.js → dist/static/js/chunk-2d0d3705.21f5449a.js


+ 0 - 0
dist/static/js/chunk-35464144.06b6d76b.js → dist/static/js/chunk-35464144.0be55ba7.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-386d37cb.eee59c8f.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-41b10f99.13e73ca8.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-43013872.bc592c8a.js


+ 0 - 0
dist/static/js/chunk-44eee83d.a824e28a.js → dist/static/js/chunk-44eee83d.66a17293.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-4552e990.e867adf7.js


+ 0 - 0
dist/static/js/chunk-4ac7f82e.05cbcffd.js → dist/static/js/chunk-4ac7f82e.1163ea78.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 1 - 1
dist/static/js/chunk-4c2b6424.fa10b857.js


+ 0 - 0
dist/static/js/chunk-52f685c2.8e5b8e14.js → dist/static/js/chunk-52f685c2.15c78ebe.js


+ 0 - 0
dist/static/js/chunk-5a3bdf57.f96a054d.js → dist/static/js/chunk-5a3bdf57.8395308d.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-5d225980.b4e22967.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-61ace01d.7385a321.js


+ 0 - 0
dist/static/js/chunk-647b97bd.e3ffac00.js → dist/static/js/chunk-647b97bd.2adf3224.js


+ 0 - 0
dist/static/js/chunk-6a80e4ca.5bc8e6ad.js → dist/static/js/chunk-6a80e4ca.616f6b07.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-6ccd69af.2bd3a865.js


+ 0 - 0
dist/static/js/chunk-6ddf6871.2e1a7a38.js → dist/static/js/chunk-6ddf6871.db561e80.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-708604c0.f07d9e96.js


+ 0 - 0
dist/static/js/chunk-712c0160.4836b10d.js → dist/static/js/chunk-712c0160.a84727d1.js


+ 0 - 0
dist/static/js/chunk-7a88741c.2e893504.js → dist/static/js/chunk-7a88741c.1640940a.js


+ 0 - 0
dist/static/js/chunk-7dbc1954.f1c0b808.js → dist/static/js/chunk-7dbc1954.8917e30b.js


+ 0 - 0
dist/static/js/chunk-9235c1ae.2513ea0a.js → dist/static/js/chunk-9235c1ae.79d4525f.js


+ 0 - 0
dist/static/js/chunk-a577192a.c8743a89.js → dist/static/js/chunk-a577192a.26c9ea20.js


+ 0 - 0
dist/static/js/chunk-c5d7799a.b8bef5a1.js → dist/static/js/chunk-c5d7799a.24c180eb.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-ca61fc30.a8fd7d2a.js


+ 0 - 0
dist/static/js/chunk-d09dbc1a.24b73683.js → dist/static/js/chunk-d09dbc1a.e2555748.js


+ 0 - 0
dist/static/js/chunk-d4c547ca.07306676.js → dist/static/js/chunk-d4c547ca.c01646be.js


+ 0 - 0
dist/static/js/chunk-libs.e0ce3055.js → dist/static/js/chunk-libs.bbc2abc2.js


+ 2 - 0
package.json

@@ -15,6 +15,7 @@
     "test:ci": "npm run lint && npm run test:unit"
   },
   "dependencies": {
+    "@amcharts/amcharts5": "^5.10.7",
     "@handsontable-pro/vue": "^3.1.1",
     "@handsontable/vue": "^14.1.0",
     "@jiaminghi/data-view": "^2.10.0",
@@ -46,6 +47,7 @@
     "jspdf": "^2.5.1",
     "jszip": "^3.2.1",
     "jszip-utils": "^0.1.0",
+    "lodash-es": "^4.17.21",
     "luckyexcel": "^1.0.1",
     "luckysheet": "^2.1.13",
     "mammoth": "^1.8.0",

+ 109 - 0
src/api/knowledge.js

@@ -311,4 +311,113 @@ export function configDelete(data) {
       method: 'post',
       data
     })
+  } 
+  /* 获取GPU数据 /machines/gpu-info/*/
+
+  export function gpu_info(data) {
+    return request({
+      url: '/machines/gpu-info/',
+      method: 'get',
+      data
+    })
+  } 
+
+   /* 列表 literature-data/list/ */
+
+   export function GET_list(data) {
+    return request({
+      url: 'literature-data/list/',
+      method: 'post',
+      data
+    })
+  } 
+  
+  /* /literature-data/sync/ */
+
+  export function GET_sync(data) {
+    return request({
+      url: '/literature-data/sync/',
+      method: 'post',
+      data
+    })
+  } 
+
+  /* mq利用率 */
+
+  export function GET_Rbq(data) {
+    return request({
+      url: '/rabbitmq/info/',
+      method: 'get',
+      data
+    })
+  } 
+
+  /* 获取解析进度 */
+
+  export function getdocpro(data) {
+    return request({
+      url: '/kbm/getdocpro',
+      method: 'post',
+      data
+    })
+  } 
+
+  /* 获取解析结果  */
+  
+  export function getDetail(data) {
+    return request({
+      url: '/literature-data/detail/',
+      method: 'post',
+      data
+    })
+  } 
+
+  /* 新增标签 */
+
+  export function add_tags(data) {
+    return request({
+      url: '/literature-tags/add_tags/',
+      method: 'post',
+      data
+    })
+  } 
+
+  /* 获取标签 */
+
+  export function get_literature_tags(data) {
+    return request({
+      url: '/literature-tags/get_literature_tags/',
+      method: 'get',
+      data
+    })
+  } 
+
+  /* 删除 */
+
+  export function remove_tags(data) {
+    return request({
+      url: '/literature-tags/remove_tags/',
+      method: 'post',
+      data
+    })
+  } 
+
+  /* 搜索 */
+
+  export function search_tags(data) {
+    return request({
+      url: '/literature-tags/search_tags/',
+      method: 'post',
+      data
+    })
+  } 
+
+  /* 编辑  */
+
+  export function edit_tags(data) {
+    return request({
+      url: '/literature-tags/edit_tags/',
+      method: 'post',
+      data
+    })
   } 

+ 367 - 1
src/views/dashboard/admin/components/LineChart.vue

@@ -1,4 +1,4 @@
-<template>
+<!-- <template>
   <div :class="className" :style="{height:height,width:width}" />
 </template>
 
@@ -133,3 +133,369 @@ export default {
   }
 }
 </script>
+ -->
+
+ 
+ <template>
+  <div ref="chartDiv" style="width: 100%; height: 350px"></div>
+</template>
+
+<script>
+import { gpu_info } from "@/api/knowledge";
+import * as am5 from "@amcharts/amcharts5";
+import * as am5xy from "@amcharts/amcharts5/xy";
+import am5themes_Animated from "@amcharts/amcharts5/themes/Animated";
+
+export default {
+  name: "AmAreaChart",
+  props: {
+    className: {
+      type: String,
+      default: 'chart'
+    },
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '350px'
+    },
+    autoResize: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data() {
+    return {
+      chart: null,
+      root: null,
+      series1: null,
+      series2: null,
+      xAxis: null,
+      data1: [],
+      data2: [],
+      timer: null,
+      isDestroyed: false,
+      isOnDashboard:false
+    };
+  },
+  watch: {
+    $route: {
+      immediate: true,
+      handler(newRoute) {
+        this.isOnDashboard = newRoute.path === '/dashboard';
+        if (this.isOnDashboard) {
+          this.startLiveData();
+        } else {
+          this.stopLiveData();
+        }
+      }
+    }
+  },
+  mounted() {
+    this.initChart();
+    if (this.isOnDashboard) {
+      this.startLiveData();
+    }
+  },
+  beforeDestroy() {
+    this.cleanupResources();
+  },
+  methods: {
+    initChart() {
+      try {
+        const root = (this.root = am5.Root.new(this.$refs.chartDiv));
+        root.setThemes([am5themes_Animated.new(root)]);
+
+        // 创建图表
+        this.chart = root.container.children.push(
+          am5xy.XYChart.new(root, {
+            panX: true,
+            panY: true,
+            wheelX: "panX",
+            wheelY: "zoomX",
+            pinchZoomX: true,
+          })
+        );
+
+        // 创建Y轴
+        let yAxis = this.chart.yAxes.push(
+          am5xy.ValueAxis.new(root, {
+            renderer: am5xy.AxisRendererY.new(root, {
+              labelFormat: "{value}%"
+            }),
+            min: 0,
+            max: 100
+          })
+        );
+
+        // 创建X轴
+        this.xAxis = this.chart.xAxes.push(
+          am5xy.DateAxis.new(root, {
+            baseInterval: { timeUnit: "second", count: 1 },
+            renderer: am5xy.AxisRendererX.new(root, {
+              minGridDistance: 100, // 增加标签之间的最小距离
+              cellStartLocation: 0.2,
+              cellEndLocation: 0.8,
+              dateFormats: {
+                second: "mm:ss",
+                minute: "mm:ss"
+              },
+              periodChangeDateFormats: {
+                second: "mm:ss",
+                minute: "mm:ss"
+              },
+              // 减少标签数量
+              maxDeviation: 0.5,
+              // 只显示首尾和少量中间的标签
+              minLabelGap: 50
+            }),
+            // 控制要显示的标签数量
+            gridIntervals: [
+              { timeUnit: "second", count: 5 } // 每5秒显示一个标签
+            ],
+            // 确保时间轴平滑滚动
+            interpolationDuration: 500,
+            interpolationEasing: am5.ease.cubic
+          })
+        );
+
+        // 创建第一条线(expected)
+        this.series1 = this.chart.series.push(
+          am5xy.SmoothedXLineSeries.new(root, {
+            name: "GPU",
+            xAxis: this.xAxis,
+            yAxis: yAxis,
+            valueYField: "value",
+            valueXField: "date",
+            tension: 0.8,
+            stroke: am5.color("#FF005A"),
+            strokeWidth: 3,
+            tooltip: am5.Tooltip.new(root, {
+              labelText: "{name}: {valueY}%"
+            })
+          })
+        );
+
+        // 创建第二条线(actual)
+        this.series2 = this.chart.series.push(
+          am5xy.SmoothedXLineSeries.new(root, {
+            name: "CPU",
+            xAxis: this.xAxis,
+            yAxis: yAxis,
+            valueYField: "value",
+            valueXField: "date",
+            tension: 0.8,
+            stroke: am5.color("#3888fa"),
+            strokeWidth: 3,
+            fill: am5.color("#f3f8ff"),
+            tooltip: am5.Tooltip.new(root, {
+              labelText: "{name}: {valueY}%"
+            })
+          })
+        );
+
+        // 添加图例
+        const legend = this.chart.children.push(
+          am5.Legend.new(root, {
+            centerX: am5.percent(50),
+            x: am5.percent(50),
+            layout: root.horizontalLayout
+          })
+        );
+        legend.data.setAll(this.chart.series.values);
+
+        // 启用动画
+        this.series1.appear(1000);
+        this.series2.appear(1000);
+        this.chart.appear(1000, 100);
+
+        // 为 series1 添加圆点
+        this.series1.bullets.push((root) => {
+          const container = am5.Container.new(root, {});
+
+          // 创建光晕效果(外圈)
+          const halo = am5.Circle.new(root, {
+            radius: 12,
+            fill: am5.color("#FF005A"),
+            fillOpacity: 0.3,
+            stroke: am5.color("#FF005A"),
+            strokeOpacity: 0.3,
+            strokeWidth: 2
+          });
+
+          // 创建主圆点(内圈)
+          const circle = am5.Circle.new(root, {
+            radius: 6,
+            fill: am5.color("#FF005A"),
+            fillOpacity: 0.8,
+            stroke: am5.color("#fff"),
+            strokeWidth: 2
+          });
+
+          // 将两个圆形添加到容器
+          container.children.push(halo);
+          container.children.push(circle);
+
+          // 创建光晕的呼吸动画
+          halo.animate({
+            key: "radius",
+            from: 8,
+            to: 16,
+            duration: 1000,
+            loops: Infinity,
+            easing: am5.ease.cubic,
+            direction: "alternate"
+          });
+
+          halo.animate({
+            key: "fillOpacity",
+            from: 0.3,
+            to: 0.1,
+            duration: 1000,
+            loops: Infinity,
+            easing: am5.ease.cubic,
+            direction: "alternate"
+          });
+
+          return am5.Bullet.new(root, {
+            sprite: container
+          });
+        });
+
+        // 为 series2 添加圆点
+        this.series2.bullets.push((root) => {
+          const container = am5.Container.new(root, {});
+
+          // 创建光晕效果(外圈)
+          const halo = am5.Circle.new(root, {
+            radius: 12,
+            fill: am5.color("#3888fa"),
+            fillOpacity: 0.3,
+            stroke: am5.color("#3888fa"),
+            strokeOpacity: 0.3,
+            strokeWidth: 2
+          });
+
+          // 创建主圆点(内圈)
+          const circle = am5.Circle.new(root, {
+            radius: 6,
+            fill: am5.color("#3888fa"),
+            fillOpacity: 0.8,
+            stroke: am5.color("#fff"),
+            strokeWidth: 2
+          });
+
+          // 将两个圆形添加到容器
+          container.children.push(halo);
+          container.children.push(circle);
+
+          // 创建光晕的呼吸动画
+          halo.animate({
+            key: "radius",
+            from: 8,
+            to: 16,
+            duration: 1000,
+            loops: Infinity,
+            easing: am5.ease.cubic,
+            direction: "alternate"
+          });
+
+          halo.animate({
+            key: "fillOpacity",
+            from: 0.3,
+            to: 0.1,
+            duration: 1000,
+            loops: Infinity,
+            easing: am5.ease.cubic,
+            direction: "alternate"
+          });
+
+          return am5.Bullet.new(root, {
+            sprite: container
+          });
+        });
+
+      } catch (error) {
+        console.error("初始化图表时出错:", error);
+      }
+    },
+
+    async startLiveData() {
+      if (this.timer) {
+        clearInterval(this.timer);
+      }
+      this.stopLiveData();
+      this.timer = setInterval(async () => {
+        if (!this.isOnDashboard) {
+          this.stopLiveData();
+          return;
+        }
+        try {
+          const response = await gpu_info();
+          const currentTime = Date.now();
+
+          // 模拟两组数据
+          const expectedValue = Math.random() * 30 + 50;
+          const actualValue = response.data.data.cpu.total_usage;
+
+          // 更新数据
+          this.data1.push({
+            date: currentTime,
+            value: expectedValue
+          });
+          this.data2.push({
+            date: currentTime,
+            value: actualValue
+          });
+
+          // 保持固定数量的数据点
+          if (this.data1.length > 15) {
+            this.data1.shift();
+            this.data2.shift();
+          }
+
+          // 更新图表
+          this.series1.data.setAll(this.data1);
+          this.series2.data.setAll(this.data2);
+
+          // 更新X轴范围
+          if (this.data1.length > 1) {
+            this.xAxis.zoomToDates(
+              new Date(this.data1[0].date),
+              new Date(this.data1[this.data1.length - 1].date)
+            );
+          }
+
+        } catch (error) {
+          console.error("Failed to fetch data:", error);
+        }
+      }, 2000);
+    },
+
+    stopLiveData() {
+      if (this.timer) {
+        clearInterval(this.timer);
+        this.timer = null;
+      }
+    },
+    async cleanupResources() {
+      this.isDestroyed = true;
+      this.stopLiveData();
+      if (this.timer) {
+        clearInterval(this.timer);
+        this.timer = null;
+      }
+
+      if (this.root) {
+        this.root.dispose();
+      }
+    }
+  }
+};
+</script>
+
+
+
+

+ 100 - 0
src/views/dashboard/admin/components/instruChart.vue

@@ -0,0 +1,100 @@
+<template>
+    <div id="chartdiv"></div>
+  </template>
+    
+    <script>
+  import * as am5 from "@amcharts/amcharts5";
+  import * as am5percent from "@amcharts/amcharts5/percent";
+  import am5themes_Animated from "@amcharts/amcharts5/themes/Animated";
+  
+  export default {
+    name: "DoublePieChart",
+    data() {
+      return {
+        root: null,
+        chart: null,
+        series: null,  // 添加 series 到 data 中以便在其他方法中访问
+        currentValue: 0,  // 添加当前值的追踪
+        timer: null,      // 添加定时器引用
+        data: [],
+      };
+    },
+    mounted() {
+      this.initChart();
+    },
+    beforeDestroy() {
+      if (this.root) {
+        this.root.dispose();
+      }
+    },
+    methods: {
+      initChart() {
+        // Create root element
+        this.root = am5.Root.new("chartdiv");
+  
+        // Set themes
+        this.root.setThemes([am5themes_Animated.new(this.root)]);
+  
+        // Create chart
+        this.chart = this.root.container.children.push(
+          am5percent.PieChart.new(this.root, {
+            startAngle: 180,
+            endAngle: 360,
+            layout: this.root.verticalLayout,
+            innerRadius: am5.percent(80),
+          })
+        );
+  
+        // Create series
+        const series = this.chart.series.push(
+          am5percent.PieSeries.new(this.root, {
+            valueField: "value",
+            categoryField: "category",
+            startAngle: 180,
+            endAngle: 360,
+            radius: am5.percent(80), // 外圆半径
+            innerRadius: am5.percent(30), // 内圆半径,调小这个值会增加仪表的宽度
+          })
+        );
+  
+        // Set custom colors
+        series.set(
+          "colors",
+          am5.ColorSet.new(this.root, {
+            colors: [
+              am5.color("#19bcbf"), // completed color
+              am5.color(0xeeeeee), // remaining color
+            ],
+          })
+        );
+  
+        // Disable labels and ticks
+        series.labels.template.set("forceHidden", true);
+        series.ticks.template.set("forceHidden", true);
+  
+        // Add center label
+        this.chart.seriesContainer.children.push(
+          am5.Label.new(this.root, {
+            textAlign: "center",
+            centerY: am5.p50,
+            centerX: am5.p50,
+            text: "[fontSize:30px]90%[/]\n[fontSize:16px]Compiled Ticket[/]",
+          })
+        );
+  
+        // Set data
+        series.data.setAll([
+          { category: "Complete", value: 10 },
+          /*  { category: "Remaining", value: 1 }, */
+        ]);
+      },
+    },
+  };
+  </script>
+    
+    <style scoped>
+  #chartdiv {
+    width: 100%;
+    height: 150px;
+  }
+  </style>

+ 8 - 0
src/views/dashboard/admin/index.vue

@@ -4,6 +4,14 @@
 
     <!--  <panel-group @handleSetLineChartData="handleSetLineChartData" />-->
     <el-row :gutter="20">
+      <el-col style="margin-bottom: 20px;" :span="24">
+        <el-card class="box-card">
+          <div slot="header" class="clearfixs">
+            <span>GPU使用率</span>
+          </div>
+          <LineChart :data="chartData" style="height: 350px"></LineChart>
+        </el-card>
+      </el-col>
       <el-col :span="16">
         <el-card class="box-card">
           <div slot="header" class="clearfixs header_sel">

+ 6 - 3
src/views/knowledgeMenu/category/knowledgeSet.vue

@@ -176,7 +176,7 @@
                       effect="dark"
                       :content="
                         scope.row.run == 1 || scope.row.run == 5
-                          ? '解析中'
+                          ? `已解析数:${scope.row.progress}`
                           : '解析'
                       "
                       placement="top"
@@ -409,6 +409,7 @@ import {
   batchMove,
   selectType0,
   delDocumentList,
+  getdocpro
 } from "@/api/knowledge";
 export default {
   components: {
@@ -904,11 +905,13 @@ export default {
       }
 
       const checkStatus = () => {
-        getRunStatus({ document_id: row.id })
+        getdocpro({ document_id: row.id })
           .then((res) => {
             if (res.status === 200) {
-              const newStatus = Number(res.data.run);
+              const newStatus = Number(res.data.status);
+              const newProgress = Number(res.data.total_tasks);
               this.$set(row, "run", newStatus);
+              this.$set(row, "progress", newProgress);
 
               if (newStatus === 3) {
                 this.$message.success("解析成功");

+ 175 - 74
src/views/middPage/index.vue

@@ -1,9 +1,46 @@
 <template>
   <div class="midd-page">
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <el-tab-pane label="AED数据表" name="first">
+    <!-- <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="AED列表" name="first"> -->
+        <div class="header">
+          <div class="h_left">
+            <p class="current-doc">
+              当前数据表: {{ firstForm.currentDocument }}
+            </p>
+            <div class="search-box">
+              <el-input
+                v-model="firstForm.searchQuery"
+                placeholder="请输入搜索内容"
+                class="custom-search-input"
+                clearable
+                @clear="handleSearchClear"
+                @keyup.enter.native="handleSearch"
+              >
+                <template #append>
+                  <el-button
+                    type="primary"
+                    icon="el-icon-search"
+                    @click="handleSearch"
+                    >搜索</el-button
+                  >
+                </template>
+              </el-input>
+            </div>
+          </div>
+          <!-- <div class="h_right">
+            <el-pagination
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="firstForm.currentPage"
+              :page-size="firstForm.pageSize"
+              layout="total, prev, pager, next"
+              :total="firstForm.total"
+              >
+            </el-pagination>
+          </div> -->
+        </div>
         <el-table :data="firstTableData" style="width: 100%">
-          <el-table-column
+          <!-- <el-table-column
             label="工作类型"
             prop="workType"
             :filters="firstForm.workTypeFilters"
@@ -23,10 +60,10 @@
               </el-select>
               <span v-else>{{ scope.row.workType }}</span>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column
             label="项目"
-            prop="project"
+            prop="name"
             :filters="firstForm.projectFilters"
             :filter-method="firstFilterProject"
             filter-placement="bottom-end"
@@ -34,10 +71,10 @@
           >
             <template #default="scope">
               <el-input
-                v-model="scope.row.project"
+                v-model="scope.row.name"
                 v-if="scope.row.isEdit"
               ></el-input>
-              <span v-else>{{ scope.row.project }}</span>
+              <span v-else>{{ scope.row.name }}</span>
             </template>
           </el-table-column>
           <el-table-column label="说明" prop="description">
@@ -67,16 +104,16 @@
           </el-table-column>
           <el-table-column
             label="模型生成1"
-            prop="model1"
+            prop="generation_1"
             class-name="model-gen-1"
           >
             <template #default="scope">
               <el-input
-                v-model="scope.row.example"
+                v-model="scope.row.generation_1"
                 v-if="scope.row.isEdit"
               ></el-input>
               <span v-else>
-                {{ scope.row.model1 }}
+                {{ scope.row.generation_1 }}
                 <i
                   class="el-icon-refresh"
                   @click="openModel1Dialog(scope.row)"
@@ -87,16 +124,16 @@
           </el-table-column>
           <el-table-column
             label="模型生成2"
-            prop="model2"
+            prop="generation_2"
             class-name="model-gen-2"
           >
             <template #default="scope">
               <el-input
-                v-model="scope.row.model2"
+                v-model="scope.row.generation_2"
                 v-if="scope.row.isEdit"
               ></el-input>
               <span v-else>
-                {{ scope.row.model2 }}
+                {{ scope.row.generation_2 }}
                 <i
                   class="el-icon-refresh"
                   @click="openModel2Dialog(scope.row)"
@@ -130,7 +167,7 @@
                     >
                       <i class="el-icon-check"></i> 保存
                     </el-dropdown-item>
-                   <!--  <el-dropdown-item
+                    <!--  <el-dropdown-item
                       @click.native="firstHandleUpload(scope.$index, scope.row)"
                     >
                       <i class="el-icon-refresh"></i> 更新内容
@@ -152,8 +189,8 @@
           style="margin-top: 20px"
           >新增行</el-button
         >
-      </el-tab-pane>
-      <el-tab-pane label="SOTA数据表" name="second">
+    <!--   </el-tab-pane> -->
+     <!--  <el-tab-pane label="SOTA详情" name="second">
         <el-table :data="secondTableData" style="width: 100%">
           <el-table-column
             label="Identifier"
@@ -207,11 +244,6 @@
               ></el-input>
               <span v-else>
                 {{ scope.row.example }}
-                <!--  <i
-                  class="el-icon-edit"
-                  @click="openExampleDialog(scope.row)"
-                  style="cursor: pointer; margin-left: 5px"
-                ></i> -->
               </span>
             </template>
           </el-table-column>
@@ -249,11 +281,6 @@
                     >
                       <i class="el-icon-check"></i> 保存
                     </el-dropdown-item>
-                    <!--  <el-dropdown-item
-                      @click.native="secondHandleUpload(scope.$index, scope.row)"
-                    >
-                      <i class="el-icon-refresh"></i> 更新内容
-                    </el-dropdown-item> -->
                     <el-dropdown-item
                       @click.native="
                         secondHandleDelete(scope.$index, scope.row)
@@ -320,22 +347,6 @@
               <span v-else>{{ scope.row.description }}</span>
             </template>
           </el-table-column>
-          <!-- <el-table-column label="范例" prop="example">
-            <template #default="scope">
-              <el-input
-                v-model="scope.row.example"
-                v-if="scope.row.isEdit"
-              ></el-input>
-              <span v-else>
-                {{ scope.row.example }}
-                <i
-                  class="el-icon-edit"
-                  @click="openExampleDialog(scope.row)"
-                  style="cursor: pointer; margin-left: 5px"
-                ></i>
-              </span>
-            </template>
-          </el-table-column> -->
           <el-table-column label="操作" width="100">
             <template #default="scope">
               <el-dropdown trigger="click">
@@ -361,11 +372,6 @@
                     >
                       <i class="el-icon-check"></i> 保存
                     </el-dropdown-item>
-                    <!--  <el-dropdown-item
-                      @click.native="thirdHandleUpload(scope.$index, scope.row)"
-                    >
-                      <i class="el-icon-refresh"></i> 更新内容
-                    </el-dropdown-item> -->
                     <el-dropdown-item
                       @click.native="thirdHandleDelete(scope.$index, scope.row)"
                     >
@@ -383,8 +389,8 @@
           style="margin-top: 20px"
           >新增行</el-button
         >
-      </el-tab-pane>
-    </el-tabs>
+      </el-tab-pane> -->
+   <!--  </el-tabs> -->
 
     <el-dialog :visible.sync="dialogVisible" title="编辑范例" width="30%">
       <el-input v-model="currentExample" type="textarea" :rows="4"></el-input>
@@ -470,6 +476,7 @@
 </template>
   
   <script>
+import { getDetail } from "@/api/knowledge";
 export default {
   name: "MiddPage",
   data() {
@@ -477,7 +484,7 @@ export default {
       activeName: "first",
       firstForm: {
         tableData: [
-          {
+          /* {
             workType: "复制",
             project: "indication",
             description:
@@ -512,7 +519,7 @@ export default {
             model2:
               "Capillary blood by BMG;Venous blood by YSI(此处为CGM的替代疗法)",
             isEdit: false,
-          },
+          }, */
         ],
         workTypeFilters: [
           { text: "类型1", value: "type1" },
@@ -532,8 +539,13 @@ export default {
           prompt: "",
           modelValue: "",
         },
+        currentDocument: "AED数据表", // 当前文档名称
+        searchQuery: "", // 搜索关键词
+        currentPage: 1, // 当前页码
+        pageSize: 10, // 每页显示条数
+        total: 3, // 总条数
       },
-      secondForm: {
+     /*  secondForm: {
         tableData: [
           {
             workType: "SOTA-E1-01",
@@ -585,15 +597,6 @@ export default {
               "white non-hispanic: n=247;african american:n=25;hispanic or latino: n=34",
             isEdit: false,
           },
-          /*  {
-            workType: "总结和数据提取;",
-            project: "Alternative device(treatment)",
-            description:
-              "Device name + model name如无,可写疗法(以评价的器械的替代疗法)",
-            example:
-              "Capillary blood by BMG;Venous blood by YSI(此处为CGM的替代疗法)",
-            isEdit: false,
-          }, */
         ],
         workTypeFilters: [
           { text: "类型1", value: "type1" },
@@ -605,7 +608,7 @@ export default {
           workType: [],
           project: [],
         },
-      },
+      }, */
 
       dialogVisible: false,
       currentExample: "",
@@ -623,7 +626,7 @@ export default {
         );
       });
     },
-    secondTableData() {
+    /* secondTableData() {
       return this.secondForm.tableData.filter((data) => {
         return (
           (!this.secondForm.activeFilters.workType.length ||
@@ -642,14 +645,18 @@ export default {
             this.thirdForm.activeFilters.project.includes(data.project))
         );
       });
-    },
+    }, */
   },
   created() {
     this.updateProjectFilters();
   },
+  mounted() {
+    this.firstForm.currentDocument=this.$route.query.name
+    this.firstInit();
+  },
   methods: {
     /* SOTA汇总表(第三) */
-    thirdHandleEdit(index, row) {
+   /*  thirdHandleEdit(index, row) {
       row.isEdit = true;
     },
     thirdHandleSave(index, row) {
@@ -685,9 +692,9 @@ export default {
         text: project,
         value: project,
       }));
-    },
+    }, */
     /* SOTA数据表(第二) */
-    secondHandleEdit(index, row) {
+   /*  secondHandleEdit(index, row) {
       row.isEdit = true;
     },
     secondHandleSave(index, row) {
@@ -723,7 +730,7 @@ export default {
         text: project,
         value: project,
       }));
-    },
+    }, */
     /* AED数据表(第一) 操作事件*/
     openExampleDialog(row) {
       this.dialogVisible = true;
@@ -755,16 +762,16 @@ export default {
 
     // 打开模型1对话框
     openModel1Dialog(row) {
-      this.firstForm.firstAiForm.application='app1'
-      this.firstForm.firstAiForm.description=row.description
-      this.firstForm.dialogVisible=true
+      this.firstForm.firstAiForm.application = "app1";
+      this.firstForm.firstAiForm.description = row.description;
+      this.firstForm.dialogVisible = true;
     },
 
     // 打开模型2对话框
     openModel2Dialog(row) {
-      this.firstForm.firstAiForm.application='app2'
-      this.firstForm.firstAiForm.description=row.description
-      this.firstForm.dialogVisible=true
+      this.firstForm.firstAiForm.application = "app2";
+      this.firstForm.firstAiForm.description = row.description;
+      this.firstForm.dialogVisible = true;
     },
 
     // 获取更新内容的方法(需要根据实际API进行修改)
@@ -838,7 +845,51 @@ export default {
         value: project,
       }));
     },
+    /* 搜索逻辑 */
+    handleSearch() {
+      // 实现搜索逻辑
+      const query = this.firstForm.searchQuery.toLowerCase();
+      const filteredData = this.firstForm.tableData.filter((item) => {
+        return Object.values(item).some((value) =>
+          String(value).toLowerCase().includes(query)
+        );
+      });
+      this.total = filteredData.length;
+      // 更新表格数据
+    },
+
+    handleSearchClear() {
+      this.firstForm.searchQuery = "";
+      this.handleSearch();
+    },
+
+    handleSizeChange(val) {
+      this.firstForm.pageSize = val;
+      this.handleSearch();
+    },
+
+    handleCurrentChange(val) {
+      this.firstForm.currentPage = val;
+      this.handleSearch();
+    },
+
     handleClick() {},
+    /* 获取详细信息 */
+    async firstInit() {
+      const res = await getDetail({ id: this.$route.query.id });
+      console.log("详情数据:", res.data);
+
+      // Transform data into array of objects with name property
+      const processedData = Object.entries(res.data)
+        .filter(([key]) => !["id", "create_time", "update_time"].includes(key)) // Exclude non-field properties
+        .map(([key, value]) => ({
+          name: key,
+          isEdit:false,
+          ...value,
+        }));
+        console.log(processedData);
+        this.firstForm.tableData=processedData;
+    },
   },
   watch: {
     tableData: {
@@ -876,4 +927,54 @@ export default {
   background-color: #f0e6ff !important;
   color: #333333 !important; /* 深色文字确保可读性 */
 }
+
+.header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin: 15px 0;
+}
+.h_left p {
+  margin-top: 0px;
+}
+.search-container {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.search-box {
+  width: 350px; /* 可以根据需要调整宽度 */
+}
+
+/* 自定义输入框样式 */
+.custom-search-input :deep(.el-input__inner) {
+  height: 40px;
+  line-height: 40px;
+  border-right: none;
+  border-radius: 4px 0 0 4px;
+}
+
+/* 自定义搜索按钮样式 */
+.custom-search-input :deep(.el-input-group__append) {
+  padding: 0;
+  border: none;
+  background-color: transparent;
+}
+
+.custom-search-input :deep(.el-input-group__append .el-button) {
+  height: 40px;
+  padding: 0 20px;
+  border-radius: 0 4px 4px 0;
+  margin: 0;
+}
+
+/* 悬停效果 */
+.custom-search-input :deep(.el-input__inner:hover) {
+  border-color: #dcdfe6;
+}
+
+.custom-search-input :deep(.el-input__inner:focus) {
+  border-color: #409eff;
+}
 </style>

+ 395 - 0
src/views/middPage/list.vue

@@ -0,0 +1,395 @@
+<template>
+    <div class="gpu-list">
+      <!-- 顶部筛选区域 -->
+      <div class="filter-section">
+        <el-select
+          v-model="selectedBucket"
+          placeholder="请选择知识库"
+          @change="handleBucketChange"
+        >
+          <el-option
+            v-for="item in buckets"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id"
+          />
+        </el-select>
+  
+        <el-select
+          v-model="selectedType"
+          placeholder="请选择目录"
+          :disabled="!selectedBucket"
+          class="ml-15"
+        >
+          <el-option
+            v-for="item in types"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id"
+          />
+        </el-select>
+  
+        <el-button
+          type="primary"
+          :loading="isSyncing"
+          :disabled="!selectedType"
+          class="ml-15"
+          @click="handleSyncData"
+        >
+          {{ isSyncing ? "同步中..." : "同步数据" }}
+        </el-button>
+      </div>
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <!-- 原有的文献列表 tab -->
+        <el-tab-pane label="文献列表" name="first">
+          <!-- 添加搜索表单 -->
+          <div class="search-form">
+            <el-form :inline="true" :model="searchForm" class="demo-form-inline" label-width="100px">
+              <el-form-item label="创建时间:">
+                <el-date-picker
+                  v-model="searchForm.createTimeRange"
+                  type="daterange"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                  value-format="YYYY-MM-DD"
+                />
+              </el-form-item>
+              <el-form-item label="文本时间:">
+                <el-date-picker
+                  v-model="searchForm.textTimeRange"
+                  type="daterange"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                  value-format="YYYY-MM-DD"
+                />
+              </el-form-item>
+              <el-form-item label="标签:">
+                <el-input
+                  v-model="searchForm.tag"
+                  placeholder="请输入标签关键词"
+                  clearable
+                />
+              </el-form-item>
+              <el-form-item>
+                <el-button type="primary" @click="handleSearch">搜索</el-button>
+                <el-button @click="resetSearch">重置</el-button>
+              </el-form-item>
+            </el-form>
+          </div>
+          <!-- 数据表格区域 -->
+          <el-table v-loading="isLoading" :data="gpuList" style="width: 100%">
+            <el-table-column prop="id" label="ID" />
+            <el-table-column prop="name" label="名称">
+              <template #default="{ row }">
+                <el-link @click="handleNameClick(row)">{{ row.name }}</el-link>
+              </template>
+            </el-table-column>
+            <el-table-column prop="type" label="文档类型" />
+            <el-table-column prop="status" label="处理状态">
+              <template #default="{ row }">
+                <el-tag :type="getStatusType(row.status)">
+                  {{ getStatusText(row.status) }}
+                </el-tag>
+              </template>
+            </el-table-column>
+          </el-table>
+  
+          <!-- 分页器 -->
+          <el-pagination
+            class="pagination"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 50, 100]"
+            :page-size="pageSize"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="total"
+          />
+        </el-tab-pane>
+  
+        <!-- 添加 SOTA详情 tab -->
+        <el-tab-pane label="SOTA详情" name="second">
+          <el-table :data="sotaDetailsList" style="width: 100%">
+            <el-table-column label="Identifier" prop="identifier" />
+            <el-table-column label="Device" prop="device" />
+            <el-table-column label="Outcomes" prop="outcomes" />
+            <el-table-column label="Unit for analysis" prop="unit" />
+            <el-table-column label="Mean" prop="mean" />
+            <!-- 操作列与原有类似 -->
+          </el-table>
+        </el-tab-pane>
+  
+        <!-- 添加 SOTA汇总表 tab -->
+        <el-tab-pane label="SOTA汇总表" name="third">
+          <el-table :data="sotaSummaryList" style="width: 100%">
+            <el-table-column label="Summary" prop="summary" />
+            <el-table-column label="EqMD" prop="eqmd" />
+            <el-table-column label="Pain:VAS" prop="painVas" />
+            <!-- 操作列与原有类似 -->
+          </el-table>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+  </template>
+  
+  <script>
+  import { debounce } from "lodash-es";
+  import {
+    GET_list,
+    GET_sync,
+    listBuckets,
+    selectTypeList,
+    getDetail,
+  } from "@/api/knowledge";
+  
+  // 状态映射表
+  const STATUS_MAP = {
+    1: { text: "未处理", type: "info" },
+    2: { text: "已审核", type: "warning" },
+    3: { text: "已处理", type: "success" },
+    4: { text: "已作废", type: "danger" },
+    5: { text: "使用中", type: "primary" },
+  };
+  
+  export default {
+    name: "GpuList",
+  
+    data() {
+      return {
+        gpuList: [],
+        currentPage: 1,
+        pageSize: 10,
+        total: 0,
+        isLoading: false,
+        isSyncing: false,
+        buckets: [],
+        types: [],
+        selectedBucket: null,
+        selectedType: null,
+        activeName: "first", // 当前激活的tab
+        sotaDetailsList: [], // SOTA详情列表数据
+        sotaSummaryList: [], // SOTA汇总表数据
+        searchForm: {
+          createTimeRange: [],
+          textTimeRange: [],
+          tag: "",
+        },
+      };
+    },
+  
+    created() {
+      // 使用防抖处理数据加载
+      this.debouncedFetchGpuList = debounce(this.fetchGpuList, 300);
+    },
+  
+    mounted() {
+      this.initialize();
+    },
+  
+    methods: {
+      // 处理搜索
+      handleSearch() {
+        this.currentPage = 1; // 重置页码
+        this.fetchGpuList();
+      },
+  
+      // 重置搜索
+      resetSearch() {
+        this.searchForm = {
+          createTimeRange: [],
+          textTimeRange: [],
+          tag: "",
+        };
+        this.handleSearch();
+      },
+  
+      // 初始化数据
+      async initialize() {
+        try {
+          await this.fetchBuckets();
+          await this.fetchGpuList();
+        } catch (error) {
+          this.$message.error("初始化数据失败");
+          console.error("初始化失败:", error);
+        }
+      },
+  
+      // 获取状态文本
+      getStatusText(status) {
+        return STATUS_MAP[status]?.text || "未知状态";
+      },
+  
+      // 获取状态样式类型
+      getStatusType(status) {
+        return STATUS_MAP[status]?.type || "info";
+      },
+  
+      // 获取知识库列表
+      async fetchBuckets() {
+        try {
+          const { data } = await listBuckets();
+          this.buckets = data;
+        } catch (error) {
+          this.$message.error("获取知识库列表失败");
+          console.error("获取知识库失败:", error);
+        }
+      },
+  
+      // 处理知识库变更
+      async handleBucketChange(val) {
+        this.selectedType = null;
+        this.types = [];
+  
+        if (!val) return;
+  
+        try {
+          const { data } = await selectTypeList({ kb_id: val });
+          this.types = data.dataList;
+          this.debouncedFetchGpuList();
+        } catch (error) {
+          this.$message.error("获取目录列表失败");
+        }
+      },
+  
+      // 同步数据处理
+      async handleSyncData() {
+        if (!this.selectedType) {
+          this.$message.warning("请先选择目录");
+          return;
+        }
+  
+        this.isSyncing = true;
+        try {
+          await GET_sync({ doc_type_id: this.selectedType });
+          this.$message.success("同步成功");
+          await this.fetchGpuList();
+        } catch (error) {
+          this.$message.error("同步失败");
+        } finally {
+          this.isSyncing = false;
+        }
+      },
+  
+      // 获取GPU列表数据
+      async fetchGpuList() {
+        this.isLoading = true;
+        try {
+          const params = {
+            page: this.currentPage,
+            page_size: this.pageSize,
+            doc_type_id: this.selectedType || 36,
+            // 添加搜索参数
+            create_time_start: this.searchForm.createTimeRange[0],
+            create_time_end: this.searchForm.createTimeRange[1],
+            text_time_start: this.searchForm.textTimeRange[0],
+            text_time_end: this.searchForm.textTimeRange[1],
+            tag: this.searchForm.tag,
+          };
+  
+          const { data } = await GET_list(params);
+          this.gpuList = data.list.map((item) => {
+            const nameParts = item.name.split(".");
+            return {
+              ...item,
+              name: nameParts[0],
+              type: nameParts.length > 1 ? nameParts.pop() : "未知",
+            };
+          });
+          console.log(this.gpuList);
+          this.total = data.total;
+          this.currentPage = data.current_page;
+          this.pageSize = data.page_size;
+        } catch (error) {
+          this.$message.error("获取列表数据失败");
+        } finally {
+          this.isLoading = false;
+        }
+      },
+  
+      // 处理每页数量变化
+      handleSizeChange(val) {
+        this.pageSize = val;
+        this.debouncedFetchGpuList();
+      },
+  
+      // 处理页码变化
+      handleCurrentChange(val) {
+        this.currentPage = val;
+        this.debouncedFetchGpuList();
+      },
+  
+      // 处理名称点击
+      async handleNameClick(row) {
+        try {
+          /* const res = await getDetail({ id: row.id })
+          console.log('详情数据:', res) */
+          this.$router.push({
+            path: "/knowledge/middPage/index",
+            query: { id: row.id,name:row.name },
+          });
+          // 这里可以添加详情处理逻辑
+        } catch (error) {
+          this.$message.error("获取详情失败");
+        }
+      },
+      // Tab切换处理
+      handleClick(tab) {
+        // 根据tab加载相应数据
+        switch (tab.name) {
+          case "second":
+            this.loadSotaDetails();
+            break;
+          case "third":
+            this.loadSotaSummary();
+            break;
+        }
+      },
+  
+      // 加载SOTA详情数据
+      async loadSotaDetails() {
+        try {
+          // 这里调用API获取SOTA详情数据
+          const response = await getSotaDetails();
+          this.sotaDetailsList = response.data;
+        } catch (error) {
+          this.$message.error("获取SOTA详情失败");
+          console.error(error);
+        }
+      },
+  
+      // 加载SOTA汇总表数据
+      async loadSotaSummary() {
+        try {
+          // 这里调用API获取SOTA汇总数据
+          const response = await getSotaSummary();
+          this.sotaSummaryList = response.data;
+        } catch (error) {
+          this.$message.error("获取SOTA汇总数据失败");
+          console.error(error);
+        }
+      },
+    },
+  };
+  </script>
+  
+  <style scoped>
+  .gpu-list {
+    padding: 20px;
+  }
+  
+  .filter-section {
+    margin-bottom: 20px;
+  }
+  
+  .ml-15 {
+    margin-left: 15px;
+  }
+  
+  .pagination {
+    display: flex;
+    justify-content: flex-end;
+    margin-top: 15px;
+  }
+  </style>

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно