Merge pull request #7774 from dataease/pr@dev-v2@refactor_template-market

refactor: 模版管理预览列表带入过滤条件查询
This commit is contained in:
王嘉豪 2024-01-23 17:47:21 +08:00 committed by GitHub
commit 9c778ef73f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,7 +17,7 @@
<el-icon class="custom-back-icon hover-icon" @click="previewModel = 'full'"
><ArrowLeft
/></el-icon>
<span>{{ state.curTemplate.title }} </span>
<span>{{ state.curTemplate.title }}1 </span>
<el-row class="head-right">
<el-button :disabled="state.curTemplateIndex === 0" style="float: right" @click="preOne"
>上一个</el-button
@ -480,8 +480,10 @@ const templatePreview = previewId => {
} else {
state.curTemplateShowFilter =
state.marketActiveTab === '推荐'
? state.currentMarketTemplateShowList
: state.currentMarketTemplateShowList.filter(ele => ele.showFlag)
? state.currentMarketTemplateShowList.filter(ele => ele.showFlag)
: state.currentMarketTemplateShowList.filter(
ele => ele.showFlag && ele.categoryNames?.includes(state.marketActiveTab)
)
state.curTemplateIndex = state.curTemplateShowFilter.findIndex(temp => temp.id === previewId)
state.curTemplate = state.curTemplateShowFilter[state.curTemplateIndex]
previewModel.value = 'createPreview'