diff --git a/src/views/user/rent-facility/index.vue b/src/views/user/rent-facility/index.vue
index 915299a..c09872f 100644
--- a/src/views/user/rent-facility/index.vue
+++ b/src/views/user/rent-facility/index.vue
@@ -2,7 +2,7 @@
机械化施工装备配置率
-
@@ -116,16 +116,25 @@ onMounted(() => {
// 钻取详情
const handleDrill = async (row, type) => {
- const res = await getDetailList({ companyId: row.companyId,configType:type })
- if(res.code ==200){
- //secondPageTitle.value = `${row.deptName}详情页面`;
- secondPageTitle.value = `${row.companyName }详情页面`;
- secondPageTitleId.value =row.companyId;
- showSecondPage.value = true;
- detailTableData.value =res.rows
- }
+ // 1. 先清空旧数据并隐藏旧页面,避免组件未刷新
+ showSecondPage.value = false
+ detailTableData.value = []
+
+ // 2. 调接口拿到详情数据
+ const res = await getDetailList({ companyId: row.companyId, configType: type })
+ if (res.code === 200) {
+ secondPageTitle.value = `${row.companyName}详情页面`
+ secondPageTitleId.value = row.companyId
+ detailTableData.value = res.rows
+
+ // 3. nextTick 等组件清理完后再显示
+ nextTick(() => {
+ showSecondPage.value = true
+ })
+ }
}
+
// 返回主页面
const handleBack = () => {
showSecondPage.value = false;
diff --git a/src/views/user/rent-facility/line.vue b/src/views/user/rent-facility/line.vue
index 40aa363..a95412f 100644
--- a/src/views/user/rent-facility/line.vue
+++ b/src/views/user/rent-facility/line.vue
@@ -25,14 +25,17 @@
-
+
- {{ row.own }}
+ {{ row.own }}
@@ -54,12 +57,54 @@
-->
+
+
+
+
+
+
+ {{ scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+ 关闭
+
+
+
+