This commit is contained in:
2025-02-26 17:28:15 +08:00
parent c7dd00c2d1
commit ee78414b6b
2 changed files with 132 additions and 299 deletions

View File

@ -105,6 +105,12 @@ service.interceptors.response.use(res => {
})
return Promise.reject('error')
} else {
if (res.config.url == '/manage/signroute/add' && window.location.pathname != "/patient/ManuallyCreatingTasks") {
Message({
message: "创建任务已完成,正在拨打电话!",
type: 'success'
})
}
return res.data
}
},

View File

@ -5,23 +5,13 @@
<el-button type="primary" @click="upload">保存</el-button>
</div>
<el-descriptions title="手动创建任务"> </el-descriptions>
<el-form
:inline="true"
:model="updata"
class="demo-form-inline"
ref="updata"
>
<el-form :inline="true" :model="updata" class="demo-form-inline" ref="updata">
<el-form-item label="任务名称">
<el-input v-model="updata.routeName"></el-input>
</el-form-item>
<el-form-item label="适用范围">
<el-select v-model="updata.suitRange" @change="changeoptions">
<el-option
v-for="item in options"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
<el-option v-for="item in options" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
@ -120,67 +110,32 @@
<i class="el-icon-circle-plus-outline" @click="additem"></i>
</div>
<el-timeline>
<el-timeline-item
v-for="(item, index) in list"
:key="index"
:color="listindex == index ? '#13CE66' : ''"
@click.native="clicktimelineitem(item, index)"
>
<el-timeline-item v-for="(item, index) in list" :key="index" :color="listindex == index ? '#13CE66' : ''"
@click.native="clicktimelineitem(item, index)">
<div class="top">
<div class="toptop">
<el-radio
v-model="item.checked1"
:label="1"
@change="handleCheckAllChange1($event, item)"
>
<el-select
style="width: 123px"
v-model="item.routeNodeName"
@focus="handleFocusone(item)"
>
<el-option
v-for="item in parentDictCodelist"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
<el-radio v-model="item.checked1" :label="1" @change="handleCheckAllChange1($event, item)">
<el-select style="width: 123px" v-model="item.routeNodeName" @focus="handleFocusone(item)">
<el-option v-for="item in parentDictCodelist" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
<el-input
style="width: 90px"
v-model="item.routeNodeDay"
type="number"
@focus="handleFocus(item)"
></el-input>
<el-input style="width: 90px" v-model="item.routeNodeDay" type="number"
@focus="handleFocus(item)"></el-input>
<span></span>
</el-radio>
</div>
<div>
<i
class="el-icon-delete"
@click="delitem(item, index, list)"
></i>
<i class="el-icon-delete" @click="delitem(item, index, list)"></i>
</div>
</div>
<div class="top">
<div class="toptop">
<el-radio
v-model="item.checked2"
:label="2"
@change="handleCheckAllChange2($event, item, index)"
>
<el-radio v-model="item.checked2" :label="2" @change="handleCheckAllChange2($event, item, index)">
<span style="width: 78px">指定时间</span>
<el-date-picker
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
v-model="item.nodePlanTime"
type="datetime"
placeholder="选择日期时间"
:picker-options="pickerOptions"
@input="input(item, index)"
@focus="setCurrentTime(item, index)"
ref="datePicker"
>
<el-date-picker format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
v-model="item.nodePlanTime" type="datetime" placeholder="选择日期时间" :picker-options="pickerOptions"
@input="input(item, index)" @focus="setCurrentTime(item, index)" ref="datePicker">
</el-date-picker>
</el-radio>
</div>
@ -192,11 +147,7 @@
style="margin-right: 5px"
@change="handleCheckAllChange3($event, item)"
></el-checkbox> -->
<el-radio
v-model="item.checked3"
:label="3"
@change="handleCheckAllChange3($event, item)"
>
<el-radio v-model="item.checked3" :label="3" @change="handleCheckAllChange3($event, item)">
<span>立即执行</span>
</el-radio>
</div>
@ -220,24 +171,17 @@
</el-timeline>
</div>
<div class="nodetexts">
<div
style="background-color: #fff; border-radius: 10px; padding: 20px"
:style="
formInline.taskNodeType
<div style="background-color: #fff; border-radius: 10px; padding: 20px" :style="formInline.taskNodeType
? formInline.taskNodeType != 'PHONE_OUTBOUND'
? formInline.taskNodeType == 'TEXT_REMIND'
? 'height:260px'
: 'height:179px'
: 'height:80px'
: 'height:80px'
"
>
">
<el-form :model="formInline" class="demo-form-inline">
<el-form-item label="任务节点类型">
<el-radio-group
v-model="formInline.taskNodeType"
@change="taskNodeTypechange"
>
<el-radio-group v-model="formInline.taskNodeType" @change="taskNodeTypechange">
<el-radio label="PHONE_OUTBOUND">电话外呼</el-radio>
<el-radio label="QUESTIONNAIRE_SCALE">问卷量表</el-radio>
<el-radio label="PROPAGANDA_ARTICLE">宣教文案</el-radio>
@ -248,39 +192,21 @@
<!-- <el-form-itemlabel="电话模板" v-if="formInline.taskNodeType == 'PHONE_OUTBOUND'">
<scriptphone @on-template="scriptphoneontemplate"></scriptphone>
</el-form-item> -->
<el-form-item
label="宣教模板"
v-if="formInline.taskNodeType == 'PROPAGANDA_ARTICLE'"
>
<el-form-item label="宣教模板" v-if="formInline.taskNodeType == 'PROPAGANDA_ARTICLE'">
<propaganda @on-template="propagandaontemplate"></propaganda>
</el-form-item>
<el-form-item
label="提醒内容"
v-if="formInline.taskNodeType == 'TEXT_REMIND'"
>
<el-input
type="textarea"
v-model="formInline.nodeContent"
:rows="6"
style="width: 600px"
placeholder="请输入内容"
/>
<el-form-item label="提醒内容" v-if="formInline.taskNodeType == 'TEXT_REMIND'">
<el-input type="textarea" v-model="formInline.nodeContent" :rows="6" style="width: 600px"
placeholder="请输入内容" />
</el-form-item>
<!-- <el-form-item label="人工随访模板" v-if="formInline.taskNodeType == 'ARTIFICIAL_FOLLOW_UP'">
<question @on-template="questionontemplate"></question>
</el-form-item> -->
</el-form>
<el-form
:model="formInline"
class="demo-form-inline"
:inline="true"
v-if="formInline.taskNodeType == 'QUESTIONNAIRE_SCALE'"
>
<el-form :model="formInline" class="demo-form-inline" :inline="true"
v-if="formInline.taskNodeType == 'QUESTIONNAIRE_SCALE'">
<el-form-item label="问卷模板">
<question
@on-template="questionontemplate"
:node="formInline.phoneDialMethod"
></question>
<question @on-template="questionontemplate" :node="formInline.phoneDialMethod"></question>
</el-form-item>
<el-form-item label="" style="margin-left: 57px">
<el-radio-group v-model="formInline.phoneDialMethod">
@ -289,26 +215,16 @@
<el-radio label="COMMON">人工随访</el-radio>
</el-radio-group>
</el-form-item>
<div
class="flextow"
v-if="
<div class="flextow" v-if="
formInline.phoneDialMethod == 'AI' ||
formInline.phoneDialMethod == 'COMMON'
"
>
">
<div class="itemlist">
重拨次数
<span>
<el-select
v-model="formInline.phoneRedialTimes"
style="width: 120px"
>
<el-option
v-for="item in optionslisttime"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
<el-select v-model="formInline.phoneRedialTimes" style="width: 120px">
<el-option v-for="item in optionslisttime" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</span>
@ -316,44 +232,27 @@
<div class="itemlist">
时间间隔()
<span>
<el-input
v-model.number="formInline.phoneTimeInterval"
oninput="value=value.replace(/[^\d]/g,'')"
style="width: 100px"
>
<el-input v-model.number="formInline.phoneTimeInterval" oninput="value=value.replace(/[^\d]/g,'')"
style="width: 100px">
</el-input>
</span>
</div>
<div class="itemlist">
短信提醒
<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-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">
短信模板
<span
:class="
formInline.phoneMessageRemind == 'NOT_SEND_MESSAGE'
<span :class="formInline.phoneMessageRemind == 'NOT_SEND_MESSAGE'
? 'spanname'
: ''
"
>
<message
style="width: 200px"
@on-template="messageontemplateMESSAGE"
:templateId="formInline.phoneMessageTemplateId"
:templateName="formInline.phoneMessageTemplateName"
>
">
<message style="width: 200px" @on-template="messageontemplateMESSAGE"
:templateId="formInline.phoneMessageTemplateId" :templateName="formInline.phoneMessageTemplateName">
</message>
</span>
</div>
@ -375,13 +274,11 @@
</el-form-item> -->
</el-form>
</div>
<div
v-if="
<div v-if="
formInline.taskNodeType == 'TEXT_REMIND' ||
formInline.taskNodeType == 'PROPAGANDA_ARTICLE' ||
formInline.taskNodeType == 'QUESTIONNAIRE_SCALE'
"
>
">
<!-- <div class="PushMethodrg" v-if="formInline.taskNodeType == 'ARTIFICIAL_FOLLOW_UP'">
<div class="flex">
<div class="itemlist">推送方式人工电话</div>
@ -433,20 +330,12 @@
<div class="pushMethod">
模板
<span>
<officialAccount
@on-template="officialAccountontemplate"
:templateId="formInline.officialTemplateId"
:templateName="formInline.officialTemplateName"
>
<officialAccount @on-template="officialAccountontemplate" :templateId="formInline.officialTemplateId"
:templateName="formInline.officialTemplateName">
</officialAccount>
</span>
</div>
<el-switch
v-model="formInline.officialPushSign"
active-color="#13ce66"
active-value="1"
inactive-value="0"
>
<el-switch v-model="formInline.officialPushSign" active-color="#13ce66" active-value="1" inactive-value="0">
</el-switch>
</div>
<div class="PushMethod">
@ -454,55 +343,31 @@
<div class="pushMethod">
模板
<span>
<miniProgram
@on-template="miniProgramtemplate"
:templateId="formInline.appletTemplateId"
:templateName="formInline.appletTemplateName"
>
<miniProgram @on-template="miniProgramtemplate" :templateId="formInline.appletTemplateId"
:templateName="formInline.appletTemplateName">
</miniProgram>
</span>
</div>
<el-switch
v-model="formInline.appletPushSign"
active-color="#13ce66"
active-value="1"
inactive-value="0"
>
<el-switch v-model="formInline.appletPushSign" active-color="#13ce66" active-value="1" inactive-value="0">
</el-switch>
</div>
<div class="PushMethod">
<span style="display: inline-block; width: 128px"
>推送方式短信</span
>
<span style="display: inline-block; width: 128px">推送方式短信</span>
<div class="pushMethod">
模板
<message
@on-template="messageontemplateMESSAGEtwo"
:templateId="formInline.phoneMessageTemplateId"
:templateName="formInline.phoneMessageTemplateName"
></message>
<message @on-template="messageontemplateMESSAGEtwo" :templateId="formInline.phoneMessageTemplateId"
:templateName="formInline.phoneMessageTemplateName"></message>
</div>
<el-switch
v-model="formInline.messagePushSign"
active-color="#13ce66"
active-value="1"
inactive-value="0"
>
<el-switch v-model="formInline.messagePushSign" active-color="#13ce66" active-value="1" inactive-value="0">
</el-switch>
</div>
</div>
<div
class="PushMethodrg"
v-if="formInline.taskNodeType == 'PHONE_OUTBOUND'"
>
<div class="PushMethodrg" v-if="formInline.taskNodeType == 'PHONE_OUTBOUND'">
<div class="flex">
<div class="itemlist">
推送方式
<span>
<el-radio-group
v-model="formInline.phoneDialMethod"
@change="changephoneDialMethod"
>
<el-radio-group v-model="formInline.phoneDialMethod" @change="changephoneDialMethod">
<el-radio label="COMMON">人工电话</el-radio>
<el-radio label="AI">自动外呼</el-radio>
</el-radio-group>
@ -511,12 +376,8 @@
<div class="itemlist">
话术模板
<span>
<scripts
@on-template="messageontemplateword"
:templateId="formInline.phoneId"
:node="formInline.phoneDialMethod"
:templateName="formInline.phoneTemplateName"
></scripts>
<scripts @on-template="messageontemplateword" :templateId="formInline.phoneId"
:node="formInline.phoneDialMethod" :templateName="formInline.phoneTemplateName"></scripts>
</span>
</div>
<!-- <div class="itemlist" v-if="formInline.phoneDialMethod == 'COMMON' || !formInline.phoneDialMethod">
@ -527,12 +388,7 @@
</span>
</div> -->
<div class="itemlist">
<el-switch
v-model="formInline.phonePushSign"
active-color="#13ce66"
active-value="1"
inactive-value="0"
>
<el-switch v-model="formInline.phonePushSign" active-color="#13ce66" active-value="1" inactive-value="0">
</el-switch>
</div>
</div>
@ -540,16 +396,9 @@
<div class="itemlist">
重拨次数
<span>
<el-select
v-model="formInline.phoneRedialTimes"
style="width: 120px"
>
<el-option
v-for="item in optionslisttime"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
<el-select v-model="formInline.phoneRedialTimes" style="width: 120px">
<el-option v-for="item in optionslisttime" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</span>
@ -557,44 +406,27 @@
<div class="itemlist">
时间间隔()
<span>
<el-input
v-model.number="formInline.phoneTimeInterval"
oninput="value=value.replace(/[^\d]/g,'')"
style="width: 100px"
>
<el-input v-model.number="formInline.phoneTimeInterval" oninput="value=value.replace(/[^\d]/g,'')"
style="width: 100px">
</el-input>
</span>
</div>
<div class="itemlist">
短信提醒
<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-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">
短信模板
<span
:class="
formInline.phoneMessageRemind == 'NOT_SEND_MESSAGE'
<span :class="formInline.phoneMessageRemind == 'NOT_SEND_MESSAGE'
? 'spanname'
: ''
"
>
<message
style="width: 200px"
@on-template="messageontemplateMESSAGE"
:templateId="formInline.phoneMessageTemplateId"
:templateName="formInline.phoneMessageTemplateName"
>
">
<message style="width: 200px" @on-template="messageontemplateMESSAGE"
:templateId="formInline.phoneMessageTemplateId" :templateName="formInline.phoneMessageTemplateName">
</message>
</span>
</div>
@ -859,12 +691,6 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(() => {
const loading = this.$loading({
lock: true,
text: '保存中,请稍等!',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.updata.routeNodeList = this.list;
var newObj = JSON.parse(JSON.stringify(this.updata));
const invalidTimes = [];
@ -891,13 +717,10 @@ export default {
invalidTimes.push(e);
}
})
console.log(invalidTimes, 'invalidTimes')
if (invalidTimes.length > 0) {
loading.close();
this.$message.error("时间点在8:00到20:00之间,请修改时间点");
} else {
signrouteadd(newObj).then((res) => {
loading.close();
var message = ''
if (this.$route.query.path == "/patient/signRecord") {
message = '保存成功,即将返回签约患者列表'
@ -925,19 +748,15 @@ export default {
});
});
}, 3000);
}).catch(() => {
});
}
// var nulllength= newObj.routeNodeList.filter(item => item.routeNodeName=="" || item.routeNodeName==null || item.routeNodeName==undefined);
// console.log(nulllength,'nulllength')
// if(nulllength.length>0){
// this.$message.error('');
// return
// }
console.log(newObj, 'this.newObj')
console.log(this.updata, 'this.updata')
})
},
Typechange(e) {
@ -1243,6 +1062,7 @@ export default {
display: inline-block !important;
float: inline-start !important;
}
::v-deep .el-input.is-disabled .el-input__inner {
background: #fff;
}
@ -1346,6 +1166,7 @@ export default {
}
}
}
.PushMethod {
height: 100px;
padding: 20px;
@ -1398,6 +1219,7 @@ export default {
width: 73%;
// height: calc(100vh - 320px);
height: 100%;
.flextow {
display: flex;
width: 100%;
@ -1436,6 +1258,7 @@ export default {
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
.toptop {
display: flex;
align-items: center;
@ -1453,9 +1276,11 @@ export default {
padding-left: 12px;
}
}
::v-deep .el-timeline-item__node--normal {
left: 0px;
}
::v-deep .el-timeline-item__timestamp {
margin: 0 !important;
padding: 0 !important;
@ -1486,9 +1311,11 @@ export default {
::v-deep .el-form-item__content {
display: inline-block !important;
}
::v-deep .el-icon-circle-plus-outline {
cursor: pointer;
}
::v-deep .el-icon-delete {
cursor: pointer;
}