任务工厂列表版
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
<el-tag type="success" size="small" effect="plain" style="margin-left: 10px">
|
||||
<i class="el-icon-circle-check"></i> {{ $t('autoPromotionLogs.configured') }}
|
||||
</el-tag>
|
||||
<el-button type="text" size="small" style="margin-left: 10px" @click="openWizardDialog">
|
||||
<el-button type="text" size="small" style="margin-left: 10px" @click="openFactoryTaskDialogFromLogs">
|
||||
<i class="el-icon-edit"></i>
|
||||
{{ config.initialized ? $t('autoPromotionLogs.editConfig') : $t('autoPromotionLogs.startConfig') }}
|
||||
</el-button>
|
||||
@@ -242,6 +242,15 @@
|
||||
@confirm="handleTemplateApply"
|
||||
@close-all-dialogs="closeAllDialogs"
|
||||
/>
|
||||
<promotion-factory-task-dialog
|
||||
:visible.sync="showFactoryTaskDialog"
|
||||
:initial-journal-id="factoryDialogInitialJournalId"
|
||||
:initial-task="factoryDialogInitialTask"
|
||||
@success="
|
||||
fetchList();
|
||||
fetchJournalDetail();
|
||||
"
|
||||
/>
|
||||
<el-dialog :title="$t('autoPromotionLogs.previewEditTitle')" :visible.sync="showPreviewDialog" width="1200px" top="5vh">
|
||||
<div class="mail-edit-wrapper" v-if="previewForm">
|
||||
<el-form label-width="120px" size="small">
|
||||
@@ -287,6 +296,7 @@
|
||||
import CkeditorMail from '@/components/page/components/email/CkeditorMail.vue';
|
||||
import TemplateSelectorDialog from '@/components/page/components/email/TemplateSelectorDialog.vue';
|
||||
import AutoPromotionWizard from '@/components/page/components/autoPromotion/AutoPromotionWizard.vue';
|
||||
import PromotionFactoryTaskDialog from '@/components/page/components/autoPromotion/PromotionFactoryTaskDialog.vue';
|
||||
import PromotionDetailDrawer from '@/components/page/components/autoPromotion/PromotionDetailDrawer.vue';
|
||||
// 这里假设你已经定义了 API 地址
|
||||
const API = {
|
||||
@@ -300,7 +310,7 @@ const API = {
|
||||
|
||||
export default {
|
||||
name: 'autoPromotion',
|
||||
components: { TemplateSelectorDialog, AutoPromotionWizard, CkeditorMail, PromotionDetailDrawer },
|
||||
components: { TemplateSelectorDialog, AutoPromotionWizard, PromotionFactoryTaskDialog, CkeditorMail, PromotionDetailDrawer },
|
||||
data() {
|
||||
return {
|
||||
handleRefreshList: [],
|
||||
@@ -350,6 +360,9 @@ export default {
|
||||
availableCountries: [],
|
||||
fieldsLoading: false,
|
||||
fieldsSaving: false,
|
||||
showFactoryTaskDialog: false,
|
||||
factoryDialogInitialJournalId: '',
|
||||
factoryDialogInitialTask: null,
|
||||
previewForm: {
|
||||
id: '',
|
||||
email: '',
|
||||
@@ -378,6 +391,7 @@ export default {
|
||||
closeAllDialogs() {
|
||||
// 点击“去新增模板”后:关闭当前页面所有可能的弹窗
|
||||
this.showWizardDialog = false;
|
||||
this.showFactoryTaskDialog = false;
|
||||
this.showTemplateDialog = false;
|
||||
this.showPreviewDialog = false;
|
||||
this.currentRow = null;
|
||||
@@ -659,6 +673,11 @@ export default {
|
||||
}
|
||||
this.showWizardDialog = true;
|
||||
},
|
||||
openFactoryTaskDialogFromLogs() {
|
||||
this.factoryDialogInitialJournalId = this.selectedJournalId ? String(this.selectedJournalId) : '';
|
||||
this.factoryDialogInitialTask = this.list && this.list.length ? { ...this.list[0] } : null;
|
||||
this.showFactoryTaskDialog = true;
|
||||
},
|
||||
|
||||
// 切换期刊逻辑
|
||||
async handleJournalChange() {
|
||||
|
||||
Reference in New Issue
Block a user