postdischarge-ui/src/views/system/specialDiseaseNode/index.vue

1550 lines
50 KiB
Vue
Raw Normal View History

2024-03-25 09:45:10 +08:00
<template>
2024-06-13 16:52:34 +08:00
<div class="container">
2024-05-22 17:36:47 +08:00
<el-descriptions title="编辑主路径" />
<div class="title">
<el-tag>主路径</el-tag>
<div>
{{ updata.routeName }}
</div>
<div class="select">
<span> 适用范围 </span>
2024-09-14 15:30:38 +08:00
<el-select v-model="updata.suitRange" placeholder="请选择" @change="changeoptions" disabled>
<el-option v-for="item in options" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
2024-05-22 17:36:47 +08:00
</el-option>
</el-select>
</div>
</div>
<div class="list">
<div class="timelist">
<div class="timetitle">
管理路径节点({{ lists.length }})
<i class="el-icon-circle-plus-outline" @click="addlist"></i>
</div>
<el-timeline>
2024-09-14 15:30:38 +08:00
<el-timeline-item v-for="(item, index) in lists" :key="index" :color="listindex == index ? '#409EFF' : ''">
2024-05-22 17:36:47 +08:00
<div class="top">
<div class="toptop">
2024-07-09 15:31:13 +08:00
<el-select v-model="item.routeNodeName" style="width: 100px">
2024-09-14 15:30:38 +08:00
<el-option v-for="item in parentDictCodelist" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
2024-05-22 17:36:47 +08:00
</el-option>
</el-select>
2024-09-14 15:30:38 +08:00
<el-input v-model="item.routeNodeDay" type="number" style="width: 70px" :min="0"></el-input>
2024-05-22 17:36:47 +08:00
<span></span>
</div>
<div>
<i class="el-icon-delete" @click="delitem(item, index)"></i>
2024-09-14 15:30:38 +08:00
<i class="el-icon-circle-plus-outline" @click="additem(item)"></i>
2024-05-22 17:36:47 +08:00
</div>
2024-03-26 14:49:50 +08:00
</div>
2024-09-14 15:30:38 +08:00
<el-card v-for="(uitem, uindex) in item.list" :key="uitem.id"
2024-07-04 10:08:31 +08:00
@click.native="bottomclickevent(uitem, index, uindex, item)"
2024-09-14 15:30:38 +08:00
:class="listindex == index && itemindex == uindex ? 'cards' : ''">
2024-05-22 17:36:47 +08:00
<h3 style="height: 20px">{{ uitem.taskTypeName }}</h3>
2024-09-14 15:30:38 +08:00
<el-tag v-if="uitem.routeCheckStatus == 'AGREE'" class="routeCheckStatus">已审核</el-tag>
<el-tag v-else-if="uitem.routeCheckStatus == 'DISAGREE'" type="danger"
class="routeCheckStatus">不同意</el-tag>
<el-tag v-else type="warning" class="routeCheckStatus">未审核</el-tag>
2024-05-22 17:36:47 +08:00
<p style="height: 16px">{{ uitem.taskSubdivisionName }}</p>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
<div class="texts">
<div class="topform">
<el-form ref="form" :inline="true" :model="form" class="form">
<el-form-item label="任务类型" prop="">
2024-09-14 15:30:38 +08:00
<el-select v-model="form.taskType" style="width: 150px" @change="changeTaskType">
<el-option v-for="item in selectTaskTypeList" :key="item.taskTypeCode" :label="item.taskTypeName"
:value="item.taskTypeCode">
2024-05-22 17:36:47 +08:00
</el-option>
</el-select>
</el-form-item>
<el-form-item label="任务细分" prop="">
2024-09-14 15:30:38 +08:00
<el-select v-model="form.taskSubdivision" style="width: 150px" @change="changetaskSubdivision">
<el-option v-for="item in taskPartitionList" :key="item.taskPartitionCode"
:label="item.taskPartitionName" :value="item.taskPartitionCode">
2024-05-22 17:36:47 +08:00
</el-option>
</el-select>
</el-form-item>
2024-07-11 17:26:40 +08:00
<el-form-item label="任务节点类型" prop="">
<el-select v-model="form.taskNodeType" style="width: 150px">
2024-09-14 15:30:38 +08:00
<el-option v-for="item in taskNodeTypeList" :key="item.id" :label="item.name" :value="item.code">
2024-07-11 17:26:40 +08:00
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="任务状态" prop="">
2024-07-04 11:14:38 +08:00
<el-select v-model="form.taskStatus" style="width: 150px">
2024-07-09 15:31:13 +08:00
<el-option v-for="item in taskStatusDictList" :key="item.id" :label="item.taskStatusName"
:value="item.taskStatusCode">
2024-05-22 17:36:47 +08:00
</el-option>
</el-select>
2024-07-11 17:26:40 +08:00
</el-form-item> -->
2024-05-22 17:36:47 +08:00
<el-form-item label="二级分类描述" prop="">
2024-09-14 15:30:38 +08:00
<el-input v-model="form.secondClassifyDescribe" style="width: 110px" disabled></el-input>
2024-05-22 17:36:47 +08:00
</el-form-item>
<el-form-item label="执行时间" prop="">
2024-09-14 15:30:38 +08:00
<el-time-select v-model="form.executionTime" style="width: 120px" placeholder="选择时间" disabled>
2024-05-22 17:36:47 +08:00
</el-time-select>
</el-form-item>
2024-09-14 15:30:38 +08:00
<el-form-item label="问卷库模板选择" prop="" v-if="form.taskNodeType == 'QUESTIONNAIRE_SCALE'">
<question @on-template="questionontemplate" :templateId="form.templateId" :node="form.phoneDialMethod"
:templateName="form.templateName"></question>
2024-05-22 17:36:47 +08:00
</el-form-item>
2024-09-14 15:30:38 +08:00
<span style="display: inline-block; width: 10px"
v-if="form.taskNodeType == 'QUESTIONNAIRE_SCALE' && form.templateId">
2024-07-11 17:02:21 +08:00
<el-button @click.native="looklist">预览</el-button>
2024-07-04 10:32:25 +08:00
</span>
2024-09-14 15:30:38 +08:00
<el-form-item label="开启人工随访" v-if="form.taskNodeType == 'QUESTIONNAIRE_SCALE'" style="margin-left: 75px">
<el-switch v-model="form.phoneDialMethod" active-color="#13ce66" active-value="COMMON"
2024-09-14 15:40:58 +08:00
@change="changephoneDialMethodtwo" inactive-value="AI">
2024-07-11 15:20:13 +08:00
</el-switch>
</el-form-item>
2024-09-14 15:30:38 +08:00
<el-form-item label="宣教库模板选择" prop="" v-if="form.taskNodeType == 'PROPAGANDA_ARTICLE'">
<propaganda @on-template="propagandaontemplate" :templateId="form.templateId"
:templateName="form.templateName"></propaganda>
2024-05-22 17:36:47 +08:00
</el-form-item>
2024-09-14 15:30:38 +08:00
<span style="display: inline-block; width: 10px" v-if="
form.taskNodeType == 'PROPAGANDA_ARTICLE' && form.templateId
">
2024-07-04 11:14:38 +08:00
<el-button @click="imagepreviews">预览</el-button>
</span>
2024-05-22 17:36:47 +08:00
</el-form>
</div>
2024-07-03 18:27:35 +08:00
<!-- 宣教 -->
2024-09-14 15:30:38 +08:00
<el-dialog title="宣教预览" :visible.sync="imageScriptpreviews" width="60%">
<div class="imageScriptpreviews" v-if="
formview &&
form.taskNodeType == 'PROPAGANDA_ARTICLE' &&
form.templateId
">
2024-07-08 15:28:48 +08:00
<div class="titletop">文章模板:{{ formview.propagandaTitle }}</div>
2024-07-04 11:14:38 +08:00
<div class="bodytop">
<div class="titledata">{{ formview.propagandaTitle }}</div>
<div>
<img :src="baseUrl + formview.propagandaCoverPath" alt="" />
<div class="know">知识卡片</div>
<div class="knowlist">
2024-09-14 15:30:38 +08:00
<Editorxj v-model="formview.propagandaContent" :min-height="192" />
2024-07-04 11:14:38 +08:00
</div>
2024-07-03 18:27:35 +08:00
</div>
</div>
</div>
2024-07-04 11:14:38 +08:00
<span slot="footer" class="dialog-footer">
2024-09-14 15:30:38 +08:00
<el-button type="primary" @click="imageScriptpreviews = false">关闭</el-button>
2024-07-04 10:50:08 +08:00
</span>
</el-dialog>
2024-07-03 18:27:35 +08:00
<!-- 问卷 -->
2024-09-14 15:30:38 +08:00
<el-dialog title="问卷预览" :visible.sync="lookquestionlist" width="40%">
2024-07-03 18:27:35 +08:00
<questionopennew :lookitemnew="lookitemnew"></questionopennew>
2024-07-04 10:32:25 +08:00
<span slot="footer" class="dialog-footer">
2024-09-14 15:30:38 +08:00
<el-button type="primary" @click="lookquestionlist = false">关闭</el-button>
2024-07-04 10:32:25 +08:00
</span>
</el-dialog>
2024-05-22 17:36:47 +08:00
<div class="bottomform">
2024-09-14 15:30:38 +08:00
<wangeditor v-show="form.taskNodeType != 'QUESTIONNAIRE_SCALE' &&
form.taskNodeType != 'PROPAGANDA_ARTICLE' &&
form.taskNodeType != 'PHONE_OUTBOUND'
" style="width: 100%" :nodeContent="form.nodeContent" :taskPartitionDictId="taskPartitionDictId"
:taskSubdivision="form.taskSubdivision" :specialDiseaseNodeId="form.specialDiseaseNodeId"
@on-nodeContent="onNodeContent" ref="wangeditor" />
2024-07-09 15:31:13 +08:00
2024-07-11 15:20:13 +08:00
<div class="card" v-show="form.taskNodeType != 'PHONE_OUTBOUND'">
2024-05-22 17:36:47 +08:00
<div class="flex">
<div class="pushMethod">
推送方式
<span> 短信 </span>
</div>
<div class="pushMethod">
模板
2024-09-14 15:30:38 +08:00
<message @on-template="messageontemplate" :templateId="form.messageTemplateId"
:templateName="form.messageTemplateName"></message>
2024-05-22 17:36:47 +08:00
</div>
<div class="pushMethod">
2024-09-14 15:30:38 +08:00
<el-switch v-model="form.messagePushSign" active-color="#13ce66" active-value="1" inactive-value="0">
2024-05-22 17:36:47 +08:00
</el-switch>
</div>
</div>
2024-05-30 10:56:10 +08:00
<!-- <div class="flextwo">
2024-05-22 17:36:47 +08:00
<div class="text">短信预览</div>
2024-05-24 11:03:49 +08:00
<el-input class="textarea" v-model="form.messagePreview" disabled></el-input>
2024-05-30 10:56:10 +08:00
</div> -->
2024-05-22 17:36:47 +08:00
</div>
2024-07-11 15:20:13 +08:00
<div class="card" v-show="form.taskNodeType != 'PHONE_OUTBOUND'">
2024-05-22 17:36:47 +08:00
<div class="flex">
<div class="pushMethod">
推送方式
<span> 公众号 </span>
</div>
<div class="pushMethod">
模板
2024-03-26 16:04:26 +08:00
<span>
2024-09-14 15:30:38 +08:00
<officialAccount @on-template="officialAccountontemplate" :templateId="form.officialTemplateId"
:templateName="form.officialTemplateName">
2024-05-22 17:36:47 +08:00
</officialAccount>
2024-03-26 16:04:26 +08:00
</span>
2024-05-22 17:36:47 +08:00
</div>
<div class="pushMethod">
2024-09-14 15:30:38 +08:00
<el-switch v-model="form.officialPushSign" active-color="#13ce66" active-value="1" inactive-value="0">
2024-05-22 17:36:47 +08:00
</el-switch>
</div>
2024-03-26 16:04:26 +08:00
</div>
2024-05-30 10:56:10 +08:00
<!-- <div class="flextwo">
2024-05-22 17:36:47 +08:00
<div class="text">提醒内容</div>
2024-05-24 11:03:49 +08:00
<el-input v-model="form.officialRemindContent" class="textarea" disabled></el-input>
2024-05-30 10:56:10 +08:00
</div> -->
2024-05-22 17:36:47 +08:00
</div>
2024-07-11 15:20:13 +08:00
<div class="card" v-show="form.taskNodeType != 'PHONE_OUTBOUND'">
2024-05-22 17:36:47 +08:00
<div class="flex">
<div class="pushMethod">
推送方式
<span> 小程序 </span>
</div>
<div class="pushMethod">
模板
<span>
2024-09-14 15:30:38 +08:00
<miniProgram @on-template="miniProgramtemplate" :templateId="form.appletTemplateId"
:templateName="form.appletTemplateName">
2024-05-22 17:36:47 +08:00
</miniProgram>
</span>
</div>
<div class="pushMethod">
2024-09-14 15:30:38 +08:00
<el-switch v-model="form.appletPushSign" active-color="#13ce66" active-value="1" inactive-value="0">
2024-05-22 17:36:47 +08:00
</el-switch>
</div>
</div>
2024-05-30 10:56:10 +08:00
<!-- <div class="flextwo">
2024-05-22 17:36:47 +08:00
<div class="text">提醒内容</div>
2024-05-24 11:03:49 +08:00
<el-input v-model="form.appletRemindContent" class="textarea" disabled></el-input>
2024-05-22 17:36:47 +08:00
</div>
<div class="flextwo">
<div class="text">提示说明</div>
2024-05-24 11:03:49 +08:00
<el-input v-model="form.appletPromptDescription" class="textarea" disabled></el-input>
2024-05-30 10:56:10 +08:00
</div> -->
2024-05-22 17:36:47 +08:00
</div>
2024-09-14 15:30:38 +08:00
<div class="card" style="margin-top: -30px" v-show="form.taskNodeType == 'PHONE_OUTBOUND'">
2024-06-14 15:43:32 +08:00
<div class="flex">
<div class="pushMethod">
推送方式
2024-06-25 16:58:50 +08:00
<span>
2024-09-14 15:30:38 +08:00
<el-radio-group v-model="form.phoneDialMethod" @change="changephoneDialMethod">
2024-07-03 18:27:35 +08:00
<el-radio label="COMMON">人工电话</el-radio>
<el-radio label="AI">自动外呼</el-radio>
2024-06-25 16:58:50 +08:00
</el-radio-group>
</span>
2024-06-14 15:43:32 +08:00
</div>
2024-07-04 10:32:25 +08:00
</div>
2024-07-04 11:14:38 +08:00
<div class="flexs">
<div class="pushMethods">
2024-06-25 16:58:50 +08:00
话术模板
2024-09-14 15:30:38 +08:00
<span :class="form.templateId && form.phoneDialMethod == 'COMMON' ? 'spanname' : ''">
<scripts @on-template="messageontemplateword" :templateId="form.phoneTemplateId"
:node="form.phoneDialMethod" :templateName="form.phoneTemplateName"></scripts>
2024-06-25 16:58:50 +08:00
</span>
2024-09-14 15:30:38 +08:00
<span style="display: inline-block; width: 10px" v-if="form.phoneTemplateId">
2024-07-04 10:32:25 +08:00
<el-button @click="look">预览</el-button>
</span>
<!-- <br/> -->
2024-06-25 16:58:50 +08:00
</div>
2024-07-11 15:20:13 +08:00
<!-- <div class="pushMethod" v-if="form.phoneDialMethod == 'COMMON' || !form.phoneDialMethod">
2024-06-25 16:58:50 +08:00
问卷模板
2024-07-11 15:20:13 +08:00
<span :class="form.phoneTemplateId ? 'spanname' : ''">
2024-07-09 15:31:13 +08:00
<question @on-template="questionontemplate" :templateId="form.templateId"
:templateName="form.templateName"></question>
2024-06-25 16:58:50 +08:00
</span>
2024-07-09 15:31:13 +08:00
<span style="display: inline-block; width: 10px" v-if="form.templateId">
2024-07-04 10:50:08 +08:00
<el-button @click="lookquestion">预览</el-button>
</span>
2024-07-11 15:20:13 +08:00
</div> -->
2024-07-03 18:27:35 +08:00
<!-- <div class="pushMethod">
2024-07-01 10:21:01 +08:00
<el-switch
v-model="form.phonePushSign"
active-color="#13ce66"
active-value="1"
inactive-value="0"
>
2024-06-14 15:43:32 +08:00
</el-switch>
2024-07-03 18:27:35 +08:00
</div> -->
2024-06-14 15:43:32 +08:00
</div>
<div class="flex">
<div class="pushMethod">
2024-08-05 09:21:53 +08:00
重拨次数
2024-06-14 15:43:32 +08:00
<span>
2024-09-14 15:30:38 +08:00
<el-select v-model="form.phoneRedialTimes" style="width: 110px" @change="changephoneRedialTimes">
<el-option v-for="item in optionslistS" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
2024-06-14 15:43:32 +08:00
</el-option>
</el-select>
</span>
</div>
<div class="pushMethod">
2024-07-11 15:20:13 +08:00
时间间隔()
2024-06-14 15:43:32 +08:00
<span>
2024-09-14 15:30:38 +08:00
<el-input v-model.number="form.phoneTimeInterval" oninput="value=value.replace(/[^\d]/g,'')"
style="width: 100px">
2024-06-14 15:43:32 +08:00
<!-- <el-option
v-for="item in optionslistS"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
</el-option> -->
</el-input>
</span>
</div>
<div class="pushMethod">
短信提醒
2024-09-14 15:30:38 +08:00
<el-select v-model="form.phoneMessageRemind" style="width: 150px">
<el-option v-for="item in optionslist" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
2024-06-14 15:43:32 +08:00
</el-option>
</el-select>
</div>
<div class="pushMethod">
短信模板
2024-09-14 15:30:38 +08:00
<span :class="form.phoneMessageRemind == 'NOT_SEND_MESSAGE'
? 'spanname'
: ''
">
<message style="width: 200px" @on-template="messageontemplateMESSAGE"
:templateId="form.phoneMessageTemplateId" :templateName="form.phoneMessageTemplateName"></message>
2024-06-14 15:43:32 +08:00
</span>
</div>
</div>
2024-07-03 18:27:35 +08:00
<!-- 话术模板内容 -->
2024-09-14 15:30:38 +08:00
<el-dialog title="话术预览" :visible.sync="lookNodeContent" width="90%">
<Scriptpreview :phoneNodeContent="phoneNodeContent"></Scriptpreview>
2024-07-04 10:32:25 +08:00
<span slot="footer" class="dialog-footer">
2024-09-14 15:30:38 +08:00
<el-button type="primary" @click="lookNodeContent = false">关闭</el-button>
2024-07-04 10:32:25 +08:00
</span>
</el-dialog>
2024-07-03 18:27:35 +08:00
<!-- 问卷模板内容 -->
2024-09-14 15:30:38 +08:00
<el-dialog title="问卷预览" :visible.sync="lookquestionname" width="40%">
2024-07-03 18:27:35 +08:00
<questionopennew :lookitemnew="lookitemnew"></questionopennew>
2024-07-04 10:32:25 +08:00
<span slot="footer" class="dialog-footer">
2024-09-14 15:30:38 +08:00
<el-button type="primary" @click="lookquestionname = false">关闭</el-button>
2024-07-04 10:32:25 +08:00
</span>
</el-dialog>
2024-06-14 15:43:32 +08:00
</div>
2024-04-02 16:59:44 +08:00
</div>
2024-05-22 17:36:47 +08:00
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="TemporaryStorage"> </el-button>
2024-09-14 15:30:38 +08:00
<el-button type="primary" @click="dialogVisible = true" v-if="form.specialDiseaseNodeId">审核完成 {{ agreeNumber ?
agreeNumber : "0" }} /
{{ totalNumber ? totalNumber : "0" }}</el-button>
2024-03-25 09:45:10 +08:00
</div>
2024-09-14 15:30:38 +08:00
<el-dialog title="提交审核完成" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
<el-form ref="routeform" :model="routeform" label-width="120px" :rules="rules">
2024-05-22 17:36:47 +08:00
<el-form-item label="节点审核状态" prop="routeCheckStatus">
2024-09-14 15:30:38 +08:00
<el-radio v-model="routeform.routeCheckStatus" label="AGREE">同意</el-radio>
<el-radio v-model="routeform.routeCheckStatus" label="DISAGREE">不同意</el-radio>
2024-05-22 17:36:47 +08:00
</el-form-item>
2024-07-15 15:30:13 +08:00
<div class="txxt">
2024-07-17 11:48:51 +08:00
<el-form-item label="节点审核备注">
2024-09-14 15:30:38 +08:00
<el-input type="textarea" :rows="2" placeholder="请输入节点审核备注" v-model="routeform.routeCheckRemark">
2024-07-17 11:48:51 +08:00
</el-input>
</el-form-item>
</div>
2024-05-22 17:36:47 +08:00
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="auditing"> </el-button>
<el-button @click="handleClose"> </el-button>
</div>
</el-dialog>
</div>
2024-03-25 09:45:10 +08:00
</template>
<script>
2024-07-03 18:27:35 +08:00
import questionopennew from "../components/questionopennew.vue";
import Editorxj from "../Editorxj/index.vue";
import Scriptpreview from ".././components/Scriptpreviewopen.vue";
import { questionname } from "@/api/system/taskExecuteRecord";
import { getPropaganda } from "@/api/manage/propaganda";
2024-05-22 17:36:47 +08:00
import wangeditor from "../components/wangEditor.vue";
import question from "../components/question.vue";
import message from "../components/message.vue";
2024-06-14 15:43:32 +08:00
import scripts from "../components/script.vue";
2024-05-22 17:36:47 +08:00
import propaganda from "../components/propaganda.vue";
import officialAccount from "../components/officialAccount.vue";
import miniProgram from "../components/miniProgram.vue";
2024-03-27 15:57:52 +08:00
import {
2024-05-22 17:36:47 +08:00
selectTaskTypeList,
taskPartitionList,
taskStatusDictList,
specialDiseaseNode,
selectSpecialDisease,
updateRouteCheckStatus,
list,
} from "@/api/system/specialDiseaseNode";
import { getAgencytype } from "@/api/system/agency";
2024-03-25 09:45:10 +08:00
export default {
2024-05-22 17:36:47 +08:00
components: {
wangeditor,
question,
propaganda,
message,
2024-06-14 15:43:32 +08:00
scripts,
2024-05-22 17:36:47 +08:00
officialAccount,
miniProgram,
2024-07-03 18:27:35 +08:00
Scriptpreview,
questionopennew,
Editorxj,
2024-05-22 17:36:47 +08:00
},
2024-07-04 15:53:51 +08:00
name: "SpecialDiseaseNode",
2024-05-22 17:36:47 +08:00
data() {
return {
2024-07-03 18:27:35 +08:00
formview: {},
2024-07-04 10:32:25 +08:00
lookquestionname: false,
lookquestionlist: false,
lookNodeContent: false,
2024-07-04 11:14:38 +08:00
imageScriptpreviews: false,
2024-07-03 18:27:35 +08:00
lookitemnew: {},
baseUrl: process.env.VUE_APP_BASE_API,
showquestion: false,
phoneNodeContent: "",
2024-06-14 15:43:32 +08:00
optionslist: [],
optionslistS: [],
value: "",
2024-05-22 17:36:47 +08:00
options: [],
dialogVisible: false,
routeform: {
routeCheckStatus: null,
routeCheckRemark: "",
},
rules: {
routeCheckStatus: [
{ required: true, message: "请选择节点审核状态", trigger: "change" },
],
},
totalNumber: 0,
agreeNumber: 0,
updata: {
specialDiseaseRouteId: "",
suitRange: "",
routeName: "",
specialDiseaseNodeList: [],
},
form: {
nodeContent: "<p></p>",
templateId: "",
templateName: "",
taskType: "",
taskSubdivision: "",
taskSubdivisionName: "",
taskStatus: "",
secondClassifyDescribe: "",
executionTime: "",
appletPushSign: "0",
officialPushSign: "0",
2024-06-17 11:40:39 +08:00
messagePushSign: 0,
2024-07-11 15:20:13 +08:00
taskNodeType: "",
2024-05-22 17:36:47 +08:00
officialRemindContent: "",
messagePreview: "",
appletRemindContent: "",
appletPromptDescription: "",
2024-08-12 14:11:17 +08:00
taskNodeType: "",
phoneDialMethod: "",
phoneMessageRemind: "",
phoneTimeInterval: "",
2024-08-05 10:42:36 +08:00
phoneRedialTimes: "",
2024-05-22 17:36:47 +08:00
},
itemindex: 0,
listindex: 0,
lists: [],
value: "",
input: "",
//任务类型
selectTaskTypeList: [],
//任务状态
taskStatusDictList: [],
//任务细分
taskPartitionList: [],
parentDictCode: "",
parentDictCodelist: [],
2024-07-08 15:28:48 +08:00
taskPartitionDictId: "",
2024-07-11 17:26:40 +08:00
taskNodeTypeList: [
{
2024-08-12 14:11:17 +08:00
name: "电话外呼",
code: "PHONE_OUTBOUND",
2024-07-11 17:26:40 +08:00
},
{
2024-08-12 14:11:17 +08:00
name: "问卷量表",
code: "QUESTIONNAIRE_SCALE",
2024-07-11 17:26:40 +08:00
},
{
2024-08-12 14:11:17 +08:00
name: "宣教文案",
code: "PROPAGANDA_ARTICLE",
2024-07-11 17:26:40 +08:00
},
{
2024-08-12 14:11:17 +08:00
name: "文字提醒",
code: "TEXT_REMIND",
},
2024-07-11 17:26:40 +08:00
],
2024-05-22 17:36:47 +08:00
};
},
created() {
this.infolist();
2024-06-14 15:43:32 +08:00
this.infolistword();
this.infolistMESSAGE();
2024-05-22 17:36:47 +08:00
},
2024-07-05 16:09:12 +08:00
beforeDestroy() {
2024-07-08 15:28:48 +08:00
localStorage.removeItem("wangeditorlist");
2024-07-05 16:09:12 +08:00
},
2024-06-17 09:34:35 +08:00
watch: {
"form.phoneMessageRemind": {
handler(newValue, oldValue) {
if (newValue == "NOT_SEND_MESSAGE") {
this.form.phoneMessageTemplateId = "";
this.form.phoneMessageTemplateName = "";
}
},
deep: true,
2024-06-14 15:43:32 +08:00
},
2024-06-17 09:34:35 +08:00
"form.phoneTemplateId": {
handler(newValue, oldValue) {
// if (newValue == "NOT_SEND_MESSAGE") {
2024-06-18 10:06:05 +08:00
this.form.phoneTemplateId = newValue;
// this.form.phoneMessageTemplateName = "";
2024-06-17 09:34:35 +08:00
// }
},
deep: true,
// phoneTemplateId
2024-06-14 15:43:32 +08:00
},
2024-06-17 09:34:35 +08:00
},
2024-09-14 15:30:38 +08:00
mounted() { },
2024-06-17 09:34:35 +08:00
methods: {
2024-12-20 15:03:29 +08:00
//重拨次数
2024-08-05 10:42:36 +08:00
changephoneRedialTimes(e) {
2024-08-12 14:11:17 +08:00
if (
2024-12-20 15:03:29 +08:00
this.optionslistS.find((el) => el.dictValue == e)?.dictLabel != "不重拨"
2024-08-12 14:11:17 +08:00
) {
this.form.phoneTimeInterval = 30;
} else {
this.form.phoneTimeInterval = "";
2024-08-05 10:42:36 +08:00
}
},
2024-07-04 10:32:25 +08:00
// 问卷库模板选择
looklist() {
this.lookquestionlist = true;
},
// 预览问卷
lookquestion() {
this.lookquestionname = true;
2024-07-04 10:50:08 +08:00
},
2024-07-04 11:14:38 +08:00
// 宣教预览
imagepreviews() {
this.imageScriptpreviews = true;
2024-07-04 10:32:25 +08:00
},
// 预览话术图
look() {
this.lookNodeContent = true;
},
2024-09-14 15:40:58 +08:00
changephoneDialMethodtwo() {
2024-09-14 15:30:38 +08:00
this.form.templateId = "";
this.form.templateName = "";
this.form.phoneTemplateId = "";
this.form.phoneTemplateName = "";
this.lookitemnew = "";
},
2024-09-14 15:40:58 +08:00
// 切换人工和自动
changephoneDialMethod(e) {
if (e == "AI") {
// this.form.templateId=''
// 清空问卷id和名字
this.form.phoneTemplateId = "";
this.form.phoneTemplateName = "";
// 清空话术和问卷
// this.phoneNodeContent = "";
this.lookitemnew = "";
} else if (e == "COMMON") {
// 清空问卷id话术id和对应名字
this.form.templateId = "";
this.form.templateName = "";
this.form.phoneTemplateId = "";
this.form.phoneTemplateName = "";
// 清空话术和问卷
// this.phoneNodeContent = "";
this.lookitemnew = "";
}
},
2024-06-14 15:43:32 +08:00
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.optionslistS = res.data;
// this.taskinfo();
});
},
2024-05-22 17:36:47 +08:00
changeoptions(e) {
this.parentDictCode = this.options.find(
(el) => el.dictValue == e
2024-05-30 11:41:50 +08:00
)?.dictCode;
2024-05-22 17:36:47 +08:00
this.changelisy();
},
changelisy() {
list(this.parentDictCode).then((res) => {
this.parentDictCodelist = res.rows;
});
},
infolist() {
var dictType = "suit_range";
getAgencytype(dictType).then((res) => {
this.options = res.data;
2024-05-30 11:41:50 +08:00
this.taskinfo();
2024-05-22 17:36:47 +08:00
});
},
2024-07-08 14:19:28 +08:00
// 回显
2024-05-22 17:36:47 +08:00
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.updata.suitRange = this.$route.query.suitRange;
this.parentDictCode = this.options.find(
(el) => el.dictValue == this.updata.suitRange
2024-05-30 11:39:43 +08:00
)?.dictCode;
2024-08-12 14:11:17 +08:00
list(this.parentDictCode).then((res) => {
this.parentDictCodelist = res.rows;
res.rows.forEach((e) => {
this.lists.forEach((el) => {
el.routeNodeName = e.dictValue;
});
});
});
2024-05-22 17:36:47 +08:00
this.updata.routeName = this.$route.query.routeName;
this.updata.specialDiseaseRouteId = this.$route.query.id;
selectSpecialDisease(this.$route.query.id).then((res) => {
this.agreeNumber = res.data.agreeNumber;
this.totalNumber = res.data.totalNumber;
res.data.specialDiseaseNodeList.forEach((e) => {
2024-07-11 17:26:40 +08:00
// if (e.taskNodeType == 'PHONE_OUTBOUND') {
// e.taskSubdivisionName = e.taskSubdivisionName + '(电话外呼)'
// } else if (e.taskNodeType == 'QUESTIONNAIRE_SCALE') {
// e.taskSubdivisionName = e.taskSubdivisionName + '(问卷量表)'
// } else if (e.taskNodeType == 'PROPAGANDA_ARTICLE') {
// e.taskSubdivisionName = e.taskSubdivisionName + '(宣教文案)'
// } else if (e.taskNodeType == 'TEXT_REMIND') {
// e.taskSubdivisionName = e.taskSubdivisionName + '(文字提醒)'
// }
2024-07-17 15:09:44 +08:00
if (e.taskNodeType == "PHONE_OUTBOUND") {
2024-07-03 18:27:35 +08:00
this.phoneNodeContent = e.flowScheme;
}
2024-06-18 10:06:05 +08:00
if (e.messagePushSign) {
2024-06-17 11:40:39 +08:00
e.messagePushSign = "" + e.messagePushSign;
2024-06-18 10:06:05 +08:00
}
if (e.officialPushSign) {
2024-06-17 11:40:39 +08:00
e.officialPushSign = "" + e.officialPushSign;
}
2024-06-18 10:06:05 +08:00
if (e.appletPushSign) {
e.appletPushSign = "" + e.appletPushSign;
2024-06-17 11:40:39 +08:00
}
2024-06-18 10:06:05 +08:00
if (e.phonePushSign) {
e.phonePushSign = "" + e.phonePushSign;
2024-06-17 11:40:39 +08:00
}
2024-05-22 17:36:47 +08:00
});
this.lists = this.handleData(
res.data.specialDiseaseNodeList,
"routeNodeDay",
"routeNodeName"
);
this.form = this.lists[0].list[0];
2024-07-03 18:27:35 +08:00
// 宣教模板回显
2024-11-06 08:41:26 +08:00
if (this.form.taskNodeType == "PROPAGANDA_ARTICLE" && this.form.templateId) {
2024-07-03 18:27:35 +08:00
getPropaganda(this.form.templateId).then((response) => {
this.formview = response.data;
});
2024-11-06 08:41:26 +08:00
} else if (this.form.templateId && this.form.taskNodeType == "QUESTIONNAIRE_SCALE") {
2024-07-08 15:28:48 +08:00
// 问卷模板回显
questionname(this.form.templateId).then((res) => {
this.lookitemnew = res.data;
});
}
2024-05-22 17:36:47 +08:00
if (this.form.taskType) {
this.changeTaskType(this.form.taskType, this.form.taskSubdivision);
}
});
loading.close();
2024-07-11 15:20:13 +08:00
} else {
2024-05-22 17:36:47 +08:00
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: "",
2024-07-11 15:20:13 +08:00
taskNodeType: "",
2024-05-22 17:36:47 +08:00
appletRemindContent: "",
appletPromptDescription: "",
2024-08-12 14:11:17 +08:00
taskNodeType: "",
phoneDialMethod: "",
phoneMessageRemind: "",
phoneTimeInterval: "",
2024-08-05 10:42:36 +08:00
phoneRedialTimes: "",
2024-03-29 16:17:13 +08:00
},
2024-05-22 17:36:47 +08:00
],
});
this.form = this.lists[0].list[0];
2024-07-11 15:20:13 +08:00
loading.close();
2024-05-22 17:36:47 +08:00
}
},
handleData(list, key, keytwo) {
//得到数据的主键列表
let keysArr = list.map((item) => {
return {
routeNodeDay: item[key],
routeNodeName: item[keytwo],
2024-04-08 10:35:35 +08:00
};
2024-05-22 17:36:47 +08:00
});
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;
2024-04-08 10:35:35 +08:00
},
2024-05-22 17:36:47 +08:00
//wangeditor传值
onNodeContent(item) {
2024-07-09 10:32:31 +08:00
if (item.nodeContent) {
this.form.nodeContent = item.nodeContent;
var abc = new RegExp("<br>", "g");
var bbb = this.form.nodeContent.replace(abc, "");
this.form.nodeContent = bbb;
}
2024-07-08 15:28:48 +08:00
let wangeditorlist = [];
if (localStorage.getItem("wangeditorlist")) {
wangeditorlist = JSON.parse(localStorage.getItem("wangeditorlist"));
wangeditorlist = wangeditorlist.filter(
(e) =>
e.taskSubdivision != item.taskSubdivision &&
e.specialDiseaseNodeId != item.specialDiseaseNodeId
);
2024-07-05 16:09:12 +08:00
}
2024-07-08 15:28:48 +08:00
wangeditorlist.push(item);
localStorage.setItem("wangeditorlist", JSON.stringify(wangeditorlist));
2024-03-25 09:45:10 +08:00
},
2024-05-22 17:36:47 +08:00
//小程序传值
miniProgramtemplate(item) {
this.form.appletTemplateId = item.templateId;
this.form.appletTemplateName = item.templateName;
this.form.appletRemindContent = item.templateContent;
2024-03-25 09:45:10 +08:00
},
2024-05-22 17:36:47 +08:00
//短信传值
messageontemplate(item) {
this.form.messageTemplateId = item.templateId;
this.form.messageTemplateName = item.templateName;
this.form.messagePreview = item.templateContent;
},
2024-06-14 15:43:32 +08:00
// 短信
messageontemplateMESSAGE(item) {
this.form.phoneMessageTemplateId = item.templateId;
this.form.phoneMessageTemplateName = item.templateName;
this.form.messagePreview = item.templateContent;
},
// 话术
messageontemplateword(item) {
this.form.phoneTemplateId = item.templateId;
this.form.phoneTemplateName = item.templateName;
2024-09-14 15:30:38 +08:00
this.form.robotPublishId = item.robotPublishId;
2024-08-12 14:11:17 +08:00
this.lists[this.listindex].list[this.itemindex].scriptInfoId =
item.scriptInfoId;
this.lists[this.listindex].list[this.itemindex].phoneTemplateId =
item.phoneTemplateId;
2024-08-05 10:42:36 +08:00
// this.form.messagePreview = item.templateContent;
this.phoneNodeContent = item.phoneNodeContent;
2024-06-14 15:43:32 +08:00
},
2024-05-22 17:36:47 +08:00
//公众号传值
officialAccountontemplate(item) {
this.form.officialTemplateId = item.templateId;
this.form.officialTemplateName = item.templateName;
this.form.officialRemindContent = item.templateContent;
},
//暂存
2024-11-06 08:41:26 +08:00
async TemporaryStorage() {
console.log(this.form)
if (this.form.taskNodeType != "QUESTIONNAIRE_SCALE" && this.form.taskNodeType != "PROPAGANDA_ARTICLE") {
2024-05-24 11:25:37 +08:00
this.$refs.wangeditor.emit();
}
2024-11-06 08:41:26 +08:00
await this.$confirm("确认暂存时将过滤掉部分内容未填写完成的子节点,是否确认暂存?", "提示", { confirmButtonText: "确认", cancelButtonText: "取消", }).then(() => {
2024-05-22 17:36:47 +08:00
const loading = this.$loading({
lock: true,
text: "暂存中",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
this.updata.specialDiseaseNodeList = [];
this.lists.forEach((e) => {
2024-09-14 15:30:38 +08:00
e.list.length > 0 ? e.list.forEach((el) => {
el.routeNodeDay = e.routeNodeDay;
el.routeNodeName = e.routeNodeName;
2024-11-06 08:41:26 +08:00
el.phonePushSign = null;
2024-09-14 15:30:38 +08:00
if (el.phoneDialMethod == "COMMON" && el.templateId) {
el.phonePushSign = "1";
2024-11-06 08:41:26 +08:00
} else if (el.phoneDialMethod == "AI" && el.templateId) {
el.phonePushSign = "1";
} else if (el.phoneDialMethod == "COMMON" && el.phoneTemplateId) {
2024-09-14 15:30:38 +08:00
el.phonePushSign = "1";
} else if (el.phoneDialMethod == "AI" && el.phoneTemplateId) {
el.phonePushSign = "1";
}
this.updata.specialDiseaseNodeList.push(el);
}) : "";
2024-05-22 17:36:47 +08:00
});
2024-06-18 10:06:05 +08:00
// this.updata.specialDiseaseNodeList =
// this.updata.specialDiseaseNodeList.filter(
// (e) =>
// !e.routeNodeDay &&
// !e.routeNodeName &&
// !e.taskType &&
// !e.taskSubdivision &&
// !e.taskStatus
// );
2024-08-12 14:11:17 +08:00
// return;
this.updata.specialDiseaseNodeList.forEach((ele) => {
if (ele.taskNodeType == "PHONE_OUTBOUND") {
if (ele.phoneDialMethod == null || ele.phoneDialMethod == "") {
2024-11-06 08:41:26 +08:00
loading.close();
return this.$message.error("请先选择推送方式");
} else if (ele.phoneTemplateId == null || ele.phoneTemplateId == "") {
loading.close();
return this.$message.error("请先选择话术模板");
2024-08-12 14:11:17 +08:00
}
}
2024-05-22 17:36:47 +08:00
});
2024-11-06 08:41:26 +08:00
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);
localStorage.setItem("wangeditorlist", JSON.stringify(wangeditorlist));
}
this.info();
loading.close();
this.$modal.msgSuccess("暂存成功!");
this.listindex = 0;
this.itemindex = 0;
});
setTimeout(() => {
loading.close();
}, 3000);
2024-05-22 17:36:47 +08:00
});
},
//问卷传值
questionontemplate(item) {
this.form.templateId = item.templateId;
this.form.templateName = item.templateName;
2024-07-03 18:27:35 +08:00
this.lookitemnew = item.lookitemnew;
2024-05-22 17:36:47 +08:00
},
//宣教传值
propagandaontemplate(item) {
this.form.templateId = item.templateId;
this.form.templateName = item.templateName;
2024-07-03 18:27:35 +08:00
this.formview = item.formview;
2024-05-22 17:36:47 +08:00
},
2024-07-04 10:08:31 +08:00
//点击审核按钮
dialogVisibletrue() {
2024-07-04 11:14:38 +08:00
this.form.routeNodeDay = Number(this.lists[this.listindex].routeNodeDay);
this.dialogVisible = true;
2024-07-04 10:08:31 +08:00
},
2024-07-05 16:09:12 +08:00
// 获取editor传值
onemit() {
2024-06-14 15:43:32 +08:00
if (
2024-07-11 15:20:13 +08:00
this.form.taskNodeType != "QUESTIONNAIRE_SCALE" &&
this.form.taskNodeType != "PROPAGANDA_ARTICLE" &&
this.form.taskNodeType != "PHONE_OUTBOUND"
2024-06-14 15:43:32 +08:00
) {
2024-05-24 11:25:37 +08:00
this.$refs.wangeditor.emit();
}
2024-05-22 17:36:47 +08:00
},
2024-08-05 09:21:53 +08:00
// 切换节点
2024-07-05 16:09:12 +08:00
async bottomclickevent(uitem, index, uindex) {
2024-07-08 15:28:48 +08:00
await this.onemit();
const loading = this.$loading({
lock: true,
text: "加载中",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
2024-07-05 16:09:12 +08:00
this.listindex = index;
this.itemindex = uindex;
2024-08-12 14:11:17 +08:00
if (uitem.taskNodeType == "PROPAGANDA_ARTICLE" && uitem.templateId) {
2024-07-08 15:47:31 +08:00
getPropaganda(uitem.templateId).then((response) => {
2024-07-05 16:09:12 +08:00
this.formview = response.data;
});
2024-07-08 15:28:48 +08:00
} else if (
2024-07-11 15:20:13 +08:00
uitem.taskNodeType == "QUESTIONNAIRE_SCALE" &&
2024-07-08 15:28:48 +08:00
uitem.templateId
) {
2024-07-08 15:47:31 +08:00
questionname(uitem.templateId).then((res) => {
2024-07-05 16:09:12 +08:00
this.lookitemnew = res.data;
});
2024-08-12 14:11:17 +08:00
} else if (uitem.taskNodeType == "PHONE_OUTBOUND") {
2024-07-17 15:09:44 +08:00
if (uitem.flowScheme) {
this.phoneNodeContent = uitem.flowScheme;
} else {
this.phoneNodeContent = JSON.stringify({
scriptInfoId: null,
flowScheme: null,
nodes: [],
edges: [],
2024-08-12 14:11:17 +08:00
});
2024-07-17 15:09:44 +08:00
}
2024-07-05 16:09:12 +08:00
}
this.taskPartitionList = [];
if (uitem.taskType) {
this.changeTaskType(uitem.taskType, uitem.taskSubdivision);
}
this.form = uitem;
2024-07-08 15:28:48 +08:00
setTimeout(() => {
2024-07-09 15:31:13 +08:00
loading.close();
2024-07-08 15:47:31 +08:00
}, 1200);
2024-07-05 16:09:12 +08:00
},
2024-05-22 17:36:47 +08:00
handleStep() {
this.active = 2;
},
//任务类型 任务状态
taskinfo() {
selectTaskTypeList().then((res) => {
this.selectTaskTypeList = res.data;
this.info();
});
},
//任务类型
2024-11-06 08:41:26 +08:00
async changeTaskType(code, taskSubdivision) {
2024-07-08 15:28:48 +08:00
this.taskPartitionDictId = "";
2024-05-22 17:36:47 +08:00
let id = this.selectTaskTypeList?.find((e) => e.taskTypeCode == code)?.id;
2024-11-06 08:41:26 +08:00
this.form.taskTypeName = this.selectTaskTypeList?.find((e) => e.taskTypeCode == code)?.taskTypeName;
await taskPartitionList(id).then((res) => {
2024-07-11 17:26:40 +08:00
// res.data?.forEach(e => {
// if (e.taskNodeType == 'PHONE_OUTBOUND') {
// e.taskPartitionName = e.taskPartitionName + '(电话外呼)'
// } else if (e.taskNodeType == 'QUESTIONNAIRE_SCALE') {
// e.taskPartitionName = e.taskPartitionName + '(问卷量表)'
// } else if (e.taskNodeType == 'PROPAGANDA_ARTICLE') {
// e.taskPartitionName = e.taskPartitionName + '(宣教文案)'
// } else if (e.taskNodeType == 'TEXT_REMIND') {
// e.taskPartitionName = e.taskPartitionName + '(文字提醒)'
// }
// })
2024-05-22 17:36:47 +08:00
this.taskPartitionList = res.data;
this.form.taskSubdivision = "";
this.form.taskSubdivisionName = "";
2024-11-06 08:41:26 +08:00
// this.form.taskNodeType = "";
2024-05-22 17:36:47 +08:00
this.taskStatusDictList = [];
if (taskSubdivision) {
this.form.taskSubdivision = taskSubdivision;
this.changetaskSubdivision(taskSubdivision, 1);
}
});
},
//点击任务细分
changetaskSubdivision(code, type) {
2024-11-06 08:41:26 +08:00
if (this.form.taskNodeType != "QUESTIONNAIRE_SCALE" && this.form.taskNodeType != "PROPAGANDA_ARTICLE" && this.form.taskNodeType != "PHONE_OUTBOUND") {
2024-07-05 16:09:12 +08:00
this.$refs.wangeditor.emit();
}
setTimeout(() => {
2024-07-11 15:20:13 +08:00
const loading = this.$loading({
lock: true,
text: "加载中",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
if (!type) {
2024-08-12 14:11:17 +08:00
this.form.taskStatus = "";
2024-07-11 15:20:13 +08:00
}
2024-11-06 08:41:26 +08:00
this.form.taskSubdivisionName = this.taskPartitionList?.find((e) => e.taskPartitionCode == code)?.taskPartitionName;
let id = this.taskPartitionList?.find((e) => e.taskPartitionCode == code)?.id;
2024-07-08 15:28:48 +08:00
this.taskPartitionDictId = id;
2024-11-06 08:41:26 +08:00
this.form.secondClassifyDescribe = this.taskPartitionList?.find((e) => e.taskPartitionCode == code)?.secondClassifyDescribe;
this.form.executionTime = this.taskPartitionList?.find((e) => e.taskPartitionCode == code)?.executionTime;
2024-07-05 16:09:12 +08:00
taskStatusDictList(id).then((res) => {
this.taskStatusDictList = res.data;
});
this.taskPartitionList.forEach((el) => {
if (code == el.taskPartitionCode) {
this.form.executionTime = el.executionTime;
2024-11-06 08:41:26 +08:00
// this.form.taskNodeType = el.taskNodeType;
if (this.form.taskNodeType == "PHONE_OUTBOUND" || this.form.taskNodeType == "PROPAGANDA_ARTICLE" || this.form.taskNodeType == "QUESTIONNAIRE_SCALE") {
2024-07-05 16:09:12 +08:00
this.form.nodeContent = `<p></p>`;
}
if (!type) {
this.form.templateId = "";
this.form.templateName = "";
}
2024-06-18 10:06:05 +08:00
}
2024-07-08 15:28:48 +08:00
let wangeditorlist = [];
if (localStorage.getItem("wangeditorlist")) {
wangeditorlist = JSON.parse(localStorage.getItem("wangeditorlist"));
this.form.nodeContent = "<p></p>";
2024-11-06 08:41:26 +08:00
this.form.nodeContent = wangeditorlist.find((e) => e.taskSubdivision == this.form.taskSubdivision && e.specialDiseaseNodeId == this.form.specialDiseaseNodeId)?.nodeContent;
2024-05-22 17:36:47 +08:00
}
2024-11-06 08:41:26 +08:00
// this.form.taskNodeType = this.taskPartitionList?.find(
// (e) => e.taskPartitionCode == code
// )?.taskNodeType;
2024-07-05 16:09:12 +08:00
});
2024-07-11 15:20:13 +08:00
loading.close();
2024-07-05 16:09:12 +08:00
}, 500);
2024-05-22 17:36:47 +08:00
},
addlist() {
list(this.parentDictCode).then((res) => {
// this.parentDictCodelist = res.rows;
res.rows.forEach((e) => {
this.lists.forEach((el) => {
2024-07-09 10:32:31 +08:00
el.routeNodeName = e.dictValue;
2024-05-22 17:36:47 +08:00
});
});
});
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: "",
2024-07-11 15:20:13 +08:00
taskNodeType: "",
2024-08-12 14:11:17 +08:00
taskNodeType: "",
phoneDialMethod: "",
phoneMessageRemind: "",
phoneTimeInterval: "",
2024-08-05 10:42:36 +08:00
phoneRedialTimes: "",
2024-05-22 17:36:47 +08:00
},
],
});
},
additem(item) {
item.list.push({
nodeContent: "<p></p>",
templateId: "",
templateName: "",
taskType: "",
officialRemindContent: "",
taskSubdivision: "",
taskSubdivisionName: "",
taskStatus: "",
secondClassifyDescribe: "",
executionTime: "",
appletPushSign: "0",
officialPushSign: "0",
messagePushSign: "0",
appletRemindContent: "",
appletPromptDescription: "",
messagePreview: "",
2024-07-11 15:20:13 +08:00
taskNodeType: "",
2024-08-12 14:11:17 +08:00
taskNodeType: "",
phoneDialMethod: "",
phoneMessageRemind: "",
phoneTimeInterval: "",
2024-08-05 10:42:36 +08:00
phoneRedialTimes: "",
2024-05-22 17:36:47 +08:00
});
},
delitem(item, index) {
item.list.splice(this.itemindex, 1);
if (item.list.length == 0) {
this.lists.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)",
});
2024-08-12 14:11:17 +08:00
console.log(this.form);
if (this.form.taskNodeType != "PHONE_OUTBOUND") {
2024-08-05 09:21:53 +08:00
if (this.form.messagePushSign == "1") {
if (!this.form.messageTemplateId) {
this.$message.error("请选择短信模板");
return loading.close();
}
}
if (this.form.officialPushSign == "1") {
if (!this.form.officialTemplateId) {
this.$message.error("请选择公众号模板");
return loading.close();
}
}
if (this.form.appletPushSign == "1") {
if (!this.form.appletTemplateId) {
this.$message.error("请选择小程序模板");
return loading.close();
}
}
2024-08-05 10:42:36 +08:00
} else {
if (!this.form.phoneDialMethod) {
this.$message.error("请选择推送方式");
return loading.close();
}
2024-08-12 14:11:17 +08:00
if (
this.optionslist.find(
(e) => e.dictValue == this.form.phoneMessageRemind
)?.dictLabel == "未接通发短信"
) {
2024-08-05 10:42:36 +08:00
if (!this.form.phoneMessageTemplateId) {
this.$message.error("请选择短信模板");
return loading.close();
}
}
2024-08-05 09:21:53 +08:00
}
2024-07-04 11:14:38 +08:00
if (
Number(this.form.routeNodeDay) != 0 &&
Number(this.form.routeNodeDay) < 0
) {
2024-05-22 17:36:47 +08:00
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();
}
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("审核成功!");
2024-08-12 14:11:17 +08:00
this.listindex = 0;
this.itemindex = 0;
2024-04-08 16:42:27 +08:00
}
2024-05-22 17:36:47 +08:00
});
}
});
},
},
2024-03-25 09:45:10 +08:00
};
</script>
2024-07-08 15:47:31 +08:00
<style scoped lang="scss">
2024-07-03 18:27:35 +08:00
::v-deep iframe {
width: 100%;
height: 500px;
}
2024-07-04 10:08:31 +08:00
2024-07-03 18:27:35 +08:00
.imageScriptpreviews {
margin: 0 auto;
width: 90%;
2024-07-04 10:08:31 +08:00
2024-07-03 18:27:35 +08:00
// height: 300px;
.titletop {
font-size: 16px;
font-weight: 700;
}
.bodytop {
position: relative;
top: 20px;
// height: 300px;
// overflow: auto;
border: 1px solid #e2e2e2;
.titledata {
margin: 30px 0px 15px 30px;
top: 14px;
font-size: 20px;
}
.audiotop {
margin: 10px 0px 10px 30px;
}
img {
width: 90%;
// width: 362px;
// height: 127px;
margin: 0px 0px 0px 30px;
}
.know {
margin: 11px 0px 10px 30px;
font-size: 16px;
}
.knowlist {
margin: 10px 0px 10px 30px;
font-size: 16px;
}
}
}
2024-07-04 10:08:31 +08:00
2024-06-04 17:19:20 +08:00
::v-deep .el-input.is-disabled .el-input__inner {
background-color: #fff !important;
color: #606266 !important;
}
2024-06-28 14:20:18 +08:00
2024-06-27 09:21:03 +08:00
::v-deep.el-form-item--medium .el-form-item__content {
line-height: 36px;
height: 40px;
overflow: hidden;
}
2024-06-28 14:20:18 +08:00
2024-07-17 11:48:51 +08:00
.txxt {
2024-07-15 15:30:13 +08:00
::v-deep.el-form-item--medium .el-form-item__content {
2024-07-17 11:48:51 +08:00
line-height: 36px;
height: 40px;
overflow: visible;
}
2024-07-15 15:30:13 +08:00
}
2024-04-08 15:14:33 +08:00
::v-deep .el-card__body {
2024-05-22 17:36:47 +08:00
position: relative;
2024-04-08 15:14:33 +08:00
}
.routeCheckStatus {
2024-05-22 17:36:47 +08:00
position: absolute;
right: 10px;
top: 30px;
2024-04-08 15:14:33 +08:00
}
2024-04-02 16:59:44 +08:00
.dialog-footer {
2024-05-22 17:36:47 +08:00
padding: 0 20px 0;
text-align: right;
2024-04-02 16:59:44 +08:00
}
2024-03-29 10:25:31 +08:00
.bottomform {
2024-05-22 17:36:47 +08:00
background-color: #f2f4f5;
margin-top: 10px;
2024-03-29 16:17:13 +08:00
2024-05-22 17:36:47 +08:00
.card {
background-color: #fff;
width: 100%;
2024-06-25 16:58:50 +08:00
height: 130px;
2024-07-08 15:28:48 +08:00
2024-05-22 17:36:47 +08:00
margin: 20px 0 0;
padding: 20px 50px 0px 20px;
2024-04-08 10:13:32 +08:00
2024-05-22 17:36:47 +08:00
.flextwo {
margin-top: 20px;
.text {
2024-06-25 16:58:50 +08:00
font-size: 14px;
2024-05-22 17:36:47 +08:00
color: #64666a;
}
::v-deep .el-input__inner {
color: black !important;
background-color: #fff !important;
cursor: default !important;
}
.textarea {
width: 90%;
padding: 0 10px;
height: 50px;
line-height: 50px;
// border: 1px solid #DCDFE6;
border-radius: 5px;
display: flex;
align-items: center;
::v-deep .el-input {
padding: 0 10px;
width: 50%;
color: black;
2024-06-25 16:58:50 +08:00
font-size: 14px;
2024-05-22 17:36:47 +08:00
height: 40px;
line-height: 40px;
2024-03-29 16:17:13 +08:00
}
2024-05-22 17:36:47 +08:00
::v-deep .el-input__inner {
color: black;
2024-06-25 16:58:50 +08:00
font-size: 14px;
2024-03-29 16:17:13 +08:00
}
2024-05-22 17:36:47 +08:00
}
2024-03-29 16:17:13 +08:00
}
2024-07-09 15:31:13 +08:00
2024-07-04 11:14:38 +08:00
.flexs {
display: flex;
width: 100%;
2024-07-09 15:31:13 +08:00
2024-07-04 11:14:38 +08:00
.pushMethod {
height: 30px;
margin-top: 30px;
margin-left: 67px;
line-height: 37px;
font-size: 14px;
color: #64666a;
.spanname {
pointer-events: none;
}
::v-deep .el-input__inner {
color: black;
font-size: 14px;
}
span {
color: black;
font-size: 14px;
}
}
2024-07-09 15:31:13 +08:00
2024-07-04 11:14:38 +08:00
.pushMethods {
height: 30px;
margin-top: 30px;
line-height: 37px;
font-size: 14px;
color: #64666a;
2024-03-29 10:25:31 +08:00
2024-07-04 11:14:38 +08:00
.spanname {
pointer-events: none;
}
::v-deep .el-input__inner {
color: black;
font-size: 14px;
}
span {
color: black;
font-size: 14px;
}
}
}
2024-07-09 15:31:13 +08:00
2024-05-22 17:36:47 +08:00
.flex {
display: flex;
2024-06-14 15:43:32 +08:00
width: 100%;
2024-05-22 17:36:47 +08:00
align-items: center;
2024-06-17 15:12:00 +08:00
// background: red;
2024-05-22 17:36:47 +08:00
justify-content: space-between;
.pushMethod {
height: 30px;
2024-06-14 15:43:32 +08:00
margin-top: 30px;
2024-06-25 16:58:50 +08:00
line-height: 35px;
font-size: 14px;
2024-05-22 17:36:47 +08:00
color: #64666a;
2024-06-28 14:20:18 +08:00
2024-06-14 15:43:32 +08:00
.spanname {
pointer-events: none;
}
2024-06-28 14:20:18 +08:00
2024-03-26 16:04:26 +08:00
::v-deep .el-input__inner {
2024-05-22 17:36:47 +08:00
color: black;
2024-06-25 16:58:50 +08:00
font-size: 14px;
2024-03-26 16:04:26 +08:00
}
2024-05-22 17:36:47 +08:00
span {
color: black;
2024-06-25 16:58:50 +08:00
font-size: 14px;
2024-03-26 16:04:26 +08:00
}
2024-05-22 17:36:47 +08:00
}
}
}
}
.topform {
padding: 15px 0 0 15px;
.form {
::v-deep .el-input__inner {
height: 30px !important;
line-height: 30px !important;
}
::v-deep .el-form-item__label {
2024-06-25 16:58:50 +08:00
font-size: 13px !important;
2024-03-26 16:04:26 +08:00
}
2024-05-22 17:36:47 +08:00
}
2024-03-26 16:04:26 +08:00
}
2024-06-28 14:20:18 +08:00
2024-03-26 14:49:50 +08:00
.title {
2024-05-22 17:36:47 +08:00
display: flex;
align-items: center;
div {
2024-03-26 14:49:50 +08:00
display: flex;
2024-05-22 17:36:47 +08:00
padding-left: 10px;
font-weight: 600;
2024-03-26 14:49:50 +08:00
align-items: center;
2024-05-22 17:36:47 +08:00
}
2024-03-26 14:49:50 +08:00
2024-05-22 17:36:47 +08:00
.select {
font-weight: 550;
margin-left: 20%;
2024-06-25 16:58:50 +08:00
font-size: 13px;
2024-03-26 16:04:26 +08:00
2024-05-22 17:36:47 +08:00
.el-input {
width: 200px;
height: 30px !important;
line-height: 30px !important;
2024-03-26 14:49:50 +08:00
}
2024-05-22 17:36:47 +08:00
}
2024-03-26 14:49:50 +08:00
}
.list {
2024-08-12 14:11:17 +08:00
margin: 10px auto;
2024-05-22 17:36:47 +08:00
width: 100%;
background-color: #f2f4f5;
display: flex;
2024-08-12 14:11:17 +08:00
padding-top: 10px;
2024-05-22 17:36:47 +08:00
justify-content: space-evenly;
2024-03-26 14:49:50 +08:00
2024-05-22 17:36:47 +08:00
.timelist {
width: 25%;
background-color: #fff;
padding: 0 20px 20px;
// height: 680px;
height: calc(100vh - 294px);
2024-07-01 14:10:12 +08:00
overflow: auto;
2024-05-22 17:36:47 +08:00
.timetitle {
height: 60px;
display: flex;
align-items: center;
justify-content: space-between;
2024-03-26 14:49:50 +08:00
}
2024-05-22 17:36:47 +08:00
::v-deep .el-timeline {
width: 100%;
padding: 15px 0 0 !important;
2024-03-26 14:49:50 +08:00
}
2024-05-22 17:36:47 +08:00
}
.texts {
2024-08-12 14:11:17 +08:00
width: 74%;
2024-05-22 17:36:47 +08:00
// height: 680px;
height: calc(100vh - 294px);
2024-07-01 14:10:12 +08:00
overflow: auto;
2024-05-22 17:36:47 +08:00
background-color: #fff;
}
2024-03-26 14:49:50 +08:00
}
2024-03-25 09:45:10 +08:00
.cards {
2024-05-22 17:36:47 +08:00
border: 1px solid #409eff;
border-left: 5px solid #409eff;
2024-03-25 09:45:10 +08:00
}
.top {
2024-05-22 17:36:47 +08:00
display: flex;
justify-content: space-between;
align-items: center;
.toptop {
2024-03-25 09:45:10 +08:00
display: flex;
align-items: center;
2024-05-22 17:36:47 +08:00
}
2024-03-25 09:45:10 +08:00
2024-05-22 17:36:47 +08:00
span {
padding: 0 4px;
}
2024-03-25 09:45:10 +08:00
2024-05-22 17:36:47 +08:00
i {
font-size: 17px;
}
2024-03-26 16:04:26 +08:00
2024-05-22 17:36:47 +08:00
i:nth-child(2) {
padding-left: 12px;
}
2024-03-25 09:45:10 +08:00
}
::v-deep .el-timeline-item__timestamp {
2024-05-22 17:36:47 +08:00
margin: 0 !important;
padding: 0 !important;
2024-03-25 09:45:10 +08:00
}
2024-03-26 16:04:26 +08:00
::v-deep .el-timeline-item__wrapper {
2024-05-22 17:36:47 +08:00
padding-left: 14px !important;
2024-03-26 16:04:26 +08:00
}
2024-03-25 09:45:10 +08:00
::v-deep .el-timeline-item__content {
2024-05-22 17:36:47 +08:00
transform: translateY(-2%);
2024-03-25 09:45:10 +08:00
}
::v-deep .el-card {
2024-05-22 17:36:47 +08:00
margin-top: 20px !important;
2024-03-25 09:45:10 +08:00
}
2024-06-28 14:20:18 +08:00
2024-06-14 15:30:24 +08:00
.container {
2024-08-12 14:11:17 +08:00
// padding: 20px;
padding: 16px 0 16px 16px;
2024-06-13 16:52:34 +08:00
}
2024-06-13 15:40:05 +08:00
</style>