自动化推广【约稿】
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="crumbs">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item>
|
||||
<i class="el-icon-user"></i> Expert Database
|
||||
<i class="el-icon-user"></i> {{ $t('sidebar.expertDatabase') }}
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
@@ -15,7 +15,7 @@
|
||||
ref="cascader"
|
||||
@change="handleChange"
|
||||
v-model="major_id"
|
||||
:placeholder="'Please select field'"
|
||||
:placeholder="$t('expertDatabase.fieldSelectPlaceholder')"
|
||||
:options="options"
|
||||
:props="getProps()"
|
||||
style="width: 260px"
|
||||
@@ -24,7 +24,7 @@
|
||||
<el-form-item label="">
|
||||
<el-input
|
||||
v-model="query.keyword"
|
||||
placeholder="Name / Email / Affiliation"
|
||||
:placeholder="$t('expertDatabase.keywordPlaceholder')"
|
||||
clearable
|
||||
style="width: 260px"
|
||||
/>
|
||||
@@ -32,32 +32,33 @@
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" :loading="loading" @click="handleSearch">
|
||||
Search
|
||||
{{ $t('expertDatabase.searchBtn') }}
|
||||
</el-button>
|
||||
<el-button @click="handleReset">Reset</el-button>
|
||||
<el-button @click="handleReset">{{ $t('expertDatabase.resetBtn') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<el-button type="success" icon="el-icon-download" @click="handleExport" :loading="exportLoading">
|
||||
Download Excel
|
||||
{{ $t('expertDatabase.downloadExcelBtn') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-card class="table-card" shadow="never">
|
||||
<el-table :data="list" border stripe v-loading="loading" header-row-class-name="dark-table-header">
|
||||
<el-table-column prop="name" label="Base Information" min-width="220">
|
||||
<el-table-column type="index" :label="$t('expertDatabase.table.no')" width="70" align="center"></el-table-column>
|
||||
<el-table-column prop="name" :label="$t('expertDatabase.columns.baseInfo')" min-width="220">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<p class="info-row">
|
||||
<span class="label">Name: </span><span class="value bold">{{ scope.row.name }}</span>
|
||||
<span class="label">{{ $t('expertDatabase.fields.nameLabel') }}</span><span class="value bold">{{ scope.row.name }}</span>
|
||||
</p>
|
||||
<p class="info-row">
|
||||
<span class="label">Email: </span><span class="value link">{{ scope.row.email }}</span>
|
||||
<span class="label">{{ $t('expertDatabase.fields.emailLabel') }}</span><span class="value link">{{ scope.row.email }}</span>
|
||||
</p>
|
||||
<p class="info-row" style="margin-top: 10px; font-size: 12px">
|
||||
<span class="label">Acquisition Time:</span>
|
||||
<span class="label">{{ $t('expertDatabase.fields.acquisitionTimeLabel') }}</span>
|
||||
<span class="value time">{{ scope.row.ctime_text ? scope.row.ctime_text : '-' }}</span>
|
||||
</p>
|
||||
|
||||
@@ -66,8 +67,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="affiliation" label="Affiliation" min-width="260" />
|
||||
<el-table-column prop="fieldDisplay" label="Research areas" min-width="200">
|
||||
<el-table-column prop="affiliation" :label="$t('expertDatabase.columns.affiliation')" min-width="260" />
|
||||
<el-table-column prop="fieldDisplay" :label="$t('expertDatabase.columns.researchAreas')" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<div v-for="(field, index) in scope.row.fields" :key="index">
|
||||
<span>
|
||||
@@ -217,7 +218,7 @@ export default {
|
||||
},
|
||||
async handleExport() {
|
||||
if (!this.query.major_id && !this.query.keyword) {
|
||||
this.$message.warning('Please select a research area or enter a keyword before exporting.');
|
||||
this.$message.warning(this.$t('expertDatabase.exportWarn'));
|
||||
return;
|
||||
}
|
||||
this.exportLoading = true;
|
||||
@@ -230,10 +231,10 @@ export default {
|
||||
if (res && res.code === 0 && res.data && res.data.file_url) {
|
||||
window.open(this.mediaUrl + res.data.file_url, '_blank');
|
||||
} else {
|
||||
this.$message.error(res.msg || 'Export failed');
|
||||
this.$message.error(res.msg || this.$t('expertDatabase.exportFailed'));
|
||||
}
|
||||
} catch (e) {
|
||||
this.$message.error(e.msg || 'Export failed');
|
||||
this.$message.error(e.msg || this.$t('expertDatabase.exportFailed'));
|
||||
} finally {
|
||||
this.exportLoading = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user