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

993 lines
34 KiB
Vue
Raw Normal View History

2024-04-08 17:21:26 +08:00
<template>
2024-07-11 11:10:08 +08:00
<div style="background-color: #f1f3f5;padding-top:10px">
2024-07-16 09:54:06 +08:00
<div class="titlemengt" ref="layout">
2024-05-23 09:37:51 +08:00
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="upload">保存</el-button>
</div>
<el-descriptions title="手动创建任务"> </el-descriptions>
2024-07-11 11:10:08 +08:00
<el-form :inline="true" :model="updata" class="demo-form-inline" ref="updata">
2024-05-23 09:37:51 +08:00
<el-form-item label="任务名称">
<el-input v-model="updata.routeName"></el-input>
</el-form-item>
<el-form-item label="适用范围">
2024-05-27 17:41:06 +08:00
<el-select v-model="updata.suitRange" @change="changeoptions">
2024-07-11 11:10:08 +08:00
<el-option v-for="item in options" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
2024-05-23 09:37:51 +08:00
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-form ref="updata" :model="updata" label-width="80px">
2024-07-11 11:10:08 +08:00
<div class="chufatitle">
<span>触发条件</span>
<!-- <el-button type="primary" plain size="mini" @click="addtriggerCondition" >添加触发条件</el-button > -->
</div>
2024-07-10 09:54:40 +08:00
<div class="nodesname">
2024-07-11 11:10:08 +08:00
<div class="node" v-for="(item, index) in updata.triggerConditionList" :key="index">
2024-07-10 09:54:40 +08:00
<!-- 且或 -->
2024-07-11 11:10:08 +08:00
<div style="
2024-07-11 10:19:28 +08:00
width: 60px;
position: absolute;
left: 3%;
2024-07-11 11:10:08 +08:00
top: 195px;
" v-if="updata.triggerConditionList.length === 3">
2024-07-11 10:19:28 +08:00
<img src="@/assets/images/images.png" class="login-code-img" />
2024-07-11 11:10:08 +08:00
<el-select v-model="item.triggerLogic" style="width: 60px" placeholder=""
@change="changetriggerLogicsname($event, index)">
<el-option v-for="itemh in optionslistS" :key="itemh.dictValue" :label="itemh.dictLabel"
:value="itemh.dictValue">
2024-07-11 10:19:28 +08:00
</el-option>
</el-select>
</div>
2024-07-10 09:54:40 +08:00
<!-- 诊断 在这里-->
2024-07-11 11:52:23 +08:00
<el-select v-model="item.triggerConditionCode" style="width: 120px;z-index: 10;"
2024-07-11 11:10:08 +08:00
@change="changetriggerConditionName($event, index)">
<el-option v-for="item in optionsname" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
2024-07-10 09:54:40 +08:00
</el-option>
</el-select>
<!-- 包含 -->
2024-07-11 11:10:08 +08:00
<el-select v-model="item.triggerConditionOperator" style="width: 100px"
@change="changetriggerLogic($event, index)">
<el-option v-for="item in item.optionstriggerConditionOperator" :key="item.dictValue"
:label="item.dictLabel" :value="item.dictValue">
2024-07-10 09:54:40 +08:00
</el-option>
</el-select>
2024-07-11 11:10:08 +08:00
<el-input v-if="item.dictDataType == 'STRING' || !dictDataType" v-model="item.triggerConditionValue"
style="width: 300px" placeholder="请输入触发条件" maxlength="100"></el-input>
<el-select v-if="item.dictDataType == 'SELECT'" v-model="item.triggerConditionValue" style="width: 300px">
<el-option v-for="item in ConditionValue" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
2024-07-10 09:54:40 +08:00
</el-option>
</el-select>
2024-07-11 11:10:08 +08:00
<el-date-picker v-if="item.dictDataType == 'DATE'" v-model="item.triggerConditionValue" style="width: 300px"
type="date" placeholder="选择日期时间" value-format="yyyy-MM-dd">
2024-07-10 09:54:40 +08:00
</el-date-picker>
<!-- {{ item }} -->
2024-07-11 11:10:08 +08:00
<el-input v-if="item.dictDataType == 'DECIMAL'" style="width: 300px" v-model="item.triggerConditionValue"
type="number" :min="0"></el-input>
2024-07-10 09:54:40 +08:00
<span class="icon">
2024-07-11 11:10:08 +08:00
<el-button type="danger" class="el-icon-remove-outline" plain @click="delitemlistname(index)"
v-if="index != 0"></el-button>
<el-button type="primary" plain class="el-icon-circle-plus-outline" @click="addtriggerCondition(index)"
v-if="index == 0">添加属性</el-button>
2024-07-10 09:54:40 +08:00
</span>
</div>
</div>
<!-- <div
2024-06-18 14:50:35 +08:00
class="node"
v-for="(item, index) in updata.triggerConditionList"
:key="index"
:style="updata.triggerConditionList.length > 1 ? '' : 'margin:0'"
>
2024-05-23 09:37:51 +08:00
<el-select v-model="item.triggerConditionName" style="width: 120px">
<el-option label="诊断" value="DIAGNOSIS" />
<el-option label="换药日期" value="DRESSING_CHANGE_DATE" />
<el-option label="治疗方式" value="TREATMENT_METHOD" />
<el-option label="手术名称" value="SURGICAL_NAME" />
<el-option label="药品名称" value="DRUG_NAME" />
</el-select>
2024-06-18 14:50:35 +08:00
<el-select
v-model="item.triggerConditionOperator"
style="width: 100px"
>
2024-05-23 09:37:51 +08:00
<el-option label="包含" value="CONTAIN" />
<el-option label="不包含" value="NOT_CONTAIN" />
<el-option label="等于" value="EQUAL_TO" />
<el-option label="不等于" value="NOT_EQUAL_TO" />
</el-select>
2024-06-18 14:50:35 +08:00
<el-input
v-model="item.triggerConditionValue"
style="width: 300px"
placeholder="请输入触发条件"
></el-input>
<i
class="el-icon-delete"
@click="delitem(item, index, updata.triggerConditionList)"
></i>
2024-07-10 09:54:40 +08:00
</div> -->
<!-- <el-button @click="submit" style="float:right">保存触发条件</el-button> -->
2024-05-23 09:37:51 +08:00
</el-form>
</div>
2024-07-11 11:10:08 +08:00
<div class="nodes" :style="{ 'height': heightLine + 'px' }">
2024-05-23 09:37:51 +08:00
<div class="nodenames">
<div class="timetitle">
管理路径节点({{ list.length }})
<i class="el-icon-circle-plus-outline" @click="additem"></i>
2024-04-09 11:15:30 +08:00
</div>
2024-05-23 09:37:51 +08:00
<el-timeline>
2024-07-11 11:10:08 +08:00
<el-timeline-item v-for="(item, index) in list" :key="index" :color="listindex == index ? '#409EFF' : ''"
@click.native="clicktimelineitem(item, index)">
2024-05-23 09:37:51 +08:00
<div class="top">
<div class="toptop">
<el-select style="width: 100px" v-model="item.routeNodeName">
2024-07-11 11:10:08 +08:00
<el-option v-for="item in parentDictCodelist" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
2024-05-23 09:37:51 +08:00
</el-option>
</el-select>
2024-07-11 11:10:08 +08:00
<el-input style="width: 90px" v-model="item.routeNodeDay" type="number"></el-input>
2024-05-23 09:37:51 +08:00
<span></span>
</div>
<div>
2024-07-11 11:10:08 +08:00
<i class="el-icon-delete" @click="delitem(item, index, list)"></i>
2024-05-23 09:37:51 +08:00
</div>
2024-04-09 11:15:30 +08:00
</div>
2024-05-23 09:37:51 +08:00
<el-card :class="listindex == index ? 'cards' : ''">
<h3 style="height: 20px">
2024-07-11 15:20:13 +08:00
{{ item.taskNodeType == "PHONE_OUTBOUND" ? "电话外呼" : "" }}
{{ item.taskNodeType == "QUESTIONNAIRE_SCALE" ? "问卷量表" : "" }}
{{ item.taskNodeType == "PROPAGANDA_ARTICLE" ? "宣教文案" : "" }}
{{ item.taskNodeType == "TEXT_REMIND" ? "文字提醒" : "" }}
{{ item.taskNodeType == "ARTIFICIAL_FOLLOW_UP" ? "人工随访" : "" }}
2024-05-23 09:37:51 +08:00
</h3>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
<div class="nodetexts">
2024-07-11 11:10:08 +08:00
<div style="background-color: #fff; border-radius: 10px; padding: 20px"
2024-07-11 15:20:13 +08:00
:style="formInline.taskNodeType ? formInline.taskNodeType != 'PHONE_OUTBOUND' ? formInline.taskNodeType == 'TEXT_REMIND' ? 'height:260px' : 'height:160px' : 'height:80px' : 'height:80px'">
2024-05-23 09:37:51 +08:00
<el-form :model="formInline" class="demo-form-inline">
2024-07-11 15:20:13 +08:00
<el-form-item label="任务节点类型">
<el-radio-group v-model="formInline.taskNodeType" @change="taskNodeTypechange">
2024-05-23 09:37:51 +08:00
<el-radio label="PHONE_OUTBOUND">电话外呼</el-radio>
<el-radio label="QUESTIONNAIRE_SCALE">问卷量表</el-radio>
<el-radio label="PROPAGANDA_ARTICLE">宣教文案</el-radio>
<el-radio label="TEXT_REMIND">文字提醒</el-radio>
2024-07-11 15:20:13 +08:00
<!-- <el-radio label="ARTIFICIAL_FOLLOW_UP">人工随访</el-radio> -->
2024-05-23 09:37:51 +08:00
</el-radio-group>
</el-form-item>
2024-07-11 15:20:13 +08:00
<!-- <el-form-itemlabel="电话模板" v-if="formInline.taskNodeType == 'PHONE_OUTBOUND'">
2024-05-23 09:37:51 +08:00
<scriptphone @on-template="scriptphoneontemplate"></scriptphone>
2024-06-18 14:50:35 +08:00
</el-form-item> -->
2024-07-11 15:20:13 +08:00
<el-form-item label="宣教模板" v-if="formInline.taskNodeType == 'PROPAGANDA_ARTICLE'">
2024-05-23 09:37:51 +08:00
<propaganda @on-template="propagandaontemplate"></propaganda>
</el-form-item>
2024-07-11 15:20:13 +08:00
<el-form-item label="提醒内容" v-if="formInline.taskNodeType == 'TEXT_REMIND'">
2024-07-11 11:10:08 +08:00
<el-input type="textarea" v-model="formInline.textRemindContent" :rows="6" style="width: 600px"
placeholder="请输入内容" />
2024-05-23 09:37:51 +08:00
</el-form-item>
2024-07-11 15:20:13 +08:00
<!-- <el-form-item label="人工随访模板" v-if="formInline.taskNodeType == 'ARTIFICIAL_FOLLOW_UP'">
2024-05-23 09:37:51 +08:00
<question @on-template="questionontemplate"></question>
2024-07-11 15:20:13 +08:00
</el-form-item> -->
2024-05-23 09:37:51 +08:00
</el-form>
2024-07-11 11:10:08 +08:00
<el-form :model="formInline" class="demo-form-inline" :inline="true"
2024-07-11 15:20:13 +08:00
v-if="formInline.taskNodeType == 'QUESTIONNAIRE_SCALE'">
2024-05-23 09:37:51 +08:00
<el-form-item label="问卷模板">
<question @on-template="questionontemplate"></question>
</el-form-item>
2024-07-11 15:20:13 +08:00
<el-form-item label="开启人工随访" label-width="150px">
<el-switch v-model="formInline.phoneDialMethod" active-color="#13ce66" active-value="COMMON"
inactive-value="">
</el-switch>
</el-form-item>
<!-- <el-form-item label="问卷有效期">
2024-07-11 11:10:08 +08:00
<el-input-number v-model="formInline.questionExpirationDate" :min="1" :max="99"
label="描述文字"></el-input-number>
2024-05-23 09:37:51 +08:00
2024-07-11 15:20:13 +08:00
</el-form-item> -->
2024-05-23 09:37:51 +08:00
</el-form>
</div>
2024-07-12 17:05:10 +08:00
<div
v-if="formInline.taskNodeType == 'TEXT_REMIND' || formInline.taskNodeType == 'PROPAGANDA_ARTICLE' || formInline.taskNodeType == 'QUESTIONNAIRE_SCALE'">
2024-07-11 15:20:13 +08:00
<!-- <div class="PushMethodrg" v-if="formInline.taskNodeType == 'ARTIFICIAL_FOLLOW_UP'">
<div class="flex">
<div class="itemlist">推送方式人工电话</div>
<div class="itemlist">
2024-07-11 11:10:08 +08:00
<el-switch v-model="formInline.phonePushSign" active-color="#13ce66" active-value="1"
inactive-value="0">
</el-switch>
</div>
</div>
<div class="flex">
<div class="itemlist">
重播次数
<span>
2024-07-11 11:10:08 +08:00
<el-select v-model="formInline.phoneRedialTimes" style="width: 100px">
<el-option v-for="item in optionslistS" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</span>
</div>
<div class="itemlist">
2024-07-11 15:20:13 +08:00
时间间隔
<span>
2024-07-11 11:10:08 +08:00
<el-input v-model.number="formInline.phoneTimeInterval" oninput="value=value.replace(/[^\d]/g,'')"
style="width: 100px">
</el-input>
</span>
</div>
<div class="itemlist">
短信提醒
2024-07-11 11:10:08 +08:00
<el-select v-model="formInline.phoneMessageRemind" style="width: 150px">
<el-option v-for="item in optionslist" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</div>
<div class="itemlist">
短信模板
2024-07-11 15:20:13 +08:00
<span :class="formInline.phoneMessageRemind == 'NOT_SEND_MESSAGE' ? 'spanname' : ''">
2024-07-11 11:10:08 +08:00
<message style="width: 200px" @on-template="messageontemplateMESSAGE"
:templateId="formInline.phoneMessageTemplateId" :templateName="formInline.phoneMessageTemplateName">
</message>
</span>
</div>
</div>
2024-07-11 15:20:13 +08:00
</div> -->
2024-07-12 17:05:10 +08:00
<div class="PushMethod">
2024-05-23 09:37:51 +08:00
<span>推送方式公众号</span>
2024-07-11 10:19:28 +08:00
<div class="pushMethod">
模板
<span>
2024-07-11 11:10:08 +08:00
<officialAccount @on-template="officialAccountontemplate" :templateId="formInline.officialTemplateId"
:templateName="formInline.officialTemplateName">
2024-07-11 10:19:28 +08:00
</officialAccount>
</span>
</div>
2024-07-11 11:10:08 +08:00
<el-switch v-model="formInline.officialPushSign" active-color="#13ce66" active-value="1" inactive-value="0">
2024-05-23 09:37:51 +08:00
</el-switch>
</div>
2024-07-12 17:05:10 +08:00
<div class="PushMethod">
2024-05-23 09:37:51 +08:00
<span>推送方式小程序</span>
2024-07-11 10:19:28 +08:00
<div class="pushMethod">
模板
<span>
2024-07-11 11:10:08 +08:00
<miniProgram @on-template="miniProgramtemplate" :templateId="formInline.appletTemplateId"
:templateName="formInline.appletTemplateName">
2024-07-11 10:19:28 +08:00
</miniProgram>
</span>
</div>
2024-07-11 11:10:08 +08:00
<el-switch v-model="formInline.appletPushSign" active-color="#13ce66" active-value="1" inactive-value="0">
2024-05-23 09:37:51 +08:00
</el-switch>
</div>
2024-07-12 17:05:10 +08:00
<div class="PushMethod">
2024-07-11 11:10:08 +08:00
<span style="display: inline-block; width: 128px">推送方式短信</span>
2024-07-11 10:19:28 +08:00
<div class="pushMethod">
模板
2024-07-12 17:05:10 +08:00
<message @on-template="messageontemplateMESSAGEtwo" :templateId="formInline.phoneMessageTemplateId"
2024-07-11 11:10:08 +08:00
:templateName="formInline.phoneMessageTemplateName"></message>
2024-07-11 10:19:28 +08:00
</div>
2024-07-11 11:10:08 +08:00
<el-switch v-model="formInline.messagePushSign" active-color="#13ce66" active-value="1" inactive-value="0">
2024-07-11 10:19:28 +08:00
</el-switch>
</div>
2024-05-23 09:37:51 +08:00
</div>
2024-07-11 15:20:13 +08:00
<div class="PushMethodrg" v-if="formInline.taskNodeType == 'PHONE_OUTBOUND'">
2024-06-18 14:50:35 +08:00
<div class="flex">
<div class="itemlist">
推送方式
<span>
2024-07-11 11:10:08 +08:00
<el-radio-group v-model="formInline.phoneDialMethod" @change="changephoneDialMethod">
<el-radio label="COMMON">人工电话</el-radio>
<el-radio label="AI">自动外呼</el-radio>
</el-radio-group>
</span>
2024-06-18 14:50:35 +08:00
</div>
<div class="itemlist">
话术模板
2024-07-11 15:20:13 +08:00
<span>
2024-07-11 11:10:08 +08:00
<scripts @on-template="messageontemplateword" :templateId="formInline.phoneId"
:templateName="formInline.phoneTemplateName"></scripts>
</span>
</div>
2024-07-11 15:20:13 +08:00
<!-- <div class="itemlist" v-if="formInline.phoneDialMethod == 'COMMON' || !formInline.phoneDialMethod">
问卷模板
2024-07-11 15:20:13 +08:00
<span :class="formInline.phoneId ? 'spanname' : ''">
2024-07-11 11:10:08 +08:00
<question @on-template="questionontemplate" :templateId="formInline.questionInfoId"
:templateName="formInline.questionnaireName"></question>
</span>
2024-07-11 15:20:13 +08:00
</div> -->
2024-06-18 14:50:35 +08:00
<div class="itemlist">
2024-07-11 11:10:08 +08:00
<el-switch v-model="formInline.phonePushSign" active-color="#13ce66" active-value="1" inactive-value="0">
2024-06-18 14:50:35 +08:00
</el-switch>
</div>
</div>
<div class="flex">
<div class="itemlist">
2024-07-11 11:52:23 +08:00
重播次数
2024-06-18 14:50:35 +08:00
<span>
2024-07-11 11:10:08 +08:00
<el-select v-model="formInline.phoneRedialTimes" style="width: 100px">
<el-option v-for="item in optionslisttime" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
2024-06-18 14:50:35 +08:00
</el-option>
</el-select>
</span>
</div>
<div class="itemlist">
2024-07-11 15:20:13 +08:00
时间间隔
2024-06-18 14:50:35 +08:00
<span>
2024-07-11 11:10:08 +08:00
<el-input v-model.number="formInline.phoneTimeInterval" oninput="value=value.replace(/[^\d]/g,'')"
style="width: 100px">
2024-06-18 14:50:35 +08:00
</el-input>
</span>
</div>
<div class="itemlist">
短信提醒
2024-07-11 11:10:08 +08:00
<el-select v-model="formInline.phoneMessageRemind" style="width: 150px">
<el-option v-for="item in optionslist" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
2024-06-18 14:50:35 +08:00
</el-option>
</el-select>
</div>
<div class="itemlist">
短信模板
2024-07-11 15:20:13 +08:00
<span :class="formInline.phoneMessageRemind == 'NOT_SEND_MESSAGE' ? 'spanname' : ''">
2024-07-11 11:10:08 +08:00
<message style="width: 200px" @on-template="messageontemplateMESSAGE"
:templateId="formInline.phoneMessageTemplateId" :templateName="formInline.phoneMessageTemplateName">
</message>
2024-06-18 14:50:35 +08:00
</span>
</div>
</div>
2024-04-09 11:15:30 +08:00
</div>
2024-05-23 09:37:51 +08:00
</div>
2024-04-08 17:21:26 +08:00
</div>
2024-05-23 09:37:51 +08:00
</div>
2024-04-08 17:21:26 +08:00
</template>
<script>
2024-05-23 09:37:51 +08:00
import propaganda from "../components/propaganda.vue";
import scriptphone from "../components/script.vue";
import scripts from "../components/script.vue";
import message from "../components/message.vue";
2024-05-23 09:37:51 +08:00
import question from "../components/question.vue";
2024-07-11 10:19:28 +08:00
import officialAccount from "../components/officialAccount.vue";
import miniProgram from "../components/miniProgram.vue";
2024-05-23 09:37:51 +08:00
import { signrouteadd } from "@/api/system/ManuallyCreatingTasks";
import { getAgencytype } from "@/api/system/agency";
2024-07-11 10:19:28 +08:00
import { list, triggerCondition, getList, } from "@/api/system/specialDiseaseNode";
2024-05-23 09:37:51 +08:00
2024-04-08 17:21:26 +08:00
export default {
2024-07-11 10:19:28 +08:00
components: { scriptphone, question, propaganda, scripts, message, officialAccount, miniProgram },
2024-05-23 09:37:51 +08:00
name: "ManuallyCreatingTasks",
data() {
return {
2024-07-11 11:10:08 +08:00
heightLine: 0,
2024-07-11 10:19:28 +08:00
optionsname: '',
2024-05-23 09:37:51 +08:00
options: [],
2024-06-18 14:50:35 +08:00
optionslist: [],
optionslistS: [],
2024-07-11 10:19:28 +08:00
optionslisttime: [],
2024-05-23 09:37:51 +08:00
parentDictCodelist: [],
updata: {
signPatientRecordId: "",
patientId: "",
patientName: "",
departmentId: "",
departmentName: "",
routeName: "",
suitRange: "",
routeNodeList: [],
triggerConditionList: [
{
routeId: "",
routeName: "",
triggerConditionName: "",
triggerConditionOperator: "",
triggerConditionValue: "",
},
],
},
formInline: {
routeNodeDay: "",
2024-07-11 15:20:13 +08:00
taskNodeType: "",
2024-05-23 09:37:51 +08:00
routeNodeName: "",
2024-07-11 15:20:13 +08:00
// questionExpirationDate: 7,
2024-05-23 09:37:51 +08:00
questionInfoId: "",
questionnaireName: "",
phoneId: "",
phoneTemplateName: "",
propagandaInfoId: "",
propagandaTitle: "",
textRemindContent: "",
officialPushSign: "0",
messagePushSign: "0",
appletPushSign: "0",
2024-07-11 15:20:13 +08:00
phonePushSign: "1",
phoneDialMethod: "",
2024-05-23 09:37:51 +08:00
},
2024-07-10 09:54:40 +08:00
// updata: {
// suitRange: "",
// routeId: "",
// triggerConditionList: [],
// },
2024-05-23 09:37:51 +08:00
list: [
{
routeNodeDay: "",
2024-07-11 15:20:13 +08:00
taskNodeType: "",
2024-05-23 09:37:51 +08:00
routeNodeName: "",
2024-07-11 15:20:13 +08:00
// questionExpirationDate: 7,
2024-05-23 09:37:51 +08:00
questionInfoId: "",
questionnaireName: "",
phoneId: "",
phoneTemplateName: "",
propagandaInfoId: "",
propagandaTitle: "",
textRemindContent: "",
officialPushSign: "0",
messagePushSign: "0",
appletPushSign: "0",
2024-07-11 15:20:13 +08:00
phonePushSign: "1",
phoneDialMethod: "",
2024-05-23 09:37:51 +08:00
},
],
listindex: 0,
2024-07-10 09:54:40 +08:00
optionstriggerConditionOperator: [], // 将这部分选项的
dictDataType: "",
2024-05-23 09:37:51 +08:00
};
},
created() {
this.infolist();
2024-06-18 14:50:35 +08:00
this.infolistword();
this.infolistMESSAGE();
2024-07-10 09:54:40 +08:00
this.infolistoptionslistS();
this.optiononditionOperators();
this.optiononditionOperator();
2024-05-23 09:37:51 +08:00
this.formInline = this.list[0];
this.updata.signPatientRecordId = this.$route.query.signPatientRecordId;
this.updata.patientId = this.$route.query.patientId;
this.updata.patientName = this.$route.query.patientName;
this.updata.departmentId = this.$route.query.departmentId;
this.updata.departmentName = this.$route.query.departmentName;
},
2024-07-11 11:10:08 +08:00
mounted() {
this.getMaxTableHeight()
this.screenChange()
},
2024-05-23 09:37:51 +08:00
methods: {
2024-07-11 15:20:13 +08:00
//点击任务内容
taskNodeTypechange(e) {
if (e == 'PHONE_OUTBOUND') {
this.formInline.phoneDialMethod = 'AI'
} else {
this.formInline.phoneDialMethod = ''
}
},
2024-07-11 10:19:28 +08:00
// 且或
infolistoptionslistS() {
2024-07-10 09:54:40 +08:00
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.updata.triggerConditionList.optionstriggerConditionOperator = res.data;
});
},
// 包含
changetriggerLogic(e, index) {
// this.openlist.triggerConditionList[index].triggerConditionOperatorName =
// this.openlist.triggerConditionList[index].optionstriggerConditionOperator.find(
// (el) => el.dictValue == e
// ).dictLabel;
this.updata.triggerConditionList[index].triggerConditionValue = null;
},
// 诊断
changetriggerConditionName(e, index) {
var dictType = e;
getAgencytype(dictType).then((res) => {
this.ConditionValue = res.data;
});
this.updata.triggerConditionList[index].triggerConditionName =
this.optionsname.find((el) => el.dictValue == e).dictLabel;
this.updata.triggerConditionList[index].triggerConditionValue = null;
this.updata.triggerConditionList[index].triggerConditionOperator = null
2024-07-15 09:11:47 +08:00
this.dictDataType = this.optionsname.find((el) => el.dictValue == e).dictDataType;
2024-07-10 09:54:40 +08:00
this.handlelist(index)
this.updata.triggerConditionList[index].dictDataType =
this.optionsname.find((el) => el.dictValue == e).dictDataType;
},
// 包含或等号接口
handlelist(index) {
var dictType = "trigger_condition_operator";
// this.openlist.triggerConditionList[index].optionstriggerConditionOperator=[]
getList(dictType, this.dictDataType).then((res) => {
this.$set(this.updata.triggerConditionList[index], 'optionstriggerConditionOperator', res.data)
this.$forceUpdate();
});
},
2024-07-11 10:19:28 +08:00
// 包含
optiononditionOperator() {
2024-07-10 09:54:40 +08:00
var dictType = "trigger_condition_operator";
getAgencytype(dictType).then((res) => {
this.updata.triggerConditionList.optionstriggerConditionOperator = res.data;
});
},
// 且或
changetriggerLogicsname(e, index) {
this.updata.triggerConditionList[index].triggerLogic = e;
2024-07-15 09:11:47 +08:00
this.updata.triggerConditionList[index].triggerLogicName = this.optionslistS.find((el) => el.dictValue == e).dictLabel;
2024-07-10 09:54:40 +08:00
},
// 弹框确定
// submit() {
// const loading = this.$loading({
// lock: true,
// text: "Loading",
// spinner: "el-icon-loading",
// background: "rgba(0, 0, 0, 0.7)",
// });
// this.updata.triggerConditionList.forEach((e) => {
// e.routeId = this.$route.query.id;
// e.routeName = this.$route.query.routeName;
// delete e.optionstriggerConditionOperator
// });
// delete this.updata.triggerConditionList.optionstriggerConditionOperator
// loading.close();
// return;
// triggerCondition(this.updata).then((res) => {
// if (res.code == 200) {
// this.$notify({
// type: "success",
// title: "提示",
// message: "修改触发条件成功",
// });
// this.itemlist.routeName = res.data;
// }
// this.infolist();
// // this.handlelist();
// this.openfalse();
// });
// },
2024-05-23 09:37:51 +08:00
infolist() {
var dictType = "suit_range";
getAgencytype(dictType).then((res) => {
this.options = res.data;
});
2024-04-08 17:21:26 +08:00
},
2024-06-18 14:50:35 +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) => {
2024-07-10 09:54:40 +08:00
this.optionslisttime = res.data;
2024-06-18 14:50:35 +08:00
// this.taskinfo();
});
},
2024-05-23 09:37:51 +08:00
changeoptions(e) {
this.parentDictCode = this.options.find(
(el) => el.dictValue == e
).dictCode;
2024-05-23 09:37:51 +08:00
this.changelisy();
2024-04-08 17:21:26 +08:00
},
2024-05-23 09:37:51 +08:00
changelisy() {
list(this.parentDictCode).then((res) => {
this.parentDictCodelist = res.rows;
});
2024-07-10 09:54:40 +08:00
},
2024-07-11 10:19:28 +08:00
// 删除属性
delitemlistname(index, item) {
2024-07-10 09:54:40 +08:00
this.updata.triggerConditionList.splice(index, 1);
2024-07-11 11:10:08 +08:00
setTimeout(() => {
this.getMaxTableHeight()
}, 20);
2024-05-23 09:37:51 +08:00
},
addtriggerCondition() {
2024-07-10 09:54:40 +08:00
var obj = {
2024-05-23 09:37:51 +08:00
routeId: "",
routeName: "",
triggerConditionName: "",
triggerConditionOperator: "",
triggerConditionValue: "",
2024-07-10 09:54:40 +08:00
triggerConditionOperatorName: "",
dictDataType: "STRING",
triggerLogic: "AND",
triggerLogicName: "",
};
if (this.updata.triggerConditionList.length == 3) {
this.$message.error("至多仅支持两种属性");
} else {
this.updata.triggerConditionList.push(obj);
}
2024-07-11 11:10:08 +08:00
setTimeout(() => {
this.getMaxTableHeight()
}, 20);
2024-05-23 09:37:51 +08:00
},
//宣教传值
propagandaontemplate(item) {
this.formInline.propagandaInfoId = item.templateId;
this.formInline.propagandaTitle = item.templateName;
},
//问卷传值
questionontemplate(item) {
2024-07-11 15:20:13 +08:00
if (this.formInline.taskNodeType == "ARTIFICIAL_FOLLOW_UP") {
2024-06-28 11:49:57 +08:00
this.formInline.followTemplateId = item.templateId;
this.formInline.followTemplateName = item.templateName;
2024-05-23 09:37:51 +08:00
} else {
this.formInline.questionInfoId = item.templateId;
this.formInline.questionnaireName = item.templateName;
}
},
//话术传值
scriptphoneontemplate(item) {
this.formInline.phoneId = item.templateId;
this.formInline.phoneTemplateName = item.templateName;
},
2024-06-18 14:50:35 +08:00
// 短信
messageontemplateMESSAGE(item) {
this.formInline.phoneMessageTemplateId = item.templateId;
this.formInline.phoneMessageTemplateName = item.templateName;
2024-07-12 17:05:10 +08:00
},
messageontemplateMESSAGEtwo(item) {
this.formInline.messageTemplateId = item.templateId;
this.formInline.messageTemplateName = item.templateName;
2024-06-18 14:50:35 +08:00
},
// 话术
messageontemplateword(item) {
2024-06-18 17:27:03 +08:00
this.formInline.phoneId = item.templateId;
2024-06-18 14:50:35 +08:00
this.formInline.phoneTemplateName = item.templateName;
},
2024-07-11 10:19:28 +08:00
//公众号传值
officialAccountontemplate(item) {
this.formInline.officialTemplateId = item.templateId;
this.formInline.officialTemplateName = item.templateName;
this.formInline.officialRemindContent = item.templateContent;
},
//小程序传值
miniProgramtemplate(item) {
this.formInline.appletTemplateId = item.templateId;
this.formInline.appletTemplateName = item.templateName;
this.formInline.appletRemindContent = item.templateContent;
},
2024-05-23 09:37:51 +08:00
clicktimelineitem(item, index) {
this.formInline = item;
this.listindex = index;
},
additem(item) {
2024-07-11 11:10:08 +08:00
if (this.parentDictCode) {
list(this.parentDictCode).then((res) => {
res.rows.forEach((e) => {
this.list.forEach((el) => {
2024-07-12 09:38:07 +08:00
el.routeNodeName = e.dictValue;
2024-07-11 11:10:08 +08:00
});
2024-05-23 09:37:51 +08:00
});
});
2024-07-11 11:10:08 +08:00
}
2024-05-23 09:37:51 +08:00
this.list.push({
routeNodeDay: "",
2024-07-11 15:20:13 +08:00
taskNodeType: "",
2024-05-23 09:37:51 +08:00
routeNodeName: "",
2024-07-11 15:20:13 +08:00
// questionExpirationDate: 7,
2024-05-23 09:37:51 +08:00
questionInfoId: "",
questionnaireName: "",
phoneId: "",
phoneTemplateName: "",
propagandaInfoId: "",
propagandaTitle: "",
textRemindContent: "",
officialPushSign: "0",
messagePushSign: "0",
appletPushSign: "0",
2024-07-11 15:20:13 +08:00
phonePushSign: "1",
2024-07-12 09:51:22 +08:00
phoneDialMethod: "",
2024-05-23 09:37:51 +08:00
});
},
delitem(item, index, list) {
list.splice(index, 1);
},
2024-07-11 10:19:28 +08:00
changephoneDialMethod(e) {
if (e == 'AI') {
// this.form.templateId=''
2024-07-11 10:19:28 +08:00
this.formInline.phoneId = ''
this.formInline.phoneTemplateName = ''
} else if (e == 'COMMON') {
this.formInline.questionInfoId = ''
this.formInline.questionInfoName = ''
this.formInline.phoneId = ''
this.formInline.phoneTemplateName = ''
}
},
2024-05-23 09:37:51 +08:00
upload() {
2024-07-12 09:19:31 +08:00
this.$confirm('保存此任务, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(() => {
this.updata.routeNodeList = this.list;
// this.updata.routeNodeList.forEach((el) => {
// if (el.phoneDialMethod == "COMMON" && el.questionInfoId) {
// el.templateType = "QUESTIONNAIRE";
// } else if (el.phoneDialMethod == "COMMON" && el.phoneId) {
// el.templateType = "SCRIPT";
// } else if (el.phoneDialMethod == "AI" && el.phoneId) {
// el.templateType = "SCRIPT";
// }
// });
this.updata.triggerConditionList.forEach((e) => {
e.routeId = this.$route.query.id;
e.routeName = this.$route.query.routeName;
delete e.optionstriggerConditionOperator
2024-05-23 09:37:51 +08:00
});
2024-07-12 09:19:31 +08:00
delete this.updata.triggerConditionList.optionstriggerConditionOperator
// return
signrouteadd(this.updata).then((res) => {
this.$notify({
type: "success",
title: "提示",
message: "保存成功,即将返回签约患者列表",
duration: 3000,
});
setTimeout(() => {
this.$store
.dispatch("tagsView/delView", this.$route)
.then(({ visitedViews }) => {
this.$router.push({
path: "/patient/signRecord",
});
2024-05-23 09:37:51 +08:00
});
2024-07-12 09:19:31 +08:00
}, 3000);
});
})
2024-05-23 09:37:51 +08:00
},
2024-07-11 11:10:08 +08:00
// 获取表格最高高度
getMaxTableHeight() {
const windowInnerHeight = window.innerHeight // 屏幕可视高度
const layoutDiv = this.$refs.layout
this.heightLine =
windowInnerHeight - 84 -
this.getBoxHeight(layoutDiv)
},
// 屏幕resize监听
screenChange() {
// 屏幕resize监听事件一旦屏幕宽高发生变化就会执行resize
window.addEventListener('resize', this.getMaxTableHeight, true)
// 将屏幕监听事件移除
// 这步是必须的。离开页面时不移除,再返回,或者进入到别的有相同元素的页面会报错
// 或者将这里的方法直接写在beforeDestroy函数中也可以
this.$once('hook:beforeDestroy', () => {
window.removeEventListener('resize', this.getMaxTableHeight, true)
})
},
2024-05-23 09:37:51 +08:00
},
2024-04-08 17:21:26 +08:00
};
2024-04-09 11:15:30 +08:00
</script>
<style lang="scss" scoped>
2024-07-16 09:54:06 +08:00
.titlemengt {
width: 98.5%;
border-radius: 10px;
padding: 10px 20px;
margin: 0 auto;
background-color: #fff;
position: relative;
}
2024-07-11 11:10:08 +08:00
::-webkit-scrollbar {
width: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
background: #C0C0C0;
}
::-webkit-scrollbar-track {
width: 5px;
}
2024-04-09 16:40:09 +08:00
.chufatitle {
2024-05-23 09:37:51 +08:00
display: flex;
align-items: center;
2024-04-09 16:40:09 +08:00
2024-05-23 09:37:51 +08:00
span {
margin-right: 30px;
font-size: 16px;
font-weight: bold;
}
2024-04-09 16:40:09 +08:00
}
2024-07-11 11:10:08 +08:00
2024-07-10 09:54:40 +08:00
.login-code-img {
2024-07-11 11:52:23 +08:00
width: 84px;
2024-07-10 09:54:40 +08:00
height: 100px;
position: absolute;
2024-07-11 11:52:23 +08:00
// background: red;
2024-07-10 09:54:40 +08:00
z-index: 0;
position: absolute;
2024-07-11 11:10:08 +08:00
top: -90%;
2024-07-10 09:54:40 +08:00
}
2024-07-11 11:10:08 +08:00
2024-06-18 14:50:35 +08:00
.PushMethodrg {
background-color: #fff;
width: 100%;
height: 200px;
margin: 20px 0 0;
padding: 20px 50px 0px 20px;
2024-06-18 17:27:03 +08:00
border-radius: 10px;
2024-06-18 14:50:35 +08:00
.flex {
display: flex;
width: 100%;
align-items: center;
// background: red;
justify-content: space-between;
.itemlist {
height: 30px;
margin-top: 30px;
line-height: 30px;
2024-07-11 10:19:28 +08:00
font-size: 14px;
2024-06-18 14:50:35 +08:00
color: #64666a;
2024-07-11 11:10:08 +08:00
2024-06-18 14:50:35 +08:00
.spanname {
pointer-events: none;
}
2024-07-11 11:10:08 +08:00
2024-06-18 14:50:35 +08:00
::v-deep .el-input__inner {
color: black;
2024-07-11 10:19:28 +08:00
font-size: 14px;
2024-06-18 14:50:35 +08:00
}
span {
color: black;
2024-07-11 10:19:28 +08:00
font-size: 14px;
2024-06-18 14:50:35 +08:00
}
}
}
}
2024-04-09 16:40:09 +08:00
2024-07-10 09:54:40 +08:00
.nodesname {
2024-07-11 11:10:08 +08:00
2024-07-10 09:54:40 +08:00
// margin-left: 6%;
// width: 660px;
// display: flex;
// flex-wrap: wrap;
// position: relative;
// padding-left: 20px;
2024-07-11 11:10:08 +08:00
2024-07-10 09:54:40 +08:00
.node {
2024-07-11 10:19:28 +08:00
margin-bottom: 10px;
margin-left: 102px;
2024-04-12 16:08:56 +08:00
2024-07-11 10:19:28 +08:00
.el-icon-delete {
padding-left: 10px;
}
2024-05-23 09:37:51 +08:00
}
2024-04-09 16:40:09 +08:00
}
2024-07-11 11:10:08 +08:00
2024-07-10 09:54:40 +08:00
.selectnamelist {
// position: absolute;
// right: 54px;
// top: -8px;
}
2024-04-09 14:59:14 +08:00
.PushMethod {
2024-05-23 09:37:51 +08:00
height: 100px;
padding: 20px;
line-height: 60px;
margin-top: 10px;
border-radius: 10px;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
2024-04-09 14:59:14 +08:00
}
2024-07-16 09:54:06 +08:00
2024-04-09 11:15:30 +08:00
.nodes {
2024-07-11 11:10:08 +08:00
// height: var(--heightLine);
2024-05-23 09:37:51 +08:00
background-color: #f1f3f5;
// height: 700px;
2024-07-11 11:10:08 +08:00
// height: calc(100vh - 300px);
2024-05-23 09:37:51 +08:00
display: flex;
2024-07-11 11:10:08 +08:00
justify-content: space-evenly;
padding-top: 10px;
2024-04-09 13:10:50 +08:00
2024-05-23 09:37:51 +08:00
.nodenames {
border-radius: 10px;
background-color: #fff;
2024-07-11 11:10:08 +08:00
// height: calc(100vh - 320px);
height: 100%;
2024-05-23 09:37:51 +08:00
width: 25%;
padding: 0 40px 20px 40px;
background-color: #fff;
2024-07-11 11:10:08 +08:00
overflow-y: scroll;
2024-04-09 13:10:50 +08:00
2024-05-23 09:37:51 +08:00
.timetitle {
height: 60px;
display: flex;
align-items: center;
justify-content: space-between;
2024-04-09 11:15:30 +08:00
}
2024-05-23 09:37:51 +08:00
::v-deep .el-timeline {
width: 100%;
padding: 15px 0 0 !important;
2024-04-09 11:15:30 +08:00
}
2024-05-23 09:37:51 +08:00
}
2024-04-09 11:15:30 +08:00
2024-05-23 09:37:51 +08:00
.nodetexts {
padding-bottom: 20px;
2024-07-11 11:10:08 +08:00
overflow-y: scroll;
2024-05-23 09:37:51 +08:00
border-radius: 10px;
width: 73%;
2024-07-11 11:10:08 +08:00
// height: calc(100vh - 320px);
height: 100%;
2024-05-23 09:37:51 +08:00
}
}
2024-04-09 11:15:30 +08:00
.top {
2024-05-23 09:37:51 +08:00
display: flex;
justify-content: space-between;
align-items: center;
.toptop {
2024-04-09 11:15:30 +08:00
display: flex;
align-items: center;
2024-05-23 09:37:51 +08:00
}
2024-04-09 11:15:30 +08:00
2024-05-23 09:37:51 +08:00
span {
padding: 0 4px;
}
2024-04-09 11:15:30 +08:00
2024-05-23 09:37:51 +08:00
i {
font-size: 17px;
}
2024-04-09 11:15:30 +08:00
2024-05-23 09:37:51 +08:00
i:nth-child(2) {
padding-left: 12px;
}
2024-04-09 11:15:30 +08:00
}
::v-deep .el-timeline-item__timestamp {
2024-05-23 09:37:51 +08:00
margin: 0 !important;
padding: 0 !important;
2024-04-09 11:15:30 +08:00
}
.cards {
2024-05-23 09:37:51 +08:00
border: 1px solid #409eff;
border-left: 5px solid #409eff;
2024-04-09 11:15:30 +08:00
}
::v-deep .el-timeline-item__wrapper {
2024-05-23 09:37:51 +08:00
padding-left: 20px !important;
2024-04-09 11:15:30 +08:00
}
::v-deep .el-timeline-item__content {
2024-05-23 09:37:51 +08:00
transform: translateY(-2%);
2024-04-09 11:15:30 +08:00
}
::v-deep .el-card {
2024-05-23 09:37:51 +08:00
margin-top: 20px !important;
2024-04-09 11:15:30 +08:00
}
.dialog-footer {
2024-05-23 09:37:51 +08:00
display: inline-block;
float: right;
2024-04-09 11:15:30 +08:00
}
2024-07-11 11:10:08 +08:00
::v-deep .el-form-item__content {
2024-06-18 14:50:35 +08:00
display: inline-block !important;
}
</style>