This commit is contained in:
闫晓茹 2024-07-03 18:27:35 +08:00
parent c48f3cac86
commit 8b6e4d6203
8 changed files with 367 additions and 123 deletions

View File

@ -47,6 +47,12 @@ export function selectPatientQuestionSubmit(taskExecuteRecordId) {
method: 'get'
})
}
export function questionname(id) {
return request({
url: '/system/question/'+id,
method: 'get'
})
}
// 入院记录
export function selectVisitRecord(id) {

View File

@ -1,9 +1,9 @@
import request from '@/utils/request'
// 标签
export function labelFieldList(fieldType) {
export function labelFieldList() {
return request({
url: `/manage/labelfieldinfo/labelFieldList?fieldType=${fieldType}`,
url: '/manage/labelfieldinfo/labelFieldList',
method: 'get',
})
}

View File

@ -356,25 +356,40 @@
</el-form-item>
</el-form>
</div>
<div class="imageScriptpreviews" v-if="formview&&form.taskSubdivisiontemplateType == 'PROPAGANDA'&&form.templateId">
<!-- <div class="titletop">
文章模板:{{ formview.propagandaTitle }}
</div> -->
<div class="bodytop">
<div class="titledata">{{ formview.propagandaTitle }}</div>
<div>
<img :src="baseUrl + formview.propagandaCoverPath" alt="" />
<div class="know">知识卡片</div>
<div class="knowlist">
<Editorxj
v-model="formview.propagandaContent"
:min-height="192"
/>
</div>
</div>
<!-- 宣教 -->
<div
class="imageScriptpreviews"
v-if="
formview &&
form.taskSubdivisiontemplateType == 'PROPAGANDA' &&
form.templateId
"
>
<div class="bodytop">
<div class="titledata">{{ formview.propagandaTitle }}</div>
<div>
<img :src="baseUrl + formview.propagandaCoverPath" alt="" />
<div class="know">知识卡片</div>
<div class="knowlist">
<Editorxj
v-model="formview.propagandaContent"
:min-height="192"
/>
</div>
</div>
</div>
</div>
<!-- 问卷 -->
<div
class="righttextarea"
v-if="
form.taskSubdivisiontemplateType == 'QUESTIONNAIRE' &&
form.templateId
"
>
<questionopennew :lookitemnew="lookitemnew"></questionopennew>
</div>
<div class="bottomform">
<wangeditor
style="width: 100%"
@ -564,7 +579,7 @@
</span>
</div>
<div class="pushMethod">
时间间隔():
时间间隔():
<span>
<el-input
v-model.number="form.phoneTimeInterval"
@ -612,12 +627,22 @@
</span>
</div>
</div>
<div class="imageScriptpreview" v-if="phoneNodeContent">
<!-- 话术模板内容 -->
<div
class="imageScriptpreview"
v-if="phoneNodeContent "
>
<Scriptpreview
:phoneNodeContent="phoneNodeContent"
></Scriptpreview>
</div>
<!-- 问卷模板内容 -->
<div
class="imageScriptpreview"
v-if="lookitemnew"
>
<questionopennew :lookitemnew="lookitemnew"></questionopennew>
</div>
</div>
</div>
</div>
@ -826,22 +851,23 @@ import indexjs from "./indexjs.js";
export default indexjs;
</script>
<style scoped lang="scss">
.righttextarea {
padding: 10px;
border: 1.5px solid #c7c7c7;
border-radius: 5px;
}
::v-deep iframe {
width: 100%;
height: 500px;
}
.imageScriptpreview {
margin-top: 20px;
// width: 500px;
height: 400px;
// background: red;
overflow-x: hidden;
}
.imageScriptpreviews {
// margin-top: 20px;
// width: 500px;
// height: 400px;
// background: red;
// overflow-x: auto;
margin: 0 auto;
width: 90%;
// height: 300px;
width: 90%;
// height: 300px;
.titletop {
font-size: 16px;
font-weight: 700;
@ -865,7 +891,7 @@ export default indexjs;
}
img {
// width: 100%;
width: 90%;
// width: 362px;
// height: 127px;
margin: 0px 0px 0px 30px;

View File

@ -1,5 +1,7 @@
import wangeditor from "../components/wangEditor.vue";
import question from "../components/question.vue";
import { questionname } from "@/api/system/taskExecuteRecord";
import message from "../components/message.vue";
import scripts from "../components/script.vue";
import propaganda from "../components/propaganda.vue";
@ -11,6 +13,7 @@ import Editorxj from "../Editorxj/index.vue";
import {
getPropaganda,
} from "@/api/manage/propaganda";
import questionopennew from "../components/questionopennew.vue";
import {
selectTaskTypeList,
@ -24,9 +27,12 @@ import {
triggerConditionList,
getList,
} from "@/api/system/specialDiseaseNode";
import { faLess } from "@fortawesome/free-brands-svg-icons";
import { faL } from "@fortawesome/free-solid-svg-icons";
export default {
components: {
questionopennew,
wangeditor,
Editorxj,
question,
@ -41,8 +47,9 @@ export default {
data() {
return {
formview: {},
lookitemnew: {},
baseUrl: process.env.VUE_APP_BASE_API,
showquestion: false,
value: 1,
ConditionValue: [],
dictDataType: "",
@ -338,18 +345,18 @@ export default {
this.changelisy();
}, 3000);
this.itemlist.specialDiseaseRouteId = this.$route.query.id;
console.log(this.form.templateId, 'this.form.templateId')
if (this.form.templateId) {
getPropaganda(this.form.templateId).then((response) => {
this.formview = response.data;
});
}
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.templateType == 'SCRIPT' && e.flowScheme) {
this.phoneNodeContent = e.flowScheme
console.log(this.phoneNodeContent, 'this.phoneNodeContent')
}
if (e.messagePushSign) {
e.messagePushSign = "" + e.messagePushSign;
}
@ -369,6 +376,18 @@ export default {
"routeNodeName"
);
this.form = this.lists[0].list[0];
// 宣教模板回显
if (this.form.templateType == "PROPAGANDA" && this.form.templateId) {
getPropaganda(this.form.templateId).then((response) => {
this.formview = response.data;
});
} else
if (this.form.templateType == "QUESTIONNAIRE" || this.form.templateType == "SCRIPT" && this.form.templateId) {
// 问卷模板回显
questionname(this.form.templateId).then((res) => {
this.lookitemnew = res.data;
});
}
if (this.form.taskType) {
this.changeTaskType(this.form.taskType, this.form.taskSubdivision);
}
@ -613,17 +632,26 @@ export default {
console.log(e)
if (e == 'AI') {
// this.form.templateId=''
// 清空问卷id和名字
this.form.phoneTemplateId = ''
this.form.phoneTemplateName = ''
// 清空话术和问卷
this.phoneNodeContent = ''
this.lookitemnew = ''
} else if (e == 'COMMON') {
// 清空问卷id话术id和对应名字
this.form.templateId = ''
this.form.templateName = ''
this.form.phoneTemplateId = ''
this.form.phoneTemplateName = ''
// 清空话术和问卷
this.phoneNodeContent = ''
this.lookitemnew = ''
}
},
@ -675,11 +703,14 @@ export default {
el.routeNodeDay = e.routeNodeDay;
el.routeNodeName = e.routeNodeName;
if (el.phoneDialMethod == 'COMMON' && el.templateId) {
el.phonePushSign = "1";
el.templateType = 'QUESTIONNAIRE'
} else if (el.phoneDialMethod == 'COMMON' && el.phoneTemplateId) {
el.phonePushSign = "1";
el.templateType = 'SCRIPT'
} else if (el.phoneDialMethod == "AI" && el.phoneTemplateId) {
el.phonePushSign = "1";
el.templateType = "SCRIPT";
}
this.itemlist.specialDiseaseNodeList.push(el);
@ -710,8 +741,10 @@ export default {
},
//问卷传值
questionontemplate(item) {
console.log(item, 'iten')
this.form.templateId = item.templateId;
this.form.templateName = item.templateName;
this.lookitemnew = item.lookitemnew
},
//宣教传值
propagandaontemplate(item) {
@ -721,24 +754,9 @@ export default {
// if(item){
this.formview = item.formview
// }else{
// getPropaganda( this.form.templateId).then((response) => {
// this.formview = response.data;
// });
// }
},
bottomclickevent(uitem, index, uindex) {
console.log(uitem, 'this.form.templateId')
if (uitem.templateId && uitem.taskSubdivisiontemplateType == "PROPAGANDA") {
getPropaganda(uitem.templateId).then((response) => {
this.formview = response.data;
console.log(this.formview,'this.formview')
});
}
if (
this.form.taskSubdivisiontemplateType != "QUESTIONNAIRE" &&
this.form.taskSubdivisiontemplateType != "PROPAGANDA" &&
@ -749,7 +767,32 @@ export default {
setTimeout(() => {
this.form = uitem;
// console.log( this.form,'this.form')
// console.log(this.form, ' this.form')
this.$forceUpdate()
if (this.form.templateType == "PROPAGANDA" && this.form.templateId) {
getPropaganda(this.form.templateId).then((response) => {
// console.log(response.data, 'this.formview')
this.formview = response.data;
});
} else if (this.form.templateType == "QUESTIONNAIRE" && this.form.templateId) {
questionname(this.form.templateId).then((res) => {
// console.log(res, "res");
this.lookitemnew = res.data;
});
// this.loading=true
} else if (this.form.templateType == 'SCRIPT' && this.form.flowScheme) {
this.phoneNodeContent = this.form.flowScheme
console.log(this.phoneNodeContent, 'this.phoneNodeContent11')
}
this.taskPartitionList = [];
if (this.form.taskType) {
this.changeTaskType(this.form.taskType, this.form.taskSubdivision);

View File

@ -638,6 +638,7 @@ export default {
};
},
mounted() {
console.log( this.phoneNodeContent,' this.phoneNodeContent')
this.initG6Editor();
this.getlist();
// this.editor.getCurrentPage().save()
@ -646,6 +647,7 @@ export default {
},
watch: {
phoneNodeContent(newValue, oldValue) {
console.log(newValue,'newValue222222222222222222222')
this.phoneNodeContent = newValue;
this.getlist();
},

View File

@ -173,12 +173,14 @@
@pagination="getList"
/>
</el-dialog>
<el-dialog title="问卷预览" :visible.sync="showquestion" width="90%">
<div class="righttextarea">
<questionopennew v-if="showquestion"></questionopennew>
</div>
</el-dialog>
<el-dialog title="问卷预览" :visible.sync="showquestion" width="40%">
<div class="righttextarea">
<questionopennew
:lookitemnew="lookitemnew"
v-if="showquestion"
></questionopennew>
</div>
</el-dialog>
</div>
</template>
@ -195,10 +197,14 @@ import {
updateclassification,
} from "@/api/system/question";
import questionopennew from "./questionopennew.vue";
import { selectPatientQuestionSubmit } from "@/api/system/taskExecuteRecord";
import { questionname } from "@/api/system/taskExecuteRecord";
export default {
name: "Question",
props: ["templateId", "templateName", questionopennew],
props: ["templateId", "templateName"],
components: {
questionopennew,
},
data() {
return {
showquestion: false,
@ -230,7 +236,7 @@ export default {
},
handleselectId: "",
handleselectName: null,
questiondata:[],
lookitemnew: [],
};
},
watch: {
@ -260,41 +266,9 @@ export default {
console.log(row, "row");
this.showquestion = true;
selectPatientQuestionSubmit(row.id).then((res) => {
questionname(row.id).then((res) => {
console.log(res, "res");
this.questiondata = res.data;
// if (this.$route.query.routeHandleRemark) {
// this.questiondata.routeHandleRemark =
// this.$route.query.routeHandleRemark;
// }
// this.questiondata.subjectResultList.forEach((e) => {
// e.optionResults.forEach((el) => {
// // console.log(el, "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.lookitemnew = res.data;
});
},
clickDepartmenitem(item) {
@ -310,10 +284,14 @@ export default {
handleselect(item) {
this.handleselectId = item.id;
this.handleselectName = item.questionnaireName;
this.$emit("on-template", {
templateId: item.id,
templateName: item.questionnaireName,
questionname(item.id).then((res) => {
this.$emit("on-template", {
templateId: item.id,
templateName: item.questionnaireName,
lookitemnew: res.data,
});
});
this.classificationOpen = false;
},
classificationOpenfalse() {

View File

@ -70,9 +70,9 @@ export default {
// questionopen: false,
};
},
watch: {
},
created() {
console.log(this.lookitemnew,'lookitemnewlookitemnewlookitemnew')
this.questiondata = this.lookitemnew
},
mounted() {

View File

@ -172,6 +172,40 @@
</el-form-item>
</el-form>
</div>
<!-- 宣教 -->
<div
class="imageScriptpreviews"
v-if="
formview &&
form.taskSubdivisiontemplateType == 'PROPAGANDA' &&
form.templateId
"
>
<div class="bodytop">
<div class="titledata">{{ formview.propagandaTitle }}</div>
<div>
<img :src="baseUrl + formview.propagandaCoverPath" alt="" />
<div class="know">知识卡片</div>
<div class="knowlist">
<Editorxj
v-model="formview.propagandaContent"
:min-height="192"
/>
</div>
</div>
</div>
</div>
<!-- 问卷 -->
<div
class="righttextarea"
v-show="
form.taskSubdivisiontemplateType == 'QUESTIONNAIRE' &&
form.templateId
"
>
<questionopennew :lookitemnew="lookitemnew"></questionopennew>
</div>
<div class="bottomform">
<wangeditor
style="width: 100%"
@ -299,15 +333,21 @@
<div class="pushMethod">
推送方式
<span>
<el-radio-group v-model="form.phoneDialMethod" @change="changephoneDialMethod">
<el-radio label="COMMON" >人工电话</el-radio>
<el-radio label="AI" >自动外呼</el-radio>
<el-radio-group
v-model="form.phoneDialMethod"
@change="changephoneDialMethod"
>
<el-radio label="COMMON">人工电话</el-radio>
<el-radio label="AI">自动外呼</el-radio>
</el-radio-group>
</span>
</div>
<div class="pushMethod">
话术模板
<span class="spanname" v-if="form.templateId&&form.phoneDialMethod=='COMMON'">
<span
class="spanname"
v-if="form.templateId && form.phoneDialMethod == 'COMMON'"
>
<scripts
@on-template="messageontemplateword"
:templateId="form.phoneTemplateId"
@ -342,7 +382,7 @@
></question>
</span>
</div>
<div class="pushMethod">
<!-- <div class="pushMethod">
<el-switch
v-model="form.phonePushSign"
active-color="#13ce66"
@ -350,7 +390,7 @@
inactive-value="0"
>
</el-switch>
</div>
</div> -->
</div>
<div class="flex">
<div class="pushMethod">
@ -371,7 +411,7 @@
</span>
</div>
<div class="pushMethod">
时间间隔:
时间间隔():
<span>
<el-input
v-model.number="form.phoneTimeInterval"
@ -426,6 +466,21 @@
</span>
</div>
</div>
<!-- 话术模板内容 -->
<div
class="imageScriptpreview"
v-if="
phoneNodeContent && form.templateType == 'SCRIPT'
"
>
<Scriptpreview
:phoneNodeContent="phoneNodeContent"
></Scriptpreview>
</div>
<!-- 问卷模板内容 -->
<div class="imageScriptpreview" v-else-if="lookitemnew && form.templateType == 'QUESTIONNAIRE'">
<questionopennew :lookitemnew="lookitemnew"></questionopennew>
</div>
</div>
</div>
</div>
@ -479,6 +534,11 @@
</template>
<script>
import questionopennew from "../components/questionopennew.vue";
import Editorxj from "../Editorxj/index.vue";
import Scriptpreview from ".././components/Scriptpreviewopen.vue";
import { questionname } from "@/api/system/taskExecuteRecord";
import { getPropaganda } from "@/api/manage/propaganda";
import wangeditor from "../components/wangEditor.vue";
import question from "../components/question.vue";
import message from "../components/message.vue";
@ -507,10 +567,19 @@ export default {
scripts,
officialAccount,
miniProgram,
Scriptpreview,
questionopennew,
Editorxj,
},
name: "specialDiseaseNode",
data() {
return {
formview: {},
lookitemnew: {},
baseUrl: process.env.VUE_APP_BASE_API,
showquestion: false,
phoneNodeContent: "",
optionslist: [],
optionslistS: [],
value: "",
@ -596,19 +665,27 @@ export default {
},
mounted() {},
methods: {
changephoneDialMethod(e){
console.log(e,'e')
if(e=='AI'){
changephoneDialMethod(e) {
console.log(e);
if (e == "AI") {
// this.form.templateId=''
this.form.phoneTemplateId=''
this.form.phoneTemplateName=''
// id
this.form.phoneTemplateId = "";
this.form.phoneTemplateName = "";
//
this.phoneNodeContent = "";
this.lookitemnew = "";
} else if (e == "COMMON") {
// idid
}else if(e=='COMMON'){
this.form.templateId=''
this.form.templateName=''
this.form.templateId = "";
this.form.templateName = "";
this.form.phoneTemplateId=''
this.form.phoneTemplateName=''
this.form.phoneTemplateId = "";
this.form.phoneTemplateName = "";
//
this.phoneNodeContent = "";
this.lookitemnew = "";
}
},
infolistword() {
@ -665,6 +742,10 @@ export default {
this.agreeNumber = res.data.agreeNumber;
this.totalNumber = res.data.totalNumber;
res.data.specialDiseaseNodeList.forEach((e) => {
if (e.templateType == "SCRIPT" && e.flowScheme) {
this.phoneNodeContent = e.flowScheme;
console.log(this.phoneNodeContent, "this.phoneNodeContent");
}
if (e.messagePushSign) {
e.messagePushSign = "" + e.messagePushSign;
}
@ -684,6 +765,22 @@ export default {
"routeNodeName"
);
this.form = this.lists[0].list[0];
console.log(this.form, "this,form");
//
if (this.form.templateType == "PROPAGANDA"&&this.form.templateId) {
getPropaganda(this.form.templateId).then((response) => {
console.log(response, " this.formview ");
this.formview = response.data;
});
} else if (this.form.templateType == "QUESTIONNAIRE"||this.form.templateType == "SCRIPT"&&this.form.templateId) {
console.log(this.form.templateId,'this.form.templateId5555555555')
//
questionname(this.form.templateId).then((res) => {
this.lookitemnew = res.data;
});
}
if (this.form.taskType) {
this.changeTaskType(this.form.taskType, this.form.taskSubdivision);
}
@ -788,6 +885,7 @@ export default {
this.form.phoneTemplateId = item.templateId;
this.form.phoneTemplateName = item.templateName;
// this.form.messagePreview = item.templateContent;
this.phoneNodeContent = item.phoneNodeContent;
},
//
officialAccountontemplate(item) {
@ -824,14 +922,19 @@ export default {
el.routeNodeDay = e.routeNodeDay;
el.routeNodeName = e.routeNodeName;
if (el.phoneDialMethod == "COMMON" && el.templateId) {
el.phonePushSign = "1";
el.templateType = "QUESTIONNAIRE";
} else if (
el.phoneDialMethod == "COMMON" &&
el.phoneTemplateId
) {
el.phonePushSign = "1";
el.templateType = "SCRIPT";
} else if (el.phoneDialMethod == "AI" && el.phoneTemplateId) {
el.templateType = "SCRIPT";
el.phonePushSign = "1";
}
this.updata.specialDiseaseNodeList.push(el);
})
@ -846,6 +949,8 @@ export default {
// !e.taskSubdivision &&
// !e.taskStatus
// );
// console.log(this.updata,'this.updata')
// return
specialDiseaseNode(this.updata).then((res) => {
this.info();
loading.close();
@ -858,15 +963,23 @@ export default {
},
//
questionontemplate(item) {
console.log(item, "iten");
this.form.templateId = item.templateId;
this.form.templateName = item.templateName;
this.lookitemnew = item.lookitemnew;
},
//
propagandaontemplate(item) {
console.log(item, "iten");
this.form.templateId = item.templateId;
this.form.templateName = item.templateName;
this.formview = item.formview;
},
//
bottomclickevent(uitem, index, uindex) {
// this.phoneNodeContent = "";
// this.lookitemnew = "";
if (
this.form.taskSubdivisiontemplateType != "QUESTIONNAIRE" &&
this.form.taskSubdivisiontemplateType != "PROPAGANDA"
@ -875,6 +988,25 @@ export default {
}
setTimeout(() => {
this.form = uitem;
if (this.form.templateType == "PROPAGANDA"&&this.form.templateId) {
//
getPropaganda(this.form.templateId).then((response) => {
this.formview = response.data;
});
} else if (this.form.templateType == "QUESTIONNAIRE"&&this.form.templateId) {
console.log(this.form.templateId,'this.form.templateId')
questionname(this.form.templateId).then((res) => {
//
console.log(res, "res");
this.lookitemnew = res.data;
});
// this.loading=true
} else if (this.form.templateType == "SCRIPT" && this.form.flowScheme) {
//
this.phoneNodeContent = this.form.flowScheme;
console.log(this.phoneNodeContent, "this.phoneNodeContent11");
}
this.taskPartitionList = [];
if (this.form.taskType) {
this.changeTaskType(this.form.taskType, this.form.taskSubdivision);
@ -1067,6 +1199,63 @@ export default {
};
</script>
<style scoped lang="scss">
.righttextarea {
padding: 10px;
border: 1.5px solid #c7c7c7;
border-radius: 5px;
}
::v-deep iframe {
width: 100%;
height: 500px;
}
.imageScriptpreview {
width: 100%;
margin-top: 20px;
}
.imageScriptpreviews {
margin: 0 auto;
width: 90%;
// height: 300px;
.titletop {
font-size: 16px;
font-weight: 700;
}
.bodytop {
position: relative;
top: 20px;
// height: 300px;
// overflow: auto;
border: 1px solid #e2e2e2;
.titledata {
margin: 30px 0px 15px 30px;
top: 14px;
font-size: 20px;
}
.audiotop {
margin: 10px 0px 10px 30px;
}
img {
width: 90%;
// width: 362px;
// height: 127px;
margin: 0px 0px 0px 30px;
}
.know {
margin: 11px 0px 10px 30px;
font-size: 16px;
}
.knowlist {
margin: 10px 0px 10px 30px;
font-size: 16px;
}
}
}
::v-deep .el-input.is-disabled .el-input__inner {
background-color: #fff !important;
color: #606266 !important;