Merge branch 'master' of https://git.nuttyreading.com/wangjinlei/tougao_web into Editorial-Board

This commit is contained in:
2025-11-28 16:54:15 +08:00
12 changed files with 1329 additions and 964 deletions

View File

@@ -1,110 +1,27 @@
<template>
<div v-loading.fullscreen.lock="holeLoading">
<div class="container" v-loading="importIoading" element-loading-text="In the process of importing, please wait">
<div v-if="tableData.length == 0">
<!-- 没有引用时 -->
<!-- <div class="noneData">
<img src="../../assets/img/noneData.png" alt="" class="icon_img">
<p class="nodatatext">TMR did not identify an available article citation in your latest uploaded document</p>
</div> -->
<el-row :gutter="20">
<!-- 教程 -->
<el-col>
<div class="whoDo mt20">
<div>
<h2>
What should I do
<el-tooltip class="item" effect="light" content="click for more help" placement="right">
<span class="el-icon-warning-outline help" @click="showHelp"></span>
</el-tooltip>
</h2>
<p class="mt10 c666">you can add a citation in the following way.</p>
<ul>
<!-- 文件上传的形式 -->
<li>
<div class="mt20">
<h4>
Add in bulk by uploading excel files &nbsp;&nbsp;
<!-- <el-button class="inlinebutton" type="primary" plain size="mini" @click="showUpload">Add</el-button> -->
</h4>
<p class="mt10 c666">
Before uploading the file, you need to download the template file,
<a
href="https://submission.tmrjournals.com/public/system/refer.xlsx"
download="refer"
target="_blank"
class="downloadbtn"
>click download</a
>
,to add your references to the template file, and upload it.
</p>
<div v-if="uploadVisible">
<div class="uploadBox">
<el-upload
ref="uploadFile"
class="upload-demo up_newstyle mt10"
:action="upload_manuscirpt"
accept=".xlsx"
name="referFile"
:before-upload="beforeupload_manuscirpt"
:on-error="uperr_coverLetter"
:on-success="upSuccess_manuscirpt"
:limit="1"
:on-exceed="alertlimit"
:on-remove="removefilemanuscirpt"
:file-list="fileL_manuscirpt"
>
<div class="el-upload__text" @click="clearUploadedFile">
<em>Upload</em>
</div>
</el-upload>
</div>
</div>
</div>
</li>
<!-- 文本域 -->
<!-- <li>
<div class="mt20">
<h4>Add in bulk by text field &nbsp;&nbsp;&nbsp;<el-button @click="addText" class="inlinebutton" type="primary" plain size="mini">Add</el-button></h4>
<div v-if="textareaVisible">
<el-input class="textarea mt10"
type="textarea"
:rows="3"
placeholder="Put your reference entry here"
v-model="textarea">
</el-input>
<el-button class="mt10" icon="el-icon-check" type="primary" size="mini" @click="importText()">Import</el-button>
</div>
</div>
</li> -->
</ul>
</div>
</div>
</el-col>
</el-row>
</div>
<!-- 有引用数据-->
<div v-else>
<div class="topInfo">
<div v-if="tableData.length > 0">
<div class="topInfo operation1">
<h3>Dear {{ user_name }}</h3>
<p class="mt10">Please check and modify the references information on this page with the following instructions:</p>
<p class="mt10">Please check and revise the references information on this page with the following instructions:</p>
<ul class="mt20">
<li>
<p>
- Please modify the reference in the
<span class="status warn float"><i class="el-icon-warning-outline"></i></span>
status, moving the reference information from
<span class="status warn float"><i class="el-icon-warning-outline"></i></span> status to
<span class="status ok float"><i class="el-icon-circle-check"></i></span> status.
- Please revise the references marked with the
<span class="status warn float"><i class="el-icon-warning-outline"></i></span> the status , check the
reference marked with <span style="position: relative"><i class="itemChanged"></i> </span> the
status(revised by editor)&nbsp;,&nbsp; and update them until they are marked with
<span class="status ok float"><i class="el-icon-circle-check"></i></span> the status.
</p>
</li>
<li>
<p>
- If you find the number of reference is disorder for technical reason, please click the
- Please use the
<el-button type="warning" size="mini" plain></el-button>
and
<el-button type="warning" size="mini" plain></el-button> behind each piece of information to adjust the
order of the data.
<span style="margin: 0 5px">and</span>
<el-button type="warning" size="mini" plain></el-button>
<span style="margin: 0 5px">buttons to adjust the order of the reference.</span>
</p>
</li>
<li>
@@ -129,131 +46,50 @@
style="width: 24px; height: 24px; margin-left: 5px; margin-right: 5px"
/>
</span>
it indicates that the current reference is duplicated .
it indicates that the current reference is duplicated.
</p>
</li>
<li>
<p>
- Please do not forget to recheck all references in the
<span class="status ok float"><i class="el-icon-circle-check"></i></span> status,especially abbreviated
<span class="status ok float"><i class="el-icon-circle-check"></i></span> status, especially abbreviated
journal title.
</p>
</li>
</ul>
<div class="template-info">
<span class="template-title">Article from a Journal (General format)</span> <br />
Author(s) Last Name First Initial.&nbsp;Title of article.&nbsp;<i>Abbreviated Journal Title</i>.&nbsp;Year;Volume(issue):Inclusive page
numbers.<br />
<br />
<span class="template-title">For example:</span><br />
Article with More than Six Authors<br />
Crompton J, Imms C, McCoy AT, et al. Group-based taskrelated training for children with cerebral palsy: a pilot
study.&nbsp;<i>Phys Occup Ther Pediatr.</i>&nbsp;2007;27:43-65.<br />
Special note: If the number of authors is 6 or fewer, all authors should be listed.
</div>
</div>
<div class="refenceCentent mt20">
<div style="display: flex;align-items: center;justify-content: space-between;">
<el-table style="width: 100%"
:data="tableData"
ref="multipleTable"
:row-style="tableRowStyle"
empty-text="New messages (0)"
:show-header="false"
:stripe="false"
:highlight-current-row="false"
>
<el-table-column type="index" label="No." width="60" align="center">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="Duplicate references" placement="top">
<img
src="../../assets/img/repeat.png"
v-if="scope.row.is_repeat == 1"
alt=""
style="width: 24px; height: 24px; float: left"
/>
</el-tooltip>
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="state" width="55" align="center">
<template slot-scope="scope">
<span
class="status ok"
v-if="
(scope.row.refer_type == 'journal' && scope.row.doilink != '') ||
(scope.row.refer_type == 'book' && scope.row.isbn != '')
"
>
<i class="el-icon-circle-check"></i>
</span>
<span class="status warn" v-else>
<i class="el-icon-warning-outline"></i>
</span>
</template>
</el-table-column>
<el-table-column label="Title" align="left">
<template slot-scope="scope">
<!-- journal 形式 -->
<div style="text-align: left" v-if="scope.row.refer_type == 'journal'">
<p>
{{ scope.row.author }}&nbsp;{{ scope.row.title }}.&nbsp;<em>{{ scope.row.joura }}</em
>&nbsp;{{ scope.row.dateno }}.<br />
</p>
<a class="doiLink" :href="scope.row.doilink" target="_blank">{{ scope.row.doilink }}</a>
</div>
<!-- book 形式 -->
<div style="text-align: left" v-if="scope.row.refer_type == 'book'">
<p>{{ scope.row.author }}&nbsp;{{ scope.row.title }}.&nbsp;{{ scope.row.dateno }}.&nbsp;<br /></p>
<a class="doiLink" :href="scope.row.isbn" target="_blank">{{ scope.row.isbn }}</a>
</div>
<!-- other 形式 -->
<p class="wrongLine" style="text-align: left" v-if="scope.row.refer_type == 'other'">
{{ scope.row.refer_frag }}
</p>
</template>
</el-table-column>
<el-table-column align="center" width="360">
<div slot-scope="scope">
<el-button
style="margin-left: 10px"
@click="change(scope.row, 'Edit')"
plain
type="primary"
size="mini"
icon="el-icon-edit"
>edit</el-button
>
<el-tooltip
popper-class="tps"
class="item"
effect="light"
content="Add one under this line"
placement="top"
>
<el-button @click="addLine(scope.row, 'Add')" type="success" size="mini" plain>Add</el-button>
</el-tooltip>
<el-button
type="warning"
size="mini"
plain
:disabled="scope.$index != 0 ? false : true"
@click="changeOrder(scope.row, 'up')"
>↑</el-button
>
<el-button
type="warning"
size="mini"
plain
:disabled="scope.$index == tableData.length - 1 ? true : false"
@click="changeOrder(scope.row, 'down')"
>↓</el-button
>
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
style="float: right"
plain
@click="deleteLine(scope.row)"
>delete</el-button
>
</div>
</el-table-column>
</el-table>
<div>
<editPublicRefRdit
ref="editPublicRefRdit"
:chanFerForm="tableData"
:chanFerFormRepeatList="chanFerFormRepeatList"
role="user"
p_article_id=""
@refrashComp="refrashComp"
@changeRefer="changeRefer"
></editPublicRefRdit>
</div>
</div>
</div>
<div v-else>
<div class="topInfo operation1">
<h3>Dear {{ user_name }}</h3>
<p class="mt10">
<i class="el-icon-warning" style="color: #e6a23c; margin-right: 8px"></i>Please wait patiently while the Editorial
Office processes the references.
</p>
</div>
</div>
</div>
@@ -263,7 +99,8 @@
:title="dialogTitle + ' References'"
:visible.sync="editboxVisible"
width="800px"
@close="cancelSave" :close-on-click-modal="false"
@close="cancelSave"
:close-on-click-modal="false"
>
<p class="yinyongPre c888">
Now you are starting to add or modify this reference. If this reference has a DOI, you can directly copy it into the DOI
@@ -376,13 +213,8 @@
<!-- 临时引用信息 -->
<el-dialog title="Reference List" :visible.sync="linVisible" width="1200px" :close-on-click-modal="false" class="reference-dialog">
<div class="newpro">
<el-progress
v-if="isUpload"
:stroke-width="15"
:percentage="progressPercent"
style="width: 100%"
></el-progress>
</div>
<el-progress v-if="isUpload" :stroke-width="15" :percentage="progressPercent" style="width: 100%"></el-progress>
</div>
<div class="refenceCentent mt20" v-if="Tempredable.length > 0">
<el-table
@@ -397,61 +229,61 @@
<el-table-column type="index" label="No." width="55" align="center"></el-table-column>
<el-table-column label="Title" align="left">
<template slot-scope="scope">
<p style="text-align: left;line-height: 18px;" v-if="!parseVisible">
{{ scope.row.content }}<br/><el-link type="primary">{{ scope.row.doi }}</el-link>
<p style="text-align: left; line-height: 18px" v-if="!parseVisible">
{{ scope.row.content }}<br /><el-link type="primary">{{ scope.row.doi }}</el-link>
</p>
<p style="text-align: left;line-height: 18px;" v-if="parseVisible">
{{ scope.row.refer_content }}<br/><el-link type="primary">{{ scope.row.refer_doi }}</el-link>
<p style="text-align: left; line-height: 18px" v-if="parseVisible">
{{ scope.row.refer_content }}<br /><el-link type="primary">{{ scope.row.refer_doi }}</el-link>
</p>
</template>
</el-table-column>
<el-table-column label="Status" align="center" width="55" v-if="parseVisible">
<template slot-scope="scope">
<i class="el-icon-loading" style="font-size: 24px;color: #606266;" v-if="scope.row.is_deal==2"></i>
<i class="el-icon-success" style="font-size: 24px;color: #2ac95c;" v-if="scope.row.is_deal==1"></i>
<i class="el-icon-loading" style="font-size: 24px; color: #606266" v-if="scope.row.is_deal == 2"></i>
<i class="el-icon-success" style="font-size: 24px; color: #2ac95c" v-if="scope.row.is_deal == 1"></i>
</template>
</el-table-column>
</el-table>
<div class="shuoming mt20" >
<div class="shuoming mt20">
<p class="c888">
<i class="el-icon-message-solid"></i>&nbsp;&nbsp;<span v-if="!parseVisible" >The above is the citation data identified according to your
uploaded file, you can choose to import, or discard this data and upload again.</span>
<i class="el-icon-message-solid"></i>&nbsp;&nbsp;<span v-if="!parseVisible"
>The above is the citation data identified according to your uploaded file, you can choose to import, or discard
this data and upload again.</span
>
<span v-if="parseVisible">We are currently identifying the citation data you uploaded. Please be patient.</span>
</p>
</div>
</div>
<span slot="footer" class="dialog-footer">
<div v-if="!parseVisible">
<el-button @click="abandon">Abandon and Reimport</el-button>
<el-button type="primary" @click="handleparse">Import</el-button>
<el-button @click="abandon">Abandon and Reimport</el-button>
<el-button type="primary" @click="handleparse">Import</el-button>
</div>
<div v-if="parseVisible">
<el-button @click="parseVisible=false;linVisible=false;">Cancel</el-button>
<el-button
@click="
parseVisible = false;
linVisible = false;
"
>Cancel</el-button
>
</div>
</span>
</el-dialog>
</div>
</template>
<script>
import editPublicRefRdit from './editPublicRefRdit'; // 公共引用编辑页面
export default {
data() {
return {
TempredableNew: [],
uploadTimer: null,//调取进度条的轮询定时器
isUpload: false,//文件是否上传中
progressPercent: 0,//进度条当前进度
curPercentage: 0,
chanFerFormRepeatList: [],
uploadTimer: null, //调取进度条的轮询定时器
isUpload: false, //文件是否上传中
progressPercent: 0, //进度条当前进度
curPercentage: 0,
user_name: localStorage.getItem('U_relname'),
holeLoading: false, // 进入页面的loading
importIoading: false,
@@ -546,61 +378,59 @@ export default {
created() {
this.openFullScreen1();
this.getRefData();
this.holeLoading = true;
},
components: {
editPublicRefRdit
},
beforeDestroy() {
clearInterval(this.uploadTimer);
},
methods: {
changeRefer(val) {
this.getRefData();
},
refrashComp() {
this.$refs.editPublicRefRdit.$forceUpdate();
console.log('editPublicRefRdit');
},
async getProgress() {
var that = this;
this.getRefData()
var progress = 0;
this.$api
.post(
'api/Preaccept/getReferState',{ article_id: this.$route.query.id})
.then(async (res) => {
if(res.status==1){
progress = Number(res.data.processed_total);
this.TempredableNew=res.data.refer;
}
//percent是后端返回的进度
if (progress == res.data.total) {
this.isUpload = false;
clearInterval(this.uploadTimer);
that.uploadTimer = null;
var that = this;
this.getRefData();
var progress = 0;
this.$forceUpdate();
}
});
return progress;
},
this.$api.post('api/Preaccept/getReferState', { article_id: this.$route.query.id }).then(async (res) => {
if (res.status == 1) {
progress = Number(res.data.processed_total);
this.TempredableNew = res.data.refer;
}
//percent是后端返回的进度
// 删除部分引用
deleteSomeRefs() {
if (progress == res.data.total) {
this.isUpload = false;
clearInterval(this.uploadTimer);
that.uploadTimer = null;
this.$forceUpdate();
}
});
return progress;
},
// 删除部分引用
deleteSomeRefs() {
var ids = [];
ids = this.tableData.map((item) => {
return item.p_refer_id;
});
console.log('ids at line 570:', ids)
console.log('ids at line 570:', ids);
this.$api
.post('api/Preaccept/delRefers', {
ids: ids
})
.then((res) => {
})
.catch((err) => {
});
.post('api/Preaccept/delRefers', {
ids: ids
})
.then((res) => {})
.catch((err) => {});
},
tableRowStyle({ row }) {
if (row.is_repeat === 1) {
@@ -612,7 +442,6 @@ export default {
gotoFormate() {
// this.$refs['refenceForm'].validateField('doi', (callback)=>{
if (this.refenceForm.doi != '') {
this.holeLoading = true;
this.$api
.post('/api/Preaccept/searchDoi', { doi: this.refenceForm.doi })
.then((res) => {
@@ -632,7 +461,6 @@ export default {
})
.catch((e) => {
this.$message.error(e.msg);
this.holeLoading = false;
});
} else {
this.$message.error('The Doi cannot be empty!');
@@ -640,21 +468,27 @@ export default {
// })
},
// 全页面加载动画
openFullScreen1() {
this.holeLoading = true;
},
openFullScreen1() {},
// 获取引用文献信息
getRefData() {
const loading = this.$loading({
lock: true,
text: 'Loading...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.$api
.post('api/Preaccept/getArticleReferences', { article_id: this.$route.query.id })
.then((res) => {
console.log(res);
if (res.code == 0 && res.data.refers.length > 0) {
this.tableData = res.data.refers;
this.chanFerFormRepeatList = Object.values(res.data.repeat);
}
this.holeLoading = false;
loading.close();
})
.catch((err) => {
loading.close();
console.log(err);
});
},
@@ -677,15 +511,9 @@ export default {
// },
// 获取解析数据
getParseData() {
this.linVisible=false;
this.parseVisible = true;
this.isUpload=true
this.linVisible = false;
this.parseVisible = true;
this.isUpload = true;
},
// 导入文本域
handleparse() {
@@ -702,17 +530,16 @@ this.linVisible=false;
referFile: this.form.referFile
})
.then((res) => {
loading.close()
loading.close();
if (res.code == 0) {
this.getParseData();
}else{ loading.close()
} else {
loading.close();
this.$message.error(res.msg);
}
})
.catch((err) => {
loading.close()
loading.close();
console.log(err);
});
},
@@ -1114,7 +941,6 @@ this.linVisible=false;
return this.baseUrl + 'api/Preaccept/up_refer_file';
}
},
watch: {
SourceType: {
@@ -1130,20 +956,20 @@ this.linVisible=false;
deep: true // 可以深度检测到 person 对象的属性值的变化
},
//监听文件是否上传
isUpload: {
handler(val, oldVal) {
if (this.isUpload) {
this.uploadTimer = setInterval(async () => {
//需要定时执行的代码
this.progressPercent = await this.getProgress();
}, 1000);
} else {
clearInterval(this.uploadTimer);
this.currentFile = {};
isUpload: {
handler(val, oldVal) {
if (this.isUpload) {
this.uploadTimer = setInterval(async () => {
//需要定时执行的代码
this.progressPercent = await this.getProgress();
}, 1000);
} else {
clearInterval(this.uploadTimer);
this.currentFile = {};
}
},
deep: true
}
},
deep: true,
},
}
};
</script>
@@ -1183,11 +1009,11 @@ this.linVisible=false;
}
.status {
display: block;
width: 40px;
height: 40px;
border-radius: 40px;
width: 36px;
height: 36px;
border-radius: 36px;
font-size: 22px;
line-height: 40px;
line-height: 36px;
color: #fff;
text-align: center;
}
@@ -1201,7 +1027,9 @@ this.linVisible=false;
display: inline-block;
}
.topInfo {
padding: 20px;
padding: 0px;
margin-top: -10px;
margin-bottom: 30px;
}
.topInfo ul {
padding-left: 30px;
@@ -1231,7 +1059,7 @@ this.linVisible=false;
font-size: 26px;
}
.mt20 {
margin-top: 20px;
margin-top: 14px;
}
.content_box {
padding: 15px 10px;
@@ -1245,7 +1073,7 @@ p {
font-size: 14px;
}
.mt10 {
margin-top: 10px;
margin-top: 14px;
}
.more {
font-weight: bold;
@@ -1295,43 +1123,75 @@ p {
/deep/ .el-table tr:nth-child(2n) {
background: #fff;
}
::v-deep .reference-dialog .el-dialog__body{
::v-deep .reference-dialog .el-dialog__body {
padding: 0 20px !important;
}
.newpro .el-progress-bar__inner:before {
content: "";
width: 100%;
height: 100%;
display: block;
background-image: repeating-linear-gradient(
-45deg,
hsla(0, 0%, 100%, 0.15) 25%,
transparent 0,
transparent 50%,
hsla(0, 0%, 100%, 0.15) 0,
hsla(0, 0%, 100%, 0.15) 75%,
transparent 0,
transparent
);
background-size: 40px 40px;
animation: mymove 2s linear infinite;
content: '';
width: 100%;
height: 100%;
display: block;
background-image: repeating-linear-gradient(
-45deg,
hsla(0, 0%, 100%, 0.15) 25%,
transparent 0,
transparent 50%,
hsla(0, 0%, 100%, 0.15) 0,
hsla(0, 0%, 100%, 0.15) 75%,
transparent 0,
transparent
);
background-size: 40px 40px;
animation: mymove 2s linear infinite;
}
@keyframes mymove {
0% {
background-position: 0;
}
25% {
background-position: 50px;
}
50% {
background-position: 100px;
}
75% {
background-position: 150px;
}
100% {
background-position: 200px;
}
0% {
background-position: 0;
}
25% {
background-position: 50px;
}
50% {
background-position: 100px;
}
75% {
background-position: 150px;
}
100% {
background-position: 200px;
}
}
::v-deep .operation1 .el-button--mini {
font-size: 14px !important;
padding: 6px 10px !important;
zoom: 0.9;
}
.itemChanged {
display: inline-block;
background: #006699;
color: #fff;
padding: 5px;
border-radius: 0 0 7px 7px;
left: 0;
top: 0;
}
.template-info {
margin-top: 20px;
background: rgb(244, 244, 245);
border: 1px solid rgb(211, 212, 214);
font-size: 14px;
color: #606266;
padding-left: 15px;
border-radius: 4px;
padding: 14px;
box-sizing: border-box;
}
.template-title {
/* font-size: 16px; */
font-weight: bold;
margin-bottom: 10px;
color: #333;
display: inline-block;
}
</style>