From 36b13c76dc95019c26a2ecb65f8bea36f65346bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com> Date: Mon, 3 Aug 2026 17:00:05 +0800 Subject: [PATCH] tijiao --- src/components/common/langs/en.js | 4 + src/components/common/langs/zh.js | 4 + .../JournalManagement/SpecialList/index.vue | 1285 +++++++++-------- src/components/page/autoPromotion.vue | 18 +- .../PromotionFactoryTaskDialog.vue | 63 + 5 files changed, 752 insertions(+), 622 deletions(-) diff --git a/src/components/common/langs/en.js b/src/components/common/langs/en.js index db90620..966e392 100644 --- a/src/components/common/langs/en.js +++ b/src/components/common/langs/en.js @@ -1961,6 +1961,10 @@ const en = { factoryEmails: 'Sender accounts', factoryEmailsPlaceholder: 'Select one or more sender accounts', factorySendCount: 'Send count', + factoryMinInterval: 'Min interval', + factoryMaxInterval: 'Max interval', + factoryNeedInterval: 'Please enter non-negative integer min interval and max interval', + factoryIntervalRangeInvalid: 'Min interval cannot be greater than max interval', factoryType: 'Scenario', factoryTypeEditor: 'Editor', factoryTypeArticle: 'Promote article', diff --git a/src/components/common/langs/zh.js b/src/components/common/langs/zh.js index 2f1998b..6de5be7 100644 --- a/src/components/common/langs/zh.js +++ b/src/components/common/langs/zh.js @@ -1941,6 +1941,10 @@ const zh = { factoryEmails: '发送邮箱', factoryEmailsPlaceholder: '请选择发送账号(可多选)', factorySendCount: '发送数量', + factoryMinInterval: 'min_interval', + factoryMaxInterval: 'max_interval', + factoryNeedInterval: '请填写非负整数的 min_interval 和 max_interval', + factoryIntervalRangeInvalid: 'min_interval 不能大于 max_interval', factoryType: '场景类型', factoryTypeEditor: '编辑', factoryTypeArticle: '推广文章', diff --git a/src/components/page/JournalManagement/SpecialList/index.vue b/src/components/page/JournalManagement/SpecialList/index.vue index df64465..b2096ce 100644 --- a/src/components/page/JournalManagement/SpecialList/index.vue +++ b/src/components/page/JournalManagement/SpecialList/index.vue @@ -2,548 +2,658 @@
- - {{ $t('specialList.button') }} - + {{ $t('specialList.button') }} {{ currentJournal.title }}
-
-
- Journal : - - - +
+
+ Journal : + + + +
+ + {{ $t('articleListEditor.add') }} +
- - {{ $t('articleListEditor.add') }} - -
- - - - - - - - - - - - - - - - - - -
- -
- - -
- - -

- {{ currentJournal.title }} -

-
- - - - - - - - - - - - - - - - - - - - -
- - {{ $t('specialList.guestEditorYes') }} - {{ $t('specialList.guestEditorNo') }} - - -
-
-
-
- - {{ $t('GroupClassification.cancel') }} - - {{ $t('GroupClassification.submit') }} - - -
- - -
-
-
- - -
-
- -

{{ getGuestEditorDisplayName(guestDetailRow) }}

- +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
-
-
- {{ $t('specialList.guestEmail') }} - {{ guestDetailRow.email || '—' }} -
-
- {{ $t('specialList.guestFirstName') }} - {{ guestDetailRow.first_name || '—' }} -
-
- {{ $t('specialList.guestLastName') }} - {{ guestDetailRow.last_name || '—' }} -
-
- {{ $t('specialList.guestIntroduction') }} - {{ guestDetailRow.intro || '—' }} -
-
- {{ $t('specialList.guestAddress') }} - {{ guestDetailRow.address || '—' }} -
-
- {{ $t('specialList.guestInterests') }} - {{ guestDetailRow.interests || '—' }} -
-
- {{ $t('specialList.guestOrcid') }} - - https://orcid.org/{{ guestDetailRow.orcid }} - - -
-
- {{ $t('specialList.guestWebsite') }} - - {{ guestDetailRow.website }} - - -
-
-
- - {{ $t('GroupClassification.cancel') }} - - - - - -
-
- - - {{ $t('specialList.guestEditorCheck') }} + + {{ $t('GroupClassification.cancel') }} + + {{ $t('specialList.guestEditorConfirmAdd') }} - - {{ $t('specialList.guestEditorRecheck') }} - -
-
+ + + + + +
-
-

Account : {{ guestAddDraft.account || '—' }}

+
+

Account : {{ guestEditDraft.account || '—' }}

@@ -555,30 +665,30 @@

- + - + - + - + - + - + - + - + @@ -604,101 +714,13 @@
-
- - {{ $t('GroupClassification.cancel') }} - - {{ $t('specialList.guestEditorConfirmAdd') }} - - - - - - -
-
-
-
-
-

Account : {{ guestEditDraft.account || '—' }}

-
-
-

- {{ $t('specialList.guestEditorManualTip') }} -

-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - {{ $t('GroupClassification.cancel') }} - - {{ $t('GroupClassification.submit') }} - - -
+ + {{ $t('GroupClassification.cancel') }} + + {{ $t('GroupClassification.submit') }} + + +
@@ -718,10 +740,10 @@ export default { data() { return { baseUrl: this.Common.baseUrl, - + iconBaseUrl: this.Common.tmrjournals, guestEditorIconBaseUrl: this.Common.mediaUrl + 'usericon/', - + loading: false, saving: false, edit_id: localStorage.getItem('U_id'), @@ -766,7 +788,7 @@ export default { journal_special_id: '', journal_id: '', title: '', - + abstract: '', keywords: '', deadline: '', @@ -881,6 +903,9 @@ export default { ); return found ? found.journal_id : ''; }, + + + async loadJournals() { try { const res = await this.$api.post('api/Journal/getJournalByeditor', { @@ -892,6 +917,21 @@ export default { return; } this.df_jour = (res.data && res.data.journals) || []; + try { + // 映射出所有的 Promise 请求 + const promises = this.df_jour.map(async (item) => { + let res = await this.getJournalldBylssn({ journal_issn: item.issn }); + if (res && res.data.journal_id) { + item.journal_com_id = res.data.journal_id; + } + }); + + // 等待所有请求全部完成 + await Promise.all(promises); + } catch (e) { + console.error("批量获取期刊ID失败", e); + } + console.log(this.df_jour); const queryId = this.$route.query.journal_id; const propId = this.journal && this.journal.journal_id; const resolvedQuery = this.resolveJournalId(queryId); @@ -950,14 +990,17 @@ export default { } return base + file; }, + getJournalldBylssn(params){ + return this.$api.post('api/Special/getJournalIdByIssn', params); + }, async getDate() { - if (!this.currentJournal || !this.currentJournal.journal_id) { + if (!this.currentJournal || !this.currentJournal.journal_com_id) { return; } this.loading = true; try { const res = await this.$api.post('api/Special/getSpecialList', { - journal_id: this.currentJournal.journal_id, + journal_id: this.currentJournal.journal_com_id, pageIndex: this.query.pageIndex, pageSize: this.query.pageSize }); @@ -1037,7 +1080,7 @@ export default { resetForm() { this.detailForm = { journal_special_id: '', - journal_id: this.currentJournal.journal_id, + journal_id: this.currentJournal.journal_com_id, title: '', intro: '', abstract: '', @@ -1080,7 +1123,7 @@ export default { this.initialGuestEditorIds = []; this.detailForm = { journal_special_id: row.journal_special_id, - journal_id: row.journal_id || this.currentJournal.journal_id, + journal_id: row.journal_id || this.currentJournal.journal_com_id, title: row.title || '', intro: row.intro || '', abstract: row.abstract || '', @@ -1527,7 +1570,7 @@ export default { const special = (res.data && res.data.special) || {}; this.detailForm = { journal_special_id: special.journal_special_id || journalSpecialId, - journal_id: special.journal_id || this.currentJournal.journal_id, + journal_id: special.journal_id || this.currentJournal.journal_com_id, title: special.title || '', intro: special.intro || '', abstract: special.abstract || '', @@ -1772,7 +1815,7 @@ export default { const ensured = await this.ensureGuestEditorUser(editor); const editorFields = this.buildEditorPayload(ensured); const payload = { - journal_id: this.currentJournal.journal_id, + journal_id: this.currentJournal.journal_com_id, journal_special_id: journalSpecialId, user_id: editorFields.user_id, email: editorFields.email, @@ -1811,7 +1854,7 @@ export default { journal_special_to_editor_id: apply.journal_special_to_editor_id, journal_special_editor_id: apply.journal_special_editor_id, journal_special_id: journalSpecialId, - journal_id: this.currentJournal.journal_id + journal_id: this.currentJournal.journal_com_id }); if (adoptRes.code != 0) { throw new Error(adoptRes.msg || this.$t('specialList.guestEditorSyncFail')); @@ -1873,7 +1916,7 @@ export default { const fields = this.buildEditorPayload(editor); const editRes = await this.$api.post('master/Special/editSpecialEditor', { journal_special_editor_id: editor.journal_special_editor_id, - journal_id: this.currentJournal.journal_id, + journal_id: this.currentJournal.journal_com_id, user_id: fields.user_id, email: fields.email, first_name: fields.first_name, @@ -1923,7 +1966,7 @@ export default { // specialIcon:专刊封面;icon:客座编辑头像 const coverIcon = this.detailForm.icon || ''; const payload = { - journal_id: this.currentJournal.journal_id, + journal_id: this.currentJournal.journal_com_id, title: this.detailForm.title, intro: this.detailForm.intro, abstract: this.detailForm.abstract, diff --git a/src/components/page/autoPromotion.vue b/src/components/page/autoPromotion.vue index 045d30d..8f67ba6 100644 --- a/src/components/page/autoPromotion.vue +++ b/src/components/page/autoPromotion.vue @@ -666,6 +666,8 @@ export default { ' "expert_type": "5",\n' + ' "email_ids": "12",\n' + ' "send_count": "1",\n' + + ' "min_interval": "30",\n' + + ' "max_interval": "60",\n' + ' "fetch_ids": "1,2",\n' + ' "target_partitions": "1,2",\n' + ' "target_country_ids": "",\n' + @@ -718,6 +720,8 @@ export default { 'expert_type', 'email_ids', 'send_count', + 'min_interval', + 'max_interval', 'template_id', 'style_id', 'fetch_ids', @@ -731,6 +735,8 @@ export default { out[k] = o[k] === null || o[k] === '' ? '' : String(o[k]); }); if (out.start_promotion === undefined || out.start_promotion === '') out.start_promotion = '0'; + if (out.min_interval === undefined || out.min_interval === '') out.min_interval = '30'; + if (out.max_interval === undefined || out.max_interval === '') out.max_interval = '60'; if (out.fetch_ids === undefined) out.fetch_ids = ''; if (out.target_partitions === undefined) out.target_partitions = ''; if (out.target_country_ids === undefined) out.target_country_ids = ''; @@ -756,6 +762,8 @@ export default { expert_type: '5', email_ids: '', send_count: '1', + min_interval: '30', + max_interval: '60', fetch_ids: '', target_partitions: '1,2', target_country_ids: '', @@ -825,13 +833,21 @@ export default { this.$message.success(this.$t('autoPromotion.factoryBatchImportUiFromJsonOk')); }, validatePromotionFactoryPayload(p, index) { - const req = ['journal_id', 'type', 'expert_type', 'email_ids', 'send_count', 'template_id', 'style_id']; + const req = ['journal_id', 'type', 'expert_type', 'email_ids', 'send_count', 'min_interval', 'max_interval', 'template_id', 'style_id']; for (let i = 0; i < req.length; i++) { const k = req[i]; if (p[k] == null || String(p[k]).trim() === '') { return this.$t('autoPromotion.factoryBatchImportMissing', { index: index + 1, field: k }); } } + const minInterval = Number(p.min_interval); + const maxInterval = Number(p.max_interval); + if (!Number.isInteger(minInterval) || minInterval < 0 || !Number.isInteger(maxInterval) || maxInterval < 0) { + return this.$t('autoPromotion.factoryBatchImportMissing', { index: index + 1, field: 'min_interval/max_interval' }); + } + if (minInterval > maxInterval) { + return this.$t('autoPromotion.factoryBatchImportMissing', { index: index + 1, field: 'min_interval<=max_interval' }); + } if (String(p.expert_type) === '5') { if (!String(p.fetch_ids || '').trim()) { return this.$t('autoPromotion.factoryBatchImportNeedFetch', { index: index + 1 }); diff --git a/src/components/page/components/autoPromotion/PromotionFactoryTaskDialog.vue b/src/components/page/components/autoPromotion/PromotionFactoryTaskDialog.vue index 3b709f5..8849269 100644 --- a/src/components/page/components/autoPromotion/PromotionFactoryTaskDialog.vue +++ b/src/components/page/components/autoPromotion/PromotionFactoryTaskDialog.vue @@ -160,6 +160,34 @@
+
+ + +
+ +
+ + +
+