修改邮件模版预览按钮
This commit is contained in:
@@ -62,6 +62,10 @@ export default {
|
|||||||
|
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
|
language: {
|
||||||
|
type: String,
|
||||||
|
default: 'en'
|
||||||
|
},
|
||||||
placeholder: {
|
placeholder: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
@@ -87,13 +91,29 @@ export default {
|
|||||||
expert_name: "John Doe", // 专家姓名
|
expert_name: "John Doe", // 专家姓名
|
||||||
expert_field: "Biomedical Engineering", // 专家研究领域
|
expert_field: "Biomedical Engineering", // 专家研究领域
|
||||||
representative_work_title: "Advanced Applications of AI in Medical Imaging", // 专家代表作标题
|
representative_work_title: "Advanced Applications of AI in Medical Imaging", // 专家代表作标题
|
||||||
// ai_content_analysis: "", // AI 约稿理由分析
|
ai_content_analysis: "【AI分析文章,一句话总结】", // AI solicitation rationale
|
||||||
|
ai_advised_topics: "Based on your research expertise, we would particularly welcome submissions on topics such as 【这里是AI针对学者领域给特定约稿主题】, or other closely related areas that align with your work.", // AI suggested directions
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
isZhLanguage() {
|
||||||
|
return String(this.language || '').toLowerCase() === 'zh';
|
||||||
|
},
|
||||||
|
localizedAiMockData() {
|
||||||
|
if (this.isZhLanguage) {
|
||||||
|
return {
|
||||||
|
ai_content_analysis: '【AI分析这篇文章,一句话总结】。【我们希望也关注个领域】',
|
||||||
|
ai_advised_topics: '我们尤其关注如【方向/题目建议1】、【方向/题目建议2】以及【方向/题目建议3】等相关议题的研究进展。'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
ai_content_analysis: '【AI分析文章,一句话总结】',
|
||||||
|
ai_advised_topics: 'Based on your research expertise, we would particularly welcome submissions on topics such as 【这里是AI针对学者领域给特定约稿主题】, or other closely related areas that align with your work.'
|
||||||
|
};
|
||||||
|
},
|
||||||
resolvedPlaceholder() {
|
resolvedPlaceholder() {
|
||||||
return this.placeholder || (this.$t && this.$t('tmrEmailEditor.placeholder')) || '请输入邮件内容...';
|
return this.placeholder || (this.$t && this.$t('tmrEmailEditor.placeholder')) || '请输入邮件内容...';
|
||||||
},
|
},
|
||||||
@@ -141,6 +161,7 @@ const deadlineStr = oneMonthLater.toISOString().split('T')[0];
|
|||||||
|
|
||||||
const map = {
|
const map = {
|
||||||
...this.variableMockData,
|
...this.variableMockData,
|
||||||
|
...this.localizedAiMockData,
|
||||||
journal_abbr: journal_info.jabbr, // 期刊缩写
|
journal_abbr: journal_info.jabbr, // 期刊缩写
|
||||||
journal_name: journal_info.title,// 期刊全称
|
journal_name: journal_info.title,// 期刊全称
|
||||||
journal_url: journal_info.website, // 期刊官网链接
|
journal_url: journal_info.website, // 期刊官网链接
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<div class="country-manage">
|
<div class="country-manage">
|
||||||
<div class="crumbs">
|
<div class="crumbs">
|
||||||
<el-breadcrumb separator="/">
|
<el-breadcrumb separator="/">
|
||||||
|
|
||||||
<el-breadcrumb-item> <i class="el-icon-place"></i> {{ $t('countryManagement.title') }}</el-breadcrumb-item>
|
<el-breadcrumb-item> <i class="el-icon-place"></i> {{ $t('countryManagement.title') }}</el-breadcrumb-item>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,9 +35,11 @@
|
|||||||
{{ $t('countryManagement.searchBtn') }}
|
{{ $t('countryManagement.searchBtn') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="handleReset">{{ $t('countryManagement.resetBtn') }}</el-button>
|
<el-button @click="handleReset">{{ $t('countryManagement.resetBtn') }}</el-button>
|
||||||
<el-button type="warning" plain icon="el-icon-upload2" @click="openBatchPartitionDialog">
|
<!-- 批量修改分区按钮 -->
|
||||||
|
<!-- <el-button type="warning" plain icon="el-icon-upload2" @click="openBatchPartitionDialog">
|
||||||
|
|
||||||
{{ $t('countryManagement.batchPartitionBtn') }}
|
{{ $t('countryManagement.batchPartitionBtn') }}
|
||||||
</el-button>
|
</el-button> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -132,101 +133,115 @@
|
|||||||
destroy-on-close
|
destroy-on-close
|
||||||
@closed="resetBatchPartitionDialog"
|
@closed="resetBatchPartitionDialog"
|
||||||
>
|
>
|
||||||
<div style="display: flex;align-items: center;justify-content: space-between;">
|
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||||
<div class="batch-partition-content" style="width: 100%;">
|
<div class="batch-partition-content" style="width: 100%">
|
||||||
<el-form label-width="120px" size="small" class="batch-partition-target-form">
|
<el-form label-width="120px" size="small" class="batch-partition-target-form">
|
||||||
<el-form-item :label="$t('countryManagement.batchPartitionTargetLabel')">
|
<el-form-item :label="$t('countryManagement.batchPartitionTargetLabel')">
|
||||||
<el-select v-model="batchPartitionTargetPartition" style="width: 220px" @change="handleBatchPartitionDraftChange">
|
<el-select
|
||||||
<el-option :label="$t('countryManagement.partition1')" value="1" />
|
v-model="batchPartitionTargetPartition"
|
||||||
<el-option :label="$t('countryManagement.partition2')" value="2" />
|
style="width: 220px"
|
||||||
<el-option :label="$t('countryManagement.partition3')" value="3" />
|
@change="handleBatchPartitionDraftChange"
|
||||||
</el-select>
|
>
|
||||||
</el-form-item>
|
<el-option :label="$t('countryManagement.partition1')" value="1" />
|
||||||
</el-form>
|
<el-option :label="$t('countryManagement.partition2')" value="2" />
|
||||||
<p class="batch-partition-help">{{ $t('countryManagement.batchPartitionHelp') }}</p>
|
<el-option :label="$t('countryManagement.partition3')" value="3" />
|
||||||
<el-input
|
</el-select>
|
||||||
v-model="batchPartitionInput"
|
</el-form-item>
|
||||||
type="textarea"
|
</el-form>
|
||||||
:rows="20"
|
<p class="batch-partition-help">{{ $t('countryManagement.batchPartitionHelp') }}</p>
|
||||||
:placeholder="$t('countryManagement.batchPartitionPlaceholder')"
|
<el-input
|
||||||
@input="handleBatchPartitionDraftChange"
|
v-model="batchPartitionInput"
|
||||||
/>
|
type="textarea"
|
||||||
<div class="batch-partition-actions">
|
:rows="20"
|
||||||
<el-button type="primary" plain :loading="batchPartitionPreviewLoading" @click="previewBatchPartition">
|
:placeholder="$t('countryManagement.batchPartitionPlaceholder')"
|
||||||
{{ $t('countryManagement.batchPartitionPreview') }}
|
@input="handleBatchPartitionDraftChange"
|
||||||
</el-button>
|
/>
|
||||||
<el-button
|
<div class="batch-partition-actions">
|
||||||
v-if="batchPartitionToApplyBaseRows.length > 0"
|
<el-button type="primary" plain :loading="batchPartitionPreviewLoading" @click="previewBatchPartition">
|
||||||
type="success"
|
{{ $t('countryManagement.batchPartitionPreview') }}
|
||||||
:loading="batchPartitionApplyLoading"
|
</el-button>
|
||||||
:disabled="!batchPartitionPreviewRows.length"
|
<el-button
|
||||||
@click="applyBatchPartition"
|
v-if="batchPartitionToApplyBaseRows.length > 0"
|
||||||
>
|
type="success"
|
||||||
{{ $t('countryManagement.batchPartitionApply') }}
|
:loading="batchPartitionApplyLoading"
|
||||||
</el-button>
|
:disabled="!batchPartitionPreviewRows.length"
|
||||||
</div>
|
@click="applyBatchPartition"
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="batchPartitionStats.input > 0" class="batch-partition-summary-container" style="margin-left: 20px;">
|
|
||||||
<div v-if="batchPartitionStats.input > 0" class="batch-partition-summary">
|
|
||||||
{{
|
|
||||||
$t('countryManagement.batchPartitionSummaryLine', {
|
|
||||||
input: String(batchPartitionStats.input),
|
|
||||||
matched: String(batchPartitionStats.matched),
|
|
||||||
miss: String(batchPartitionStats.miss),
|
|
||||||
same: String(batchPartitionStats.skipSame),
|
|
||||||
will: String(batchPartitionStats.willUpdate)
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<p v-if="batchPartitionPreviewRows.length" class="batch-partition-selection-hint">{{ $t('countryManagement.batchPartitionSelectionHint') }}</p>
|
|
||||||
|
|
||||||
<el-table
|
|
||||||
v-if="batchPartitionPreviewRows.length"
|
|
||||||
:data="batchPartitionFilteredPreviewRows"
|
|
||||||
border
|
|
||||||
stripe
|
|
||||||
size="small"
|
|
||||||
max-height="400"
|
|
||||||
class="batch-partition-table"
|
|
||||||
:row-class-name="batchPartitionRowClassName"
|
|
||||||
>
|
|
||||||
<el-table-column type="index" :label="$t('countryManagement.table.no')" width="64" align="center" />
|
|
||||||
|
|
||||||
<el-table-column prop="key" :label="$t('countryManagement.batchPartitionColKey')" min-width="120" show-overflow-tooltip />
|
|
||||||
|
|
||||||
<el-table-column prop="country_id" :label="$t('countryManagement.batchPartitionColId')" width="90" align="center" />
|
|
||||||
<el-table-column prop="en_name" :label="$t('countryManagement.batchPartitionColName')" min-width="140" show-overflow-tooltip />
|
|
||||||
|
|
||||||
<el-table-column :label="$t('countryManagement.batchPartitionColCurrentPartition')" width="140" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span :class="['partition-chip', scope.row.status === 'diff' ? 'partition-chip--warn' : '']">
|
|
||||||
{{ scope.row.currentPartition || '—' }}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column :label="$t('countryManagement.batchPartitionColMatch')" width="150" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span
|
|
||||||
:class="[
|
|
||||||
'match-chip',
|
|
||||||
scope.row.status === 'not_found'
|
|
||||||
? 'match-chip--danger'
|
|
||||||
: scope.row.status === 'diff'
|
|
||||||
? 'match-chip--warn'
|
|
||||||
: 'match-chip--ok'
|
|
||||||
]"
|
|
||||||
>
|
>
|
||||||
{{ scope.row.matchLabel }}
|
{{ $t('countryManagement.batchPartitionApply') }}
|
||||||
</span>
|
</el-button>
|
||||||
</template>
|
</div>
|
||||||
</el-table-column>
|
</div>
|
||||||
</el-table>
|
|
||||||
|
<div v-if="batchPartitionStats.input > 0" class="batch-partition-summary-container" style="margin-left: 20px">
|
||||||
|
<div v-if="batchPartitionStats.input > 0" class="batch-partition-summary">
|
||||||
|
{{
|
||||||
|
$t('countryManagement.batchPartitionSummaryLine', {
|
||||||
|
input: String(batchPartitionStats.input),
|
||||||
|
matched: String(batchPartitionStats.matched),
|
||||||
|
miss: String(batchPartitionStats.miss),
|
||||||
|
same: String(batchPartitionStats.skipSame),
|
||||||
|
will: String(batchPartitionStats.willUpdate)
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<p v-if="batchPartitionPreviewRows.length" class="batch-partition-selection-hint">
|
||||||
|
{{ $t('countryManagement.batchPartitionSelectionHint') }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-if="batchPartitionPreviewRows.length"
|
||||||
|
:data="batchPartitionFilteredPreviewRows"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
size="small"
|
||||||
|
max-height="400"
|
||||||
|
class="batch-partition-table"
|
||||||
|
:row-class-name="batchPartitionRowClassName"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" :label="$t('countryManagement.table.no')" width="64" align="center" />
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
prop="key"
|
||||||
|
:label="$t('countryManagement.batchPartitionColKey')"
|
||||||
|
min-width="120"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-table-column prop="country_id" :label="$t('countryManagement.batchPartitionColId')" width="90" align="center" />
|
||||||
|
<el-table-column
|
||||||
|
prop="en_name"
|
||||||
|
:label="$t('countryManagement.batchPartitionColName')"
|
||||||
|
min-width="140"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-table-column :label="$t('countryManagement.batchPartitionColCurrentPartition')" width="140" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span :class="['partition-chip', scope.row.status === 'diff' ? 'partition-chip--warn' : '']">
|
||||||
|
{{ scope.row.currentPartition || '—' }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column :label="$t('countryManagement.batchPartitionColMatch')" width="150" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span
|
||||||
|
:class="[
|
||||||
|
'match-chip',
|
||||||
|
scope.row.status === 'not_found'
|
||||||
|
? 'match-chip--danger'
|
||||||
|
: scope.row.status === 'diff'
|
||||||
|
? 'match-chip--warn'
|
||||||
|
: 'match-chip--ok'
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
{{ scope.row.matchLabel }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -286,9 +301,7 @@ export default {
|
|||||||
},
|
},
|
||||||
batchPartitionToApplyBaseRows() {
|
batchPartitionToApplyBaseRows() {
|
||||||
return (this.batchPartitionPreviewRows || []).filter(
|
return (this.batchPartitionPreviewRows || []).filter(
|
||||||
(r) =>
|
(r) => r._row && String(r._row.partition != null ? r._row.partition : '') !== String(r.partition)
|
||||||
r._row &&
|
|
||||||
String(r._row.partition != null ? r._row.partition : '') !== String(r.partition)
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
batchPartitionEffectiveToApplyRows() {
|
batchPartitionEffectiveToApplyRows() {
|
||||||
@@ -603,7 +616,12 @@ export default {
|
|||||||
}
|
}
|
||||||
const lower = key.toLowerCase();
|
const lower = key.toLowerCase();
|
||||||
return (
|
return (
|
||||||
rows.find((r) => String(r.en_name || '').trim().toLowerCase() === lower) ||
|
rows.find(
|
||||||
|
(r) =>
|
||||||
|
String(r.en_name || '')
|
||||||
|
.trim()
|
||||||
|
.toLowerCase() === lower
|
||||||
|
) ||
|
||||||
rows.find((r) => String(r.zh_name || '').trim() === key) ||
|
rows.find((r) => String(r.zh_name || '').trim() === key) ||
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -100,6 +100,7 @@
|
|||||||
v-model="form.body"
|
v-model="form.body"
|
||||||
:journalList="journalList"
|
:journalList="journalList"
|
||||||
:journalId="form.journalId"
|
:journalId="form.journalId"
|
||||||
|
:language="form.lang"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
/>
|
/>
|
||||||
<CkeditorMail v-model="form.body" />
|
<CkeditorMail v-model="form.body" />
|
||||||
|
|||||||
Reference in New Issue
Block a user