This commit is contained in:
闫晓茹 2024-07-05 16:09:12 +08:00
parent e42487b600
commit bfe88ebe28
5 changed files with 387 additions and 189 deletions

View File

@ -1,9 +1,9 @@
import request from '@/utils/request'
// 标签
export function labelFieldList() {
export function labelFieldList(taskPartitionDictId) {
return request({
url: '/manage/labelfieldinfo/labelFieldList',
url: `/manage/labelfieldinfo/labelFieldList?taskPartitionDictId=${taskPartitionDictId}`,
method: 'get',
})
}

View File

@ -427,8 +427,11 @@
<wangeditor
style="width: 100%"
:nodeContent="form.nodeContent"
:taskPartitionDictId="taskPartitionDictId"
:taskSubdivision="form.taskSubdivision"
:specialDiseaseNodeId="form.specialDiseaseNodeId"
@on-nodeContent="onNodeContent"
v-if="
v-show="
form.taskSubdivisiontemplateType != 'QUESTIONNAIRE' &&
form.taskSubdivisiontemplateType != 'PROPAGANDA' &&
form.taskSubdivisiontemplateType != 'SCRIPT'

View File

@ -46,6 +46,8 @@ export default {
name: "specialDiseaseNode",
data() {
return {
specialDiseaseNodeId: '',
taskPartitionDictId: '',
lookNodeContent: false,
lookquestionname: false,
lookquestionlist: false,//问卷
@ -148,7 +150,10 @@ export default {
// this.optiononditionOperator();
this.optiononditionOperators();
},
beforeDestroy() { },
beforeDestroy() {
console.log(111111111)
localStorage.removeItem('wangeditorlist')
},
watch: {
"form.phoneMessageRemind": {
handler(newValue, oldValue) {
@ -376,6 +381,7 @@ export default {
"routeNodeName"
);
this.form = this.lists[0].list[0];
// 宣教模板回显
if (this.form.templateType == "PROPAGANDA" && this.form.templateId) {
getPropaganda(this.form.templateId).then((response) => {
@ -607,11 +613,23 @@ export default {
},
//wangeditor传值
onNodeContent(item) {
console.log(item, 'items')
let wangeditorlist = []
if (localStorage.getItem('wangeditorlist')) {
wangeditorlist = JSON.parse(localStorage.getItem('wangeditorlist'))
wangeditorlist = wangeditorlist.filter(e => e.taskSubdivision != item.taskSubdivision && e.specialDiseaseNodeId != item.specialDiseaseNodeId)
}
wangeditorlist.push(item)
// console.log(wangeditorlist, 'wangeditorlist')
localStorage.setItem('wangeditorlist', JSON.stringify(wangeditorlist))
if (item.nodeContent) {
// console.log(555)
this.form.nodeContent = item.nodeContent;
console.log(this.form.nodeContent, 'this.form.nodeContentthis.form.nodeContentthis.form.nodeContent')
var abc = new RegExp("<br>", "g");
var bbb = this.form.nodeContent.replace(abc, "");
this.form.nodeContent = bbb;
}
},
//小程序传值
@ -736,7 +754,15 @@ export default {
// !e.taskStatus
// );
// return
specialDiseaseNode(this.itemlist).then((res) => {
let wangeditorlist = []
if (localStorage.getItem('wangeditorlist')) {
wangeditorlist = JSON.parse(localStorage.getItem('wangeditorlist'))
wangeditorlist = wangeditorlist.filter(e => e.specialDiseaseNodeId == this.form.specialDiseaseNodeId)
console.log(wangeditorlist,'wangeditorlist')
localStorage.setItem('wangeditorlist', JSON.stringify(wangeditorlist))
}
this.info();
loading.close();
this.$modal.msgSuccess("暂存成功!");
@ -762,8 +788,7 @@ export default {
this.formview = item.formview
},
bottomclickevent(uitem, index, uindex) {
onemit() {
if (
this.form.taskSubdivisiontemplateType != "QUESTIONNAIRE" &&
this.form.taskSubdivisiontemplateType != "PROPAGANDA" &&
@ -771,30 +796,31 @@ export default {
) {
this.$refs.wangeditor.emit();
}
setTimeout(() => {
this.form = uitem;
this.$forceUpdate()
if (this.form.templateType == "PROPAGANDA" && this.form.templateId) {
getPropaganda(this.form.templateId).then((response) => {
this.formview = response.data;
});
} else if (this.form.templateType == "QUESTIONNAIRE" && this.form.templateId) {
questionname(this.form.templateId).then((res) => {
this.lookitemnew = res.data;
});
} else if (this.form.templateType == 'SCRIPT' && this.form.flowScheme) {
this.phoneNodeContent = this.form.flowScheme
}
this.taskPartitionList = [];
if (this.form.taskType) {
this.changeTaskType(this.form.taskType, this.form.taskSubdivision);
}
this.listindex = index;
this.itemindex = uindex;
}, 300);
},
// 点击
async bottomclickevent(uitem, index, uindex) {
await this.onemit()
this.listindex = index;
this.itemindex = uindex;
if (uitem.templateType == "PROPAGANDA" && uitem.templateId) {
getPropaganda(uitem.templateId).then((response) => {
this.formview = response.data;
});
} else if (uitem.templateType == "QUESTIONNAIRE" && uitem.templateId) {
questionname(uitem.templateId).then((res) => {
this.lookitemnew = res.data;
});
} else if (uitem.templateType == 'SCRIPT' && uitem.flowScheme) {
this.phoneNodeContent = uitem.flowScheme
}
this.taskPartitionList = [];
if (uitem.taskType) {
this.changeTaskType(uitem.taskType, uitem.taskSubdivision);
}
this.form = uitem;
// this.form.
},
handleStep() {
this.active = 2;
},
@ -807,6 +833,7 @@ export default {
},
//任务类型
changeTaskType(code, taskSubdivision) {
this.taskPartitionDictId = ''
let id = this.selectTaskTypeList?.find((e) => e.taskTypeCode == code)?.id;
this.form.taskTypeName = this.selectTaskTypeList?.find(
(e) => e.taskTypeCode == code
@ -825,42 +852,67 @@ export default {
},
//点击任务细分
changetaskSubdivision(code, type) {
this.form.taskSubdivisionName = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.taskPartitionName;
let id = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.id;
if (
this.form.taskSubdivisiontemplateType != "QUESTIONNAIRE" &&
this.form.taskSubdivisiontemplateType != "PROPAGANDA" &&
this.form.taskSubdivisiontemplateType != "SCRIPT"
) {
this.$refs.wangeditor.emit();
}
// console.log(code,'code')
setTimeout(() => {
this.form.taskSubdivisionName = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.taskPartitionName;
let id = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.id;
console.log(id, 'id')
taskStatusDictList(id).then((res) => {
this.taskStatusDictList = res.data;
});
this.taskPartitionDictId = id
this.form.secondClassifyDescribe = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.secondClassifyDescribe;
this.form.executionTime = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.executionTime;
this.taskPartitionList.forEach((el) => {
if (code == el.taskPartitionCode) {
this.form.executionTime = el.executionTime;
this.form.taskSubdivisiontemplateType = el.templateType;
this.form.secondClassifyDescribe = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.secondClassifyDescribe;
this.form.executionTime = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.executionTime;
taskStatusDictList(id).then((res) => {
this.taskStatusDictList = res.data;
});
this.taskPartitionList.forEach((el) => {
if (code == el.taskPartitionCode) {
this.form.executionTime = el.executionTime;
this.form.taskSubdivisiontemplateType = el.templateType;
if (
this.form.taskSubdivisiontemplateType == "SCRIPT" ||
this.form.taskSubdivisiontemplateType == "PROPAGANDA" ||
this.form.taskSubdivisiontemplateType == "QUESTIONNAIRE"
) {
this.form.nodeContent = `<p></p>`;
if (
this.form.taskSubdivisiontemplateType == "SCRIPT" ||
this.form.taskSubdivisiontemplateType == "PROPAGANDA" ||
this.form.taskSubdivisiontemplateType == "QUESTIONNAIRE"
) {
this.form.nodeContent = `<p></p>`;
}
if (!type) {
this.form.templateId = "";
this.form.templateName = "";
}
}
if (!type) {
this.form.templateId = "";
this.form.templateName = "";
let wangeditorlist = []
if (localStorage.getItem('wangeditorlist')) {
wangeditorlist = JSON.parse(localStorage.getItem('wangeditorlist'))
this.form.nodeContent = '<p></p>'
this.form.nodeContent = wangeditorlist.find(e => e.taskSubdivision == this.form.taskSubdivision && e.specialDiseaseNodeId == this.form.specialDiseaseNodeId)?.nodeContent
console.log(this.form.nodeContent, 'this.form.nodeContent8858585')
}
}
});
});
}, 500);
console.log(this.form)
},
// 添加管理路径节点
addlist() {
// this.taskPartitionDictId = ''
list(this.parentDictCode).then((res) => {
// this.parentDictCodelist = res.rows;
res.rows.forEach((e) => {
@ -898,6 +950,8 @@ export default {
},
// 添加节点
additem(item) {
// this.taskPartitionDictId = ''
item.list.push({
nodeContent: "<p></p>",
templateId: "",

View File

@ -1,18 +1,42 @@
<template>
<div style="border: 1px solid #ccc">
<Toolbar style="border-bottom: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig" :mode="mode" />
<Editor style="height: 500px; overflow-y: hidden" v-model="html" :defaultConfig="editorConfig" :mode="mode"
@onChange="onChange" @onCreated="onCreated" @onFocus="handleFocus" />
<el-dialog title="添加画像标签字段" :visible.sync="labelshow" width="40%" :before-close="beforeClose"
class="category-cascader-panel">
<el-cascader-panel :key="isResouceShow" :options="labeloptions" @change="panelchange" v-if="labelshow"
ref="cascaderAddaddlist" v-model="selectedOptions" :props="{
value: 'value',
label: 'label',
children: 'children',
checkStrictly: false,
multiple: true,
}"></el-cascader-panel>
<Toolbar
style="border-bottom: 1px solid #ccc"
:editor="editor"
:defaultConfig="toolbarConfig"
:mode="mode"
/>
<Editor
style="height: 500px; overflow-y: hidden"
v-model="html"
:defaultConfig="editorConfig"
:mode="mode"
@onChange="onChange"
@onCreated="onCreated"
@onFocus="handleFocus"
/>
<el-dialog
title="添加画像标签字段"
:visible.sync="labelshow"
width="40%"
:before-close="beforeClose"
class="category-cascader-panel"
>
<el-cascader-panel
:key="isResouceShow"
:options="labeloptions"
@change="panelchange"
v-if="labelshow"
ref="cascaderAddaddlist"
v-model="selectedOptions"
:props="{
value: 'value',
label: 'label',
children: 'children',
checkStrictly: false,
multiple: true,
}"
></el-cascader-panel>
<div>
<div style="margin: 20px 0">结果预览:</div>
<div v-for="(item, index) of addlist" :key="index">
@ -23,15 +47,25 @@
<el-button @click="labelclick" type="primary">确定</el-button>
</div>
</el-dialog>
<el-dialog title="添加知识库字段" :visible.sync="fieldshow" width="50%" :before-close="beforeClose"
class="category-cascader-panel">
<el-cascader-panel :options="fieldoptions" @change="handleChange($event)" :props="{
value: 'termCode',
label: 'termContent',
children: 'children',
checkStrictly: false,
multiple: true,
}" ref="cascaderAddr">
<el-dialog
title="添加知识库字段"
:visible.sync="fieldshow"
width="50%"
:before-close="beforeClose"
class="category-cascader-panel"
>
<el-cascader-panel
:options="fieldoptions"
@change="handleChange($event)"
:props="{
value: 'termCode',
label: 'termContent',
children: 'children',
checkStrictly: false,
multiple: true,
}"
ref="cascaderAddr"
>
</el-cascader-panel>
<div style="margin: 20px 0">结果预览:</div>
@ -70,7 +104,7 @@ import { getToken } from "@/utils/auth";
var that;
export default {
props: ["nodeContent"],
props: ["nodeContent", "taskPartitionDictId", "taskSubdivision","specialDiseaseNodeId"],
components: { Editor, Toolbar },
name: "wangEditor",
data() {
@ -82,7 +116,6 @@ export default {
children: "children",
multiple: true,
},
isResouceShow: 1,
searchForm: {},
labeloptions: [],
@ -182,7 +215,7 @@ export default {
return res;
},
emit() {
this.$emit("on-nodeContent", { nodeContent: this.html });
this.$emit("on-nodeContent", { nodeContent: this.html,taskSubdivision:this.taskSubdivision,specialDiseaseNodeId:this.specialDiseaseNodeId });
},
panelchange(value) {
this.addlist = [];
@ -194,7 +227,7 @@ export default {
label: el.label + "-" + ele.label,
fileName: el.label,
fileSpan: ele.label,
fieldMark: ele.termCode
fieldMark: ele.termCode,
});
}
});
@ -210,27 +243,24 @@ export default {
this.editor.deleteBackward();
}
this.addlist.forEach((e) => {
const resume = { // JS
type: 'attachment',
link: '',
const resume = {
// JS
type: "attachment",
link: "",
fileName: e.fileName,
fileSpan: e.fileSpan,
fieldMark: e.fieldMark,
children: [{ text: '' }], // void children
}
children: [{ text: "" }], // void children
};
this.editor.insertNode(resume);
});
// this.addlist = [
// {
// fileName: "",
// // fieldMark: "",
// fileSpan: "",
// },
// ];
this.editor.focus();
++this.isResouceShow;
this.selectedOptions = []
this.addlist = []
this.selectedOptions = [];
this.addlist = [];
setTimeout(() => {
this.editor.focus();
}, 30);
}, 100);
},
fieldclick() {
@ -284,14 +314,18 @@ export default {
// console.log("focus", editor);
},
info() {
labelFieldList("PORTRAIT_LABEL_FIELD").then((res) => {
labelFieldList(this.taskPartitionDictId).then((res) => {
console.log(res, "res");
// res.data.data.forEach((e) => {
// e.labelFieldContentList.forEach((el) => {
// el.labelFieldId = el.labelFieldContentId;
// el.fieldName = el.contentName;
// });
// });
this.labeloptions = res;
if(res){
this.labeloptions = res;
}
});
bankLevel("3").then((res) => {
@ -318,10 +352,28 @@ export default {
},
watch: {
nodeContent(newValue, oldValue) {
console.log(newValue,'newValue')
this.html = newValue;
},
taskSubdivision(newvalue, oldvalue) {
this.taskSubdivision = newvalue;
},
specialDiseaseNodeId(newvalue,oldvalue){
console.log(newvalue, "specialDiseaseNodeId");
this.specialDiseaseNodeId = newvalue;
},
taskPartitionDictId(newValue, oldValue) {
console.log(newValue, "taskPartitionDictId");
this.labeloptions = [];
this.taskPartitionDictId = newValue;
this.info();
},
},
mounted() {
this.info();
if (this.nodeContent) {
const loading = this.$loading({
lock: true,
@ -342,7 +394,6 @@ export default {
},
created() {
that = this;
this.info();
},
};
class MyButtonMenu {
@ -353,6 +404,7 @@ class MyButtonMenu {
this.iconSvg =
'<svg t="1711951668796" class="icon" viewBox="0 0 1119 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4490" xmlns:xlink="http://www.w3.org/1999/xlink" width="218.5546875" height="200"><path d="M25.415082 562.922053a25.1989 25.1989 0 0 1-17.745705-43.299519L542.347456 7.392772A25.110172 25.110172 0 1 1 577.040308 43.682738L42.894601 555.9125a25.110172 25.110172 0 0 1-17.479519 7.009553z" p-id="4491"></path><path d="M1094.061411 562.922053a25.110172 25.110172 0 0 1-17.745704-7.009553L542.347456 43.682738A25.110172 25.110172 0 1 1 577.040308 7.392772l534.323165 512.229762a25.1989 25.1989 0 0 1-17.745704 43.299519zM559.738247 1023.955458a380.467906 380.467906 0 0 1-380.024264-380.112992 25.1989 25.1989 0 0 1 50.309073 0 330.070105 330.070105 0 0 0 329.715191 329.80392 25.1989 25.1989 0 1 1 0 50.309072z" p-id="4492"></path><path d="M1009.769315 799.472295H618.3878a25.1989 25.1989 0 0 1 0-50.309072h391.381515a25.1989 25.1989 0 0 1 0 50.309072z" fill="#231815" p-id="4493"></path><path d="M814.122922 996.005974a25.1989 25.1989 0 0 1-25.198901-25.198901V579.869201a25.1989 25.1989 0 1 1 50.309073 0v390.937872a25.1989 25.1989 0 0 1-25.110172 25.198901z" fill="#231815" p-id="4494"></path></svg>';
this.tag = "button";
this.showModal = true;
}
// false
@ -369,7 +421,12 @@ class MyButtonMenu {
}
//
exec(editor, value) {
this.vueInstance.labelshow = true;
console.log(that.taskPartitionDictId, "that.taskPartitionDictId");
if (that.taskPartitionDictId) {
this.vueInstance.labelshow = true;
} else {
that.$message.error(`请先选择任务细分`);
}
}
}
class MyButtonMenutwo {
@ -423,7 +480,7 @@ function withAttachment(editor) {
const newEditor = editor;
newEditor.isInline = (elem) => {
const type = DomEditor.getNodeType(elem);
if (type === "attachment") return true; // type: attachment inline
if (type === "attachment") return false; // type: attachment inline
if (type === "attachmenttwo") return true; // type: attachment inline
return isInline(elem);
};
@ -501,7 +558,7 @@ function renderAttachment(elem, children, editor) {
background: "#E5F5F2",
padding: "5px 10px" /* 其他... */,
}, // style
on: { click() { } /* 其他... */ },
on: { click() {} /* 其他... */ },
},
// img
[fileSpan, iconVnode]
@ -517,7 +574,7 @@ function renderAttachment(elem, children, editor) {
background: "#009A82",
padding: "5px 10px" /* 其他... */,
}, // style
on: { click() { } /* 其他... */ },
on: { click() {} /* 其他... */ },
},
// img
[fileName, nameiconVnode]
@ -531,7 +588,7 @@ function renderAttachment(elem, children, editor) {
props: { contentEditable: false, class: "text" }, // HTML
style: {}, // style
on: {
click() { } /* 其他... */,
click() {} /* 其他... */,
},
},
//
@ -605,7 +662,7 @@ function renderAttachmenttwo(elem, children, editor) {
background: "#E5F5F2",
padding: "5px 10px" /* 其他... */,
}, // style
on: { click() { } /* 其他... */ },
on: { click() {} /* 其他... */ },
},
// img
[fileSpan, iconVnode]
@ -621,7 +678,7 @@ function renderAttachmenttwo(elem, children, editor) {
background: "#436AE9",
padding: "5px 10px" /* 其他... */,
}, // style
on: { click() { } /* 其他... */ },
on: { click() {} /* 其他... */ },
},
// img
[fileName, nameiconVnode]
@ -635,7 +692,7 @@ function renderAttachmenttwo(elem, children, editor) {
props: { contentEditable: false, class: "text" }, // HTML
style: {}, // style
on: {
click() { } /* 其他... */,
click() {} /* 其他... */,
},
},
//
@ -767,10 +824,8 @@ Boot.registerModule(parseHtmlConfmodule);
<style lang="scss">
.category-cascader-panel {
.el-cascader-panel {
// background-color: red !important;
.el-scrollbar:first-child {
// li[aria-haspopup="true"] {
.el-checkbox {
display: none !important;

View File

@ -243,6 +243,9 @@
<wangeditor
style="width: 100%"
:nodeContent="form.nodeContent"
:taskPartitionDictId="taskPartitionDictId"
:taskSubdivision="form.taskSubdivision"
:specialDiseaseNodeId="form.specialDiseaseNodeId"
@on-nodeContent="onNodeContent"
v-show="
form.taskSubdivisiontemplateType != 'QUESTIONNAIRE' &&
@ -251,6 +254,7 @@
"
ref="wangeditor"
/>
<div
class="card"
v-show="form.taskSubdivisiontemplateType != 'SCRIPT'"
@ -698,6 +702,8 @@ export default {
taskPartitionList: [],
parentDictCode: "",
parentDictCodelist: [],
taskPartitionDictId: '',
};
},
created() {
@ -705,7 +711,10 @@ export default {
this.infolistword();
this.infolistMESSAGE();
},
beforeDestroy() {},
beforeDestroy() {
console.log(111111111)
localStorage.removeItem('wangeditorlist')
},
watch: {
"form.phoneMessageRemind": {
handler(newValue, oldValue) {
@ -846,15 +855,13 @@ export default {
getPropaganda(this.form.templateId).then((response) => {
this.formview = response.data;
});
} else if (
this.form.templateType == "QUESTIONNAIRE" ||
(this.form.templateType == "SCRIPT" && this.form.templateId)
) {
//
questionname(this.form.templateId).then((res) => {
this.lookitemnew = res.data;
});
}
} else
if ( this.form.templateId&&this.form.templateType == "QUESTIONNAIRE" || this.form.templateType == "SCRIPT" ) {
//
questionname(this.form.templateId).then((res) => {
this.lookitemnew = res.data;
});
}
if (this.form.taskType) {
this.changeTaskType(this.form.taskType, this.form.taskSubdivision);
}
@ -930,11 +937,25 @@ export default {
},
//wangeditor
onNodeContent(item) {
this.form.nodeContent = item.nodeContent;
// this.html += `<div>${this.add}</div>`;
var abc = new RegExp("<br>", "g");
var bbb = this.form.nodeContent.replace(abc, "");
this.form.nodeContent = bbb;
console.log(item, 'items')
let wangeditorlist = []
if (localStorage.getItem('wangeditorlist')) {
wangeditorlist = JSON.parse(localStorage.getItem('wangeditorlist'))
wangeditorlist = wangeditorlist.filter(e => e.taskSubdivision != item.taskSubdivision && e.specialDiseaseNodeId != item.specialDiseaseNodeId)
}
wangeditorlist.push(item)
// console.log(wangeditorlist, 'wangeditorlist')
localStorage.setItem('wangeditorlist', JSON.stringify(wangeditorlist))
if (item.nodeContent) {
// console.log(555)
this.form.nodeContent = item.nodeContent;
console.log(this.form.nodeContent, 'this.form.nodeContentthis.form.nodeContentthis.form.nodeContent')
var abc = new RegExp("<br>", "g");
var bbb = this.form.nodeContent.replace(abc, "");
this.form.nodeContent = bbb;
}
},
//
miniProgramtemplate(item) {
@ -1025,6 +1046,13 @@ export default {
// );
// return
specialDiseaseNode(this.updata).then((res) => {
let wangeditorlist = []
if (localStorage.getItem('wangeditorlist')) {
wangeditorlist = JSON.parse(localStorage.getItem('wangeditorlist'))
wangeditorlist = wangeditorlist.filter(e => e.specialDiseaseNodeId == this.form.specialDiseaseNodeId)
console.log(wangeditorlist,'wangeditorlist')
localStorage.setItem('wangeditorlist', JSON.stringify(wangeditorlist))
}
this.info();
loading.close();
this.$modal.msgSuccess("暂存成功!");
@ -1051,43 +1079,75 @@ export default {
this.form.routeNodeDay = Number(this.lists[this.listindex].routeNodeDay);
this.dialogVisible = true;
},
//
bottomclickevent(uitem, index, uindex) {
// this.phoneNodeContent = "";
// this.lookitemnew = "";
// editor
onemit() {
if (
this.form.taskSubdivisiontemplateType != "QUESTIONNAIRE" &&
this.form.taskSubdivisiontemplateType != "PROPAGANDA"
this.form.taskSubdivisiontemplateType != "PROPAGANDA" &&
this.form.taskSubdivisiontemplateType != "SCRIPT"
) {
this.$refs.wangeditor.emit();
}
setTimeout(() => {
this.form = uitem;
if (this.form.templateType == "PROPAGANDA" && this.form.templateId) {
getPropaganda(this.form.templateId).then((response) => {
//
this.formview = response.data;
});
} else if (
this.form.templateType == "QUESTIONNAIRE" &&
this.form.templateId
) {
questionname(this.form.templateId).then((res) => {
//
this.lookitemnew = res.data;
});
} else if (this.form.templateType == "SCRIPT" && this.form.flowScheme) {
//
this.phoneNodeContent = this.form.flowScheme;
}
this.taskPartitionList = [];
if (this.form.taskType) {
this.changeTaskType(this.form.taskType, this.form.taskSubdivision);
}
this.listindex = index;
this.itemindex = uindex;
}, 150);
},
//
async bottomclickevent(uitem, index, uindex) {
await this.onemit()
this.listindex = index;
this.itemindex = uindex;
if (uitem.templateType == "PROPAGANDA" && uitem.templateId) {
getPropaganda(uitem.templateId).then((response) => {
this.formview = response.data;
});
} else if (uitem.templateType == "QUESTIONNAIRE" && uitem.templateId) {
questionname(uitem.templateId).then((res) => {
this.lookitemnew = res.data;
});
} else if (uitem.templateType == 'SCRIPT' && uitem.flowScheme) {
this.phoneNodeContent = uitem.flowScheme
}
this.taskPartitionList = [];
if (uitem.taskType) {
this.changeTaskType(uitem.taskType, uitem.taskSubdivision);
}
this.form = uitem;
// this.form.
},
// bottomclickevent(uitem, index, uindex) {
// // this.phoneNodeContent = "";
// // this.lookitemnew = "";
// if (
// this.form.taskSubdivisiontemplateType != "QUESTIONNAIRE" &&
// this.form.taskSubdivisiontemplateType != "PROPAGANDA"
// ) {
// this.$refs.wangeditor.emit();
// }
// setTimeout(() => {
// this.form = uitem;
// if (this.form.templateType == "PROPAGANDA" && this.form.templateId) {
// getPropaganda(this.form.templateId).then((response) => {
// //
// this.formview = response.data;
// });
// } else if (
// this.form.templateType == "QUESTIONNAIRE" &&
// this.form.templateId
// ) {
// questionname(this.form.templateId).then((res) => {
// //
// this.lookitemnew = res.data;
// });
// } else if (this.form.templateType == "SCRIPT" && this.form.flowScheme) {
// //
// this.phoneNodeContent = this.form.flowScheme;
// }
// this.taskPartitionList = [];
// if (this.form.taskType) {
// this.changeTaskType(this.form.taskType, this.form.taskSubdivision);
// }
// this.listindex = index;
// this.itemindex = uindex;
// }, 150);
// },
handleStep() {
this.active = 2;
},
@ -1100,6 +1160,8 @@ export default {
},
//
changeTaskType(code, taskSubdivision) {
this.taskPartitionDictId = ''
let id = this.selectTaskTypeList?.find((e) => e.taskTypeCode == code)?.id;
this.form.taskTypeName = this.selectTaskTypeList?.find(
(e) => e.taskTypeCode == code
@ -1118,38 +1180,62 @@ export default {
},
//
changetaskSubdivision(code, type) {
this.form.taskSubdivisionName = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.taskPartitionName;
let id = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.id;
this.form.secondClassifyDescribe = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.secondClassifyDescribe;
this.form.executionTime = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.executionTime;
taskStatusDictList(id).then((res) => {
this.taskStatusDictList = res.data;
});
this.taskPartitionList.forEach((el) => {
if (code == el.taskPartitionCode) {
this.form.executionTime = el.executionTime;
this.form.taskSubdivisiontemplateType = el.templateType;
if (
this.form.taskSubdivisiontemplateType == "SCRIPT" ||
this.form.taskSubdivisiontemplateType == "PROPAGANDA" ||
this.form.taskSubdivisiontemplateType == "QUESTIONNAIRE"
) {
this.form.nodeContent = `<p></p>`;
if (
this.form.taskSubdivisiontemplateType != "QUESTIONNAIRE" &&
this.form.taskSubdivisiontemplateType != "PROPAGANDA" &&
this.form.taskSubdivisiontemplateType != "SCRIPT"
) {
this.$refs.wangeditor.emit();
}
// console.log(code,'code')
setTimeout(() => {
this.form.taskSubdivisionName = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.taskPartitionName;
let id = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.id;
console.log(id, 'id')
this.taskPartitionDictId = id
this.form.secondClassifyDescribe = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.secondClassifyDescribe;
this.form.executionTime = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.executionTime;
taskStatusDictList(id).then((res) => {
this.taskStatusDictList = res.data;
});
this.taskPartitionList.forEach((el) => {
if (code == el.taskPartitionCode) {
this.form.executionTime = el.executionTime;
this.form.taskSubdivisiontemplateType = el.templateType;
if (
this.form.taskSubdivisiontemplateType == "SCRIPT" ||
this.form.taskSubdivisiontemplateType == "PROPAGANDA" ||
this.form.taskSubdivisiontemplateType == "QUESTIONNAIRE"
) {
this.form.nodeContent = `<p></p>`;
}
if (!type) {
this.form.templateId = "";
this.form.templateName = "";
}
}
if (!type) {
this.form.templateId = "";
this.form.templateName = "";
let wangeditorlist = []
if (localStorage.getItem('wangeditorlist')) {
wangeditorlist = JSON.parse(localStorage.getItem('wangeditorlist'))
this.form.nodeContent = '<p></p>'
this.form.nodeContent = wangeditorlist.find(e => e.taskSubdivision == this.form.taskSubdivision && e.specialDiseaseNodeId == this.form.specialDiseaseNodeId)?.nodeContent
console.log(this.form.nodeContent, 'this.form.nodeContent8858585')
}
}
});
});
}, 500);
console.log(this.form)
},
addlist() {
list(this.parentDictCode).then((res) => {