|
@@ -302,7 +302,7 @@
|
|
|
<el-option label="呼叫机器人后挂断" :value="7"/>
|
|
<el-option label="呼叫机器人后挂断" :value="7"/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<div class="form-row">
|
|
<div class="form-row">
|
|
|
<el-form-item label="呼叫倍率" class="half-width">
|
|
<el-form-item label="呼叫倍率" class="half-width">
|
|
|
<el-select v-model="selectedNode.nodeConfig.multiplier" @change="handleConfigChange" placeholder="选择倍率">
|
|
<el-select v-model="selectedNode.nodeConfig.multiplier" @change="handleConfigChange" placeholder="选择倍率">
|
|
@@ -321,7 +321,7 @@
|
|
|
<el-radio :label="1">是</el-radio>
|
|
<el-radio :label="1">是</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<el-form-item label="重呼次数" v-if="selectedNode.nodeConfig.autoRecall == 1">
|
|
<el-form-item label="重呼次数" v-if="selectedNode.nodeConfig.autoRecall == 1">
|
|
|
<el-select v-model="selectedNode.nodeConfig.recallTimes" @change="handleConfigChange" placeholder="选择重呼次数">
|
|
<el-select v-model="selectedNode.nodeConfig.recallTimes" @change="handleConfigChange" placeholder="选择重呼次数">
|
|
|
<el-option label="不自动重呼" :value="0"/>
|
|
<el-option label="不自动重呼" :value="0"/>
|
|
@@ -334,6 +334,18 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+ <!-- AI短信配置 -->
|
|
|
|
|
+ <div v-if="selectedNode.nodeType == 'AI_SEND_MSG_TASK'" class="property-section">
|
|
|
|
|
+ <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>
|
|
|
|
|
+
|
|
|
<!-- 样式设置 -->
|
|
<!-- 样式设置 -->
|
|
|
<div class="property-section">
|
|
<div class="property-section">
|
|
|
<div class="section-title">
|
|
<div class="section-title">
|
|
@@ -444,9 +456,28 @@
|
|
|
|
|
|
|
|
<!-- 发短信任务条件 -->
|
|
<!-- 发短信任务条件 -->
|
|
|
<div v-if="edgeSourceNode.nodeType == 'AI_SEND_MSG_TASK'" class="conditions-container">
|
|
<div v-if="edgeSourceNode.nodeType == 'AI_SEND_MSG_TASK'" class="conditions-container">
|
|
|
- <div class="empty-condition">
|
|
|
|
|
|
|
+ <div v-for="(item, index) in selectedEdge.conditionExprObj" :key="index" class="condition-item">
|
|
|
|
|
+ <div class="condition-header">
|
|
|
|
|
+ <span class="condition-number">条件 {{ index + 1 }}</span>
|
|
|
|
|
+ <el-button type="danger" size="mini" icon="el-icon-delete" circle @click="removeCondition(index)"></el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="condition-content">
|
|
|
|
|
+ <el-form-item label="发送状态">
|
|
|
|
|
+ <el-select v-model="item.sendStatus" placeholder="请选择">
|
|
|
|
|
+ <el-option :value="false" label="发送成功" />
|
|
|
|
|
+ <el-option :value="true" label="发送失败" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="等待时间" v-if="item.sendStatus == false">
|
|
|
|
|
+ <el-input v-model="item.waitTime" placeholder="请输入时间">
|
|
|
|
|
+ <template slot="append">分钟</template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-if="selectedEdge.conditionExprObj.length === 0" class="empty-condition">
|
|
|
<i class="el-icon-info"></i>
|
|
<i class="el-icon-info"></i>
|
|
|
- <span>此类型暂不支持条件设置</span>
|
|
|
|
|
|
|
+ <span>暂无条件,请点击上方按钮添加</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -489,7 +520,7 @@ export default {
|
|
|
name: 'WorkflowDesign',
|
|
name: 'WorkflowDesign',
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
wxDialogList: [],
|
|
wxDialogList: [],
|
|
|
// 工作流ID
|
|
// 工作流ID
|
|
|
workflowId: null,
|
|
workflowId: null,
|
|
@@ -556,10 +587,13 @@ export default {
|
|
|
callTime: '',
|
|
callTime: '',
|
|
|
intention: '',
|
|
intention: '',
|
|
|
isAdd: false,
|
|
isAdd: false,
|
|
|
- addTime: ''
|
|
|
|
|
|
|
+ addTime: '',
|
|
|
|
|
+ sendStatus: false,
|
|
|
|
|
+ waitTime: ''
|
|
|
},
|
|
},
|
|
|
CIDGroupList:[],
|
|
CIDGroupList:[],
|
|
|
robotList: [],
|
|
robotList: [],
|
|
|
|
|
+ smsTempList: [],
|
|
|
dialogList: [],
|
|
dialogList: [],
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -627,7 +661,7 @@ export default {
|
|
|
if (!this.selectedNode.nodeConfig || typeof this.selectedNode.nodeConfig !== 'object') {
|
|
if (!this.selectedNode.nodeConfig || typeof this.selectedNode.nodeConfig !== 'object') {
|
|
|
this.selectedNode.nodeConfig = {}
|
|
this.selectedNode.nodeConfig = {}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.selectedEdge = null
|
|
this.selectedEdge = null
|
|
|
this.edgeSourceNode = null
|
|
this.edgeSourceNode = null
|
|
|
if(this.selectedNode.nodeType == "AI_CALL_TASK"){
|
|
if(this.selectedNode.nodeType == "AI_CALL_TASK"){
|
|
@@ -644,7 +678,7 @@ export default {
|
|
|
if (!this.selectedNode.nodeConfig.recallTimes && this.selectedNode.nodeConfig.recallTimes !== 0) {
|
|
if (!this.selectedNode.nodeConfig.recallTimes && this.selectedNode.nodeConfig.recallTimes !== 0) {
|
|
|
this.$set(this.selectedNode.nodeConfig, 'recallTimes', 0)
|
|
this.$set(this.selectedNode.nodeConfig, 'recallTimes', 0)
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
getTypes().then(e => {
|
|
getTypes().then(e => {
|
|
|
this.robotList = e.robot;
|
|
this.robotList = e.robot;
|
|
|
this.dialogList = e.dialog;
|
|
this.dialogList = e.dialog;
|
|
@@ -655,6 +689,12 @@ export default {
|
|
|
console.log(res);
|
|
console.log(res);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ if (this.selectedNode.nodeType === 'AI_SEND_MSG_TASK') {
|
|
|
|
|
+ getSmsTempList().then(res => {
|
|
|
|
|
+ this.smsTempList = res.data || []
|
|
|
|
|
+ })
|
|
|
|
|
+ console.log('smsTempList:', this.smsTempList)
|
|
|
|
|
+ }
|
|
|
this.focusCanvasContainer()
|
|
this.focusCanvasContainer()
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -770,7 +810,7 @@ export default {
|
|
|
AI_SEND_MSG_TASK: '#eb2f96',
|
|
AI_SEND_MSG_TASK: '#eb2f96',
|
|
|
DELAY_TASK: '#13c2c2'
|
|
DELAY_TASK: '#13c2c2'
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
const categoryMap = {
|
|
const categoryMap = {
|
|
|
basic: { key: 'basic', name: '基础节点', types: [] },
|
|
basic: { key: 'basic', name: '基础节点', types: [] },
|
|
|
logic: { key: 'logic', name: '逻辑节点', types: [] },
|
|
logic: { key: 'logic', name: '逻辑节点', types: [] },
|
|
@@ -867,7 +907,7 @@ export default {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
e.preventDefault()
|
|
e.preventDefault()
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 创建新节点,复制所有属性
|
|
// 创建新节点,复制所有属性
|
|
|
const newNode = {
|
|
const newNode = {
|
|
|
...this.copiedNode,
|
|
...this.copiedNode,
|
|
@@ -878,15 +918,15 @@ export default {
|
|
|
// 深拷贝 nodeConfig
|
|
// 深拷贝 nodeConfig
|
|
|
nodeConfig: this.copiedNode.nodeConfig ? JSON.parse(JSON.stringify(this.copiedNode.nodeConfig)) : {}
|
|
nodeConfig: this.copiedNode.nodeConfig ? JSON.parse(JSON.stringify(this.copiedNode.nodeConfig)) : {}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.nodes.push(newNode)
|
|
this.nodes.push(newNode)
|
|
|
// 选中新节点
|
|
// 选中新节点
|
|
|
this.selectedNode = newNode
|
|
this.selectedNode = newNode
|
|
|
this.selectedEdge = null
|
|
this.selectedEdge = null
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 检查是否需要扩展画布
|
|
// 检查是否需要扩展画布
|
|
|
this.checkAndExpandCanvas(newNode)
|
|
this.checkAndExpandCanvas(newNode)
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.$message.success('节点已粘贴')
|
|
this.$message.success('节点已粘贴')
|
|
|
},
|
|
},
|
|
|
/** 显示右键菜单 */
|
|
/** 显示右键菜单 */
|
|
@@ -916,7 +956,7 @@ export default {
|
|
|
this.$message.warning('没有可粘贴的节点')
|
|
this.$message.warning('没有可粘贴的节点')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
const newNode = {
|
|
const newNode = {
|
|
|
...this.copiedNode,
|
|
...this.copiedNode,
|
|
|
nodeKey: this.generateKey(),
|
|
nodeKey: this.generateKey(),
|
|
@@ -924,12 +964,12 @@ export default {
|
|
|
posY: this.copiedNode.posY + 30,
|
|
posY: this.copiedNode.posY + 30,
|
|
|
nodeConfig: this.copiedNode.nodeConfig ? JSON.parse(JSON.stringify(this.copiedNode.nodeConfig)) : {}
|
|
nodeConfig: this.copiedNode.nodeConfig ? JSON.parse(JSON.stringify(this.copiedNode.nodeConfig)) : {}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.nodes.push(newNode)
|
|
this.nodes.push(newNode)
|
|
|
this.selectedNode = newNode
|
|
this.selectedNode = newNode
|
|
|
this.selectedEdge = null
|
|
this.selectedEdge = null
|
|
|
this.checkAndExpandCanvas(newNode)
|
|
this.checkAndExpandCanvas(newNode)
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.$message.success('节点已粘贴')
|
|
this.$message.success('节点已粘贴')
|
|
|
this.hideContextMenu()
|
|
this.hideContextMenu()
|
|
|
},
|
|
},
|
|
@@ -1176,7 +1216,7 @@ export default {
|
|
|
cp1y = y1 + offset
|
|
cp1y = y1 + offset
|
|
|
cp1x = x1
|
|
cp1x = x1
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 根据目标节点锚点方向设置第二个控制点
|
|
// 根据目标节点锚点方向设置第二个控制点
|
|
|
switch(targetAnchor) {
|
|
switch(targetAnchor) {
|
|
|
case 'top':
|
|
case 'top':
|
|
@@ -1279,11 +1319,11 @@ export default {
|
|
|
nodes.filter(node => typeof node.nodeConfig == 'object').forEach(node => {
|
|
nodes.filter(node => typeof node.nodeConfig == 'object').forEach(node => {
|
|
|
node.nodeConfig = JSON.stringify(node.nodeConfig);
|
|
node.nodeConfig = JSON.stringify(node.nodeConfig);
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 查找开始节点和结束节点
|
|
// 查找开始节点和结束节点
|
|
|
const startNode = this.nodes.find(node => node.nodeType === 'START')
|
|
const startNode = this.nodes.find(node => node.nodeType === 'START')
|
|
|
const endNode = this.nodes.find(node => node.nodeType === 'END')
|
|
const endNode = this.nodes.find(node => node.nodeType === 'END')
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
const data = {
|
|
const data = {
|
|
|
workflowId: this.workflowId,
|
|
workflowId: this.workflowId,
|
|
|
workflowName: this.form.workflowName,
|
|
workflowName: this.form.workflowName,
|