修改预览话术图和电话外呼传值
This commit is contained in:
parent
d40d79559c
commit
d660259d0c
@ -522,7 +522,7 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log()
|
||||
console.log(11111111111111111)
|
||||
this.initG6Editor();
|
||||
this.getlist();
|
||||
// this.editor.getCurrentPage().save()
|
||||
@ -541,6 +541,8 @@ export default {
|
||||
},
|
||||
// 初始化
|
||||
initG6Editor() {
|
||||
console.log(11111111111111111)
|
||||
|
||||
const _this = this;
|
||||
const editor = new G6Editor();
|
||||
this.editor = editor;
|
||||
|
||||
@ -241,7 +241,7 @@
|
||||
<div class="pushMethod">
|
||||
推送方式:
|
||||
<span>
|
||||
<el-radio-group v-model="form.phoneDialMethod">
|
||||
<el-radio-group v-model="form.phoneDialMethod" @change="changephoneDialMethod">
|
||||
<el-radio label="COMMON">人工电话</el-radio>
|
||||
<el-radio label="AI">自动外呼</el-radio>
|
||||
</el-radio-group>
|
||||
|
||||
@ -607,6 +607,21 @@ export default {
|
||||
|
||||
// this.form.messagePreview = item.templateContent;
|
||||
},
|
||||
changephoneDialMethod(e){
|
||||
console.log(e,'e')
|
||||
if(e=='AI'){
|
||||
// this.form.templateId=''
|
||||
this.form.phoneTemplateId=''
|
||||
this.form.phoneTemplateName=''
|
||||
|
||||
}else if(e=='COMMON'){
|
||||
this.form.templateId=''
|
||||
this.form.templateName=''
|
||||
|
||||
this.form.phoneTemplateId=''
|
||||
this.form.phoneTemplateName=''
|
||||
}
|
||||
},
|
||||
//短信传值
|
||||
messageontemplate(item) {
|
||||
this.form.messageTemplateId = item.templateId;
|
||||
|
||||
@ -317,7 +317,10 @@
|
||||
<div class="itemlist">
|
||||
推送方式:
|
||||
<span>
|
||||
<el-radio-group v-model="formInline.phoneDialMethod">
|
||||
<el-radio-group
|
||||
v-model="formInline.phoneDialMethod"
|
||||
@change="changephoneDialMethod"
|
||||
>
|
||||
<el-radio label="COMMON">人工电话</el-radio>
|
||||
<el-radio label="AI">自动外呼</el-radio>
|
||||
</el-radio-group>
|
||||
@ -646,6 +649,21 @@ export default {
|
||||
delitem(item, index, list) {
|
||||
list.splice(index, 1);
|
||||
},
|
||||
changephoneDialMethod(e){
|
||||
console.log(e,'e')
|
||||
if(e=='AI'){
|
||||
// this.form.templateId=''
|
||||
this.formInline.phoneId=''
|
||||
this.formInline.phoneTemplateName=''
|
||||
|
||||
}else if(e=='COMMON'){
|
||||
this.formInline.questionInfoId=''
|
||||
this.formInline.questionInfoName=''
|
||||
|
||||
this.formInline.phoneId=''
|
||||
this.formInline.phoneTemplateName=''
|
||||
}
|
||||
},
|
||||
upload() {
|
||||
this.updata.routeNodeList = this.list;
|
||||
// console.log(this.updata,'this.updata')
|
||||
@ -659,7 +677,7 @@ export default {
|
||||
}
|
||||
});
|
||||
console.log(this.updata,'updata')
|
||||
return
|
||||
// return
|
||||
|
||||
signrouteadd(this.updata).then((res) => {
|
||||
this.$notify({
|
||||
|
||||
795
src/views/system/components/Scriptpreviewopen.vue
Normal file
795
src/views/system/components/Scriptpreviewopen.vue
Normal file
@ -0,0 +1,795 @@
|
||||
<template>
|
||||
<div id="vue-g6-editor">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<!-- <header>
|
||||
<el-button type="primary" plain @click="handledel">返回</el-button>
|
||||
</header> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 工具栏 -->
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div id="toolbar">
|
||||
<!-- <font-awesome-icon icon="fa fa-history" />
|
||||
<font-awesome-icon icon="heart" />
|
||||
<font-awesome-icon icon="clock" />
|
||||
<font-awesome-icon icon="clock" style="color: #476151" />
|
||||
<i
|
||||
class="el-icon-edit"
|
||||
data-command="save"
|
||||
title="保存"
|
||||
@click="submitForm"
|
||||
>保存</i
|
||||
> -->
|
||||
<!-- <font-awesome-icon icon="heart" /> -->
|
||||
<!-- <FontAwesomeIcon icon="far fa-copy" /> -->
|
||||
<font-awesome-icon data-command="save" class="command fa fa-floppy-o" icon="command far far fa-copy"
|
||||
title="保存"></font-awesome-icon>
|
||||
<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" /> -->
|
||||
|
||||
<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"
|
||||
title="撤销"></font-awesome-icon>
|
||||
<font-awesome-icon style="margin-left: 10px" data-command="redo" class="command fa fa-repeat"
|
||||
icon="fas fa-repeat" title="重做"></font-awesome-icon>
|
||||
<font-awesome-icon style="margin-left: 10px" data-command="delete" class="command fa fa-trash-o"
|
||||
icon="fas fa-trash-alt" 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"
|
||||
class="command fa fa-clipboard" title="粘贴"></font-awesome-icon>
|
||||
<font-awesome-icon style="margin-left: 10px" icon="fas fa-expand" data-command="autoZoom"
|
||||
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>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 元素面板 + 画布 + 属性栏 -->
|
||||
<el-row>
|
||||
<!-- 元素面板 -->
|
||||
<el-col :span="2">
|
||||
<!-- <div id="itempannel">
|
||||
|
||||
</div> -->
|
||||
</el-col>
|
||||
<!-- 画布 -->
|
||||
<el-col :span="20">
|
||||
<el-col :span="24">
|
||||
<div id="page"></div>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<!-- 属性栏 -->
|
||||
<el-col :span="4">
|
||||
<section class="right-part">
|
||||
<!-- 缩略图 -->
|
||||
<div id="minimap">
|
||||
<div class="title">缩略图</div>
|
||||
</div>
|
||||
</section>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 弹窗 -->
|
||||
<article>
|
||||
<!-- 下载图片 -->
|
||||
<section class="save-as-image-dialog">
|
||||
<el-dialog title="下载图片" :visible.sync="saveAsImageDialogVisible" width="360px">
|
||||
<el-form label-width="100px" label-position="top">
|
||||
<el-form-item label="选择图片格式">
|
||||
<el-select v-model="saveAsImageFormat">
|
||||
<el-option label="jpg" value="jpg">
|
||||
<span style="float: left">jpg</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">白色背景</span>
|
||||
</el-option>
|
||||
<el-option label="png" value="png">
|
||||
<span style="float: left">png</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">透明背景</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer">
|
||||
<el-button @click="saveAsImageDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="saveAsImage">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</section>
|
||||
</article>
|
||||
<!-- 右键菜单 -->
|
||||
<section>
|
||||
<div id="contextmenu">
|
||||
<div data-status="node-selected" class="menu">
|
||||
<el-button data-command="copy" class="command">复制</el-button>
|
||||
<el-button data-command="paste" class="command">粘贴</el-button>
|
||||
<el-button data-command="delete" class="command">删除</el-button>
|
||||
</div>
|
||||
<div data-status="edge-selected" class="menu">
|
||||
<el-button data-command="delete" class="command">删除</el-button>
|
||||
</div>
|
||||
<div data-status="group-selected" class="menu">
|
||||
<el-button data-command="copy" class="command">复制</el-button>
|
||||
<el-button data-command="paste" class="command">粘贴</el-button>
|
||||
<el-button data-command="unGroup" class="command">取消组合</el-button>
|
||||
<el-button data-command="delete" class="command">删除</el-button>
|
||||
</div>
|
||||
<div data-status="canvas-selected" class="menu">
|
||||
<el-button data-command="undo" class="command">撤销</el-button>
|
||||
<el-button data-command="redo" class="command disable">重做</el-button>
|
||||
</div>
|
||||
<div data-status="multi-selected" class="menu">
|
||||
<el-button data-command="copy" class="command">复制</el-button>
|
||||
<el-button data-command="paste" class="command">粘贴</el-button>
|
||||
<el-button data-command="addGroup" class="command">组合</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import G6Editor from "@antv/g6-editor";
|
||||
import mixin from "@/views/system/mianview/mixin";
|
||||
import { getFlowScheme } from "@/api/system/preview";
|
||||
import { construct } from "netflix-conductor-json-tree/dist/index";
|
||||
export default {
|
||||
name: "VueG6Editor",
|
||||
props: ['phoneNodeContent'],
|
||||
mixins: [mixin],
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
scriptInfoId: null,
|
||||
flowScheme: null,
|
||||
nodes: [],
|
||||
edges: [],
|
||||
},
|
||||
// form: {
|
||||
// nodes: [{
|
||||
// color
|
||||
// :
|
||||
// "#FA8C16",
|
||||
// id
|
||||
// :
|
||||
// "655c5165",
|
||||
// index
|
||||
// :
|
||||
// 0,
|
||||
// label
|
||||
// :
|
||||
// "自我介绍确认",
|
||||
// nodetype
|
||||
// :
|
||||
// "startNode",
|
||||
// shape
|
||||
// :
|
||||
// "flow-circle",
|
||||
// size
|
||||
// :
|
||||
// "72*72",
|
||||
// type
|
||||
// :
|
||||
// "node",
|
||||
// x
|
||||
// :
|
||||
// 441.5124969482422,
|
||||
// y
|
||||
// :
|
||||
// 60.79999542236328,
|
||||
// }, {
|
||||
// color
|
||||
// :
|
||||
// "#1890ff",
|
||||
// id
|
||||
// :
|
||||
// "8660695d",
|
||||
// index
|
||||
// :
|
||||
// 1,
|
||||
// label
|
||||
// :
|
||||
// "家属是否能代打",
|
||||
// size
|
||||
// :
|
||||
// "100*50",
|
||||
// type
|
||||
// :
|
||||
// "node",
|
||||
// x
|
||||
// :
|
||||
// 242.5124969482422,
|
||||
// y
|
||||
// :
|
||||
// 183.5999984741211,
|
||||
// },
|
||||
// {
|
||||
// color
|
||||
// :
|
||||
// "#1890ff",
|
||||
// id
|
||||
// :
|
||||
// "59c9ceed",
|
||||
// index
|
||||
// :
|
||||
// 2,
|
||||
// label
|
||||
// :
|
||||
// "常规节点",
|
||||
// size
|
||||
// :
|
||||
// "100*50",
|
||||
// type
|
||||
// :
|
||||
// "node",
|
||||
// x
|
||||
// :
|
||||
// 606.5124969482422,
|
||||
// y
|
||||
// :
|
||||
// 187.5999984741211,
|
||||
// }, {
|
||||
// color
|
||||
// :
|
||||
// "#722ED1",
|
||||
// id
|
||||
// :
|
||||
// "16f4c8ba",
|
||||
// index
|
||||
// :
|
||||
// 5,
|
||||
// label
|
||||
// :
|
||||
// "你好,我这边是#机构#的工作人员",
|
||||
// shape
|
||||
// :
|
||||
// "flow-capsule",
|
||||
// size
|
||||
// :
|
||||
// "200*48",
|
||||
// type
|
||||
// :
|
||||
// "node",
|
||||
// x
|
||||
// :
|
||||
// 433.5124969482422,
|
||||
// y
|
||||
// :
|
||||
// 125.5999984741211,
|
||||
// }, {
|
||||
// color
|
||||
// :
|
||||
// "#722ED1",
|
||||
// id
|
||||
// :
|
||||
// "e4839dcc",
|
||||
// index
|
||||
// :
|
||||
// 6,
|
||||
// label
|
||||
// :
|
||||
// "好的是这样的",
|
||||
// shape
|
||||
// :
|
||||
// "flow-capsule",
|
||||
// size
|
||||
// :
|
||||
// "80*48",
|
||||
// type
|
||||
// :
|
||||
// "node",
|
||||
// x
|
||||
// :
|
||||
// 233.5124969482422,
|
||||
// y
|
||||
// :
|
||||
// 251.5999984741211,
|
||||
// }, {
|
||||
// color
|
||||
// :
|
||||
// "#1890ff",
|
||||
// id
|
||||
// :
|
||||
// "392ca0b8",
|
||||
// index
|
||||
// :
|
||||
// 7,
|
||||
// label
|
||||
// :
|
||||
// "家属不能代打",
|
||||
// size
|
||||
// :
|
||||
// "100*50",
|
||||
// type
|
||||
// :
|
||||
// "node",
|
||||
// x
|
||||
// :
|
||||
// 55.51249694824219,
|
||||
// y
|
||||
// :
|
||||
// 299.5999984741211
|
||||
// }, {
|
||||
// color
|
||||
// :
|
||||
// "#1890ff",
|
||||
// id
|
||||
// :
|
||||
// "6bcab22d",
|
||||
// index
|
||||
// :
|
||||
// 8,
|
||||
// label
|
||||
// :
|
||||
// "家属能代打",
|
||||
// size
|
||||
// :
|
||||
// "100*50",
|
||||
// type
|
||||
// :
|
||||
// "node",
|
||||
// x
|
||||
// :
|
||||
// 384.5124969482422,
|
||||
// y
|
||||
// :
|
||||
// 307.5999984741211
|
||||
// },
|
||||
// {
|
||||
// color
|
||||
// :
|
||||
// "#722ED1",
|
||||
// id
|
||||
// :
|
||||
// "dc5de91f",
|
||||
// index
|
||||
// :
|
||||
// 11,
|
||||
// label
|
||||
// :
|
||||
// "好的 麻烦转告一下",
|
||||
// shape
|
||||
// :
|
||||
// "flow-capsule",
|
||||
// size
|
||||
// :
|
||||
// "200*48",
|
||||
// type
|
||||
// :
|
||||
// "node",
|
||||
// x
|
||||
// :
|
||||
// 55.51249694824219,
|
||||
// y
|
||||
// :
|
||||
// 366.5
|
||||
|
||||
// }],
|
||||
// edges: [{
|
||||
// id: "b04d23c7",
|
||||
// index
|
||||
// :
|
||||
// 3,
|
||||
// label
|
||||
// :
|
||||
// "是本人",
|
||||
// shape
|
||||
// :
|
||||
// "flow-polyline-round",
|
||||
// source
|
||||
// :
|
||||
// "655c5165",
|
||||
// sourceAnchor
|
||||
// :
|
||||
// 1,
|
||||
// target
|
||||
// :
|
||||
// "59c9ceed",
|
||||
// targetAnchor
|
||||
// :
|
||||
// 0,
|
||||
// }, {
|
||||
// id
|
||||
// :
|
||||
// "7894068d",
|
||||
// index
|
||||
// :
|
||||
// 4,
|
||||
// label
|
||||
// :
|
||||
// "是家属",
|
||||
// shape
|
||||
// :
|
||||
// "flow-polyline-round",
|
||||
// source
|
||||
// :
|
||||
// "655c5165",
|
||||
// sourceAnchor
|
||||
// :
|
||||
// 3,
|
||||
// target
|
||||
// :
|
||||
// "8660695d",
|
||||
// targetAnchor
|
||||
// :
|
||||
// 0,
|
||||
// }, {
|
||||
// id
|
||||
// :
|
||||
// "6aa429cc",
|
||||
// index
|
||||
// :
|
||||
// 9,
|
||||
// label
|
||||
// :
|
||||
// "能带大",
|
||||
// shape
|
||||
// :
|
||||
// "flow-polyline-round",
|
||||
// source
|
||||
// :
|
||||
// "8660695d",
|
||||
// sourceAnchor
|
||||
// :
|
||||
// 3,
|
||||
// target
|
||||
// :
|
||||
// "392ca0b8",
|
||||
// targetAnchor
|
||||
// :
|
||||
// 0,
|
||||
// },
|
||||
// {
|
||||
// id
|
||||
// :
|
||||
// "02bfc4d0",
|
||||
// index
|
||||
// :
|
||||
// 10,
|
||||
// label
|
||||
// :
|
||||
// "不能代打",
|
||||
// shape
|
||||
// :
|
||||
// "flow-polyline-round",
|
||||
// source
|
||||
// :
|
||||
// "8660695d",
|
||||
// sourceAnchor
|
||||
// :
|
||||
// 1,
|
||||
// target
|
||||
// :
|
||||
// "6bcab22d",
|
||||
// targetAnchor
|
||||
// :
|
||||
// 0
|
||||
// }
|
||||
// ]
|
||||
|
||||
// },
|
||||
// 节点属性表单
|
||||
nodeAttributeForm: {
|
||||
label: "",
|
||||
width: "",
|
||||
height: ""
|
||||
},
|
||||
// 节点属性表单
|
||||
edgeAttributeForm: {
|
||||
label: ""
|
||||
},
|
||||
// 画布属性栏表单
|
||||
canvasAttributeForm: {
|
||||
grid: true,
|
||||
cell: 20
|
||||
},
|
||||
// SVG节点图片URL地址
|
||||
startNodeSVGUrl: require("@/views/system/mianview/start-node.svg"),
|
||||
endNodeSVGUrl: require("@/views/system/mianview/end-node.svg"),
|
||||
regularNodeSVGUrl: require("@/views/system/mianview/regular-node.svg"),
|
||||
conditionNodeSVGUrl: require("@/views/system/mianview/condition-node.svg"),
|
||||
nNodeSVGUrl: "https://gw.alipayobjects.com/zos/rmsportal/rQMUhHHSqwYsPwjXxcfP.svg",
|
||||
modelNodeSVGUrl: "https://gw.alipayobjects.com/zos/rmsportal/rQMUhHHSqwYsPwjXxcfP.svg",
|
||||
// 编辑器
|
||||
editor: null,
|
||||
saveAsImageDialogVisible: false,
|
||||
saveAsImageFormat: "jpg"
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log()
|
||||
this.initG6Editor();
|
||||
this.getlist();
|
||||
// this.editor.getCurrentPage().save()
|
||||
this.editor.getCurrentPage().hideGrid();
|
||||
this.editor.getCurrentPage().read(this.form);
|
||||
},
|
||||
methods: {
|
||||
getlist() {
|
||||
// console.log(this.$route.query)
|
||||
// console.log(this.phoneNodeContent)
|
||||
// getFlowScheme(this.$route.query.id).then(res => {
|
||||
// this.form = JSON.parse(this.$route.query.id)
|
||||
this.form = JSON.parse(this.phoneNodeContent)
|
||||
this.editor.getCurrentPage().read(this.form);
|
||||
// })
|
||||
},
|
||||
// 初始化
|
||||
initG6Editor() {
|
||||
console.log(2222222222)
|
||||
|
||||
const _this = this;
|
||||
const editor = new G6Editor();
|
||||
this.editor = editor;
|
||||
G6Editor.track(false);
|
||||
const Command = G6Editor.Command;
|
||||
// 注册新命令save
|
||||
Command.registerCommand("save", {
|
||||
// 禁止保存命令进入队列
|
||||
queue: false,
|
||||
// 命令是否可用
|
||||
enable: (editor) => {
|
||||
return true;
|
||||
},
|
||||
// 正向命令
|
||||
execute(editor) {
|
||||
let needSaveData = editor.getCurrentPage().save();
|
||||
console.log(needSaveData, 'needSaveData');
|
||||
// JSON.parse(JSON.stringify(needSaveData))
|
||||
const text = JSON.stringify(needSaveData)
|
||||
console.log(JSON.parse(JSON.stringify(text)), 'text');
|
||||
localStorage.setItem("flowData", JSON.stringify(needSaveData));
|
||||
_this.save(needSaveData);
|
||||
},
|
||||
// 反向命令
|
||||
back(editor) {
|
||||
console.log("反向命令");
|
||||
console.log(editor);
|
||||
},
|
||||
// 快捷键:Ctrl + S
|
||||
shortcutCodes: [
|
||||
["metaKey", "s"],
|
||||
["ctrlKey", "s"]
|
||||
]
|
||||
});
|
||||
// 画布
|
||||
const flow = new G6Editor.Flow({
|
||||
graph: {
|
||||
container: "page"
|
||||
},
|
||||
align: {
|
||||
line: {
|
||||
// 对齐线颜色
|
||||
stroke: "#FA8C16",
|
||||
// 对齐线粗细
|
||||
lineWidth: 1
|
||||
},
|
||||
// 开启全方位对齐
|
||||
item: true,
|
||||
// 网格对齐
|
||||
grid: true
|
||||
},
|
||||
grid: {
|
||||
// 网孔尺寸
|
||||
cell: 18
|
||||
},
|
||||
shortcut: {
|
||||
// 开启自定义命令保存的快捷键
|
||||
save: true
|
||||
}
|
||||
});
|
||||
window.flow = flow;
|
||||
|
||||
// 设置边
|
||||
flow.getGraph().edge({
|
||||
shape: "flow-polyline"
|
||||
});
|
||||
|
||||
// 元素面板栏
|
||||
const itempannel = new G6Editor.Itempannel({
|
||||
container: "itempannel"
|
||||
});
|
||||
// 工具栏
|
||||
const toolbar = new G6Editor.Toolbar({
|
||||
container: "toolbar"
|
||||
});
|
||||
// 属性栏
|
||||
// const detailpannel = new G6Editor.Detailpannel({
|
||||
// container: "detailpannel"
|
||||
// });
|
||||
// 缩略图
|
||||
let minimapWidth = getComputedStyle(document.querySelector(".right-part")).width;
|
||||
minimapWidth = Number(minimapWidth.replace(/px$/, ""));
|
||||
const minimap = new G6Editor.Minimap({
|
||||
container: "minimap",
|
||||
width: minimapWidth,
|
||||
height: 200
|
||||
});
|
||||
// 右键菜单
|
||||
const contextmenu = new G6Editor.Contextmenu({
|
||||
container: "contextmenu"
|
||||
});
|
||||
// 挂载以上组件到Editor
|
||||
editor.add(flow);
|
||||
editor.add(itempannel);
|
||||
editor.add(toolbar);
|
||||
// editor.add(detailpannel);
|
||||
editor.add(minimap);
|
||||
editor.add(contextmenu);
|
||||
// 挂载到window,方便调试
|
||||
window.editor = editor;
|
||||
|
||||
// 获取当前画布
|
||||
const currentPage = editor.getCurrentPage();
|
||||
currentPage.on("afterchange", (e) => {
|
||||
if (e.action === "add") {
|
||||
if (e.model.nodetype === "startNode" || e.model.nodetype === "endNode") {
|
||||
let nodes = this.editor.getCurrentPage().getNodes();
|
||||
for (const item of nodes) {
|
||||
if (item.model.nodetype === e.model.nodetype && item.model.id !== e.model.id) {
|
||||
this.editor.getCurrentPage().remove(e.item);
|
||||
this.$message.warning("只能有一个开始节点或结束节点");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
// 监听(选择对象后)事件
|
||||
currentPage.on("afteritemselected", (ev) => {
|
||||
console.log("打印所选对象属性", ev.item);
|
||||
console.log("打印所选对象数据模型", ev.item.model);
|
||||
const selectedItemDataModel = ev.item.model;
|
||||
// 如果选择的对象是节点
|
||||
if (ev.item.isNode) {
|
||||
this.nodeAttributeForm.label = selectedItemDataModel.label;
|
||||
this.nodeAttributeForm.width = selectedItemDataModel.size.split("*")[0];
|
||||
this.nodeAttributeForm.height = selectedItemDataModel.size.split("*")[1];
|
||||
this.nodeAttributeForm.color = selectedItemDataModel.color;
|
||||
}
|
||||
// 如果选择的对象是边
|
||||
if (ev.item.isEdge) {
|
||||
ev.item.graph.edge({
|
||||
shape: "flow-polyline-round"
|
||||
});
|
||||
this.edgeAttributeForm.label = selectedItemDataModel.label;
|
||||
this.edgeAttributeForm.shape = selectedItemDataModel.shape;
|
||||
}
|
||||
});
|
||||
// 监听(删除后)事件
|
||||
currentPage.on("afterdelete", (ev) => { });
|
||||
},
|
||||
// 打开保存为图片弹窗
|
||||
openSaveAsImageDialog() {
|
||||
this.saveAsImageDialogVisible = true;
|
||||
},
|
||||
// 开启/关闭网格对齐
|
||||
toggleGridShowStatus(value) {
|
||||
if (value) {
|
||||
this.editor.getCurrentPage().showGrid();
|
||||
} else {
|
||||
this.editor.getCurrentPage().hideGrid();
|
||||
}
|
||||
},
|
||||
// 保存为图片
|
||||
saveAsImage() {
|
||||
let newCanvas;
|
||||
if (this.saveAsImageFormat === "jpg") {
|
||||
let canvas = this.editor.getCurrentPage().saveImage();
|
||||
newCanvas = document.createElement("canvas");
|
||||
newCanvas.width = canvas.width;
|
||||
newCanvas.height = canvas.height;
|
||||
let newContext = newCanvas.getContext("2d");
|
||||
newContext.fillStyle = "#fff";
|
||||
newContext.fillRect(0, 0, newCanvas.width, newCanvas.height);
|
||||
newContext.drawImage(canvas, 0, 0);
|
||||
}
|
||||
if (this.saveAsImageFormat === "png") {
|
||||
newCanvas = this.editor.getCurrentPage().saveImage();
|
||||
}
|
||||
let imageDataURL = newCanvas.toDataURL();
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.download = "图片.jpg";
|
||||
downloadLink.href = imageDataURL;
|
||||
document.body.appendChild(downloadLink);
|
||||
downloadLink.click();
|
||||
document.body.removeChild(downloadLink);
|
||||
this.saveAsImageDialogVisible = false;
|
||||
},
|
||||
// 保存
|
||||
submitForm() {
|
||||
const _this = this;
|
||||
let needSaveData = editor.getCurrentPage().save();
|
||||
console.log(needSaveData, 'needSaveData');
|
||||
localStorage.setItem("flowData", JSON.stringify(needSaveData));
|
||||
_this.save(needSaveData);
|
||||
_this.$message.success("数据已保存");
|
||||
|
||||
},
|
||||
// 保存为文件
|
||||
saveAsFile() {
|
||||
let sub = this.editor.getCurrentPage().save()
|
||||
console.log(sub, 'sub')
|
||||
let jsonString = JSON.stringify(this.editor.getCurrentPage().save());
|
||||
let blob = new Blob([jsonString]);
|
||||
let blobURL = URL.createObjectURL(blob);
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.download = "数据.json";
|
||||
downloadLink.href = blobURL;
|
||||
document.body.appendChild(downloadLink);
|
||||
downloadLink.click();
|
||||
URL.revokeObjectURL(blobURL);
|
||||
document.body.removeChild(downloadLink);
|
||||
},
|
||||
// 读取历史数据
|
||||
readHistoryData() {
|
||||
let stringData = localStorage.getItem("flowData");
|
||||
if (stringData === "" || stringData === "{}" || stringData === null) {
|
||||
this.$message.warning("无历史数据");
|
||||
return;
|
||||
}
|
||||
let jsonData = JSON.parse(stringData);
|
||||
this.editor.getCurrentPage().read(jsonData);
|
||||
},
|
||||
// 读取上传数据
|
||||
readUploadData() {
|
||||
let uploadButton = document.createElement("input");
|
||||
uploadButton.setAttribute("type", "file");
|
||||
uploadButton.setAttribute("accept", ".json");
|
||||
uploadButton.addEventListener("change", (e) => {
|
||||
console.dir(uploadButton);
|
||||
let file = uploadButton.files[0];
|
||||
let fileReader = new FileReader();
|
||||
fileReader.onload = (event) => {
|
||||
console.log(event);
|
||||
let text = JSON.parse(event.target.result);
|
||||
console.log(text);
|
||||
this.editor.getCurrentPage().read(text);
|
||||
};
|
||||
fileReader.readAsText(file);
|
||||
});
|
||||
uploadButton.click();
|
||||
},
|
||||
//
|
||||
save(source) {
|
||||
let edges = source.edges;
|
||||
let nodes = source.nodes;
|
||||
console.log(construct);
|
||||
let res = construct(source);
|
||||
console.log(JSON.stringify(res, null, 2));
|
||||
},
|
||||
handledel() {
|
||||
this.$store.dispatch("tagsView/delView", this.$route);
|
||||
this.$router.go(-1)
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import url("@/views/system/mianview/index.less");
|
||||
</style>
|
||||
386
src/views/system/components/questionopennew.vue
Normal file
386
src/views/system/components/questionopennew.vue
Normal file
@ -0,0 +1,386 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 问卷模板 -->
|
||||
<!-- <el-dialog title="问卷预览" :visible.sync="questionopen" width="30%"> -->
|
||||
<div class="words" v-for="(item, index) in questiondata.questionSubjectList" :key="index">
|
||||
{{ index + 1 }}.{{ item.questionName }}
|
||||
<span v-if="item.questionType == 'MULTIPLE_CHOICE'">(单选题)</span>
|
||||
<span v-if="item.questionType == 'MULTIPLE_CHOICE_QUESTIONS'">(多选题)</span>
|
||||
<span v-if="item.questionType == 'SCORING_QUESTIONS'">(打分题)</span>
|
||||
<span v-if="item.questionType == 'COMBINATION_RADIO_SUBJECT'">(组合单选题)</span>
|
||||
<span v-if="item.questionType == 'COMBINATION_MULTIPLE_SUBJECT'">(组合多选题)</span>
|
||||
<span v-if="item.questionType == 'COMBINATION_BLANKS_SUBJECT'">(组合填空题)</span>
|
||||
<span v-if="item.questionType == 'FILL_IN_THE_BLANKS'">(填空题)</span>
|
||||
<span v-if="item.questionType == 'COMBINATION_SCORING_SUBJECT'">(组合打分题)</span>
|
||||
<span v-if="item.questionType == 'DATE_BLANKS_SUBJECT'">(日期填空题)</span>
|
||||
<span v-if="item.questionType == 'TIME_BLANKS_SUBJECT'">(时间填空题)</span>
|
||||
<el-radio-group v-if="item.questionType == 'MULTIPLE_CHOICE' ||
|
||||
item.questionType == 'COMBINATION_RADIO_SUBJECT' ||
|
||||
item.questionType == 'SCORING_QUESTIONS' ||
|
||||
item.questionType == 'COMBINATION_SCORING_SUBJECT'
|
||||
" v-model="questiondata[index]" class="custom-radio-group" disabled
|
||||
@change="radioGroupChange($event, item)">
|
||||
<el-radio class="custom" v-for="(aitem, aindex) in item.questionSubjectOptionList" :key="aindex"
|
||||
:label="aitem.id" @change="radioChange($event, aitem, index)">{{ aitem.optionName }}</el-radio>
|
||||
</el-radio-group>
|
||||
<!-- 多选、组合多选 -->
|
||||
<el-checkbox-group disabled v-model="checkeddata" @change="radioGroupChange($event, item, 'checkbox')" v-if="item.questionType == 'MULTIPLE_CHOICE_QUESTIONS' ||
|
||||
item.questionType == 'COMBINATION_MULTIPLE_SUBJECT'
|
||||
">
|
||||
<el-checkbox v-for="(aitem, aindex) in item.questionSubjectOptionList" :key="aindex" :label="aitem.id"
|
||||
@change="radioChangecheck($event, aitem, index, aindex)">{{ aitem.optionName
|
||||
}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<!-- 填空题、组合填空 -->
|
||||
<div v-if="item.questionType == 'FILL_IN_THE_BLANKS' ||
|
||||
item.questionType == 'COMBINATION_BLANKS_SUBJECT'
|
||||
" class="tk">
|
||||
<el-input v-model="item.fillBlanksAnswer" disabled placeholder="请输入答案" type="textarea" />
|
||||
<!-- <el-input></el-input> -->
|
||||
</div>
|
||||
<!-- 日期填空题、 -->
|
||||
<div v-if="item.questionType == 'DATE_BLANKS_SUBJECT'" style="margin: 20px 0 10px 30px">
|
||||
<el-date-picker disabled @change="timepicker($event, index)" clearable v-model="item.fillBlanksAnswer"
|
||||
type="date" value-format="yyyy-MM-dd" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<!-- 时间填空题 -->
|
||||
<div style="margin: 20px 0 10px 30px" v-if="item.questionType == 'TIME_BLANKS_SUBJECT'">
|
||||
<el-time-select disabled @change="timepickerselect($event, index)" clearable
|
||||
v-model="item.fillBlanksAnswer" :picker-options="{
|
||||
start: '08:30',
|
||||
step: '00:30',
|
||||
end: '23:30',
|
||||
}" placeholder="选择时间">
|
||||
</el-time-select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </el-dialog> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "questionopen",
|
||||
props: ['lookitemnew'],
|
||||
data() {
|
||||
return {
|
||||
checkeddata: [],
|
||||
questiondata: {},
|
||||
// questionopen: false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
created() {
|
||||
this.questiondata = this.lookitemnew
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
watch: {
|
||||
lookitemnew(newValue, oldValue) {
|
||||
console.log(newValue, 'newValue111')
|
||||
if (newValue) {
|
||||
this.questiondata = newValue;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// questionopentrue() {
|
||||
// this.questionopen = true
|
||||
// },
|
||||
// 日期填空题
|
||||
timepicker(e, index) {
|
||||
this.questiondata.questionSubjectList[index].fillBlanksAnswer = e
|
||||
},
|
||||
// 复选框
|
||||
radioChangecheck(e, item, index, aindex) {
|
||||
console.log(e, item, index, '选中某个复选框时')
|
||||
if (e == true) {
|
||||
this.questiondata.questionSubjectList[index].questionSubjectOptionList[aindex].optionChooseSign = '0'
|
||||
} else {
|
||||
this.questiondata.questionSubjectList[index].questionSubjectOptionList[aindex].optionChooseSign = '1'
|
||||
}
|
||||
},
|
||||
// 时间填空题
|
||||
timepickerselect(e, index) {
|
||||
this.questiondata.questionSubjectList[index].fillBlanksAnswer = e
|
||||
},
|
||||
radioGroupChange(e, item) {
|
||||
},
|
||||
// 选中某个单选框时,由radio时触发
|
||||
radioChange(e, item, index) {
|
||||
this.questiondata.questionSubjectList[index].questionSubjectOptionList.forEach(el => {
|
||||
if (el.id == item.id) {
|
||||
el.optionChooseSign = '0'
|
||||
}
|
||||
else {
|
||||
el.optionChooseSign = '1'
|
||||
}
|
||||
})
|
||||
console.log(this.questiondata, 'this.questiondata')
|
||||
this.questiondata
|
||||
},
|
||||
// 复选框
|
||||
radioChangecheck(e, item, index, aindex) {
|
||||
if (e == true) {
|
||||
this.questiondata.questionSubjectList[index].questionSubjectOptionList[aindex].optionChooseSign = '0'
|
||||
} else {
|
||||
this.questiondata.questionSubjectList[index].questionSubjectOptionList[aindex].optionChooseSign = '1'
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.app-container {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
::v-deep .el-input .is-disabled .el-input__inner {
|
||||
background: #fff !important;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
::v-deep .el-textarea .is-disabled .el-textarea__inner {
|
||||
color: #606266;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
::v-deep .el-radio__input.is-disabled+span.el-radio__label {
|
||||
color: black;
|
||||
background: #fff;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.tk {
|
||||
::v-deep .el-textarea__inner {
|
||||
margin: 20px 0 10px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-radio {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
::v-deep .el-checkbox-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 10px 0px 10px 24px;
|
||||
}
|
||||
|
||||
::v-deep .el-checkbox {
|
||||
padding: 10px 0 10px 0px;
|
||||
// padding: 10px;
|
||||
}
|
||||
|
||||
.custom-radio-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 10px 0 10px 10px;
|
||||
|
||||
.custom {
|
||||
padding: 10px 0 10px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.bodytop {
|
||||
position: relative;
|
||||
top: 20px;
|
||||
// height: 500px;
|
||||
width: 400px;
|
||||
margin: 0 auto;
|
||||
// background: red;f
|
||||
overflow: auto;
|
||||
border: 1px solid #e2e2e2;
|
||||
|
||||
.titledata {
|
||||
margin: 30px 0px 15px 30px;
|
||||
top: 14px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.audiotop {
|
||||
margin: 10px 0px 10px 30px;
|
||||
}
|
||||
|
||||
img {
|
||||
// width: 362px;
|
||||
// height: 127px;
|
||||
margin: 0px 0px 0px 30px;
|
||||
}
|
||||
|
||||
.know {
|
||||
margin: 11px 0px 10px 30px;
|
||||
font-size: 20px;
|
||||
font-weight: 550;
|
||||
}
|
||||
|
||||
.knowlist {
|
||||
margin: 10px 0px 10px 30px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
// background: yellow;
|
||||
}
|
||||
|
||||
.header {
|
||||
background-color: #f1f3f5;
|
||||
padding-top: 10px;
|
||||
|
||||
::v-deep .el-tabs__header {
|
||||
margin: 0 !important;
|
||||
width: 100%;
|
||||
// overflow: auto;
|
||||
// height: 500px;
|
||||
// background: red;
|
||||
}
|
||||
|
||||
.bottomheader {
|
||||
overflow: auto;
|
||||
width: 99%;
|
||||
background-color: #fff;
|
||||
margin: 10px auto;
|
||||
padding: 10px 20px;
|
||||
|
||||
.sport {
|
||||
padding: 10px 50px 10px 10px;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.words {
|
||||
font-size: 15px;
|
||||
padding: 10px 50px 10px 10px;
|
||||
}
|
||||
|
||||
.sports {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.word {
|
||||
font-size: 14px;
|
||||
font-weight: 550;
|
||||
padding: 50px 50px 10px 10px;
|
||||
}
|
||||
|
||||
.videoleft {
|
||||
width: 40%;
|
||||
height: 200px;
|
||||
background: red;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 20px;
|
||||
font-weight: 550;
|
||||
padding: 10px 50px 10px 10px;
|
||||
}
|
||||
|
||||
.number {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
color: white;
|
||||
background: blue;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.nexttime {
|
||||
font-size: 15px;
|
||||
padding: 10px 50px 10px 10px;
|
||||
}
|
||||
|
||||
.images {
|
||||
width: 53%;
|
||||
height: 241px;
|
||||
margin: 0 auto;
|
||||
background: red;
|
||||
}
|
||||
|
||||
.attention {
|
||||
font-size: 14px;
|
||||
font-weight: 550;
|
||||
padding: 10px 50px 10px 10px;
|
||||
}
|
||||
|
||||
// .videobottom
|
||||
// {
|
||||
// font-size: 14px;
|
||||
// font-weight: 550;
|
||||
// padding: 10px 50px 10px 10px;
|
||||
// }
|
||||
}
|
||||
|
||||
.topheader {
|
||||
width: 99%;
|
||||
background-color: #fff;
|
||||
margin: 0 auto;
|
||||
|
||||
.information {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 10px 20px;
|
||||
height: 110px;
|
||||
|
||||
.top,
|
||||
.bottom {
|
||||
color: #666666;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
div {
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user {
|
||||
width: 100%;
|
||||
padding: 0 20px;
|
||||
display: flex;
|
||||
height: 80px;
|
||||
align-items: center;
|
||||
line-height: 80px;
|
||||
|
||||
.source {
|
||||
display: flex;
|
||||
position: relative;
|
||||
right: 59px;
|
||||
position: absolute;
|
||||
|
||||
.item {
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 20px;
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
.gender {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.age {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.headsculpture {
|
||||
border-radius: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -47,10 +47,14 @@
|
||||
<div class="bottomheader">
|
||||
<div style="display: flex">
|
||||
<!-- 问卷模板 -->
|
||||
<div class="right" v-if="$route.query.taskType == 'QUESTIONNAIRE_SCALE' ||
|
||||
$route.query.taskType == 'ARTIFICIAL_FOLLOW_UP'
|
||||
">
|
||||
<div
|
||||
<div
|
||||
class="right"
|
||||
v-if="
|
||||
$route.query.taskType == 'QUESTIONNAIRE_SCALE' ||
|
||||
$route.query.taskType == 'ARTIFICIAL_FOLLOW_UP'
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="float: right; margin-top: 20px"
|
||||
v-if="
|
||||
$route.query.taskType == 'QUESTIONNAIRE_SCALE' ||
|
||||
@ -74,7 +78,10 @@
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="sport" v-if="$route.query.taskType == 'QUESTIONNAIRE_SCALE'">
|
||||
<div
|
||||
class="sport"
|
||||
v-if="$route.query.taskType == 'QUESTIONNAIRE_SCALE'"
|
||||
>
|
||||
问卷模板: Barthel指数评定问卷
|
||||
</div>
|
||||
<div
|
||||
@ -239,6 +246,18 @@
|
||||
</el-form>
|
||||
</div>
|
||||
</div> -->
|
||||
<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>
|
||||
<!-- 电话外呼 -->
|
||||
<div v-if="$route.query.taskType == 'PHONE_OUTBOUND'">
|
||||
<div class="sport">电话外呼</div>
|
||||
@ -352,6 +371,12 @@
|
||||
<br />
|
||||
<el-form-item label="话术图" prop="phone">
|
||||
<!-- <img :src="formlist.scriptFilePath" style="width: 250px; height: 200px" /> -->
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="scriptlook(formlist.phoneNodeContent)"
|
||||
>预览</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="任务处理信息" prop="routeHandleRemark">
|
||||
@ -373,6 +398,7 @@
|
||||
|
||||
<script>
|
||||
import message from "../components/message.vue";
|
||||
import Scriptpreview from ".././components/Scriptpreviewopen.vue";
|
||||
|
||||
import {
|
||||
selectFollowPatientInfo,
|
||||
@ -387,11 +413,19 @@ import { getAgencytype } from "@/api/system/agency";
|
||||
export default {
|
||||
components: {
|
||||
message,
|
||||
Scriptpreview,
|
||||
},
|
||||
name: "patientdetails",
|
||||
|
||||
data() {
|
||||
return {
|
||||
lookshow: false,
|
||||
phoneNodeContent: {
|
||||
scriptInfoId: null,
|
||||
flowScheme: null,
|
||||
nodes: [],
|
||||
edges: [],
|
||||
},
|
||||
optionslist: [],
|
||||
obj: {},
|
||||
radio: "1",
|
||||
@ -447,9 +481,12 @@ export default {
|
||||
this.$route.query.taskType == "ARTIFICIAL_FOLLOW_UP"
|
||||
) {
|
||||
this.questioninfo();
|
||||
} else if(this.$route.query.taskType=="PHONE_OUTBOUND" && this.$route.query.phoneId){
|
||||
selectPhonePush(this.$route.query.manageRouteNodeId).then((response) => {
|
||||
console.log('===================')
|
||||
} else if (
|
||||
this.$route.query.taskType == "PHONE_OUTBOUND" &&
|
||||
this.$route.query.phoneId
|
||||
) {
|
||||
selectPhonePush(this.$route.query.manageRouteNodeId).then((response) => {
|
||||
console.log("===================");
|
||||
if (response.data) {
|
||||
this.formlist = response.data;
|
||||
this.formlist.phoneRedialTimes = response.data.phoneRedialTimes;
|
||||
@ -457,7 +494,7 @@ export default {
|
||||
|
||||
// console.log(this.formlist, " this.formlist.phoneRedialTimes");
|
||||
this.infolistMESSAGE();
|
||||
this.infolistword()
|
||||
this.infolistword();
|
||||
if (this.formlist.phonePushSign == 0) {
|
||||
this.formlist.phonePushSign = "0";
|
||||
} else if (this.formlist.phonePushSign == 1) {
|
||||
@ -465,13 +502,26 @@ this.infolistword()
|
||||
}
|
||||
}
|
||||
});
|
||||
}else if(this.$route.query.taskType=="PHONE_OUTBOUND" && this.$route.query.followTemplateId){
|
||||
console.log('6666666666666666666========')
|
||||
} else if (
|
||||
this.$route.query.taskType == "PHONE_OUTBOUND" &&
|
||||
this.$route.query.followTemplateId
|
||||
) {
|
||||
console.log("6666666666666666666========");
|
||||
|
||||
this.questioninfo();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
scriptlook(e) {
|
||||
console.log(e, "eeeeee");
|
||||
if (e == null || e == "") {
|
||||
this.$message.error("暂无话术图");
|
||||
} else {
|
||||
this.phoneNodeContent = e
|
||||
this.lookshow = true;
|
||||
|
||||
}
|
||||
},
|
||||
// 发送短信
|
||||
infolistword() {
|
||||
var dictType = "text_message_remind";
|
||||
|
||||
@ -299,15 +299,15 @@
|
||||
<div class="pushMethod">
|
||||
推送方式:
|
||||
<span>
|
||||
<el-radio-group v-model="form.phoneDialMethod">
|
||||
<el-radio label="COMMON">人工电话</el-radio>
|
||||
<el-radio label="AI">自动外呼</el-radio>
|
||||
<el-radio-group v-model="form.phoneDialMethod" @change="changephoneDialMethod">
|
||||
<el-radio label="COMMON" >人工电话</el-radio>
|
||||
<el-radio label="AI" >自动外呼</el-radio>
|
||||
</el-radio-group>
|
||||
</span>
|
||||
</div>
|
||||
<div class="pushMethod">
|
||||
话术模板:
|
||||
<span class="spanname" v-if="form.templateId">
|
||||
<span class="spanname" v-if="form.templateId&&form.phoneDialMethod=='COMMON'">
|
||||
<scripts
|
||||
@on-template="messageontemplateword"
|
||||
:templateId="form.phoneTemplateId"
|
||||
@ -596,6 +596,21 @@ export default {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
changephoneDialMethod(e){
|
||||
console.log(e,'e')
|
||||
if(e=='AI'){
|
||||
// this.form.templateId=''
|
||||
this.form.phoneTemplateId=''
|
||||
this.form.phoneTemplateName=''
|
||||
|
||||
}else if(e=='COMMON'){
|
||||
this.form.templateId=''
|
||||
this.form.templateName=''
|
||||
|
||||
this.form.phoneTemplateId=''
|
||||
this.form.phoneTemplateName=''
|
||||
}
|
||||
},
|
||||
infolistword() {
|
||||
var dictType = "text_message_remind";
|
||||
getAgencytype(dictType).then((res) => {
|
||||
@ -808,6 +823,16 @@ export default {
|
||||
? e.list.forEach((el) => {
|
||||
el.routeNodeDay = e.routeNodeDay;
|
||||
el.routeNodeName = e.routeNodeName;
|
||||
if (el.phoneDialMethod == "COMMON" && el.templateId) {
|
||||
el.templateType = "QUESTIONNAIRE";
|
||||
} else if (
|
||||
el.phoneDialMethod == "COMMON" &&
|
||||
el.phoneTemplateId
|
||||
) {
|
||||
el.templateType = "SCRIPT";
|
||||
} else if (el.phoneDialMethod == "AI" && el.phoneTemplateId) {
|
||||
el.templateType = "SCRIPT";
|
||||
}
|
||||
this.updata.specialDiseaseNodeList.push(el);
|
||||
})
|
||||
: "";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user