소스 검색

企业微信+个微-短信获客链接

三七 1 일 전
부모
커밋
627942e55c
1개의 변경된 파일46개의 추가작업 그리고 16개의 파일을 삭제
  1. 46 16
      src/views/company/companyWorkflow/design.vue

+ 46 - 16
src/views/company/companyWorkflow/design.vue

@@ -289,6 +289,35 @@
               </el-form-item>
             </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外呼配置(旧版天天外呼,已停用) -->
             <!--
             <div v-if="selectedNode.nodeType == 'AI_CALL_TASK'" class="property-section">
@@ -625,6 +654,7 @@ export default {
       }],
       editAiDisable:true,
       wxDialogList: [],
+      qwWxAddWayOptions: [],
       // 工作流ID
       workflowId: null,
       // 表单数据
@@ -716,6 +746,14 @@ export default {
     //   console.log("------")
     //   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() {
     // 确保容器可获取焦点
@@ -826,7 +864,7 @@ export default {
           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 => {
           this.smsTempList = res.data || []
         })
@@ -1134,7 +1172,7 @@ export default {
       const nodeTypeStr = e.dataTransfer.getData('nodeType')
       if (!nodeTypeStr) return
       const nodeType = JSON.parse(nodeTypeStr)
-      
+
       // 检查开始/结束节点是否已存在(限制只能有一个)
       if (this.isStartNodeType(nodeType.typeCode)) {
         const existingStart = this.nodes.find(n => this.isStartNodeType(n.nodeType))
@@ -1150,7 +1188,7 @@ export default {
           return
         }
       }
-      
+
       const rect = this.$refs.canvasContainer.getBoundingClientRect()
       const x = (e.clientX - rect.left - this.canvasOffset.x) / this.scale
       const y = (e.clientY - rect.top - this.canvasOffset.y) / this.scale
@@ -1474,19 +1512,11 @@ export default {
         this.$message.warning('请输入工作流名称')
         return
       }
-      
+
       // 校验开始节点和结束节点
       const startNodes = this.nodes.filter(node => this.isStartNodeType(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) {
         this.$message.warning('工作流必须包含一个结束节点')
         return
@@ -1495,7 +1525,7 @@ export default {
         this.$message.warning('工作流只能包含一个结束节点')
         return
       }
-      
+
       // 校验所有节点都必须有连线
       if (this.nodes.length > 0) {
         const connectedNodeKeys = new Set()
@@ -1510,7 +1540,7 @@ export default {
           return
         }
       }
-      
+
       // 校验短信节点和外呼节点配置
       for (const node of this.nodes) {
         // 短信节点校验:短信模版必选
@@ -1540,7 +1570,7 @@ export default {
           }
         }
       }
-      
+
       const nodes = JSON.parse(JSON.stringify(this.nodes))
       this.edges.forEach((edges) => {
         edges.conditionExpr = JSON.stringify(edges.conditionExprObj);