|
@@ -289,6 +289,35 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+ <!-- 企微加个微配置 -->
|
|
|
|
|
+ <div v-if="selectedNode.nodeType == 'AI_QW_ADD_WX_TASK'" class="property-section">
|
|
|
|
|
+ <div class="section-title">
|
|
|
|
|
+ <i class="el-icon-chat-dot-round"></i>加微方式
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-form-item label="加微方式">
|
|
|
|
|
+ <!-- <el-select v-model="selectedNode.nodeConfig.robot" filterable placeholder="请选择加微话术">
|
|
|
|
|
+ <el-option v-for="item in robotList" :key="item.id" :label="item.name + '('+item.num+')'" :value="item.id"/>
|
|
|
|
|
+ </el-select> -->
|
|
|
|
|
+ <el-select v-model="selectedNode.nodeConfig.qwWxAddWayId" placeholder="请选择加微方式" filterable size="small">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="dict in qwWxAddWayOptions"
|
|
|
|
|
+ :key="dict.dictValue"
|
|
|
|
|
+ :label="dict.dictLabel"
|
|
|
|
|
+ :value="dict.dictValue"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <div class="section-title">
|
|
|
|
|
+ <i class="el-icon-phone"></i>短信配置
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-form-item label="短信模版">
|
|
|
|
|
+ <el-select v-model="selectedNode.nodeConfig.smsTempId" filterable placeholder="请选择短信模版">
|
|
|
|
|
+ <el-option v-for="item in smsTempList" :key="item.tempId" :label="item.title " :value="item.tempId"/>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<!-- AI外呼配置(旧版天天外呼,已停用) -->
|
|
<!-- AI外呼配置(旧版天天外呼,已停用) -->
|
|
|
<!--
|
|
<!--
|
|
|
<div v-if="selectedNode.nodeType == 'AI_CALL_TASK'" class="property-section">
|
|
<div v-if="selectedNode.nodeType == 'AI_CALL_TASK'" class="property-section">
|
|
@@ -625,6 +654,7 @@ export default {
|
|
|
}],
|
|
}],
|
|
|
editAiDisable:true,
|
|
editAiDisable:true,
|
|
|
wxDialogList: [],
|
|
wxDialogList: [],
|
|
|
|
|
+ qwWxAddWayOptions: [],
|
|
|
// 工作流ID
|
|
// 工作流ID
|
|
|
workflowId: null,
|
|
workflowId: null,
|
|
|
// 表单数据
|
|
// 表单数据
|
|
@@ -716,6 +746,14 @@ export default {
|
|
|
// console.log("------")
|
|
// console.log("------")
|
|
|
// console.log(this.wxDialogList)
|
|
// console.log(this.wxDialogList)
|
|
|
// })
|
|
// })
|
|
|
|
|
+
|
|
|
|
|
+ this.getDicts("sys_qw_qw_wx_add_way").then(response => {
|
|
|
|
|
+ this.qwWxAddWayOptions = response.data;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // listAll().then(e => {
|
|
|
|
|
+ // this.wxDialogList = e.data;
|
|
|
|
|
+ // })
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
// 确保容器可获取焦点
|
|
// 确保容器可获取焦点
|
|
@@ -826,7 +864,7 @@ export default {
|
|
|
this.easyCallBusiGroupList = res.data || []
|
|
this.easyCallBusiGroupList = res.data || []
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
- if (this.selectedNode.nodeType === 'AI_SEND_MSG_TASK') {
|
|
|
|
|
|
|
+ if (this.selectedNode.nodeType === 'AI_SEND_MSG_TASK' || this.selectedNode.nodeType === 'AI_QW_ADD_WX_TASK') {
|
|
|
getSmsTempList().then(res => {
|
|
getSmsTempList().then(res => {
|
|
|
this.smsTempList = res.data || []
|
|
this.smsTempList = res.data || []
|
|
|
})
|
|
})
|
|
@@ -1134,7 +1172,7 @@ export default {
|
|
|
const nodeTypeStr = e.dataTransfer.getData('nodeType')
|
|
const nodeTypeStr = e.dataTransfer.getData('nodeType')
|
|
|
if (!nodeTypeStr) return
|
|
if (!nodeTypeStr) return
|
|
|
const nodeType = JSON.parse(nodeTypeStr)
|
|
const nodeType = JSON.parse(nodeTypeStr)
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 检查开始/结束节点是否已存在(限制只能有一个)
|
|
// 检查开始/结束节点是否已存在(限制只能有一个)
|
|
|
if (this.isStartNodeType(nodeType.typeCode)) {
|
|
if (this.isStartNodeType(nodeType.typeCode)) {
|
|
|
const existingStart = this.nodes.find(n => this.isStartNodeType(n.nodeType))
|
|
const existingStart = this.nodes.find(n => this.isStartNodeType(n.nodeType))
|
|
@@ -1150,7 +1188,7 @@ export default {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
const rect = this.$refs.canvasContainer.getBoundingClientRect()
|
|
const rect = this.$refs.canvasContainer.getBoundingClientRect()
|
|
|
const x = (e.clientX - rect.left - this.canvasOffset.x) / this.scale
|
|
const x = (e.clientX - rect.left - this.canvasOffset.x) / this.scale
|
|
|
const y = (e.clientY - rect.top - this.canvasOffset.y) / this.scale
|
|
const y = (e.clientY - rect.top - this.canvasOffset.y) / this.scale
|
|
@@ -1474,19 +1512,11 @@ export default {
|
|
|
this.$message.warning('请输入工作流名称')
|
|
this.$message.warning('请输入工作流名称')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 校验开始节点和结束节点
|
|
// 校验开始节点和结束节点
|
|
|
const startNodes = this.nodes.filter(node => this.isStartNodeType(node.nodeType))
|
|
const startNodes = this.nodes.filter(node => this.isStartNodeType(node.nodeType))
|
|
|
const endNodes = this.nodes.filter(node => this.isEndNodeType(node.nodeType))
|
|
const endNodes = this.nodes.filter(node => this.isEndNodeType(node.nodeType))
|
|
|
-
|
|
|
|
|
- if (startNodes.length === 0) {
|
|
|
|
|
- this.$message.warning('工作流必须包含一个开始节点')
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- if (startNodes.length > 1) {
|
|
|
|
|
- this.$message.warning('工作流只能包含一个开始节点')
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
if (endNodes.length === 0) {
|
|
if (endNodes.length === 0) {
|
|
|
this.$message.warning('工作流必须包含一个结束节点')
|
|
this.$message.warning('工作流必须包含一个结束节点')
|
|
|
return
|
|
return
|
|
@@ -1495,7 +1525,7 @@ export default {
|
|
|
this.$message.warning('工作流只能包含一个结束节点')
|
|
this.$message.warning('工作流只能包含一个结束节点')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 校验所有节点都必须有连线
|
|
// 校验所有节点都必须有连线
|
|
|
if (this.nodes.length > 0) {
|
|
if (this.nodes.length > 0) {
|
|
|
const connectedNodeKeys = new Set()
|
|
const connectedNodeKeys = new Set()
|
|
@@ -1510,7 +1540,7 @@ export default {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 校验短信节点和外呼节点配置
|
|
// 校验短信节点和外呼节点配置
|
|
|
for (const node of this.nodes) {
|
|
for (const node of this.nodes) {
|
|
|
// 短信节点校验:短信模版必选
|
|
// 短信节点校验:短信模版必选
|
|
@@ -1540,7 +1570,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
const nodes = JSON.parse(JSON.stringify(this.nodes))
|
|
const nodes = JSON.parse(JSON.stringify(this.nodes))
|
|
|
this.edges.forEach((edges) => {
|
|
this.edges.forEach((edges) => {
|
|
|
edges.conditionExpr = JSON.stringify(edges.conditionExprObj);
|
|
edges.conditionExpr = JSON.stringify(edges.conditionExprObj);
|