Browse Source

代码整洁度 调整

feature/syp_points
zhangyongzhangyong 6 years ago
parent
commit
911c15b9dd
  1. 24
      src/views/modules/case/typicalcase-add-or-update.vue

24
src/views/modules/case/typicalcase-add-or-update.vue

@ -124,11 +124,6 @@ export default {
//
this.hideUpload = false
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}`
// if (this.quillEditor) {
// this.quillEditor.deleteText(0, this.quillEditor.getLength())
// } else {
// this.quillEditorHandle()
// }
// end
})
},
@ -169,7 +164,7 @@ export default {
// Element-uiinput
document.querySelector('#quill-upload input').click()
} else {
this.quill.format('image', false);
this.quill.format('image', false)
}
}
}
@ -268,7 +263,6 @@ export default {
this.dataForm.dynamicItem[connectResponse.caseIndex].releaseTime = connectResponse.createdTime
}
this.dataForm.dynamicItem[connectResponse.caseIndex].expressingAttitude = connectResponse.participantsNum
this.requiredFlag = true
},
addConnect (index) {
@ -291,10 +285,8 @@ export default {
releaseTime: '',
content: '',
expressingAttitude: ''
})
},
//
quillEditorHandle () {
this.quillEditor = new Quill('#J_quillEditor', {
@ -323,11 +315,9 @@ export default {
return false
}
},
// ()
uploadSuccessHandle (res) {
let quill = this.$refs.myQuillEditor[this.imgIndex].quill;
console.log(quill)
let quill = this.$refs.myQuillEditor[this.imgIndex].quill
if (res.code !== 0) {
return this.$message.error(res.msg)
}
@ -364,7 +354,7 @@ export default {
return false
}
if (!this.requiredFlag) {
alert("请关联案例!")
alert('请关联案例!')
return false
}
for (let item of this.dataForm.dynamicItem) {
@ -372,10 +362,10 @@ export default {
this.dataForm.caseNumber = this.dataForm.caseNumber + 1
}
}
this.isAble = true;
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/cloudAnalysis/typicalcase', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.isAble = false;
this.isAble = false
return this.$message.error(res.msg)
}
this.$message({
@ -383,7 +373,7 @@ export default {
type: 'success',
duration: 500,
onClose: () => {
this.isAble = false;
this.isAble = false
this.back()
}
})
@ -399,7 +389,7 @@ export default {
},
handelError () {
this.loading = false
},
}
}
}
</script>

Loading…
Cancel
Save