微调
This commit is contained in:
@@ -136,9 +136,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 修改引用 -->
|
||||
<el-dialog v-loading="addLoading" :title= "dialogTitle + ' References'" :visible.sync="editboxVisible" width="500px">
|
||||
<el-dialog v-loading="addLoading" :title= "dialogTitle + ' References'" :visible.sync="editboxVisible" width="500px" @close="cancelSave">
|
||||
<p class="yinyongPre c888">现在您可以添加或者修改您的引用文献信息,如果您有引用文献的Doi数据,可以直接复制到Doi输入框,并提交,系统会自动识别您的引用文献,如果您没有Doi数据,也可以打开“Show Content”开关,直接填写您的引用文献内容。</p>
|
||||
<p v-if="this.dialogTitle == 'Add'">There is no Doi data: <el-switch v-model="contentVisible"></el-switch></p>
|
||||
<p v-if="dialogTitle == 'Add'">There is no Doi data: <el-switch v-model="contentVisible"></el-switch></p>
|
||||
<el-form v-show="!contentVisible" :model="refenceForm" :rules="refenceFormrules" ref="refenceForm" label-width="80px" class="editForm mt10">
|
||||
<!-- 内容开关 -->
|
||||
<el-form-item label="Doi:" required prop="refer_doi" >
|
||||
@@ -151,19 +151,19 @@
|
||||
<el-switch v-model="contentVisible"></el-switch>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="author:" required prop="author" >
|
||||
<el-input v-model="refenceLinkForm.author"></el-input>
|
||||
<el-input v-model="refenceLinkForm.author" placeholder="eg:Kagabu M, Nagasawa T, Fukagawa D, et al."></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="title:" required prop="title" >
|
||||
<el-input v-model="refenceLinkForm.title" ></el-input>
|
||||
<el-input v-model="refenceLinkForm.title" placeholder="eg:Immunotherapy for Uterine Cervical Cancer."></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="joura:" required prop="joura" >
|
||||
<el-input v-model="refenceLinkForm.joura" ></el-input>
|
||||
<el-input v-model="refenceLinkForm.joura" placeholder="eg:Healthcare (Basel)."></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="dateno:" required prop="dateno" >
|
||||
<el-input v-model="refenceLinkForm.dateno" ></el-input>
|
||||
<el-input v-model="refenceLinkForm.dateno" placeholder="eg:2019 Sep 17;7(3):108."></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="link:" required prop="link" >
|
||||
<el-input v-model="refenceLinkForm.link" ></el-input>
|
||||
<el-form-item label="doilink:" required prop="doilink" >
|
||||
<el-input v-model="refenceLinkForm.doilink" placeholder="eg:https://doi.org/10.1002/cncr.30667"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -252,8 +252,10 @@
|
||||
title:'',
|
||||
joura:'',
|
||||
dateno:'',
|
||||
link:'',
|
||||
p_refer_id:null, // 当前行一行的引用序号
|
||||
doilink:'',
|
||||
pre_p_refer_id:null, // 当前行一行的引用序号,
|
||||
article_id: null,
|
||||
p_refer_id: null
|
||||
},
|
||||
refenceLinkFormrules:{
|
||||
author:[
|
||||
@@ -265,8 +267,8 @@
|
||||
dateno:[
|
||||
{ required: true, message: 'The dateno cannot be empty', trigger: 'blur' },
|
||||
],
|
||||
link:[
|
||||
{ required: true, message: 'The link cannot be empty', trigger: 'blur' },
|
||||
doilink:[
|
||||
{ required: true, message: 'The doilink cannot be empty', trigger: 'blur' },
|
||||
]
|
||||
},
|
||||
dialogTitle:''
|
||||
@@ -347,23 +349,36 @@
|
||||
change(row, optitle){
|
||||
this.dialogTitle = optitle
|
||||
this.editboxVisible = true
|
||||
if(row.refer_doi){
|
||||
// 有doi
|
||||
this.refenceForm.refer_doi = row.refer_doi
|
||||
this.refenceForm.p_refer_id = row.p_refer_id
|
||||
}else{
|
||||
// doi
|
||||
this.contentVisible = true
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
if(row.is_web == 0){
|
||||
// 有doi row.is_web: 00
|
||||
this.refenceForm.refer_doi = row.refer_doi
|
||||
this.refenceForm.p_refer_id = row.p_refer_id
|
||||
}else{
|
||||
// 无doi row.is_web: 1
|
||||
this.contentVisible = true
|
||||
this.refenceLinkForm.article_id = this.$route.query.id
|
||||
this.refenceLinkForm.p_refer_id = row.p_refer_id
|
||||
this.refenceLinkForm.author = row.author
|
||||
this.refenceLinkForm.title = row.title
|
||||
this.refenceLinkForm.joura = row.joura
|
||||
this.refenceLinkForm.dateno = row.dateno
|
||||
this.refenceLinkForm.doilink = row.doilink
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 取消保存
|
||||
cancelSave(){
|
||||
cancelSave(){
|
||||
this.editboxVisible = false
|
||||
// refenceForm
|
||||
this.$refs['refenceForm'].resetFields();
|
||||
this.$refs['refenceForm'].clearValidate();
|
||||
this.$refs['refenceForm'].resetFields();
|
||||
|
||||
this.$refs['refenceLinkForm'].clearValidate();
|
||||
this.$refs['refenceLinkForm'].resetFields();
|
||||
|
||||
this.refenceForm.refer_doi = ''
|
||||
this.dialogTitle = ''
|
||||
},
|
||||
@@ -379,10 +394,25 @@
|
||||
},
|
||||
// 编辑无doi
|
||||
editNoneDoi(){
|
||||
this.$refs.refenceLinkForm.validate((valid) => {
|
||||
this.$refs.refenceLinkForm.validate((valid) => {
|
||||
this.addLoading = true
|
||||
if(valid){
|
||||
console.log('没有doi编辑情况')
|
||||
this.$api
|
||||
.post('api/Preaccept/editReferNotdoi', this.refenceLinkForm)
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
this.addLoading = false
|
||||
this.$message.success('successed!')
|
||||
this.cancelSave()
|
||||
this.getRefData()
|
||||
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -422,6 +452,27 @@
|
||||
|
||||
// 保存新增
|
||||
saveAdd(){
|
||||
if(this.contentVisible){ // 无doi形式
|
||||
this.$refs.refenceLinkForm.validate((valid) => {
|
||||
if(valid){
|
||||
this.addLoading = true
|
||||
this.$api
|
||||
.post('api/Preaccept/addReferNotdoi', this.refenceLinkForm)
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
this.addLoading = false
|
||||
this.$message.success('successed!')
|
||||
this.editboxVisible = false
|
||||
this.getRefData()
|
||||
this.cancelSave()
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
}
|
||||
})
|
||||
}else{ // 有doi形式
|
||||
this.$refs.refenceForm.validate((valid) => {
|
||||
if(valid){
|
||||
this.addLoading = true
|
||||
@@ -455,12 +506,13 @@
|
||||
return false;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
beforeupload_manuscirpt(file) {
|
||||
let flieArr = file.name.split(".")
|
||||
let fileSuffix = flieArr[flieArr.length - 1];
|
||||
console.log(fileSuffix)
|
||||
console.log(this.upload_manuscirpt,'upload_manuscirpt')
|
||||
|
||||
// return false
|
||||
if (fileSuffix != 'xlsx') {
|
||||
this.$message.error('Only excel and compressed files can be uploaded(.xlsx)');
|
||||
@@ -548,6 +600,10 @@
|
||||
// this.$refs['refenceForm'].clearValidate()
|
||||
this.editboxVisible = true
|
||||
this.refenceForm.p_refer_id = row.p_refer_id
|
||||
|
||||
this.refenceLinkForm.pre_p_refer_id = row.p_refer_id
|
||||
this.refenceLinkForm.article_id = this.$route.query.id
|
||||
|
||||
this.$nextTick(()=>{
|
||||
this.$refs['refenceForm'].clearValidate(['refer_doi']);
|
||||
})
|
||||
@@ -627,8 +683,7 @@
|
||||
this.$nextTick(()=>{
|
||||
this.$refs['refenceLinkForm'].clearValidate()
|
||||
this.$refs['refenceForm'].clearValidate()
|
||||
})
|
||||
console.log(newVal)
|
||||
})
|
||||
},
|
||||
// immediate: true,
|
||||
deep: true // 可以深度检测到 person 对象的属性值的变化
|
||||
|
||||
@@ -1247,15 +1247,22 @@
|
||||
},
|
||||
//修改文章状态
|
||||
saveEdit() {
|
||||
|
||||
const loading33 = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.$api
|
||||
.post('api/Article/editArticleEditor', this.editform)
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
loading33.close()
|
||||
this.$message.success('success');
|
||||
this.editVisible = false;
|
||||
this.getdate();
|
||||
} else {
|
||||
loading33.close()
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user