This commit is contained in:
2024-11-06 08:41:26 +08:00
parent 5713f38a93
commit f7704b68b9
3 changed files with 383 additions and 132 deletions

View File

@ -6,3 +6,21 @@ export function manualFollowUpList(query) {
params: query params: query
}) })
} }
//创建实时呼叫任务
export function createActualTimeTask(query) {
return request({
url: '/manage/signroute/createActualTimeTask',
method: 'post',
data: query
})
}
//AI通话获取录音
export function getPhoneDialVideo(id) {
return request({
url: `/manage/signnode/getPhoneDialVideo/${id}`,
method: 'get',
})
}

View File

@ -88,14 +88,16 @@
<el-form-item label="任务名称" prop="manageRouteName"> <el-form-item label="任务名称" prop="manageRouteName">
<el-input v-model="queryParams.manageRouteName" placeholder="请输入任务名称" clearable style="width: 220px" <el-input v-model="queryParams.manageRouteName" placeholder="请输入任务名称" clearable style="width: 220px"
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
<span style="margin-left: 13px;" v-if="queryParams.nodeExecuteStatus == 'UNEXECUTED' && foldshow == true"> </el-form-item>
<el-form-item label="" prop="">
<span style="" v-if="queryParams.nodeExecuteStatus == 'UNEXECUTED' && foldshow == true">
<el-switch class="switchStyle" v-model="timeSignshow" active-color="#1890ff" inactive-color="#5AC1A1" <el-switch class="switchStyle" v-model="timeSignshow" active-color="#1890ff" inactive-color="#5AC1A1"
active-text="全部" inactive-text="待办" @change="changeswitch" /> active-text="全部" inactive-text="待办" @change="changeswitch" />
</span> </span>
</el-form-item> <span style="margin-left: 13px;">
<el-form-item label="" prop="phoneDialMethod"> <el-switch class="switchStyle" v-model="phoneDialMethodshow" active-color="#1890ff" inactive-color="#5AC1A1"
<el-radio v-model="queryParams.phoneDialMethod" label="COMMON">人工电话</el-radio> active-text="人工电话" inactive-text="智能外呼" @change="changeswitchtwo" />
<el-radio v-model="queryParams.phoneDialMethod" label="AI">智能外呼</el-radio> </span>
</el-form-item> </el-form-item>
<!-- <el-form-item label="" prop="manageRouteName" v-if="queryParams.nodeExecuteStatus == 'UNEXECUTED' &&foldshow==true"> <!-- <el-form-item label="" prop="manageRouteName" v-if="queryParams.nodeExecuteStatus == 'UNEXECUTED' &&foldshow==true">
<el-switch style="width: 220px" class="switchStyle" v-model="timeSignshow" active-color="#1890ff" inactive-color="#5AC1A1" active-text="全部" inactive-text="待办" @change="changeswitch"/> <el-switch style="width: 220px" class="switchStyle" v-model="timeSignshow" active-color="#1890ff" inactive-color="#5AC1A1" active-text="全部" inactive-text="待办" @change="changeswitch"/>
@ -181,18 +183,30 @@
</el-table-column> </el-table-column>
<el-table-column label="任务节点" align="center" prop="routeNodeName" width="110"> <el-table-column label="任务节点" align="center" prop="routeNodeName" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.routeNodeName == 'AFTER_DISCHARGE'">出院后<span v-if="scope.row.routeNodeDay"> <span v-if="scope.row.routeNodeName == 'AFTER_DISCHARGE'">
{{ scope.row.routeNodeDay }}</span></span> 出院后
<span v-if="scope.row.routeNodeName == 'AFTER_ADMISSION'">入院后<span v-if="scope.row.routeNodeDay"> <span v-if="scope.row.routeNodeDay"> {{ scope.row.routeNodeDay }}</span>
{{ scope.row.routeNodeDay }}</span></span> </span>
<span v-if="scope.row.routeNodeName == 'AFTER_CONSULTATION'">就诊后<span v-if="scope.row.routeNodeDay"> <span v-if="scope.row.routeNodeName == 'AFTER_ADMISSION'">
{{ scope.row.routeNodeDay }}</span></span> 入院后
<span v-if="scope.row.routeNodeName == 'AFTER_VISIT_DISCHARGE'">就诊/出院后<span <span v-if="scope.row.routeNodeDay"> {{ scope.row.routeNodeDay }}</span>
v-if="scope.row.routeNodeDay">{{ scope.row.routeNodeDay }}</span></span> </span>
<span v-if="scope.row.routeNodeName == 'PREOPERATIVE'">术前<span v-if="scope.row.routeNodeDay"> <span v-if="scope.row.routeNodeName == 'AFTER_CONSULTATION'">
{{ scope.row.routeNodeDay }}</span></span> 就诊后
<span v-if="scope.row.routeNodeName == 'POSTOPERATIVE'">术后<span v-if="scope.row.routeNodeDay"> <span v-if="scope.row.routeNodeDay"> {{ scope.row.routeNodeDay }}</span>
{{ scope.row.routeNodeDay }}</span></span> </span>
<span v-if="scope.row.routeNodeName == 'AFTER_VISIT_DISCHARGE'">
就诊/出院后
<span v-if="scope.row.routeNodeDay">{{ scope.row.routeNodeDay }}</span>
</span>
<span v-if="scope.row.routeNodeName == 'PREOPERATIVE'">
术前
<span v-if="scope.row.routeNodeDay"> {{ scope.row.routeNodeDay }}</span>
</span>
<span v-if="scope.row.routeNodeName == 'POSTOPERATIVE'">
术后
<span v-if="scope.row.routeNodeDay"> {{ scope.row.routeNodeDay }}</span>
</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="任务内容" align="center" prop="taskNodeType" :show-overflow-tooltip="true"> <el-table-column label="任务内容" align="center" prop="taskNodeType" :show-overflow-tooltip="true">
@ -224,9 +238,18 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="queryParams.nodeExecuteStatus == 'UNEXECUTED'" size="mini" type="text" <el-button v-if="queryParams.nodeExecuteStatus == 'UNEXECUTED'" size="mini" type="text"
icon="el-icon-bank-card" @click="handleUpdate(scope.row)">处理</el-button> icon="el-icon-bank-card" @click="handleUpdate(scope.row)">处理</el-button>
<el-button v-if="queryParams.nodeExecuteStatus == 'EXECUTED'" size="mini" type="text" <el-button v-if="whshow" size="mini" type="text" icon="el-icon-phone"
icon="el-icon-notebook-2" @click="handleadtail(scope.row)">详情</el-button> @click="Outbound(scope.row)">外呼</el-button>
<el-button v-if="czshow" size="mini" type="text" icon="el-icon-phone">外呼</el-button> <el-button v-if="AItrue && scope.row.taskNodeType == 'PHONE_OUTBOUND'" size="mini" type="text"
@click="playback(scope.row)" icon="el-icon-headset">回放</el-button>
<el-button
v-if="AItrue && !scope.row.taskNodeType == 'PHONE_OUTBOUND' && !scope.row.taskNodeType == 'QUESTIONNAIRE_SCALE'"
size="mini" type="text" icon="el-icon-view">查看</el-button>
<el-button
v-if="queryParams.nodeExecuteStatus == 'EXECUTED' && scope.row.taskNodeType == 'QUESTIONNAIRE_SCALE'"
size="mini" type="text" icon="el-icon-notebook-2" @click="questionlook(scope.row)">问卷查看</el-button>
<el-button v-if="COMMONtrue" size="mini" type="text" icon="el-icon-document"
@click="handleadtail(scope.row)">详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -235,15 +258,72 @@
:limit.sync="queryParams.pageSize" @pagination="getList" /> --> :limit.sync="queryParams.pageSize" @pagination="getList" /> -->
<myPagination v-show="total > 0" :total="total" :pageSize="queryParams.pageSize" <myPagination v-show="total > 0" :total="total" :pageSize="queryParams.pageSize"
:indexFromWrap="queryParams.pageNum" @updateCPage="updateCPage"></myPagination> :indexFromWrap="queryParams.pageNum" @updateCPage="updateCPage"></myPagination>
<el-dialog title="回放" :visible.sync="audioshow" width="400px" :before-close="audiohandleClose">
<div class="audio">
<audio ref="audioPlayer" :src="audiourl" controls></audio>
</div>
</el-dialog>
<el-dialog title="问卷查看" :visible.sync="questionshow" width="40%">
<div class="bottomheader">
<div class="right">
<div class="title">总分{{ questiondata.totalScore }}</div>
<div class="words" v-for="(item, index) in questiondata.subjectResultList" :key="index">
{{ index + 1 }}.{{ item.questionName }}
<span v-if="item.questionType == 'MULTIPLE_CHOICE'">单选题</span>
<span v-if="item.questionType == 'MULTIPLE_CHOICE_QUESTIONS'">多选题</span>
<span v-if="item.questionType == 'SCORING_QUESTIONS'">打分题</span>
<span v-if="item.questionType == 'COMBINATION_RADIO_SUBJECT'">组合单选题</span>
<span v-if="item.questionType == 'COMBINATION_MULTIPLE_SUBJECT'">组合多选题</span>
<span v-if="item.questionType == 'COMBINATION_BLANKS_SUBJECT'">组合填空题</span>
<span v-if="item.questionType == 'FILL_IN_THE_BLANKS'">填空题</span>
<span v-if="item.questionType == 'COMBINATION_SCORING_SUBJECT'">组合打分题</span>
<span v-if="item.questionType == 'DATE_BLANKS_SUBJECT'">日期填空题</span>
<span v-if="item.questionType == 'TIME_BLANKS_SUBJECT'">时间填空题</span>
<el-radio-group
v-if="item.questionType == 'MULTIPLE_CHOICE' || item.questionType == 'COMBINATION_RADIO_SUBJECT' || item.questionType == 'SCORING_QUESTIONS' || item.questionType == 'COMBINATION_SCORING_SUBJECT'"
v-model="item.checked" class="custom-radio-group" @change="radioGroupChange($event, item)">
<el-radio disabled class="custom" v-for="(aitem, aindex) in item.optionResults" :key="aindex"
:label="aitem.id" @change="radioChange($event, aitem, index)">
{{ aitem.optionName }}
</el-radio>
</el-radio-group>
<el-checkbox-group v-model="checkeddata" @change="radioGroupChange($event, item, 'checkbox')"
v-if="item.questionType == 'MULTIPLE_CHOICE_QUESTIONS' || item.questionType == 'COMBINATION_MULTIPLE_SUBJECT'">
<el-checkbox disabled v-for="(aitem, aindex) in item.optionResults" :key="aindex" :label="aitem.id"
@change="radioChangecheck($event, aitem, index, aindex)">
{{ aitem.optionName }}
</el-checkbox>
</el-checkbox-group>
<div v-if="item.questionType == 'FILL_IN_THE_BLANKS' || item.questionType == 'COMBINATION_BLANKS_SUBJECT'"
class="tk">
<el-input disabled v-model="item.fillBlanksAnswer" placeholder="请输入答案" type="textarea" />
</div>
<div v-if="item.questionType == 'DATE_BLANKS_SUBJECT'" style="margin: 20px 0 10px 30px">
<el-date-picker disabled @change="timepicker($event, index)" clearable v-model="item.fillBlanksAnswer"
type="date" value-format="yyyy-MM-dd" placeholder="选择日期">
</el-date-picker>
</div>
<div style="margin: 20px 0 10px 30px" v-if="item.questionType == 'TIME_BLANKS_SUBJECT'">
<el-time-select disabled @change="timepickerselect($event, index)" clearable
v-model="item.fillBlanksAnswer" :picker-options="{ start: '08:30', step: '00:30', end: '23:30', }"
placeholder="选择时间">
</el-time-select>
</div>
</div>
</div>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { manualFollowUpList } from "@/api/system/followup"; import { manualFollowUpList, createActualTimeTask, getPhoneDialVideo } from "@/api/system/followup";
import { usergetList } from "@/api/unitconfig/patientConfiguration"; import { usergetList } from "@/api/unitconfig/patientConfiguration";
import { getAge } from "@/utils/age"; import { getAge } from "@/utils/age";
import { selectAgencyList, getAgencyList } from "@/api/manage/selectAgencyList"; import { selectAgencyList, getAgencyList } from "@/api/manage/selectAgencyList";
import SearchFilter from '../../components/SearchForm.vue' import SearchFilter from '../../components/SearchForm.vue'
import {
selectPatientQuestionSubmit,
} from "@/api/system/taskExecuteRecord";
export default { export default {
name: "Followup22", name: "Followup22",
dicts: ["visit_method"], dicts: ["visit_method"],
@ -251,7 +331,12 @@ export default {
data() { data() {
return { return {
czshow: null, //
audiourl: undefined,
audioshow: false,
whshow: null,
AItrue: null,
COMMONtrue: null,
foldshow: null, foldshow: null,
maxTableHeight: undefined, maxTableHeight: undefined,
// 访 // 访
@ -290,13 +375,13 @@ export default {
open: false, open: false,
// //
timeSignshow: false, timeSignshow: false,
phoneDialMethodshow: false,
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
timeSign: "TODAY", timeSign: "TODAY",
nodeExecuteStatus: "UNEXECUTED", nodeExecuteStatus: "UNEXECUTED",
patientPhone: null, patientPhone: null,
followStartTime: null, followStartTime: null,
followEndTime: null, followEndTime: null,
clinicalStartTime: null, clinicalStartTime: null,
@ -348,6 +433,13 @@ export default {
// { required: true, message: "id", trigger: "blur" }, // { required: true, message: "id", trigger: "blur" },
// ], // ],
// }, // },
questionshow: false,
checkeddata: [],
questiondata: {
totalScore: 0, //
routeHandlePerson: null,
routeHandleId: null,
},
}; };
}, },
created() { created() {
@ -365,6 +457,70 @@ export default {
this.screenChange(); this.screenChange();
}, },
methods: { methods: {
async questionlook(row) {
await selectPatientQuestionSubmit(row.taskExecuteRecordId).then((res) => {
this.questiondata = res.data;
this.questiondata.subjectResultList.forEach((e) => {
e.optionResults.forEach((el) => {
if ((el.optionChooseSign == "0" && e.questionType == "MULTIPLE_CHOICE") || e.questionType == "COMBINATION_RADIO_SUBJECT") {
e.checked = el.id;
} else if (el.optionChooseSign == "0" && e.questionType == "MULTIPLE_CHOICE_QUESTIONS") {
this.checkeddata.push(el.id);
} else if (el.optionChooseSign == "0" && e.questionType == "SCORING_QUESTIONS") {
e.checked = el.id;
} else if (e.questionType == "COMBINATION_MULTIPLE_SUBJECT" && el.optionChooseSign == "0") {
this.checkeddata.push(el.id);
}
});
});
this.questionshow = true
});
},
audiohandleClose() {
this.$refs.audioPlayer.pause()
this.audioshow = false
this.audiourl = null
},
async playback(row) {
await this.$confirm('是否确认回放?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
getPhoneDialVideo(row.manageRouteNodeId).then(res => {
this.audioshow = true
this.audiourl = process.env.VUE_APP_BASE_API + res.data
setTimeout(() => {
this.$refs.audioPlayer.load(); //
// this.$refs.audioPlayer.play();
}, 1000);
})
})
},
Outbound(row) {
this.$confirm('是否确认进行外呼?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
createActualTimeTask({
"manageRouteId": row.manageRouteId,
"scriptInfoId": row.scriptInfoId,
"signPatientManageRouteNodeId": row.manageRouteNodeId
}).then(res => {
this.$modal.msgSuccess("外呼成功");
})
})
},
changeswitchtwo(e) {
if (e == true) {
this.queryParams.phoneDialMethod = "AI";
this.getList();
} else {
this.queryParams.phoneDialMethod = "COMMON";
this.getList();
}
},
changeswitch(e) { changeswitch(e) {
if (e == true) { if (e == true) {
this.queryParams.timeSign = "WHOLE"; this.queryParams.timeSign = "WHOLE";
@ -406,8 +562,9 @@ export default {
} else { } else {
this.queryParams.timeSign = "TODAY"; this.queryParams.timeSign = "TODAY";
this.timeSignshow = false; this.timeSignshow = false;
this.phoneDialMethodshow = false
this.queryParams.phoneDialMethod = "COMMON";
} }
console.log(this.queryParams.nodeExecuteStatus, "nodeExecuteStatus");
this.getList(); this.getList();
}, },
change(e) { change(e) {
@ -524,10 +681,20 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
manualFollowUpList(this.queryParams).then((response) => { manualFollowUpList(this.queryParams).then((response) => {
if (this.queryParams.phoneDialMethod == 'AI' && this.queryParams.nodeExecuteStatus == 'EXECUTED') { if (this.queryParams.phoneDialMethod == 'AI' && this.queryParams.nodeExecuteStatus == 'UNEXECUTED') {
this.czshow = true this.whshow = true
} else { } else {
this.czshow = false this.whshow = false
}
if (this.queryParams.phoneDialMethod == 'AI' && this.queryParams.nodeExecuteStatus == 'EXECUTED') {
this.AItrue = true
} else {
this.AItrue = false
}
if (this.queryParams.phoneDialMethod == 'COMMON' && this.queryParams.nodeExecuteStatus == 'EXECUTED') {
this.COMMONtrue = true
} else {
this.COMMONtrue = false
} }
localStorage.setItem("followupquery", JSON.stringify(this.queryParams)); localStorage.setItem("followupquery", JSON.stringify(this.queryParams));
this.taskExecuteRecordList = response.rows; this.taskExecuteRecordList = response.rows;
@ -656,6 +823,7 @@ export default {
wardId: null, wardId: null,
}; };
this.timeSignshow = false; this.timeSignshow = false;
this.phoneDialMethodshow = false
} else { } else {
this.queryParams = { this.queryParams = {
pageNum: 1, pageNum: 1,
@ -690,8 +858,6 @@ export default {
departmentId: null, departmentId: null,
wardId: null, wardId: null,
}; };
// this.timeSignshow=true
// this.queryParams.nodeExecuteStatus = 'EXECUTED'
} }
this.handleQuery(); this.handleQuery();
this.intentionalTime = []; this.intentionalTime = [];
@ -756,9 +922,7 @@ export default {
manageRouteNodeId: row.manageRouteNodeId, manageRouteNodeId: row.manageRouteNodeId,
visitRecordId: row.visitRecordId, visitRecordId: row.visitRecordId,
taskExecuteRecordId: row.taskExecuteRecordId, taskExecuteRecordId: row.taskExecuteRecordId,
routeHandleRemark: row.routeHandleRemark routeHandleRemark: row.routeHandleRemark ? row.routeHandleRemark : null,
? row.routeHandleRemark
: null,
}, },
}); });
}, },
@ -846,6 +1010,122 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-input.is-disabled .el-input__inner {
background-color: #fff !important;
color: black !important;
}
::v-deep .el-textarea.is-disabled .el-textarea__inner {
background-color: #fff !important;
color: black !important;
}
::v-deep .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
border: 1px solid #DCDFE6 !important;
border-color: #1890ff !important;
}
::v-deep .el-checkbox__input.is-disabled+span.el-checkbox__label {
color: black !important;
}
::v-deep .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
border-color: #1890ff !important;
}
::v-deep .el-checkbox__input.is-disabled .el-checkbox__inner {
background-color: #fff !important;
}
::v-deep .el-radio__input.is-disabled .el-radio__inner {
border: 1px solid #DCDFE6 !important;
background-color: #fff !important;
}
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
border-color: #1890ff !important;
}
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
color: #1890ff !important;
background-color: #1890ff !important;
}
::v-deep .el-radio__input.is-disabled+span.el-radio__label {
color: black !important;
}
.tk {
::v-deep .el-textarea__inner {
margin: 20px 0 10px 30px;
}
}
::v-deep .el-radio {
padding: 10px;
}
::v-deep .el-checkbox-group {
display: flex;
flex-direction: column;
padding: 10px 0px 10px 24px;
}
::v-deep .el-checkbox {
padding: 10px 0 10px 0px;
// padding: 10px;
}
.custom-radio-group {
display: flex;
flex-direction: column;
padding: 10px 0 10px 10px;
.custom {
padding: 10px 0 10px 10px;
}
}
.custom-radio-group {
display: flex;
flex-direction: column;
padding: 10px 0 10px 10px;
.custom {
padding: 10px 0 10px 10px;
}
}
.right {
width: 100%;
// background: yellow;
}
.bottomheader {
width: 99%;
background-color: #fff;
margin: 0 auto;
.title {
line-height: 40px;
font-size: 20px;
margin: 0 10px;
}
.words {
font-size: 15px;
padding: 10px 50px 10px 10px;
}
}
.audio {
margin: 10px 0px 10px 0;
}
audio {
width: 350px;
}
::v-deep .el-table { ::v-deep .el-table {
overflow: auto; overflow: auto;
} }
@ -907,9 +1187,13 @@ export default {
color: #fff; color: #fff;
} }
.el-switch__core, .el-switch__core {
width: 85px !important;
}
.el-switch__label { .el-switch__label {
width: 60px !important; width: 60px !important;
text-align: center;
} }
} }

View File

@ -662,17 +662,11 @@ export default {
); );
this.form = this.lists[0].list[0]; this.form = this.lists[0].list[0];
// //
if ( if (this.form.taskNodeType == "PROPAGANDA_ARTICLE" && this.form.templateId) {
this.form.taskNodeType == "PROPAGANDA_ARTICLE" &&
this.form.templateId
) {
getPropaganda(this.form.templateId).then((response) => { getPropaganda(this.form.templateId).then((response) => {
this.formview = response.data; this.formview = response.data;
}); });
} else if ( } else if (this.form.templateId && this.form.taskNodeType == "QUESTIONNAIRE_SCALE") {
this.form.templateId &&
this.form.taskNodeType == "QUESTIONNAIRE_SCALE"
) {
// //
questionname(this.form.templateId).then((res) => { questionname(this.form.templateId).then((res) => {
this.lookitemnew = res.data; this.lookitemnew = res.data;
@ -813,21 +807,12 @@ export default {
this.form.officialRemindContent = item.templateContent; this.form.officialRemindContent = item.templateContent;
}, },
// //
TemporaryStorage() { async TemporaryStorage() {
if ( console.log(this.form)
this.form.taskNodeType != "QUESTIONNAIRE_SCALE" && if (this.form.taskNodeType != "QUESTIONNAIRE_SCALE" && this.form.taskNodeType != "PROPAGANDA_ARTICLE") {
this.form.taskNodeType != "PROPAGANDA_ARTICLE"
) {
this.$refs.wangeditor.emit(); this.$refs.wangeditor.emit();
} }
this.$confirm( await this.$confirm("确认暂存时将过滤掉部分内容未填写完成的子节点,是否确认暂存?", "提示", { confirmButtonText: "确认", cancelButtonText: "取消", }).then(() => {
"确认暂存时将过滤掉部分内容未填写完成的子节点,是否确认暂存?",
"提示",
{
confirmButtonText: "确认",
cancelButtonText: "取消",
}
).then(() => {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: "暂存中", text: "暂存中",
@ -839,17 +824,14 @@ export default {
e.list.length > 0 ? e.list.forEach((el) => { e.list.length > 0 ? e.list.forEach((el) => {
el.routeNodeDay = e.routeNodeDay; el.routeNodeDay = e.routeNodeDay;
el.routeNodeName = e.routeNodeName; el.routeNodeName = e.routeNodeName;
el.phonePushSign = null;
if (el.phoneDialMethod == "COMMON" && el.templateId) { if (el.phoneDialMethod == "COMMON" && el.templateId) {
el.phonePushSign = "1"; el.phonePushSign = "1";
el.taskNodeType = "QUESTIONNAIRE_SCALE"; } else if (el.phoneDialMethod == "AI" && el.templateId) {
} else if ( el.phonePushSign = "1";
el.phoneDialMethod == "COMMON" && } else if (el.phoneDialMethod == "COMMON" && el.phoneTemplateId) {
el.phoneTemplateId
) {
el.phonePushSign = "1"; el.phonePushSign = "1";
el.taskNodeType = "PHONE_OUTBOUND";
} else if (el.phoneDialMethod == "AI" && el.phoneTemplateId) { } else if (el.phoneDialMethod == "AI" && el.phoneTemplateId) {
el.taskNodeType = "PHONE_OUTBOUND";
el.phonePushSign = "1"; el.phonePushSign = "1";
} }
this.updata.specialDiseaseNodeList.push(el); this.updata.specialDiseaseNodeList.push(el);
@ -866,30 +848,22 @@ export default {
// ); // );
// return; // return;
this.updata.specialDiseaseNodeList.forEach((ele) => { this.updata.specialDiseaseNodeList.forEach((ele) => {
loading.close();
if (ele.taskNodeType == "PHONE_OUTBOUND") { if (ele.taskNodeType == "PHONE_OUTBOUND") {
if (ele.phoneDialMethod == null || ele.phoneDialMethod == "") { if (ele.phoneDialMethod == null || ele.phoneDialMethod == "") {
this.$message.error("请先选择推送方式"); loading.close();
} else if ( return this.$message.error("请先选择推送方式");
ele.phoneTemplateId == null || } else if (ele.phoneTemplateId == null || ele.phoneTemplateId == "") {
ele.phoneTemplateId == "" loading.close();
) { return this.$message.error("请先选择话术模板");
this.$message.error("请先选择话术模板"); }
} else { }
});
specialDiseaseNode(this.updata).then((res) => { specialDiseaseNode(this.updata).then((res) => {
let wangeditorlist = []; let wangeditorlist = [];
if (localStorage.getItem("wangeditorlist")) { if (localStorage.getItem("wangeditorlist")) {
wangeditorlist = JSON.parse( wangeditorlist = JSON.parse(localStorage.getItem("wangeditorlist"));
localStorage.getItem("wangeditorlist") wangeditorlist = wangeditorlist.filter((e) => e.specialDiseaseNodeId == this.form.specialDiseaseNodeId);
); localStorage.setItem("wangeditorlist", JSON.stringify(wangeditorlist));
wangeditorlist = wangeditorlist.filter(
(e) =>
e.specialDiseaseNodeId == this.form.specialDiseaseNodeId
);
localStorage.setItem(
"wangeditorlist",
JSON.stringify(wangeditorlist)
);
} }
this.info(); this.info();
loading.close(); loading.close();
@ -900,9 +874,6 @@ export default {
setTimeout(() => { setTimeout(() => {
loading.close(); loading.close();
}, 3000); }, 3000);
}
}
});
}); });
}, },
// //
@ -986,13 +957,11 @@ export default {
}); });
}, },
// //
changeTaskType(code, taskSubdivision) { async changeTaskType(code, taskSubdivision) {
this.taskPartitionDictId = ""; this.taskPartitionDictId = "";
let id = this.selectTaskTypeList?.find((e) => e.taskTypeCode == code)?.id; let id = this.selectTaskTypeList?.find((e) => e.taskTypeCode == code)?.id;
this.form.taskTypeName = this.selectTaskTypeList?.find( this.form.taskTypeName = this.selectTaskTypeList?.find((e) => e.taskTypeCode == code)?.taskTypeName;
(e) => e.taskTypeCode == code await taskPartitionList(id).then((res) => {
)?.taskTypeName;
taskPartitionList(id).then((res) => {
// res.data?.forEach(e => { // res.data?.forEach(e => {
// if (e.taskNodeType == 'PHONE_OUTBOUND') { // if (e.taskNodeType == 'PHONE_OUTBOUND') {
// e.taskPartitionName = e.taskPartitionName + '()' // e.taskPartitionName = e.taskPartitionName + '()'
@ -1007,7 +976,7 @@ export default {
this.taskPartitionList = res.data; this.taskPartitionList = res.data;
this.form.taskSubdivision = ""; this.form.taskSubdivision = "";
this.form.taskSubdivisionName = ""; this.form.taskSubdivisionName = "";
this.form.taskNodeType = ""; // this.form.taskNodeType = "";
this.taskStatusDictList = []; this.taskStatusDictList = [];
if (taskSubdivision) { if (taskSubdivision) {
this.form.taskSubdivision = taskSubdivision; this.form.taskSubdivision = taskSubdivision;
@ -1017,11 +986,7 @@ export default {
}, },
// //
changetaskSubdivision(code, type) { changetaskSubdivision(code, type) {
if ( if (this.form.taskNodeType != "QUESTIONNAIRE_SCALE" && this.form.taskNodeType != "PROPAGANDA_ARTICLE" && this.form.taskNodeType != "PHONE_OUTBOUND") {
this.form.taskNodeType != "QUESTIONNAIRE_SCALE" &&
this.form.taskNodeType != "PROPAGANDA_ARTICLE" &&
this.form.taskNodeType != "PHONE_OUTBOUND"
) {
this.$refs.wangeditor.emit(); this.$refs.wangeditor.emit();
} }
setTimeout(() => { setTimeout(() => {
@ -1034,31 +999,19 @@ export default {
if (!type) { if (!type) {
this.form.taskStatus = ""; this.form.taskStatus = "";
} }
this.form.taskSubdivisionName = this.taskPartitionList?.find( this.form.taskSubdivisionName = this.taskPartitionList?.find((e) => e.taskPartitionCode == code)?.taskPartitionName;
(e) => e.taskPartitionCode == code let id = this.taskPartitionList?.find((e) => e.taskPartitionCode == code)?.id;
)?.taskPartitionName;
let id = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.id;
this.taskPartitionDictId = id; this.taskPartitionDictId = id;
this.form.secondClassifyDescribe = this.taskPartitionList?.find( this.form.secondClassifyDescribe = this.taskPartitionList?.find((e) => e.taskPartitionCode == code)?.secondClassifyDescribe;
(e) => e.taskPartitionCode == code this.form.executionTime = this.taskPartitionList?.find((e) => e.taskPartitionCode == code)?.executionTime;
)?.secondClassifyDescribe;
this.form.executionTime = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code
)?.executionTime;
taskStatusDictList(id).then((res) => { taskStatusDictList(id).then((res) => {
this.taskStatusDictList = res.data; this.taskStatusDictList = res.data;
}); });
this.taskPartitionList.forEach((el) => { this.taskPartitionList.forEach((el) => {
if (code == el.taskPartitionCode) { if (code == el.taskPartitionCode) {
this.form.executionTime = el.executionTime; this.form.executionTime = el.executionTime;
this.form.taskNodeType = el.taskNodeType; // this.form.taskNodeType = el.taskNodeType;
if ( if (this.form.taskNodeType == "PHONE_OUTBOUND" || this.form.taskNodeType == "PROPAGANDA_ARTICLE" || this.form.taskNodeType == "QUESTIONNAIRE_SCALE") {
this.form.taskNodeType == "PHONE_OUTBOUND" ||
this.form.taskNodeType == "PROPAGANDA_ARTICLE" ||
this.form.taskNodeType == "QUESTIONNAIRE_SCALE"
) {
this.form.nodeContent = `<p></p>`; this.form.nodeContent = `<p></p>`;
} }
if (!type) { if (!type) {
@ -1070,15 +1023,11 @@ export default {
if (localStorage.getItem("wangeditorlist")) { if (localStorage.getItem("wangeditorlist")) {
wangeditorlist = JSON.parse(localStorage.getItem("wangeditorlist")); wangeditorlist = JSON.parse(localStorage.getItem("wangeditorlist"));
this.form.nodeContent = "<p></p>"; this.form.nodeContent = "<p></p>";
this.form.nodeContent = wangeditorlist.find( this.form.nodeContent = wangeditorlist.find((e) => e.taskSubdivision == this.form.taskSubdivision && e.specialDiseaseNodeId == this.form.specialDiseaseNodeId)?.nodeContent;
(e) =>
e.taskSubdivision == this.form.taskSubdivision &&
e.specialDiseaseNodeId == this.form.specialDiseaseNodeId
)?.nodeContent;
} }
this.form.taskNodeType = this.taskPartitionList?.find( // this.form.taskNodeType = this.taskPartitionList?.find(
(e) => e.taskPartitionCode == code // (e) => e.taskPartitionCode == code
)?.taskNodeType; // )?.taskNodeType;
}); });
loading.close(); loading.close();
}, 500); }, 500);