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

Loading…
Cancel
Save