This commit is contained in:
2024-04-03 14:30:01 +08:00
parent a0404d86b5
commit e19b3f3a63
2 changed files with 47 additions and 18 deletions

View File

@ -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') || ''

View File

@ -55,7 +55,7 @@
</el-timeline>
</div>
<div class="texts">
<div class="topform" style="height:50px">
<div class="topform">
<el-form ref="form" :inline="true" :model="form" class="form">
<el-form-item label="任务类型" prop="">
<el-select v-model="form.taskType" style="width:110px" @change="changeTaskType">
@ -88,7 +88,7 @@
</el-time-select>
</el-form-item>
<el-form-item label="问卷库模板选择" prop=""
>
v-if="form.taskSubdivisiontemplateType == 'QUESTIONNAIRE'">
<question @on-template="questionontemplate"></question>
</el-form-item>
<el-form-item label="宣教库模板选择" prop="" v-if="form.taskSubdivisiontemplateType == 'PROPAGANDA'">
@ -97,7 +97,8 @@
</el-form>
</div>
<div class="bottomform">
<wangeditor style="width:100%;" ref="editor" v-if="wangeditorshow" />
<wangeditor style="width:100%;" @on-nodeContent="onNodeContent" ref="wangeditor"
v-if="wangeditorshow" v-model="form.nodeContent" />
<div class="card">
<div class="flex">
<div class="pushMethod">
@ -138,7 +139,8 @@
</span>
</div>
<div class="pushMethod">
<el-switch v-model="form.officialPushSign" active-color="#13ce66">
<el-switch v-model="form.officialPushSign" active-color="#13ce66" active-value="1"
inactive-value="0">
</el-switch>
</div>
</div>
@ -165,7 +167,8 @@
</span>
</div>
<div class="pushMethod">
<el-switch v-model="form.appletPushSign" active-color="#13ce66">
<el-switch v-model="form.appletPushSign" active-color="#13ce66" active-value="1"
inactive-value="0">
</el-switch>
</div>
</div>
@ -203,7 +206,8 @@
</span>
</div>
<div class="pushMethod">
<el-switch v-model="form.value" active-color="#13ce66">
<el-switch v-model="form.value" active-color="#13ce66" active-value="1"
inactive-value="0">
</el-switch>
</div>
</div>
@ -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 {