修改推送方式
This commit is contained in:
parent
2baad5fd8f
commit
bfe0ea7720
844
src/views/system/ManageNodeInformation/index.js
Normal file
844
src/views/system/ManageNodeInformation/index.js
Normal file
@ -0,0 +1,844 @@
|
|||||||
|
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 { getAgencytype } from "@/api/system/agency";
|
||||||
|
import {
|
||||||
|
selectTaskTypeList,
|
||||||
|
taskPartitionList,
|
||||||
|
taskStatusDictList,
|
||||||
|
specialDiseaseNode,
|
||||||
|
triggerCondition,
|
||||||
|
selectSpecialDisease,
|
||||||
|
updateRouteCheckStatus,
|
||||||
|
list,
|
||||||
|
triggerConditionList,
|
||||||
|
getList,
|
||||||
|
} from "@/api/system/specialDiseaseNode";
|
||||||
|
import Cookies from "js-cookie";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
wangeditor,
|
||||||
|
question,
|
||||||
|
propaganda,
|
||||||
|
message,
|
||||||
|
scripts,
|
||||||
|
officialAccount,
|
||||||
|
miniProgram,
|
||||||
|
},
|
||||||
|
name: "specialDiseaseNode",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
value:1,
|
||||||
|
ConditionValue: [],
|
||||||
|
dictDataType: "",
|
||||||
|
openlist: {
|
||||||
|
suitRange: "",
|
||||||
|
routeId: "",
|
||||||
|
triggerConditionList: [],
|
||||||
|
},
|
||||||
|
open: false,
|
||||||
|
show3: false,
|
||||||
|
activeNames: ["1"],
|
||||||
|
routeform: {
|
||||||
|
routeCheckStatus: null,
|
||||||
|
routeCheckRemark: "",
|
||||||
|
},
|
||||||
|
optionslist: [],
|
||||||
|
// 包含
|
||||||
|
optionstriggerConditionOperator: [],
|
||||||
|
optionslistS: [],
|
||||||
|
optionslistSname: [],
|
||||||
|
// 诊断
|
||||||
|
optionsname: [],
|
||||||
|
routeName: "",
|
||||||
|
updata: [],
|
||||||
|
updatalists: [],
|
||||||
|
updatalist: [],
|
||||||
|
// triggerConditionList: [{}],
|
||||||
|
form: {
|
||||||
|
specialDiseaseNodeId: "",
|
||||||
|
nodeContent: "",
|
||||||
|
templateId: "",
|
||||||
|
templateName: "",
|
||||||
|
taskType: "",
|
||||||
|
taskTypeName: "",
|
||||||
|
taskSubdivision: "",
|
||||||
|
taskSubdivisionName: "",
|
||||||
|
taskStatus: "",
|
||||||
|
secondClassifyDescribe: "",
|
||||||
|
executionTime: "",
|
||||||
|
appletPushSign: "0",
|
||||||
|
officialPushSign: "0",
|
||||||
|
messagePushSign: "0",
|
||||||
|
taskSubdivisiontemplateType: "",
|
||||||
|
},
|
||||||
|
itemindex: 0,
|
||||||
|
listindex: 0,
|
||||||
|
totalNumber: 0,
|
||||||
|
agreeNumber: 0,
|
||||||
|
value: "",
|
||||||
|
input: "",
|
||||||
|
//任务类型
|
||||||
|
selectTaskTypeList: [],
|
||||||
|
//任务状态
|
||||||
|
taskStatusDictList: [],
|
||||||
|
//任务细分
|
||||||
|
taskPartitionList: [],
|
||||||
|
routeId: "",
|
||||||
|
options: [],
|
||||||
|
lists: [],
|
||||||
|
dialogVisible: false,
|
||||||
|
parentDictCodelist: [],
|
||||||
|
parentDictCode: "",
|
||||||
|
itemlist: {
|
||||||
|
specialDiseaseRouteId: "",
|
||||||
|
// suitRange: "",
|
||||||
|
routeName: "",
|
||||||
|
specialDiseaseNodeList: [],
|
||||||
|
},
|
||||||
|
updataname: "",
|
||||||
|
rules: {
|
||||||
|
routeCheckStatus: [
|
||||||
|
{ required: true, message: "请选择节点审核状态", trigger: "change" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if (this.$route.query) {
|
||||||
|
this.$set(this.form, "specialDiseaseNodeId", this.$route.query.id);
|
||||||
|
this.$set(this.openlist, "suitRange", this.$route.query.suitRange);
|
||||||
|
this.openlist.routeId = this.$route.query.id;
|
||||||
|
}
|
||||||
|
this.taskinfo();
|
||||||
|
this.infolistname();
|
||||||
|
|
||||||
|
this.infolists();
|
||||||
|
this.infolistoptionslistS();
|
||||||
|
this.infolistMESSAGE();
|
||||||
|
this.infolistword();
|
||||||
|
this.optiononditionOperator();
|
||||||
|
this.optiononditionOperators();
|
||||||
|
},
|
||||||
|
beforeDestroy() {},
|
||||||
|
watch: {
|
||||||
|
"form.phoneMessageRemind": {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
if (newValue == "NOT_SEND_MESSAGE") {
|
||||||
|
this.form.phoneMessageTemplateId = "";
|
||||||
|
this.form.phoneMessageTemplateName = "";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// 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,
|
||||||
|
text: "Loading",
|
||||||
|
spinner: "el-icon-loading",
|
||||||
|
background: "rgba(0, 0, 0, 0.7)",
|
||||||
|
});
|
||||||
|
this.openlist.triggerConditionList.forEach((e) => {
|
||||||
|
e.routeId = this.$route.query.id;
|
||||||
|
e.routeName = this.$route.query.routeName;
|
||||||
|
});
|
||||||
|
|
||||||
|
loading.close();
|
||||||
|
// return;
|
||||||
|
triggerCondition(this.openlist).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$notify({
|
||||||
|
type: "success",
|
||||||
|
title: "提示",
|
||||||
|
message: "修改触发条件成功",
|
||||||
|
});
|
||||||
|
|
||||||
|
this.routeName = res.data;
|
||||||
|
Cookies.remove("routeName");
|
||||||
|
|
||||||
|
Cookies.set("routeName", this.routeName);
|
||||||
|
// this.$router.go(0);
|
||||||
|
// window.location.reload();
|
||||||
|
}
|
||||||
|
this.infolist();
|
||||||
|
// this.handlelist();
|
||||||
|
this.openfalse();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 关闭弹框
|
||||||
|
openfalse() {
|
||||||
|
this.openlist.triggerConditionList = [
|
||||||
|
{
|
||||||
|
routeId: "",
|
||||||
|
routeName: "",
|
||||||
|
triggerConditionName: "",
|
||||||
|
triggerConditionOperator: "",
|
||||||
|
triggerConditionValue: "",
|
||||||
|
|
||||||
|
triggerConditionOperatorName: "",
|
||||||
|
dictDataType: "STRING",
|
||||||
|
|
||||||
|
triggerLogic: "AND",
|
||||||
|
triggerLogicName: "",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
this.open = false;
|
||||||
|
this.resetForm("openlist");
|
||||||
|
},
|
||||||
|
// 批量新增添加属性
|
||||||
|
addtriggerCondition() {
|
||||||
|
this.idd++;
|
||||||
|
var obj = {
|
||||||
|
routeId: "",
|
||||||
|
routeName: "",
|
||||||
|
triggerConditionName: "",
|
||||||
|
triggerConditionOperator: "",
|
||||||
|
triggerConditionValue: "",
|
||||||
|
|
||||||
|
triggerConditionOperatorName: "",
|
||||||
|
dictDataType: "STRING",
|
||||||
|
triggerLogic: "AND",
|
||||||
|
triggerLogicName: "",
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.openlist.triggerConditionList.length == 3) {
|
||||||
|
this.$message.error("至多仅支持两种属性");
|
||||||
|
} else {
|
||||||
|
this.openlist.triggerConditionList.push(obj);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 删除属性
|
||||||
|
delitemlistname(index, item) {
|
||||||
|
this.openlist.triggerConditionList.splice(index, 1);
|
||||||
|
},
|
||||||
|
//取消
|
||||||
|
handleClose() {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.routeform = {
|
||||||
|
routeCheckStatus: "",
|
||||||
|
routeCheckRemark: "",
|
||||||
|
};
|
||||||
|
this.resetForm("routeform");
|
||||||
|
},
|
||||||
|
//审核
|
||||||
|
auditing() {
|
||||||
|
this.$refs["routeform"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: "审核中",
|
||||||
|
spinner: "el-icon-loading",
|
||||||
|
background: "rgba(0, 0, 0, 0.7)",
|
||||||
|
});
|
||||||
|
if (!this.form.routeNodeDay) {
|
||||||
|
this.$message.error("请输入节点时间段天数");
|
||||||
|
return loading.close();
|
||||||
|
}
|
||||||
|
if (!this.form.routeNodeName) {
|
||||||
|
this.$message.error("请选择节点时间段");
|
||||||
|
return loading.close();
|
||||||
|
}
|
||||||
|
if (!this.form.taskType) {
|
||||||
|
this.$message.error("请选择任务类型");
|
||||||
|
return loading.close();
|
||||||
|
}
|
||||||
|
if (!this.form.taskSubdivision) {
|
||||||
|
this.$message.error("请选择任务细分");
|
||||||
|
return loading.close();
|
||||||
|
}
|
||||||
|
if (!this.form.taskStatus) {
|
||||||
|
this.$message.error("请选择任务状态");
|
||||||
|
return loading.close();
|
||||||
|
}
|
||||||
|
updateRouteCheckStatus({
|
||||||
|
routeCheckStatus: this.routeform.routeCheckStatus,
|
||||||
|
id: this.form.specialDiseaseNodeId,
|
||||||
|
routeCheckRemark: this.routeform.routeCheckRemark,
|
||||||
|
routeCheckPerson: JSON.parse(localStorage.getItem("user")).nickName,
|
||||||
|
}).then((res) => {
|
||||||
|
loading.close();
|
||||||
|
if (res.data == 1) {
|
||||||
|
this.info();
|
||||||
|
this.handleClose();
|
||||||
|
this.$modal.msgSuccess("审核成功!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 保存触发条件
|
||||||
|
addlistname() {
|
||||||
|
this.show3 = !this.show3;
|
||||||
|
},
|
||||||
|
// 适用范围
|
||||||
|
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,
|
||||||
|
text: "数据加载中",
|
||||||
|
spinner: "el-icon-loading",
|
||||||
|
background: "rgba(0, 0, 0, 0.7)",
|
||||||
|
});
|
||||||
|
this.lists = [];
|
||||||
|
if (this.$route.query) {
|
||||||
|
this.$set(this.updata, "suitRange", this.$route.query.suitRange);
|
||||||
|
this.parentDictCode = this.options.find(
|
||||||
|
(el) => el.dictValue == this.updata.suitRange
|
||||||
|
)?.dictCode;
|
||||||
|
setTimeout(() => {
|
||||||
|
this.changelisy();
|
||||||
|
}, 1000);
|
||||||
|
this.itemlist.specialDiseaseRouteId = this.$route.query.id;
|
||||||
|
this.itemlist.routeName = Cookies.get("routeName");
|
||||||
|
selectSpecialDisease(this.$route.query.id).then((res) => {
|
||||||
|
loading.close();
|
||||||
|
this.agreeNumber = res.data.agreeNumber;
|
||||||
|
this.totalNumber = res.data.totalNumber;
|
||||||
|
res.data.specialDiseaseNodeList.forEach((e) => {
|
||||||
|
if (e.messagePushSign) {
|
||||||
|
e.messagePushSign = "" + e.messagePushSign;
|
||||||
|
}
|
||||||
|
if (e.officialPushSign) {
|
||||||
|
e.officialPushSign = "" + e.officialPushSign;
|
||||||
|
}
|
||||||
|
if (e.appletPushSign) {
|
||||||
|
e.appletPushSign = "" + e.appletPushSign;
|
||||||
|
}
|
||||||
|
if (e.phonePushSign) {
|
||||||
|
e.phonePushSign = "" + e.phonePushSign;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.lists = this.handleData(
|
||||||
|
res.data.specialDiseaseNodeList,
|
||||||
|
"routeNodeDay",
|
||||||
|
"routeNodeName"
|
||||||
|
);
|
||||||
|
this.form = this.lists[0].list[0];
|
||||||
|
if (this.form.taskType) {
|
||||||
|
this.changeTaskType(this.form.taskType, this.form.taskSubdivision);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
loading.close();
|
||||||
|
this.lists.push({
|
||||||
|
routeNodeName: "",
|
||||||
|
routeNodeDay: "",
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
nodeContent: "<p></p>",
|
||||||
|
templateId: "",
|
||||||
|
templateName: "",
|
||||||
|
taskType: "",
|
||||||
|
taskSubdivision: "",
|
||||||
|
taskSubdivisionName: "",
|
||||||
|
taskStatus: "",
|
||||||
|
secondClassifyDescribe: "",
|
||||||
|
executionTime: "",
|
||||||
|
appletPushSign: "0",
|
||||||
|
officialPushSign: "0",
|
||||||
|
messagePushSign: "0",
|
||||||
|
messagePreview: "",
|
||||||
|
officialRemindContent: "",
|
||||||
|
taskSubdivisiontemplateType: "",
|
||||||
|
appletRemindContent: "",
|
||||||
|
appletPromptDescription: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
this.form = this.lists[0].list[0];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
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;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 且或
|
||||||
|
infolistoptionslistS() {
|
||||||
|
var dictType = "trigger_logic";
|
||||||
|
getAgencytype(dictType).then((res) => {
|
||||||
|
this.optionslistS = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 诊断
|
||||||
|
optiononditionOperators() {
|
||||||
|
var dictType = "trigger_condition_name";
|
||||||
|
getAgencytype(dictType).then((res) => {
|
||||||
|
this.optionsname = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 包含
|
||||||
|
optiononditionOperator() {
|
||||||
|
var dictType = "trigger_condition_operator";
|
||||||
|
getAgencytype(dictType).then((res) => {
|
||||||
|
this.optionstriggerConditionOperator = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 包含或等号接口
|
||||||
|
handlelist() {
|
||||||
|
var dictType = "trigger_condition_operator";
|
||||||
|
|
||||||
|
getList(dictType, this.dictDataType).then((res) => {
|
||||||
|
this.optionstriggerConditionOperator = res.data;
|
||||||
|
console.log(
|
||||||
|
this.optionstriggerConditionOperator,
|
||||||
|
" this.optionstriggerConditionOperator "
|
||||||
|
);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 包含
|
||||||
|
changetriggerLogic(e, index) {
|
||||||
|
this.openlist.triggerConditionList[index].triggerConditionOperatorName =
|
||||||
|
this.optionstriggerConditionOperator.find(
|
||||||
|
(el) => el.dictValue == e
|
||||||
|
).dictLabel;
|
||||||
|
this.openlist.triggerConditionList[index].triggerConditionValue = null;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 诊断
|
||||||
|
changetriggerConditionName(e, index) {
|
||||||
|
var dictType = e;
|
||||||
|
getAgencytype(dictType).then((res) => {
|
||||||
|
this.ConditionValue = res.data;
|
||||||
|
});
|
||||||
|
this.openlist.triggerConditionList[index].triggerConditionName =
|
||||||
|
this.optionsname.find((el) => el.dictValue == e).dictLabel;
|
||||||
|
this.openlist.triggerConditionList[index].triggerConditionOperator = null;
|
||||||
|
this.openlist.triggerConditionList[index].triggerConditionValue = null;
|
||||||
|
this.dictDataType = this.optionsname.find(
|
||||||
|
(el) => el.dictValue == e
|
||||||
|
).dictDataType;
|
||||||
|
this.openlist.triggerConditionList[index].dictDataType =
|
||||||
|
this.optionsname.find((el) => el.dictValue == e).dictDataType;
|
||||||
|
this.handlelist();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 且或
|
||||||
|
changetriggerLogicsname(e, index) {
|
||||||
|
this.openlist.triggerConditionList[index].triggerLogic = e;
|
||||||
|
this.openlist.triggerConditionList[index].triggerLogicName =
|
||||||
|
this.optionslistS.find((el) => el.dictValue == e).dictLabel;
|
||||||
|
},
|
||||||
|
// 适用范围
|
||||||
|
infolists() {
|
||||||
|
var dictType = "suit_range";
|
||||||
|
getAgencytype(dictType).then((res) => {
|
||||||
|
this.options = res.data;
|
||||||
|
});
|
||||||
|
this.infolist();
|
||||||
|
},
|
||||||
|
// 展示触发条件
|
||||||
|
infolist() {
|
||||||
|
this.routeId = this.$route.query.id;
|
||||||
|
triggerConditionList(this.routeId).then((res) => {
|
||||||
|
this.openlist.triggerConditionList = res.data;
|
||||||
|
res.data.forEach((p) => {
|
||||||
|
this.optiononditionOperators();
|
||||||
|
p.dictDataType = this.optionsname.find(
|
||||||
|
(el) => el.dictValue == p.triggerConditionCode
|
||||||
|
)?.dictDataType;
|
||||||
|
var dictType = p.triggerConditionCode;
|
||||||
|
getAgencytype(dictType).then((res) => {
|
||||||
|
this.ConditionValue = res.data;
|
||||||
|
});
|
||||||
|
// console.log(this.ConditionValue,'ConditionValueConditionValueConditionValueConditionValue')
|
||||||
|
|
||||||
|
// this.handlelist();
|
||||||
|
// var dictType = "trigger_condition_operator";
|
||||||
|
|
||||||
|
// getList(dictType, this.dictDataType).then((res) => {
|
||||||
|
// this.optionstriggerConditionOperator = res.data;
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
if (res.data.length == 1) {
|
||||||
|
// 回显一条时
|
||||||
|
this.updata = res.data[0];
|
||||||
|
// console.log(this.updata, " this.updata");
|
||||||
|
|
||||||
|
this.updata.triggerConditionOperatorName =
|
||||||
|
this.optionstriggerConditionOperator.find(
|
||||||
|
(el) => el.dictValue == this.updata.triggerConditionOperator
|
||||||
|
)?.dictLabel;
|
||||||
|
this.updatalist = [];
|
||||||
|
} else {
|
||||||
|
// 回显两条或者三条
|
||||||
|
this.updata = res.data[0];
|
||||||
|
this.updata.triggerConditionOperatorName =
|
||||||
|
this.optionstriggerConditionOperator.find(
|
||||||
|
(el) => el.dictValue == this.updata.triggerConditionOperator
|
||||||
|
)?.dictLabel;
|
||||||
|
// console.log(this.updata, " this.updata");
|
||||||
|
|
||||||
|
res.data.splice(0, 1);
|
||||||
|
this.updatalist = res.data;
|
||||||
|
// console.log(this.updatalist, " this.updatalist");
|
||||||
|
this.updatalist.forEach((e) => {
|
||||||
|
e.triggerConditionOperatorName =
|
||||||
|
this.optionstriggerConditionOperator.find(
|
||||||
|
(el) => el.dictValue == e.triggerConditionOperator
|
||||||
|
)?.dictLabel;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (this.open == true) {
|
||||||
|
this.$set(this.openlist, "suitRange", this.$route.query.suitRange);
|
||||||
|
} else {
|
||||||
|
this.$set(this.updata, "suitRange", this.openlist.suitRange);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 编辑接口
|
||||||
|
infolistname() {
|
||||||
|
this.routeId = this.$route.query.id;
|
||||||
|
triggerConditionList(this.routeId).then((res) => {
|
||||||
|
this.openlist.triggerConditionList = res.data;
|
||||||
|
this.openlist.triggerConditionList.forEach((o) => {
|
||||||
|
this.optiononditionOperators();
|
||||||
|
o.dictDataType = this.optionsname.find(
|
||||||
|
(el) => el.dictValue == o.triggerConditionCode
|
||||||
|
)?.dictDataType;
|
||||||
|
var dictType = o.triggerConditionCode;
|
||||||
|
getAgencytype(dictType).then((res) => {
|
||||||
|
this.ConditionValue = res.data;
|
||||||
|
});
|
||||||
|
// if (o.triggerConditionCode.includes("SEX")) {
|
||||||
|
// var dictType = "SEX";
|
||||||
|
// getAgencytype(dictType).then((res) => {
|
||||||
|
// this.ConditionValue = res.data;
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
this.$set(this.updata, "suitRange", this.openlist.suitRange);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 编辑
|
||||||
|
edit() {
|
||||||
|
this.open = true;
|
||||||
|
this.infolistname();
|
||||||
|
|
||||||
|
// this.openfalse();
|
||||||
|
},
|
||||||
|
//wangeditor传值
|
||||||
|
onNodeContent(item) {
|
||||||
|
this.form.nodeContent = item.nodeContent;
|
||||||
|
var abc = new RegExp("<br>", "g");
|
||||||
|
var bbb = this.form.nodeContent.replace(abc, "");
|
||||||
|
this.form.nodeContent = bbb;
|
||||||
|
},
|
||||||
|
//小程序传值
|
||||||
|
miniProgramtemplate(item) {
|
||||||
|
this.form.appletTemplateId = item.templateId;
|
||||||
|
this.form.appletTemplateName = item.templateName;
|
||||||
|
this.form.appletRemindContent = item.templateContent;
|
||||||
|
},
|
||||||
|
// 话术
|
||||||
|
messageontemplateword(item) {
|
||||||
|
this.form.phoneTemplateId = item.templateId;
|
||||||
|
this.form.phoneTemplateName = item.templateName;
|
||||||
|
console.log( this.form.phoneTemplateId,' this.form.phoneTemplateId')
|
||||||
|
|
||||||
|
// this.form.messagePreview = item.templateContent;
|
||||||
|
},
|
||||||
|
//短信传值
|
||||||
|
messageontemplate(item) {
|
||||||
|
this.form.messageTemplateId = item.templateId;
|
||||||
|
this.form.messageTemplateName = item.templateName;
|
||||||
|
this.form.messagePreview = item.templateContent;
|
||||||
|
},
|
||||||
|
// 短信
|
||||||
|
messageontemplateMESSAGE(item) {
|
||||||
|
this.form.phoneMessageTemplateId = item.templateId;
|
||||||
|
this.form.phoneMessageTemplateName = item.templateName;
|
||||||
|
this.form.messagePreview = item.templateContent;
|
||||||
|
},
|
||||||
|
//公众号传值
|
||||||
|
officialAccountontemplate(item) {
|
||||||
|
this.form.officialTemplateId = item.templateId;
|
||||||
|
this.form.officialTemplateName = item.templateName;
|
||||||
|
this.form.officialRemindContent = item.templateContent;
|
||||||
|
},
|
||||||
|
// 暂存
|
||||||
|
TemporaryStorage() {
|
||||||
|
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);
|
||||||
|
})
|
||||||
|
: "";
|
||||||
|
});
|
||||||
|
// this.updata.specialDiseaseNodeList =
|
||||||
|
// this.updata.specialDiseaseNodeList.filter(
|
||||||
|
// (e) =>
|
||||||
|
// !e.routeNodeDay &&
|
||||||
|
// !e.routeNodeName &&
|
||||||
|
// !e.taskType &&
|
||||||
|
// !e.taskSubdivision &&
|
||||||
|
// !e.taskStatus
|
||||||
|
// );
|
||||||
|
// if (this.routeName) {
|
||||||
|
// this.itemlist.routeName = this.routeName;
|
||||||
|
// } else {
|
||||||
|
// this.itemlist.routeName = this.$route.query.routeName;
|
||||||
|
// }
|
||||||
|
this.itemlist.routeName = Cookies.get("routeName");
|
||||||
|
specialDiseaseNode(this.itemlist).then((res) => {
|
||||||
|
this.info();
|
||||||
|
loading.close();
|
||||||
|
this.$modal.msgSuccess("暂存成功!");
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
loading.close();
|
||||||
|
}, 3000);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//问卷传值
|
||||||
|
questionontemplate(item) {
|
||||||
|
this.form.templateId = item.templateId;
|
||||||
|
this.form.templateName = item.templateName;
|
||||||
|
},
|
||||||
|
//宣教传值
|
||||||
|
propagandaontemplate(item) {
|
||||||
|
this.form.templateId = item.templateId;
|
||||||
|
this.form.templateName = item.templateName;
|
||||||
|
},
|
||||||
|
|
||||||
|
bottomclickevent(uitem, index, 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;
|
||||||
|
},
|
||||||
|
//任务类型 任务状态
|
||||||
|
taskinfo() {
|
||||||
|
selectTaskTypeList().then((res) => {
|
||||||
|
this.selectTaskTypeList = res.data;
|
||||||
|
this.info();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//任务类型
|
||||||
|
changeTaskType(code, taskSubdivision) {
|
||||||
|
let id = this.selectTaskTypeList?.find((e) => e.taskTypeCode == code)?.id;
|
||||||
|
this.form.taskTypeName = this.selectTaskTypeList?.find(
|
||||||
|
(e) => e.taskTypeCode == code
|
||||||
|
)?.taskTypeName;
|
||||||
|
taskPartitionList(id).then((res) => {
|
||||||
|
this.taskPartitionList = res.data;
|
||||||
|
this.form.taskSubdivision = "";
|
||||||
|
this.form.taskSubdivisionName = "";
|
||||||
|
this.form.taskSubdivisiontemplateType = "";
|
||||||
|
this.taskStatusDictList = [];
|
||||||
|
if (taskSubdivision) {
|
||||||
|
this.form.taskSubdivision = taskSubdivision;
|
||||||
|
this.changetaskSubdivision(taskSubdivision, 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//点击任务细分
|
||||||
|
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 (!type) {
|
||||||
|
this.form.templateId = "";
|
||||||
|
this.form.templateName = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 添加管理路径节点
|
||||||
|
addlist() {
|
||||||
|
list(this.parentDictCode).then((res) => {
|
||||||
|
// this.parentDictCodelist = res.rows;
|
||||||
|
res.rows.forEach((e) => {
|
||||||
|
this.lists.forEach((el) => {
|
||||||
|
el.routeNodeName = e.dictLabel;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.lists.push({
|
||||||
|
routeNodeName: "",
|
||||||
|
routeNodeDay: "",
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
nodeContent: "<p></p>",
|
||||||
|
templateId: "",
|
||||||
|
templateName: "",
|
||||||
|
taskType: "",
|
||||||
|
officialRemindContent: "",
|
||||||
|
taskSubdivision: "",
|
||||||
|
taskSubdivisionName: "",
|
||||||
|
appletRemindContent: "",
|
||||||
|
appletPromptDescription: "",
|
||||||
|
taskStatus: "",
|
||||||
|
secondClassifyDescribe: "",
|
||||||
|
executionTime: "",
|
||||||
|
appletPushSign: "0",
|
||||||
|
officialPushSign: "0",
|
||||||
|
messagePushSign: "0",
|
||||||
|
messagePreview: "",
|
||||||
|
taskSubdivisiontemplateType: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
// 添加节点
|
||||||
|
additem(item) {
|
||||||
|
item.list.push({
|
||||||
|
nodeContent: "<p></p>",
|
||||||
|
templateId: "",
|
||||||
|
templateName: "",
|
||||||
|
taskType: "",
|
||||||
|
officialRemindContent: "",
|
||||||
|
taskSubdivision: "",
|
||||||
|
taskSubdivisionName: "",
|
||||||
|
appletRemindContent: "",
|
||||||
|
appletPromptDescription: "",
|
||||||
|
taskStatus: "",
|
||||||
|
secondClassifyDescribe: "",
|
||||||
|
executionTime: "",
|
||||||
|
appletPushSign: "0",
|
||||||
|
officialPushSign: "0",
|
||||||
|
messagePushSign: "0",
|
||||||
|
messagePreview: "",
|
||||||
|
taskSubdivisiontemplateType: "",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除节点
|
||||||
|
delitemh(item, index) {
|
||||||
|
item.list.splice(this.itemindex, 1);
|
||||||
|
if (item.list.length == 0) {
|
||||||
|
this.lists.splice(index, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
// </script>
|
||||||
File diff suppressed because it is too large
Load Diff
@ -202,6 +202,7 @@ export default {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.app-container {
|
.app-container {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
|
|||||||
@ -45,7 +45,6 @@
|
|||||||
:value="item.dictValue"
|
:value="item.dictValue"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
|
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="item.routeNodeDay"
|
v-model="item.routeNodeDay"
|
||||||
@ -175,7 +174,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="bottomform">
|
<div class="bottomform">
|
||||||
<wangeditor
|
<wangeditor
|
||||||
style="width: 100%;"
|
style="width: 100%"
|
||||||
:nodeContent="form.nodeContent"
|
:nodeContent="form.nodeContent"
|
||||||
@on-nodeContent="onNodeContent"
|
@on-nodeContent="onNodeContent"
|
||||||
v-show="
|
v-show="
|
||||||
@ -299,15 +298,46 @@
|
|||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="pushMethod">
|
<div class="pushMethod">
|
||||||
推送方式:
|
推送方式:
|
||||||
<span> 人工电话 </span>
|
<span>
|
||||||
|
<el-radio-group v-model="form.sex">
|
||||||
|
<el-radio label="MALE">人工电话</el-radio>
|
||||||
|
<el-radio label="FEMALE">自动外呼</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="pushMethod">
|
<div class="pushMethod">
|
||||||
模板:
|
话术模板:
|
||||||
<scripts
|
<span class="spanname" v-if="form.templateId">
|
||||||
@on-template="messageontemplateword"
|
<scripts
|
||||||
:templateId="form.phoneTemplateId"
|
@on-template="messageontemplateword"
|
||||||
:templateName="form.phoneTemplateName"
|
:templateId="form.phoneTemplateId"
|
||||||
></scripts>
|
:templateName="form.phoneTemplateName"
|
||||||
|
></scripts>
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
<scripts
|
||||||
|
@on-template="messageontemplateword"
|
||||||
|
:templateId="form.phoneTemplateId"
|
||||||
|
:templateName="form.phoneTemplateName"
|
||||||
|
></scripts>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="pushMethod" v-if="form.sex == 'MALE' || !form.sex">
|
||||||
|
问卷模板:
|
||||||
|
<span class="spanname" v-if="form.phoneTemplateId">
|
||||||
|
<question
|
||||||
|
@on-template="questionontemplate"
|
||||||
|
:templateId="form.templateId"
|
||||||
|
:templateName="form.templateName"
|
||||||
|
></question>
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
<question
|
||||||
|
@on-template="questionontemplate"
|
||||||
|
:templateId="form.templateId"
|
||||||
|
:templateName="form.templateName"
|
||||||
|
></question>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="pushMethod">
|
<div class="pushMethod">
|
||||||
<el-switch
|
<el-switch
|
||||||
@ -1055,8 +1085,13 @@ export default {
|
|||||||
|
|
||||||
.card {
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
// width: 100%;
|
||||||
|
// height: 200px;
|
||||||
|
// margin: 20px 0 0;
|
||||||
|
// padding: 20px 50px 0px 20px;
|
||||||
|
// background-color: #fff;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 200px;
|
height: 130px;
|
||||||
margin: 20px 0 0;
|
margin: 20px 0 0;
|
||||||
padding: 20px 50px 0px 20px;
|
padding: 20px 50px 0px 20px;
|
||||||
|
|
||||||
@ -1064,7 +1099,7 @@ export default {
|
|||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
color: #64666a;
|
color: #64666a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1088,14 +1123,14 @@ export default {
|
|||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
color: black;
|
color: black;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__inner {
|
::v-deep .el-input__inner {
|
||||||
color: black;
|
color: black;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1110,20 +1145,20 @@ export default {
|
|||||||
.pushMethod {
|
.pushMethod {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
line-height: 30px;
|
line-height: 35px;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
color: #64666a;
|
color: #64666a;
|
||||||
.spanname {
|
.spanname {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
::v-deep .el-input__inner {
|
::v-deep .el-input__inner {
|
||||||
color: black;
|
color: black;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color: black;
|
color: black;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1141,11 +1176,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-form-item__label {
|
::v-deep .el-form-item__label {
|
||||||
font-size: 12px !important;
|
font-size: 13px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -1160,7 +1194,7 @@ export default {
|
|||||||
.select {
|
.select {
|
||||||
font-weight: 550;
|
font-weight: 550;
|
||||||
margin-left: 20%;
|
margin-left: 20%;
|
||||||
font-size: 12px;
|
font-size: 13px;
|
||||||
|
|
||||||
.el-input {
|
.el-input {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
@ -1200,7 +1234,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.texts {
|
.texts {
|
||||||
width: 72%;
|
width: 73%;
|
||||||
// height: 680px;
|
// height: 680px;
|
||||||
height: calc(100vh - 294px);
|
height: calc(100vh - 294px);
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user