自动化样式
This commit is contained in:
@@ -176,6 +176,7 @@ export default {
|
|||||||
localStorage.removeItem('U_role');
|
localStorage.removeItem('U_role');
|
||||||
localStorage.removeItem('U_id');
|
localStorage.removeItem('U_id');
|
||||||
localStorage.removeItem('U_name');
|
localStorage.removeItem('U_name');
|
||||||
|
localStorage.removeItem('U_email');
|
||||||
localStorage.removeItem('U_status');
|
localStorage.removeItem('U_status');
|
||||||
localStorage.removeItem('ms_journal_alias');
|
localStorage.removeItem('ms_journal_alias');
|
||||||
localStorage.removeItem('journalTypeData');
|
localStorage.removeItem('journalTypeData');
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ export default {
|
|||||||
localStorage.removeItem('U_role');
|
localStorage.removeItem('U_role');
|
||||||
localStorage.removeItem('U_id');
|
localStorage.removeItem('U_id');
|
||||||
localStorage.removeItem('U_name');
|
localStorage.removeItem('U_name');
|
||||||
|
localStorage.removeItem('U_email');
|
||||||
localStorage.removeItem('U_status');
|
localStorage.removeItem('U_status');
|
||||||
localStorage.removeItem('ms_journal_alias');
|
localStorage.removeItem('ms_journal_alias');
|
||||||
localStorage.removeItem('journalTypeData');
|
localStorage.removeItem('journalTypeData');
|
||||||
|
|||||||
@@ -1217,6 +1217,8 @@ colTitle: 'Template title',
|
|||||||
factoryExpertYoungBoard: 'Young editorial board',
|
factoryExpertYoungBoard: 'Young editorial board',
|
||||||
factoryExpertAuthor: 'Author',
|
factoryExpertAuthor: 'Author',
|
||||||
factoryExpertDb: 'Expert database',
|
factoryExpertDb: 'Expert database',
|
||||||
|
factoryExpertJump: 'View',
|
||||||
|
factoryOfficialEmailTip: 'For this type, the system uses the official sender email by default. No account selection is required.',
|
||||||
factoryScenario: 'Scenario',
|
factoryScenario: 'Scenario',
|
||||||
factoryScenarioPlaceholder: 'Select scenario',
|
factoryScenarioPlaceholder: 'Select scenario',
|
||||||
factoryScenarioSolicit: 'Invite Submission',
|
factoryScenarioSolicit: 'Invite Submission',
|
||||||
|
|||||||
@@ -1202,6 +1202,8 @@ const zh = {
|
|||||||
factoryExpertYoungBoard: '青年编委',
|
factoryExpertYoungBoard: '青年编委',
|
||||||
factoryExpertAuthor: '作者',
|
factoryExpertAuthor: '作者',
|
||||||
factoryExpertDb: 'expert库',
|
factoryExpertDb: 'expert库',
|
||||||
|
factoryExpertJump: '查看',
|
||||||
|
factoryOfficialEmailTip: '此类型默认使用系统官方邮箱发送,无需选择邮箱账号。',
|
||||||
factoryScenario: '场景',
|
factoryScenario: '场景',
|
||||||
factoryScenarioPlaceholder: '请选择场景',
|
factoryScenarioPlaceholder: '请选择场景',
|
||||||
factoryScenarioSolicit: '约稿',
|
factoryScenarioSolicit: '约稿',
|
||||||
|
|||||||
@@ -215,6 +215,8 @@
|
|||||||
localStorage.setItem('U_role', 'superadmin');
|
localStorage.setItem('U_role', 'superadmin');
|
||||||
localStorage.setItem('U_name', res.userinfo.account);
|
localStorage.setItem('U_name', res.userinfo.account);
|
||||||
localStorage.setItem('U_id', res.userinfo.user_id);
|
localStorage.setItem('U_id', res.userinfo.user_id);
|
||||||
|
localStorage.setItem('U_email', '');
|
||||||
|
|
||||||
|
|
||||||
this.$router.push('/');
|
this.$router.push('/');
|
||||||
} else if (res.data.roles.includes('editor')) {
|
} else if (res.data.roles.includes('editor')) {
|
||||||
@@ -222,6 +224,7 @@
|
|||||||
localStorage.setItem('U_role', res.data.roles);
|
localStorage.setItem('U_role', res.data.roles);
|
||||||
localStorage.setItem('U_name', res.data.userinfo.account);
|
localStorage.setItem('U_name', res.data.userinfo.account);
|
||||||
localStorage.setItem('U_id', res.data.userinfo.user_id);
|
localStorage.setItem('U_id', res.data.userinfo.user_id);
|
||||||
|
localStorage.setItem('U_email', res.data.userinfo.email);
|
||||||
this.$router.push('/');
|
this.$router.push('/');
|
||||||
} else {
|
} else {
|
||||||
localStorage.setItem('U_status', '2'); //其余的身份
|
localStorage.setItem('U_status', '2'); //其余的身份
|
||||||
@@ -229,6 +232,7 @@
|
|||||||
localStorage.setItem('U_name', res.data.userinfo.account);
|
localStorage.setItem('U_name', res.data.userinfo.account);
|
||||||
localStorage.setItem('U_id', res.data.userinfo.user_id);
|
localStorage.setItem('U_id', res.data.userinfo.user_id);
|
||||||
localStorage.setItem('U_relname', res.data.userinfo.realname);
|
localStorage.setItem('U_relname', res.data.userinfo.realname);
|
||||||
|
localStorage.setItem('U_email', res.data.userinfo.email);
|
||||||
this.$router.push('/');
|
this.$router.push('/');
|
||||||
// this.roleVisible = true;
|
// this.roleVisible = true;
|
||||||
// this.user_cap = res.data.roles;
|
// this.user_cap = res.data.roles;
|
||||||
|
|||||||
@@ -82,6 +82,12 @@
|
|||||||
>
|
>
|
||||||
<span class="tpl-name tpl-name-single-line">{{ taskCard.templateName || 'No Template Configured' }}</span>
|
<span class="tpl-name tpl-name-single-line">{{ taskCard.templateName || 'No Template Configured' }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="meta-row">
|
||||||
|
<i class="el-icon-user"
|
||||||
|
><span style="font-size: 11px; margin-left: 3px; margin-right: 3px">Type :</span></i
|
||||||
|
>
|
||||||
|
<span class="tpl-name">{{ taskCard.expertTypeLabel || '-' }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- <div class="meta-row">
|
<!-- <div class="meta-row">
|
||||||
<i class="el-icon-collection-tag"
|
<i class="el-icon-collection-tag"
|
||||||
@@ -90,7 +96,7 @@
|
|||||||
<span class="tpl-name">{{ taskCard.fieldCountText }}</span>
|
<span class="tpl-name">{{ taskCard.fieldCountText }}</span>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div class="meta-row">
|
<div class="meta-row" v-if="String(taskCard.expertType || '') === '5'">
|
||||||
<i class="el-icon-location-outline"
|
<i class="el-icon-location-outline"
|
||||||
><span style="font-size: 11px; margin-left: 3px; margin-right: 3px">Country :</span></i
|
><span style="font-size: 11px; margin-left: 3px; margin-right: 3px">Country :</span></i
|
||||||
>
|
>
|
||||||
@@ -385,6 +391,8 @@ export default {
|
|||||||
const journalId = item.journal_id || item.id;
|
const journalId = item.journal_id || item.id;
|
||||||
let journalObj = {
|
let journalObj = {
|
||||||
journal_id: journalId,
|
journal_id: journalId,
|
||||||
|
abbr: item.abbr || '',
|
||||||
|
journal_icon: item.journal_icon || '',
|
||||||
title: item.title || item.journal_title || item.name || `Journal ${journalId}`,
|
title: item.title || item.journal_title || item.name || `Journal ${journalId}`,
|
||||||
solicit: {
|
solicit: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
@@ -450,6 +458,8 @@ export default {
|
|||||||
taskId: task.promotion_factory_id || '',
|
taskId: task.promotion_factory_id || '',
|
||||||
type: type,
|
type: type,
|
||||||
typeLabel: this.mapFactoryTaskTypeLabel(type),
|
typeLabel: this.mapFactoryTaskTypeLabel(type),
|
||||||
|
expertType: task && task.expert_type != null ? String(task.expert_type) : '',
|
||||||
|
expertTypeLabel: this.mapFactoryExpertTypeLabel(task && task.expert_type != null ? String(task.expert_type) : ''),
|
||||||
enabled: enabled,
|
enabled: enabled,
|
||||||
switchLoading: false,
|
switchLoading: false,
|
||||||
initialized: true,
|
initialized: true,
|
||||||
@@ -567,6 +577,15 @@ export default {
|
|||||||
if (t === '4') return this.$t('autoPromotion.autoSolicit');
|
if (t === '4') return this.$t('autoPromotion.autoSolicit');
|
||||||
return this.$t('autoPromotion.autoSolicit');
|
return this.$t('autoPromotion.autoSolicit');
|
||||||
},
|
},
|
||||||
|
mapFactoryExpertTypeLabel(expertType) {
|
||||||
|
const t = String(expertType || '').trim();
|
||||||
|
if (t === '1') return this.$t('autoPromotion.factoryExpertChief');
|
||||||
|
if (t === '2') return this.$t('autoPromotion.factoryExpertBoard');
|
||||||
|
if (t === '3') return this.$t('autoPromotion.factoryExpertYoungBoard');
|
||||||
|
if (t === '4') return this.$t('autoPromotion.factoryExpertAuthor');
|
||||||
|
if (t === '5') return this.$t('autoPromotion.factoryExpertDb');
|
||||||
|
return '-';
|
||||||
|
},
|
||||||
getJournalDisplayTasks(journal) {
|
getJournalDisplayTasks(journal) {
|
||||||
const list = journal && Array.isArray(journal.factoryTasks) ? journal.factoryTasks : [];
|
const list = journal && Array.isArray(journal.factoryTasks) ? journal.factoryTasks : [];
|
||||||
return list;
|
return list;
|
||||||
|
|||||||
@@ -35,30 +35,62 @@
|
|||||||
<section class="config-section">
|
<section class="config-section">
|
||||||
<h4 class="section-header">
|
<h4 class="section-header">
|
||||||
<span class="section-header-left"
|
<span class="section-header-left"
|
||||||
>1. {{ $t('autoPromotion.factoryJournal') }}<span class="factory-required-star" aria-hidden="true">*</span></span
|
>1. {{ $t('autoPromotion.factoryJournal') }} & {{ $t('autoPromotion.factoryExpertType') }}<span class="factory-required-star" aria-hidden="true">*</span></span
|
||||||
>
|
>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="journal-scenario-row">
|
<div class="combined-selector-container">
|
||||||
<div class="journal-col">
|
<div class="journal-selection-side">
|
||||||
<el-select
|
<!-- <div class="mini-label">{{ $t('autoPromotion.factoryJournal') }}</div> -->
|
||||||
v-model="selectedJournalId"
|
<div class="journal-grid-compact">
|
||||||
filterable
|
<div
|
||||||
clearable
|
v-for="j in journalList"
|
||||||
:disabled="isEditMode"
|
:key="String(j.journal_id)"
|
||||||
style="width: 100%"
|
class="journal-card-mini"
|
||||||
:placeholder="$t('autoPromotion.factoryJournalPlaceholder')"
|
:class="{ 'is-active': selectedJournalId === j.journal_id, 'is-disabled': isEditMode }"
|
||||||
@change="onJournalChange"
|
@click="handleSelect(j.journal_id)"
|
||||||
>
|
>
|
||||||
<el-option
|
<div class="mini-cover-wrapper">
|
||||||
v-for="j in journalList"
|
<el-image :src="j.journal_icon" fit="cover" class="mini-cover">
|
||||||
:key="String(j.journal_id)"
|
<div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
|
||||||
:label="j.title"
|
</el-image>
|
||||||
:value="j.journal_id"
|
<div v-if="selectedJournalId === j.journal_id" class="mini-badge">
|
||||||
/>
|
<i class="el-icon-check"></i>
|
||||||
</el-select>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mini-abbr" :class="{ 'is-active': selectedJournalId === j.journal_id }">{{ j.abbr || j.title }}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="expert-type-side">
|
||||||
|
<div class="mini-label">{{ $t('autoPromotion.factoryExpertType') }}</div>
|
||||||
|
<div class="expert-tile-group custom-scrollbar">
|
||||||
|
<div
|
||||||
|
v-for="opt in visibleExpertOptions"
|
||||||
|
:key="opt.value"
|
||||||
|
class="expert-tile-mini"
|
||||||
|
:class="{ 'is-active': expertType === opt.value, 'is-disabled': isEditMode }"
|
||||||
|
@click="handleExpertTypeClick(opt.value)"
|
||||||
|
>
|
||||||
|
<span class="tile-text">
|
||||||
|
{{ opt.label }}
|
||||||
|
<i v-if="expertTypeCountsLoading" class="el-icon-loading tile-spinner" aria-hidden="true"></i>
|
||||||
|
<span class="tile-count" v-else-if="opt.count != null">({{ opt.count }})</span>
|
||||||
|
</span>
|
||||||
|
<el-button
|
||||||
|
v-if="opt.jump"
|
||||||
|
class="tile-link-btn"
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
@click.stop="openExpertTypeJump(opt)"
|
||||||
|
>
|
||||||
|
{{ $t('autoPromotion.factoryExpertJump') }}
|
||||||
|
</el-button>
|
||||||
|
<i class="el-icon-circle-check" v-if="expertType === opt.value"></i>
|
||||||
|
<i class="el-icon-border-outer" v-else style="visibility: hidden;"></i> </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="config-section">
|
<section class="config-section">
|
||||||
@@ -80,6 +112,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<section class="config-section">
|
<section class="config-section">
|
||||||
<h4 class="section-header section-header-split">
|
<h4 class="section-header section-header-split">
|
||||||
<span class="section-header-left">
|
<span class="section-header-left">
|
||||||
@@ -93,17 +127,18 @@
|
|||||||
</h4>
|
</h4>
|
||||||
<div class="account-scroll-area">
|
<div class="account-scroll-area">
|
||||||
<el-checkbox-group v-model="selectedEmailIds" class="account-grid-layout">
|
<el-checkbox-group v-model="selectedEmailIds" class="account-grid-layout">
|
||||||
<div v-for="acc in accountList" :key="String(acc.j_email_id)" class="acc-box">
|
<div v-for="acc in accountList" :key="String(acc.j_email_id)" class="acc-box">
|
||||||
<el-checkbox :label="String(acc.j_email_id)">
|
<el-checkbox :label="String(acc.j_email_id)">
|
||||||
<div class="acc-info">
|
<div class="acc-info-inline">
|
||||||
<span class="u">{{ accountDisplayEmail(acc) }}</span>
|
<span class="u">{{ accountDisplayEmail(acc) }}</span>
|
||||||
<span class="m"
|
<span class="divider">|</span>
|
||||||
>{{ $t('autoPromotion.factoryQuotaLabel') }}: {{ acc.remaining_today }}/{{ acc.daily_limit }}</span
|
<span class="m">
|
||||||
>
|
{{ $t('autoPromotion.factoryQuotaLabel') }}: {{ acc.remaining_today }}/{{ acc.daily_limit }}
|
||||||
</div>
|
</span>
|
||||||
</el-checkbox>
|
</div>
|
||||||
</div>
|
</el-checkbox>
|
||||||
</el-checkbox-group>
|
</div>
|
||||||
|
</el-checkbox-group>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -140,25 +175,34 @@
|
|||||||
<el-option :label="$t('autoPromotion.factoryScenarioGeneralThanks')" value="3" />
|
<el-option :label="$t('autoPromotion.factoryScenarioGeneralThanks')" value="3" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="param-item">
|
</section>
|
||||||
<label class="param-label"
|
|
||||||
>{{ $t('autoPromotion.factoryExpertType') }}<span class="factory-required-star" aria-hidden="true">*</span></label
|
<section v-if="isExpertDatabaseType" class="config-section">
|
||||||
>
|
<h4 class="section-header">
|
||||||
<el-select v-model="expertType" size="small" class="param-select param-select-expert" :placeholder="$t('autoPromotion.factoryExpertTypePlaceholder')">
|
<span class="section-header-left">
|
||||||
<el-option :label="$t('autoPromotion.factoryExpertChief')" value="1" />
|
<i class="el-icon-location-outline section-header-icon"></i>
|
||||||
<el-option :label="$t('autoPromotion.factoryExpertBoard')" value="2" />
|
4. {{ $t('autoPromotion.selectPromotionCountry') }}<span class="factory-required-star" aria-hidden="true">*</span>
|
||||||
<el-option :label="$t('autoPromotion.factoryExpertYoungBoard')" value="3" />
|
</span>
|
||||||
<el-option :label="$t('autoPromotion.factoryExpertAuthor')" value="4" />
|
</h4>
|
||||||
<el-option :label="$t('autoPromotion.factoryExpertDb')" value="5" />
|
<div class="status-confirm-box">
|
||||||
</el-select>
|
|
||||||
|
<div class="country-quick-checks">
|
||||||
|
<el-checkbox-group v-model="factoryZoneCountryIds" 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">{{ $t('autoPromotion.countryQuickChina') }}</el-checkbox>
|
||||||
|
<el-checkbox label="country_india">{{ $t('autoPromotion.countryQuickIndia') }}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="config-section">
|
<section v-if="isExpertDatabaseType" class="config-section">
|
||||||
<h4 class="section-header section-header-split">
|
<h4 class="section-header section-header-split">
|
||||||
<span class="section-header-left">
|
<span class="section-header-left">
|
||||||
<i class="el-icon-collection-tag section-header-icon"></i>
|
<i class="el-icon-collection-tag section-header-icon"></i>
|
||||||
4. {{ $t('autoPromotion.selectPromotionFields') }}<span class="factory-required-star" aria-hidden="true">*</span>
|
5. {{ $t('autoPromotion.selectPromotionFields') }}<span class="factory-required-star" aria-hidden="true">*</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="section-header-right">
|
<span class="section-header-right">
|
||||||
<span class="selected-count-inline">{{ $t('autoPromotion.selectedCount', { count: factoryFieldIds.length }) }}</span>
|
<span class="selected-count-inline">{{ $t('autoPromotion.selectedCount', { count: factoryFieldIds.length }) }}</span>
|
||||||
@@ -184,10 +228,10 @@
|
|||||||
<div v-if="selectedFieldLabels.length" class="selected-tags">
|
<div v-if="selectedFieldLabels.length" class="selected-tags">
|
||||||
<el-tag v-for="label in selectedFieldLabels" :key="'pf-' + label" size="mini" type="info" effect="plain">{{ label }}</el-tag>
|
<el-tag v-for="label in selectedFieldLabels" :key="'pf-' + label" size="mini" type="info" effect="plain">{{ label }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="empty-inline">
|
<!-- <div v-else class="empty-inline">
|
||||||
<i class="el-icon-collection-tag"></i>
|
<i class="el-icon-collection-tag"></i>
|
||||||
<span>{{ $t('autoPromotion.factoryClickConfigureFields') }}</span>
|
<span>{{ $t('autoPromotion.factoryClickConfigureFields') }}</span>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="field-tip">
|
<div class="field-tip">
|
||||||
<span class="factory-required-star" aria-hidden="true">*</span
|
<span class="factory-required-star" aria-hidden="true">*</span
|
||||||
><span>{{ $t('autoPromotion.factoryPromotionFieldsBlockTip') }}</span>
|
><span>{{ $t('autoPromotion.factoryPromotionFieldsBlockTip') }}</span>
|
||||||
@@ -195,27 +239,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="config-section">
|
|
||||||
<h4 class="section-header">
|
|
||||||
<span class="section-header-left">
|
|
||||||
<i class="el-icon-location-outline section-header-icon"></i>
|
|
||||||
5. {{ $t('autoPromotion.selectPromotionCountry') }}<span class="factory-required-star" aria-hidden="true">*</span>
|
|
||||||
</span>
|
|
||||||
</h4>
|
|
||||||
<div class="status-confirm-box">
|
|
||||||
|
|
||||||
<div class="country-quick-checks">
|
|
||||||
<el-checkbox-group v-model="factoryZoneCountryIds" 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">{{ $t('autoPromotion.countryQuickChina') }}</el-checkbox>
|
|
||||||
<el-checkbox label="country_india">{{ $t('autoPromotion.countryQuickIndia') }}</el-checkbox>
|
|
||||||
</el-checkbox-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -327,6 +350,16 @@
|
|||||||
sendLimitFromApi: false,
|
sendLimitFromApi: false,
|
||||||
factoryType: '1',
|
factoryType: '1',
|
||||||
expertType: '5',
|
expertType: '5',
|
||||||
|
expertTypeCounts: {
|
||||||
|
chief: null,
|
||||||
|
board: null,
|
||||||
|
young: null,
|
||||||
|
author: null,
|
||||||
|
reviewer: null,
|
||||||
|
expertDb: null
|
||||||
|
},
|
||||||
|
expertTypeCountsLoading: false,
|
||||||
|
expertTypeCountsReqSeq: 0,
|
||||||
factoryStartPromotion: true,
|
factoryStartPromotion: true,
|
||||||
factoryConfig: { defaultTemplateId: '', defaultStyleId: '' },
|
factoryConfig: { defaultTemplateId: '', defaultStyleId: '' },
|
||||||
factoryTemplateName: '',
|
factoryTemplateName: '',
|
||||||
@@ -355,13 +388,72 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
factorySteps() {
|
factorySteps() {
|
||||||
return [
|
const steps = [
|
||||||
{ title: this.$t('autoPromotion.factoryStepNav1Title'), desc: this.$t('autoPromotion.factoryStepNav1Desc') },
|
{ title: this.$t('autoPromotion.factoryStepNav1Title'), desc: this.$t('autoPromotion.factoryStepNav1Desc') },
|
||||||
{ title: this.$t('autoPromotion.factoryStepNav2Title'), desc: this.$t('autoPromotion.factoryStepNav2Desc') },
|
{ title: this.$t('autoPromotion.factoryStepNav2Title'), desc: this.$t('autoPromotion.factoryStepNav2Desc') },
|
||||||
{ title: this.$t('autoPromotion.factoryStepNav3Title'), desc: this.$t('autoPromotion.factoryStepNav3Desc') },
|
// { title: this.$t('autoPromotion.factoryExpertType'), desc: this.$t('autoPromotion.factoryExpertTypePlaceholder') },
|
||||||
{ title: this.$t('autoPromotion.factoryStepNav4Title'), desc: this.$t('autoPromotion.factoryStepNav4Desc') },
|
{ title: this.$t('autoPromotion.factoryStepNav3Title'), desc: this.$t('autoPromotion.factoryStepNav3Desc') }
|
||||||
{ title: this.$t('autoPromotion.factoryStepNav5Title'), desc: this.$t('autoPromotion.factoryStepNav5Desc') }
|
|
||||||
];
|
];
|
||||||
|
if (this.isExpertDatabaseType) {
|
||||||
|
steps.push(
|
||||||
|
{ title: this.$t('autoPromotion.factoryStepNav4Title'), desc: this.$t('autoPromotion.factoryStepNav4Desc') },
|
||||||
|
{ title: this.$t('autoPromotion.factoryStepNav5Title'), desc: this.$t('autoPromotion.factoryStepNav5Desc') }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return steps;
|
||||||
|
},
|
||||||
|
isExpertDatabaseType() {
|
||||||
|
return String(this.expertType || '') === '5';
|
||||||
|
},
|
||||||
|
expertOptions() {
|
||||||
|
const counts = this.expertTypeCounts || {};
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
label: this.$t('autoPromotion.factoryExpertChief'),
|
||||||
|
desc: this.$t('autoPromotion.factoryExpertChief'),
|
||||||
|
icon: 'el-icon-s-custom',
|
||||||
|
count: counts.chief,
|
||||||
|
jump: { path: '/editorBorder', queryKey: 'journal_id' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
label: this.$t('autoPromotion.factoryExpertBoard'),
|
||||||
|
desc: this.$t('autoPromotion.factoryExpertBoard'),
|
||||||
|
icon: 'el-icon-user-solid',
|
||||||
|
count: counts.board,
|
||||||
|
jump: { path: '/editorBorder', queryKey: 'journal_id' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '3',
|
||||||
|
label: this.$t('autoPromotion.factoryExpertYoungBoard'),
|
||||||
|
desc: this.$t('autoPromotion.factoryExpertYoungBoard'),
|
||||||
|
icon: 'el-icon-user',
|
||||||
|
count: counts.young,
|
||||||
|
jump: { path: '/youthList', queryKey: 'journal_id' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '4',
|
||||||
|
label: this.$t('autoPromotion.factoryExpertAuthor'),
|
||||||
|
desc: this.$t('autoPromotion.factoryExpertAuthor'),
|
||||||
|
icon: 'el-icon-edit',
|
||||||
|
count: counts.author,
|
||||||
|
jump: { path: '/partyListCorr', queryKey: 'journal_id' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '5',
|
||||||
|
label: this.$t('autoPromotion.factoryExpertDb'),
|
||||||
|
desc: this.$t('autoPromotion.factoryExpertDb'),
|
||||||
|
icon: 'el-icon-collection',
|
||||||
|
count: counts.expertDb,
|
||||||
|
jump: { path: '/expertDatabase', queryKey: 'journal_id' }
|
||||||
|
}
|
||||||
|
];
|
||||||
|
},
|
||||||
|
visibleExpertOptions() {
|
||||||
|
if (!this.isEditMode) return this.expertOptions;
|
||||||
|
const current = String(this.expertType || '').trim();
|
||||||
|
return this.expertOptions.filter((opt) => String(opt.value) === current);
|
||||||
},
|
},
|
||||||
isEditMode() {
|
isEditMode() {
|
||||||
const task = this.initialTask;
|
const task = this.initialTask;
|
||||||
@@ -440,6 +532,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleExpertTypeClick(v) {
|
||||||
|
if (this.isEditMode) return;
|
||||||
|
this.expertType = v;
|
||||||
|
},
|
||||||
handleDialogOpen() {
|
handleDialogOpen() {
|
||||||
this.initDialogState();
|
this.initDialogState();
|
||||||
},
|
},
|
||||||
@@ -472,7 +568,11 @@
|
|||||||
await this.loadAccounts(this.selectedJournalId);
|
await this.loadAccounts(this.selectedJournalId);
|
||||||
const initialSeed = await this.loadInitialTaskSeed();
|
const initialSeed = await this.loadInitialTaskSeed();
|
||||||
await this.applyInitialTaskSeed(initialSeed);
|
await this.applyInitialTaskSeed(initialSeed);
|
||||||
await Promise.all([this.loadAvailableFields(this.selectedJournalId), this.refreshSendCountMax()]);
|
await Promise.all([
|
||||||
|
this.loadAvailableFields(this.selectedJournalId),
|
||||||
|
this.isExpertDatabaseType ? this.refreshSendCountMax() : Promise.resolve()
|
||||||
|
]);
|
||||||
|
this.fetchExpertTypeCounts();
|
||||||
this.syncActiveStep();
|
this.syncActiveStep();
|
||||||
} else {
|
} else {
|
||||||
await this.onJournalChange(this.selectedJournalId);
|
await this.onJournalChange(this.selectedJournalId);
|
||||||
@@ -697,22 +797,23 @@
|
|||||||
s = 1;
|
s = 1;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.selectedEmailIds &&
|
|
||||||
this.selectedEmailIds.length > 0 &&
|
|
||||||
String(this.factoryType || '').trim() !== '' &&
|
String(this.factoryType || '').trim() !== '' &&
|
||||||
String(this.expertType || '').trim() !== '' &&
|
String(this.expertType || '').trim() !== '' &&
|
||||||
this.sendCount != null &&
|
this.sendCount != null &&
|
||||||
this.sendCount >= 1
|
this.sendCount >= 1 &&
|
||||||
|
this.selectedEmailIds &&
|
||||||
|
this.selectedEmailIds.length > 0
|
||||||
) {
|
) {
|
||||||
s = 2;
|
s = 2;
|
||||||
}
|
}
|
||||||
if (this.factoryFieldIds && this.factoryFieldIds.length > 0) {
|
if (this.isExpertDatabaseType && this.factoryZoneCountryIds && this.factoryZoneCountryIds.length > 0) {
|
||||||
s = 3;
|
s = 3;
|
||||||
}
|
}
|
||||||
if (this.factoryZoneCountryIds && this.factoryZoneCountryIds.length > 0) {
|
if (this.isExpertDatabaseType && this.factoryFieldIds && this.factoryFieldIds.length > 0) {
|
||||||
s = 4;
|
s = 4;
|
||||||
}
|
}
|
||||||
if (s >= 4) s = 4;
|
var maxIdx = (this.factorySteps && this.factorySteps.length ? this.factorySteps.length : 1) - 1;
|
||||||
|
if (s > maxIdx) s = maxIdx;
|
||||||
this.activeStep = s;
|
this.activeStep = s;
|
||||||
},
|
},
|
||||||
async loadJournalList() {
|
async loadJournalList() {
|
||||||
@@ -721,7 +822,9 @@
|
|||||||
this.journalList = externalList.map(function (item) {
|
this.journalList = externalList.map(function (item) {
|
||||||
return {
|
return {
|
||||||
journal_id: item.journal_id != null ? item.journal_id : item.id,
|
journal_id: item.journal_id != null ? item.journal_id : item.id,
|
||||||
title: item.title || item.journal_title || item.name || ''
|
title: item.title || item.journal_title || item.name || '',
|
||||||
|
journal_icon: item.journal_icon || '',
|
||||||
|
abbr: item.abbr || ''
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -737,9 +840,12 @@
|
|||||||
list = res;
|
list = res;
|
||||||
}
|
}
|
||||||
this.journalList = list.map(function (item) {
|
this.journalList = list.map(function (item) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
journal_id: item.journal_id != null ? item.journal_id : item.id,
|
journal_id: item.journal_id != null ? item.journal_id : item.id,
|
||||||
title: item.title || item.name || ''
|
title: item.title || item.name || '',
|
||||||
|
journal_icon: item.journal_icon || '',
|
||||||
|
abbr: item.abbr || ''
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -749,19 +855,151 @@
|
|||||||
this.journalLoading = false;
|
this.journalLoading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async handleSelect(id) {
|
||||||
|
if (this.isEditMode) return;
|
||||||
|
|
||||||
|
// 如果点击的是当前已选中的,则置空(实现取消选中功能)
|
||||||
|
const newValue = this.selectedJournalId === id ? null : id;
|
||||||
|
|
||||||
|
// 更新 v-model 绑定的变量
|
||||||
|
this.selectedJournalId = newValue;
|
||||||
|
|
||||||
|
// 调用你原有的业务逻辑方法
|
||||||
|
await this.onJournalChange(newValue);
|
||||||
|
},
|
||||||
async onJournalChange(val) {
|
async onJournalChange(val) {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
this.accountList = [];
|
this.accountList = [];
|
||||||
this.availableFields = [];
|
this.availableFields = [];
|
||||||
this.factoryFieldIds = [];
|
this.factoryFieldIds = [];
|
||||||
this.selectedEmailIds = [];
|
this.selectedEmailIds = [];
|
||||||
|
this.expertTypeCounts = { chief: null, board: null, young: null, author: null, reviewer: null, expertDb: null };
|
||||||
this.syncActiveStep();
|
this.syncActiveStep();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 切换期刊时:先清空旧人数并立即触发 loading
|
||||||
|
this.expertTypeCounts = { chief: null, board: null, young: null, author: null, reviewer: null, expertDb: null };
|
||||||
|
this.fetchExpertTypeCounts();
|
||||||
await this.loadAccounts(val);
|
await this.loadAccounts(val);
|
||||||
await Promise.all([this.loadAvailableFields(val), this.refreshSendCountMax()]);
|
await Promise.all([
|
||||||
|
this.loadAvailableFields(val),
|
||||||
|
this.refreshSendCountMax()
|
||||||
|
]);
|
||||||
this.syncActiveStep();
|
this.syncActiveStep();
|
||||||
},
|
},
|
||||||
|
openExpertTypeJump(opt) {
|
||||||
|
const jump = opt && opt.jump;
|
||||||
|
if (!jump || !jump.path) return;
|
||||||
|
const journalId = this.selectedJournalId;
|
||||||
|
// 不使用 query(会污染地址栏 + Tags fullPath);改用 sessionStorage 传参,目标页读取一次后即销毁
|
||||||
|
try {
|
||||||
|
const payload = {
|
||||||
|
from: 'promotionFactory',
|
||||||
|
journal_id: journalId != null && journalId !== '' ? String(journalId) : '',
|
||||||
|
ts: Date.now(),
|
||||||
|
targetPath: String(jump.path || '')
|
||||||
|
};
|
||||||
|
sessionStorage.setItem('promotionFactoryJump', JSON.stringify(payload));
|
||||||
|
} catch (e) {}
|
||||||
|
// 跳转前先关闭并销毁弹窗(destroy-on-close),避免“中间态”残留
|
||||||
|
this.innerVisible = false;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$router.push({ path: jump.path });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async fetchExpertTypeCounts() {
|
||||||
|
const journalId = this.selectedJournalId;
|
||||||
|
if (!journalId) return;
|
||||||
|
const reqId = ++this.expertTypeCountsReqSeq;
|
||||||
|
this.expertTypeCountsLoading = true;
|
||||||
|
try {
|
||||||
|
const safeCount = (v) => (v == null || isNaN(Number(v)) ? 0 : Number(v));
|
||||||
|
const countBoardMembers = (member) => {
|
||||||
|
if (!member) return 0;
|
||||||
|
if (Array.isArray(member)) return member.length;
|
||||||
|
let sum = 0;
|
||||||
|
Object.keys(member).forEach((k) => {
|
||||||
|
const v = member[k];
|
||||||
|
if (Array.isArray(v)) sum += v.length;
|
||||||
|
else if (v && typeof v === 'object' && Array.isArray(v.list)) sum += v.list.length;
|
||||||
|
else if (v && typeof v === 'object' && Array.isArray(v.data)) sum += v.data.length;
|
||||||
|
else if (v && typeof v === 'object') sum += 1;
|
||||||
|
});
|
||||||
|
return sum;
|
||||||
|
};
|
||||||
|
|
||||||
|
const [boardRes, youngRes, authorRes, reviewerRes, expertDbRes] = await Promise.all([
|
||||||
|
this.$api.post('api/Board/getBoards', { journal_id: journalId }).catch(() => null),
|
||||||
|
this.$api
|
||||||
|
.post('api/User/getYboardlist', {
|
||||||
|
journal_id: journalId,
|
||||||
|
type: 1,
|
||||||
|
year: 0,
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 1,
|
||||||
|
keywords: '',
|
||||||
|
fieldkey: '',
|
||||||
|
order_remark: 0
|
||||||
|
})
|
||||||
|
.catch(() => null),
|
||||||
|
this.$api
|
||||||
|
.post('api/User/authorDatabase', {
|
||||||
|
journal_id: journalId,
|
||||||
|
keywords: '',
|
||||||
|
page: 1,
|
||||||
|
limit: 1
|
||||||
|
})
|
||||||
|
.catch(() => null),
|
||||||
|
this.$api
|
||||||
|
.post('api/Reviewer/getReviewerListByJournal', {
|
||||||
|
username: localStorage.getItem('U_name'),
|
||||||
|
journalId: journalId,
|
||||||
|
class: 0,
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 1
|
||||||
|
})
|
||||||
|
.catch(() => null),
|
||||||
|
this.$api
|
||||||
|
.post('api/expert_manage/getList', {
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 1
|
||||||
|
})
|
||||||
|
.catch(() => null)
|
||||||
|
]);
|
||||||
|
|
||||||
|
const next = { chief: null, board: null, young: null, author: null, reviewer: null, expertDb: null };
|
||||||
|
|
||||||
|
if (boardRes && boardRes.code === 0 && boardRes.data && boardRes.data.boards) {
|
||||||
|
const b = boardRes.data.boards || {};
|
||||||
|
const chief = Array.isArray(b.main) ? b.main.length : 0;
|
||||||
|
const remain = Array.isArray(b.remain) ? b.remain.length : 0;
|
||||||
|
const member = countBoardMembers(b.member);
|
||||||
|
next.chief = safeCount(chief);
|
||||||
|
next.board = safeCount(remain + member);
|
||||||
|
}
|
||||||
|
if (youngRes && youngRes.code === 0) {
|
||||||
|
next.young = safeCount(youngRes.data && youngRes.data.count);
|
||||||
|
}
|
||||||
|
if (authorRes && authorRes.code === 0) {
|
||||||
|
next.author = safeCount(authorRes.data && authorRes.data.count);
|
||||||
|
}
|
||||||
|
if (reviewerRes && reviewerRes.code === 0) {
|
||||||
|
next.reviewer = safeCount(reviewerRes.total);
|
||||||
|
}
|
||||||
|
if (expertDbRes && expertDbRes.code === 0) {
|
||||||
|
const total = (expertDbRes.data && (expertDbRes.data.total || expertDbRes.data.count)) || expertDbRes.total;
|
||||||
|
next.expertDb = safeCount(total);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 防止快速切换期刊导致旧请求覆盖新请求
|
||||||
|
if (reqId !== this.expertTypeCountsReqSeq) return;
|
||||||
|
this.expertTypeCounts = next;
|
||||||
|
} finally {
|
||||||
|
if (reqId === this.expertTypeCountsReqSeq) {
|
||||||
|
this.expertTypeCountsLoading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
async loadAccounts(id) {
|
async loadAccounts(id) {
|
||||||
this.accountsLoading = true;
|
this.accountsLoading = true;
|
||||||
try {
|
try {
|
||||||
@@ -879,18 +1117,18 @@
|
|||||||
let fromApi = false;
|
let fromApi = false;
|
||||||
try {
|
try {
|
||||||
if (this.selectedEmailIds && this.selectedEmailIds.length > 0) {
|
if (this.selectedEmailIds && this.selectedEmailIds.length > 0) {
|
||||||
|
// 优先走后端限制接口:api/promotion_factory/getCountForPromotionEmailIds
|
||||||
const emailCap = await this.loadSendCountMaxFromEmailIds();
|
const emailCap = await this.loadSendCountMaxFromEmailIds();
|
||||||
if (emailCap.max > 0) {
|
if (emailCap.max > 0) {
|
||||||
max = emailCap.max;
|
max = emailCap.max;
|
||||||
fromApi = emailCap.fromApi;
|
fromApi = emailCap.fromApi;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 没有选账号或接口不可用时:回退为邮箱额度合计(或默认上限)
|
||||||
if (!max || max < 1) {
|
if (!max || max < 1) {
|
||||||
const fallbackCap = this.loadSendCountMaxFallback();
|
const fallbackCap = this.loadSendCountMaxFallback();
|
||||||
max = fallbackCap.max;
|
max = fallbackCap.max;
|
||||||
if (!fromApi && fallbackCap.fromApi) {
|
fromApi = false;
|
||||||
fromApi = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
@@ -994,11 +1232,19 @@
|
|||||||
this.$message.warning(this.$t('autoPromotion.factoryNeedExpertType'));
|
this.$message.warning(this.$t('autoPromotion.factoryNeedExpertType'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.factoryFieldIds || !this.factoryFieldIds.length) {
|
if (!String(this.factoryType || '').trim()) {
|
||||||
|
this.$message.warning(this.$t('autoPromotion.factoryNeedExpertType'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.sendCount == null || Number(this.sendCount) < 1) {
|
||||||
|
this.$message.warning(this.$t('autoPromotion.factoryFillRequired'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.isExpertDatabaseType && (!this.factoryFieldIds || !this.factoryFieldIds.length)) {
|
||||||
this.$message.warning(this.$t('autoPromotion.factoryNeedPromotionFields'));
|
this.$message.warning(this.$t('autoPromotion.factoryNeedPromotionFields'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.factoryZoneCountryIds || !this.factoryZoneCountryIds.length) {
|
if (this.isExpertDatabaseType && (!this.factoryZoneCountryIds || !this.factoryZoneCountryIds.length)) {
|
||||||
this.$message.warning(this.$t('autoPromotion.factoryNeedPromotionCountry'));
|
this.$message.warning(this.$t('autoPromotion.factoryNeedPromotionCountry'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1011,9 +1257,9 @@
|
|||||||
send_count: String(this.sendCount),
|
send_count: String(this.sendCount),
|
||||||
template_id: String(this.factoryConfig.defaultTemplateId),
|
template_id: String(this.factoryConfig.defaultTemplateId),
|
||||||
style_id: String(this.factoryConfig.defaultStyleId),
|
style_id: String(this.factoryConfig.defaultStyleId),
|
||||||
fetch_ids: (this.factoryFieldIds || []).join(','),
|
fetch_ids: this.isExpertDatabaseType ? (this.factoryFieldIds || []).join(',') : '',
|
||||||
target_partitions: pc.target_partitions,
|
target_partitions: this.isExpertDatabaseType ? pc.target_partitions : '',
|
||||||
target_country_ids: pc.target_country_ids,
|
target_country_ids: this.isExpertDatabaseType ? pc.target_country_ids : '',
|
||||||
start_promotion: '0'
|
start_promotion: '0'
|
||||||
};
|
};
|
||||||
const endpoint = this.isEditMode ? API_FACTORY_EDIT : API_FACTORY_ADD;
|
const endpoint = this.isEditMode ? API_FACTORY_EDIT : API_FACTORY_ADD;
|
||||||
@@ -1098,10 +1344,10 @@
|
|||||||
|
|
||||||
/* 左侧步骤条样式 (模仿图一) */
|
/* 左侧步骤条样式 (模仿图一) */
|
||||||
.step-navigation {
|
.step-navigation {
|
||||||
width: 240px;
|
width: 230px;
|
||||||
background: #fafbfc;
|
background: #fafbfc;
|
||||||
border-right: 1px solid #edf0f5;
|
border-right: 1px solid #edf0f5;
|
||||||
padding: 10px 20px 30px 10px;
|
padding: 10px 20px 30px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.step-item {
|
.step-item {
|
||||||
@@ -1300,10 +1546,10 @@
|
|||||||
.click-card {
|
.click-card {
|
||||||
border: 1px dashed #dcdfe6;
|
border: 1px dashed #dcdfe6;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
padding: 15px;
|
padding: 4px 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
min-height: 50px;
|
min-height: 30px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
@@ -1325,21 +1571,69 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.account-grid-layout {
|
.account-grid-layout {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
/* 如果希望固定 3 个一行:repeat(3, 1fr);如果自适应:repeat(auto-fill, minmax(280px, 1fr)) */
|
||||||
gap: 8px;
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||||
}
|
gap: 8px;
|
||||||
|
}
|
||||||
.acc-box {
|
|
||||||
background: #fff;
|
/* 账号外框:大幅缩小内边距和高度 */
|
||||||
border: 1px solid #e4e7ed;
|
.acc-box {
|
||||||
padding: 4px 10px;
|
border: 1px solid #e4e7ed;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
padding: 4px 10px; /* 极窄内边距 */
|
||||||
|
background: #fff;
|
||||||
.acc-info { display: flex; flex-direction: column; margin-left: 5px; }
|
transition: all 0.2s;
|
||||||
.acc-info .u { font-size: 12px; font-weight: 500; color: #333; }
|
display: flex;
|
||||||
.acc-info .m { font-size: 11px; color: #999; }
|
align-items: center;
|
||||||
|
height: 32px; /* 强制固定一行的高度 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.acc-box:hover {
|
||||||
|
border-color: #409eff;
|
||||||
|
background-color: #f0f7ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 内部信息:改为横向 Flex */
|
||||||
|
.acc-info-inline {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.acc-info-inline .u {
|
||||||
|
color: #333;
|
||||||
|
font-weight: 500;
|
||||||
|
max-width: 180px; /* 防止邮箱过长撑破布局 */
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.acc-info-inline .m {
|
||||||
|
color: #909399;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider {
|
||||||
|
color: #dcdfe6;
|
||||||
|
margin: 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 深度选择器:去除 Element 默认的间距 */
|
||||||
|
.acc-box /deep/ .el-checkbox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.acc-box /deep/ .el-checkbox__label {
|
||||||
|
padding-left: 8px;
|
||||||
|
line-height: 1;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
/* 底部参数栏:白底 + 左侧蓝边;标签与控件同一行横向排布 */
|
/* 底部参数栏:白底 + 左侧蓝边;标签与控件同一行横向排布 */
|
||||||
.parameter-bar {
|
.parameter-bar {
|
||||||
@@ -1483,4 +1777,301 @@
|
|||||||
padding-top:15px !important;
|
padding-top:15px !important;
|
||||||
padding-bottom:15px !important;
|
padding-bottom:15px !important;
|
||||||
}
|
}
|
||||||
</style>
|
.journal-grid {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 16px;
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.journal-card {
|
||||||
|
width: 80px; /* 根据实际需求调整宽度 */
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
transition: all 0.3s;
|
||||||
|
border: 2px solid transparent;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 4px;
|
||||||
|
text-align: center;
|
||||||
|
background: #f8f9fa;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-active {
|
||||||
|
border-color: #409eff; /* ElementUI 主题色 */
|
||||||
|
background: #ecf5ff;
|
||||||
|
.journal-abbreviation {
|
||||||
|
color: #409eff;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-disabled {
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0.6;
|
||||||
|
filter: grayscale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.journal-cover {
|
||||||
|
width: 100%;
|
||||||
|
height: 110px; /* 保持期刊封面比例 */
|
||||||
|
margin-bottom: 8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
||||||
|
|
||||||
|
.el-image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.journal-abbreviation {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #606266;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active-badge {
|
||||||
|
position: absolute;
|
||||||
|
top: -5px;
|
||||||
|
right: -5px;
|
||||||
|
background: #409eff;
|
||||||
|
color: white;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
font-size: 12px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
/* 3. 核心美化区块:期刊+专家合并 */
|
||||||
|
.combined-selector-container {
|
||||||
|
display: flex;
|
||||||
|
gap: 30px; /* 期刊和专家类型之间的间距 */
|
||||||
|
background: #f8fafc;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 16px;
|
||||||
|
border: 1px solid #ebf0f5;
|
||||||
|
align-items: flex-start; /* 顶部对齐 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 左侧期刊区域:由内容撑开,不收缩 */
|
||||||
|
.journal-selection-side {
|
||||||
|
flex-shrink: 0;
|
||||||
|
max-width:450px;
|
||||||
|
|
||||||
|
/* 如果你想让左侧也稍微宽点,可以设置 min-width: 300px; */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.mini-label {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #909399;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 左侧期刊:更紧凑的列表 */
|
||||||
|
.journal-selection-side {
|
||||||
|
flex: 1;
|
||||||
|
border-right: 1px solid #e4e7ed;
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.journal-grid-compact {
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.journal-card-mini {
|
||||||
|
width: 70px;
|
||||||
|
position: relative;
|
||||||
|
cursor: pointer;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mini-cover {
|
||||||
|
width: 70px;
|
||||||
|
height: 90px;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
|
||||||
|
border: 2px solid transparent;
|
||||||
|
transition: 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.journal-card-mini.is-active .mini-cover {
|
||||||
|
border-color: #409eff;
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mini-abbr {
|
||||||
|
font-size: 11px;
|
||||||
|
margin-top: 5px;
|
||||||
|
color: #606266;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
/* 期刊网格微调 */
|
||||||
|
.journal-grid-compact { display: flex; flex-wrap: wrap; gap: 12px; }
|
||||||
|
.journal-card-mini { width: 70px; text-align: center; cursor: pointer; }
|
||||||
|
.mini-cover-wrapper { position: relative; width: 70px; height: 95px; }
|
||||||
|
.mini-cover {
|
||||||
|
width: 100%; height: 100%; border-radius: 4px; border: 2px solid transparent;
|
||||||
|
box-shadow: 0 2px 6px rgba(0,0,0,0.1); transition: 0.3s;
|
||||||
|
}
|
||||||
|
.journal-card-mini.is-active .mini-cover { border-color: #409eff; transform: translateY(-3px); }
|
||||||
|
.mini-badge {
|
||||||
|
position: absolute; top: -6px; right: -6px; background: #67c23a; color: #fff;
|
||||||
|
width: 18px; height: 18px; border-radius: 50%; font-size: 10px;
|
||||||
|
display: flex; align-items: center; justify-content: center; z-index: 2;
|
||||||
|
}
|
||||||
|
.mini-abbr { font-size: 11px; color: #606266; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; }
|
||||||
|
.mini-abbr.is-active {
|
||||||
|
color: #409eff;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.expert-type-side {
|
||||||
|
flex: 1; /* 核心代码:占据剩余空间 */
|
||||||
|
min-width: 0; /* 防止 Flex 子项溢出 */
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.mini-label {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #909399;
|
||||||
|
margin-bottom: 8px; /* 紧凑间距 */
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.expert-tile-group {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.expert-tile-mini {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 6px 12px;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #e4e7ed;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
/* --- 关键修改:不强制占满 --- */
|
||||||
|
flex: 0 0 auto; /* 不放大,不缩小,根据内容定宽度 */
|
||||||
|
min-width: 140px; /* 给一个最小宽度,保证整齐度 */
|
||||||
|
max-width: 300px; /* 限制最大宽度,防止太长 */
|
||||||
|
/* ------------------------ */
|
||||||
|
|
||||||
|
height: 34px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.expert-tile-mini.is-disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
|
opacity: 0.75;
|
||||||
|
}
|
||||||
|
|
||||||
|
.expert-tile-mini.is-disabled:hover {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tile-text {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #606266;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tile-count {
|
||||||
|
margin-left: 4px;
|
||||||
|
color: #909399;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
.tile-count--loading {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
.tile-link-btn {
|
||||||
|
padding: 0;
|
||||||
|
margin-left: auto;
|
||||||
|
line-height: 1;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tile-spinner {
|
||||||
|
margin-left: 6px;
|
||||||
|
color: #409eff;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 选中状态 */
|
||||||
|
.expert-tile-mini.is-active {
|
||||||
|
border-color: #409eff;
|
||||||
|
background-color: #f0f7ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.expert-tile-mini:hover {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.expert-tile-mini.is-active .tile-text {
|
||||||
|
color: #409eff;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 选中图标微型化 */
|
||||||
|
.expert-tile-mini i {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 隐藏横向滚动条,美化纵向滚动条 */
|
||||||
|
.custom-scrollbar::-webkit-scrollbar {
|
||||||
|
width: 4px;
|
||||||
|
}
|
||||||
|
.custom-scrollbar::-webkit-scrollbar-thumb {
|
||||||
|
background: #e4e7ed;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 激活状态左侧的小指示条(可选,增加精致感) */
|
||||||
|
.expert-tile-mini.is-active {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.expert-tile-mini.is-active::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 4px;
|
||||||
|
bottom: 4px;
|
||||||
|
width: 2px;
|
||||||
|
background: #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -771,6 +771,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import bus from '../common/bus'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -1188,6 +1189,43 @@ export default {
|
|||||||
this.getjour();
|
this.getjour();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
readPromotionFactoryJumpJournalId() {
|
||||||
|
try {
|
||||||
|
const raw = sessionStorage.getItem('promotionFactoryJump');
|
||||||
|
if (!raw) return '';
|
||||||
|
const obj = JSON.parse(raw || '{}');
|
||||||
|
if (!obj || obj.from !== 'promotionFactory') return '';
|
||||||
|
if (obj.targetPath && String(obj.targetPath) !== String(this.$route.path)) return '';
|
||||||
|
const id = obj.journal_id != null ? String(obj.journal_id) : '';
|
||||||
|
sessionStorage.removeItem('promotionFactoryJump');
|
||||||
|
return id;
|
||||||
|
} catch (e) {
|
||||||
|
try {
|
||||||
|
sessionStorage.removeItem('promotionFactoryJump');
|
||||||
|
} catch (e2) {}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
forceClearJumpQuery() {
|
||||||
|
const q = (this.$route && this.$route.query) || {};
|
||||||
|
const has = q && (q._ap_from || q.journal_id || q.journalId || q.journalIdd);
|
||||||
|
if (!has) return;
|
||||||
|
const oldFullPath = this.$route && this.$route.fullPath ? this.$route.fullPath : '';
|
||||||
|
const nextQuery = Object.assign({}, q);
|
||||||
|
delete nextQuery._ap_from;
|
||||||
|
delete nextQuery.journal_id;
|
||||||
|
delete nextQuery.journalId;
|
||||||
|
delete nextQuery.journalIdd;
|
||||||
|
// 关闭“中间态 fullPath”对应的标签页,避免残留在顶部 Tags
|
||||||
|
if (oldFullPath) {
|
||||||
|
bus.$emit('close_tag_by_path', { path: oldFullPath, silent: true });
|
||||||
|
}
|
||||||
|
this.$router.replace({ path: this.$route.path, query: nextQuery }).catch(() => {});
|
||||||
|
try {
|
||||||
|
const cleanUrl = window.location.origin + this.$route.path;
|
||||||
|
window.history.replaceState({}, '', cleanUrl);
|
||||||
|
} catch (e) {}
|
||||||
|
},
|
||||||
unplIcon() {
|
unplIcon() {
|
||||||
this.$refs['upIconIMg'].$refs['upload-inner'].handleClick();
|
this.$refs['upIconIMg'].$refs['upload-inner'].handleClick();
|
||||||
},
|
},
|
||||||
@@ -1314,9 +1352,28 @@ export default {
|
|||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.df_jour = res.data.journals;
|
this.df_jour = res.data.journals;
|
||||||
this.add_jour = res.data.journals;
|
this.add_jour = res.data.journals;
|
||||||
this.query.journal_id = this.df_jour[0].journal_id;
|
const fromQueryId = this.$route && this.$route.query ? this.$route.query.journal_id : '';
|
||||||
this.query.journal_title = this.df_jour[0].title;
|
const fromSessionId = this.readPromotionFactoryJumpJournalId();
|
||||||
|
const pickedId = fromQueryId || fromSessionId;
|
||||||
|
const matched = pickedId ? this.df_jour.find((j) => String(j.journal_id) === String(pickedId)) : null;
|
||||||
|
const first = this.df_jour[0];
|
||||||
|
const picked = matched || first;
|
||||||
|
this.query.journal_id = picked ? picked.journal_id : 0;
|
||||||
|
this.query.journal_title = picked ? picked.title : '';
|
||||||
this.getgroup();
|
this.getgroup();
|
||||||
|
|
||||||
|
// 仅首次接收参数:应用后立刻清掉 URL,避免刷新仍然固定某一本期刊
|
||||||
|
if (fromQueryId) {
|
||||||
|
const nextQuery = Object.assign({}, (this.$route && this.$route.query) || {});
|
||||||
|
delete nextQuery.journal_id;
|
||||||
|
delete nextQuery.journalId;
|
||||||
|
delete nextQuery._ap_from;
|
||||||
|
this.$router.replace({ path: this.$route.path, query: nextQuery }).catch(() => {});
|
||||||
|
// 双保险:路由稳定后再强制清参一次,避免地址栏残留“中间态”
|
||||||
|
setTimeout(() => {
|
||||||
|
this.forceClearJumpQuery();
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -424,6 +424,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import bus from '../common/bus'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -435,8 +436,7 @@ export default {
|
|||||||
baseUrl: this.Common.baseUrl,
|
baseUrl: this.Common.baseUrl,
|
||||||
mediaUrl: this.Common.mediaUrl,
|
mediaUrl: this.Common.mediaUrl,
|
||||||
query: {
|
query: {
|
||||||
// journal_id: '',
|
journal_id: 0,
|
||||||
// year: 0,
|
|
||||||
keywords: '',
|
keywords: '',
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 15
|
limit: 15
|
||||||
@@ -472,6 +472,23 @@ export default {
|
|||||||
this.initMajor();
|
this.initMajor();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
readPromotionFactoryJumpJournalId() {
|
||||||
|
try {
|
||||||
|
const raw = sessionStorage.getItem('promotionFactoryJump');
|
||||||
|
if (!raw) return '';
|
||||||
|
const obj = JSON.parse(raw || '{}');
|
||||||
|
if (!obj || obj.from !== 'promotionFactory') return '';
|
||||||
|
if (obj.targetPath && String(obj.targetPath) !== String(this.$route.path)) return '';
|
||||||
|
const id = obj.journal_id != null ? String(obj.journal_id) : '';
|
||||||
|
sessionStorage.removeItem('promotionFactoryJump');
|
||||||
|
return id;
|
||||||
|
} catch (e) {
|
||||||
|
try {
|
||||||
|
sessionStorage.removeItem('promotionFactoryJump');
|
||||||
|
} catch (e2) {}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
goDetail(row) {
|
goDetail(row) {
|
||||||
console.log('row at line 460:', row);
|
console.log('row at line 460:', row);
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
@@ -518,8 +535,31 @@ export default {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.jourList = res.data.journals;
|
this.jourList = res.data.journals;
|
||||||
this.query.journal_id = this.jourList[0].journal_id;
|
const fromQueryId = this.$route && this.$route.query ? this.$route.query.journal_id : '';
|
||||||
|
const fromSessionId = this.readPromotionFactoryJumpJournalId();
|
||||||
|
const pickedId = fromQueryId || fromSessionId;
|
||||||
|
const matched = pickedId ? this.jourList.find((j) => String(j.journal_id) === String(pickedId)) : null;
|
||||||
|
this.query.journal_id = matched ? matched.journal_id : this.jourList[0].journal_id;
|
||||||
this.getData();
|
this.getData();
|
||||||
|
|
||||||
|
// 仅首次接收参数:应用后立刻清掉 URL,避免刷新仍然固定某一本期刊
|
||||||
|
if (fromQueryId) {
|
||||||
|
const oldFullPath = this.$route && this.$route.fullPath ? this.$route.fullPath : '';
|
||||||
|
const nextQuery = Object.assign({}, (this.$route && this.$route.query) || {});
|
||||||
|
delete nextQuery.journal_id;
|
||||||
|
delete nextQuery.journalId;
|
||||||
|
delete nextQuery._ap_from;
|
||||||
|
if (oldFullPath) {
|
||||||
|
bus.$emit('close_tag_by_path', { path: oldFullPath, silent: true });
|
||||||
|
}
|
||||||
|
this.$router.replace({ query: nextQuery }).catch(() => {});
|
||||||
|
// 兜底:某些场景 router.replace 不更新地址栏,这里强制清掉 query
|
||||||
|
try {
|
||||||
|
const u = new URL(window.location.href);
|
||||||
|
['_ap_from', 'journal_id', 'journalId', 'journalIdd'].forEach((k) => u.searchParams.delete(k));
|
||||||
|
window.history.replaceState({}, '', u.toString());
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -478,6 +478,7 @@ const currentYear = new Date().getFullYear();
|
|||||||
var ReviewTime = `(${currentYear - 2}–${currentYear})`;
|
var ReviewTime = `(${currentYear - 2}–${currentYear})`;
|
||||||
import commonReviewer from '../page/components/reviewerList/add.vue';
|
import commonReviewer from '../page/components/reviewerList/add.vue';
|
||||||
import commonMajorTableList from '../page/components/major/tableList.vue';
|
import commonMajorTableList from '../page/components/major/tableList.vue';
|
||||||
|
import bus from '../common/bus'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
commonReviewer,
|
commonReviewer,
|
||||||
@@ -657,11 +658,27 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDate();
|
this.getDate();
|
||||||
this.getContent();
|
|
||||||
this.loadFields();
|
this.loadFields();
|
||||||
// this.initMajor()
|
// this.initMajor()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
readPromotionFactoryJumpJournalId() {
|
||||||
|
try {
|
||||||
|
const raw = sessionStorage.getItem('promotionFactoryJump');
|
||||||
|
if (!raw) return '';
|
||||||
|
const obj = JSON.parse(raw || '{}');
|
||||||
|
if (!obj || obj.from !== 'promotionFactory') return '';
|
||||||
|
if (obj.targetPath && String(obj.targetPath) !== String(this.$route.path)) return '';
|
||||||
|
const id = obj.journal_id != null ? String(obj.journal_id) : '';
|
||||||
|
sessionStorage.removeItem('promotionFactoryJump');
|
||||||
|
return id;
|
||||||
|
} catch (e) {
|
||||||
|
try {
|
||||||
|
sessionStorage.removeItem('promotionFactoryJump');
|
||||||
|
} catch (e2) {}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
getProps() {
|
getProps() {
|
||||||
return {
|
return {
|
||||||
value: 'value',
|
value: 'value',
|
||||||
@@ -716,6 +733,32 @@ export default {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.df_jour = res.data.journals;
|
this.df_jour = res.data.journals;
|
||||||
|
const fromQueryId = (this.$route && this.$route.query && (this.$route.query.journalId || this.$route.query.journal_id)) || '';
|
||||||
|
const fromSessionId = this.readPromotionFactoryJumpJournalId();
|
||||||
|
const pickedId = fromQueryId || fromSessionId;
|
||||||
|
if (pickedId) {
|
||||||
|
this.query.journalId = Number(pickedId) || 0;
|
||||||
|
}
|
||||||
|
this.getContent();
|
||||||
|
|
||||||
|
// 仅首次接收参数:应用后立刻清掉 URL,避免刷新仍然固定某一本期刊
|
||||||
|
if (fromQueryId) {
|
||||||
|
const oldFullPath = this.$route && this.$route.fullPath ? this.$route.fullPath : '';
|
||||||
|
const nextQuery = Object.assign({}, (this.$route && this.$route.query) || {});
|
||||||
|
delete nextQuery.journal_id;
|
||||||
|
delete nextQuery.journalId;
|
||||||
|
delete nextQuery._ap_from;
|
||||||
|
if (oldFullPath) {
|
||||||
|
bus.$emit('close_tag_by_path', { path: oldFullPath, silent: true });
|
||||||
|
}
|
||||||
|
this.$router.replace({ query: nextQuery }).catch(() => {});
|
||||||
|
// 兜底:某些场景 router.replace 不更新地址栏,这里强制清掉 query
|
||||||
|
try {
|
||||||
|
const u = new URL(window.location.href);
|
||||||
|
['_ap_from', 'journal_id', 'journalId', 'journalIdd'].forEach((k) => u.searchParams.delete(k));
|
||||||
|
window.history.replaceState({}, '', u.toString());
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -248,6 +248,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import bus from '../common/bus'
|
||||||
export default {
|
export default {
|
||||||
name: 'youthList',
|
name: 'youthList',
|
||||||
data() {
|
data() {
|
||||||
@@ -326,6 +327,21 @@
|
|||||||
this.yearData()
|
this.yearData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
readPromotionFactoryJumpJournalId() {
|
||||||
|
try {
|
||||||
|
const raw = sessionStorage.getItem('promotionFactoryJump')
|
||||||
|
if (!raw) return ''
|
||||||
|
const obj = JSON.parse(raw || '{}')
|
||||||
|
if (!obj || obj.from !== 'promotionFactory') return ''
|
||||||
|
if (obj.targetPath && String(obj.targetPath) !== String(this.$route.path)) return ''
|
||||||
|
const id = obj.journal_id != null ? String(obj.journal_id) : ''
|
||||||
|
sessionStorage.removeItem('promotionFactoryJump')
|
||||||
|
return id
|
||||||
|
} catch (e) {
|
||||||
|
try { sessionStorage.removeItem('promotionFactoryJump') } catch (e2) {}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取当年时间
|
// 获取当年时间
|
||||||
yearData() {
|
yearData() {
|
||||||
this.YearThis = new Date().getFullYear()
|
this.YearThis = new Date().getFullYear()
|
||||||
@@ -347,8 +363,33 @@
|
|||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.df_jour = res.data.journals;
|
this.df_jour = res.data.journals;
|
||||||
this.query.journal_id = this.df_jour[0].journal_id
|
const fromQueryId =
|
||||||
|
(this.$route && this.$route.query && (this.$route.query.journal_id || this.$route.query.journalId)) || ''
|
||||||
|
const fromSessionId = this.readPromotionFactoryJumpJournalId()
|
||||||
|
const pickedId = fromQueryId || fromSessionId
|
||||||
|
const matched = pickedId ? this.df_jour.find(j => String(j.journal_id) === String(pickedId)) : null
|
||||||
|
this.query.journal_id = matched ? matched.journal_id : this.df_jour[0].journal_id
|
||||||
this.getDate();
|
this.getDate();
|
||||||
|
|
||||||
|
// 仅首次接收参数:应用后立刻清掉 URL,避免刷新仍然固定某一本期刊
|
||||||
|
if (fromQueryId) {
|
||||||
|
const oldFullPath = this.$route && this.$route.fullPath ? this.$route.fullPath : ''
|
||||||
|
const nextQuery = Object.assign({}, (this.$route && this.$route.query) || {})
|
||||||
|
delete nextQuery.journal_id
|
||||||
|
delete nextQuery.journalId
|
||||||
|
delete nextQuery.journalIdd
|
||||||
|
delete nextQuery._ap_from
|
||||||
|
if (oldFullPath) {
|
||||||
|
bus.$emit('close_tag_by_path', { path: oldFullPath, silent: true })
|
||||||
|
}
|
||||||
|
this.$router.replace({ path: this.$route.path, query: nextQuery }).catch(() => {})
|
||||||
|
// 兜底:某些场景 router.replace 不更新地址栏,这里强制清掉 query
|
||||||
|
try {
|
||||||
|
const u = new URL(window.location.href)
|
||||||
|
;['_ap_from', 'journal_id', 'journalId', 'journalIdd'].forEach(k => u.searchParams.delete(k))
|
||||||
|
window.history.replaceState({}, '', u.toString())
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user