|
@@ -15,7 +15,12 @@
|
|
|
<el-card v-for="layout in layoutList" :key="layout.id" shadow="hover" class="layout-cards">
|
|
<el-card v-for="layout in layoutList" :key="layout.id" shadow="hover" class="layout-cards">
|
|
|
<div class="layout-card" @click="handleClickCompany(layout.id, layout.name)">
|
|
<div class="layout-card" @click="handleClickCompany(layout.id, layout.name)">
|
|
|
<div v-if="layout.layout">
|
|
<div v-if="layout.layout">
|
|
|
- <MapContainerSmall ref="mapContainerRef" :bg-image-url="layout.layout" class="content-pic" />
|
|
|
|
|
|
|
+ <MapContainerSmall
|
|
|
|
|
+ ref="mapContainerRef"
|
|
|
|
|
+ :bg-image-url="layout.layout"
|
|
|
|
|
+ :show-shops="layout.shopList"
|
|
|
|
|
+ class="content-pic"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div v-else>
|
|
<div v-else>
|
|
@@ -26,8 +31,8 @@
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<span class="footer--default">{{ layout.name }}</span>
|
|
<span class="footer--default">{{ layout.name }}</span>
|
|
|
<div class="icons">
|
|
<div class="icons">
|
|
|
- <el-image v-if="layout.layout" :src="preview" :preview-src-list="[layout.layout]" hide-on-click-modal
|
|
|
|
|
- fit="cover" />
|
|
|
|
|
|
|
+ <!-- <el-image v-if="layout.layout" :src="preview" :preview-src-list="[layout.layout]" hide-on-click-modal
|
|
|
|
|
+ fit="cover" /> -->
|
|
|
|
|
|
|
|
<img :src="edit" @click="handleClickCompany(layout.id, layout.name)" />
|
|
<img :src="edit" @click="handleClickCompany(layout.id, layout.name)" />
|
|
|
</div>
|
|
</div>
|
|
@@ -120,8 +125,17 @@ const getLayoutInfoImg = (layoutType: LayoutConfigType.scene | LayoutConfigType.
|
|
|
case LayoutConfigType.scene:
|
|
case LayoutConfigType.scene:
|
|
|
scenePlatformApiMap[viewType]({ companyIds: idList }).then((res) => {
|
|
scenePlatformApiMap[viewType]({ companyIds: idList }).then((res) => {
|
|
|
res.map((companyWithLayout) => {
|
|
res.map((companyWithLayout) => {
|
|
|
- layoutList.value.find((company) => company.id === companyWithLayout.targetId)!.layout =
|
|
|
|
|
- JSON.parse(companyWithLayout.layout).bgInfo.img;
|
|
|
|
|
|
|
+ let img
|
|
|
|
|
+ try {
|
|
|
|
|
+ img = JSON.parse(companyWithLayout.layout).bgInfo.img;
|
|
|
|
|
+ } catch {
|
|
|
|
|
+ img = ''
|
|
|
|
|
+ }
|
|
|
|
|
+ const curCompany = layoutList.value.find(
|
|
|
|
|
+ (company) => company.id === companyWithLayout.targetId,
|
|
|
|
|
+ );
|
|
|
|
|
+ curCompany!.layout = img;
|
|
|
|
|
+ curCompany!.shopList = JSON.parse(companyWithLayout.layout).shopList;
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
break;
|
|
break;
|