Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
2024-07-08 15:44:17 +08:00
commit 3e12818a1e
2 changed files with 85 additions and 51 deletions

View File

@ -423,8 +423,8 @@
>
</span>
</el-dialog>
<div class="bottomform">
<wangeditor
<div class="bottomform" >
<wangeditor
style="width: 100%"
:nodeContent="form.nodeContent"
:taskPartitionDictId="taskPartitionDictId"
@ -436,6 +436,7 @@
form.taskSubdivisiontemplateType != 'PROPAGANDA' &&
form.taskSubdivisiontemplateType != 'SCRIPT'
"
ref="wangeditor"
/>
<div
@ -530,8 +531,9 @@
</div>
<div
class="card"
style="height: 250px"
style="margin-top: -30px"
v-show="form.taskSubdivisiontemplateType == 'SCRIPT'"
>
<div class="flex">
<div class="pushMethod">

View File

@ -204,7 +204,7 @@
form.templateId
"
>
<div class="titletop">文章模板:{{ formview.propagandaTitle }}</div>
<div class="titletop">文章模板:{{ formview.propagandaTitle }}</div>
<div class="bodytop">
<div class="titledata">{{ formview.propagandaTitle }}</div>
@ -241,21 +241,21 @@
</el-dialog>
<div class="bottomform">
<wangeditor
v-show="
v-show="
form.taskSubdivisiontemplateType != 'QUESTIONNAIRE' &&
form.taskSubdivisiontemplateType != 'PROPAGANDA' &&
form.taskSubdivisiontemplateType != 'SCRIPT'
"
v-cloak
style="width: 100%"
:nodeContent="form.nodeContent"
:taskPartitionDictId="taskPartitionDictId"
:taskSubdivision="form.taskSubdivision"
:specialDiseaseNodeId="form.specialDiseaseNodeId"
@on-nodeContent="onNodeContent"
ref="wangeditor"
/>
<div
class="card"
v-show="form.taskSubdivisiontemplateType != 'SCRIPT'"
@ -364,7 +364,7 @@
</div>
<div
class="card"
style="margin-top: -30px;"
style="margin-top: -30px"
v-show="form.taskSubdivisiontemplateType == 'SCRIPT'"
>
<div class="flex">
@ -703,8 +703,7 @@ export default {
taskPartitionList: [],
parentDictCode: "",
parentDictCodelist: [],
taskPartitionDictId: '',
taskPartitionDictId: "",
};
},
created() {
@ -714,7 +713,7 @@ export default {
},
beforeDestroy() {
// console.log(111111111)
localStorage.removeItem('wangeditorlist')
localStorage.removeItem("wangeditorlist");
},
watch: {
"form.phoneMessageRemind": {
@ -857,13 +856,15 @@ export default {
getPropaganda(this.form.templateId).then((response) => {
this.formview = response.data;
});
} else
if ( this.form.templateId&&this.form.templateType == "QUESTIONNAIRE" ) {
//
questionname(this.form.templateId).then((res) => {
this.lookitemnew = res.data;
});
}
} else if (
this.form.templateId &&
this.form.templateType == "QUESTIONNAIRE"
) {
//
questionname(this.form.templateId).then((res) => {
this.lookitemnew = res.data;
});
}
if (this.form.taskType) {
this.changeTaskType(this.form.taskType, this.form.taskSubdivision);
}
@ -940,14 +941,18 @@ 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)
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)
wangeditorlist.push(item);
// console.log(wangeditorlist, 'wangeditorlist')
localStorage.setItem('wangeditorlist', JSON.stringify(wangeditorlist))
localStorage.setItem("wangeditorlist", JSON.stringify(wangeditorlist));
if (item.nodeContent) {
// console.log(555)
this.form.nodeContent = item.nodeContent;
@ -955,9 +960,7 @@ export default {
var abc = new RegExp("<br>", "g");
var bbb = this.form.nodeContent.replace(abc, "");
this.form.nodeContent = bbb;
}
},
//
miniProgramtemplate(item) {
@ -1048,12 +1051,17 @@ 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)
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))
localStorage.setItem(
"wangeditorlist",
JSON.stringify(wangeditorlist)
);
}
this.info();
loading.close();
@ -1093,27 +1101,43 @@ export default {
},
//
async bottomclickevent(uitem, index, uindex) {
console.log(uitem, index, uindex,'uitem, index, uindex')
await this.onemit()
await this.onemit();
const loading = this.$loading({
lock: true,
text: "加载中",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
this.listindex = index;
this.itemindex = uindex;
if (uitem.taskSubdivisiontemplateType == "PROPAGANDA" && uitem.templateId) {
getPropaganda(uitem.templateId).then((response) => {
if (
uitem.taskSubdivisiontemplateType == "PROPAGANDA" &&
uitem.templateId
) {
await getPropaganda(uitem.templateId).then((response) => {
this.formview = response.data;
});
} else if (uitem.taskSubdivisiontemplateType == "QUESTIONNAIRE" && uitem.templateId) {
questionname(uitem.templateId).then((res) => {
} else if (
uitem.taskSubdivisiontemplateType == "QUESTIONNAIRE" &&
uitem.templateId
) {
await questionname(uitem.templateId).then((res) => {
this.lookitemnew = res.data;
});
} else if (uitem.taskSubdivisiontemplateType == 'SCRIPT' && uitem.flowScheme) {
this.phoneNodeContent = uitem.flowScheme
} else if (
uitem.taskSubdivisiontemplateType == "SCRIPT" &&
uitem.flowScheme
) {
this.phoneNodeContent = uitem.flowScheme;
}
this.taskPartitionList = [];
if (uitem.taskType) {
this.changeTaskType(uitem.taskType, uitem.taskSubdivision);
}
this.form = uitem;
setTimeout(() => {
loading.close();
}, 1500);
},
handleStep() {
this.active = 2;
@ -1127,8 +1151,8 @@ export default {
},
//
changeTaskType(code, taskSubdivision) {
console.log(code,)
this.taskPartitionDictId = ''
console.log(code);
this.taskPartitionDictId = "";
let id = this.selectTaskTypeList?.find((e) => e.taskTypeCode == code)?.id;
this.form.taskTypeName = this.selectTaskTypeList?.find(
@ -1164,7 +1188,7 @@ export default {
(e) => e.taskPartitionCode == code
)?.id;
// console.log(id, 'id')
this.taskPartitionDictId = id
this.taskPartitionDictId = id;
this.form.secondClassifyDescribe = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.secondClassifyDescribe;
@ -1191,18 +1215,20 @@ export default {
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
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() {
@ -1328,6 +1354,10 @@ export default {
},
};
</script>
<style>
[v-cloak] {
display: none !important;
}</style>
<style scoped lang="scss">
@ -1416,7 +1446,7 @@ export default {
background-color: #fff;
width: 100%;
height: 130px;
margin: 20px 0 0;
padding: 20px 50px 0px 20px;
@ -1664,3 +1694,5 @@ export default {
padding: 20px;
}
</style>