Commit 59c6d69c authored by zhengke's avatar zhengke

模版管理中心 优化

parent 45b10092
......@@ -416,6 +416,7 @@ const GetTripTemplate = async () =>{
let Title = '模版名称'
if(searchData.value.TemplateType==2) Title = '广告名称'
slidesStore.setTitle(Title)
loadingObj.close()
return slidesStore.setSlides(list)
}
try {
......@@ -517,9 +518,10 @@ const GetTripTemplate = async () =>{
if(TempId.value&&!searchData.value.TempId) await GetTripConfig()
if(model.value!=3) await GetTripFiledData()
}else{
loadingObj.close()
}
} catch (error) {
loadingObj.close()
}
}
......@@ -950,6 +952,7 @@ if(!query().ViewSlideshow) GetTripTemplate()
padding: 5px 0;
flex: 1;
overflow: auto;
width: 164px;
}
.thumbnail-item {
display: flex;
......
......@@ -15,7 +15,7 @@
</div>
</template>
</el-input>
</div>
</div>
<UserCard></UserCard>
</div>
</div>
......
......@@ -13,7 +13,7 @@
<span class="fz14 q-pr-md shrink">&nbsp;&nbsp;模版:</span>
<el-select v-model="queryObj.TemplateType"
class="ml-1 shrink TemSel"
placeholder="模版类型" clearable>
placeholder="模版类型" clearable @change="search">
<el-option
v-for="item in typeArr"
:key="item.type"
......@@ -26,7 +26,7 @@
<span class="fz14 q-pr-md shrink">&nbsp;&nbsp;&nbsp;版型:</span>
<el-select v-model="queryObj.TempType"
class="ml-1 shrink TemSel"
placeholder="版型" clearable>
placeholder="版型" clearable @change="search">
<el-option
v-for="item in layouts"
:key="item.Id"
......@@ -39,7 +39,7 @@
<span class="fz14 q-pr-md shrink">&nbsp;&nbsp;国家:</span>
<el-select v-model="queryObj.CountryList" multiple
class="ml-1 shrink TemSel"
placeholder="国家" clearable filterable>
placeholder="国家" clearable filterable @change="search(1)">
<el-option key="" label="不限" value=""/>
<el-option
v-for="item in countries"
......@@ -53,7 +53,7 @@
<span class="fz14 q-pr-md shrink">&nbsp;&nbsp;季节:</span>
<el-select v-model="queryObj.SeasonList" multiple
class="ml-1 shrink TemSel"
placeholder="季节" clearable>
placeholder="季节" clearable @change="search(2)">
<el-option key="" label="四季" value=""/>
<el-option
v-for="item in seasonArr"
......@@ -67,7 +67,7 @@
<span class="fz14 q-pr-md shrink">&nbsp;&nbsp;排序:</span>
<el-select v-model="queryObj.OrderByType"
class="ml-1 shrink TemSel"
placeholder="排序方式">
placeholder="排序方式" @change="search">
<el-option
v-for="item in sortArr"
:key="item.type"
......@@ -80,7 +80,7 @@
<span class="fz14 q-pr-md shrink">&nbsp;&nbsp;颜色:</span>
<el-select v-model="queryObj.ColorList" multiple
class="ml-1 shrink TemSel"
placeholder="颜色" clearable filterable>
placeholder="颜色" clearable filterable @change="search(3)">
<el-option key="" label="不限" value=""/>
<el-option
v-for="item in ColorList"
......@@ -91,11 +91,38 @@
</el-select>
</div>
</div>
<el-button class="q-ml-lg q-mb-lg" type="primary" size="default" style="color: #ffff;" @click="search">
<el-icon size="18px">
<Search/>
</el-icon>
</el-button>
<div class="row nowrap" style="flex-shrink: 0;width: 201px;">
<div>
<el-button class="q-ml-lg q-mb-lg" type="primary" size="default" style="color: #ffff;" @click="search">
<el-icon size="18px">
<Search/>
</el-icon>
</el-button>
</div>
<div>
<el-dropdown class="q-pl-lg" split-button
size="default" type="primary"
@click="addTemplate(1)">
<span style="font-size: 23px;margin-right: 10px;"> + </span> <span>创建</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item class="none-border">
<el-button type="primary" size="small"
@click.stop="addTemplate(1)" style="color: #ffff;">
创建模版
</el-button>
</el-dropdown-item>
<el-dropdown-item class="none-border">
<el-button type="primary" size="small"
@click.stop="addTemplate(2)" style="color: #ffff;">
创建广告
</el-button>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
</div>
</div>
<!-- <el-input style="width:100px" v-model="queryObj.Title" placeholder="请输入关键字" class="q-pr-33">
<template #append>
......@@ -386,6 +413,7 @@ const addTemplate = (type:number) =>{
// searchData.value.TemplateType = type
// marketStore.setMarket(!market)
// searchData.value.TempId = 0
slidesStore.ClearSlides()
router.push({
path:`/create_template/${type}`
})
......@@ -467,9 +495,29 @@ const goToTemplate = (item: any) => {
}
}
const search = () => {
queryObj.pageIndex = 1
queryTemplateBySearchHandler()
const search = (type:any) => {
let lastItem
if(type==1){
if(queryObj.CountryList.length>1){
lastItem = queryObj.CountryList.length-1
if(queryObj.CountryList[lastItem]=='') queryObj.CountryList = ['']
else if(queryObj.CountryList[lastItem]!=''&&queryObj.CountryList.indexOf('')!=-1) queryObj.CountryList.splice(0,1)
}
}else if(type==2){
if(queryObj.SeasonList.length>1){
lastItem = queryObj.SeasonList.length-1
if(queryObj.SeasonList[lastItem]=='') queryObj.SeasonList = ['']
else if(queryObj.SeasonList[lastItem]!=''&&queryObj.SeasonList.indexOf('')!=-1) queryObj.SeasonList.splice(0,1)
}
}else if(type==3){
if(queryObj.ColorList.length>1){
lastItem = queryObj.ColorList.length-1
if(queryObj.ColorList[lastItem]=='') queryObj.ColorList = ['']
else if(queryObj.ColorList[lastItem]!=''&&queryObj.ColorList.indexOf('')!=-1) queryObj.ColorList.splice(0,1)
}
}
queryObj.pageIndex = 1
queryTemplateBySearchHandler()
}
/***
* 获取模板市场分页列表
......
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