浏览代码

JLHWEB: 补充详情页组件增加主数据映射

JohnnyChan 6 月之前
父节点
当前提交
a91154d184
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      JLHWEB/src/components/LjDetail/index.vue

+ 6 - 6
JLHWEB/src/components/LjDetail/index.vue

@@ -107,6 +107,11 @@ const _variables: any = variables;
 const layoutLocalStore = useLayoutLocalStore();
 // 布局暂存数据
 const layoutStore = useLayoutStore();
+/**
+ * @description 过滤主表基础信息配置项
+ */
+let infoColumns = ref<ColumnProps[]>([]);
+let infoParam = ref<any>({});
 /**
  * @description 查询后的主表结果
  */
@@ -118,7 +123,7 @@ const detailData_api = ref();
 /**
  * @description 主表数据,影子,只读
  */
-const _mainData = computed(() => tableData.value[0] ?? props.data[0]);
+const _mainData = computed(() => tableData.value[0] ?? props.data[0] ?? infoParam.value);
 /**
  * @description 详情数据,影子,只读
  */
@@ -133,11 +138,6 @@ const isScrollspy = computed(() => {
   console.log("DETAIL_LAYOUT_DEFINE :>> ", DETAIL_LAYOUT_DEFINE);
   return currentMould.value?.header?.tabsProp?.scrollspy ?? DETAIL_LAYOUT_DEFINE.tabsProp.scrollspy;
 });
-/**
- * @description 过滤主表基础信息配置项
- */
-let infoColumns = ref<ColumnProps[]>([]);
-let infoParam = ref<any>({});
 /**
  * @description 树形化:接收 columns 并设置为响应式
  */