From 3e8cc8cbd1a6a8c2113031b72949c0cbeb8be138 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 14 一月 2026 14:22:02 +0800
Subject: [PATCH] 产品结构详情改为页面
---
src/views/productionManagement/productStructure/index.vue | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/src/views/productionManagement/productStructure/index.vue b/src/views/productionManagement/productStructure/index.vue
index bdbec9c..e32ff8d 100644
--- a/src/views/productionManagement/productStructure/index.vue
+++ b/src/views/productionManagement/productStructure/index.vue
@@ -14,25 +14,28 @@
<el-button
type="primary"
text
- @click="() =>{
- currentRowId = row.id;
- showEdit = true;
- }"
- >{{ row.productName }}
+ @click="showDetail(row.id)">{{ row.productName }}
</el-button>
</template>
</PIMTable>
- <StructureEdit v-if="showEdit" v-model:show-model="showEdit" :product-model-id="currentRowId"/>
+ <StructureEdit v-if="showEdit" v-model:show-model="showEdit" :record="currentRow"/>
</div>
</template>
<script setup>
import {ref} from "vue";
import {productModelList} from "@/api/basicData/productModel.js";
+import { useRouter } from 'vue-router'
+const router = useRouter()
const StructureEdit = defineAsyncComponent(() => import('@/views/productionManagement/productStructure/StructureEdit.vue'))
const tableColumn = ref([
+ {
+ label: "浜у搧缂栫爜",
+ prop: "productCode",
+ slot: "detail"
+ },
{
label: "浜у搧鍚嶇О",
prop: "productName",
@@ -52,7 +55,7 @@
const tableLoading = ref(false);
const showEdit = ref(false);
const selectedRows = ref([]);
-const currentRowId = ref(0);
+const currentRow = ref({});
const page = reactive({
current: 1,
size: 10,
@@ -84,6 +87,15 @@
page.size = obj.limit;
getModelList();
};
+
+const showDetail = (id) => {
+ router.push({
+ path: '/productionManagement/productStructureDetail',
+ query: {
+ id: id
+ }
+ })
+}
const getModelList = () => {
tableLoading.value = true;
productModelList({
--
Gitblit v1.9.3