Compare commits
5 Commits
d05ffdf9c6
...
4e46f5bcff
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e46f5bcff | |||
| 9e578a66d6 | |||
| a2497a8885 | |||
| 10348d1e75 | |||
| 81d3dd9320 |
402
scholarCrawlers2222.vue
Normal file
402
scholarCrawlers2222.vue
Normal file
@@ -0,0 +1,402 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="crumbs">
|
||||||
|
<el-breadcrumb separator="/">
|
||||||
|
<el-breadcrumb-item>{{ $t('sidebar.tools') }}</el-breadcrumb-item>
|
||||||
|
<el-breadcrumb-item>{{ $t('sidebar.scholarCrawlers') }}</el-breadcrumb-item>
|
||||||
|
</el-breadcrumb>
|
||||||
|
</div>
|
||||||
|
<div class="container">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<el-form
|
||||||
|
ref="searchForm"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="80px"
|
||||||
|
:inline="false"
|
||||||
|
class="search-form"
|
||||||
|
@submit.native.prevent
|
||||||
|
>
|
||||||
|
<div class="search-bar">
|
||||||
|
<el-form-item label="Keyword" prop="keyword" class="search-input-item">
|
||||||
|
<el-input
|
||||||
|
v-model="form.keyword"
|
||||||
|
placeholder="Please input keyword"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleSearch"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<div class="search-actions">
|
||||||
|
<el-button type="primary" icon="el-icon-search" :loading="loading" @click="handleSearch">
|
||||||
|
Search
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-download"
|
||||||
|
:loading="exportLoading"
|
||||||
|
:disabled="!form.keyword"
|
||||||
|
@click="handleExport"
|
||||||
|
>
|
||||||
|
Export Excel
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card
|
||||||
|
v-if="hasSearched"
|
||||||
|
class="box-card"
|
||||||
|
style="margin-top: 20px"
|
||||||
|
>
|
||||||
|
<div class="total-bar">
|
||||||
|
Total: <span class="total-number">{{ total }}</span>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
style="width: 100%;"
|
||||||
|
class="table"
|
||||||
|
header-cell-class-name="table-header"
|
||||||
|
empty-text="No data, please search first"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" label="No." width="60" align="center" :index="tableIndex" />
|
||||||
|
<el-table-column
|
||||||
|
v-for="col in columns"
|
||||||
|
:key="col"
|
||||||
|
:prop="col"
|
||||||
|
:label="formatColumnLabel(col)"
|
||||||
|
:min-width="getColumnWidth(col)"
|
||||||
|
:width="getColumnFixedWidth(col)"
|
||||||
|
/>
|
||||||
|
<el-table-column label="Paper Count" width="140" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="paper-count-cell">
|
||||||
|
<span class="paper-count-number">{{ scope.row.paperCount }}</span>
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.paperCount"
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
plain
|
||||||
|
@click="showPapers(scope.row)"
|
||||||
|
>
|
||||||
|
Detail
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="pagination">
|
||||||
|
<el-pagination
|
||||||
|
background
|
||||||
|
layout="total, sizes, prev, pager, next"
|
||||||
|
:total="total"
|
||||||
|
:current-page="page"
|
||||||
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
|
:page-size="per_page"
|
||||||
|
@current-change="handlePageChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog title="Papers" :visible.sync="papersDialogVisible" width="70vw">
|
||||||
|
<div class="paper-expert-info">
|
||||||
|
<div><strong>Name:</strong> {{ currentExpert.name || currentExpert.realname }}</div>
|
||||||
|
<div><strong>Email:</strong> {{ currentExpert.email }}</div>
|
||||||
|
<div><strong>Affiliation:</strong> {{ currentExpert.affiliation }}</div>
|
||||||
|
</div>
|
||||||
|
<el-table :data="currentPapers" border stripe style="width: 100%">
|
||||||
|
<el-table-column type="index" label="No." width="60" align="center" />
|
||||||
|
<el-table-column prop="article_id" label="Article ID" width="180" />
|
||||||
|
<el-table-column prop="journal" label="Journal" width="340" />
|
||||||
|
<el-table-column prop="title" label="Title" />
|
||||||
|
</el-table>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="papersDialogVisible = false">Close</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'scholarCrawlers',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form: {
|
||||||
|
keyword: '',
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
keyword: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: 'Please input keyword',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
columns: [],
|
||||||
|
loading: false,
|
||||||
|
exportLoading: false,
|
||||||
|
papersDialogVisible: false,
|
||||||
|
currentPapers: [],
|
||||||
|
currentExpert: {},
|
||||||
|
total: 0,
|
||||||
|
page: 1,
|
||||||
|
per_page: 20,
|
||||||
|
hasSearched: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
tableIndex(index) {
|
||||||
|
return (this.page - 1) * this.per_page + index + 1;
|
||||||
|
},
|
||||||
|
handlePageChange(val) {
|
||||||
|
this.page = val;
|
||||||
|
this.doSearch();
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.per_page = val;
|
||||||
|
this.page = 1;
|
||||||
|
this.doSearch();
|
||||||
|
},
|
||||||
|
doSearch() {
|
||||||
|
this.loading = true;
|
||||||
|
this.hasSearched = true;
|
||||||
|
this.$api
|
||||||
|
.post('/api/expert_finder/search', {
|
||||||
|
keyword: this.form.keyword,
|
||||||
|
page: this.page,
|
||||||
|
per_page: this.per_page,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res && res.code === 0 && res.data) {
|
||||||
|
const list =
|
||||||
|
Array.isArray(res.data.experts) && res.data.experts.length
|
||||||
|
? res.data.experts
|
||||||
|
: [];
|
||||||
|
const listWithCount = list.map((item) => ({
|
||||||
|
...item,
|
||||||
|
paperCount: Array.isArray(item.papers)
|
||||||
|
? item.papers.length
|
||||||
|
: item.paper_count || item.paperCount || 0,
|
||||||
|
}));
|
||||||
|
this.tableData = listWithCount;
|
||||||
|
this.total = res.data.total != null ? Number(res.data.total) : listWithCount.length;
|
||||||
|
this.columns = listWithCount.length
|
||||||
|
? Object.keys(listWithCount[0]).filter(
|
||||||
|
(key) =>
|
||||||
|
key !== 'papers' &&
|
||||||
|
key !== 'paperCount' &&
|
||||||
|
key !== 'paper_count'
|
||||||
|
)
|
||||||
|
: [];
|
||||||
|
} else {
|
||||||
|
this.tableData = [];
|
||||||
|
this.columns = [];
|
||||||
|
this.total = 0;
|
||||||
|
if (res && res.msg) {
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
} else {
|
||||||
|
this.$message.error('No expert found, please try again');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.tableData = [];
|
||||||
|
this.columns = [];
|
||||||
|
this.total = 0;
|
||||||
|
this.$message.error('Request error, please try again');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleSearch() {
|
||||||
|
this.$refs.searchForm.validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.page = 1;
|
||||||
|
this.doSearch();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async handleExport() {
|
||||||
|
if (!this.form.keyword) {
|
||||||
|
this.$message.warning('Please input keyword first');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.exportLoading = true;
|
||||||
|
try {
|
||||||
|
const res = await this.$api.post('/api/expert_finder/export', {
|
||||||
|
keyword: this.form.keyword,
|
||||||
|
page: this.page,
|
||||||
|
per_page: this.per_page,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (res && (res.code === 0 || res.status === 1)) {
|
||||||
|
const url =
|
||||||
|
(res.data && (res.data.url || res.data.link)) ||
|
||||||
|
res.url ||
|
||||||
|
(typeof res.data === 'string' ? res.data : '');
|
||||||
|
|
||||||
|
if (!url) {
|
||||||
|
this.$message.error('No download url returned from server');
|
||||||
|
} else {
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = url;
|
||||||
|
const parts = url.split('/');
|
||||||
|
link.download = parts[parts.length - 1] || `scholar_${this.form.keyword}.xlsx`;
|
||||||
|
link.target = '_blank';
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
document.body.removeChild(link);
|
||||||
|
this.$message.success('Export success');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.error((res && res.msg) || 'Export failed, please try again');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.$message.error('Request error, please try again');
|
||||||
|
} finally {
|
||||||
|
this.exportLoading = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formatColumnLabel(key) {
|
||||||
|
if (!key) return '';
|
||||||
|
return key
|
||||||
|
.split('_')
|
||||||
|
.map((word) => (word ? word.charAt(0).toUpperCase() + word.slice(1) : ''))
|
||||||
|
.join(' ');
|
||||||
|
},
|
||||||
|
getColumnWidth(key) {
|
||||||
|
if (!key) return 140;
|
||||||
|
const lower = key.toLowerCase();
|
||||||
|
if (lower === 'name' || lower === 'realname') {
|
||||||
|
return 180;
|
||||||
|
}
|
||||||
|
if (lower === 'affiliation' || lower === 'organization' || lower === 'institution') {
|
||||||
|
return 420;
|
||||||
|
}
|
||||||
|
if (lower === 'email') {
|
||||||
|
return 300;
|
||||||
|
}
|
||||||
|
return 140;
|
||||||
|
},
|
||||||
|
getColumnFixedWidth(key) {
|
||||||
|
if (!key) return null;
|
||||||
|
const lower = key.toLowerCase();
|
||||||
|
if (lower === 'name' || lower === 'realname') {
|
||||||
|
return 180;
|
||||||
|
}
|
||||||
|
if (lower === 'email') {
|
||||||
|
return 300;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
showPapers(row) {
|
||||||
|
const papers = Array.isArray(row.papers) ? row.papers : [];
|
||||||
|
if (!papers.length) {
|
||||||
|
this.$message.info('No papers found');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.currentExpert = row;
|
||||||
|
this.currentPapers = papers;
|
||||||
|
this.papersDialogVisible = true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.container {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-card {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-form {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input-item {
|
||||||
|
flex: 1;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input-item .el-form-item__content {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input-item .el-input {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 10px;
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paper-count-cell {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paper-count-number {
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #006699;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table .cell {
|
||||||
|
white-space: normal;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paper-expert-info {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
padding: 10px 12px;
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paper-expert-info > div + div {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.total-bar {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #666;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.total-number {
|
||||||
|
font-weight: 600;
|
||||||
|
color: #006699;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
margin-top: 16px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
@@ -19,8 +19,8 @@ const service = axios.create({
|
|||||||
// baseURL: 'https://submission.tmrjournals.com/', //正式 记得切换
|
// baseURL: 'https://submission.tmrjournals.com/', //正式 记得切换
|
||||||
// baseURL: 'http://www.tougao.com/', //测试本地 记得切换
|
// baseURL: 'http://www.tougao.com/', //测试本地 记得切换
|
||||||
// baseURL: 'http://192.168.110.110/tougao/public/index.php/',
|
// baseURL: 'http://192.168.110.110/tougao/public/index.php/',
|
||||||
// baseURL: '/api', //本地
|
baseURL: '/api', //本地
|
||||||
baseURL: '/', //正式
|
// baseURL: '/', //正式
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -206,9 +206,9 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
decodeHtml(html) {
|
decodeHtml(html) {
|
||||||
var txt = document.createElement('textarea');
|
// var txt = document.createElement('textarea');
|
||||||
txt.innerHTML = html;
|
// txt.innerHTML = html;
|
||||||
return txt.value;
|
return html;
|
||||||
},
|
},
|
||||||
//去掉最外层自定义的span标签
|
//去掉最外层自定义的span标签
|
||||||
extractContentWithoutOuterSpan(cell) {
|
extractContentWithoutOuterSpan(cell) {
|
||||||
@@ -219,9 +219,15 @@ export default {
|
|||||||
}
|
}
|
||||||
// 获取单元格的 HTML 内容
|
// 获取单元格的 HTML 内容
|
||||||
let htmlContent = cell.trim();
|
let htmlContent = cell.trim();
|
||||||
|
// 在第 21 行之后添加
|
||||||
|
let processedContent = htmlContent.replace(/(<\/p>)\s*(?=<p)/gi, '$1<br>');
|
||||||
|
|
||||||
|
|
||||||
str = this.transformHtmlString(htmlContent, 'table')
|
|
||||||
|
|
||||||
|
str = this.transformHtmlString(processedContent, 'table',{ keepBr: true })
|
||||||
|
console.log("🚀 ~ extractContentWithoutOuterSpan888888 ~ str:", str);
|
||||||
|
|
||||||
|
|
||||||
// 创建一个临时的 DOM 元素来解析 HTML
|
// 创建一个临时的 DOM 元素来解析 HTML
|
||||||
const div = document.createElement('div');
|
const div = document.createElement('div');
|
||||||
@@ -972,16 +978,22 @@ str = str.replace(regex, function (match, content, offset, fullString) {
|
|||||||
|
|
||||||
async parseTableToArray(tableString, callback) {
|
async parseTableToArray(tableString, callback) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const parser = new DOMParser();
|
const parser = new DOMParser();
|
||||||
const doc = parser.parseFromString(tableString, 'text/html');
|
const doc = parser.parseFromString(tableString, 'text/html');
|
||||||
const rows = doc.querySelectorAll('table tr'); // 获取所有的行(<tr>)
|
const rows = doc.querySelectorAll('table tr'); // 获取所有的行(<tr>)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 使用 Promise 来处理异步的 MathJax 解析
|
// 使用 Promise 来处理异步的 MathJax 解析
|
||||||
const result = await Promise.all(
|
const result = await Promise.all(
|
||||||
Array.from(rows).map(async (row) => {
|
Array.from(rows).map(async (row) => {
|
||||||
const cells = row.querySelectorAll('th, td'); // 获取每个行中的单元格(包括 <th> 和 <td>)
|
const cells = row.querySelectorAll('th, td'); // 获取每个行中的单元格(包括 <th> 和 <td>)
|
||||||
return await Promise.all(
|
return await Promise.all(
|
||||||
Array.from(cells).map(async (cell) => {
|
Array.from(cells).map(async (cell) => {
|
||||||
|
console.log("🚀 ~ parseTableToArray777 ~ cell:", cell);
|
||||||
|
|
||||||
const text = await this.extractMathJaxLatex(cell);
|
const text = await this.extractMathJaxLatex(cell);
|
||||||
return {
|
return {
|
||||||
text,
|
text,
|
||||||
@@ -2125,14 +2137,18 @@ str = str.replace(regex, function (match, content, offset, fullString) {
|
|||||||
text: 'Blue',
|
text: 'Blue',
|
||||||
className: 'custom-button-blue',
|
className: 'custom-button-blue',
|
||||||
onAction: function () {
|
onAction: function () {
|
||||||
// 必须获取带 HTML 的内容,否则里面的 em/i 标签在拼接前就丢了
|
// 获取选中的 HTML
|
||||||
var selectedText = ed.selection.getContent({ format: 'html' });
|
var selectedText = ed.selection.getContent({ format: 'html' });
|
||||||
|
|
||||||
if (selectedText) {
|
if (selectedText && selectedText.trim().length > 0) {
|
||||||
// 这就是你想要的:直接外层套一个 blue
|
|
||||||
var wrappedText = `<blue>${selectedText}</blue>`;
|
|
||||||
|
|
||||||
// 使用 setContent 强行回写
|
var processedText = selectedText.replace(/ /g, ' ');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var wrappedText = `<blue>${processedText}</blue>`;
|
||||||
|
|
||||||
|
// 使用 setContent 插入
|
||||||
ed.selection.setContent(wrappedText);
|
ed.selection.setContent(wrappedText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,6 +165,9 @@
|
|||||||
<el-menu-item index="RejectedArticles">
|
<el-menu-item index="RejectedArticles">
|
||||||
{{ $t('sidebar.ReArticles') }}
|
{{ $t('sidebar.ReArticles') }}
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
<el-menu-item index="scholarCrawlers">
|
||||||
|
{{ $t('sidebar.scholarCrawlers') }}
|
||||||
|
</el-menu-item>
|
||||||
<!-- <el-menu-item index="1" key="1"> -->
|
<!-- <el-menu-item index="1" key="1"> -->
|
||||||
<a href="http://master.tmrjournals.com" target="_blank" class="linkBar"> Management System </a>
|
<a href="http://master.tmrjournals.com" target="_blank" class="linkBar"> Management System </a>
|
||||||
<!-- </el-menu-item> -->
|
<!-- </el-menu-item> -->
|
||||||
|
|||||||
@@ -270,6 +270,7 @@ const en = {
|
|||||||
mailbox3: 'Mailbox template',
|
mailbox3: 'Mailbox template',
|
||||||
tools: 'Assistant tools',
|
tools: 'Assistant tools',
|
||||||
mailboxManagement: 'Mailbox Management',
|
mailboxManagement: 'Mailbox Management',
|
||||||
|
scholarCrawlers: 'Scholar Crawlers',
|
||||||
ReArticles: 'Rejected Manuscripts', // 被拒稿件
|
ReArticles: 'Rejected Manuscripts', // 被拒稿件
|
||||||
editorialBoard: 'Boss System',
|
editorialBoard: 'Boss System',
|
||||||
editorialBoard1: 'Board Management',
|
editorialBoard1: 'Board Management',
|
||||||
|
|||||||
@@ -255,6 +255,7 @@ const zh = {
|
|||||||
mailbox3: '模板管理',
|
mailbox3: '模板管理',
|
||||||
tools: '辅助工具',
|
tools: '辅助工具',
|
||||||
mailboxManagement: '邮箱管理',
|
mailboxManagement: '邮箱管理',
|
||||||
|
scholarCrawlers: '学者抓取',
|
||||||
ReArticles: '被拒稿件', // 被拒稿件
|
ReArticles: '被拒稿件', // 被拒稿件
|
||||||
editorialBoard: '编委管理',
|
editorialBoard: '编委管理',
|
||||||
editorialBoard1: '编委列表',
|
editorialBoard1: '编委列表',
|
||||||
|
|||||||
@@ -1974,6 +1974,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async saveTable(content) {
|
async saveTable(content) {
|
||||||
|
|
||||||
const cleanTableData = (tableList) => {
|
const cleanTableData = (tableList) => {
|
||||||
if (tableList.length == 0) {
|
if (tableList.length == 0) {
|
||||||
return [];
|
return [];
|
||||||
@@ -1981,7 +1982,8 @@ export default {
|
|||||||
// 定义清理函数:去掉所有 br 标签和 TinyMCE 占位符
|
// 定义清理函数:去掉所有 br 标签和 TinyMCE 占位符
|
||||||
const cleanText = (text) => {
|
const cleanText = (text) => {
|
||||||
if (!text) return "";
|
if (!text) return "";
|
||||||
return text.replace(/<br\s*\/?>/gi, '').trim();
|
// return text.replace(/<br\s*\/?>/gi, '').trim();
|
||||||
|
return text
|
||||||
};
|
};
|
||||||
|
|
||||||
// 1. 获取处理后的干净表头
|
// 1. 获取处理后的干净表头
|
||||||
|
|||||||
@@ -1415,47 +1415,6 @@ export default {
|
|||||||
select_tem() {},
|
select_tem() {},
|
||||||
|
|
||||||
// 6----创建文章
|
// 6----创建文章
|
||||||
EstaBlish() {
|
|
||||||
this.$api
|
|
||||||
.post('api/Production/checkRefer', {
|
|
||||||
p_article_id: this.p_article_id
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
const loading = this.$loading({
|
|
||||||
lock: true,
|
|
||||||
text: 'Loading...',
|
|
||||||
spinner: 'el-icon-loading',
|
|
||||||
background: 'rgba(0, 0, 0, 0.7)'
|
|
||||||
});
|
|
||||||
this.$api
|
|
||||||
.post('api/Production/doTypeSettingNew', {
|
|
||||||
article_id: this.detailMes.article_id
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.getWorldPdf();
|
|
||||||
this.$message.success('Successfully generated manuscript!');
|
|
||||||
loading.close();
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
loading.close();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
this.$message.error(err);
|
|
||||||
loading.close();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
this.$message.error(err);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 6----校对文章
|
// 6----校对文章
|
||||||
htmlContet() {
|
htmlContet() {
|
||||||
window.open(
|
window.open(
|
||||||
|
|||||||
@@ -1510,47 +1510,7 @@ export default {
|
|||||||
// 6----模板选择
|
// 6----模板选择
|
||||||
select_tem() {},
|
select_tem() {},
|
||||||
|
|
||||||
// 6----创建文章
|
|
||||||
EstaBlish() {
|
|
||||||
this.$api
|
|
||||||
.post('api/Production/checkRefer', {
|
|
||||||
p_article_id: this.p_article_id
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
const loading = this.$loading({
|
|
||||||
lock: true,
|
|
||||||
text: 'Loading...',
|
|
||||||
spinner: 'el-icon-loading',
|
|
||||||
background: 'rgba(0, 0, 0, 0.7)'
|
|
||||||
});
|
|
||||||
this.$api
|
|
||||||
.post('api/Production/doTypeSettingNew', {
|
|
||||||
article_id: this.detailMes.article_id
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.getWorldPdf();
|
|
||||||
this.$message.success('Successfully generated manuscript!');
|
|
||||||
loading.close();
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
loading.close();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
this.$message.error(err);
|
|
||||||
loading.close();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
this.$message.error(err);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -812,7 +812,7 @@
|
|||||||
|
|
||||||
<div style="text-align: center; margin: 40px 0 0 0">
|
<div style="text-align: center; margin: 40px 0 0 0">
|
||||||
<el-button type="warning" @click="onStagingSave(4)" class="pro_stage">Save as draft </el-button>
|
<el-button type="warning" @click="onStagingSave(4)" class="pro_stage">Save as draft </el-button>
|
||||||
<el-button type="primary" @click="onSubmit(1)" class="pro_ceed">Save and Submit</el-button>
|
<el-button type="primary" @click="onSubmit(1)" class="pro_ceed">Confirm Submit </el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3135,11 +3135,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
var date1 = new Date(parseInt(date * 1000));
|
var date1 = new Date(parseInt(date * 1000));
|
||||||
var date2 = new Date().getTime();
|
var date2 = new Date().getTime();
|
||||||
console.log('date2 at line 1564:', date2);
|
|
||||||
|
|
||||||
// 计算时间差(以毫秒为单位)
|
// 计算时间差(以毫秒为单位)
|
||||||
var timeDiff = Number(date2 - date1);
|
var timeDiff = Number(date2 - date1);
|
||||||
console.log('timeDiff at line 1569:', timeDiff);
|
|
||||||
|
|
||||||
// 将半年转换为毫秒
|
// 将半年转换为毫秒
|
||||||
var halfYearInMilliseconds = 1000 * 60 * 60 * 24 * 182.5; // 假设一年有 365 天
|
var halfYearInMilliseconds = 1000 * 60 * 60 * 24 * 182.5; // 假设一年有 365 天
|
||||||
@@ -3152,7 +3150,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
console.log('status at line 1578:', status);
|
|
||||||
},
|
},
|
||||||
changeSelectTabs(e) {
|
changeSelectTabs(e) {
|
||||||
console.log('e at line 1536:', e);
|
console.log('e at line 1536:', e);
|
||||||
|
|||||||
@@ -2209,11 +2209,10 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
var date1 = new Date(parseInt(date * 1000));
|
var date1 = new Date(parseInt(date * 1000));
|
||||||
var date2 = new Date().getTime();
|
var date2 = new Date().getTime();
|
||||||
console.log('date2 at line 1564:', date2);
|
|
||||||
|
|
||||||
// 计算时间差(以毫秒为单位)
|
// 计算时间差(以毫秒为单位)
|
||||||
var timeDiff = Number(date2 - date1);
|
var timeDiff = Number(date2 - date1);
|
||||||
console.log('timeDiff at line 1569:', timeDiff);
|
|
||||||
|
|
||||||
// 将半年转换为毫秒
|
// 将半年转换为毫秒
|
||||||
var halfYearInMilliseconds = 1000 * 60 * 60 * 24 * 182.5; // 假设一年有 365 天
|
var halfYearInMilliseconds = 1000 * 60 * 60 * 24 * 182.5; // 假设一年有 365 天
|
||||||
|
|||||||
@@ -41,11 +41,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<!-- 时间轴 -->
|
<!-- 时间轴 -->
|
||||||
<el-timeline v-if="item.question && item.question[0] != null">
|
<el-timeline v-if="item.question && item.question[0] != null">
|
||||||
|
|
||||||
<el-timeline-item :timestamp="item1.ctime|formatDatehms" placement="top" v-for="(item1, index1) in item.question" :key="index1">
|
<el-timeline-item :timestamp="item1.ctime|formatDatehms" placement="top" v-for="(item1, index1) in item.question" :key="index1">
|
||||||
<el-card>
|
<el-card>
|
||||||
|
|
||||||
<!-- 初审 -->
|
<!-- 初审 -->
|
||||||
<div v-if="index1 == item.question.length-1">
|
<div v-if="index1 == item.question.length-1">
|
||||||
<h4><el-tag >Under review</el-tag></h4>
|
<h4 style="position: relative;"><el-tag >Under review</el-tag><el-button type="primary" size="mini" style="position: absolute;right: 0;" @click="showDetail(item1)">Detail</el-button></h4>
|
||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<div class="art_author_coment">
|
<div class="art_author_coment">
|
||||||
<p v-if="item1.qu9_contents!=''">
|
<p v-if="item1.qu9_contents!=''">
|
||||||
@@ -502,6 +504,20 @@
|
|||||||
<el-button type="primary" @click="Detailvisible=false">OK</el-button>
|
<el-button type="primary" @click="Detailvisible=false">OK</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog title="Feedback questionnaire" :visible.sync="dialogFormVisible" width="900px" :close-on-click-modal="false">
|
||||||
|
<!-- 审稿人表单修改 -->
|
||||||
|
|
||||||
|
<common-author-article
|
||||||
|
type="questionform"
|
||||||
|
pagetype="Editor"
|
||||||
|
:form="questionform"
|
||||||
|
:txt_mess="artMes"
|
||||||
|
:btn_submit="1"
|
||||||
|
:articleId="articleId"
|
||||||
|
:journal_id="journal_id"
|
||||||
|
></common-author-article>
|
||||||
|
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -509,6 +525,8 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
questionform:{},
|
||||||
|
dialogFormVisible:false,
|
||||||
baseUrl: this.Common.baseUrl,
|
baseUrl: this.Common.baseUrl,
|
||||||
mediaUrl: this.Common.mediaUrl,
|
mediaUrl: this.Common.mediaUrl,
|
||||||
articleId: this.$route.query.id,
|
articleId: this.$route.query.id,
|
||||||
@@ -582,6 +600,42 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showDetail(data){
|
||||||
|
|
||||||
|
this.questionform = data;
|
||||||
|
this.questionform.rev_qu_id = data.rev_qu_id;
|
||||||
|
this.questionform.qu1 = data.qu1;
|
||||||
|
this.questionform.qu2 = data.qu2;
|
||||||
|
this.questionform.qu3 = data.qu3;
|
||||||
|
this.questionform.qu4 = data.qu4;
|
||||||
|
this.questionform.qu5 = data.qu5;
|
||||||
|
this.questionform.qu6 = data.qu6;
|
||||||
|
this.questionform.qu7 = data.qu7;
|
||||||
|
this.questionform.qu8 = data.qu8;
|
||||||
|
this.questionform.qu9 = data.qu9 == 0 ? false : true;
|
||||||
|
this.questionform.qu9contents = data.qu9_contents;
|
||||||
|
this.questionform.qu10 = data.qu10 == 0 ? false : true;
|
||||||
|
this.questionform.qu10contents = data.qu10_contents;
|
||||||
|
this.questionform.qu11 = data.qu11 == 0 ? false : true;
|
||||||
|
this.questionform.qu11contents = data.qu11_contents;
|
||||||
|
this.questionform.qu12 = data.qu12 == 0 ? false : true;
|
||||||
|
this.questionform.qu12contents = data.qu12_contents;
|
||||||
|
this.questionform.qu13 = data.qu13 == 0 ? false : true;
|
||||||
|
this.questionform.qu13contents = data.qu13_contents;
|
||||||
|
this.questionform.qu14 = data.qu14 == 0 ? false : true;
|
||||||
|
this.questionform.qu14contents = data.qu14_contents;
|
||||||
|
this.questionform.qu15 = data.qu15 == 0 ? false : true;
|
||||||
|
this.questionform.qu15contents = data.qu15_contents;
|
||||||
|
this.questionform.rated = data.rated;
|
||||||
|
this.questionform.recommend = data.recommend;
|
||||||
|
this.questionform.other = data.other;
|
||||||
|
this.questionform.confident = data.confidential;
|
||||||
|
this.questionform.comment = data.comments;
|
||||||
|
this.questionform.is_anonymous = data.is_anonymous;
|
||||||
|
this.questionform.type= data.type;
|
||||||
|
this.questionform.score = data.score;
|
||||||
|
this.dialogFormVisible = true;
|
||||||
|
},
|
||||||
//初始化文章信息
|
//初始化文章信息
|
||||||
initarticle() {
|
initarticle() {
|
||||||
this.$api
|
this.$api
|
||||||
|
|||||||
@@ -462,7 +462,7 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
const escapeIllegalLT = (str) => {
|
const escapeIllegalLT = (str) => {
|
||||||
return str.replace(/<(?!(\/?(p|div|span|table|tr|td|th|b|i|strong|em|ul|ol|li|br|img)))/gi, '<');
|
return str.replace(/<(?!(\/?(p|div|span|table|tr|td|th|b|i|strong|em|ul|ol|li|br|img|myh3|myfigure|mytable|wmath)))/gi, '<');
|
||||||
};
|
};
|
||||||
|
|
||||||
let processedHtml = '';
|
let processedHtml = '';
|
||||||
@@ -473,18 +473,16 @@ export default {
|
|||||||
const cells = doc.querySelectorAll('td, th');
|
const cells = doc.querySelectorAll('td, th');
|
||||||
|
|
||||||
cells.forEach((cell) => {
|
cells.forEach((cell) => {
|
||||||
// 1. 先把单元格内的非法 < 转义
|
|
||||||
let cellText = cell.innerHTML;
|
let cellText = cell.innerHTML;
|
||||||
// let cellText = escapeIllegalLT(cell.innerHTML);
|
|
||||||
// 2. 再清理空标签和多余空格
|
|
||||||
cell.innerHTML = cellText
|
cell.innerHTML = cellText
|
||||||
.replace(cleanEmptyTags, '')
|
.replace(cleanEmptyTags, '')
|
||||||
.replace(replaceSpaces, ' ');
|
.replace(replaceSpaces, ' ');
|
||||||
});
|
});
|
||||||
processedHtml = doc.body.innerHTML;
|
processedHtml = doc.body.innerHTML;
|
||||||
} else {
|
} else {
|
||||||
// 非表格逻辑也同样处理转义
|
|
||||||
// processedHtml = escapeIllegalLT(rawValue)
|
|
||||||
processedHtml = rawValue
|
processedHtml = rawValue
|
||||||
.replace(cleanEmptyTags, '')
|
.replace(cleanEmptyTags, '')
|
||||||
.replace(replaceSpaces, ' ');
|
.replace(replaceSpaces, ' ');
|
||||||
@@ -817,13 +815,7 @@ export default {
|
|||||||
|
|
||||||
if (tempDiv.querySelector('table')) {
|
if (tempDiv.querySelector('table')) {
|
||||||
if (_this.type == 'table') {
|
if (_this.type == 'table') {
|
||||||
// 3. 在这里直接消费外部变量 currentPasteBase64Images
|
|
||||||
// content = content.replace(new RegExp(`src="${silentPlaceholder}"`, 'gi'), () => {
|
|
||||||
// // 按顺序取图
|
|
||||||
// const base64Data = currentPasteBase64Images[globalImgCounter] || '';
|
|
||||||
// globalImgCounter++;
|
|
||||||
// return `src="${base64Data}"`;
|
|
||||||
// });
|
|
||||||
_this.$commonJS.parseTableToArray(content, (tableList) => {
|
_this.$commonJS.parseTableToArray(content, (tableList) => {
|
||||||
var contentHtml = `
|
var contentHtml = `
|
||||||
<div class="thumbnailTableBox wordTableHtml table_Box table_Box3333" style="">
|
<div class="thumbnailTableBox wordTableHtml table_Box table_Box3333" style="">
|
||||||
@@ -835,10 +827,10 @@ export default {
|
|||||||
${row
|
${row
|
||||||
.map((cell) => {
|
.map((cell) => {
|
||||||
return `
|
return `
|
||||||
<td colspan="${cell.colspan || 1}" rowspan="${cell.rowspan || 1}">
|
<td colspan="${cell.colspan || 1}" rowspan="${cell.rowspan || 1}">
|
||||||
<span>${cell.text || ''}</span>
|
<span>${cell.text || ''}</span>
|
||||||
</td>
|
</td>
|
||||||
`;
|
`;
|
||||||
})
|
})
|
||||||
.join('')}
|
.join('')}
|
||||||
</tr>
|
</tr>
|
||||||
@@ -851,20 +843,8 @@ export default {
|
|||||||
|
|
||||||
const container = document.createElement('div');
|
const container = document.createElement('div');
|
||||||
container.innerHTML = contentHtml;
|
container.innerHTML = contentHtml;
|
||||||
|
|
||||||
// _this.updateTableStyles(container); // 根据需要应用额外的样式
|
|
||||||
args.content = container.innerHTML; // 更新处理后的内容
|
args.content = container.innerHTML; // 更新处理后的内容
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
// _this.$confirm('检测到粘贴内容包含表格,是否需要以表格形式添加?', '提示', {
|
|
||||||
// confirmButtonText: '添加表格',
|
|
||||||
// cancelButtonText: '纯文本添加',
|
|
||||||
// type: 'info'
|
|
||||||
// }).then(() => {
|
|
||||||
// _this.$emit('openAddTable', content);
|
|
||||||
// return false
|
|
||||||
// }).catch(() => {
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const mathRegex = /\$\$([\s\S]+?)\$\$|\$([\s\S]+?)\$/g;
|
const mathRegex = /\$\$([\s\S]+?)\$\$|\$([\s\S]+?)\$/g;
|
||||||
|
|||||||
282
src/components/page/components/reviewArticle/author.vue
Normal file
282
src/components/page/components/reviewArticle/author.vue
Normal file
@@ -0,0 +1,282 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form :model="questionform" :rules="isEdit ? rules : {}" ref="question" label-width="300px" label-position="top">
|
||||||
|
<el-divider content-position="center">REVIEWER'S ASSESSMENT</el-divider>
|
||||||
|
|
||||||
|
<oldForm
|
||||||
|
v-if="!isNewForm"
|
||||||
|
:txt_mess="txt_mess"
|
||||||
|
:isEdit="isEdit"
|
||||||
|
:form="baseQuestionform"
|
||||||
|
@update="(e) => (questionform = e)"
|
||||||
|
></oldForm>
|
||||||
|
<newForm
|
||||||
|
v-if="isNewForm"
|
||||||
|
:txt_mess="txt_mess"
|
||||||
|
:isEdit="isEdit"
|
||||||
|
:form="baseQuestionform"
|
||||||
|
@update="(e) => (questionform = e)"
|
||||||
|
></newForm>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import oldForm from './old.vue';
|
||||||
|
import newForm from './new.vue';
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
oldForm,
|
||||||
|
newForm
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
// isEdit: {
|
||||||
|
// type: Boolean,
|
||||||
|
// default: true
|
||||||
|
// },
|
||||||
|
// isNewForm: {
|
||||||
|
// type: Boolean,
|
||||||
|
// default: false
|
||||||
|
// },
|
||||||
|
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: 'questionform'
|
||||||
|
},
|
||||||
|
pagetype: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
confident: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
articleId: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
journal_id: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
txt_mess: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
btn_submit: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
form: {
|
||||||
|
handler(e) {
|
||||||
|
this.baseQuestionform = JSON.parse(JSON.stringify(e)); // 深拷贝,防止直接改 props
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
btn_submit: {
|
||||||
|
handler(e) {
|
||||||
|
this.isEdit = e == 0 ? true : false; // 深拷贝,防止直接改 props
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isNewForm: false,
|
||||||
|
loading: false,
|
||||||
|
isEdit: true,
|
||||||
|
baseQuestionform: {},
|
||||||
|
questionform: {},
|
||||||
|
rules: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData() {
|
||||||
|
// Fetch article data
|
||||||
|
this.questionform = { ...this.baseQuestionform };
|
||||||
|
if (this.baseQuestionform.type != 1) {
|
||||||
|
this.isNewForm = true;
|
||||||
|
this.rules = {
|
||||||
|
rated: [{ required: true, message: 'please select', trigger: 'blur' }],
|
||||||
|
comment: [{ required: true, message: 'please input content', trigger: 'blur' }],
|
||||||
|
other: [{ required: true, message: 'please input content', trigger: 'blur' }],
|
||||||
|
recommend: [{ required: true, message: 'please select', trigger: 'blur' }]
|
||||||
|
};
|
||||||
|
if (this.txt_mess.atype == 'REVIEW' || this.txt_mess.atype == 'MINI REVIEW') {
|
||||||
|
for (let i = 1; i <= 12; i++) {
|
||||||
|
this.rules[`qu${i}`] = [{ required: true, message: 'please select', trigger: 'blur' }];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let i = 1; i <= 14; i++) {
|
||||||
|
this.rules[`qu${i}`] = [{ required: true, message: 'please select', trigger: 'blur' }];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.isNewForm = false;
|
||||||
|
this.rules = {
|
||||||
|
qu6: [{ required: true, message: 'please select', trigger: 'blur' }],
|
||||||
|
rated: [{ required: true, message: 'please select', trigger: 'blur' }],
|
||||||
|
comment: [{ required: true, message: 'please input content', trigger: 'blur' }],
|
||||||
|
recommend: [{ required: true, message: 'please select', trigger: 'blur' }]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
questionSubmit() {
|
||||||
|
if (this.questionform.is_anonymous == '' && this.questionform.is_anonymous != '0') {
|
||||||
|
this.$message.error('Please choose disclose your name or remain anonymous.');
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const regex = /[\u4E00-\u9FA5\uF900-\uFA2D]{1,}/;
|
||||||
|
if (this.questionform.comment && this.questionform.comment != '') {
|
||||||
|
if (regex.test(this.questionform.comment)) {
|
||||||
|
// 如果输入的是中文,则清空输入框
|
||||||
|
this.$message.error('Comments for the Authors cannot use Chinese.');
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.questionform.confident && this.questionform.confident != '') {
|
||||||
|
if (regex.test(this.questionform.confident)) {
|
||||||
|
// 如果输入的是中文,则清空输入框
|
||||||
|
this.$message.error('Confidential Comments to the Editor cannot be in Chinese.');
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let Char_Cter = null;
|
||||||
|
// 验证相加的字数
|
||||||
|
if (this.isNewForm) {
|
||||||
|
Char_Cter = [
|
||||||
|
this.questionform.qu5contents,
|
||||||
|
this.questionform.qu6contents,
|
||||||
|
this.questionform.qu7contents,
|
||||||
|
this.questionform.qu8contents,
|
||||||
|
this.questionform.qu9contents,
|
||||||
|
this.questionform.qu10contents,
|
||||||
|
this.questionform.qu11contents,
|
||||||
|
this.questionform.qu12contents,
|
||||||
|
this.questionform.qu13contents,
|
||||||
|
this.questionform.qu14contents,
|
||||||
|
this.questionform.comment
|
||||||
|
].join(' ');
|
||||||
|
} else {
|
||||||
|
Char_Cter = [
|
||||||
|
this.questionform.qu9contents,
|
||||||
|
this.questionform.qu10contents,
|
||||||
|
this.questionform.qu11contents,
|
||||||
|
this.questionform.qu12contents,
|
||||||
|
this.questionform.qu13contents,
|
||||||
|
this.questionform.comment
|
||||||
|
].join(' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (new RegExp('[\\u4E00-\\u9FFF]+', 'g').test(Char_Cter)) {
|
||||||
|
//中文
|
||||||
|
let blankCount = 0;
|
||||||
|
for (let i in Char_Cter.match(/ /g)) {
|
||||||
|
blankCount++;
|
||||||
|
}
|
||||||
|
let wenziCount = 0;
|
||||||
|
for (let j = 0; j < Char_Cter.length; j++) {
|
||||||
|
if (Char_Cter.charCodeAt(j) < 0 || Char_Cter.charCodeAt(j) > 255) {
|
||||||
|
wenziCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (blankCount + wenziCount <= 60) {
|
||||||
|
this.$message.error('We encourage you to enrich your comment further to help improve the peer paper.');
|
||||||
|
this.$message({
|
||||||
|
offset: '380',
|
||||||
|
type: 'error',
|
||||||
|
message: 'We encourage you to enrich your comment further to help improve the peer paper.'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//英文
|
||||||
|
let blankCount = 0;
|
||||||
|
for (let i in Char_Cter.match(/ /g)) {
|
||||||
|
blankCount++;
|
||||||
|
}
|
||||||
|
if (blankCount <= 50) {
|
||||||
|
this.$message.error('We encourage you to enrich your comment further to help improve the peer paper.');
|
||||||
|
this.$message({
|
||||||
|
offset: '380',
|
||||||
|
type: 'error',
|
||||||
|
message: 'We encourage you to enrich your comment further to help improve the peer paper.'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 提交接口
|
||||||
|
// this.loading = true;
|
||||||
|
|
||||||
|
this.$refs.question.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: 'Loading...',
|
||||||
|
spinner: 'el-icon-loading',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
});
|
||||||
|
this.$api
|
||||||
|
.post(this.isNewForm ? 'api/Reviewer/questionSubmitNew' : 'api/Reviewer/questionSubmit', {
|
||||||
|
...this.questionform,
|
||||||
|
type: this.isNewForm ? (this.txt_mess.atype == 'REVIEW' || this.txt_mess.atype == 'MINI REVIEW' ? 3 : 2) : 1
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
loading.close();
|
||||||
|
this.$message.success('Success!!');
|
||||||
|
this.$emit('refresh');
|
||||||
|
this.$router.push('/per_text_success');
|
||||||
|
} else {
|
||||||
|
loading.close();
|
||||||
|
// this.$message.error('Question submit error!');
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
loading.close();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.jouLink {
|
||||||
|
color: #006699;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
::v-deep .el-collapse {
|
||||||
|
border-top: 0;
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
::v-deep .el-divider {
|
||||||
|
background-color: #006699;
|
||||||
|
}
|
||||||
|
::v-deep .el-form-item--mini.el-form-item,
|
||||||
|
.el-form-item--small.el-form-item {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -989,9 +989,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.$validateString(data.realname)) {
|
if (this.$validateString(data.realname)) {
|
||||||
console.log('Input string is valid.');
|
|
||||||
} else {
|
} else {
|
||||||
console.log('Input string is invalid.');
|
|
||||||
this.$message.error(this.$t('info.realname'));
|
this.$message.error(this.$t('info.realname'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,14 +70,11 @@ export default {
|
|||||||
this.tableData.forEach((row, i) => {
|
this.tableData.forEach((row, i) => {
|
||||||
modalContent += `<tr class="${this.isHeaderRow(i, this.tableData) ? 'table-header-row' : ''}">`;
|
modalContent += `<tr class="${this.isHeaderRow(i, this.tableData) ? 'table-header-row' : ''}">`;
|
||||||
row.forEach((cell) => {
|
row.forEach((cell) => {
|
||||||
modalContent += `
|
modalContent += `<td
|
||||||
<td
|
|
||||||
colspan="${cell.colspan || 1}"
|
colspan="${cell.colspan || 1}"
|
||||||
rowspan="${cell.rowspan || 1}"
|
rowspan="${cell.rowspan || 1}"
|
||||||
style=""
|
style=""
|
||||||
>
|
><span>${cell.text}</span></td>`;
|
||||||
<span>${cell.text}</span>
|
|
||||||
</td>`;
|
|
||||||
});
|
});
|
||||||
modalContent += `</tr>`;
|
modalContent += `</tr>`;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -394,9 +394,9 @@
|
|||||||
|
|
||||||
|
|
||||||
if (this.$validateString(this.addForm.realname)) {
|
if (this.$validateString(this.addForm.realname)) {
|
||||||
console.log('Input string is valid.');
|
|
||||||
} else {
|
} else {
|
||||||
console.log('Input string is invalid.');
|
|
||||||
this.$message.error(this.$t('info.realname'))
|
this.$message.error(this.$t('info.realname'))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -853,7 +853,32 @@
|
|||||||
<el-input v-model="MessForm.company" placeholder="Please enter"></el-input>
|
<el-input v-model="MessForm.company" placeholder="Please enter"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="Field :" prop="field">
|
<el-form-item label="Field :" prop="field">
|
||||||
<el-input v-model="MessForm.field" placeholder="Please enter" type="textarea" autosize> </el-input>
|
<div class="automatic-parsing-box">
|
||||||
|
<el-input
|
||||||
|
style="border: none"
|
||||||
|
class="automaticParsing"
|
||||||
|
v-model="MessForm.field"
|
||||||
|
placeholder="Please enter"
|
||||||
|
autosize
|
||||||
|
type="textarea"
|
||||||
|
rows="5"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
|
||||||
|
<span
|
||||||
|
class="automaticParsing-btn"
|
||||||
|
v-if="MessForm.field"
|
||||||
|
|
||||||
|
@click="handleAiFiled"
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
v-if="aiLoading"
|
||||||
|
class="el-icon-loading"
|
||||||
|
style="margin-right: 4px"
|
||||||
|
></i>
|
||||||
|
<span>{{ aiLoading ? 'Analyzing...' : 'AI Analysis' }}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="Introduction :">
|
<el-form-item label="Introduction :">
|
||||||
<el-input v-model="MessForm.introduction" placeholder="Please enter" type="textarea" autosize> </el-input>
|
<el-input v-model="MessForm.introduction" placeholder="Please enter" type="textarea" autosize> </el-input>
|
||||||
@@ -1183,6 +1208,7 @@ export default {
|
|||||||
editorList: [],
|
editorList: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
userloading: false,
|
userloading: false,
|
||||||
|
aiLoading: false,
|
||||||
authorArticlesList: [],
|
authorArticlesList: [],
|
||||||
userrole: localStorage.getItem('U_status'),
|
userrole: localStorage.getItem('U_status'),
|
||||||
baseUrl: this.Common.baseUrl,
|
baseUrl: this.Common.baseUrl,
|
||||||
@@ -1456,6 +1482,45 @@ export default {
|
|||||||
this.getAllEditor();
|
this.getAllEditor();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleAiFiled() {
|
||||||
|
if (this.aiLoading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.aiLoading = true;
|
||||||
|
console.log(this.MessForm.field, this.majorValueList);
|
||||||
|
this.$api
|
||||||
|
.post('api/Agent/processOneUser', {
|
||||||
|
user_id: this.MessForm.user_id,
|
||||||
|
field: this.MessForm.field
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log('🚀 ~ handleAiFiled ~ res:', res);
|
||||||
|
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.majorValueList = res.data.majors.map((item) => ({
|
||||||
|
|
||||||
|
selectedValue: Array.isArray(item.shu)
|
||||||
|
? item.shu
|
||||||
|
: typeof item.shu === 'string'
|
||||||
|
? item.shu.split(',').map(Number)
|
||||||
|
: [item.shu]
|
||||||
|
}));
|
||||||
|
if(res.data.majors.length==0){
|
||||||
|
this.$message.error(res.data.msg);
|
||||||
|
}else{
|
||||||
|
this.$message.success('Research areas have been automatically parsed');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.aiLoading = false;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error('handleAiFiled error:', err);
|
||||||
|
|
||||||
|
this.aiLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
async getWosList(id) {
|
async getWosList(id) {
|
||||||
var that = this;
|
var that = this;
|
||||||
this.authorList = [];
|
this.authorList = [];
|
||||||
@@ -1608,7 +1673,7 @@ export default {
|
|||||||
this.userMessage.majorStr = res.data.baseInfo.majorStr;
|
this.userMessage.majorStr = res.data.baseInfo.majorStr;
|
||||||
this.cvitaForm.user_id = res.data.baseInfo.user_id;
|
this.cvitaForm.user_id = res.data.baseInfo.user_id;
|
||||||
this.userMessage.website = res.data.baseInfo.website;
|
this.userMessage.website = res.data.baseInfo.website;
|
||||||
console.log('res.data.baseInfo.majors.map at line 16124:', res.data.baseInfo.majors)
|
|
||||||
this.userMessage.majors=res.data.baseInfo.majors
|
this.userMessage.majors=res.data.baseInfo.majors
|
||||||
this.majorValueList = res.data.baseInfo.majors.map((item) => ({
|
this.majorValueList = res.data.baseInfo.majors.map((item) => ({
|
||||||
|
|
||||||
@@ -1617,7 +1682,7 @@ export default {
|
|||||||
: typeof item.shu === 'string'
|
: typeof item.shu === 'string'
|
||||||
? item.shu.split(',').map(Number)
|
? item.shu.split(',').map(Number)
|
||||||
: [item.shu]
|
: [item.shu]
|
||||||
}));console.log('this.majorValueList at line 1612:', this.majorValueList)
|
}));
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
this.coreTable = res.data.baseInfo;
|
this.coreTable = res.data.baseInfo;
|
||||||
this.cvitaTable = res.data.cvs;
|
this.cvitaTable = res.data.cvs;
|
||||||
@@ -1746,9 +1811,9 @@ export default {
|
|||||||
// 保存个人信息
|
// 保存个人信息
|
||||||
saveMessage() {
|
saveMessage() {
|
||||||
if (this.$validateString(this.MessForm.realname)) {
|
if (this.$validateString(this.MessForm.realname)) {
|
||||||
console.log('Input string is valid.');
|
|
||||||
} else {
|
} else {
|
||||||
console.log('Input string is invalid.');
|
|
||||||
this.$message.error(this.$t('info.realname'));
|
this.$message.error(this.$t('info.realname'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1818,13 +1883,13 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
isEditIndex(data) {
|
isEditIndex(data) {
|
||||||
console.log('data at line 1543:', this.userMessage);
|
|
||||||
var status;
|
var status;
|
||||||
var date = '';
|
var date = '';
|
||||||
switch (data) {
|
switch (data) {
|
||||||
case 'wos':
|
case 'wos':
|
||||||
date = this.userMessage.wos_time;
|
date = this.userMessage.wos_time;
|
||||||
console.log('date at line 1714:', date);
|
|
||||||
break;
|
break;
|
||||||
case 'scopus':
|
case 'scopus':
|
||||||
date = this.userMessage.scopus_time;
|
date = this.userMessage.scopus_time;
|
||||||
@@ -1833,17 +1898,16 @@ export default {
|
|||||||
date = this.userMessage.google_time;
|
date = this.userMessage.google_time;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
console.log('date at line 1714:', date);
|
|
||||||
if (date == 0) {
|
if (date == 0) {
|
||||||
status = true;
|
status = true;
|
||||||
} else {
|
} else {
|
||||||
var date1 = new Date(parseInt(date * 1000));
|
var date1 = new Date(parseInt(date * 1000));
|
||||||
var date2 = new Date().getTime();
|
var date2 = new Date().getTime();
|
||||||
console.log('date2 at line 1564:', date2);
|
|
||||||
|
|
||||||
// 计算时间差(以毫秒为单位)
|
// 计算时间差(以毫秒为单位)
|
||||||
var timeDiff = Number(date2 - date1);
|
var timeDiff = Number(date2 - date1);
|
||||||
console.log('timeDiff at line 1569:', timeDiff);
|
|
||||||
|
|
||||||
// 将半年转换为毫秒
|
// 将半年转换为毫秒
|
||||||
var halfYearInMilliseconds = 1000 * 60 * 60 * 24 * 182.5; // 假设一年有 365 天
|
var halfYearInMilliseconds = 1000 * 60 * 60 * 24 * 182.5; // 假设一年有 365 天
|
||||||
@@ -1854,7 +1918,7 @@ export default {
|
|||||||
status = true;
|
status = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('status at line 1578:', status);
|
|
||||||
return status;
|
return status;
|
||||||
},
|
},
|
||||||
// 个人指数修改
|
// 个人指数修改
|
||||||
@@ -2819,4 +2883,31 @@ export default {
|
|||||||
.userIndexBox .s_rol > div.rol_mess > font {
|
.userIndexBox .s_rol > div.rol_mess > font {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
.automatic-parsing-box {
|
||||||
|
position: relative;
|
||||||
|
padding-bottom: 34px;
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #006699;
|
||||||
|
}
|
||||||
|
|
||||||
|
.automaticParsing-btn {
|
||||||
|
position: absolute;
|
||||||
|
min-width: 100px;
|
||||||
|
text-align: center;
|
||||||
|
right: 4px;
|
||||||
|
bottom: 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #409eff;
|
||||||
|
border-color: #409eff;padding: 6px 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 14px;
|
||||||
|
border-radius: 4px;box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .automatic-parsing-box .automaticParsing .el-textarea__inner {
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
522
src/components/page/scholarCrawlers.vue
Normal file
522
src/components/page/scholarCrawlers.vue
Normal file
@@ -0,0 +1,522 @@
|
|||||||
|
<template>
|
||||||
|
<div class="scholar-container">
|
||||||
|
<div class="sidebar">
|
||||||
|
<el-card class="params-card" shadow="never">
|
||||||
|
<div slot="header" class="card-header" style="font-weight: bold;"><i class="el-icon-search"></i> Scholar Search</div>
|
||||||
|
|
||||||
|
<el-form :model="form" ref="searchForm" :rules="rules" label-position="top">
|
||||||
|
<el-form-item label="Keyword" prop="keyword">
|
||||||
|
<el-input v-model="form.keyword" placeholder="e.g. cancer" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<el-form-item label="Per Page (Articles)" class="half-width">
|
||||||
|
<el-input-number v-model="per_page" :controls="false" :min="1" :max="100"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="Page Number" class="half-width">
|
||||||
|
<el-input-number v-model="page" :controls="false" :min="1" :max="maxPages"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; gap: 10px; margin-top: 15px;">
|
||||||
|
<el-button type="primary" class="fetch-btn" style="flex: 3;" :loading="loading" @click="handleExecute">
|
||||||
|
<i v-if="!loading" class="el-icon-coin"></i>
|
||||||
|
{{ loading ? 'Fetching...' : 'Execute Fetch' }}
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
<el-button @click="resetForm" class="custom-reset-btn">
|
||||||
|
<i class="el-icon-refresh-left"></i> Reset
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<div class="info-box">
|
||||||
|
<h4>INFORMATION</h4>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
"This tool allows for systematic extraction of scholar data from academic publications. Note that per_page refers to the
|
||||||
|
number of articles scanned, which may yield multiple scholar records."
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="main-content" :style="{border:hasSearched && !loading ? 'none' : '2px solid #e2e2e2'}">
|
||||||
|
<div v-if="!hasSearched && !loading" class="main-content-center">
|
||||||
|
<div class="empty-state">
|
||||||
|
<div class="state-icon"><i class="el-icon-user"></i></div>
|
||||||
|
|
||||||
|
<h3>Scholar Search</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Enter a research keyword and specify the search depth to retrieve expert profiles from professional academic
|
||||||
|
databases.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="loading" class="main-content-center">
|
||||||
|
<div class="processing-state">
|
||||||
|
<div class="spinner-box"><i class="el-icon-loading"></i></div>
|
||||||
|
|
||||||
|
<h3>PROCESSING REQUEST</h3>
|
||||||
|
|
||||||
|
<p>Connecting to api.tmrjournals.com...</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="hasSearched && !loading" class="results-container">
|
||||||
|
<div class="results-header">
|
||||||
|
<div class="results-stats">
|
||||||
|
<i class="el-icon-user"></i> RESULTS FOUND: <strong>{{ total }}</strong>
|
||||||
|
<span class="divider">|</span>
|
||||||
|
<span class="page-info">PAGE {{ page }} OF APPROX. {{ maxPages }}</span>
|
||||||
|
<template v-if="Source">
|
||||||
|
<span class="divider">|</span>
|
||||||
|
<span class="page-info">Source {{ Source }}</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="results-nav">
|
||||||
|
<el-button
|
||||||
|
class="nav-btn"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-arrow-left"
|
||||||
|
:disabled="page <= 1"
|
||||||
|
@click="changePage(-1)"
|
||||||
|
></el-button>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
class="nav-btn"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-arrow-right"
|
||||||
|
:disabled="page >= maxPages"
|
||||||
|
@click="changePage(1)"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table :data="exportFiles" class="custom-table" border stripe header-row-class-name="dark-table-header">
|
||||||
|
<el-table-column prop="name" label="File name" min-width="200"></el-table-column>
|
||||||
|
<el-table-column prop="url" label="File url" min-width="250">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link class="file-link" :href="scope.row.url" target="_blank">
|
||||||
|
{{ scope.row.url }}
|
||||||
|
<i class="el-icon-download download-icon"></i>
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="count" label="Count" width="120" align="center"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'scholarCrawlers',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form: { keyword: '' },
|
||||||
|
rules: {
|
||||||
|
keyword: [{ required: true, message: 'Required', trigger: 'blur' }]
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
exportLoading: false,
|
||||||
|
hasSearched: false,
|
||||||
|
page: 1,
|
||||||
|
per_page: 20,
|
||||||
|
maxPages: 100, // 初始上限
|
||||||
|
total: 0,
|
||||||
|
Source: '',
|
||||||
|
exportFiles: [] // 模拟图二的文件列表数据
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
resetForm() {
|
||||||
|
this.form = { keyword: '' };
|
||||||
|
this.page = 1;
|
||||||
|
this.per_page=20;
|
||||||
|
this.$refs.searchForm.resetFields();
|
||||||
|
},
|
||||||
|
async handleExecute() {
|
||||||
|
this.$refs.searchForm.validate(async (valid) => {
|
||||||
|
if (!valid) return;
|
||||||
|
this.loading = true;
|
||||||
|
this.hasSearched = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 1. 调用 Search 接口获取页数上限
|
||||||
|
const searchRes = await this.$api.post('/api/expert_finder/search', {
|
||||||
|
keyword: this.form.keyword,
|
||||||
|
page: this.page,
|
||||||
|
per_page: this.per_page
|
||||||
|
});
|
||||||
|
|
||||||
|
if (searchRes && searchRes.code === 0) {
|
||||||
|
this.total = searchRes.data.total || 0;
|
||||||
|
this.maxPages = searchRes.data.total_pages || 1; // 2. 模拟处理延迟(配合图一动画)
|
||||||
|
this.Source = searchRes.data.source || '';
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 1500)); // 3. 调用 Export 接口生成文件
|
||||||
|
|
||||||
|
const exportRes = await this.$api.post('/api/expert_finder/export', {
|
||||||
|
keyword: this.form.keyword,
|
||||||
|
page: this.page,
|
||||||
|
per_page: this.per_page
|
||||||
|
});
|
||||||
|
|
||||||
|
if (exportRes && (exportRes.code === 0 || exportRes.status === 1)) {
|
||||||
|
// 构造图二展示的数据格式
|
||||||
|
const fileUrl = exportRes.data ? exportRes.data.file_url || exportRes.file_url : '';
|
||||||
|
const fileName = fileUrl ? fileUrl.split('/').pop() : `experts_${this.form.keyword}_p${this.page}.xlsx`;
|
||||||
|
this.exportFiles = [
|
||||||
|
{
|
||||||
|
url: fileUrl,
|
||||||
|
name: fileName,
|
||||||
|
count: searchRes.data.experts ? searchRes.data.experts.length : 0
|
||||||
|
}
|
||||||
|
];
|
||||||
|
this.hasSearched = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.$message.error('Execution failed');
|
||||||
|
console.error(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
changePage(step) {
|
||||||
|
this.page += step;
|
||||||
|
this.handleExecute();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/* 全局基础:背景色与字体 */
|
||||||
|
.scholar-container {
|
||||||
|
display: flex;
|
||||||
|
/* background-color: #E6E6E6; */
|
||||||
|
|
||||||
|
padding: 20px 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* font-family: "Georgia", "Times New Roman", serif; */
|
||||||
|
color: #1a1a1a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- 左侧边栏 --- */
|
||||||
|
.sidebar {
|
||||||
|
width: 420px;
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 参数卡片:去掉 Element 默认圆角和阴影 */
|
||||||
|
.params-card {
|
||||||
|
border: 2px solid #000 !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
background: #fff;
|
||||||
|
/* 核心:右下角的硬阴影效果 */
|
||||||
|
box-shadow: 6px 6px 0px 0px rgba(0, 0, 0, 0.8) !important;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 卡片头部标题 */
|
||||||
|
.card-header {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 500;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header i {
|
||||||
|
margin-right: 8px;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表单元素重置 */
|
||||||
|
/deep/ .el-form-item__label {
|
||||||
|
font-family: 'Arial', sans-serif; /* 标签用无衬线体形成对比 */
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 800;
|
||||||
|
color: #333;
|
||||||
|
padding: 0 !important;
|
||||||
|
line-height: 20px !important;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .el-input__inner {
|
||||||
|
border-radius: 0 !important;
|
||||||
|
border: 1.5px solid #000 !important;
|
||||||
|
height: 40px;
|
||||||
|
font-family: 'Georgia', serif;
|
||||||
|
background-color: #fcfcfc;
|
||||||
|
/* 内部微阴影感 */
|
||||||
|
box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-row {
|
||||||
|
display: flex;
|
||||||
|
gap: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .el-input-number {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 黑色大按钮 */
|
||||||
|
.fetch-btn {
|
||||||
|
width: 100%;
|
||||||
|
height: 55px;
|
||||||
|
background-color: #000 !important;
|
||||||
|
border: none !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
font-weight: 900;
|
||||||
|
font-size: 16px;
|
||||||
|
letter-spacing: 1.5px;
|
||||||
|
margin-top: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fetch-btn:hover {
|
||||||
|
background-color: #333 !important;
|
||||||
|
transform: translate(-1px, -1px);
|
||||||
|
box-shadow: 2px 2px 0 #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fetch-btn i {
|
||||||
|
font-size: 20px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 信息框:黑底白字 */
|
||||||
|
.info-box {
|
||||||
|
background-color: #151515;
|
||||||
|
color: #d0d0d0;
|
||||||
|
padding: 25px;
|
||||||
|
border-radius: 0;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-box h4 {
|
||||||
|
color: #fff;
|
||||||
|
font-family: 'Arial', sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
margin: 0 0 15px 0;
|
||||||
|
border-bottom: 1px solid #444;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-box p {
|
||||||
|
font-style: italic;
|
||||||
|
font-size: 13px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content-center {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-state {
|
||||||
|
text-align: center;
|
||||||
|
max-width: 450px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 数据库图标 */
|
||||||
|
.state-icon {
|
||||||
|
font-size: 80px;
|
||||||
|
color: #bcbcbc;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-state h3 {
|
||||||
|
font-size: 24px;
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #444;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-state p {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #888;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 加载动画状态 */
|
||||||
|
.processing-state {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spinner-box {
|
||||||
|
font-size: 50px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
animation: rotating 2s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes rotating {
|
||||||
|
from {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.processing-state h3 {
|
||||||
|
letter-spacing: 4px;
|
||||||
|
font-weight: 900;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
/* 右侧容器改为顶部对齐 */
|
||||||
|
.main-content {
|
||||||
|
flex: 1;
|
||||||
|
border: 2px dashed #bbb;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start; /* 确保列表从顶部开始 */
|
||||||
|
/* padding: 20px; */
|
||||||
|
background-color: rgba(255, 255, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.results-container {
|
||||||
|
width: 100%;
|
||||||
|
/* 模拟图二的实体阴影 */
|
||||||
|
box-shadow: 8px 8px 0px 0px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 统计栏样式 */
|
||||||
|
.results-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 15px 20px;
|
||||||
|
background: #fff;
|
||||||
|
border: 2px solid #000;
|
||||||
|
border-bottom: none; /* 与下方表格衔接 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.results-stats {
|
||||||
|
font-family: 'Arial', sans-serif;
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 14px;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
/* text-transform: uppercase; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.results-stats strong {
|
||||||
|
font-size: 18px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider {
|
||||||
|
margin: 0 15px;
|
||||||
|
color: #ccc;
|
||||||
|
font-weight: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-info {
|
||||||
|
color: #999;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 导航按钮 */
|
||||||
|
.nav-btn {
|
||||||
|
border: 1.5px solid #000 !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
background: #fff !important;
|
||||||
|
color: #000 !important;
|
||||||
|
padding: 5px 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-btn:hover {
|
||||||
|
background: #000 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表格主体还原 */
|
||||||
|
/deep/ .custom-table {
|
||||||
|
border: 2px solid #000 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .dark-table-header th {
|
||||||
|
background-color: #000 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
/* font-family: "Arial", sans-serif; */
|
||||||
|
font-weight: 900;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
padding: 12px 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .el-table__row td {
|
||||||
|
padding: 15px 0 !important;
|
||||||
|
color: #333;
|
||||||
|
/* font-family: "Georgia", serif; */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 链接样式 */
|
||||||
|
.file-link {
|
||||||
|
font-size: 13px;
|
||||||
|
text-decoration: none !important;
|
||||||
|
color: #0066cc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-link:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-icon {
|
||||||
|
margin-left: 6px;
|
||||||
|
vertical-align: middle;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-reset-btn {
|
||||||
|
flex: 1;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 2px solid #000;
|
||||||
|
color: #000;
|
||||||
|
font-weight: 800;
|
||||||
|
font-family: 'Arial', sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
transition: all 0.1s;
|
||||||
|
outline: none;
|
||||||
|
margin-top: 10px
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-reset-btn i {
|
||||||
|
margin-right: 4px;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 悬浮和点击效果:增加黑白对比度 */
|
||||||
|
.custom-reset-btn:hover {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-reset-btn:active {
|
||||||
|
transform: translate(1px, 1px);
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -18,8 +18,13 @@ import store from './store' // 引入 store
|
|||||||
|
|
||||||
|
|
||||||
Vue.prototype.$bus = new Vue();
|
Vue.prototype.$bus = new Vue();
|
||||||
|
// Vue.prototype.$validateString = function (str) {
|
||||||
|
// return /^[a-zA-Z\s\u00C0-\u00FF\u0100-\u017F-]+$/.test(str);
|
||||||
|
// }
|
||||||
|
//除了中文,数字不能用,其他都可以
|
||||||
Vue.prototype.$validateString = function (str) {
|
Vue.prototype.$validateString = function (str) {
|
||||||
return /^[a-zA-Z\s\u00C0-\u00FF\u0100-\u017F-]+$/.test(str);
|
// 匹配规则:不包含数字 (0-9) 且 不包含中文字符 (\u4e00-\u9fa5)
|
||||||
|
return !/[0-9\u4e00-\u9fa5]/.test(str);
|
||||||
}
|
}
|
||||||
window.MathJax = {
|
window.MathJax = {
|
||||||
tex: {
|
tex: {
|
||||||
@@ -180,6 +185,7 @@ Vue.component("Editor", Editor);
|
|||||||
const components = {
|
const components = {
|
||||||
'common-table': () => import('@/components/page/components/table/table.vue'),
|
'common-table': () => import('@/components/page/components/table/table.vue'),
|
||||||
'common-review-article': () => import('@/components/page/components/reviewArticle/index.vue'),
|
'common-review-article': () => import('@/components/page/components/reviewArticle/index.vue'),
|
||||||
|
'common-author-article': () => import('@/components/page/components/reviewArticle/author.vue'),
|
||||||
'common-editor-article': () => import('@/components/page/components/EditorArticle/index.vue'),
|
'common-editor-article': () => import('@/components/page/components/EditorArticle/index.vue'),
|
||||||
'common-editor-article-detail': () => import('@/components/page/components/EditorArticle/detail.vue'),
|
'common-editor-article-detail': () => import('@/components/page/components/EditorArticle/detail.vue'),
|
||||||
'common-late-x': () => import('@/components/page/components/table/LateX.vue'),
|
'common-late-x': () => import('@/components/page/components/table/LateX.vue'),
|
||||||
|
|||||||
@@ -1054,6 +1054,13 @@ export default new Router({
|
|||||||
title: 'Rejected Manuscripts'
|
title: 'Rejected Manuscripts'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/scholarCrawlers', //学者抓取
|
||||||
|
component: () => import('../components/page/scholarCrawlers'),
|
||||||
|
meta: {
|
||||||
|
title: 'Scholar Crawlers'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/PreIngested', //预收录-完善资料页面
|
path: '/PreIngested', //预收录-完善资料页面
|
||||||
component: () => import('../components/page/Complete_profile'),
|
component: () => import('../components/page/Complete_profile'),
|
||||||
|
|||||||
Reference in New Issue
Block a user