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

1840 lines
53 KiB
Vue
Raw Normal View History

2024-04-03 14:56:22 +08:00
<template>
2024-06-18 18:19:57 +08:00
<div class="app-container">
2024-06-20 15:02:44 +08:00
<el-descriptions title="编辑触发条件" style="height: 25px; width: 99px" />
2024-06-20 08:54:06 +08:00
2024-06-18 18:19:57 +08:00
<div class="title">
2024-06-20 08:54:06 +08:00
<!-- <div >触发条件</div> -->
2024-06-18 18:19:57 +08:00
<div class="nodes">
2024-06-20 08:54:06 +08:00
<!-- 一级 -->
<div class="node" v-if="updata">
2024-06-21 14:06:29 +08:00
<!-- {{ updata.length }} -->
2024-06-21 10:57:35 +08:00
<el-select
2024-06-24 14:25:37 +08:00
v-model="updata.triggerConditionName"
2024-06-21 10:57:35 +08:00
style="width: 120px"
disabled
@change="changetriggerConditionName($event, index)"
>
<el-option
v-for="item in optionsname"
2024-06-24 14:25:37 +08:00
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
2024-06-21 10:57:35 +08:00
>
2024-06-18 18:19:57 +08:00
</el-option>
2024-06-20 08:54:06 +08:00
</el-select>
2024-06-21 10:57:35 +08:00
<el-select
disabled
2024-06-24 14:25:37 +08:00
v-model="updata.triggerConditionOperatorName"
2024-06-21 10:57:35 +08:00
style="width: 100px"
@change="changetriggerLogic($event, index)"
>
<el-option
v-for="item in optionstriggerConditionOperator"
2024-06-24 14:25:37 +08:00
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
2024-06-21 10:57:35 +08:00
>
2024-06-18 18:19:57 +08:00
</el-option>
</el-select>
2024-06-20 08:54:06 +08:00
2024-06-21 10:57:35 +08:00
<el-input
disabled
v-if="updata.triggerConditionCode != 'DRESSING_CHANGE_DATE'"
v-model="updata.triggerConditionValue"
style="width: 300px"
></el-input>
<el-date-picker
disabled
v-if="updata.triggerConditionCode == 'DRESSING_CHANGE_DATE'"
v-model="updata.triggerConditionValue"
style="width: 300px"
type="date"
placeholder="选择日期时间"
value-format="yyyy-MM-dd"
>
2024-06-18 18:19:57 +08:00
</el-date-picker>
2024-06-20 08:54:06 +08:00
</div>
<!-- 二级 -->
<div v-show="show3 == true">
<div class="node" v-for="(item, index) in updatalist" :key="index">
2024-06-21 10:57:35 +08:00
<div
style="width: 60px; position: absolute; top: 8%"
v-if="updatalist.length == 2"
>
2024-06-20 08:54:06 +08:00
<img src="@/assets/images/images.png" class="login-code-img" />
<div class="selectname">
2024-06-21 10:57:35 +08:00
<el-select
disabled
v-model="item.triggerLogic"
style="width: 60px"
@change="changetriggerLogicsname($event, index)"
>
<el-option
v-for="item in optionslistS"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
2024-06-20 08:54:06 +08:00
</el-option>
</el-select>
</div>
</div>
<div>
2024-06-21 10:57:35 +08:00
<el-select
2024-06-24 14:25:37 +08:00
v-model="item.triggerConditionName"
2024-06-21 10:57:35 +08:00
style="width: 120px"
disabled
@change="changetriggerConditionName($event, index)"
>
<el-option
v-for="item in optionsname"
:key="item.value"
:label="item.label"
:value="item.value"
>
2024-06-20 08:54:06 +08:00
</el-option>
</el-select>
2024-06-21 10:57:35 +08:00
<el-select
disabled
2024-06-24 14:25:37 +08:00
v-model="item.triggerConditionOperatorName"
2024-06-21 10:57:35 +08:00
style="width: 100px"
@change="changetriggerLogic($event, index)"
>
<el-option
v-for="item in optionstriggerConditionOperator"
:key="item.value"
:label="item.label"
:value="item.value"
>
2024-06-20 08:54:06 +08:00
</el-option>
</el-select>
2024-06-21 10:57:35 +08:00
<el-input
v-if="item.triggerConditionCode != 'DRESSING_CHANGE_DATE'"
v-model="item.triggerConditionValue"
style="width: 300px"
disabled
></el-input>
<el-date-picker
disabled
v-if="item.triggerConditionCode == 'DRESSING_CHANGE_DATE'"
v-model="item.triggerConditionValue"
style="width: 300px"
type="date"
placeholder="选择日期时间"
value-format="yyyy-MM-dd"
>
2024-06-20 08:54:06 +08:00
</el-date-picker>
</div>
</div>
2024-06-18 18:19:57 +08:00
</div>
</div>
2024-06-20 08:54:06 +08:00
2024-06-18 18:19:57 +08:00
<div class="select">
<span> 适用范围 </span>
2024-06-21 11:22:58 +08:00
<el-select v-model="updata.suitRange" placeholder="请选择" disabled>
2024-06-21 10:57:35 +08:00
<el-option
v-for="item in options"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
2024-06-18 18:19:57 +08:00
</el-option>
</el-select>
</div>
2024-06-20 08:54:06 +08:00
<div class="addlistname">
<i @click="edit()" class="el-icon-edit">编辑</i>
2024-06-20 14:09:15 +08:00
<span v-if="updatalist.length > 0">
2024-06-21 10:57:35 +08:00
<i
@click="addlistname()"
class="el-icon-arrow-down"
v-if="show3 == false"
>展开</i
>
2024-06-20 14:09:15 +08:00
<i @click="addlistname()" class="el-icon-arrow-up" v-else>关闭</i>
</span>
2024-06-20 08:54:06 +08:00
</div>
2024-06-18 18:19:57 +08:00
</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-06-21 10:57:35 +08:00
<el-timeline-item
v-for="(item, index) in lists"
:key="index"
:color="listindex == index ? '#409EFF' : ''"
>
2024-06-20 14:09:15 +08:00
<div class="top">
2024-06-18 18:19:57 +08:00
<div class="toptop">
2024-06-24 14:25:37 +08:00
<el-select v-model="item.routeNodeName" style="width: 100px" @change="changetoday">
2024-06-21 10:57:35 +08:00
<el-option
v-for="item in parentDictCodelist"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
2024-06-20 14:09:15 +08:00
</el-option>
2024-04-03 14:56:22 +08:00
</el-select>
2024-06-21 10:57:35 +08:00
<el-input
v-model="item.routeNodeDay"
style="width: 70px"
type="number"
:min="0"
></el-input>
2024-06-18 18:19:57 +08:00
<span></span>
</div>
<div>
2024-06-21 09:22:21 +08:00
<i class="el-icon-delete" @click="delitemh(item, index)"></i>
2024-06-21 10:57:35 +08:00
<i
class="el-icon-circle-plus-outline"
@click="additem(item)"
></i>
2024-06-18 18:19:57 +08:00
</div>
2024-04-03 14:56:22 +08:00
</div>
2024-06-21 10:57:35 +08:00
<el-card
v-for="(uitem, uindex) in item.list"
:key="uitem.id"
2024-06-18 18:19:57 +08:00
@click.native="bottomclickevent(uitem, index, uindex)"
2024-06-21 10:57:35 +08:00
:class="listindex == index && itemindex == uindex ? 'cards' : ''"
>
2024-06-18 18:19:57 +08:00
<h3 style="height: 20px">{{ uitem.taskTypeName }}</h3>
2024-06-21 10:57:35 +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-06-18 18:19:57 +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-06-21 10:57:35 +08:00
<el-select
v-model="form.taskType"
style="width: 110px"
@change="changeTaskType"
>
<el-option
v-for="item in selectTaskTypeList"
:key="item.taskTypeCode"
:label="item.taskTypeName"
:value="item.taskTypeCode"
>
2024-06-18 18:19:57 +08:00
</el-option>
</el-select>
</el-form-item>
<el-form-item label="任务细分" prop="">
2024-06-21 10:57:35 +08:00
<el-select
v-model="form.taskSubdivision"
style="width: 110px"
@change="changetaskSubdivision"
>
<el-option
v-for="item in taskPartitionList"
:key="item.taskPartitionCode"
:label="item.taskPartitionName"
:value="item.taskPartitionCode"
>
2024-06-18 18:19:57 +08:00
</el-option>
</el-select>
</el-form-item>
<el-form-item label="任务状态" prop="">
<el-select v-model="form.taskStatus" style="width: 100px">
2024-06-21 10:57:35 +08:00
<el-option
v-for="item in taskStatusDictList"
:key="item.id"
:label="item.taskStatusName"
:value="item.taskStatusCode"
>
2024-06-18 18:19:57 +08:00
</el-option>
</el-select>
</el-form-item>
<el-form-item label="二级分类描述" prop="">
2024-06-21 10:57:35 +08:00
<el-input
v-model="form.secondClassifyDescribe"
style="width: 110px"
disabled
></el-input>
2024-06-18 18:19:57 +08:00
</el-form-item>
<el-form-item label="执行时间" prop="">
2024-06-21 10:57:35 +08:00
<el-time-select
v-model="form.executionTime"
style="width: 120px"
placeholder="选择时间"
disabled
>
2024-06-18 18:19:57 +08:00
</el-time-select>
</el-form-item>
2024-06-21 10:57:35 +08:00
<el-form-item
label="问卷库模板选择"
prop=""
v-if="form.taskSubdivisiontemplateType == 'QUESTIONNAIRE'"
>
<question
@on-template="questionontemplate"
:templateId="form.templateId"
:templateName="form.templateName"
></question>
2024-06-18 18:19:57 +08:00
</el-form-item>
2024-06-21 10:57:35 +08:00
<el-form-item
label="宣教库模板选择"
prop=""
v-if="form.taskSubdivisiontemplateType == 'PROPAGANDA'"
>
<propaganda
@on-template="propagandaontemplate"
:templateId="form.templateId"
:templateName="form.templateName"
></propaganda>
2024-06-18 18:19:57 +08:00
</el-form-item>
</el-form>
2024-04-03 14:56:22 +08:00
</div>
2024-06-18 18:19:57 +08:00
<div class="bottomform">
2024-06-21 10:57:35 +08:00
<wangeditor
style="width: 100%"
:nodeContent="form.nodeContent"
@on-nodeContent="onNodeContent"
v-show="
form.taskSubdivisiontemplateType != 'QUESTIONNAIRE' &&
form.taskSubdivisiontemplateType != 'PROPAGANDA' &&
form.taskSubdivisiontemplateType != 'SCRIPT'
"
ref="wangeditor"
/>
<div
class="card"
v-show="form.taskSubdivisiontemplateType != 'SCRIPT'"
>
2024-06-18 18:19:57 +08:00
<div class="flex">
<div class="pushMethod">
推送方式
<span> 短信 </span>
</div>
<div class="pushMethod">
模板
2024-06-21 10:57:35 +08:00
<message
@on-template="messageontemplate"
:templateId="form.messageTemplateId"
:templateName="form.messageTemplateName"
></message>
2024-06-18 18:19:57 +08:00
</div>
<div class="pushMethod">
2024-06-21 10:57:35 +08:00
<el-switch
v-model="form.messagePushSign"
active-color="#13ce66"
active-value="1"
inactive-value="0"
>
2024-06-18 18:19:57 +08:00
</el-switch>
</div>
2024-04-03 14:56:22 +08:00
</div>
2024-06-18 18:19:57 +08:00
</div>
2024-06-21 10:57:35 +08:00
<div
class="card"
v-show="form.taskSubdivisiontemplateType != 'SCRIPT'"
>
2024-06-18 18:19:57 +08:00
<div class="flex">
<div class="pushMethod">
推送方式
<span> 公众号 </span>
</div>
<div class="pushMethod">
模板
<span>
2024-06-21 10:57:35 +08:00
<officialAccount
@on-template="officialAccountontemplate"
:templateId="form.officialTemplateId"
:templateName="form.officialTemplateName"
>
2024-06-20 14:09:15 +08:00
</officialAccount>
2024-06-18 18:19:57 +08:00
</span>
</div>
<div class="pushMethod">
2024-06-21 10:57:35 +08:00
<el-switch
v-model="form.officialPushSign"
active-color="#13ce66"
active-value="1"
inactive-value="0"
>
2024-06-18 18:19:57 +08:00
</el-switch>
</div>
</div>
</div>
2024-06-21 10:57:35 +08:00
<div
class="card"
v-show="form.taskSubdivisiontemplateType != 'SCRIPT'"
>
2024-06-18 18:19:57 +08:00
<div class="flex">
<div class="pushMethod">
推送方式
<span> 小程序 </span>
</div>
<div class="pushMethod">
模板
<span>
2024-06-21 10:57:35 +08:00
<miniProgram
@on-template="miniProgramtemplate"
:templateId="form.appletTemplateId"
:templateName="form.appletTemplateName"
>
2024-06-20 14:09:15 +08:00
</miniProgram>
2024-06-18 18:19:57 +08:00
</span>
</div>
<div class="pushMethod">
2024-06-21 10:57:35 +08:00
<el-switch
v-model="form.appletPushSign"
active-color="#13ce66"
active-value="1"
inactive-value="0"
>
2024-06-18 18:19:57 +08:00
</el-switch>
</div>
</div>
2024-06-20 14:09:15 +08:00
</div>
2024-06-21 10:57:35 +08:00
<div
class="card"
style="height: 250px"
v-show="form.taskSubdivisiontemplateType == 'SCRIPT'"
>
2024-06-20 14:09:15 +08:00
<div class="flex">
<div class="pushMethod">
推送方式
<span> 人工电话 </span>
</div>
<div class="pushMethod">
模板
2024-06-21 10:57:35 +08:00
<scripts
@on-template="messageontemplateword"
:templateId="form.phoneTemplateId"
:templateName="form.phoneTemplateName"
></scripts>
2024-06-20 14:09:15 +08:00
</div>
<div class="pushMethod">
2024-06-21 10:57:35 +08:00
<el-switch
v-model="form.phonePushSign"
active-color="#13ce66"
active-value="1"
inactive-value="0"
>
2024-06-20 14:09:15 +08:00
</el-switch>
</div>
</div>
<div class="flex">
<div class="pushMethod">
重播次数
<span>
2024-06-21 10:57:35 +08:00
<el-select
v-model="form.phoneRedialTimes"
style="width: 100px"
>
<el-option
v-for="item in optionslistSname"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
2024-06-20 14:09:15 +08:00
</el-option>
</el-select>
</span>
</div>
<div class="pushMethod">
时间间隔:
<span>
2024-06-21 10:57:35 +08:00
<el-input
v-model.number="form.phoneTimeInterval"
oninput="value=value.replace(/[^\d]/g,'')"
style="width: 100px"
>
2024-06-20 14:09:15 +08:00
</el-input>
</span>
</div>
<div class="pushMethod">
短信提醒
2024-06-21 10:57:35 +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-20 14:09:15 +08:00
</el-option>
</el-select>
</div>
<div class="pushMethod">
短信模板
2024-06-21 10:57:35 +08:00
<span
class="spanname"
v-if="form.phoneMessageRemind == 'NOT_SEND_MESSAGE'"
>
<message
style="width: 200px"
@on-template="messageontemplateMESSAGE"
:templateId="form.phoneMessageTemplateId"
:templateName="form.phoneMessageTemplateName"
></message>
2024-06-20 14:09:15 +08:00
</span>
<span v-else>
2024-06-21 10:57:35 +08:00
<message
style="width: 200px"
@on-template="messageontemplateMESSAGE"
:templateId="form.phoneMessageTemplateId"
:templateName="form.phoneMessageTemplateName"
></message>
2024-06-20 14:09:15 +08:00
</span>
</div>
2024-06-18 18:19:57 +08:00
</div>
</div>
2024-04-03 14:56:22 +08:00
</div>
2024-06-18 18:19:57 +08:00
</div>
</div>
2024-06-20 14:09:15 +08:00
2024-06-21 10:57:35 +08:00
<!-- 编辑触发条件 -->
<el-dialog
title="添加触发条件"
:visible.sync="open"
width="800px"
append-to-body
>
<el-form
ref="openlist"
:model="openlist"
:rules="rules"
label-width="80px"
>
2024-06-20 08:54:06 +08:00
<el-form-item label="适用范围:">
2024-06-21 10:57:35 +08:00
<el-select
v-model="openlist.suitRange"
@change="changeoptions"
style="width: 200px"
>
<el-option
v-for="item in options"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
2024-06-20 08:54:06 +08:00
</el-option>
</el-select>
</el-form-item>
<el-descriptions title="触发条件"> </el-descriptions>
<div class="nodesname">
2024-06-21 10:57:35 +08:00
<div
class="node"
v-for="(item, index) in openlist.triggerConditionList"
:key="index"
>
2024-06-24 14:25:37 +08:00
<!-- 且或 -->
2024-06-21 10:57:35 +08:00
<div
style="width: 60px; position: absolute; left: 2%; top: 57%"
v-if="openlist.triggerConditionList.length === 3"
>
2024-06-20 08:54:06 +08:00
<img src="@/assets/images/images.png" class="login-code" />
<div class="selectnamelist">
2024-06-21 10:57:35 +08:00
<el-select
v-model="item.triggerLogic"
style="width: 60px"
placeholder=""
@change="changetriggerLogicsname($event, index)"
>
<el-option
v-for="item in optionslistS"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
2024-06-20 08:54:06 +08:00
</el-option>
</el-select>
</div>
</div>
2024-06-24 14:25:37 +08:00
<!-- 诊断 -->
2024-06-21 10:57:35 +08:00
<el-select
v-model="item.triggerConditionCode"
style="width: 120px"
@change="changetriggerConditionName($event, index)"
>
<el-option
v-for="item in optionsname"
2024-06-24 14:25:37 +08:00
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
2024-06-21 10:57:35 +08:00
>
2024-06-20 08:54:06 +08:00
</el-option>
</el-select>
2024-06-24 14:25:37 +08:00
<!-- 包含 -->
2024-06-21 10:57:35 +08:00
<el-select
v-model="item.triggerConditionOperator"
style="width: 100px"
@change="changetriggerLogic($event, index)"
>
<el-option
v-for="item in optionstriggerConditionOperator"
2024-06-24 14:25:37 +08:00
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
2024-06-21 10:57:35 +08:00
>
2024-06-20 08:54:06 +08:00
</el-option>
</el-select>
2024-06-21 10:57:35 +08:00
<el-input
2024-06-24 14:25:37 +08:00
v-if="item.dictDataType == 'STRING'"
2024-06-21 10:57:35 +08:00
v-model="item.triggerConditionValue"
style="width: 300px"
placeholder="请输入触发条件"
2024-06-24 14:25:37 +08:00
maxlength="100"
2024-06-21 10:57:35 +08:00
></el-input>
<el-date-picker
2024-06-24 14:25:37 +08:00
v-if="item.dictDataType == 'DATE'"
2024-06-21 10:57:35 +08:00
v-model="item.triggerConditionValue"
style="width: 300px"
type="date"
placeholder="选择日期时间"
value-format="yyyy-MM-dd"
>
2024-06-20 08:54:06 +08:00
</el-date-picker>
2024-06-24 14:25:37 +08:00
<!-- {{ item }} -->
<el-input
v-if="item.dictDataType == 'DECIMAL'"
style="width: 300px"
v-model="item.triggerConditionValue"
type="number"
:min="0"
></el-input>
2024-06-20 08:54:06 +08:00
<span class="icon">
2024-06-21 10:57:35 +08:00
<el-button
type="danger"
class="el-icon-remove-outline"
plain
@click="delitemlistname(index)"
v-if="index != 0"
></el-button>
2024-06-21 09:34:20 +08:00
2024-06-21 10:57:35 +08:00
<el-button
type="primary"
plain
class="el-icon-circle-plus-outline"
@click="addtriggerCondition(index)"
v-if="index == 0"
>添加属性</el-button
>
2024-06-20 08:54:06 +08:00
</span>
</div>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="upload"> </el-button>
<el-button @click="openfalse"> </el-button>
</div>
</el-dialog>
<!-- 提交审核 -->
2024-06-21 10:57:35 +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-06-20 08:54:06 +08:00
<el-form-item label="节点审核状态" prop="routeCheckStatus">
2024-06-21 10:57:35 +08:00
<el-radio v-model="routeform.routeCheckStatus" label="AGREE"
>同意</el-radio
>
<el-radio v-model="routeform.routeCheckStatus" label="DISAGREE"
>不同意</el-radio
>
2024-06-20 08:54:06 +08:00
</el-form-item>
<el-form-item label="节点审核备注">
2024-06-21 10:57:35 +08:00
<el-input
type="textarea"
:rows="2"
placeholder="请输入节点审核备注"
v-model="routeform.routeCheckRemark"
>
2024-06-20 08:54:06 +08:00
</el-input>
</el-form-item>
</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>
2024-06-20 14:09:15 +08:00
<div slot="footer" class="dialog-footer">
2024-06-18 18:19:57 +08:00
<el-button @click="TemporaryStorage"> </el-button>
2024-06-21 10:57:35 +08:00
<el-button
type="primary"
@click="dialogVisible = true"
v-if="form.specialDiseaseNodeId"
>审核完成 {{ agreeNumber ? agreeNumber : "0" }} /
{{ totalNumber ? totalNumber : "0" }}</el-button
>
2024-06-20 14:09:15 +08:00
</div>
2024-06-18 18:19:57 +08:00
</div>
2024-04-03 14:56:22 +08:00
</template>
<script>
2024-06-18 18:19:57 +08:00
import wangeditor from "../components/wangEditor.vue";
import question from "../components/question.vue";
import message from "../components/message.vue";
2024-06-20 14:09:15 +08:00
import scripts from "../components/script.vue";
2024-06-18 18:19:57 +08:00
import propaganda from "../components/propaganda.vue";
import officialAccount from "../components/officialAccount.vue";
import miniProgram from "../components/miniProgram.vue";
2024-06-20 08:54:06 +08:00
import { getAgencytype } from "@/api/system/agency";
2024-04-03 14:56:22 +08:00
import {
2024-06-18 18:19:57 +08:00
selectTaskTypeList,
taskPartitionList,
taskStatusDictList,
2024-06-20 08:54:06 +08:00
specialDiseaseNode,
triggerCondition,
selectSpecialDisease,
updateRouteCheckStatus,
list,
2024-06-18 18:19:57 +08:00
triggerConditionList,
2024-06-24 14:25:37 +08:00
getList,
2024-06-18 18:19:57 +08:00
} from "@/api/system/specialDiseaseNode";
2024-06-21 14:06:29 +08:00
import Cookies from "js-cookie";
2024-04-03 14:56:22 +08:00
export default {
2024-06-18 18:19:57 +08:00
components: {
wangeditor,
question,
propaganda,
message,
2024-06-20 14:09:15 +08:00
scripts,
2024-06-18 18:19:57 +08:00
officialAccount,
miniProgram,
},
name: "specialDiseaseNode",
data() {
return {
2024-06-24 14:25:37 +08:00
dictDataType: "",
2024-06-20 08:54:06 +08:00
openlist: {
suitRange: "",
routeId: "",
triggerConditionList: [],
},
open: false,
show3: false,
activeNames: ["1"],
routeform: {
routeCheckStatus: null,
routeCheckRemark: "",
},
2024-06-20 14:09:15 +08:00
optionslist: [],
2024-06-24 14:25:37 +08:00
// 包含
optionstriggerConditionOperator: [],
2024-06-18 18:19:57 +08:00
optionslistS: [],
2024-06-20 14:09:15 +08:00
optionslistSname: [],
2024-06-24 14:25:37 +08:00
// 诊断
optionsname: [],
2024-06-21 11:42:55 +08:00
routeName: "",
2024-06-20 08:54:06 +08:00
updata: [],
updatalists: [],
updatalist: [],
// triggerConditionList: [{}],
2024-06-18 18:19:57 +08:00
form: {
2024-06-20 14:09:15 +08:00
specialDiseaseNodeId: "",
2024-06-18 18:19:57 +08:00
nodeContent: "",
templateId: "",
templateName: "",
taskType: "",
taskTypeName: "",
taskSubdivision: "",
taskSubdivisionName: "",
taskStatus: "",
secondClassifyDescribe: "",
executionTime: "",
appletPushSign: "0",
officialPushSign: "0",
messagePushSign: "0",
taskSubdivisiontemplateType: "",
},
itemindex: 0,
listindex: 0,
2024-06-20 14:09:15 +08:00
totalNumber: 0,
agreeNumber: 0,
2024-06-18 18:19:57 +08:00
value: "",
input: "",
//任务类型
selectTaskTypeList: [],
//任务状态
taskStatusDictList: [],
//任务细分
taskPartitionList: [],
routeId: "",
options: [],
2024-06-20 14:09:15 +08:00
lists: [],
2024-06-20 08:54:06 +08:00
dialogVisible: false,
2024-06-20 14:09:15 +08:00
parentDictCodelist: [],
parentDictCode: "",
itemlist: {
specialDiseaseRouteId: "",
// suitRange: "",
routeName: "",
specialDiseaseNodeList: [],
},
2024-06-21 14:06:29 +08:00
updataname: "",
2024-06-20 08:54:06 +08:00
rules: {
routeCheckStatus: [
{ required: true, message: "请选择节点审核状态", trigger: "change" },
],
},
2024-06-18 18:19:57 +08:00
};
},
created() {
if (this.$route.query) {
2024-06-20 14:09:15 +08:00
this.$set(this.form, "specialDiseaseNodeId", this.$route.query.id);
2024-06-20 08:54:06 +08:00
this.$set(this.openlist, "suitRange", this.$route.query.suitRange);
2024-06-20 14:09:15 +08:00
this.openlist.routeId = this.$route.query.id;
2024-04-03 14:56:22 +08:00
}
2024-06-20 14:09:15 +08:00
this.taskinfo();
2024-06-24 14:25:37 +08:00
this.infolistname();
2024-06-20 08:54:06 +08:00
this.infolists();
this.infolistoptionslistS();
2024-06-20 14:09:15 +08:00
this.infolistMESSAGE();
this.infolistword();
2024-06-24 14:25:37 +08:00
this.optiononditionOperator();
this.optiononditionOperators();
2024-06-18 18:19:57 +08:00
},
2024-06-21 10:57:35 +08:00
beforeDestroy() {},
2024-06-20 14:09:15 +08:00
watch: {
"form.phoneMessageRemind": {
handler(newValue, oldValue) {
if (newValue == "NOT_SEND_MESSAGE") {
this.form.phoneMessageTemplateId = "";
this.form.phoneMessageTemplateName = "";
}
},
deep: true,
},
},
2024-06-18 18:19:57 +08:00
mounted() {
2024-06-20 14:09:15 +08:00
// this.form = this.lists[0].list[0];
2024-06-18 18:19:57 +08:00
},
methods: {
2024-06-21 09:22:21 +08:00
// 短信提醒
2024-06-20 14:09:15 +08:00
infolistword() {
var dictType = "text_message_remind";
getAgencytype(dictType).then((res) => {
this.optionslist = res.data;
// this.taskinfo();
});
},
2024-06-21 09:22:21 +08:00
// 重播次数
2024-06-20 14:09:15 +08:00
infolistMESSAGE() {
var dictType = "redial_times";
getAgencytype(dictType).then((res) => {
this.optionslistSname = res.data;
this.taskinfo();
});
},
2024-06-21 09:22:21 +08:00
// 弹框确定
2024-06-20 08:54:06 +08:00
upload() {
2024-06-20 15:02:44 +08:00
const loading = this.$loading({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
2024-06-20 08:54:06 +08:00
this.openlist.triggerConditionList.forEach((e) => {
e.routeId = this.$route.query.id;
e.routeName = this.$route.query.routeName;
});
2024-06-24 14:25:37 +08:00
console.log(
this.openlist.triggerConditionList,
" this.openlist.triggerConditionList"
);
loading.close();
2024-06-20 08:54:06 +08:00
triggerCondition(this.openlist).then((res) => {
2024-06-21 11:22:58 +08:00
if (res.code == 200) {
2024-06-24 14:25:37 +08:00
2024-06-21 11:22:58 +08:00
this.$notify({
type: "success",
title: "提示",
message: "修改触发条件成功",
});
2024-06-21 11:42:55 +08:00
this.routeName = res.data;
2024-06-21 14:06:29 +08:00
Cookies.remove("routeName");
Cookies.set("routeName", this.routeName);
2024-06-21 11:22:58 +08:00
}
2024-06-20 08:54:06 +08:00
this.infolist();
2024-06-24 14:25:37 +08:00
this.handlelist();
2024-06-20 08:54:06 +08:00
this.openfalse();
});
},
2024-06-21 09:22:21 +08:00
// 关闭弹框
2024-06-20 08:54:06 +08:00
openfalse() {
2024-06-24 14:25:37 +08:00
this.openlist.triggerConditionList = [
{
routeId: "",
routeName: "",
triggerConditionName: "",
triggerConditionOperator: "",
triggerConditionValue: "",
triggerConditionName: "",
triggerConditionOperatorName: "",
dictDataType: "STRING",
2024-06-20 08:54:06 +08:00
2024-06-24 14:25:37 +08:00
triggerLogic: "AND",
triggerLogicName: "",
},
];
2024-06-20 08:54:06 +08:00
this.open = false;
this.resetForm("openlist");
},
2024-06-21 09:22:21 +08:00
// 批量新增添加属性
2024-06-20 08:54:06 +08:00
addtriggerCondition() {
this.idd++;
var obj = {
routeId: "",
routeName: "",
triggerConditionName: "",
triggerConditionOperator: "",
triggerConditionValue: "",
triggerConditionName: "",
triggerConditionOperatorName: "",
2024-06-24 14:25:37 +08:00
dictDataType: "STRING",
triggerLogic: "AND",
2024-06-20 08:54:06 +08:00
triggerLogicName: "",
};
if (this.openlist.triggerConditionList.length == 3) {
2024-06-24 14:25:37 +08:00
this.$message.error("至多仅支持两种属性");
2024-06-20 08:54:06 +08:00
} else {
this.openlist.triggerConditionList.push(obj);
}
},
2024-06-21 09:22:21 +08:00
// 删除属性
2024-06-20 08:54:06 +08:00
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;
},
2024-06-21 09:22:21 +08:00
// 适用范围
2024-06-20 14:09:15 +08:00
changeoptions(e) {
this.parentDictCode = this.options.find(
(el) => el.dictValue == e
)?.dictCode;
this.changelisy();
},
changelisy() {
list(this.parentDictCode).then((res) => {
this.parentDictCodelist = res.rows;
});
},
2024-06-24 14:25:37 +08:00
changetoday(e){
console.log(e,'eeeeeeeeeeeeeooooooooooooo')
},
2024-06-21 09:22:21 +08:00
// 回显
2024-06-20 08:54:06 +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) {
2024-06-20 14:09:15 +08:00
this.$set(this.updata, "suitRange", this.$route.query.suitRange);
this.parentDictCode = this.options.find(
(el) => el.dictValue == this.updata.suitRange
)?.dictCode;
setTimeout(() => {
this.changelisy();
2024-06-21 14:49:40 +08:00
}, 1000);
2024-06-20 14:09:15 +08:00
this.itemlist.specialDiseaseRouteId = this.$route.query.id;
2024-06-21 14:06:29 +08:00
this.itemlist.routeName = Cookies.get("routeName");
2024-06-20 08:54:06 +08:00
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];
}
},
2024-06-20 14:09:15 +08:00
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
)
);
2024-06-21 09:22:21 +08:00
2024-06-20 14:09:15 +08:00
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-06-21 09:22:21 +08:00
2024-06-20 08:54:06 +08:00
// 且或
infolistoptionslistS() {
var dictType = "trigger_logic";
getAgencytype(dictType).then((res) => {
this.optionslistS = res.data;
});
},
2024-06-24 14:25:37 +08:00
// 诊断
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) => {
console.log(res, "res");
this.optionstriggerConditionOperator = res.data;
});
},
2024-06-18 18:19:57 +08:00
// 包含
changetriggerLogic(e, index) {
2024-06-24 14:25:37 +08:00
console.log(e, index, "e包含,index");
2024-06-20 08:54:06 +08:00
this.openlist.triggerConditionList[index].triggerConditionOperatorName =
2024-06-24 14:25:37 +08:00
this.optionstriggerConditionOperator.find(
(el) => el.dictValue == e
).dictLabel;
2024-06-21 10:57:35 +08:00
this.openlist.triggerConditionList[index].triggerConditionValue = null;
2024-06-18 18:19:57 +08:00
},
2024-06-24 14:25:37 +08:00
// 数值=s
// changetriggerLogics(e,index){
// console.log(e,index,'e,index')
// this.openlist.triggerConditionList[index].triggerConditionOperator =
// this.optionstriggerConditionOperator.find(
// (el) => el.dictValue == e
// ).dictLabel;
// this.openlist.triggerConditionList[index].triggerConditionValue = null;
// },
2024-06-18 18:19:57 +08:00
// 诊断
changetriggerConditionName(e, index) {
2024-06-24 14:25:37 +08:00
console.log(e, index, "e诊断, index");
// this.dictDataType = e;
2024-06-20 08:54:06 +08:00
this.openlist.triggerConditionList[index].triggerConditionName =
2024-06-24 14:25:37 +08:00
this.optionsname.find((el) => el.dictValue == e).dictLabel;
2024-06-20 14:09:15 +08:00
this.openlist.triggerConditionList[index].triggerConditionOperator = null;
this.openlist.triggerConditionList[index].triggerConditionValue = null;
2024-06-24 14:25:37 +08:00
this.dictDataType = this.optionsname.find(
(el) => el.dictValue == e
).dictDataType;
this.openlist.triggerConditionList[index].dictDataType =
this.optionsname.find((el) => el.dictValue == e).dictDataType;
console.log(
this.openlist.triggerConditionList[index].dictDataType,
"this.dictDataType"
);
this.handlelist();
2024-06-18 18:19:57 +08:00
},
// 且或
changetriggerLogicsname(e, index) {
2024-06-24 14:25:37 +08:00
console.log(e,'qie')
2024-06-20 08:54:06 +08:00
this.openlist.triggerConditionList[index].triggerLogic = e;
this.openlist.triggerConditionList[index].triggerLogicName =
2024-06-18 18:19:57 +08:00
this.optionslistS.find((el) => el.dictValue == e).dictLabel;
},
// 适用范围
infolists() {
var dictType = "suit_range";
getAgencytype(dictType).then((res) => {
this.options = res.data;
});
2024-06-21 09:22:21 +08:00
this.infolist();
2024-06-18 18:19:57 +08:00
},
2024-06-21 09:22:21 +08:00
// 展示触发条件
2024-06-18 18:19:57 +08:00
infolist() {
this.routeId = this.$route.query.id;
triggerConditionList(this.routeId).then((res) => {
2024-06-20 08:54:06 +08:00
this.openlist.triggerConditionList = res.data;
2024-06-24 14:25:37 +08:00
this.handlelist();
// this.openlist.triggerConditionList.forEach((o) => {
// // this.triggerConditionCode=o.triggerConditionCode
// this.handlelist();
// // o.dictDataType = this.optionstriggerConditionOperator.find(
// // (el) => el.dictValue == o.triggerConditionOperator
// // )?.dictDataType;
// });
// console.log(
// this.openlist.triggerConditionList,
// " this.openlist.triggerConditionList"
// );
2024-06-20 08:54:06 +08:00
if (res.data.length == 1) {
2024-06-24 14:25:37 +08:00
// 新增一条时
2024-06-20 08:54:06 +08:00
this.updata = res.data[0];
2024-06-24 14:25:37 +08:00
this.updata.triggerConditionOperatorName =
this.optionstriggerConditionOperator.find(
(el) => el.dictValue == this.updata.triggerConditionOperator
)?.dictLabel;
console.log(
this.updata.triggerConditionOperatorName,
"updata.triggerConditionOperatorName"
);
2024-06-21 14:06:29 +08:00
this.updatalist = [];
2024-06-20 08:54:06 +08:00
} else {
2024-06-24 14:25:37 +08:00
// 新增两条或者三条
2024-06-20 08:54:06 +08:00
this.updata = res.data[0];
2024-06-24 14:25:37 +08:00
// this.handlelist();
this.updata.triggerConditionOperatorName =
this.optionstriggerConditionOperator.find(
(el) => el.dictValue == this.updata.triggerConditionOperator
)?.dictLabel;
console.log(
this.updata.triggerConditionOperatorName,
"updata.triggerConditionOperatorName"
);
2024-06-20 08:54:06 +08:00
res.data.splice(0, 1);
this.updatalist = res.data;
2024-06-24 14:25:37 +08:00
this.updatalist.forEach((e) => {
e.triggerConditionOperatorName =
this.optionstriggerConditionOperator.find(
(el) => el.dictValue == e.triggerConditionOperator
)?.dictLabel;
});
// this.updatalist.triggerConditionOperatorName = this.optionstriggerConditionOperator.find(
// (el) => el.dictValue == this.updatalist.triggerConditionOperator
// )?.dictLabel;
2024-06-20 08:54:06 +08:00
}
2024-06-21 11:22:58 +08:00
if (this.open == true) {
this.$set(this.openlist, "suitRange", this.$route.query.suitRange);
} else {
this.$set(this.updata, "suitRange", this.openlist.suitRange);
}
2024-06-18 18:19:57 +08:00
});
},
2024-06-20 08:54:06 +08:00
// 编辑接口
infolistname() {
this.routeId = this.$route.query.id;
triggerConditionList(this.routeId).then((res) => {
this.openlist.triggerConditionList = res.data;
2024-06-24 14:25:37 +08:00
this.openlist.triggerConditionList.forEach((o) => {
this.optiononditionOperators();
o.dictDataType = this.optionsname.find(
(el) => el.dictValue == o.triggerConditionCode
)?.dictDataType;
console.log(o.dictDataType, "dict");
});
console.log(
this.openlist.triggerConditionList,
" this.openlist.triggerConditionList11111111111"
);
2024-06-21 11:22:58 +08:00
this.$set(this.updata, "suitRange", this.openlist.suitRange);
2024-06-20 08:54:06 +08:00
});
},
// 编辑
edit() {
this.open = true;
this.infolistname();
2024-06-24 14:25:37 +08:00
// this.infolist()
2024-06-20 08:54:06 +08:00
},
2024-06-18 18:19:57 +08:00
//wangeditor传值
onNodeContent(item) {
this.form.nodeContent = item.nodeContent;
2024-06-20 14:09:15 +08:00
var abc = new RegExp("<br>", "g");
var bbb = this.form.nodeContent.replace(abc, "");
this.form.nodeContent = bbb;
2024-06-18 18:19:57 +08:00
},
//小程序传值
miniProgramtemplate(item) {
this.form.appletTemplateId = item.templateId;
this.form.appletTemplateName = item.templateName;
this.form.appletRemindContent = item.templateContent;
},
2024-06-20 14:09:15 +08:00
// 话术
messageontemplateword(item) {
this.form.phoneTemplateId = item.templateId;
this.form.phoneTemplateName = item.templateName;
// this.form.messagePreview = item.templateContent;
},
2024-06-18 18:19:57 +08:00
//短信传值
messageontemplate(item) {
this.form.messageTemplateId = item.templateId;
this.form.messageTemplateName = item.templateName;
this.form.messagePreview = item.templateContent;
},
2024-06-20 14:09:15 +08:00
// 短信
messageontemplateMESSAGE(item) {
this.form.phoneMessageTemplateId = item.templateId;
this.form.phoneMessageTemplateName = item.templateName;
this.form.messagePreview = item.templateContent;
},
2024-06-18 18:19:57 +08:00
//公众号传值
2024-06-20 14:09:15 +08:00
officialAccountontemplate(item) {
2024-06-18 18:19:57 +08:00
this.form.officialTemplateId = item.templateId;
this.form.officialTemplateName = item.templateName;
this.form.officialRemindContent = item.templateContent;
},
2024-06-21 10:57:35 +08:00
// 暂存
2024-06-18 18:19:57 +08:00
TemporaryStorage() {
2024-06-20 14:09:15 +08:00
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) => {
2024-06-21 10:57:35 +08:00
el.routeNodeDay = e.routeNodeDay;
el.routeNodeName = e.routeNodeName;
this.itemlist.specialDiseaseNodeList.push(el);
})
2024-06-20 14:09:15 +08:00
: "";
});
// this.updata.specialDiseaseNodeList =
// this.updata.specialDiseaseNodeList.filter(
// (e) =>
// !e.routeNodeDay &&
// !e.routeNodeName &&
// !e.taskType &&
// !e.taskSubdivision &&
// !e.taskStatus
// );
2024-06-21 14:06:29 +08:00
// if (this.routeName) {
// this.itemlist.routeName = this.routeName;
// } else {
// this.itemlist.routeName = this.$route.query.routeName;
// }
this.itemlist.routeName = Cookies.get("routeName");
2024-06-20 14:09:15 +08:00
specialDiseaseNode(this.itemlist).then((res) => {
this.info();
loading.close();
this.$modal.msgSuccess("暂存成功!");
});
setTimeout(() => {
loading.close();
}, 3000);
});
2024-06-18 18:19:57 +08:00
},
//问卷传值
questionontemplate(item) {
this.form.templateId = item.templateId;
this.form.templateName = item.templateName;
},
//宣教传值
propagandaontemplate(item) {
this.form.templateId = item.templateId;
this.form.templateName = item.templateName;
},
2024-06-21 09:22:21 +08:00
2024-06-18 18:19:57 +08:00
bottomclickevent(uitem, index, uindex) {
2024-06-20 14:09:15 +08:00
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);
2024-06-18 18:19:57 +08:00
},
handleStep() {
this.active = 2;
},
//任务类型 任务状态
taskinfo() {
selectTaskTypeList().then((res) => {
this.selectTaskTypeList = res.data;
2024-06-20 14:09:15 +08:00
this.info();
2024-06-18 18:19:57 +08:00
});
},
2024-06-20 14:09:15 +08:00
//任务类型
changeTaskType(code, taskSubdivision) {
2024-06-20 08:54:06 +08:00
let id = this.selectTaskTypeList?.find((e) => e.taskTypeCode == code)?.id;
this.form.taskTypeName = this.selectTaskTypeList?.find(
(e) => e.taskTypeCode == code
)?.taskTypeName;
2024-06-18 18:19:57 +08:00
taskPartitionList(id).then((res) => {
this.taskPartitionList = res.data;
2024-06-20 08:54:06 +08:00
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;
2024-06-20 14:09:15 +08:00
2024-06-20 08:54:06 +08:00
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;
2024-06-18 18:19:57 +08:00
});
2024-06-20 08:54:06 +08:00
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 = "";
}
2024-06-18 18:19:57 +08:00
}
});
},
2024-06-21 09:22:21 +08:00
// 添加管理路径节点
2024-06-18 18:19:57 +08:00
addlist() {
2024-06-21 09:22:21 +08:00
list(this.parentDictCode).then((res) => {
// this.parentDictCodelist = res.rows;
res.rows.forEach((e) => {
this.lists.forEach((el) => {
el.routeNodeName = e.dictLabel;
});
});
});
2024-06-18 18:19:57 +08:00
this.lists.push({
routeNodeName: "",
routeNodeDay: "",
list: [
{
2024-06-21 09:22:21 +08:00
nodeContent: "<p></p>",
2024-06-18 18:19:57 +08:00
templateId: "",
templateName: "",
taskType: "",
2024-06-21 09:22:21 +08:00
officialRemindContent: "",
2024-06-18 18:19:57 +08:00
taskSubdivision: "",
taskSubdivisionName: "",
2024-06-21 09:22:21 +08:00
appletRemindContent: "",
appletPromptDescription: "",
2024-06-18 18:19:57 +08:00
taskStatus: "",
secondClassifyDescribe: "",
executionTime: "",
appletPushSign: "0",
officialPushSign: "0",
messagePushSign: "0",
2024-06-21 09:22:21 +08:00
messagePreview: "",
2024-06-18 18:19:57 +08:00
taskSubdivisiontemplateType: "",
},
],
});
2024-06-21 09:22:21 +08:00
// },
2024-06-18 18:19:57 +08:00
},
2024-06-21 09:22:21 +08:00
// 添加节点
2024-06-18 18:19:57 +08:00
additem(item) {
item.list.push({
2024-06-21 09:22:21 +08:00
nodeContent: "<p></p>",
2024-06-18 18:19:57 +08:00
templateId: "",
templateName: "",
taskType: "",
2024-06-21 09:22:21 +08:00
officialRemindContent: "",
2024-06-18 18:19:57 +08:00
taskSubdivision: "",
taskSubdivisionName: "",
2024-06-21 09:22:21 +08:00
appletRemindContent: "",
appletPromptDescription: "",
2024-06-18 18:19:57 +08:00
taskStatus: "",
secondClassifyDescribe: "",
executionTime: "",
appletPushSign: "0",
officialPushSign: "0",
messagePushSign: "0",
2024-06-21 09:22:21 +08:00
messagePreview: "",
2024-06-18 18:19:57 +08:00
taskSubdivisiontemplateType: "",
});
},
2024-06-21 09:22:21 +08:00
// 删除节点
2024-06-20 08:54:06 +08:00
delitemh(item, index) {
2024-06-18 18:19:57 +08:00
item.list.splice(this.itemindex, 1);
if (item.list.length == 0) {
this.lists.splice(index, 1);
}
},
},
2024-04-03 14:56:22 +08:00
};
</script>
<style scoped lang="scss">
2024-06-20 15:02:44 +08:00
::v-deep .el-input.is-disabled .el-input__inner {
background-color: #fff !important;
color: #606266 !important;
}
2024-06-20 08:54:06 +08:00
.el-icon-arrow-down {
margin-left: 50px;
}
2024-06-21 09:34:20 +08:00
2024-06-20 08:54:06 +08:00
.el-icon-arrow-up {
margin-left: 50px;
}
2024-06-21 09:34:20 +08:00
2024-06-20 08:54:06 +08:00
.addlistname {
color: #409eff;
font-size: 12px;
margin-left: 20px;
margin-top: 10px;
}
2024-06-21 09:34:20 +08:00
2024-06-20 08:54:06 +08:00
.login-code {
width: 62px;
height: 81px;
position: relative;
z-index: 0;
top: -30px;
right: 56px;
}
2024-06-21 09:34:20 +08:00
2024-06-18 18:19:57 +08:00
.login-code-img {
width: 62px;
2024-06-20 08:54:06 +08:00
height: 81px;
position: absolute;
z-index: -1;
top: 32px;
right: 61px;
}
2024-06-21 09:34:20 +08:00
2024-06-20 08:54:06 +08:00
.selectnamelist {
2024-06-18 18:19:57 +08:00
position: absolute;
2024-06-20 08:54:06 +08:00
right: 54px;
top: -8px;
}
2024-06-21 09:34:20 +08:00
2024-06-20 08:54:06 +08:00
.selectname {
position: absolute;
right: 70px;
top: 55px;
2024-06-18 18:19:57 +08:00
}
2024-06-21 09:34:20 +08:00
2024-04-03 14:56:22 +08:00
.dialog-footer {
2024-06-20 08:54:06 +08:00
padding: 0px 30px;
2024-06-18 18:19:57 +08:00
text-align: right;
2024-04-03 14:56:22 +08:00
}
2024-06-21 09:34:20 +08:00
2024-06-20 08:54:06 +08:00
.nodesname {
margin-left: 6%;
width: 660px;
display: flex;
flex-wrap: wrap;
position: relative;
padding-left: 20px;
2024-04-03 14:56:22 +08:00
2024-06-20 08:54:06 +08:00
.node {
margin-bottom: 10px;
}
}
2024-06-21 09:34:20 +08:00
2024-04-03 15:58:44 +08:00
.nodes {
2024-06-18 18:19:57 +08:00
width: 660px;
display: flex;
flex-wrap: wrap;
position: relative;
2024-06-20 08:54:06 +08:00
padding-left: 20px;
2024-06-18 18:19:57 +08:00
.node {
margin-bottom: 10px;
}
2024-04-03 15:58:44 +08:00
}
2024-04-03 14:56:22 +08:00
.bottomform {
2024-06-18 18:19:57 +08:00
background-color: #f2f4f5;
margin-top: 10px;
.card {
background-color: #fff;
width: 100%;
height: 200px;
margin: 20px 0 0;
padding: 20px 50px 0px 20px;
.flextwo {
2024-06-20 14:09:15 +08:00
// display: flex;
// align-items: center;
2024-06-18 18:19:57 +08:00
margin-top: 20px;
.text {
font-size: 13px;
color: #64666a;
}
.textarea {
width: 90%;
padding: 0 10px;
height: 50px;
line-height: 50px;
2024-06-20 14:09:15 +08:00
// border: 1px solid #dcdfe6;
2024-06-18 18:19:57 +08:00
border-radius: 5px;
display: flex;
align-items: center;
::v-deep .el-input {
padding: 0 10px;
width: 50%;
color: black;
font-size: 13px;
height: 40px;
line-height: 40px;
2024-04-03 14:56:22 +08:00
}
2024-06-18 18:19:57 +08:00
::v-deep .el-input__inner {
color: black;
font-size: 13px;
2024-06-20 15:02:44 +08:00
cursor: default !important;
2024-04-03 14:56:22 +08:00
}
2024-06-18 18:19:57 +08:00
}
2024-04-03 14:56:22 +08:00
}
2024-06-18 18:19:57 +08:00
.flex {
display: flex;
2024-06-20 14:09:15 +08:00
width: 100%;
2024-06-18 18:19:57 +08:00
align-items: center;
2024-06-20 14:09:15 +08:00
// background: red;
2024-06-18 18:19:57 +08:00
justify-content: space-between;
.pushMethod {
height: 30px;
2024-06-20 14:09:15 +08:00
margin-top: 30px;
2024-06-18 18:19:57 +08:00
line-height: 30px;
font-size: 13px;
color: #64666a;
2024-06-21 09:34:20 +08:00
2024-06-20 14:09:15 +08:00
.spanname {
pointer-events: none;
}
2024-06-21 09:34:20 +08:00
2024-04-03 14:56:22 +08:00
::v-deep .el-input__inner {
2024-06-18 18:19:57 +08:00
color: black;
font-size: 13px;
2024-04-03 14:56:22 +08:00
}
2024-06-18 18:19:57 +08:00
span {
color: black;
font-size: 13px;
2024-04-03 14:56:22 +08:00
}
2024-06-18 18:19:57 +08:00
}
2024-04-03 14:56:22 +08:00
}
2024-06-18 18:19:57 +08:00
}
2024-04-03 14:56:22 +08:00
}
2024-06-21 09:34:20 +08:00
2024-06-20 14:09:15 +08:00
.routeCheckStatus {
position: absolute;
right: 10px;
2024-06-21 10:57:35 +08:00
top: 30px;
2024-06-20 14:09:15 +08:00
}
2024-04-03 14:56:22 +08:00
2024-06-18 18:19:57 +08:00
.topform {
padding: 15px 0 0 15px;
2024-06-20 14:30:30 +08:00
height: 200px;
2024-06-21 09:34:20 +08:00
2024-06-18 18:19:57 +08:00
.form {
::v-deep .el-input__inner {
height: 30px !important;
line-height: 30px !important;
2024-04-03 14:56:22 +08:00
}
2024-06-18 18:19:57 +08:00
::v-deep .el-form-item__label {
font-size: 12px !important;
2024-04-03 14:56:22 +08:00
}
2024-06-18 18:19:57 +08:00
}
2024-04-03 14:56:22 +08:00
}
2024-06-18 18:19:57 +08:00
.title {
display: flex;
2024-06-20 15:02:44 +08:00
margin-left: 100px;
2024-04-03 14:56:22 +08:00
2024-06-18 18:19:57 +08:00
.select {
font-weight: 550;
2024-06-20 08:54:06 +08:00
// margin-left: 10%;
position: relative;
right: 20px;
// width: 300px;
2024-06-18 18:19:57 +08:00
font-size: 12px;
.el-input {
width: 200px;
height: 30px !important;
line-height: 30px !important;
2024-04-03 14:56:22 +08:00
}
2024-06-18 18:19:57 +08:00
}
}
2024-06-21 09:34:20 +08:00
2024-06-20 08:54:06 +08:00
.container {
padding: 20px;
}
2024-06-21 09:34:20 +08:00
2024-06-18 18:19:57 +08:00
.list {
2024-06-20 14:09:15 +08:00
margin: 12px auto;
2024-06-18 18:19:57 +08:00
width: 100%;
2024-06-20 08:54:06 +08:00
// height: calc(100% - 80px);
2024-06-18 18:19:57 +08:00
background-color: #f2f4f5;
display: flex;
padding-top: 15px;
justify-content: space-evenly;
.timelist {
2024-06-20 14:09:15 +08:00
width: 25%;
2024-06-18 18:19:57 +08:00
background-color: #fff;
padding: 0 20px 20px;
2024-06-20 14:09:15 +08:00
height: calc(100vh - 350px);
2024-06-20 08:54:06 +08:00
2024-06-18 18:19:57 +08:00
overflow: scroll;
.timetitle {
height: 60px;
display: flex;
align-items: center;
justify-content: space-between;
2024-04-03 14:56:22 +08:00
}
2024-06-18 18:19:57 +08:00
::v-deep .el-timeline {
width: 100%;
padding: 15px 0 0 !important;
}
}
.texts {
width: 75%;
2024-06-20 14:09:15 +08:00
height: calc(100vh - 350px);
2024-06-20 08:54:06 +08:00
2024-06-18 18:19:57 +08:00
overflow: scroll;
background-color: #fff;
}
2024-04-03 14:56:22 +08:00
}
.cards {
2024-06-18 18:19:57 +08:00
border: 1px solid #409eff;
border-left: 5px solid #409eff;
2024-04-03 14:56:22 +08:00
}
.top {
2024-06-18 18:19:57 +08:00
display: flex;
justify-content: space-between;
align-items: center;
.toptop {
2024-04-03 14:56:22 +08:00
display: flex;
align-items: center;
2024-06-18 18:19:57 +08:00
}
2024-04-03 14:56:22 +08:00
2024-06-18 18:19:57 +08:00
span {
padding: 0 4px;
}
2024-04-03 14:56:22 +08:00
2024-06-18 18:19:57 +08:00
i {
font-size: 17px;
}
2024-04-03 14:56:22 +08:00
2024-06-18 18:19:57 +08:00
i:nth-child(2) {
padding-left: 12px;
}
2024-04-03 14:56:22 +08:00
}
::v-deep .el-timeline-item__timestamp {
2024-06-18 18:19:57 +08:00
margin: 0 !important;
padding: 0 !important;
2024-04-03 14:56:22 +08:00
}
::v-deep .el-timeline-item__wrapper {
2024-06-18 18:19:57 +08:00
padding-left: 14px !important;
2024-04-03 14:56:22 +08:00
}
::v-deep .el-timeline-item__content {
2024-06-18 18:19:57 +08:00
transform: translateY(-2%);
2024-04-03 14:56:22 +08:00
}
::v-deep .el-card {
2024-06-21 09:34:20 +08:00
position: relative !important;
2024-06-18 18:19:57 +08:00
margin-top: 20px !important;
2024-04-03 14:56:22 +08:00
}
</style>