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,18 +603,19 @@ 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 = ''
@ -620,6 +623,8 @@ export default {
this.form.phoneTemplateId = '' this.form.phoneTemplateId = ''
this.form.phoneTemplateName = '' this.form.phoneTemplateName = ''
this.phoneNodeContent = ''
} }
}, },
//短信传值 //短信传值
@ -669,7 +674,6 @@ 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) {
@ -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,14 +794,16 @@ 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;
@ -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;

View File

@ -1,28 +1,53 @@
<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;
text-align: left;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
"
:style="handleselectName ? 'color:black' : 'color:#C0C4CC'"
>{{ 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="leftpro" ref="box"> <div class="leftpro" ref="box">
<div class="name">科室名称</div> <div class="name">科室名称</div>
<div> <div>
<el-input v-model="name" placeholder="请输入科室名称" clearable <el-input
@keyup.enter.native="handleQuery" /> 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" <div
@click="itemdata(item)"> 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>
@ -32,76 +57,207 @@
</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="68px"> :model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="宣教名称" prop="propagandaTitle"> <el-form-item label="宣教名称" prop="propagandaTitle">
<el-input v-model="queryParams.propagandaTitle" placeholder="请输入宣教名称" clearable <el-input
@keyup.enter.native="handleQuery" /> v-model="queryParams.propagandaTitle"
placeholder="请输入宣教名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="宣教类型" prop="propagandaType"> <el-form-item label="宣教类型" prop="propagandaType">
<el-select v-model="queryParams.propagandaType" placeholder="请选择"> <el-select
<el-option v-for="item in optionstype" :key="item.value" :label="item.label" v-model="queryParams.propagandaType"
:value="item.value"> placeholder="请选择"
>
<el-option
v-for="item in optionstype"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" <el-button
@click="handleQuery">搜索</el-button> type="primary"
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> 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="propagandaList" @row-dblclick="handleselect"> <el-table
<el-table-column label="序号" align="center" prop="id" type="index" /> v-loading="loading"
<el-table-column label="病种名称" align="center" prop="diseaseTypeName" /> :data="propagandaList"
<el-table-column label="宣教名称" align="center" prop="propagandaTitle" @row-dblclick="handleselect"
:show-overflow-tooltip="true"> >
<el-table-column
label="序号"
align="center"
prop="id"
type="index"
/>
<el-table-column
label="病种名称"
align="center"
prop="diseaseTypeName"
/>
<el-table-column
label="宣教名称"
align="center"
prop="propagandaTitle"
:show-overflow-tooltip="true"
>
</el-table-column> </el-table-column>
<el-table-column label="宣教ID" align="center" prop="propagandaCode" <el-table-column
:show-overflow-tooltip="true" /> label="宣教ID"
<el-table-column label="宣教类型" align="center" prop="propagandaType"> align="center"
prop="propagandaCode"
:show-overflow-tooltip="true"
/>
<el-table-column
label="宣教类型"
align="center"
prop="propagandaType"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.propagandaType == "MEDICATION_KNOWLEDGE" ? "用药知识" : "" }} {{
{{ scope.row.propagandaType == "DISEASE_POPULARIZATION" ? "疾病科普" : "" }} scope.row.propagandaType == "MEDICATION_KNOWLEDGE"
{{ scope.row.propagandaType == "SPORT_NUTRITION" ? "运动营养" : "" }} ? "用药知识"
{{ scope.row.propagandaType == "OTHER_KNOWLEDGE" ? "其他知识" : "" }} : ""
{{ scope.row.propagandaType == "CUSTOMIZED_CONTENT" ? "定制内容" : "" }} }}
{{
scope.row.propagandaType == "DISEASE_POPULARIZATION"
? "疾病科普"
: ""
}}
{{
scope.row.propagandaType == "SPORT_NUTRITION"
? "运动营养"
: ""
}}
{{
scope.row.propagandaType == "OTHER_KNOWLEDGE"
? "其他知识"
: ""
}}
{{
scope.row.propagandaType == "CUSTOMIZED_CONTENT"
? "定制内容"
: ""
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" /> <el-table-column
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> label="创建时间"
align="center"
prop="createTime"
/>
<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="Preview(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" <pagination
:limit.sync="queryParams.pageSize" @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="dialogview"
width="50%"
:before-close="handleview"
>
<div class="titletop">文章模板:{{ formview.propagandaTitle }}</div>
<div class="bodytop">
<div class="titledata">{{ formview.propagandaTitle }}</div>
<!-- <div class="audiotop">
<audio controls="controls" ref="audio"></audio>
</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>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listPropaganda, getPropaganda, delPropaganda, addPropaganda, updatePropaganda, selectNumByDept, copy, updateStatus } from "@/api/manage/propaganda"; import {
listPropaganda,
getPropaganda,
delPropaganda,
addPropaganda,
updatePropaganda,
selectNumByDept,
copy,
updateStatus,
} from "@/api/manage/propaganda";
import Editorxj from "../Editorxj/index.vue";
import stationAcatar from "../../system/stationAvatar/index.vue"; import stationAcatar from "../../system/stationAvatar/index.vue";
export default { export default {
name: "propaganda", name: "propaganda",
props: ['templateId', 'templateName'], props: ["templateId", "templateName"],
components: { stationAcatar }, components: { stationAcatar, Editorxj },
data() { data() {
return { return {
handleselectName: '', dialogview: false, //
handleselectId: '', baseUrl: process.env.VUE_APP_BASE_API,
handleselectName: "",
handleselectId: "",
classificationOpen: false, classificationOpen: false,
itemname: null, itemname: null,
departmentName: null, departmentName: null,
name: '', name: "",
count: '',// count: "", //
DepartmentoList: [], // DepartmentoList: [], //
// //
querydepartmen: { querydepartmen: {
@ -109,22 +265,28 @@ export default {
// pageNum: 1, // pageNum: 1,
// pageSize: 10, // pageSize: 10,
}, },
optionstype: [{ optionstype: [
value: 'MEDICATION_KNOWLEDGE', {
label: '用药知识' value: "MEDICATION_KNOWLEDGE",
}, { label: "用药知识",
value: 'DISEASE_POPULARIZATION', },
label: '疾病科普' {
}, { value: "DISEASE_POPULARIZATION",
value: 'SPORT_NUTRITION', label: "疾病科普",
label: '运动营养' },
}, { {
value: 'OTHER_KNOWLEDGE', value: "SPORT_NUTRITION",
label: '其他知识' label: "运动营养",
}, { },
value: 'CUSTOMIZED_CONTENT', {
label: '定制内容' value: "OTHER_KNOWLEDGE",
}], label: "其他知识",
},
{
value: "CUSTOMIZED_CONTENT",
label: "定制内容",
},
],
loading: false, loading: false,
// //
ids: [], ids: [],
@ -138,6 +300,10 @@ export default {
total: 0, total: 0,
// //
propagandaList: [], propagandaList: [],
formview: {
articleSummary: null,
propagandaTitle: null,
}, //
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -161,17 +327,10 @@ export default {
}; };
}, },
mounted() { mounted() {
this.handleselectId = this.templateId this.handleselectId = this.templateId;
this.handleselectName = this.templateName this.handleselectName = this.templateName;
},
watch: {
templateId(newValue, oldValue) {
this.handleselectId = newValue;
},
templateName(newValue, oldValue) {
this.handleselectName = newValue;
}
}, },
computed: { computed: {
pickerStartTime() { pickerStartTime() {
return { return {
@ -200,38 +359,67 @@ export default {
}, },
watch: { watch: {
name(val) { name(val) {
this.querydepartmen.departmentName = val this.querydepartmen.departmentName = val;
this.Departmentlist(); this.Departmentlist();
} },
templateId(newValue, oldValue) {
// console.log(newValue,'222222222222222222')
this.handleselectId = newValue;
},
templateName(newValue, oldValue) {
this.handleselectName = newValue;
},
}, },
methods: { methods: {
//
Preview(row) {
console.log(row);
const id = row.id || this.ids;
this.dialogview = true;
getPropaganda(id).then((response) => {
this.formview = response.data;
});
},
//
handleview() {
this.dialogview = false;
},
nohandleselect() { nohandleselect() {
this.handleselectId = '' this.handleselectId = "";
this.handleselectName = '' this.handleselectName = "";
this.$emit("on-template", { templateId: '', templateName: '' }); this.$emit("on-template", { templateId: "", templateName: "" });
}, },
handleselect(item) { handleselect(item) {
this.handleselectId = item.id getPropaganda(item.id).then((response) => {
this.handleselectName = item.propagandaTitle // this.formview = response.data;
this.$emit("on-template", { templateId: item.id, templateName: item.propagandaTitle }); this.handleselectId = item.id;
this.classificationOpen = false this.handleselectName = item.propagandaTitle;
this.$emit("on-template", {
templateId: item.id,
templateName: item.propagandaTitle,
formview: response.data,
});
this.classificationOpen = false;
});
}, },
classificationOpenfalse() { classificationOpenfalse() {
this.classificationOpen = false this.classificationOpen = false;
}, },
// //
changecreateTimeStart(e) { changecreateTimeStart(e) {
this.queryParams.createTimeStart = e this.queryParams.createTimeStart = e;
}, },
// //
changecreateTimeEnd(e) { changecreateTimeEnd(e) {
this.queryParams.createTimeEnd = e this.queryParams.createTimeEnd = e;
}, },
// //
Departmentlist() { Departmentlist() {
this.loading = true; this.loading = true;
this.querydepartmen.propagandaStatus = 'APPROVED' this.querydepartmen.propagandaStatus = "APPROVED";
selectNumByDept(this.querydepartmen).then(response => { selectNumByDept(this.querydepartmen).then((response) => {
this.DepartmentoList = response.data; this.DepartmentoList = response.data;
let sum = 0; let sum = 0;
this.DepartmentoList.forEach((item) => { this.DepartmentoList.forEach((item) => {
@ -246,22 +434,22 @@ export default {
// //
itemdata(item) { itemdata(item) {
if (item) { if (item) {
this.itemname = item.id this.itemname = item.id;
// this.departmentName = item.departmentName // this.departmentName = item.departmentName
this.loading = true; this.loading = true;
this.queryParams.departmentId = item.id this.queryParams.departmentId = item.id;
this.getList() this.getList();
} else { } else {
this.queryParams.departmentId = '' this.queryParams.departmentId = "";
this.itemname = null this.itemname = null;
this.getList() this.getList();
} }
}, },
/** 查询患者宣教信息列表 */ /** 查询患者宣教信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
this.queryParams.propagandaStatus = 'APPROVED' this.queryParams.propagandaStatus = "APPROVED";
listPropaganda(this.queryParams).then(response => { listPropaganda(this.queryParams).then((response) => {
this.propagandaList = response.rows; this.propagandaList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -277,7 +465,7 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
} },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -1,23 +1,49 @@
<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;
text-align: left;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
"
:style="handleselectName ? 'color:black' : 'color:#C0C4CC'"
>{{ 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="left" ref="box"> <div class="left" ref="box">
<div class="name">科室名称</div> <div class="name">科室名称</div>
<div style="padding: 10px 0;"> <div style="padding: 10px 0">
<el-input v-model="departmentName" placeholder="请输入科室名称" clearable <el-input
@keyup.enter.native="getTreeselect" /> v-model="departmentName"
placeholder="请输入科室名称"
clearable
@keyup.enter.native="getTreeselect"
/>
</div> </div>
<div class="listitem" v-for="(item, index) in deptOptions" :key="index" <div
@click="clickDepartmenitem(item)"> class="listitem"
<div :class="queryParams.departmentId == item.id ? 'allactive' : 'all'"> v-for="(item, index) in deptOptions"
:key="index"
@click="clickDepartmenitem(item)"
>
<div
:class="
queryParams.departmentId == item.id ? 'allactive' : 'all'
"
>
{{ item.departmentName }} {{ item.departmentName }}
</div> </div>
<span class="count">{{ item.countNum }}</span> <span class="count">{{ item.countNum }}</span>
@ -26,66 +52,162 @@
</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" label-width="70px"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
label-width="70px"
>
<el-form-item label="问卷标题" prop="questionnaireName"> <el-form-item label="问卷标题" prop="questionnaireName">
<el-input v-model="queryParams.questionnaireName" placeholder="请输入问卷标题" clearable <el-input
@keyup.enter.native="handleQuery" /> v-model="queryParams.questionnaireName"
placeholder="请输入问卷标题"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="病种名称" prop="diseaseTypeName"> <el-form-item label="病种名称" prop="diseaseTypeName">
<el-input v-model="queryParams.diseaseTypeName" placeholder="请输入病种名称" clearable <el-input
@keyup.enter.native="handleQuery" /> v-model="queryParams.diseaseTypeName"
placeholder="请输入病种名称"
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" <el-button
@click="handleQuery">搜索</el-button> type="primary"
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> 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="questionList" @row-dblclick="handleselect"> <el-table
<el-table-column label="序号" type="index" width="55" align="center" /> v-loading="loading"
<el-table-column label="问卷模板名称" align="center" prop="questionnaireName" /> :data="questionList"
<el-table-column label="问题个数" align="center" prop="questionCount" /> @row-dblclick="handleselect"
<el-table-column label="问卷模板ID" align="center" prop="questionnaireId" /> >
<el-table-column label="问卷状态" align="center" prop="questionnaireStatus"> <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"> <template slot-scope="scope">
<el-switch v-model="scope.row.questionnaireStatus" active-color="#13ce66" <el-switch
inactive-color="#ff4949" active-value="PUBLISHED" inactive-value="UNPUBLISHED" v-model="scope.row.questionnaireStatus"
disabled @change="switchstatus($event, scope.row)"> active-color="#13ce66"
inactive-color="#ff4949"
active-value="PUBLISHED"
inactive-value="UNPUBLISHED"
disabled
@change="switchstatus($event, scope.row)"
>
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="病种名称" align="center" prop="diseaseTypeName" /> <el-table-column
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> label="病种名称"
align="center"
prop="diseaseTypeName"
/>
<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" <pagination
:limit.sync="queryParams.pageSize" @pagination="getList" /> v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-dialog> </el-dialog>
<el-dialog title="问卷预览" :visible.sync="showquestion" width="90%">
<div class="righttextarea">
<questionopennew v-if="showquestion"></questionopennew>
</div>
</el-dialog>
</div> </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 {
showquestion: false,
classificationOpen: false, classificationOpen: false,
// //
departmentName: '', departmentName: "",
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "label" label: "label",
}, },
// //
deptOptions: undefined, deptOptions: undefined,
@ -106,23 +228,24 @@ export default {
questionnaireStatus: "PUBLISHED", questionnaireStatus: "PUBLISHED",
// questionType: "REGULAR_QUESTIONNAIRE" // questionType: "REGULAR_QUESTIONNAIRE"
}, },
handleselectId: '', handleselectId: "",
handleselectName: null, handleselectName: null,
questiondata:[],
}; };
}, },
watch: { watch: {
// //
departmentName(val) { departmentName(val) {
// this.getTreeselect() // this.getTreeselect()
} },
}, },
created() { created() {
this.getTreeselect(); this.getTreeselect();
this.getList(); this.getList();
}, },
mounted() { mounted() {
this.handleselectId = this.templateId this.handleselectId = this.templateId;
this.handleselectName = this.templateName this.handleselectName = this.templateName;
}, },
watch: { watch: {
templateId(newValue, oldValue) { templateId(newValue, oldValue) {
@ -130,27 +253,71 @@ export default {
}, },
templateName(newValue, oldValue) { templateName(newValue, oldValue) {
this.handleselectName = newValue; this.handleselectName = newValue;
} },
}, },
methods: { methods: {
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);
// }
// });
// });
});
},
clickDepartmenitem(item) { clickDepartmenitem(item) {
this.loading = true; this.loading = true;
this.queryParams.departmentId = item.id; this.queryParams.departmentId = item.id;
this.getList(); this.getList();
}, },
nohandleselect() { nohandleselect() {
this.handleselectId = '' this.handleselectId = "";
this.handleselectName = '' this.handleselectName = "";
this.$emit("on-template", { templateId: '', templateName: '' }); this.$emit("on-template", { templateId: "", templateName: "" });
}, },
handleselect(item) { handleselect(item) {
this.handleselectId = item.id this.handleselectId = item.id;
this.handleselectName = item.questionnaireName this.handleselectName = item.questionnaireName;
this.$emit("on-template", { templateId: item.id, templateName: item.questionnaireName }); this.$emit("on-template", {
this.classificationOpen = false templateId: item.id,
templateName: item.questionnaireName,
});
this.classificationOpen = false;
}, },
classificationOpenfalse() { classificationOpenfalse() {
this.classificationOpen = false this.classificationOpen = false;
}, },
// //
handleNodeClick(data) { handleNodeClick(data) {
@ -168,7 +335,7 @@ export default {
departmentName: this.departmentName, departmentName: this.departmentName,
questionnaireStatus: "PUBLISHED", questionnaireStatus: "PUBLISHED",
// questionType: "REGULAR_QUESTIONNAIRE", // questionType: "REGULAR_QUESTIONNAIRE",
}).then(response => { }).then((response) => {
// console.log('0000000000') // console.log('0000000000')
// response.data.forEach(e => { // response.data.forEach(e => {
// e.label = e.departmentName // e.label = e.departmentName
@ -179,9 +346,9 @@ export default {
/** 查询问卷基本信息列表 */ /** 查询问卷基本信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
this.queryParams.questionnaireStatus = "PUBLISHED" this.queryParams.questionnaireStatus = "PUBLISHED";
// this.queryParams.questionType = "REGULAR_QUESTIONNAIRE" // this.queryParams.questionType = "REGULAR_QUESTIONNAIRE"
listQuestion(this.queryParams).then(response => { listQuestion(this.queryParams).then((response) => {
this.questionList = response.rows; this.questionList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -197,14 +364,21 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); 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;

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;
}, },