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

View File

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