From e19b3f3a63d3d0fe725b6ffc0d318842675b8d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com> Date: Wed, 3 Apr 2024 14:30:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/components/wangEditor.vue | 13 ++++- src/views/system/specialDiseaseNode/index.vue | 52 +++++++++++++------ 2 files changed, 47 insertions(+), 18 deletions(-) diff --git a/src/views/system/components/wangEditor.vue b/src/views/system/components/wangEditor.vue index 3226394..3c6cb0f 100644 --- a/src/views/system/components/wangEditor.vue +++ b/src/views/system/components/wangEditor.vue @@ -85,6 +85,10 @@ export default ({ } }, methods: { + emit() { + console.log(this.html) + this.$emit("on-nodeContent", { nodeContent: this.html }); + }, panelchange(item) { if (this.labelshow) { this.labeloptions.forEach(e => { @@ -477,7 +481,14 @@ const elemToHtmlConf = { type: 'attachment', // 新元素的 type ,重要!!! elemToHtml: attachmentToHtml, } -Boot.registerElemToHtml(elemToHtmlConf) +const elemToHtmlConftwo = { + type: 'attachmenttwo', // 新元素的 type ,重要!!! + elemToHtml: attachmentToHtml, +} +const elemToHtmlConfmodule = { // JS 语法 + elemsToHtml: [elemToHtmlConf, elemToHtmlConftwo /* 其他元素... */] // elemToHtml +} +Boot.registerModule(elemToHtmlConfmodule) function parseAttachmentHtml(domElem, children, editor) { // JS 语法 // 从 DOM element 中获取“附件”的信息 const link = domElem.getAttribute('data-link') || '' diff --git a/src/views/system/specialDiseaseNode/index.vue b/src/views/system/specialDiseaseNode/index.vue index 1535ccd..8debeec 100644 --- a/src/views/system/specialDiseaseNode/index.vue +++ b/src/views/system/specialDiseaseNode/index.vue @@ -55,7 +55,7 @@
-
+
@@ -88,7 +88,7 @@ + v-if="form.taskSubdivisiontemplateType == 'QUESTIONNAIRE'"> @@ -97,7 +97,8 @@
- +
@@ -138,7 +139,8 @@
- +
@@ -165,7 +167,8 @@
- +
@@ -203,7 +206,8 @@
- +
@@ -278,6 +282,7 @@ export default { suitRange: '', }, form: { + nodeContent: '', templateId: '', templateName: '', taskType: '', @@ -299,17 +304,20 @@ export default { routeNodeDay: '', list: [ { - taskTypeName: '', - taskSubdivisionName: '', + nodeContent: '', templateId: '', templateName: '', taskType: '', taskTypeName: '', taskSubdivision: '', - taskSubdivisionName: ' ', + taskSubdivisionName: '', taskStatus: '', secondClassifyDescribe: '', executionTime: '', + appletPushSign: '0', + officialPushSign: '0', + messagePushSign: '0', + taskSubdivisiontemplateType: '', }, ], }], @@ -336,6 +344,10 @@ export default { this.form = this.lists[0].list[0] }, methods: { + //wangeditor传值 + onNodeContent(item) { + this.form.nodeContent = item.nodeContent + }, //小程序传值 miniProgramtemplate(item) { this.form.appletTemplateId = item.templateId @@ -356,6 +368,7 @@ export default { }, //暂存 TemporaryStorage() { + this.$refs.wangeditor.emit() console.log(this.lists) }, //问卷传值 @@ -414,34 +427,40 @@ export default { routeNodeDay: '', list: [ { - taskTypeName: '', - taskSubdivisionName: '', + nodeContent: '', templateId: '', templateName: '', taskType: '', taskTypeName: '', taskSubdivision: '', - taskSubdivisionName: ' ', + taskSubdivisionName: '', taskStatus: '', secondClassifyDescribe: '', executionTime: '', + appletPushSign: '0', + officialPushSign: '0', + messagePushSign: '0', + taskSubdivisiontemplateType: '', }, ] }) }, additem(item) { item.list.push({ - taskTypeName: '', - taskSubdivisionName: '', + nodeContent: '', templateId: '', templateName: '', taskType: '', taskTypeName: '', taskSubdivision: '', - taskSubdivisionName: ' ', + taskSubdivisionName: '', taskStatus: '', secondClassifyDescribe: '', executionTime: '', + appletPushSign: '0', + officialPushSign: '0', + messagePushSign: '0', + taskSubdivisiontemplateType: '', }) }, delitem(item, index) { @@ -461,7 +480,7 @@ export default { .bottomform { background-color: #f2f4f5; - margin-top: 20px; + margin-top: 10px; .card { background-color: #fff; @@ -533,7 +552,6 @@ export default { .topform { padding: 15px 0 0 15px; - height: 70px; .form { ::v-deep .el-input__inner {