-
-
Account : {{ guestAddDraft.account || '—' }}
+
+
Account : {{ guestEditDraft.account || '—' }}
@@ -555,30 +665,30 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
https://orcid.org/
-
+
@@ -604,101 +714,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
Account : {{ guestEditDraft.account || '—' }}
-
-
-
- {{ $t('specialList.guestEditorManualTip') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- https://orcid.org/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -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 @@