diff --git a/src/api/index.js b/src/api/index.js index 487fb66..525753d 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -19,8 +19,8 @@ const service = axios.create({ // baseURL: 'https://submission.tmrjournals.com/', //正式 记得切换 // baseURL: 'http://www.tougao.com/', //测试本地 记得切换 // baseURL: 'http://192.168.110.110/tougao/public/index.php/', - baseURL: '/api', //本地 - // baseURL: '/', //正式 + // baseURL: '/api', //本地 + baseURL: '/', //正式 }); diff --git a/src/components/common/langs/en.js b/src/components/common/langs/en.js index 442418b..c390035 100644 --- a/src/components/common/langs/en.js +++ b/src/components/common/langs/en.js @@ -916,17 +916,38 @@ colTitle: 'Template title', startConfig: 'Start auto promotion configuration', notConfigured: 'Not configured', searchPlaceholder: 'Name / Email', + statusAll: 'All status', searchBtn: 'Search', index: 'No.', + taskName: 'Task Name', + taskParams: 'Parameters', + templateIdLabel: 'Template ID', + styleIdLabel: 'Style ID', + deliveryStats: 'Delivery Stats', + totalCount: 'Total', + sentCount: 'Sent', + failCount: 'Failed', + bounceCount: 'Bounce', + noDeliveryIssue: 'No delivery issues', + deliveryIssue: 'Delivery issues', + completedText: 'Completed', expertInfo: 'Expert Info', templateStyle: 'Template / Style', stylePrefix: 'Style', runAt: 'Execution time', status: 'Status', + state0: 'Draft', + state1: 'Running', + state2: 'Paused', + state3: 'Completed', + state4: 'Cancelled', + state5: 'Preparing', paused: 'Paused', toRun: 'To run', operation: 'Operation', preview: 'Preview', + previewAction: 'Preview', + editAction: 'Edit', enable: 'Enable', pause: 'Pause', previewEditTitle: 'Preview and edit promotion email', @@ -943,9 +964,50 @@ colTitle: 'Template title', configUpdated: 'Configuration updated', pauseSuccess: 'Paused', enableSuccess: 'Enabled', + operationFailed: 'Operation failed', + selectTaskForLogs: 'Please select a task first (click the view icon in the list)', + pushLogTitle: 'Task list', + logRefresh: 'Refresh', + taskLogStateFilter: 'Status', + taskLogStateAll: 'All', + taskLogState0: 'Pending', + taskLogState1: 'Sent', + taskLogState2: 'Failed', + taskLogState3: 'Bounced', + taskLogState4: 'Cancelled', + logColExpert: 'Expert', + logColSendTime: 'Sent at', + logColPreparedAt: 'Prepared at', + logColStatus: 'Status', + logColAction: 'Action', + emptyLogs: 'No logs', + viewFailureReason: 'Reason', + editLogTip: 'Edit', + deleteLogTip: 'Delete', + previewLogTip: 'Preview', + logFieldAffiliation: 'Affiliation', + logFieldSubject: 'Subject', + logFieldSendTime: 'Sent at', + logFieldExecutionTime: 'Executed at', + saveDetail: 'Save', + failureReasonTitle: 'Failure reason', + saveDetailSuccess: 'Saved', + saveDetailFailed: 'Save failed', + logDetailLoadFailed: 'Failed to load detail', + logIdMissing: 'Missing log id', + logAlreadySent: 'This record is no longer pending; switched to preview', + deleteLogConfirm: 'Delete this log entry?', + tipTitle: 'Tip', + deleteLogSuccess: 'Deleted', + deleteLogFailed: 'Delete failed', + noFailureReason: 'No failure reason', deletedSuccess: 'Deleted', mockPromotionSubject: 'Promotion for {journal}', mockPromotionContent: '
Dear {name},
Check out our latest journal updates...
' + }, + tmrEmailEditor: { + preview: 'Preview', + placeholder: 'Please enter email content' } diff --git a/src/components/common/langs/zh.js b/src/components/common/langs/zh.js index 443120e..46fb914 100644 --- a/src/components/common/langs/zh.js +++ b/src/components/common/langs/zh.js @@ -901,17 +901,38 @@ const zh = { startConfig: '立即开始期刊自动推广配置', notConfigured: '尚未配置', searchPlaceholder: '姓名 / 邮箱', + statusAll: '全部状态', searchBtn: '搜索', index: '序号', + taskName: '任务名称', + taskParams: '参数内容', + templateIdLabel: '模板ID', + styleIdLabel: '风格ID', + deliveryStats: '投递统计', + totalCount: '总量', + sentCount: '已发送', + failCount: '失败', + bounceCount: '退信', + noDeliveryIssue: '无发送异常', + deliveryIssue: '投递异常', + completedText: '已完成', expertInfo: '专家信息', templateStyle: '模板 / 风格', stylePrefix: '风格', runAt: '执行时间', status: '状态', + state0: '草稿', + state1: '运行中', + state2: '暂停', + state3: '完成', + state4: '取消', + state5: '准备', paused: '已暂停', toRun: '待执行', operation: '操作', preview: '查看预览', + previewAction: '预览', + editAction: '编辑', enable: '开启', pause: '暂停', previewEditTitle: '预览并修改推广邮件', @@ -928,9 +949,50 @@ const zh = { configUpdated: '配置已更新', pauseSuccess: '已暂停', enableSuccess: '已开启', + operationFailed: '操作失败', + selectTaskForLogs: '请先选择一条任务(点击列表「查看」图标)', + pushLogTitle: '任务列表', + logRefresh: '刷新', + taskLogStateFilter: '发送状态', + taskLogStateAll: '全部', + taskLogState0: '待发送', + taskLogState1: '已发送', + taskLogState2: '失败', + taskLogState3: '退信', + taskLogState4: '取消', + logColExpert: '专家信息', + logColSendTime: '发送时间', + logColPreparedAt: '预处理完成时间', + logColStatus: '状态', + logColAction: '操作', + emptyLogs: '暂无日志', + viewFailureReason: '原因', + editLogTip: '编辑', + deleteLogTip: '删除', + previewLogTip: '预览', + logFieldAffiliation: '单位/机构', + logFieldSubject: '主题', + logFieldSendTime: '发送时间', + logFieldExecutionTime: '执行时间', + saveDetail: '保存', + failureReasonTitle: '失败原因', + saveDetailSuccess: '保存成功', + saveDetailFailed: '保存失败', + logDetailLoadFailed: '加载详情失败', + logIdMissing: '缺少日志 ID', + logAlreadySent: '该记录已非待发送状态,已切换为预览', + deleteLogConfirm: '确定删除该条发送记录?', + tipTitle: '提示', + deleteLogSuccess: '删除成功', + deleteLogFailed: '删除失败', + noFailureReason: '暂无失败原因', deletedSuccess: '已删除', mockPromotionSubject: '自动推广:{journal}', mockPromotionContent: '亲爱的 {name},
请查看我们最新的期刊更新...
' + }, + tmrEmailEditor: { + preview: '预览效果', + placeholder: '请输入邮件内容' } diff --git a/src/components/page/autoPromotion.vue b/src/components/page/autoPromotion.vue index 90139a5..270a8d8 100644 --- a/src/components/page/autoPromotion.vue +++ b/src/components/page/autoPromotion.vue @@ -104,7 +104,7 @@ :selectedStyleName="selectedStyleName" :saving="saving" :title="`${$t('autoPromotion.journalManage')}: ${wizardJournal ? wizardJournal.title : ''}`" - @open-template-selector="showTemplateDialog = true" + @open-template-selector="openTemplateSelector" @cancel="showWizardDialog = false" @confirm="saveWizardConfig" /> @@ -114,6 +114,8 @@ :visible.sync="showTemplateDialog" :journalId="wizardJournal ? wizardJournal.journal_id : ''" :journalLabel="wizardJournal ? wizardJournal.title : ''" + :initial-style-id="templateDialogInitialStyleId" + :initial-template-id="templateDialogInitialTemplateId" :return-source="'autoPromotion'" @confirm="handleTemplateApply" @close-all-dialogs="closeAllDialogs" @@ -148,6 +150,8 @@ export default { selectedTemplateThumbHtml: '', selectedTemplateName: '', selectedStyleName: '', + templateDialogInitialStyleId: '', + templateDialogInitialTemplateId: '', templateNameMap: {}, allJournals: [] }; @@ -156,6 +160,16 @@ export default { this.fetchPromotionJournals(); }, methods: { + openTemplateSelector() { + // 更换模板时优先回显当前已选 style/template;没有则由选择器回落到第一项 + this.templateDialogInitialStyleId = this.wizardConfig && this.wizardConfig.defaultStyleId + ? String(this.wizardConfig.defaultStyleId) + : ''; + this.templateDialogInitialTemplateId = this.wizardConfig && this.wizardConfig.defaultTemplateId + ? String(this.wizardConfig.defaultTemplateId) + : ''; + this.showTemplateDialog = true; + }, closeAllDialogs() { // 进入“新增模板/跳转列表页”前,先关闭当前页所有弹窗,减少卡顿 this.showWizardDialog = false; diff --git a/src/components/page/autoPromotionLogs.vue b/src/components/page/autoPromotionLogs.vue index 0e9a29e..4281b68 100644 --- a/src/components/page/autoPromotionLogs.vue +++ b/src/components/page/autoPromotionLogs.vue @@ -1,892 +1,1510 @@ -