微调
This commit is contained in:
@@ -136,9 +136,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</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 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 v-show="!contentVisible" :model="refenceForm" :rules="refenceFormrules" ref="refenceForm" label-width="80px" class="editForm mt10">
|
||||||
<!-- 内容开关 -->
|
<!-- 内容开关 -->
|
||||||
<el-form-item label="Doi:" required prop="refer_doi" >
|
<el-form-item label="Doi:" required prop="refer_doi" >
|
||||||
@@ -151,19 +151,19 @@
|
|||||||
<el-switch v-model="contentVisible"></el-switch>
|
<el-switch v-model="contentVisible"></el-switch>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="author:" required prop="author" >
|
<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>
|
||||||
<el-form-item label="title:" required prop="title" >
|
<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>
|
||||||
<el-form-item label="joura:" required prop="joura" >
|
<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>
|
||||||
<el-form-item label="dateno:" required prop="dateno" >
|
<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>
|
||||||
<el-form-item label="link:" required prop="link" >
|
<el-form-item label="doilink:" required prop="doilink" >
|
||||||
<el-input v-model="refenceLinkForm.link" ></el-input>
|
<el-input v-model="refenceLinkForm.doilink" placeholder="eg:https://doi.org/10.1002/cncr.30667"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
@@ -252,8 +252,10 @@
|
|||||||
title:'',
|
title:'',
|
||||||
joura:'',
|
joura:'',
|
||||||
dateno:'',
|
dateno:'',
|
||||||
link:'',
|
doilink:'',
|
||||||
p_refer_id:null, // 当前行一行的引用序号
|
pre_p_refer_id:null, // 当前行一行的引用序号,
|
||||||
|
article_id: null,
|
||||||
|
p_refer_id: null
|
||||||
},
|
},
|
||||||
refenceLinkFormrules:{
|
refenceLinkFormrules:{
|
||||||
author:[
|
author:[
|
||||||
@@ -265,8 +267,8 @@
|
|||||||
dateno:[
|
dateno:[
|
||||||
{ required: true, message: 'The dateno cannot be empty', trigger: 'blur' },
|
{ required: true, message: 'The dateno cannot be empty', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
link:[
|
doilink:[
|
||||||
{ required: true, message: 'The link cannot be empty', trigger: 'blur' },
|
{ required: true, message: 'The doilink cannot be empty', trigger: 'blur' },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
dialogTitle:''
|
dialogTitle:''
|
||||||
@@ -347,15 +349,23 @@
|
|||||||
change(row, optitle){
|
change(row, optitle){
|
||||||
this.dialogTitle = optitle
|
this.dialogTitle = optitle
|
||||||
this.editboxVisible = true
|
this.editboxVisible = true
|
||||||
if(row.refer_doi){
|
this.$nextTick(() => {
|
||||||
// 有doi
|
if(row.is_web == 0){
|
||||||
|
// 有doi row.is_web: 00
|
||||||
this.refenceForm.refer_doi = row.refer_doi
|
this.refenceForm.refer_doi = row.refer_doi
|
||||||
this.refenceForm.p_refer_id = row.p_refer_id
|
this.refenceForm.p_refer_id = row.p_refer_id
|
||||||
}else{
|
}else{
|
||||||
// doi
|
// 无doi row.is_web: 1
|
||||||
this.contentVisible = true
|
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
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -363,7 +373,12 @@
|
|||||||
cancelSave(){
|
cancelSave(){
|
||||||
this.editboxVisible = false
|
this.editboxVisible = false
|
||||||
// refenceForm
|
// refenceForm
|
||||||
|
this.$refs['refenceForm'].clearValidate();
|
||||||
this.$refs['refenceForm'].resetFields();
|
this.$refs['refenceForm'].resetFields();
|
||||||
|
|
||||||
|
this.$refs['refenceLinkForm'].clearValidate();
|
||||||
|
this.$refs['refenceLinkForm'].resetFields();
|
||||||
|
|
||||||
this.refenceForm.refer_doi = ''
|
this.refenceForm.refer_doi = ''
|
||||||
this.dialogTitle = ''
|
this.dialogTitle = ''
|
||||||
},
|
},
|
||||||
@@ -382,7 +397,22 @@
|
|||||||
this.$refs.refenceLinkForm.validate((valid) => {
|
this.$refs.refenceLinkForm.validate((valid) => {
|
||||||
this.addLoading = true
|
this.addLoading = true
|
||||||
if(valid){
|
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(){
|
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) => {
|
this.$refs.refenceForm.validate((valid) => {
|
||||||
if(valid){
|
if(valid){
|
||||||
this.addLoading = true
|
this.addLoading = true
|
||||||
@@ -455,12 +506,13 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
beforeupload_manuscirpt(file) {
|
beforeupload_manuscirpt(file) {
|
||||||
let flieArr = file.name.split(".")
|
let flieArr = file.name.split(".")
|
||||||
let fileSuffix = flieArr[flieArr.length - 1];
|
let fileSuffix = flieArr[flieArr.length - 1];
|
||||||
console.log(fileSuffix)
|
console.log(fileSuffix)
|
||||||
console.log(this.upload_manuscirpt,'upload_manuscirpt')
|
|
||||||
// return false
|
// return false
|
||||||
if (fileSuffix != 'xlsx') {
|
if (fileSuffix != 'xlsx') {
|
||||||
this.$message.error('Only excel and compressed files can be uploaded(.xlsx)');
|
this.$message.error('Only excel and compressed files can be uploaded(.xlsx)');
|
||||||
@@ -548,6 +600,10 @@
|
|||||||
// this.$refs['refenceForm'].clearValidate()
|
// this.$refs['refenceForm'].clearValidate()
|
||||||
this.editboxVisible = true
|
this.editboxVisible = true
|
||||||
this.refenceForm.p_refer_id = row.p_refer_id
|
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.$nextTick(()=>{
|
||||||
this.$refs['refenceForm'].clearValidate(['refer_doi']);
|
this.$refs['refenceForm'].clearValidate(['refer_doi']);
|
||||||
})
|
})
|
||||||
@@ -628,7 +684,6 @@
|
|||||||
this.$refs['refenceLinkForm'].clearValidate()
|
this.$refs['refenceLinkForm'].clearValidate()
|
||||||
this.$refs['refenceForm'].clearValidate()
|
this.$refs['refenceForm'].clearValidate()
|
||||||
})
|
})
|
||||||
console.log(newVal)
|
|
||||||
},
|
},
|
||||||
// immediate: true,
|
// immediate: true,
|
||||||
deep: true // 可以深度检测到 person 对象的属性值的变化
|
deep: true // 可以深度检测到 person 对象的属性值的变化
|
||||||
|
|||||||
@@ -1247,15 +1247,22 @@
|
|||||||
},
|
},
|
||||||
//修改文章状态
|
//修改文章状态
|
||||||
saveEdit() {
|
saveEdit() {
|
||||||
|
const loading33 = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: 'Loading...',
|
||||||
|
spinner: 'el-icon-loading',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
});
|
||||||
this.$api
|
this.$api
|
||||||
.post('api/Article/editArticleEditor', this.editform)
|
.post('api/Article/editArticleEditor', this.editform)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
loading33.close()
|
||||||
this.$message.success('success');
|
this.$message.success('success');
|
||||||
this.editVisible = false;
|
this.editVisible = false;
|
||||||
this.getdate();
|
this.getdate();
|
||||||
} else {
|
} else {
|
||||||
|
loading33.close()
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user