From fb4d32ba9a3a79587df218dd1197ede31763d561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Thu, 20 Jun 2024 14:09:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E8=B7=AF=E5=BE=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/ManageNodeInformation/index.vue | 751 ++++++++++++------ .../system/editorialSpecialization/index.vue | 2 +- 2 files changed, 496 insertions(+), 257 deletions(-) diff --git a/src/views/system/ManageNodeInformation/index.vue b/src/views/system/ManageNodeInformation/index.vue index 42ebe28..7baa50b 100644 --- a/src/views/system/ManageNodeInformation/index.vue +++ b/src/views/system/ManageNodeInformation/index.vue @@ -43,6 +43,7 @@ style="width: 300px" > 适用范围 - +
编辑 - - + 展开 + 关闭 + +
@@ -193,10 +206,17 @@ :key="index" :color="listindex == index ? '#409EFF' : ''" > -
+
- - + + + +
- +

{{ uitem.taskTypeName }}

+ 已审核 + 不同意 + 未审核

{{ uitem.taskSubdivisionName }}

+
@@ -243,9 +289,9 @@ > @@ -258,9 +304,9 @@ > @@ -271,7 +317,7 @@ v-for="item in taskStatusDictList" :key="item.id" :label="item.taskStatusName" - :value="item.id" + :value="item.taskStatusCode" > @@ -307,17 +353,30 @@ prop="" v-if="form.taskSubdivisiontemplateType == 'PROPAGANDA'" > - +
-
+
推送方式: @@ -325,7 +384,11 @@
模板: - +
-
+
-
+
推送方式: @@ -357,7 +423,10 @@ + :templateId="form.officialTemplateId" + :templateName="form.officialTemplateName" + > +
@@ -370,7 +439,7 @@
-
+
-
+
推送方式: @@ -389,7 +461,12 @@
模板: - + +
@@ -402,7 +479,7 @@
-
+ +
+
+
+
+ 推送方式: + 人工电话 +
+
+ 模板: + +
+
+ + +
+
+
+
+ 重播次数: + + + + + + +
+
+ 时间间隔: + + + + + +
+
+ 短信提醒: + + + + +
+
+ 短信模板: + + + + + + +
-
- + 取 消
- - +
@@ -692,14 +794,12 @@ import wangeditor from "../components/wangEditor.vue"; import question from "../components/question.vue"; import message from "../components/message.vue"; +import scripts from "../components/script.vue"; + import propaganda from "../components/propaganda.vue"; import officialAccount from "../components/officialAccount.vue"; import miniProgram from "../components/miniProgram.vue"; -// import { -// selectTaskTypeList, -// taskPartitionList, -// taskStatusDictList, -// } from "@/api/system/specialDiseaseNode"; + import { triggerConditionedit } from "@/api/system/editorialSpecialization"; import { getAgencytype } from "@/api/system/agency"; import { @@ -719,6 +819,7 @@ export default { question, propaganda, message, + scripts, officialAccount, miniProgram, }, @@ -737,6 +838,8 @@ export default { routeCheckStatus: null, routeCheckRemark: "", }, + optionslist: [], + optionstriggerConditionOperator: [ { value: "CONTAIN", @@ -756,6 +859,7 @@ export default { }, ], optionslistS: [], + optionslistSname: [], optionsname: [ { @@ -784,6 +888,7 @@ export default { updatalist: [], // triggerConditionList: [{}], form: { + specialDiseaseNodeId: "", nodeContent: "", templateId: "", templateName: "", @@ -801,30 +906,8 @@ export default { }, itemindex: 0, listindex: 0, - lists: [ - { - routeNodeName: "", - routeNodeDay: "", - list: [ - { - nodeContent: "", - templateId: "", - templateName: "", - taskType: "", - taskTypeName: "", - taskSubdivision: "", - taskSubdivisionName: "", - taskStatus: "", - secondClassifyDescribe: "", - executionTime: "", - appletPushSign: "0", - officialPushSign: "0", - messagePushSign: "0", - taskSubdivisiontemplateType: "", - }, - ], - }, - ], + totalNumber: 0, + agreeNumber: 0, value: "", input: "", //任务类型 @@ -835,7 +918,16 @@ export default { taskPartitionList: [], routeId: "", options: [], + lists: [], dialogVisible: false, + parentDictCodelist: [], + parentDictCode: "", + itemlist: { + specialDiseaseRouteId: "", + // suitRange: "", + routeName: "", + specialDiseaseNodeList: [], + }, rules: { routeCheckStatus: [ { required: true, message: "请选择节点审核状态", trigger: "change" }, @@ -845,27 +937,68 @@ export default { }, created() { if (this.$route.query) { - this.$set(this.updata, "suitRange", this.$route.query.suitRange); + this.$set(this.form, "specialDiseaseNodeId", this.$route.query.id); + + console.log( + this.form.specialDiseaseNodeId, + " this.form.specialDiseaseNodeId" + ); + // this.$set(this.updata, "suitRange", this.$route.query.suitRange); this.$set(this.openlist, "suitRange", this.$route.query.suitRange); - // console.log(this.updata.suitRange, "5555555555555555"); - this.form.specialDiseaseNodeId = this.$route.query.id; - this.openlist.routeId = this.$route.query.id; + console.log(this.updata.suitRange, "5555555555555555"); - // triggerCondition(this.$route.query.id).then(res => { }) + this.openlist.routeId = this.$route.query.id; } - this.info() + this.taskinfo(); this.infolists(); this.infolist(); this.infolistoptionslistS(); - // this.taskinfo(); + this.infolistMESSAGE(); + this.infolistword(); }, beforeDestroy() {}, - watch: {}, + watch: { + "form.phoneMessageRemind": { + handler(newValue, oldValue) { + console.log(newValue, "2222221111122"); + if (newValue == "NOT_SEND_MESSAGE") { + this.form.phoneMessageTemplateId = ""; + this.form.phoneMessageTemplateName = ""; + } + }, + deep: true, + }, + // "form.phoneTemplateId": { + // handler(newValue, oldValue) { + // console.log(newValue, "phoneTemplateId"); + // // if (newValue == "NOT_SEND_MESSAGE") { + // this.form.phoneTemplateId = newValue; + // // this.form.phoneMessageTemplateName = ""; + // // } + // }, + // deep: true, + // // phoneTemplateId + // }, + }, mounted() { - this.form = this.lists[0].list[0]; + // this.form = this.lists[0].list[0]; }, methods: { + infolistword() { + var dictType = "text_message_remind"; + getAgencytype(dictType).then((res) => { + this.optionslist = res.data; + // this.taskinfo(); + }); + }, + infolistMESSAGE() { + var dictType = "redial_times"; + getAgencytype(dictType).then((res) => { + this.optionslistSname = res.data; + this.taskinfo(); + }); + }, upload() { // const loading = this.$loading({ // lock: true, @@ -922,16 +1055,7 @@ export default { triggerLogic: "", triggerLogicName: "", }; - // if (this.form.voList.length == 5) { - // this.$message.error("最多批量添加5条"); - // } else { - // this.form.voList.push(obj); - // // console.log(this.form) - // } - // this.updata.triggerConditionList.push({ - // }); - // }, if (this.openlist.triggerConditionList.length == 3) { this.$message.error("最多批量添加2条"); } else { @@ -1004,17 +1128,17 @@ export default { delitemlist(index, item) { this.updata.splice(index, 1); }, - // changeoptions(e) { - // this.parentDictCode = this.options.find( - // (el) => el.dictValue == e - // )?.dictCode; - // this.changelisy(); - // }, - // changelisy() { - // list(this.parentDictCode).then((res) => { - // this.parentDictCodelist = res.rows; - // }); - // }, + changeoptions(e) { + this.parentDictCode = this.options.find( + (el) => el.dictValue == e + )?.dictCode; + this.changelisy(); + }, + changelisy() { + list(this.parentDictCode).then((res) => { + this.parentDictCodelist = res.rows; + }); + }, info() { const loading = this.$loading({ lock: true, @@ -1024,17 +1148,23 @@ export default { }); this.lists = []; if (this.$route.query) { - // this.updata.suitRange = this.$route.query.suitRange; - // this.parentDictCode = this.options.find( - // (el) => el.dictValue == this.updata.suitRange - // )?.dictCode; - // this.changelisy(); - // this.updata.routeName = this.$route.query.routeName; - // this.updata.specialDiseaseRouteId = this.$route.query.id; + this.$set(this.updata, "suitRange", this.$route.query.suitRange); + this.parentDictCode = this.options.find( + (el) => el.dictValue == this.updata.suitRange + )?.dictCode; + setTimeout(() => { + this.changelisy(); + }, 10); + this.itemlist.specialDiseaseRouteId = this.$route.query.id; + this.itemlist.routeName = this.$route.query.routeName; selectSpecialDisease(this.$route.query.id).then((res) => { loading.close(); this.agreeNumber = res.data.agreeNumber; this.totalNumber = res.data.totalNumber; + console.log( + res.data.specialDiseaseNodeList, + "res.data.specialDiseaseNodeList" + ); res.data.specialDiseaseNodeList.forEach((e) => { console.log(e, "eeeeeeeeeeeeeeeee"); if (e.messagePushSign) { @@ -1056,8 +1186,11 @@ export default { "routeNodeName" ); this.form = this.lists[0].list[0]; + console.log(this.form, "this.form"); if (this.form.taskType) { + console.log(111111111111); this.changeTaskType(this.form.taskType, this.form.taskSubdivision); + console.log(this.form.taskSubdivision, "this.form.taskSubdivision"); } }); } else { @@ -1091,29 +1224,66 @@ export default { console.log(this.form, "6555555555555555"); } }, - - addtriggerConditionlist() { - this.idd++; - var obj = { - routeId: "", - routeName: "", - triggerConditionName: "", - triggerConditionOperator: "", - triggerConditionValue: "", - triggerConditionName: "", - triggerConditionOperatorName: "", - - triggerLogic: "", - triggerLogicName: "", - }; - - if (this.updata.length == 3) { - this.$message.error("最多批量添加2条"); - } else { - this.updata.push(obj); - // console.log(this.form) - } + handleData(list, key, keytwo) { + //得到数据的主键列表 + let keysArr = list.map((item) => { + return { + routeNodeDay: item[key], + routeNodeName: item[keytwo], + }; + }); + let array = keysArr.filter( + (item, index, arr) => + index === + arr.findIndex( + (ite) => + ite.routeNodeDay == item.routeNodeDay && + ite.routeNodeName == item.routeNodeName + ) + ); + // for (var i = 0; i < keysArr.length; i++) { + // for (var j = i + 1; j < keysArr.length; j++) { + // if (keysArr[i].routeNodeDay == keysArr[j].routeNodeDay && keysArr[i].routeNodeName == keysArr[j].routeNodeName) { + // keysArr.splice(j, 1); + // j--; + // } + // } + // } + let keys = [...new Set(array)]; + let newList = keys.map((item) => { + return { + //这里写新的 数据结构 如下是整体复制 + routeNodeDay: item[key], + routeNodeName: item[keytwo], + list: list.filter( + (i) => i[key] == item[key] && i[keytwo] == item[keytwo] + ), + }; + }); + return newList; }, + // addtriggerConditionlist() { + // this.idd++; + // var obj = { + // routeId: "", + // routeName: "", + // triggerConditionName: "", + // triggerConditionOperator: "", + // triggerConditionValue: "", + // triggerConditionName: "", + // triggerConditionOperatorName: "", + + // triggerLogic: "", + // triggerLogicName: "", + // }; + + // if (this.updata.length == 3) { + // this.$message.error("最多批量添加2条"); + // } else { + // this.updata.push(obj); + // // console.log(this.form) + // } + // }, // 且或 infolistoptionslistS() { var dictType = "trigger_logic"; @@ -1123,30 +1293,21 @@ export default { }, // 包含 changetriggerLogic(e, index) { - // console.log(e,index,'index') this.openlist.triggerConditionList[index].triggerConditionOperatorName = this.optionstriggerConditionOperator.find((el) => el.value == e).label; - // console.log( this.updata.triggerConditionList[index].triggerConditionOperatorName,"this.updata.triggerConditionList[index].triggerConditionOperatorName"); }, // 诊断 changetriggerConditionName(e, index) { - // console.log(e,index, "eeeeeeeee"); this.openlist.triggerConditionList[index].triggerConditionName = this.optionsname.find((el) => el.value == e).label; - // console.log(this.updata.triggerConditionList[index].triggerConditionName, " this.form.triggerConditionName"); + this.openlist.triggerConditionList[index].triggerConditionOperator = null; + this.openlist.triggerConditionList[index].triggerConditionValue = null; }, - changeoptions() {}, // 且或 changetriggerLogicsname(e, index) { - console.log(e, index, "eeeeeeeeeeeeeeeeee"); this.openlist.triggerConditionList[index].triggerLogic = e; this.openlist.triggerConditionList[index].triggerLogicName = this.optionslistS.find((el) => el.dictValue == e).dictLabel; - console.log( - this.openlist.triggerConditionList[index].triggerLogic, - this.openlist.triggerConditionList[index].triggerLogicName, - " this.form.triggerLogicName" - ); }, // 适用范围 infolists() { @@ -1168,7 +1329,7 @@ export default { res.data.splice(0, 1); this.updatalist = res.data; } - this.$set(this.updata, "suitRange", this.$route.query.suitRange); + this.$set(this.openlist, "suitRange", this.$route.query.suitRange); }); }, // 编辑接口 @@ -1176,7 +1337,7 @@ export default { this.routeId = this.$route.query.id; triggerConditionList(this.routeId).then((res) => { this.openlist.triggerConditionList = res.data; - this.$set(this.openlist, "suitRange", this.$route.query.suitRange); + this.$set(this.updata, "suitRange", this.$route.query.suitRange); }); }, // 编辑 @@ -1186,7 +1347,12 @@ export default { }, //wangeditor传值 onNodeContent(item) { + console.log(item, "itemfu"); this.form.nodeContent = item.nodeContent; + var abc = new RegExp("
", "g"); + var bbb = this.form.nodeContent.replace(abc, ""); + this.form.nodeContent = bbb; + console.log(this.form.nodeContent, " this.form.nodeContent"); }, //小程序传值 miniProgramtemplate(item) { @@ -1194,22 +1360,85 @@ export default { this.form.appletTemplateName = item.templateName; this.form.appletRemindContent = item.templateContent; }, + // 话术 + messageontemplateword(item) { + this.form.phoneTemplateId = item.templateId; + this.form.phoneTemplateName = item.templateName; + // this.form.messagePreview = item.templateContent; + }, //短信传值 messageontemplate(item) { this.form.messageTemplateId = item.templateId; this.form.messageTemplateName = item.templateName; this.form.messagePreview = item.templateContent; }, + // 短信 + messageontemplateMESSAGE(item) { + console.log(item, "2222222"); + this.form.phoneMessageTemplateId = item.templateId; + this.form.phoneMessageTemplateName = item.templateName; + this.form.messagePreview = item.templateContent; + }, //公众号传值 - officialAccountontemplate() { + officialAccountontemplate(item) { this.form.officialTemplateId = item.templateId; this.form.officialTemplateName = item.templateName; this.form.officialRemindContent = item.templateContent; }, - //暂存 TemporaryStorage() { - this.$refs.wangeditor.emit(); - triggerConditionedit(this.lists).then((res) => {}); + if ( + this.form.taskSubdivisiontemplateType != "QUESTIONNAIRE" && + this.form.taskSubdivisiontemplateType != "PROPAGANDA" + ) { + this.$refs.wangeditor.emit(); + } + this.$confirm( + "确认暂存时将过滤掉部分内容未填写完成的子节点,是否确认暂存?", + "提示", + { + confirmButtonText: "确认", + cancelButtonText: "取消", + } + ).then(() => { + const loading = this.$loading({ + lock: true, + text: "暂存中", + spinner: "el-icon-loading", + background: "rgba(0, 0, 0, 0.7)", + }); + this.itemlist.specialDiseaseNodeList = []; + this.lists.forEach((e) => { + e.list.length > 0 + ? e.list.forEach((el) => { + el.routeNodeDay = e.routeNodeDay; + el.routeNodeName = e.routeNodeName; + this.itemlist.specialDiseaseNodeList.push(el); + }) + : ""; + }); + console.log( + this.itemlist.specialDiseaseNodeList, + " this.itemlist.specialDiseaseNodeList" + ); + // this.updata.specialDiseaseNodeList = + // this.updata.specialDiseaseNodeList.filter( + // (e) => + // !e.routeNodeDay && + // !e.routeNodeName && + // !e.taskType && + // !e.taskSubdivision && + // !e.taskStatus + // ); + console.log(this.itemlist, "itemlist"); + specialDiseaseNode(this.itemlist).then((res) => { + this.info(); + loading.close(); + this.$modal.msgSuccess("暂存成功!"); + }); + setTimeout(() => { + loading.close(); + }, 3000); + }); }, //问卷传值 questionontemplate(item) { @@ -1221,14 +1450,31 @@ export default { this.form.templateId = item.templateId; this.form.templateName = item.templateName; }, - topclickevent(index) { - this.listindex = index; - this.itemindex = 0; - }, + // topclickevent(index) { + // this.listindex = index; + // this.itemindex = 0; + // }, + // bottomclickevent(uitem, index, uindex) { + // this.form = uitem; + // this.listindex = index; + // this.itemindex = uindex; + // }, bottomclickevent(uitem, index, uindex) { - this.form = uitem; - this.listindex = index; - this.itemindex = uindex; + if ( + this.form.taskSubdivisiontemplateType != "QUESTIONNAIRE" && + this.form.taskSubdivisiontemplateType != "PROPAGANDA" + ) { + this.$refs.wangeditor.emit(); + } + setTimeout(() => { + this.form = uitem; + 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; @@ -1237,13 +1483,12 @@ export default { taskinfo() { selectTaskTypeList().then((res) => { this.selectTaskTypeList = res.data; - }); - taskStatusDictList().then((res) => { - this.taskStatusDictList = res.data; + this.info(); }); }, - //任务类型 - changeTaskType(code, taskSubdivision) { + //任务类型 + changeTaskType(code, taskSubdivision) { + console.log(code, taskSubdivision, "code"); let id = this.selectTaskTypeList?.find((e) => e.taskTypeCode == code)?.id; this.form.taskTypeName = this.selectTaskTypeList?.find( (e) => e.taskTypeCode == code @@ -1255,6 +1500,7 @@ export default { this.form.taskSubdivisiontemplateType = ""; this.taskStatusDictList = []; if (taskSubdivision) { + console.log(2222222222); this.form.taskSubdivision = taskSubdivision; this.changetaskSubdivision(taskSubdivision, 1); } @@ -1269,6 +1515,7 @@ export default { let id = this.taskPartitionList?.find( (e) => e.taskPartitionCode == code )?.id; + this.form.secondClassifyDescribe = this.taskPartitionList?.find( (e) => e.taskPartitionCode == code )?.secondClassifyDescribe; @@ -1300,25 +1547,7 @@ export default { } }); }, - // //任务细分 - // changeTaskType(id) { - // taskPartitionList(id).then((res) => { - // this.taskPartitionList = res.data; - // }); - // this.selectTaskTypeList.forEach((el) => { - // if (id == el.id) { - // this.form.taskTypeName = el.taskTypeName; - // } - // }); - // }, - changetaskSubdivision(e) { - this.taskPartitionList.forEach((el) => { - if (e == el.id) { - this.form.taskSubdivisionName = el.taskTypeName; - this.form.taskSubdivisiontemplateType = el.templateType; - } - }); - }, + addlist() { this.lists.push({ routeNodeName: "", @@ -1367,9 +1596,9 @@ export default { this.lists.splice(index, 1); } }, - addtriggerCondition() { - this.updata.push({}); - }, + // addtriggerCondition() { + // this.updata.push({}); + // }, }, }; @@ -1452,8 +1681,8 @@ export default { padding: 20px 50px 0px 20px; .flextwo { - display: flex; - align-items: center; + // display: flex; + // align-items: center; margin-top: 20px; .text { @@ -1466,7 +1695,7 @@ export default { padding: 0 10px; height: 50px; line-height: 50px; - border: 1px solid #dcdfe6; + // border: 1px solid #dcdfe6; border-radius: 5px; display: flex; align-items: center; @@ -1489,15 +1718,20 @@ export default { .flex { display: flex; + width: 100%; align-items: center; + // background: red; justify-content: space-between; .pushMethod { height: 30px; + margin-top: 30px; line-height: 30px; font-size: 13px; color: #64666a; - + .spanname { + pointer-events: none; + } ::v-deep .el-input__inner { color: black; font-size: 13px; @@ -1511,6 +1745,11 @@ export default { } } } +.routeCheckStatus { + position: absolute; + right: 10px; + top: 73px; +} .topform { padding: 15px 0 0 15px; @@ -1564,7 +1803,7 @@ export default { padding: 20px; } .list { - margin: 14px auto; + margin: 12px auto; width: 100%; // height: calc(100% - 80px); background-color: #f2f4f5; @@ -1573,10 +1812,10 @@ export default { justify-content: space-evenly; .timelist { - width: 22%; + width: 25%; background-color: #fff; padding: 0 20px 20px; - height: calc(100vh - 280px); + height: calc(100vh - 350px); overflow: scroll; @@ -1595,7 +1834,7 @@ export default { .texts { width: 75%; - height: calc(100vh - 280px); + height: calc(100vh - 350px); overflow: scroll; background-color: #fff; diff --git a/src/views/system/editorialSpecialization/index.vue b/src/views/system/editorialSpecialization/index.vue index 28e2b38..8317d79 100644 --- a/src/views/system/editorialSpecialization/index.vue +++ b/src/views/system/editorialSpecialization/index.vue @@ -705,7 +705,7 @@ export default { query: { suitRange: item.suitRange, id: item.specialDiseaseRouteId, - + routeName: item.routeName, }, }); // const loading = this.$loading({