提交
This commit is contained in:
@@ -68,16 +68,16 @@
|
||||
</p>
|
||||
<p class="info-row" style="margin-top: 10px; font-size: 12px">
|
||||
<span class="label">{{ $t('expertDatabase.fields.acquisitionTimeLabel') }}</span>
|
||||
<span class="value time">{{ scope.row.ctime_text ? scope.row.ctime_text : '-' }}</span>
|
||||
<span class="value time">{{ scope.row.ctime_text ? scope.row.ctime_text : $t('expertDatabase.emptyMark') }}</span>
|
||||
</p>
|
||||
|
||||
<span class="custom-tag">{{ scope.row.state_text }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<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">
|
||||
<el-table-column prop="country" :label="$t('expertDatabase.columns.country')" min-width="100" />
|
||||
<el-table-column prop="affiliation" :label="$t('expertDatabase.columns.affiliation')" min-width="460" />
|
||||
<el-table-column prop="fieldDisplay" :label="$t('expertDatabase.columns.researchAreas')" min-width="260">
|
||||
<template slot-scope="scope">
|
||||
<div v-for="(field, index) in scope.row.fields" :key="index">
|
||||
<span>
|
||||
@@ -85,10 +85,43 @@
|
||||
{{ field.field }}
|
||||
</span>
|
||||
</div>
|
||||
<el-button
|
||||
v-if="scope.row.fields && scope.row.fields.length"
|
||||
type="text"
|
||||
size="small"
|
||||
class="view-all-btn"
|
||||
@click.stop="openFieldDetail(scope.row)"
|
||||
>
|
||||
{{ $t('expertDatabase.viewAllInfo') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog
|
||||
:title="$t('expertDatabase.detailDialogTitle')"
|
||||
:visible.sync="fieldDetailVisible"
|
||||
width="1200px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
class="field-detail-dialog"
|
||||
>
|
||||
<p v-if="fieldDetailExpert" class="field-detail-name">
|
||||
<span class="label">{{ $t('expertDatabase.fields.nameLabel') }}</span>
|
||||
<span class="value bold">{{ fieldDetailExpert.name }}</span>
|
||||
</p>
|
||||
<el-table v-if="fieldDetailRows.length" :data="fieldDetailRows" border stripe size="small" max-height="420">
|
||||
<el-table-column type="index" :label="$t('expertDatabase.table.no')" width="56" align="center" />
|
||||
<el-table-column prop="field" :label="$t('expertDatabase.detailColField')" min-width="140" />
|
||||
<el-table-column prop="paper_title" :label="$t('expertDatabase.detailColPaper')" min-width="220" />
|
||||
<el-table-column prop="paper_journal" :label="$t('expertDatabase.detailColJournal')" min-width="140" />
|
||||
</el-table>
|
||||
<p v-else class="field-detail-empty">{{ $t('expertDatabase.noFieldDetail') }}</p>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="fieldDetailVisible = false">{{ $t('expertDatabase.detailClose') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<div class="pagination">
|
||||
<el-pagination
|
||||
background
|
||||
@@ -124,7 +157,10 @@ export default {
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
exportLoading: false
|
||||
exportLoading: false,
|
||||
fieldDetailVisible: false,
|
||||
fieldDetailExpert: null,
|
||||
fieldDetailRows: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -228,6 +264,17 @@ export default {
|
||||
this.query.pageIndex = page;
|
||||
this.fetchList();
|
||||
},
|
||||
openFieldDetail(row) {
|
||||
const empty = this.$t('expertDatabase.detailCellEmpty');
|
||||
this.fieldDetailExpert = row || null;
|
||||
const fields = (row && row.fields) || [];
|
||||
this.fieldDetailRows = fields.map((f) => ({
|
||||
field: (f && f.field) || empty,
|
||||
paper_title: (f && (f.paper_title || f.title)) || empty,
|
||||
paper_journal: (f && (f.paper_journal || f.journal)) || empty
|
||||
}));
|
||||
this.fieldDetailVisible = true;
|
||||
},
|
||||
async handleExport() {
|
||||
if (!this.query.major_id && !this.query.keyword && !this.query.field) {
|
||||
this.$message.warning(this.$t('expertDatabase.exportWarn'));
|
||||
@@ -330,5 +377,18 @@ export default {
|
||||
.value.time {
|
||||
color: #888;
|
||||
}
|
||||
.view-all-btn {
|
||||
margin-top: 8px;
|
||||
padding: 0;
|
||||
}
|
||||
.field-detail-name {
|
||||
margin: 0 0 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.field-detail-empty {
|
||||
margin: 16px 0;
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user