From c1d2051abc8ca88cd07f0d7c56c0dbf8165d5c33 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 18 九月 2025 17:02:22 +0800
Subject: [PATCH] 2025.9.18 数据产品(待完成)

---
 src/views/fysp/data-product/base-data-product/ProdManage.vue |   55 +++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 39 insertions(+), 16 deletions(-)

diff --git a/src/views/fysp/data-product/base-data-product/ProdManage.vue b/src/views/fysp/data-product/base-data-product/ProdManage.vue
index 8ca321f..e04d292 100644
--- a/src/views/fysp/data-product/base-data-product/ProdManage.vue
+++ b/src/views/fysp/data-product/base-data-product/ProdManage.vue
@@ -1,19 +1,21 @@
 <template>
-  <el-menu
-    default-active="scene"
-    ellipsis
-    mode="horizontal"
-    style="max-width: 600px"
-  >
-    <el-menu-item
-      v-for="item in menu"
-      :key="item.path"
-      :index="item.path"
-      @click="navPage"
-      >{{ item.name }}</el-menu-item
+  <el-affix>
+    <el-menu
+      ref="menuRef"
+      default-active="scene"
+      ellipsis
+      mode="horizontal"
     >
-  </el-menu>
-  <router-view v-slot="{ Component, route }">
+      <el-menu-item
+        v-for="item in menu"
+        :key="item.path"
+        :index="item.path"
+        @click="navPage"
+        >{{ item.name }}</el-menu-item
+      >
+    </el-menu>
+  </el-affix>
+  <router-view v-slot="{ Component, route }" :style="{ height: height + 'px' }">
     <keep-alive>
       <component
         v-if="route.meta.keepAlive"
@@ -25,11 +27,16 @@
   </router-view>
 </template>
 <script setup>
-import { ref, onMounted } from 'vue';
+import { ref, onMounted, provide, inject, computed } from 'vue';
 import { useRouter, useRoute } from 'vue-router';
+
+const contentMaxHeight = inject('contentMaxHeight');
 
 const router = useRouter();
 const route = useRoute();
+
+const menuRef = ref(null);
+const height = ref(contentMaxHeight.value);
 
 const menu = ref([
   {
@@ -42,7 +49,7 @@
     path: 'evaluate'
   },
   {
-    name: '宸℃煡淇℃伅',
+    name: '鏁存敼娓呭崟',
     path: 'inspection'
   },
   {
@@ -58,5 +65,21 @@
     });
   }
 };
+
+function calcTableHeight() {
+  const h = menuRef.value.$el.offsetHeight;
+  return contentMaxHeight.value - h;
+  // return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2)`;
+}
+
+onMounted(() => {
+  height.value = calcTableHeight();
+});
+
+// 鎻愪緵缁欏唴閮ㄧ粍浠惰鍥炬渶澶ч珮搴�
+provide(
+  'viewHeight',
+  computed(() => height.value)
+);
 </script>
 <style scoped></style>

--
Gitblit v1.9.3