From 72c17268246de52c290f07b72725486556249fa3 Mon Sep 17 00:00:00 2001 From: sunFlower <787203167@qq.com> Date: Fri, 16 Sep 2022 09:31:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98=E7=9F=A5?= =?UTF-8?q?=E8=AF=86=E5=BA=93=E7=9A=84=E5=AF=8C=E6=96=87=E6=9C=AC=E7=B2=98?= =?UTF-8?q?=E8=B4=B4=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/problemKnowledgeBaseAdd.vue | 64 +++++++++---------- 1 file changed, 29 insertions(+), 35 deletions(-) diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseAdd.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseAdd.vue index 19fc8f1ff..f292d6cb9 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseAdd.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseAdd.vue @@ -227,10 +227,9 @@ data() { return { formInline: {}, + loading: false, headers: '', uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload', - loading: false, - problemTypeList: [], editorOption: { // 富文本框配置 placeholder: '', theme: 'snow', // or 'bubble' @@ -253,6 +252,7 @@ } } }, + problemTypeList: [], rules: { showPermissions: [ { @@ -308,6 +308,7 @@ }, isDisplay: false, disabled: false, + content: '

I am Example

' projectNameList: [ { value: 'Open', @@ -318,26 +319,19 @@ name: this.$t('Privacy') } ], - content: '

I am Example

' } }, - created() { - const token = Vue.ls.get(ACCESS_TOKEN) - this.headers = { 'X-Access-Token': token } - }, computed: { editor() { return this.$refs.myQuillEditor.quill } }, + created() { + const token = Vue.ls.get(ACCESS_TOKEN) + this.headers = { 'X-Access-Token': token } + }, mounted() { this.getBase() - if (this.$route.query.id) { - this.queryById() - document.title = this.$t('problemKnowledgeBase') + this.$t('edit') - } else { - document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded') - } let quill = this.$refs.myQuillEditor.quill this.$forceUpdate() quill.root.addEventListener( @@ -381,11 +375,14 @@ }, false ) + if (this.$route.query.id) { + this.queryById() + document.title = this.$t('problemKnowledgeBase') + this.$t('edit') + } else { + document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded') + } }, methods: { - quilleditorBlur() { - this.$refs.ruleForm.validateField('content') - }, handleCustomMatcher(node, Delta) { let ops = [] Delta.ops.forEach(op => { @@ -398,6 +395,9 @@ Delta.ops = ops return Delta }, + quilleditorBlur() { + this.$refs.ruleForm.validateField('content') + }, getBase() { getAction('/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/list', {}).then((res) => { if (res.success) { @@ -460,39 +460,28 @@ , onEditorFocus(quill) { console.log('editor focus!', quill) - } - , + }, onEditorReady(quill) { console.log('editor ready!', quill) - } - , + }, + PersonnelSelectionChange(value, id) { + this.formInline[value] = id + this.formInline = { ...this.formInline } + }, onEditorChange({ quill, html, text }) { console.log(html) console.log(quill) console.log(text) this.formInline.content = html - } - , - PersonnelSelectionChange(value, id) { - this.formInline[value] = id - this.formInline = { ...this.formInline } - } - , + }, handleInput(value) { this.$nextTick(() => { this.formInline = { ...this.formInline } this.$refs.ruleForm.validateField([value]) }) - } - , + }, bringInDocumentInformationClick() { this.$refs.listAddModelRef.addModel(this.formInline) - } - , - listAddModelForm(id, number) { - this.formInline.standNumber = number - this.formInline.bussDocumentLibraryId = id - this.formInline = { ...this.formInline } }, handleChange(info) { let { file } = info @@ -512,6 +501,11 @@ } }, + listAddModelForm(id, number) { + this.formInline.standNumber = number + this.formInline.bussDocumentLibraryId = id + this.formInline = { ...this.formInline } + }, clickButtonToUpload(item) { this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.visible = true