From bbbee93929c03fe96441eb7a1beea0b1276e7fca Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期二, 15 四月 2025 14:25:42 +0800
Subject: [PATCH] 父子表组件封装
---
src/views/ApsPlatePlan/index.vue | 98 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 98 insertions(+), 0 deletions(-)
diff --git a/src/views/ApsPlatePlan/index.vue b/src/views/ApsPlatePlan/index.vue
index a79bcc0..79e9624 100644
--- a/src/views/ApsPlatePlan/index.vue
+++ b/src/views/ApsPlatePlan/index.vue
@@ -105,7 +105,11 @@
:loading="loading"
:height="height"
@on-checkbox="handleCheckboxChange"
+
+ :expand-config="expandConfig"
+ :subGridOptions="subGridOptions"
>
+
</HxlhTable>
<!-- 娣诲姞鎴栦慨鏀归挘閲戣鍒掔鐞嗗璇濇 -->
@@ -196,6 +200,7 @@
<script setup name="ApsPlatePlan">
import { listPlan, examplePlan, confirmPart} from "@/api/mainPlan/apsPlatePlan";
+import { listProcessRoute } from "@/api/basicData/processRoute";
import HxlhTable from '@/components/HxlhTable'
import { ref } from "vue";
import { getToken } from "@/utils/auth";
@@ -428,6 +433,7 @@
const columns = ref([
{ type: 'checkbox', width: 60, align:"center"},
{ type: 'seq', title: '搴忓彿', width: 60 },
+ { field: 'expand', type: 'expand', width: 60, align: 'center', slots: { content: 'expandContent' } },
{
title: '涓昏鍒掑憳',
field: 'masterPlanner',
@@ -761,6 +767,98 @@
upload.open = false;
upload.isUploading = false;
}
+/*瀹氫箟涓嬫媺浜岀骇琛�*/
+
+const subGridOptions = reactive({
+ border: true,
+ showOverflow: true,
+ columns: [
+ {
+ title: '鏂欏彿',
+ field: 'itemNo',
+ width: 150,
+ align:"center",
+ },
+ {
+ title: '宸ュ崟鍙�',
+ field: 'workOrderNo',
+ width: 150,
+ align:"center",
+ },
+ // {
+ // title: '宸ュ簭搴忓彿',
+ // field: 'processNumber',
+ // width: 100,
+ // align:"center",
+ // },
+ // {
+ // title: '宸ュ簭鍚嶇О',
+ // field: 'processName',
+ // width: 150,
+ // align:"center",
+ // },
+ // {
+ // title: '宸ュ簭璁″垝寮�濮嬫棩鏈�',
+ // field: 'processPlanStartDay',
+ // width: 200,
+ // align:"center",
+ // },
+ // {
+ // title: '宸ュ簭璁″垝缁撴潫鏃ユ湡',
+ // field: 'processPlanEndDay',
+ // width: 200,
+ // align:"center",
+ // },
+ // {
+ // title: '鏈紑宸ユ暟閲�',
+ // field: 'notStartWorkCount',
+ // width: 90,
+ // align:"center",
+ // },
+ // {
+ // title: '宸插畬鎴愭暟閲�',
+ // field: 'completedCount',
+ // width: 90,
+ // align:"center",
+ // },
+ // {
+ // title: '搴熷純鏁伴噺',
+ // field: 'discardCount',
+ // width: 90,
+ // align:"center",
+ // },
+ // {
+ // title: '鏍囧噯宸ユ椂',
+ // field: 'standardTime',
+ // width: 90,
+ // align:"center",
+ // },
+ // {
+ // title: '宸ュ簭鎺掑簭',
+ // field: 'processOrder',
+ // width: 90,
+ // align:"center",
+ // },
+ // {
+ // title: '闆嗘垚鏃ユ湡',
+ // field: 'integrationDay',
+ // width: 160,
+ // align:"center",
+ // }
+ ]
+})
+const expandConfig = ref({
+ lazy: true,
+ loadMethod ({ row }) {
+ debugger;
+ // 璋冪敤鎺ュ彛
+ return listProcessRoute({'documentNumber':row.documentNumber}).then(data => {
+
+ row.subList = data.rows;
+ debugger;
+ })
+ }
+})
getList();
</script>
--
Gitblit v1.9.3