Commit 7696baea authored by zhengke's avatar zhengke

首页 查看所有子模版

parent 6609d850
...@@ -67,8 +67,14 @@ ...@@ -67,8 +67,14 @@
<div style="margin-top: 20px;" v-loading="loading"> <div style="margin-top: 20px;" v-loading="loading">
<div v-if="dataList.length>0" class="q-mt-lg row wrap bg-white rounded" style="padding: 30px 10px 0 10px;"> <div v-if="dataList.length>0" class="q-mt-lg row wrap bg-white rounded" style="padding: 30px 10px 0 10px;">
<template v-for="(item,index) in dataList"> <template v-for="(item,index) in dataList">
<el-popover effect="light" trigger="hover" placement="bottom-start" width="auto" height="auto">
<template #default>
<LayoutPool v-loading="queryObj.loading" />
</template>
<template #reference>
<div class="MarketIndexListBox"> <div class="MarketIndexListBox">
<div class="MarketIndexList bg-white rounded" @click="goToTemplate(item)"> <div class="MarketIndexList bg-white rounded" @click="goToTemplate(item)"
@mouseover="getTemplate(item)">
<div class="MarketIndexList-img"> <div class="MarketIndexList-img">
<el-image style="width: 100%;height: 100%" :src="item.CoverImg" fit="cover" /> <el-image style="width: 100%;height: 100%" :src="item.CoverImg" fit="cover" />
<!-- <img :src="item.CoverImg" style="height:100%"/> --> <!-- <img :src="item.CoverImg" style="height:100%"/> -->
...@@ -77,6 +83,8 @@ ...@@ -77,6 +83,8 @@
</div> </div>
</div> </div>
</template> </template>
</el-popover>
</template>
</div> </div>
<div v-else class="q-mt-lg bg-white rounded" style="padding: 30px 10px 30px 10px;text-align: center;color: #909399;">暂无数据</div> <div v-else class="q-mt-lg bg-white rounded" style="padding: 30px 10px 30px 10px;text-align: center;color: #909399;">暂无数据</div>
<div v-if="dataList.length>0" class="q-mt-lg row" style="justify-content: center;margin-bottom: 40px"> <div v-if="dataList.length>0" class="q-mt-lg row" style="justify-content: center;margin-bottom: 40px">
...@@ -103,10 +111,13 @@ ...@@ -103,10 +111,13 @@
import LineService from '@/services/LineService' import LineService from '@/services/LineService'
import ConfigService from '@/services/ConfigService' import ConfigService from '@/services/ConfigService'
import { userStore } from "@/store/user"; import { userStore } from "@/store/user";
import { useSlidesStore } from '@/store'
import { useScreenStore } from "@/store/screen"; import { useScreenStore } from "@/store/screen";
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
import { injectKeyTemplate } from '@/types/injectKey' import { injectKeyTemplate } from '@/types/injectKey'
import LayoutPool from '../Editor/Thumbnails/LayoutPool.vue'
const { const {
userInfo userInfo
} = storeToRefs(userStore()) } = storeToRefs(userStore())
...@@ -127,6 +138,7 @@ ...@@ -127,6 +138,7 @@
ColorName: '', //颜色名称 ColorName: '', //颜色名称
totalCount: 0, //总调试 totalCount: 0, //总调试
pageCount: 0, //总页数 pageCount: 0, //总页数
loading: false,
}) })
const loading = ref(false as any) const loading = ref(false as any)
...@@ -134,10 +146,37 @@ ...@@ -134,10 +146,37 @@
searchData.value = inject(injectKeyTemplate) searchData.value = inject(injectKeyTemplate)
const marketStore = useScreenStore() const marketStore = useScreenStore()
const isModelStore = useScreenStore() const isModelStore = useScreenStore()
const layoutsStore = useSlidesStore()
const { screening, market, model, isModel, ConfigId} = storeToRefs(useScreenStore()) const { screening, market, model, isModel, ConfigId} = storeToRefs(useScreenStore())
const addTemplate = () => { // 查看所有子模版
marketStore.setMarket(!market) const getTemplate = async (item) => {
queryObj.loading = true
layoutsStore.setLayouts([])
try {
let queryMsg = {
TempId: item.TempId
}
let dataRes = await ConfigService.GetTripTemplateSlide(queryMsg);
if (dataRes.data.resultCode == 1) {
let SlidesData = JSON.parse(dataRes.data.data.TempData)
let newSlides = []
if(typeof SlidesData=='object'&&!SlidesData.length){
let obj = {
pageType: 1,
...SlidesData
}
newSlides.push(obj)
}else if(SlidesData.length>0){
newSlides = SlidesData
}
layoutsStore.setLayouts(JSON.parse(JSON.stringify(newSlides)))
queryObj.loading = false
}
} catch (error) {
console.log("GetTripTemplateSlide", error);
queryObj.loading = false
}
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment