任务工厂列表版
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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() {
|
||||
|
||||
@@ -101,13 +101,13 @@
|
||||
|
||||
<el-divider></el-divider>
|
||||
|
||||
<!-- <section class="form-section">
|
||||
<section class="form-section">
|
||||
<h4 class="section-title">
|
||||
<i class="el-icon-location-outline"></i> 3. {{ $t('autoPromotion.selectPromotionCountry') }}
|
||||
<span class="selected-count">
|
||||
<!-- <span class="selected-count">
|
||||
{{ $t('autoPromotion.selectedCount', { count: selectedCountryIdsProxy.length }) }}
|
||||
</span>
|
||||
<el-button
|
||||
</span> -->
|
||||
<!-- <el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
plain
|
||||
@@ -116,21 +116,31 @@
|
||||
@click="countryDialogVisible = true"
|
||||
>
|
||||
{{ $t('autoPromotion.choosePromotionCountry') }}
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</h4>
|
||||
<div class="status-confirm-box">
|
||||
<div v-if="selectedCountryTagRows.length" class="selected-tags">
|
||||
<el-tag v-for="row in selectedCountryTagRows" :key="'c-' + row.id" size="mini" type="info" effect="plain">{{ row.text }}</el-tag>
|
||||
<div class="country-quick-checks">
|
||||
<div class="field-tip" style="margin-bottom: 10px;">{{ $t('autoPromotion.selectPromotionCountryTip') }}</div>
|
||||
<el-checkbox-group v-model="selectedCountryIdsProxy" size="small">
|
||||
<el-checkbox label="Partition1">{{ $t('autoPromotion.countryQuickZone1') }}</el-checkbox>
|
||||
<el-checkbox label="Partition2">{{ $t('autoPromotion.countryQuickZone2') }}</el-checkbox>
|
||||
<el-checkbox label="Partition3">{{ $t('autoPromotion.countryQuickZone3') }}</el-checkbox>
|
||||
<el-checkbox label="country_china" value="239">{{ $t('autoPromotion.countryQuickChina') }}</el-checkbox>
|
||||
<el-checkbox label="country_india" value="228">{{ $t('autoPromotion.countryQuickIndia') }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div class="field-tip">{{ $t('autoPromotion.selectPromotionCountryTip') }}</div>
|
||||
<!-- <div v-if="selectedCountryTagRows.length" class="selected-tags">
|
||||
<el-tag v-for="row in selectedCountryTagRows" :key="'c-' + row.id" size="mini" type="info" effect="plain">{{ row.text }}</el-tag>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<el-divider></el-divider> -->
|
||||
<el-divider></el-divider>
|
||||
|
||||
<section class="form-section">
|
||||
<h4 class="section-title">
|
||||
<i class="el-icon-finished"></i> 3. {{ $t('autoPromotion.confirmAndEnable') }}
|
||||
<i class="el-icon-finished"></i> 4. {{ $t('autoPromotion.confirmAndEnable') }}
|
||||
</h4>
|
||||
|
||||
<div class="status-confirm-box">
|
||||
@@ -317,10 +327,24 @@ export default {
|
||||
(this.availableCountries || []).forEach((i) => {
|
||||
map[String(i.id)] = i.label;
|
||||
});
|
||||
return (this.selectedCountryIdsProxy || []).map((id) => ({
|
||||
id: String(id),
|
||||
text: map[String(id)] != null && map[String(id)] !== '' ? map[String(id)] : String(id)
|
||||
}));
|
||||
const quick = {
|
||||
zone_1: this.$t('autoPromotion.countryQuickZone1'),
|
||||
zone_2: this.$t('autoPromotion.countryQuickZone2'),
|
||||
zone_3: this.$t('autoPromotion.countryQuickZone3'),
|
||||
country_china: this.$t('autoPromotion.countryQuickChina'),
|
||||
country_india: this.$t('autoPromotion.countryQuickIndia')
|
||||
};
|
||||
return (this.selectedCountryIdsProxy || []).map((id) => {
|
||||
const sid = String(id);
|
||||
const fromList = map[sid];
|
||||
const text =
|
||||
fromList != null && fromList !== ''
|
||||
? fromList
|
||||
: quick[sid] != null
|
||||
? quick[sid]
|
||||
: sid;
|
||||
return { id: sid, text };
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -694,5 +718,17 @@ export default {
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
}
|
||||
.country-quick-checks {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.country-quick-checks >>> .el-checkbox-group {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 12px 20px;
|
||||
}
|
||||
.country-quick-checks >>> .el-checkbox {
|
||||
margin-right: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,7 @@
|
||||
:close-on-click-modal="false"
|
||||
width="90%"
|
||||
top="5vh"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
:before-close="handleClose"
|
||||
custom-class="template-modal"
|
||||
|
||||
Reference in New Issue
Block a user