This commit is contained in:
闫晓茹 2024-07-03 10:21:31 +08:00
parent abda5eaa0a
commit 5b26dd3740
13 changed files with 2603 additions and 1172 deletions

View File

@ -97,14 +97,14 @@
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.portaitCheckStatus == "AGREE" ? "审核通过" : "" }} {{ scope.row.portaitCheckStatus == "AGREE" ? "审核通过" : "" }}
{{ scope.row.portaitCheckStatus == "DISAGREE" ? "已忽略" : "" }} {{ scope.row.portaitCheckStatus == "DISAGREE" ? "已忽略" : "" }}
{{ scope.row.portaitCheckStatus == "" ? "未审核" : "" }} {{ scope.row.portaitCheckStatus ==null ? "未审核" : "" }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="路径审核状态" align="center" prop="routeCheckStatus" width="100"> <el-table-column label="路径审核状态" align="center" prop="routeCheckStatus" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.routeCheckStatus == "AGREE" ? "审核通过" : "" }} {{ scope.row.routeCheckStatus == "AGREE" ? "审核通过" : "" }}
{{ scope.row.routeCheckStatus == "DISAGREE" ? "已忽略" : "" }} {{ scope.row.routeCheckStatus == "DISAGREE" ? "已忽略" : "" }}
{{ scope.row.routeCheckStatus == "" ? "未审核" : "" }} {{ scope.row.routeCheckStatus == null ? "未审核" : "" }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">

View File

@ -137,7 +137,7 @@
</el-form-item> </el-form-item>
<el-form-item label="短信内容" prop="textMessageContent"> <el-form-item label="短信内容" prop="textMessageContent">
<el-input v-model="form.textMessageContent" placeholder="请输入短信内容" type="textarea" maxlength="300" /> <el-input v-model="form.textMessageContent" placeholder="请输入短信内容" type="textarea" maxlength="300" :rows="10" />
</el-form-item> </el-form-item>
<el-form-item label="适用任务类型" prop="suitTaskTypeIds"> <el-form-item label="适用任务类型" prop="suitTaskTypeIds">
<el-select v-model="form.suitTaskTypeIds" placeholder="请选择适用任务类型" style="width: 350px" multiple> <el-select v-model="form.suitTaskTypeIds" placeholder="请选择适用任务类型" style="width: 350px" multiple>

File diff suppressed because it is too large Load Diff

View File

@ -123,6 +123,7 @@ export default {
}, },
methods: { methods: {
init() { init() {
// console.log(111111111111)
const editor = this.$refs.editor; const editor = this.$refs.editor;
this.Quill = new Quill(editor, this.options); this.Quill = new Quill(editor, this.options);
// //

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,12 @@ import propaganda from "../components/propaganda.vue";
import officialAccount from "../components/officialAccount.vue"; import officialAccount from "../components/officialAccount.vue";
import miniProgram from "../components/miniProgram.vue"; import miniProgram from "../components/miniProgram.vue";
import { getAgencytype } from "@/api/system/agency"; import { getAgencytype } from "@/api/system/agency";
import Scriptpreview from ".././components/Scriptpreviewopen.vue";
import Editorxj from "../Editorxj/index.vue";
import {
getPropaganda,
} from "@/api/manage/propaganda";
import { import {
selectTaskTypeList, selectTaskTypeList,
taskPartitionList, taskPartitionList,
@ -18,21 +24,25 @@ import {
triggerConditionList, triggerConditionList,
getList, getList,
} from "@/api/system/specialDiseaseNode"; } from "@/api/system/specialDiseaseNode";
import Cookies from "js-cookie";
export default { export default {
components: { components: {
wangeditor, wangeditor,
Editorxj,
question, question,
propaganda, propaganda,
message, message,
scripts, scripts,
officialAccount, officialAccount,
miniProgram, miniProgram,
Scriptpreview
}, },
name: "specialDiseaseNode", name: "specialDiseaseNode",
data() { data() {
return { return {
formview: {},
baseUrl: process.env.VUE_APP_BASE_API,
value: 1, value: 1,
ConditionValue: [], ConditionValue: [],
dictDataType: "", dictDataType: "",
@ -83,6 +93,7 @@ export default {
agreeNumber: 0, agreeNumber: 0,
value: "", value: "",
input: "", input: "",
phoneNodeContent: '',
//任务类型 //任务类型
selectTaskTypeList: [], selectTaskTypeList: [],
//任务状态 //任务状态
@ -116,7 +127,6 @@ export default {
this.$set(this.openlist, "suitRange", this.$route.query.suitRange); this.$set(this.openlist, "suitRange", this.$route.query.suitRange);
this.openlist.routeId = this.$route.query.id; this.openlist.routeId = this.$route.query.id;
this.itemlist.routeName = this.$route.query.routeName this.itemlist.routeName = this.$route.query.routeName
} }
this.taskinfo(); this.taskinfo();
this.infolistname(); this.infolistname();
@ -138,19 +148,7 @@ export default {
}, },
deep: true, deep: true,
}, },
// "openlist.triggerConditionList": {
// handler(newValue, oldValue) {
// // console.log(newValue,'newValue')
// newValue.forEach(e=>{
// console.log(e,'e')
// })
// // if (newValue == "NOT_SEND_MESSAGE") {
// // this.form.phoneMessageTemplateId = "";
// // this.form.phoneMessageTemplateName = "";
// // }
// },
// deep: true,
// },
}, },
mounted() { mounted() {
// this.form = this.lists[0].list[0]; // this.form = this.lists[0].list[0];
@ -189,7 +187,6 @@ export default {
}); });
delete this.openlist.triggerConditionList.optionstriggerConditionOperator delete this.openlist.triggerConditionList.optionstriggerConditionOperator
loading.close(); loading.close();
console.log(this.openlist.triggerConditionList, 'this.openlist.triggerConditionList')
// return; // return;
triggerCondition(this.openlist).then((res) => { triggerCondition(this.openlist).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -339,8 +336,15 @@ export default {
)?.dictCode; )?.dictCode;
setTimeout(() => { setTimeout(() => {
this.changelisy(); this.changelisy();
}, 1000); }, 3000);
this.itemlist.specialDiseaseRouteId = this.$route.query.id; 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) => { selectSpecialDisease(this.$route.query.id).then((res) => {
loading.close(); loading.close();
this.agreeNumber = res.data.agreeNumber; this.agreeNumber = res.data.agreeNumber;
@ -449,7 +453,6 @@ export default {
optiononditionOperator() { optiononditionOperator() {
var dictType = "trigger_condition_operator"; var dictType = "trigger_condition_operator";
getAgencytype(dictType).then((res) => { getAgencytype(dictType).then((res) => {
// console.log(res, 'redsssssssss')
this.openlist.triggerConditionList.optionstriggerConditionOperator = res.data; this.openlist.triggerConditionList.optionstriggerConditionOperator = res.data;
}); });
@ -489,7 +492,6 @@ export default {
// this.openlist.triggerConditionList[index].optionstriggerConditionOperator=[] // this.openlist.triggerConditionList[index].optionstriggerConditionOperator=[]
getList(dictType, this.dictDataType).then((res) => { getList(dictType, this.dictDataType).then((res) => {
this.$set(this.openlist.triggerConditionList[index], 'optionstriggerConditionOperator', res.data) this.$set(this.openlist.triggerConditionList[index], 'optionstriggerConditionOperator', res.data)
console.log(this.openlist.triggerConditionList[index].optionstriggerConditionOperator, 'this.openlist')
this.$forceUpdate(); this.$forceUpdate();
}); });
}, },
@ -601,25 +603,28 @@ export default {
}, },
// 话术 // 话术
messageontemplateword(item) { messageontemplateword(item) {
console.log(item, 'item')
this.form.phoneTemplateId = item.templateId; this.form.phoneTemplateId = item.templateId;
this.form.phoneTemplateName = item.templateName; this.form.phoneTemplateName = item.templateName;
console.log(this.form.phoneTemplateId, ' this.form.phoneTemplateId')
// this.form.messagePreview = item.templateContent; this.phoneNodeContent = item.phoneNodeContent;
}, },
changephoneDialMethod(e){ changephoneDialMethod(e) {
console.log(e,'e') console.log(e)
if(e=='AI'){ if (e == 'AI') {
// this.form.templateId='' // this.form.templateId=''
this.form.phoneTemplateId='' this.form.phoneTemplateId = ''
this.form.phoneTemplateName='' this.form.phoneTemplateName = ''
this.phoneNodeContent = ''
}else if(e=='COMMON'){ } else if (e == 'COMMON') {
this.form.templateId='' this.form.templateId = ''
this.form.templateName='' this.form.templateName = ''
this.form.phoneTemplateId = ''
this.form.phoneTemplateName = ''
this.phoneNodeContent = ''
this.form.phoneTemplateId=''
this.form.phoneTemplateName=''
} }
}, },
//短信传值 //短信传值
@ -669,13 +674,12 @@ export default {
? e.list.forEach((el) => { ? e.list.forEach((el) => {
el.routeNodeDay = e.routeNodeDay; el.routeNodeDay = e.routeNodeDay;
el.routeNodeName = e.routeNodeName; el.routeNodeName = e.routeNodeName;
console.log(el, 'el')
if (el.phoneDialMethod == 'COMMON' && el.templateId) { if (el.phoneDialMethod == 'COMMON' && el.templateId) {
el.templateType = 'QUESTIONNAIRE' el.templateType = 'QUESTIONNAIRE'
} else if (el.phoneDialMethod == 'COMMON' && el.phoneTemplateId) { } else if (el.phoneDialMethod == 'COMMON' && el.phoneTemplateId) {
el.templateType = 'SCRIPT' el.templateType = 'SCRIPT'
}else if (el.phoneDialMethod == "AI" && el.phoneTemplateId) { } else if (el.phoneDialMethod == "AI" && el.phoneTemplateId) {
el.templateType = "SCRIPT"; el.templateType = "SCRIPT";
} }
this.itemlist.specialDiseaseNodeList.push(el); this.itemlist.specialDiseaseNodeList.push(el);
@ -691,7 +695,6 @@ export default {
// !e.taskSubdivision && // !e.taskSubdivision &&
// !e.taskStatus // !e.taskStatus
// ); // );
console.log(this.itemlist, 'itemlist')
// return // return
@ -712,20 +715,41 @@ export default {
}, },
//宣教传值 //宣教传值
propagandaontemplate(item) { propagandaontemplate(item) {
// console.log(item, 'item')
this.form.templateId = item.templateId; this.form.templateId = item.templateId;
this.form.templateName = item.templateName; this.form.templateName = item.templateName;
// if(item){
this.formview = item.formview
// }else{
// getPropaganda( this.form.templateId).then((response) => {
// this.formview = response.data;
// });
// }
}, },
bottomclickevent(uitem, index, uindex) { 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 ( if (
this.form.taskSubdivisiontemplateType != "QUESTIONNAIRE" && this.form.taskSubdivisiontemplateType != "QUESTIONNAIRE" &&
this.form.taskSubdivisiontemplateType != "PROPAGANDA" && this.form.taskSubdivisiontemplateType != "PROPAGANDA" &&
this.form.taskSubdivisiontemplateType != 'SCRIPT' this.form.taskSubdivisiontemplateType != "SCRIPT"
) { ) {
this.$refs.wangeditor.emit(); this.$refs.wangeditor.emit();
} }
setTimeout(() => { setTimeout(() => {
this.form = uitem; this.form = uitem;
// console.log( this.form,'this.form')
this.taskPartitionList = []; this.taskPartitionList = [];
if (this.form.taskType) { if (this.form.taskType) {
this.changeTaskType(this.form.taskType, this.form.taskSubdivision); this.changeTaskType(this.form.taskType, this.form.taskSubdivision);

View File

@ -24,52 +24,154 @@
> --> > -->
<!-- <font-awesome-icon icon="heart" /> --> <!-- <font-awesome-icon icon="heart" /> -->
<!-- <FontAwesomeIcon icon="far fa-copy" /> --> <!-- <FontAwesomeIcon icon="far fa-copy" /> -->
<font-awesome-icon data-command="save" class="command fa fa-floppy-o" icon="command far far fa-copy" <font-awesome-icon
title="保存"></font-awesome-icon> data-command="save"
<font-awesome-icon style="margin-left: 10px" icon="fas fa-reply-all" title="历史数据" class="command fa fa-floppy-o"
@click="readHistoryData"></font-awesome-icon> icon="command far far fa-copy"
<font-awesome-icon style="margin-left: 10px" class="fa fa-hdd-o" icon="fas fa-file" title="上传数据" title="保存"
@click="readUploadData"></font-awesome-icon> ></font-awesome-icon>
<font-awesome-icon icon="fas fa-download" style="margin-left: 10px" title="另存为文件" <font-awesome-icon
@click="saveAsFile">文件</font-awesome-icon> style="margin-left: 10px"
icon="fas fa-reply-all"
title="历史数据"
@click="readHistoryData"
></font-awesome-icon>
<font-awesome-icon
style="margin-left: 10px"
class="fa fa-hdd-o"
icon="fas fa-file"
title="上传数据"
@click="readUploadData"
></font-awesome-icon>
<font-awesome-icon
icon="fas fa-download"
style="margin-left: 10px"
title="另存为文件"
@click="saveAsFile"
>文件</font-awesome-icon
>
<!-- <FontAwesomeIcon icon="fas fa-image" /> --> <!-- <FontAwesomeIcon icon="fas fa-image" /> -->
<font-awesome-icon style="margin-left: 10px" icon="fas fa-image" title="另存为图片" <font-awesome-icon
@click="openSaveAsImageDialog"></font-awesome-icon> style="margin-left: 10px"
icon="fas fa-image"
title="另存为图片"
@click="openSaveAsImageDialog"
></font-awesome-icon>
<font-awesome-icon style="margin-left: 10px" data-command="undo" icon="fas fa-undo" class="command fa fa-undo" <font-awesome-icon
title="撤销"></font-awesome-icon> style="margin-left: 10px"
<font-awesome-icon style="margin-left: 10px" data-command="redo" class="command fa fa-repeat" data-command="undo"
icon="fas fa-repeat" title="重做"></font-awesome-icon> icon="fas fa-undo"
<font-awesome-icon style="margin-left: 10px" data-command="delete" class="command fa fa-trash-o" class="command fa fa-undo"
icon="fas fa-trash-alt" title="删除"></font-awesome-icon> title="撤销"
<font-awesome-icon style="margin-left: 10px" data-command="zoomOut" class="command fa fa-search-minus" ></font-awesome-icon>
icon="fas fa-search-minus" title="缩小"></font-awesome-icon> <font-awesome-icon
<font-awesome-icon style="margin-left: 10px" data-command="zoomIn" icon="fas fa-search-plus" style="margin-left: 10px"
class="command fa fa-search-plus" title="放大"></font-awesome-icon> data-command="redo"
<font-awesome-icon style="margin-left: 10px" icon="fas fa-eraser" data-command="clear" class="command fa fa-repeat"
class="command fa fa-eraser" title="清除画布"></font-awesome-icon> icon="fas fa-repeat"
<font-awesome-icon style="margin-left: 10px" icon="fas fa-arrow-up" data-command="toFront" title="重做"
class="command fa fa-arrow-up" title="提升层级"></font-awesome-icon> ></font-awesome-icon>
<font-awesome-icon style="margin-left: 10px" icon="fas fa-arrow-down" data-command="toBack" <font-awesome-icon
class="command fa fa-arrow-down" title="下降层级"></font-awesome-icon> style="margin-left: 10px"
<font-awesome-icon style="margin-left: 10px" icon="fas fa-check-square" data-command="selectAll" data-command="delete"
class="command fa fa-check-square-o" title="全选"></font-awesome-icon> class="command fa fa-trash-o"
<font-awesome-icon style="margin-left: 10px" icon="far fa-copy" data-command="copy" icon="fas fa-trash-alt"
class="command fa fa-files-o" title="复制"></font-awesome-icon> title="删除"
></font-awesome-icon>
<font-awesome-icon
style="margin-left: 10px"
data-command="zoomOut"
class="command fa fa-search-minus"
icon="fas fa-search-minus"
title="缩小"
></font-awesome-icon>
<font-awesome-icon
style="margin-left: 10px"
data-command="zoomIn"
icon="fas fa-search-plus"
class="command fa fa-search-plus"
title="放大"
></font-awesome-icon>
<font-awesome-icon
style="margin-left: 10px"
icon="fas fa-eraser"
data-command="clear"
class="command fa fa-eraser"
title="清除画布"
></font-awesome-icon>
<font-awesome-icon
style="margin-left: 10px"
icon="fas fa-arrow-up"
data-command="toFront"
class="command fa fa-arrow-up"
title="提升层级"
></font-awesome-icon>
<font-awesome-icon
style="margin-left: 10px"
icon="fas fa-arrow-down"
data-command="toBack"
class="command fa fa-arrow-down"
title="下降层级"
></font-awesome-icon>
<font-awesome-icon
style="margin-left: 10px"
icon="fas fa-check-square"
data-command="selectAll"
class="command fa fa-check-square-o"
title="全选"
></font-awesome-icon>
<font-awesome-icon
style="margin-left: 10px"
icon="far fa-copy"
data-command="copy"
class="command fa fa-files-o"
title="复制"
></font-awesome-icon>
<font-awesome-icon style="margin-left: 10px" icon="fas fa-clone" data-command="paste" <font-awesome-icon
class="command fa fa-clipboard" title="粘贴"></font-awesome-icon> style="margin-left: 10px"
<font-awesome-icon style="margin-left: 10px" icon="fas fa-expand" data-command="autoZoom" icon="fas fa-clone"
class="command fa fa-expand" title="实际大小"></font-awesome-icon> data-command="paste"
<font-awesome-icon style="margin-left: 10px" icon="fas fa-compress" data-command="resetZoom" class="command fa fa-clipboard"
class="command fa fa-compress" title="适应页面"></font-awesome-icon> title="粘贴"
<font-awesome-icon style="margin-left: 10px" icon="fas fa-object-group" data-command="addGroup" ></font-awesome-icon>
class="command fa fa-object-group" title="组合"></font-awesome-icon> <font-awesome-icon
<font-awesome-icon style="margin-left: 10px" icon="fas fa-object-ungroup" data-command="unGroup" style="margin-left: 10px"
class="command fa fa-object-ungroup" title="取消组合"></font-awesome-icon> icon="fas fa-expand"
<font-awesome-icon style="margin-left: 10px" icon="fas fa-crop" data-command="multiSelect" data-command="autoZoom"
class="command fa fa fa-crop" title="多选"></font-awesome-icon> class="command fa fa-expand"
title="实际大小"
></font-awesome-icon>
<font-awesome-icon
style="margin-left: 10px"
icon="fas fa-compress"
data-command="resetZoom"
class="command fa fa-compress"
title="适应页面"
></font-awesome-icon>
<font-awesome-icon
style="margin-left: 10px"
icon="fas fa-object-group"
data-command="addGroup"
class="command fa fa-object-group"
title="组合"
></font-awesome-icon>
<font-awesome-icon
style="margin-left: 10px"
icon="fas fa-object-ungroup"
data-command="unGroup"
class="command fa fa-object-ungroup"
title="取消组合"
></font-awesome-icon>
<font-awesome-icon
style="margin-left: 10px"
icon="fas fa-crop"
data-command="multiSelect"
class="command fa fa fa-crop"
title="多选"
></font-awesome-icon>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -101,23 +203,33 @@
<article> <article>
<!-- 下载图片 --> <!-- 下载图片 -->
<section class="save-as-image-dialog"> <section class="save-as-image-dialog">
<el-dialog title="下载图片" :visible.sync="saveAsImageDialogVisible" width="360px"> <el-dialog
title="下载图片"
:visible.sync="saveAsImageDialogVisible"
width="360px"
>
<el-form label-width="100px" label-position="top"> <el-form label-width="100px" label-position="top">
<el-form-item label="选择图片格式"> <el-form-item label="选择图片格式">
<el-select v-model="saveAsImageFormat"> <el-select v-model="saveAsImageFormat">
<el-option label="jpg" value="jpg"> <el-option label="jpg" value="jpg">
<span style="float: left">jpg</span> <span style="float: left">jpg</span>
<span style="float: right; color: #8492a6; font-size: 13px">白色背景</span> <span style="float: right; color: #8492a6; font-size: 13px"
>白色背景</span
>
</el-option> </el-option>
<el-option label="png" value="png"> <el-option label="png" value="png">
<span style="float: left">png</span> <span style="float: left">png</span>
<span style="float: right; color: #8492a6; font-size: 13px">透明背景</span> <span style="float: right; color: #8492a6; font-size: 13px"
>透明背景</span
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer"> <span slot="footer">
<el-button @click="saveAsImageDialogVisible = false"> </el-button> <el-button @click="saveAsImageDialogVisible = false"
> </el-button
>
<el-button type="primary" @click="saveAsImage"> </el-button> <el-button type="primary" @click="saveAsImage"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -142,7 +254,9 @@
</div> </div>
<div data-status="canvas-selected" class="menu"> <div data-status="canvas-selected" class="menu">
<el-button data-command="undo" class="command">撤销</el-button> <el-button data-command="undo" class="command">撤销</el-button>
<el-button data-command="redo" class="command disable">重做</el-button> <el-button data-command="redo" class="command disable"
>重做</el-button
>
</div> </div>
<div data-status="multi-selected" class="menu"> <div data-status="multi-selected" class="menu">
<el-button data-command="copy" class="command">复制</el-button> <el-button data-command="copy" class="command">复制</el-button>
@ -160,7 +274,7 @@ import { getFlowScheme } from "@/api/system/preview";
import { construct } from "netflix-conductor-json-tree/dist/index"; import { construct } from "netflix-conductor-json-tree/dist/index";
export default { export default {
name: "VueG6Editor", name: "VueG6Editor",
props: ['phoneNodeContent'], props: ["phoneNodeContent"],
mixins: [mixin], mixins: [mixin],
data() { data() {
return { return {
@ -497,52 +611,57 @@ export default {
nodeAttributeForm: { nodeAttributeForm: {
label: "", label: "",
width: "", width: "",
height: "" height: "",
}, },
// //
edgeAttributeForm: { edgeAttributeForm: {
label: "" label: "",
}, },
// //
canvasAttributeForm: { canvasAttributeForm: {
grid: true, grid: true,
cell: 20 cell: 20,
}, },
// SVGURL // SVGURL
startNodeSVGUrl: require("@/views/system/mianview/start-node.svg"), startNodeSVGUrl: require("@/views/system/mianview/start-node.svg"),
endNodeSVGUrl: require("@/views/system/mianview/end-node.svg"), endNodeSVGUrl: require("@/views/system/mianview/end-node.svg"),
regularNodeSVGUrl: require("@/views/system/mianview/regular-node.svg"), regularNodeSVGUrl: require("@/views/system/mianview/regular-node.svg"),
conditionNodeSVGUrl: require("@/views/system/mianview/condition-node.svg"), conditionNodeSVGUrl: require("@/views/system/mianview/condition-node.svg"),
nNodeSVGUrl: "https://gw.alipayobjects.com/zos/rmsportal/rQMUhHHSqwYsPwjXxcfP.svg", nNodeSVGUrl:
modelNodeSVGUrl: "https://gw.alipayobjects.com/zos/rmsportal/rQMUhHHSqwYsPwjXxcfP.svg", "https://gw.alipayobjects.com/zos/rmsportal/rQMUhHHSqwYsPwjXxcfP.svg",
modelNodeSVGUrl:
"https://gw.alipayobjects.com/zos/rmsportal/rQMUhHHSqwYsPwjXxcfP.svg",
// //
editor: null, editor: null,
saveAsImageDialogVisible: false, saveAsImageDialogVisible: false,
saveAsImageFormat: "jpg" saveAsImageFormat: "jpg",
}; };
}, },
mounted() { mounted() {
console.log()
this.initG6Editor(); this.initG6Editor();
this.getlist(); this.getlist();
// this.editor.getCurrentPage().save() // this.editor.getCurrentPage().save()
this.editor.getCurrentPage().hideGrid(); this.editor.getCurrentPage().hideGrid();
this.editor.getCurrentPage().read(this.form); this.editor.getCurrentPage().read(this.form);
}, },
watch: {
phoneNodeContent(newValue, oldValue) {
this.phoneNodeContent = newValue;
this.getlist();
},
},
methods: { methods: {
getlist() { getlist() {
// console.log(this.$route.query) // console.log(this.$route.query)
// console.log(this.phoneNodeContent) // console.log(this.phoneNodeContent)
// getFlowScheme(this.$route.query.id).then(res => { // getFlowScheme(this.$route.query.id).then(res => {
// this.form = JSON.parse(this.$route.query.id) // this.form = JSON.parse(this.$route.query.id)
this.form = JSON.parse(this.phoneNodeContent) this.form = JSON.parse(this.phoneNodeContent);
this.editor.getCurrentPage().read(this.form); this.editor.getCurrentPage().read(this.form);
// }) // })
}, },
// //
initG6Editor() { initG6Editor() {
console.log(2222222222)
const _this = this; const _this = this;
const editor = new G6Editor(); const editor = new G6Editor();
this.editor = editor; this.editor = editor;
@ -559,10 +678,10 @@ export default {
// //
execute(editor) { execute(editor) {
let needSaveData = editor.getCurrentPage().save(); let needSaveData = editor.getCurrentPage().save();
console.log(needSaveData, 'needSaveData'); console.log(needSaveData, "needSaveData");
// JSON.parse(JSON.stringify(needSaveData)) // JSON.parse(JSON.stringify(needSaveData))
const text = JSON.stringify(needSaveData) const text = JSON.stringify(needSaveData);
console.log(JSON.parse(JSON.stringify(text)), 'text'); console.log(JSON.parse(JSON.stringify(text)), "text");
localStorage.setItem("flowData", JSON.stringify(needSaveData)); localStorage.setItem("flowData", JSON.stringify(needSaveData));
_this.save(needSaveData); _this.save(needSaveData);
}, },
@ -574,65 +693,67 @@ export default {
// Ctrl + S // Ctrl + S
shortcutCodes: [ shortcutCodes: [
["metaKey", "s"], ["metaKey", "s"],
["ctrlKey", "s"] ["ctrlKey", "s"],
] ],
}); });
// //
const flow = new G6Editor.Flow({ const flow = new G6Editor.Flow({
graph: { graph: {
container: "page" container: "page",
}, },
align: { align: {
line: { line: {
// 线 // 线
stroke: "#FA8C16", stroke: "#FA8C16",
// 线 // 线
lineWidth: 1 lineWidth: 1,
}, },
// //
item: true, item: true,
// //
grid: true grid: true,
}, },
grid: { grid: {
// //
cell: 18 cell: 18,
}, },
shortcut: { shortcut: {
// //
save: true save: true,
} },
}); });
window.flow = flow; window.flow = flow;
// //
flow.getGraph().edge({ flow.getGraph().edge({
shape: "flow-polyline" shape: "flow-polyline",
}); });
// //
const itempannel = new G6Editor.Itempannel({ const itempannel = new G6Editor.Itempannel({
container: "itempannel" container: "itempannel",
}); });
// //
const toolbar = new G6Editor.Toolbar({ const toolbar = new G6Editor.Toolbar({
container: "toolbar" container: "toolbar",
}); });
// //
// const detailpannel = new G6Editor.Detailpannel({ // const detailpannel = new G6Editor.Detailpannel({
// container: "detailpannel" // container: "detailpannel"
// }); // });
// //
let minimapWidth = getComputedStyle(document.querySelector(".right-part")).width; let minimapWidth = getComputedStyle(
document.querySelector(".right-part")
).width;
minimapWidth = Number(minimapWidth.replace(/px$/, "")); minimapWidth = Number(minimapWidth.replace(/px$/, ""));
const minimap = new G6Editor.Minimap({ const minimap = new G6Editor.Minimap({
container: "minimap", container: "minimap",
width: minimapWidth, width: minimapWidth,
height: 200 height: 200,
}); });
// //
const contextmenu = new G6Editor.Contextmenu({ const contextmenu = new G6Editor.Contextmenu({
container: "contextmenu" container: "contextmenu",
}); });
// Editor // Editor
editor.add(flow); editor.add(flow);
@ -648,10 +769,16 @@ export default {
const currentPage = editor.getCurrentPage(); const currentPage = editor.getCurrentPage();
currentPage.on("afterchange", (e) => { currentPage.on("afterchange", (e) => {
if (e.action === "add") { if (e.action === "add") {
if (e.model.nodetype === "startNode" || e.model.nodetype === "endNode") { if (
e.model.nodetype === "startNode" ||
e.model.nodetype === "endNode"
) {
let nodes = this.editor.getCurrentPage().getNodes(); let nodes = this.editor.getCurrentPage().getNodes();
for (const item of nodes) { for (const item of nodes) {
if (item.model.nodetype === e.model.nodetype && item.model.id !== e.model.id) { if (
item.model.nodetype === e.model.nodetype &&
item.model.id !== e.model.id
) {
this.editor.getCurrentPage().remove(e.item); this.editor.getCurrentPage().remove(e.item);
this.$message.warning("只能有一个开始节点或结束节点"); this.$message.warning("只能有一个开始节点或结束节点");
} }
@ -667,21 +794,23 @@ export default {
// //
if (ev.item.isNode) { if (ev.item.isNode) {
this.nodeAttributeForm.label = selectedItemDataModel.label; this.nodeAttributeForm.label = selectedItemDataModel.label;
this.nodeAttributeForm.width = selectedItemDataModel.size.split("*")[0]; this.nodeAttributeForm.width =
this.nodeAttributeForm.height = selectedItemDataModel.size.split("*")[1]; selectedItemDataModel.size.split("*")[0];
this.nodeAttributeForm.height =
selectedItemDataModel.size.split("*")[1];
this.nodeAttributeForm.color = selectedItemDataModel.color; this.nodeAttributeForm.color = selectedItemDataModel.color;
} }
// //
if (ev.item.isEdge) { if (ev.item.isEdge) {
ev.item.graph.edge({ ev.item.graph.edge({
shape: "flow-polyline-round" shape: "flow-polyline-round",
}); });
this.edgeAttributeForm.label = selectedItemDataModel.label; this.edgeAttributeForm.label = selectedItemDataModel.label;
this.edgeAttributeForm.shape = selectedItemDataModel.shape; this.edgeAttributeForm.shape = selectedItemDataModel.shape;
} }
}); });
// //
currentPage.on("afterdelete", (ev) => { }); currentPage.on("afterdelete", (ev) => {});
}, },
// //
openSaveAsImageDialog() { openSaveAsImageDialog() {
@ -724,16 +853,15 @@ export default {
submitForm() { submitForm() {
const _this = this; const _this = this;
let needSaveData = editor.getCurrentPage().save(); let needSaveData = editor.getCurrentPage().save();
console.log(needSaveData, 'needSaveData'); console.log(needSaveData, "needSaveData");
localStorage.setItem("flowData", JSON.stringify(needSaveData)); localStorage.setItem("flowData", JSON.stringify(needSaveData));
_this.save(needSaveData); _this.save(needSaveData);
_this.$message.success("数据已保存"); _this.$message.success("数据已保存");
}, },
// //
saveAsFile() { saveAsFile() {
let sub = this.editor.getCurrentPage().save() let sub = this.editor.getCurrentPage().save();
console.log(sub, 'sub') console.log(sub, "sub");
let jsonString = JSON.stringify(this.editor.getCurrentPage().save()); let jsonString = JSON.stringify(this.editor.getCurrentPage().save());
let blob = new Blob([jsonString]); let blob = new Blob([jsonString]);
let blobURL = URL.createObjectURL(blob); let blobURL = URL.createObjectURL(blob);
@ -784,9 +912,9 @@ export default {
}, },
handledel() { handledel() {
this.$store.dispatch("tagsView/delView", this.$route); this.$store.dispatch("tagsView/delView", this.$route);
this.$router.go(-1) this.$router.go(-1);
}, },
} },
}; };
</script> </script>

View File

@ -367,6 +367,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-container { .app-container {
display: inline-block; display: inline-block;
padding: 0 !important; padding: 0 !important;

View File

@ -142,6 +142,13 @@
align="center" align="center"
prop="diseaseTypeName" prop="diseaseTypeName"
/> />
<el-table-column
label="模板内容"
align="center"
prop="templateContent"
:show-overflow-tooltip="true"
/>
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"

View File

@ -61,6 +61,9 @@
<el-table-column label="适用任务类型" align="center" prop="suitTaskTypeName" <el-table-column label="适用任务类型" align="center" prop="suitTaskTypeName"
:show-overflow-tooltip="true" /> :show-overflow-tooltip="true" />
<el-table-column label="病种名称" align="center" prop="diseaseTypeName" /> <el-table-column label="病种名称" align="center" prop="diseaseTypeName" />
<el-table-column label="模板内容" align="center" prop="templateContent" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="handleselect(scope.row)" <el-button size="mini" type="text" @click="handleselect(scope.row)"
@ -181,6 +184,7 @@ export default {
this.loading = true; this.loading = true;
this.queryParams.templateSource = "WE_CHAT_OFFICIAL_ACCOUNT" this.queryParams.templateSource = "WE_CHAT_OFFICIAL_ACCOUNT"
listTemplate(this.queryParams).then(response => { listTemplate(this.queryParams).then(response => {
console.log(response.rows)
this.templateList = response.rows; this.templateList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;

File diff suppressed because it is too large Load Diff

View File

@ -1,255 +1,429 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-button size="small" @click="classificationOpen = true" <el-button
style="width: 200px;font-size:14px;text-align:left;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;" size="small"
:style="handleselectName ? 'color:black' : 'color:#C0C4CC'">{{ handleselectName ? handleselectName : @click="classificationOpen = true"
'选择问卷模板' }}</el-button> style="
<el-dialog title="问卷库模板选择" :visible.sync="classificationOpen" width="70%" width: 200px;
:before-close="classificationOpenfalse"> font-size: 14px;
<el-row :gutter="20"> text-align: left;
<!--部门数据--> white-space: nowrap;
<el-col :span="6" :xs="24"> text-overflow: ellipsis;
<div class="left" ref="box"> overflow: hidden;
<div class="name">科室名称</div> "
<div style="padding: 10px 0;"> :style="handleselectName ? 'color:black' : 'color:#C0C4CC'"
<el-input v-model="departmentName" placeholder="请输入科室名称" clearable >{{ handleselectName ? handleselectName : "选择问卷模板" }}</el-button
@keyup.enter.native="getTreeselect" /> >
</div> <el-dialog
<div class="listitem" v-for="(item, index) in deptOptions" :key="index" title="问卷库模板选择"
@click="clickDepartmenitem(item)"> :visible.sync="classificationOpen"
<div :class="queryParams.departmentId == item.id ? 'allactive' : 'all'"> width="70%"
{{ item.departmentName }} :before-close="classificationOpenfalse"
</div> >
<span class="count">{{ item.countNum }}</span> <el-row :gutter="20">
</div> <!--部门数据-->
</div> <el-col :span="6" :xs="24">
</el-col> <div class="left" ref="box">
<!--用户数据--> <div class="name">科室名称</div>
<el-col :span="18" :xs="24"> <div style="padding: 10px 0">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="70px"> <el-input
<el-form-item label="问卷标题" prop="questionnaireName"> v-model="departmentName"
<el-input v-model="queryParams.questionnaireName" placeholder="请输入问卷标题" clearable placeholder="请输入科室名称"
@keyup.enter.native="handleQuery" /> clearable
</el-form-item> @keyup.enter.native="getTreeselect"
<el-form-item label="病种名称" prop="diseaseTypeName"> />
<el-input v-model="queryParams.diseaseTypeName" placeholder="请输入病种名称" clearable </div>
@keyup.enter.native="handleQuery" /> <div
</el-form-item> class="listitem"
<el-form-item> v-for="(item, index) in deptOptions"
<el-button type="primary" icon="el-icon-search" size="mini" :key="index"
@click="handleQuery">搜索</el-button> @click="clickDepartmenitem(item)"
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> >
</el-form-item> <div
</el-form> :class="
<el-table v-loading="loading" :data="questionList" @row-dblclick="handleselect"> queryParams.departmentId == item.id ? 'allactive' : 'all'
<el-table-column label="序号" type="index" width="55" align="center" /> "
<el-table-column label="问卷模板名称" align="center" prop="questionnaireName" /> >
<el-table-column label="问题个数" align="center" prop="questionCount" /> {{ item.departmentName }}
<el-table-column label="问卷模板ID" align="center" prop="questionnaireId" /> </div>
<el-table-column label="问卷状态" align="center" prop="questionnaireStatus"> <span class="count">{{ item.countNum }}</span>
<template slot-scope="scope"> </div>
<el-switch v-model="scope.row.questionnaireStatus" active-color="#13ce66" </div>
inactive-color="#ff4949" active-value="PUBLISHED" inactive-value="UNPUBLISHED" </el-col>
disabled @change="switchstatus($event, scope.row)"> <!--用户数据-->
</el-switch> <el-col :span="18" :xs="24">
</template> <el-form
</el-table-column> :model="queryParams"
<el-table-column label="病种名称" align="center" prop="diseaseTypeName" /> ref="queryForm"
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> size="small"
<template slot-scope="scope"> :inline="true"
<el-button size="mini" type="text" @click="handleselect(scope.row)" label-width="70px"
v-if="handleselectId != scope.row.id">选择</el-button> >
<el-button size="mini" type="text" @click="nohandleselect(scope.row)" <el-form-item label="问卷标题" prop="questionnaireName">
v-if="handleselectId == scope.row.id">取消选择</el-button> <el-input
</template> v-model="queryParams.questionnaireName"
</el-table-column> placeholder="请输入问卷标题"
</el-table> clearable
</el-col> @keyup.enter.native="handleQuery"
</el-row> />
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" </el-form-item>
:limit.sync="queryParams.pageSize" @pagination="getList" /> <el-form-item label="病种名称" prop="diseaseTypeName">
</el-dialog> <el-input
v-model="queryParams.diseaseTypeName"
placeholder="请输入病种名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="questionList"
@row-dblclick="handleselect"
>
<el-table-column
label="序号"
type="index"
width="55"
align="center"
/>
<el-table-column
label="问卷模板名称"
align="center"
prop="questionnaireName"
/>
<el-table-column
label="问题个数"
align="center"
prop="questionCount"
/>
<el-table-column
label="问卷模板ID"
align="center"
prop="questionnaireId"
/>
<el-table-column
label="问卷状态"
align="center"
prop="questionnaireStatus"
>
<template slot-scope="scope">
<el-switch
v-model="scope.row.questionnaireStatus"
active-color="#13ce66"
inactive-color="#ff4949"
active-value="PUBLISHED"
inactive-value="UNPUBLISHED"
disabled
@change="switchstatus($event, scope.row)"
>
</el-switch>
</template>
</el-table-column>
<el-table-column
label="病种名称"
align="center"
prop="diseaseTypeName"
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button size="mini" type="text" @click="handlesee(scope.row)"
>预览</el-button
>
<el-button
size="mini"
type="text"
@click="handleselect(scope.row)"
v-if="handleselectId != scope.row.id"
>选择</el-button
>
<el-button
size="mini"
type="text"
@click="nohandleselect(scope.row)"
v-if="handleselectId == scope.row.id"
>取消选择</el-button
>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-dialog>
<el-dialog title="问卷预览" :visible.sync="showquestion" width="90%">
<div class="righttextarea">
<questionopennew v-if="showquestion"></questionopennew>
</div> </div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import { listQuestion, getQuestion, delQuestion, addQuestion, updateQuestion, getDepartmentList, selectUserDepartment, diseaseList, updateclassification } from "@/api/system/question"; import {
listQuestion,
getQuestion,
delQuestion,
addQuestion,
updateQuestion,
getDepartmentList,
selectUserDepartment,
diseaseList,
updateclassification,
} from "@/api/system/question";
import questionopennew from "./questionopennew.vue";
import { selectPatientQuestionSubmit } from "@/api/system/taskExecuteRecord";
export default { export default {
name: "Question", name: "Question",
props: ['templateId', 'templateName'], props: ["templateId", "templateName", questionopennew],
data() { data() {
return { return {
classificationOpen: false, showquestion: false,
// classificationOpen: false,
departmentName: '', //
defaultProps: { departmentName: "",
children: "children", defaultProps: {
label: "label" children: "children",
}, label: "label",
// },
deptOptions: undefined, //
// deptOptions: undefined,
loading: true, //
// loading: true,
total: 0, //
// total: 0,
questionList: [], //
// questionList: [],
queryParams: { //
pageNum: 1, queryParams: {
pageSize: 10, pageNum: 1,
departmentId: null, pageSize: 10,
departmentName: null, departmentId: null,
diseaseTypeName: null, departmentName: null,
questionnaireName: null, diseaseTypeName: null,
questionnaireStatus: "PUBLISHED", questionnaireName: null,
// questionType: "REGULAR_QUESTIONNAIRE" questionnaireStatus: "PUBLISHED",
}, // questionType: "REGULAR_QUESTIONNAIRE"
handleselectId: '', },
handleselectName: null, handleselectId: "",
}; handleselectName: null,
questiondata:[],
};
},
watch: {
//
departmentName(val) {
// this.getTreeselect()
}, },
watch: { },
// created() {
departmentName(val) { this.getTreeselect();
// this.getTreeselect() this.getList();
} },
mounted() {
this.handleselectId = this.templateId;
this.handleselectName = this.templateName;
},
watch: {
templateId(newValue, oldValue) {
this.handleselectId = newValue;
}, },
created() { templateName(newValue, oldValue) {
this.getTreeselect(); this.handleselectName = newValue;
this.getList();
}, },
mounted() { },
this.handleselectId = this.templateId methods: {
this.handleselectName = this.templateName handlesee(row) {
console.log(row, "row");
this.showquestion = true;
selectPatientQuestionSubmit(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);
// }
// });
// });
});
}, },
watch: { clickDepartmenitem(item) {
templateId(newValue, oldValue) { this.loading = true;
this.handleselectId = newValue; this.queryParams.departmentId = item.id;
}, this.getList();
templateName(newValue, oldValue) {
this.handleselectName = newValue;
}
}, },
methods: { nohandleselect() {
clickDepartmenitem(item) { this.handleselectId = "";
this.loading = true; this.handleselectName = "";
this.queryParams.departmentId = item.id; this.$emit("on-template", { templateId: "", templateName: "" });
this.getList(); },
}, handleselect(item) {
nohandleselect() { this.handleselectId = item.id;
this.handleselectId = '' this.handleselectName = item.questionnaireName;
this.handleselectName = '' this.$emit("on-template", {
this.$emit("on-template", { templateId: '', templateName: '' }); templateId: item.id,
}, templateName: item.questionnaireName,
handleselect(item) { });
this.handleselectId = item.id this.classificationOpen = false;
this.handleselectName = item.questionnaireName },
this.$emit("on-template", { templateId: item.id, templateName: item.questionnaireName }); classificationOpenfalse() {
this.classificationOpen = false this.classificationOpen = false;
}, },
classificationOpenfalse() { //
this.classificationOpen = false handleNodeClick(data) {
}, this.queryParams.departmentId = data.id;
// this.handleQuery();
handleNodeClick(data) { },
this.queryParams.departmentId = data.id; //
this.handleQuery(); filterNode(value, data) {
}, if (!value) return true;
// return data.label.indexOf(value) !== -1;
filterNode(value, data) { },
if (!value) return true; /** 查询科室下拉树结构 */
return data.label.indexOf(value) !== -1; getTreeselect() {
}, getDepartmentList({
/** 查询科室下拉树结构 */ departmentName: this.departmentName,
getTreeselect() { questionnaireStatus: "PUBLISHED",
getDepartmentList({ // questionType: "REGULAR_QUESTIONNAIRE",
departmentName: this.departmentName, }).then((response) => {
questionnaireStatus: "PUBLISHED", // console.log('0000000000')
// questionType: "REGULAR_QUESTIONNAIRE", // response.data.forEach(e => {
}).then(response => { // e.label = e.departmentName
// console.log('0000000000') // })
// response.data.forEach(e => { this.deptOptions = response.data;
// e.label = e.departmentName });
// }) },
this.deptOptions = response.data; /** 查询问卷基本信息列表 */
}); getList() {
}, this.loading = true;
/** 查询问卷基本信息列表 */ this.queryParams.questionnaireStatus = "PUBLISHED";
getList() { // this.queryParams.questionType = "REGULAR_QUESTIONNAIRE"
this.loading = true; listQuestion(this.queryParams).then((response) => {
this.queryParams.questionnaireStatus = "PUBLISHED" this.questionList = response.rows;
// this.queryParams.questionType = "REGULAR_QUESTIONNAIRE" this.total = response.total;
listQuestion(this.queryParams).then(response => { this.loading = false;
this.questionList = response.rows; });
this.total = response.total; },
this.loading = false; /** 搜索按钮操作 */
}); handleQuery() {
}, this.queryParams.pageNum = 1;
/** 搜索按钮操作 */ this.getList();
handleQuery() { },
this.queryParams.pageNum = 1; /** 重置按钮操作 */
this.getList(); resetQuery() {
}, this.resetForm("queryForm");
/** 重置按钮操作 */ this.handleQuery();
resetQuery() { },
this.resetForm("queryForm"); },
this.handleQuery();
},
}
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep .el-dialog__body { ::v-deep .el-dialog__body {
padding-bottom: 60px; padding-bottom: 60px;
}
.righttextarea {
// height: 200px;
padding: 10px;
// width: 90%;
// height: 100%;
border: 1.5px solid #c7c7c7;
border-radius: 5px;
} }
.app-container { .app-container {
padding: 0 !important; padding: 0 !important;
display: inline-block; display: inline-block;
// background: red; // background: red;
height: 42px; height: 42px;
} }
.left { .left {
height: 500px; height: 500px;
overflow: auto; overflow: auto;
.name { .name {
font-weight: 700; font-weight: 700;
margin-bottom: 10px; margin-bottom: 10px;
}
.listitem {
width: 100%;
height: 50px;
border-bottom: 1px solid #dcdfe6;
position: relative;
.count {
display: inline-block;
position: absolute;
left: 210px;
color: #a4a6aa;
top: 50%;
transform: translateY(-50%);
font-size: 13px;
} }
.listitem { .all {
width: 100%; height: 50px;
height: 50px; line-height: 50px;
border-bottom: 1px solid #dcdfe6; padding-left: 13px;
position: relative;
.count {
display: inline-block;
position: absolute;
left: 210px;
color: #a4a6aa;
top: 50%;
transform: translateY(-50%);
font-size: 13px;
}
.all {
height: 50px;
line-height: 50px;
padding-left: 13px;
}
.allactive {
background: #e8f4ff;
height: 50px;
line-height: 50px;
padding-left: 13px;
border-left: 3px solid #4d9de7;
}
} }
.allactive {
background: #e8f4ff;
height: 50px;
line-height: 50px;
padding-left: 13px;
border-left: 3px solid #4d9de7;
}
}
} }
</style> </style>

View File

@ -1,30 +1,53 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-button size="small" @click="classificationOpen = true" style=" <el-button
size="small"
@click="classificationOpen = true"
style="
width: 200px; width: 200px;
font-size: 14px; font-size: 14px;
text-align: left; text-align: left;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
" :style="handleselectName ? 'color:black' : 'color:#C0C4CC'">{{ handleselectName ? handleselectName : "请选择" "
}}</el-button> :style="handleselectName ? 'color:black' : 'color:#C0C4CC'"
<el-dialog title="话书库模板选择" :visible.sync="classificationOpen" width="70%" :before-close="classificationOpenfalse"> >{{ handleselectName ? handleselectName : "请选择" }}</el-button
>
<el-dialog
title="话书库模板选择"
:visible.sync="classificationOpen"
width="70%"
:before-close="classificationOpenfalse"
>
<el-row :gutter="20"> <el-row :gutter="20">
<!--部门数据--> <!--部门数据-->
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<div class="leftscript" ref="box"> <div class="leftscript" ref="box">
<div class="name">科室名称</div> <div class="name">科室名称</div>
<div> <div>
<el-input v-model="name" placeholder="请输入科室名称" clearable @keyup.enter.native="handleQuery" /> <el-input
v-model="name"
placeholder="请输入科室名称"
clearable
@keyup.enter.native="handleQuery"
/>
</div> </div>
<div class="listitem"> <div class="listitem">
<div :class="itemname == null ? 'allactive' : 'all'" @click="itemdata()"> <div
:class="itemname == null ? 'allactive' : 'all'"
@click="itemdata()"
>
全部 全部
</div> </div>
<span class="count">{{ count }}</span> <span class="count">{{ count }}</span>
</div> </div>
<div class="listitem" v-for="(item, index) in DepartmentoList" :key="index" @click="itemdata(item)"> <div
class="listitem"
v-for="(item, index) in DepartmentoList"
:key="index"
@click="itemdata(item)"
>
<div :class="itemname == item.id ? 'allactive' : 'all'"> <div :class="itemname == item.id ? 'allactive' : 'all'">
{{ item.departmentName }} {{ item.departmentName }}
</div> </div>
@ -34,55 +57,158 @@
</el-col> </el-col>
<!--用户数据--> <!--用户数据-->
<el-col :span="18" :xs="24"> <el-col :span="18" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" <el-form
label-width="100px"> :model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="100px"
>
<el-form-item label="通用话术名称" prop="commonScriptName"> <el-form-item label="通用话术名称" prop="commonScriptName">
<el-input v-model="queryParams.commonScriptName" placeholder="请输入通用话术名称" clearable <el-input
@keyup.enter.native="handleQuery" /> v-model="queryParams.commonScriptName"
placeholder="请输入通用话术名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="话术名称" prop="scriptName"> <el-form-item label="话术名称" prop="scriptName">
<el-input v-model="queryParams.scriptName" placeholder="请输入话术名称" clearable <el-input
@keyup.enter.native="handleQuery" /> v-model="queryParams.scriptName"
placeholder="请输入话术名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="话术ID" prop="scriptId"> <el-form-item label="话术ID" prop="scriptId">
<el-input v-model="queryParams.scriptId" placeholder="请输入话术ID" clearable <el-input
@keyup.enter.native="handleQuery" /> v-model="queryParams.scriptId"
placeholder="请输入话术ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="平台ID" prop="platformId"> <el-form-item label="平台ID" prop="platformId">
<el-input v-model="queryParams.platformId" placeholder="请输入平台ID" clearable <el-input
@keyup.enter.native="handleQuery" /> v-model="queryParams.platformId"
placeholder="请输入平台ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="loading" :data="scriptList" @row-dblclick="handleselect"> <el-table
<el-table-column label="序号" align="center" prop="sort" type="index" /> v-loading="loading"
<el-table-column label="通用话术名称" align="center" prop="commonScriptName" :show-overflow-tooltip="true" /> :data="scriptList"
<el-table-column label="话术名称" align="center" prop="scriptName" :show-overflow-tooltip="true" /> @row-dblclick="handleselect"
<el-table-column label="话术ID" align="center" prop="scriptId" :show-overflow-tooltip="true" /> >
<el-table-column label="平台ID" align="center" prop="platformId" :show-overflow-tooltip="true" /> <el-table-column
<el-table-column label="话术简介" align="center" prop="scriptIntroduction" :show-overflow-tooltip="true" /> label="序号"
<el-table-column label="病种名称" align="center" prop="diseaseTypeName" :show-overflow-tooltip="true" /> align="center"
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> prop="sort"
type="index"
/>
<el-table-column
label="通用话术名称"
align="center"
prop="commonScriptName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="话术名称"
align="center"
prop="scriptName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="话术ID"
align="center"
prop="scriptId"
:show-overflow-tooltip="true"
/>
<el-table-column
label="平台ID"
align="center"
prop="platformId"
:show-overflow-tooltip="true"
/>
<el-table-column
label="话术简介"
align="center"
prop="scriptIntroduction"
:show-overflow-tooltip="true"
/>
<el-table-column
label="病种名称"
align="center"
prop="diseaseTypeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="handleselect(scope.row)" <el-button size="mini" type="text" @click="handlesee(scope.row)"
v-if="handleselectId != scope.row.id">选择</el-button> >预览</el-button
<el-button size="mini" type="text" @click="nohandleselect(scope.row)" >
v-if="handleselectId == scope.row.id">取消选择</el-button> <el-button
size="mini"
type="text"
@click="handleselect(scope.row)"
v-if="handleselectId != scope.row.id"
>选择</el-button
>
<el-button
size="mini"
type="text"
@click="nohandleselect(scope.row)"
v-if="handleselectId == scope.row.id"
>取消选择</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-col> </el-col>
</el-row> </el-row>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <pagination
@pagination="getList" /> v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-dialog>
<el-dialog title="话术预览" :visible.sync="lookshow" width="90%">
<Scriptpreview
:phoneNodeContent="phoneNodeContent"
v-if="lookshow"
></Scriptpreview>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="lookshow = false"> </el-button>
</span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import Scriptpreview from ".././components/Scriptpreviewopen.vue";
import { import {
listScript, listScript,
getScript, getScript,
@ -97,10 +223,17 @@ import {
import stationAcatar from "../../system/stationAvatar/index.vue"; import stationAcatar from "../../system/stationAvatar/index.vue";
export default { export default {
props: ["templateId", "templateName"], props: ["templateId", "templateName"],
components: { stationAcatar }, components: { stationAcatar, Scriptpreview },
name: "Script", name: "Script",
data() { data() {
return { return {
lookshow: false,
phoneNodeContent: {
scriptInfoId: null,
flowScheme: null,
nodes: [],
edges: [],
},
handleselectName: "", handleselectName: "",
handleselectId: "", handleselectId: "",
classificationOpen: false, classificationOpen: false,
@ -175,6 +308,16 @@ export default {
}, },
}, },
methods: { methods: {
handlesee(row) {
console.log(row, "eeeeee");
if (row.flowScheme == null || row.flowScheme == "") {
this.$message.error("暂无话术图");
} else {
this.phoneNodeContent = row.flowScheme;
this.lookshow = true;
}
},
nohandleselect() { nohandleselect() {
this.handleselectId = ""; this.handleselectId = "";
this.handleselectName = ""; this.handleselectName = "";
@ -187,11 +330,11 @@ export default {
handleselect(item) { handleselect(item) {
this.handleselectId = item.id; this.handleselectId = item.id;
this.handleselectName = item.commonScriptName; this.handleselectName = item.commonScriptName;
console.log(this.handleselectName, "this.handleselectName");
this.$emit("on-template", { this.$emit("on-template", {
templateId: item.id, templateId: item.id,
templateName: item.commonScriptName, templateName: item.commonScriptName,
templateContent: item.scriptIntroduction, templateContent: item.scriptIntroduction,
phoneNodeContent: item.flowScheme,
}); });
this.classificationOpen = false; this.classificationOpen = false;
}, },
@ -283,7 +426,7 @@ export default {
display: inline-block; display: inline-block;
padding: 0 !important; padding: 0 !important;
// background: red; // background: red;
height: 42px; height: 42px;
} }
::v-deep .el-textarea__inner { ::v-deep .el-textarea__inner {