|
@@ -365,6 +365,7 @@ export default {
|
|
handleSaveArticle(formName,flag){
|
|
handleSaveArticle(formName,flag){
|
|
this.$refs[formName].validate((valid) => {
|
|
this.$refs[formName].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ this.loading = true
|
|
let MethodName = '/PaperServer/Manager/ArticleManager/AddArticle'
|
|
let MethodName = '/PaperServer/Manager/ArticleManager/AddArticle'
|
|
let data = {
|
|
let data = {
|
|
art_title: this.articleForm.art_title,
|
|
art_title: this.articleForm.art_title,
|
|
@@ -403,6 +404,7 @@ export default {
|
|
}
|
|
}
|
|
getLogin(MethodName, data)
|
|
getLogin(MethodName, data)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
|
+ this.loading = false
|
|
if(res.status===1){
|
|
if(res.status===1){
|
|
if(flag){
|
|
if(flag){
|
|
this.articleId = res.data.art.id
|
|
this.articleId = res.data.art.id
|
|
@@ -423,6 +425,8 @@ export default {
|
|
this.$router.go(-1)
|
|
this.$router.go(-1)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ }).catch(()=>{
|
|
|
|
+ this.loading = false
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
return false;
|
|
return false;
|
|
@@ -638,12 +642,7 @@ export default {
|
|
this.newWordObj = obj.originalObj?obj.originalObj:obj
|
|
this.newWordObj = obj.originalObj?obj.originalObj:obj
|
|
this.newWordFlag = true
|
|
this.newWordFlag = true
|
|
}else{
|
|
}else{
|
|
- if(this.id||this.articleId){
|
|
|
|
- this.newWordObj = null
|
|
|
|
- this.newWordFlag = true
|
|
|
|
- }else{
|
|
|
|
- this.handleSaveArticle('articleForm','newWord')
|
|
|
|
- }
|
|
|
|
|
|
+ this.handleSaveArticle('articleForm','newWord')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 添加注释
|
|
// 添加注释
|
|
@@ -652,12 +651,7 @@ export default {
|
|
this.explainObj = obj
|
|
this.explainObj = obj
|
|
this.explainFlag = true
|
|
this.explainFlag = true
|
|
}else{
|
|
}else{
|
|
- if(this.id||this.articleId){
|
|
|
|
- this.explainObj = null
|
|
|
|
- this.explainFlag = true
|
|
|
|
- }else{
|
|
|
|
- this.handleSaveArticle('articleForm','explain')
|
|
|
|
- }
|
|
|
|
|
|
+ this.handleSaveArticle('articleForm','explain')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
handleAddPhrase(obj){
|
|
handleAddPhrase(obj){
|
|
@@ -665,12 +659,7 @@ export default {
|
|
this.pharseObj = obj
|
|
this.pharseObj = obj
|
|
this.pharseFlag = true
|
|
this.pharseFlag = true
|
|
}else{
|
|
}else{
|
|
- if(this.id||this.articleId){
|
|
|
|
- this.pharseObj = null
|
|
|
|
- this.pharseFlag = true
|
|
|
|
- }else{
|
|
|
|
- this.handleSaveArticle('articleForm','phrase')
|
|
|
|
- }
|
|
|
|
|
|
+ this.handleSaveArticle('articleForm','phrase')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
closeDialog(flag){
|
|
closeDialog(flag){
|