Forráskód Böngészése

1、初始化saasUi

yys 19 órája
szülő
commit
c19e212257
100 módosított fájl, 32608 hozzáadás és 529 törlés
  1. 568 0
      public/chat-aggregate.html
  2. 0 21
      public/html/ie.html
  3. 7 5
      public/index.html
  4. 27672 0
      public/sdk.js
  5. 0 12
      public/service.html
  6. 324 0
      public/workflow-canvas.html
  7. 254 0
      public/wx.html
  8. 1 9
      src/App.vue
  9. 5 0
      src/api/admin/ad.js
  10. 78 0
      src/api/admin/aiChatQuality.js
  11. 29 0
      src/api/admin/aiProvider.js
  12. 59 0
      src/api/admin/article.js
  13. 94 0
      src/api/admin/callRecord.js
  14. 34 0
      src/api/admin/course.js
  15. 5 0
      src/api/admin/crm.js
  16. 34 0
      src/api/admin/live.js
  17. 92 0
      src/api/admin/lobster.js
  18. 21 0
      src/api/admin/moduleUsage.js
  19. 51 0
      src/api/admin/product.js
  20. 79 0
      src/api/admin/proxy.js
  21. 34 0
      src/api/admin/qwExternalContact.js
  22. 9 0
      src/api/admin/sop.js
  23. 61 0
      src/api/admin/statistics.js
  24. 5 0
      src/api/admin/storeOrder.js
  25. 44 0
      src/api/admin/sysCompany.js
  26. 61 0
      src/api/admin/sysUser.js
  27. 62 0
      src/api/adv/advertiser.js
  28. 70 0
      src/api/adv/callbackAccount.js
  29. 29 0
      src/api/adv/channel.js
  30. 18 0
      src/api/adv/configuration.js
  31. 10 0
      src/api/adv/conversionLog.js
  32. 63 0
      src/api/adv/domain.js
  33. 73 0
      src/api/adv/landingPageTemplate.js
  34. 19 0
      src/api/adv/project.js
  35. 54 0
      src/api/adv/promotionAccount.js
  36. 60 0
      src/api/adv/site.js
  37. 34 0
      src/api/adv/siteStatistics.js
  38. 36 0
      src/api/adv/trackingLink.js
  39. 53 0
      src/api/aiSipCall/aiSipCallBizGroup.js
  40. 62 0
      src/api/aiSipCall/aiSipCallGateway.js
  41. 53 0
      src/api/aiSipCall/aiSipCallLlmAgentAccount.js
  42. 88 0
      src/api/aiSipCall/aiSipCallOutboundCdr.js
  43. 61 0
      src/api/aiSipCall/aiSipCallPhone.js
  44. 86 0
      src/api/aiSipCall/aiSipCallTask.js
  45. 77 0
      src/api/aiSipCall/aiSipCallUser.js
  46. 53 0
      src/api/aiSipCall/aiSipCallVoiceTtsAliyun.js
  47. 1 9
      src/api/bill/billLog.js
  48. 31 0
      src/api/billing/wallet.js
  49. 53 0
      src/api/callRecord/callRecord.js
  50. 1 1
      src/api/chat/chatDataset.js
  51. 1 1
      src/api/chat/chatDatasetFile.js
  52. 1 1
      src/api/chat/chatKeyword.js
  53. 1 1
      src/api/chat/chatMsg.js
  54. 1 1
      src/api/chat/chatMsgLogs.js
  55. 1 11
      src/api/chat/chatRole.js
  56. 1 1
      src/api/chat/chatSession.js
  57. 2 1
      src/api/chat/chatUpload.js
  58. 1 1
      src/api/chat/chatUser.js
  59. 8 42
      src/api/common.js
  60. 1 1
      src/api/company/VoiceRoboticWx.js
  61. 76 0
      src/api/company/addwx.js
  62. 8 0
      src/api/company/aiCall.js
  63. 49 0
      src/api/company/aiModel.js
  64. 105 0
      src/api/company/aiModel/inboundCallManage.js
  65. 8 0
      src/api/company/aiProvider.js
  66. 43 0
      src/api/company/aiWorkflow.js
  67. 47 0
      src/api/company/approval.js
  68. 88 0
      src/api/company/callphone.js
  69. 14 91
      src/api/company/company.js
  70. 56 0
      src/api/company/companyAccount.js
  71. 27 0
      src/api/company/companyApply.js
  72. 24 30
      src/api/company/companyConfig.js
  73. 39 25
      src/api/company/companyDept.js
  74. 27 30
      src/api/company/companyMenu.js
  75. 29 20
      src/api/company/companyMoneyLogs.js
  76. 13 13
      src/api/company/companyPost.js
  77. 9 7
      src/api/company/companyProfit.js
  78. 18 2
      src/api/company/companyRecharge.js
  79. 7 7
      src/api/company/companyRedPacketBalanceLogs.js
  80. 34 12
      src/api/company/companyRole.js
  81. 44 0
      src/api/company/companySms.js
  82. 6 40
      src/api/company/companySmsPackage.js
  83. 10 8
      src/api/company/companySmsTemp.js
  84. 1 1
      src/api/company/companyTag.js
  85. 1 1
      src/api/company/companyTagGroup.js
  86. 297 40
      src/api/company/companyUser.js
  87. 64 0
      src/api/company/companyUserCard.js
  88. 12 41
      src/api/company/companyVoiceApi.js
  89. 8 12
      src/api/company/companyVoiceCaller.js
  90. 6 31
      src/api/company/companyVoicePackageOrder.js
  91. 62 0
      src/api/company/companyVoiceRobotic.js
  92. 53 0
      src/api/company/companyVoiceRoboticCallBlacklist.js
  93. 149 0
      src/api/company/companyWorkflow.js
  94. 53 0
      src/api/company/companyWorkflowManage.js
  95. 92 0
      src/api/company/config.js
  96. 60 0
      src/api/company/dept.js
  97. 62 0
      src/api/company/dict/data.js
  98. 61 0
      src/api/company/dict/type.js
  99. 33 0
      src/api/company/easyCall.js
  100. 27 0
      src/api/company/firstDiagnosis.js

+ 568 - 0
public/chat-aggregate.html

@@ -0,0 +1,568 @@
+<!DOCTYPE html>
+<html lang="zh">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>龙虾引擎 - 聚合聊天</title>
+<script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
+<style>
+*{margin:0;padding:0;box-sizing:border-box}
+body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:#0a0a1a;color:#e0e0e0;height:100vh;overflow:hidden}
+.main{display:flex;height:100vh}
+
+/* 左侧账户列表 */
+.account-panel{width:80px;background:#0d0d1f;border-right:1px solid #1a1a3e;display:flex;flex-direction:column;padding:12px 0}
+.account-item{width:56px;height:56px;border-radius:50%;margin:0 auto 8px;cursor:pointer;position:relative;border:2px solid transparent;transition:.2s;display:flex;align-items:center;justify-content:center;font-size:24px}
+.account-item:hover{border-color:#e94560;transform:scale(1.05)}
+.account-item.active{border-color:#e94560;background:#e9456022}
+.account-item .badge{position:absolute;top:-2px;right:-2px;background:#e94560;color:#fff;border-radius:10px;padding:1px 5px;font-size:10px}
+.account-item.disabled{opacity:.4;cursor:not-allowed}
+
+/* 会话列表 */
+.session-panel{width:280px;background:#1a1a2e;border-right:1px solid #2a2a4a;display:flex;flex-direction:column}
+.session-header{padding:12px 16px;border-bottom:1px solid #2a2a4a}
+.session-header h3{font-size:14px;color:#e94560}
+.session-header .search{margin-top:8px}
+.session-header input{width:100%;padding:6px 10px;background:#0a0a1a;border:1px solid #2a2a4a;border-radius:4px;color:#e0e0e0;font-size:12px}
+.session-list{flex:1;overflow-y:auto;padding:8px}
+.session-item{display:flex;padding:10px;cursor:pointer;border-radius:6px;margin-bottom:4px;transition:.2s}
+.session-item:hover{background:#2a2a4a}
+.session-item.active{background:#0f3460}
+.session-avatar{width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,#e94560,#f59e0b);display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}
+.session-info{flex:1;min-width:0;margin-left:10px}
+.session-info .name{font-size:13px;color:#e0e0e0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
+.session-info .msg{font-size:12px;color:#888;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}
+.session-time{font-size:11px;color:#666;text-align:right}
+.session-item.unread .name{font-weight:600;color:#fff}
+.session-item.unread .badge{background:#e94560;color:#fff;border-radius:10px;padding:1px 5px;font-size:10px}
+
+/* 聊天区域 */
+.chat-panel{flex:1;display:flex;flex-direction:column;background:#0a0a1a}
+.chat-header{padding:12px 20px;background:#1a1a2e;border-bottom:1px solid #2a2a4a;display:flex;align-items:center;justify-content:space-between}
+.chat-title .name{font-size:15px;color:#e0e0e0}
+.chat-title .type{font-size:11px;color:#888;margin-left:8px}
+.chat-actions{display:flex;gap:8px}
+.chat-actions button{padding:6px 12px;background:#0f3460;border:none;border-radius:4px;color:#e0e0e0;font-size:12px;cursor:pointer}
+.chat-actions button:hover{background:#1a4a80}
+
+/* 消息列表 */
+.message-list{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column}
+.message-item{display:flex;margin-bottom:12px;max-width:80%}
+.message-item.sent{align-self:flex-end}
+.message-item.sent .msg-bubble{background:#e94560;color:#fff;border-radius:12px 12px 0 12px}
+.message-item.received{align-self:flex-start}
+.message-item.received .msg-bubble{background:#1a1a2e;color:#e0e0e0;border-radius:12px 12px 12px 0;border:1px solid #2a2a4a}
+.msg-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#3b82f6,#22c55e);display:flex;align-items:center;justify-content:center;font-size:12px;flex-shrink:0}
+.message-item.sent .msg-avatar{order:2;margin-left:8px}
+.message-item.received .msg-avatar{order:1;margin-right:8px}
+.msg-content{display:flex;flex-direction:column}
+.message-item.sent .msg-content{order:1}
+.message-item.received .msg-content{order:2}
+.msg-bubble{padding:10px 14px;max-width:max-content}
+.msg-text{font-size:13px;line-height:1.5}
+.msg-time{font-size:10px;color:#666;margin-top:4px;text-align:right}
+.message-item.sent .msg-time{color:#fff8}
+
+/* 输入区域 */
+.chat-input{padding:12px 20px;background:#1a1a2e;border-top:1px solid #2a2a4a}
+.input-row{display:flex;gap:10px}
+.input-row textarea{flex:1;padding:10px 14px;background:#0a0a1a;border:1px solid #2a2a4a;border-radius:8px;color:#e0e0e0;font-size:13px;resize:none;min-height:44px;max-height:120px;font-family:inherit}
+.input-row textarea:focus{outline:none;border-color:#e94560}
+.input-row button{padding:10px 24px;background:#e94560;color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:13px;font-weight:500;flex-shrink:0}
+.input-row button:hover{background:#d63850}
+.input-row button:disabled{opacity:.5;cursor:not-allowed}
+
+/* 客户信息面板 */
+.customer-panel{width:280px;background:#1a1a2e;border-left:1px solid #2a2a4a;display:flex;flex-direction:column}
+.customer-header{padding:16px;border-bottom:1px solid #2a2a4a;text-align:center}
+.customer-avatar{width:64px;height:64px;border-radius:50%;background:linear-gradient(135deg,#e94560,#f59e0b);display:flex;align-items:center;justify-content:center;font-size:24px;margin:0 auto}
+.customer-name{font-size:15px;color:#e0e0e0;margin-top:8px}
+.customer-id{font-size:11px;color:#666}
+.customer-tabs{display:flex;border-bottom:1px solid #2a2a4a}
+.customer-tabs .tab{flex:1;padding:8px;text-align:center;font-size:12px;color:#888;cursor:pointer;border-bottom:2px solid transparent}
+.customer-tabs .tab.active{border-color:#e94560;color:#e94560}
+.customer-detail{flex:1;overflow-y:auto;padding:12px}
+.detail-section{margin-bottom:16px}
+.detail-section h4{font-size:12px;color:#888;margin-bottom:8px}
+.detail-row{display:flex;justify-content:space-between;padding:4px 0;font-size:12px}
+.detail-row .label{color:#888}
+.detail-row .value{color:#e0e0e0}
+.tag-list{display:flex;flex-wrap:gap;gap:4px}
+.tag{display:inline-block;padding:3px 8px;background:#0f3460;color:#ccc;border-radius:4px;font-size:11px}
+.record-item{padding:8px;border-bottom:1px solid #1a1a3e}
+.record-item .time{font-size:11px;color:#666}
+.record-item .desc{font-size:12px;color:#e0e0e0;margin-top:2px}
+
+/* 渠道图标 */
+.channel-qw{background:linear-gradient(135deg,#1890ff,#096dd9)}
+.channel-wx{background:linear-gradient(135deg,#07c160,#10b981)}
+.channel-im{background:linear-gradient(135deg,#6366f1,#8b5cf6)}
+.channel-whatsapp{background:linear-gradient(135deg,#25d366,#10b981)}
+.channel-other{background:linear-gradient(135deg,#6b7280,#9ca3af)}
+
+/* 滚动条 */
+::-webkit-scrollbar{width:6px}
+::-webkit-scrollbar-track{background:#0a0a1a}
+::-webkit-scrollbar-thumb{background:#2a2a4a;border-radius:3px}
+::-webkit-scrollbar-thumb:hover{background:#3a3a5a}
+</style>
+</head>
+<body>
+<div id="app" class="main">
+  <!-- 左侧账户列表 -->
+  <div class="account-panel">
+    <div v-for="acc in accounts" :key="acc.id" 
+         :class="['account-item', acc.active ? 'active' : '', acc.connected ? '' : 'disabled']"
+         @click="selectAccount(acc)" :title="acc.name">
+      <span>{{acc.icon}}</span>
+      <span v-if="acc.unread>0" class="badge">{{acc.unread}}</span>
+    </div>
+  </div>
+
+  <!-- 会话列表 -->
+  <div class="session-panel">
+    <div class="session-header">
+      <h3>🗨️ 聊天列表</h3>
+      <div class="search">
+        <input v-model="searchKey" placeholder="搜索联系人..." @keyup="filterSessions">
+      </div>
+    </div>
+    <div class="session-list">
+      <div v-for="sess in filteredSessions" :key="sess.sessionId" 
+           :class="['session-item', sess.sessionId === currentSession?.sessionId ? 'active' : '', sess.unread > 0 ? 'unread' : '']"
+           @click="selectSession(sess)">
+        <div class="session-avatar">{{sess.avatar||'?'}}</div>
+        <div class="session-info">
+          <div class="name">{{sess.name}}</div>
+          <div class="msg">{{sess.lastMsg||'暂无消息'}}</div>
+        </div>
+        <div style="text-align:right;margin-left:8px">
+          <div class="session-time">{{sess.lastTime||''}}</div>
+          <span v-if="sess.unread>0" class="badge">{{sess.unread}}</span>
+        </div>
+      </div>
+      <div v-if="filteredSessions.length===0" style="text-align:center;padding:40px;color:#666;font-size:13px">
+        暂无会话记录
+      </div>
+    </div>
+  </div>
+
+  <!-- 聊天区域 -->
+  <div class="chat-panel">
+    <div v-if="currentSession" class="chat-header">
+      <div class="chat-title">
+        <span class="name">{{currentSession.name}}</span>
+        <span class="type">{{channelName(currentSession.channelType)}}</span>
+      </div>
+      <div class="chat-actions">
+        <button @click="toggleControlMode">{{currentSession.controlMode === 'ai' ? '🤖 AI接管中' : '👤 人工接管'}}</button>
+        <button @click="showCustomerInfo=true">👤 客户信息</button>
+      </div>
+    </div>
+    <div v-else class="chat-header">
+      <div class="chat-title">
+        <span class="name">请选择一个会话</span>
+      </div>
+    </div>
+
+    <div class="message-list" ref="messageList">
+      <div v-for="(msg, idx) in messages" :key="idx" :class="['message-item', msg.sendType === 1 ? 'received' : 'sent']">
+        <div class="msg-avatar">{{msg.sendType === 1 ? '👤' : '🤖'}}</div>
+        <div class="msg-content">
+          <div class="msg-bubble">
+            <div class="msg-text">{{msg.content}}</div>
+          </div>
+          <div class="msg-time">{{msg.time}}</div>
+        </div>
+      </div>
+      <div v-if="messages.length===0" style="text-align:center;padding:60px;color:#666">
+        <div style="font-size:48px;margin-bottom:12px">💬</div>
+        <p>开始与客户聊天</p>
+      </div>
+    </div>
+
+    <div class="chat-input">
+      <div class="input-row">
+        <textarea v-model="inputMsg" placeholder="输入消息..." @keyup.enter="sendMessage"></textarea>
+        <button @click="sendMessage" :disabled="!inputMsg.trim()">发送</button>
+      </div>
+    </div>
+  </div>
+
+  <!-- 客户信息面板 -->
+  <div class="customer-panel" v-if="showCustomerInfo">
+    <div class="customer-header">
+      <div class="customer-avatar">{{currentSession?.avatar||'?'}}</div>
+      <div class="customer-name">{{currentSession?.name||'-'}}</div>
+      <div class="customer-id">{{currentSession?.channelSourceId||'-'}}</div>
+    </div>
+    <div class="customer-tabs">
+      <div :class="['tab', customerTab==='basic'?'active':'']" @click="customerTab='basic'">基本信息</div>
+      <div :class="['tab', customerTab==='tags'?'active':'']" @click="customerTab='tags'">标签</div>
+      <div :class="['tab', customerTab==='records'?'active':'']" @click="customerTab='records'">访问记录</div>
+    </div>
+    <div class="customer-detail">
+      <div v-if="customerTab==='basic'" class="detail-section">
+        <h4>📋 基本信息</h4>
+        <div class="detail-row"><span class="label">渠道</span><span class="value">{{channelName(currentSession?.channelType)}}</span></div>
+        <div class="detail-row"><span class="label">来源ID</span><span class="value">{{currentSession?.channelSourceId||'-'}}</span></div>
+        <div class="detail-row"><span class="label">联系人ID</span><span class="value">{{currentSession?.contactId||'-'}}</span></div>
+        <div class="detail-row"><span class="label">会话ID</span><span class="value">{{currentSession?.sessionId||'-'}}</span></div>
+        <div class="detail-row"><span class="label">创建时间</span><span class="value">{{currentSession?.createTime||'-'}}</span></div>
+      </div>
+      <div v-if="customerTab==='tags'" class="detail-section">
+        <h4>🏷️ 客户标签</h4>
+        <div class="tag-list">
+          <span v-for="tag in customerTags" :key="tag" class="tag">{{tag}}</span>
+        </div>
+        <div v-if="customerTags.length===0" style="color:#666;font-size:12px">暂无标签</div>
+      </div>
+      <div v-if="customerTab==='records'" class="detail-section">
+        <h4>📊 访问记录</h4>
+        <div v-for="record in visitRecords" :key="record.time" class="record-item">
+          <div class="time">{{record.time}}</div>
+          <div class="desc">{{record.desc}}</div>
+        </div>
+        <div v-if="visitRecords.length===0" style="color:#666;font-size:12px">暂无访问记录</div>
+      </div>
+    </div>
+  </div>
+</div>
+
+<script>
+const {createApp, ref, computed, watch, nextTick, onMounted} = Vue;
+    createApp({
+        setup(){
+            const searchKey = ref('');
+            const inputMsg = ref('');
+            const showCustomerInfo = ref(true);
+            const customerTab = ref('basic');
+            const messageList = ref(null);
+            const loading = ref(false);
+            
+            // API请求工具函数
+            const request = async (url, options = {}) => {
+                const defaultOptions = {
+                    headers: {
+                        'Content-Type': 'application/json',
+                    },
+                };
+                const response = await fetch(url, { ...defaultOptions, ...options });
+                if (!response.ok) {
+                    throw new Error(`HTTP ${response.status}: ${response.statusText}`);
+                }
+                return await response.json();
+            };
+
+            // 账户列表
+            const accounts = ref([]);
+
+            // 会话列表
+            const sessions = ref([]);
+
+            // 当前会话
+            const currentSession = ref(null);
+
+            // 消息列表
+            const messages = ref([]);
+
+            // 客户标签
+            const customerTags = ref([]);
+
+            // 访问记录
+            const visitRecords = ref([]);
+
+            // 当前登录用户的企微账户
+            const currentAccount = ref(null);
+
+            // 过滤后的会话
+            const filteredSessions = computed(()=>{
+                if(!searchKey.value) return sessions.value;
+                const key = searchKey.value.toLowerCase();
+                return sessions.value.filter(s=>{
+                    const name = s.nickName || s.name || '';
+                    return name.toLowerCase().includes(key);
+                });
+            });
+
+            // 加载账户列表
+            const loadAccounts = async () => {
+                try {
+                    // 先获取当前登录用户绑定的企微账户
+                    const res = await request('/qw/user/getMyQwUserList');
+                    if (res.code === 200 || res.code === 0) {
+                        const qwAccounts = (res.data || []).map((acc, idx) => ({
+                            id: acc.id || `qw_${idx}`,
+                            name: acc.qwUserName || '企微账户',
+                            icon: '💼',
+                            active: idx === 0,
+                            connected: true,
+                            unread: 0,
+                            type: 'QW',
+                            corpId: acc.corpId,
+                            qwUserId: acc.qwUserId
+                        }));
+                        
+                        // 添加个微账户占位(后续扩展)
+                        const wxAccounts = []; // 暂时为空,后续实现个微账户绑定
+                        
+                        accounts.value = [...qwAccounts, ...wxAccounts];
+                        
+                        if (accounts.value.length > 0) {
+                            currentAccount.value = accounts.value[0];
+                        }
+                    }
+                } catch (error) {
+                    console.error('加载账户失败:', error);
+                    // 降级显示模拟账户
+                    accounts.value = [
+                        {id:'qw', name:'企业微信', icon:'💼', active:true, connected:true, unread:0, type:'QW'},
+                        {id:'wx', name:'个人微信', icon:'💬', active:false, connected:false, unread:0, type:'WX'},
+                    ];
+                    currentAccount.value = accounts.value[0];
+                }
+            };
+
+            // 加载会话列表
+            const loadSessions = async () => {
+                try {
+                    // 先尝试加载chat会话
+                    const chatRes = await request('/chat/chatSession/list?pageNum=1&pageSize=100');
+                    if (chatRes.code === 200 || chatRes.rows) {
+                        const chatSessions = (chatRes.rows || []).map(s => ({
+                            sessionId: s.sessionId,
+                            name: s.nickName || s.userName || '客户',
+                            avatar: (s.nickName || s.userName || '客').charAt(0),
+                            channelType: 'CHAT',
+                            channelSourceId: s.userId,
+                            contactId: s.userId,
+                            lastMsg: '',
+                            lastTime: s.createTime || '',
+                            unread: 0,
+                            createTime: s.createTime,
+                            status: s.status
+                        }));
+                        
+                        // 再尝试加载企微外部联系人作为会话
+                        const qwRes = await request('/qw/externalContact/list?pageNum=1&pageSize=100');
+                        if (qwRes.code === 200 || qwRes.rows) {
+                            const qwSessions = (qwRes.rows || []).map(c => ({
+                                sessionId: `qw_${c.id}`,
+                                name: c.name || c.remark || '企微客户',
+                                avatar: (c.name || c.remark || '客').charAt(0),
+                                channelType: 'QW',
+                                channelSourceId: c.externalUserId,
+                                contactId: c.id,
+                                lastMsg: '',
+                                lastTime: c.createTime || '',
+                                unread: 0,
+                                createTime: c.createTime,
+                                tagIds: c.tagIds,
+                                customerId: c.customerId,
+                                remarkMobiles: c.remarkMobiles
+                            }));
+                            sessions.value = [...qwSessions, ...chatSessions];
+                        } else {
+                            sessions.value = chatSessions;
+                        }
+                    }
+                } catch (error) {
+                    console.error('加载会话失败:', error);
+                    sessions.value = [];
+                }
+                
+                if (sessions.value.length > 0 && !currentSession.value) {
+                    selectSession(sessions.value[0]);
+                }
+            };
+
+            // 选择账户
+            const selectAccount = (acc)=>{
+                if(!acc.connected) return;
+                accounts.value.forEach(a=>a.active = false);
+                acc.active = true;
+                currentAccount.value = acc;
+                loadSessions();
+            };
+
+            // 选择会话
+            const selectSession = async (sess)=>{
+                currentSession.value = sess;
+                // 清除未读
+                sess.unread = 0;
+                // 加载消息
+                await loadMessages(sess);
+                // 加载客户标签和信息
+                await loadCustomerInfo(sess);
+            };
+
+            // 加载消息
+            const loadMessages = async (session) => {
+                messages.value = [];
+                try {
+                    if (session.channelType === 'CHAT') {
+                        // 加载chat会话消息
+                        const chatDetailRes = await request(`/chat/chatSession/${session.sessionId}`);
+                        if (chatDetailRes.code === 200 || chatDetailRes.data) {
+                            const msgRes = await request(`/chat/chatMsg/list?sessionId=${session.sessionId}&pageNum=1&pageSize=100`);
+                            if (msgRes.rows) {
+                                messages.value = msgRes.rows.map(m => ({
+                                    content: m.content,
+                                    sendType: m.sendType,
+                                    time: m.createTime || new Date().toLocaleTimeString('zh-CN',{hour:'2-digit',minute:'2-digit'})
+                                }));
+                            }
+                        }
+                    } else if (session.channelType === 'QW') {
+                        // TODO: 加载企微聊天记录
+                        messages.value = [];
+                    }
+                } catch (error) {
+                    console.error('加载消息失败:', error);
+                    messages.value = [];
+                }
+                
+                nextTick(()=>{
+                    if(messageList.value){
+                        messageList.value.scrollTop = messageList.value.scrollHeight;
+                    }
+                });
+            };
+
+            // 加载客户信息
+            const loadCustomerInfo = async (session) => {
+                customerTags.value = [];
+                visitRecords.value = [];
+                
+                try {
+                    if (session.tagIds && session.tagIds !== '[]') {
+                        // 解析标签ID并加载标签名称
+                        const tagIds = JSON.parse(session.tagIds);
+                        if (tagIds.length > 0) {
+                            const tagRes = await request(`/qw/tag/list?tagIds=${tagIds.join(',')}`);
+                            if (tagRes.rows) {
+                                customerTags.value = tagRes.rows.map(t => t.tagName || t.name);
+                            }
+                        }
+                    }
+                    
+                    // 加载CRM客户信息
+                    if (session.customerId) {
+                        const crmRes = await request(`/crm/customer/${session.customerId}`);
+                        if (crmRes.data) {
+                            // 补充客户基本信息
+                            if (crmRes.data.phone) {
+                                visitRecords.value.push({
+                                    time: new Date().toLocaleDateString('zh-CN'),
+                                    desc: `手机号: ${crmRes.data.phone}`
+                                });
+                            }
+                            if (crmRes.data.email) {
+                                visitRecords.value.push({
+                                    time: new Date().toLocaleDateString('zh-CN'),
+                                    desc: `邮箱: ${crmRes.data.email}`
+                                });
+                            }
+                        }
+                    }
+                    
+                    // 加载fastGpt聊天摘要
+                    try {
+                        const chatRes = await request('/fastGpt/fastGptChatSession/list?pageNum=1&pageSize=10');
+                        if (chatRes.rows) {
+                            const relatedChat = chatRes.rows.find(c => 
+                                c.externalUserId === session.channelSourceId || 
+                                c.userId === session.contactId
+                            );
+                            if (relatedChat) {
+                                visitRecords.value.push({
+                                    time: relatedChat.createTime || new Date().toLocaleDateString('zh-CN'),
+                                    desc: `最近聊天: ${relatedChat.lastMsg || '暂无消息'}`
+                                });
+                            }
+                        }
+                    } catch (err) {
+                        console.error('加载聊天摘要失败:', err);
+                    }
+                } catch (error) {
+                    console.error('加载客户信息失败:', error);
+                }
+            };
+
+            // 发送消息
+            const sendMessage = async ()=>{
+                if(!inputMsg.value.trim() || !currentSession.value) return;
+                
+                const msg = {
+                    content: inputMsg.value, 
+                    sendType: 2, 
+                    time: new Date().toLocaleTimeString('zh-CN',{hour:'2-digit',minute:'2-digit'})
+                };
+                messages.value.push(msg);
+                const contentToSend = inputMsg.value;
+                inputMsg.value = '';
+                
+                nextTick(()=>{
+                    if(messageList.value){
+                        messageList.value.scrollTop = messageList.value.scrollHeight;
+                    }
+                });
+                
+                // 调用发送消息接口
+                try {
+                    if (currentSession.value.channelType === 'QW') {
+                        // 企微发送消息
+                        await request('/qw/msg/send', {
+                            method: 'POST',
+                            body: JSON.stringify({
+                                externalUserId: currentSession.value.channelSourceId,
+                                content: contentToSend,
+                                qwUserId: currentAccount.value?.qwUserId
+                            })
+                        });
+                    } else if (currentSession.value.channelType === 'CHAT') {
+                        // Chat会话发送消息
+                        await request('/chat/chatMsg', {
+                            method: 'POST',
+                            body: JSON.stringify({
+                                sessionId: currentSession.value.sessionId,
+                                content: contentToSend,
+                                sendType: 2
+                            })
+                        });
+                    }
+                } catch (error) {
+                    console.error('发送消息失败:', error);
+                }
+            };
+
+            // 切换控制模式
+            const toggleControlMode = ()=>{
+                if(currentSession.value){
+                    currentSession.value.controlMode = currentSession.value.controlMode === 'ai' ? 'human' : 'ai';
+                }
+            };
+
+            // 渠道名称
+            const channelName = (type)=>{
+                const names = {QW:'企业微信', WX:'个人微信', IM:'系统IM', WHATSAPP:'WhatsApp', OTHER:'其他渠道', CHAT:'在线咨询'};
+                return names[type] || type;
+            };
+
+            // 初始化
+            onMounted(async () => {
+                await loadAccounts();
+                await loadSessions();
+            });
+
+            return {
+                searchKey, inputMsg, showCustomerInfo, customerTab, messageList, loading,
+                accounts, sessions, currentSession, messages, customerTags, visitRecords,
+                filteredSessions,
+                selectAccount, selectSession, sendMessage, toggleControlMode, channelName
+            };
+        }
+    }).mount('#app');
+</script>
+</body>
+</html>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 21
public/html/ie.html


+ 7 - 5
public/index.html

@@ -5,10 +5,11 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-    <!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> -->
-    <!-- <title><%= webpackConfig.name %></title> -->
-    <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
-    <!-- <script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&key=UZQBZ-SYQL3-LYF3K-Y7FAL-N3656-2DBJ4"></script> -->
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+    <title><%= webpackConfig.name %></title>
+    <script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=ONIBZ-44LLJ-QHYFI-KGG6Y-5ADJT-A7BIO&libraries=drawing"></script>
+    <script src="/sdk.js" charset="utf-8"></script>
+
 	  <style>
     html,
     body,
@@ -177,7 +178,7 @@
     #loader-wrapper .load_title {
       font-family: 'Open Sans';
       color: #FFF;
-      font-size: 19px;
+      font-size: 16px;
       width: 100%;
       text-align: center;
       z-index: 9999999999999;
@@ -197,6 +198,7 @@
   </style>
   </head>
   <body>
+    <audio id='remoteAudio'  autoPlay></audio>
     <div id="app">
 	    <div id="loader-wrapper">
 		    <div id="loader"></div>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 27672 - 0
public/sdk.js


+ 0 - 12
public/service.html

@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<html>
-	<head>
-		<meta charset="utf-8">
-		<title>技术支持</title>
-	</head>
-	<body>
-		<h4>芳华未来技术支持</h4>
-		<p>联系电话:17749925835</p>
-		<p>联系邮箱:17749925835@163.com</p>
-	</body>
-</html>

+ 324 - 0
public/workflow-canvas.html

@@ -0,0 +1,324 @@
+<!DOCTYPE html>
+<html lang="zh">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>龙虾引擎 - 工作流可视化编辑器</title>
+<script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
+<script src="https://unpkg.com/@vue-flow/core@latest/dist/vue-flow.umd.js"></script>
+<script src="https://unpkg.com/@vue-flow/background@latest/dist/vue-flow-background.umd.js"></script>
+<script src="https://unpkg.com/@vue-flow/minimap@latest/dist/vue-flow-minimap.umd.js"></script>
+<script src="https://unpkg.com/@vue-flow/controls@latest/dist/vue-flow-controls.umd.js"></script>
+<link href="https://unpkg.com/@vue-flow/core@latest/dist/style.css" rel="stylesheet">
+<link href="https://unpkg.com/@vue-flow/minimap@latest/dist/style.css" rel="stylesheet">
+<link href="https://unpkg.com/@vue-flow/controls@latest/dist/style.css" rel="stylesheet">
+
+<style>
+*{margin:0;padding:0;box-sizing:border-box}
+body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;height:100vh;overflow:hidden}
+#app{display:flex;height:100vh}
+.sidebar{width:220px;background:#1a1a2e;color:#fff;padding:12px;overflow-y:auto;flex-shrink:0}
+.sidebar h3{font-size:14px;margin:8px 0;color:#e94560;border-bottom:1px solid #333;padding-bottom:4px}
+.node-item{background:#16213e;margin:4px 0;padding:8px;border-radius:6px;cursor:grab;font-size:12px;border:1px solid #0f3460;transition:all .2s}
+.node-item:hover{background:#0f3460;border-color:#e94560;transform:translateX(2px)}
+.node-item .type-tag{display:inline-block;background:#e94560;color:#fff;padding:1px 6px;border-radius:3px;font-size:10px;margin-right:6px}
+.main{flex:1;position:relative}
+.toolbar{position:absolute;top:10px;left:10px;z-index:10;display:flex;gap:8px}
+.toolbar button{padding:6px 14px;border:none;border-radius:4px;cursor:pointer;font-size:12px}
+.btn-primary{background:#e94560;color:#fff}
+.btn-secondary{background:#0f3460;color:#fff}
+.btn-success{background:#22c55e;color:#fff}
+.prop-panel{width:320px;background:#f8f9fa;border-left:2px solid #dee2e6;padding:12px;overflow-y:auto;flex-shrink:0;font-size:13px}
+.prop-panel h3{color:#1a1a2e;margin-bottom:10px}
+.prop-panel label{display:block;margin:6px 0 2px;color:#555;font-weight:600}
+.prop-panel input,.prop-panel textarea,.prop-panel select{width:100%;padding:6px;border:1px solid #ccc;border-radius:4px;font-size:12px;margin-bottom:6px}
+.prop-panel textarea{min-height:60px;font-family:monospace}
+.vue-flow__node{font-size:12px;min-width:120px;text-align:center}
+.flow-node{padding:8px 12px;border-radius:8px;border:2px solid;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.1)}
+.flow-node.start{border-color:#22c55e}
+.flow-node.ai{border-color:#8b5cf6}
+.flow-node.msg{border-color:#3b82f6}
+.flow-node.cond{border-color:#f59e0b}
+.flow-node.end{border-color:#ef4444}
+.flow-node.default{border-color:#6b7280}
+.node-name{font-weight:700}
+.node-desc{font-size:10px;color:#888;margin-top:2px}
+.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:1000}
+.modal{background:#fff;border-radius:12px;padding:24px;width:500px;max-height:80vh;overflow-y:auto}
+.modal h4{margin-bottom:12px}
+.modal textarea{width:100%;min-height:120px;margin:8px 0;font-family:monospace;font-size:12px;padding:8px}
+.modal .actions{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}
+</style>
+</head>
+<body>
+<div id="app">
+  <div class="sidebar">
+    <h3>🦞 龙虾引擎</h3>
+    <div v-for="(group,gname) in nodeGroups" :key="gname">
+      <h3>{{gname}}</h3>
+      <div class="node-item" v-for="nt in group" :key="nt.type"
+           @dragstart="onDragStart($event,nt)" draggable="true">
+        <span class="type-tag">{{nt.type}}</span>{{nt.name}}
+      </div>
+    </div>
+    <div style="margin-top:12px;border-top:1px solid #333;padding-top:8px">
+      <button class="btn-primary" style="width:100%;padding:8px;margin:4px 0" @click="showGenerate=true">🤖 AI生成工作流</button>
+      <button class="btn-secondary" style="width:100%;padding:8px;margin:4px 0" @click="exportJson">📋 导出JSON</button>
+      <button class="btn-success" style="width:100%;padding:8px;margin:4px 0" @click="saveWorkflow">💾 保存到服务器</button>
+      <button class="btn-secondary" style="width:100%;padding:8px;margin:4px 0" @click="showLoad=true">📂 加载工作流</button>
+    </div>
+  </div>
+
+  <div class="main" @drop="onDrop" @dragover.prevent>
+    <div class="toolbar">
+      <button class="btn-primary" @click="fitView()">🎯 适应视图</button>
+      <button class="btn-secondary" @click="undo()">↩ 撤销</button>
+    </div>
+    <vue-flow ref="flowRef" v-model="elements" :node-types="nodeTypes"
+      :default-edge-options="{animated:true,style:{stroke:'#64748b',strokeWidth:2}}"
+      @node-click="onNodeClick" @connect="onConnect" style="height:100%;background:#f1f5f9">
+      <template #node-start="props"><div class="flow-node start"><div class="node-name">🚀 {{props.data.label}}</div></div></template>
+      <template #node-ai="props"><div class="flow-node ai"><div class="node-name">🧠 {{props.data.label}}</div></div></template>
+      <template #node-msg="props"><div class="flow-node msg"><div class="node-name">💬 {{props.data.label}}</div></div></template>
+      <template #node-cond="props"><div class="flow-node cond"><div class="node-name">🔀 {{props.data.label}}</div></div></template>
+      <template #node-end="props"><div class="flow-node end"><div class="node-name">🏁 {{props.data.label}}</div></div></template>
+      <template #node-default="props"><div class="flow-node default"><div class="node-name">📌 {{props.data.label}}</div></div></template>
+      <vue-flow-background />
+      <vue-flow-minimap />
+      <vue-flow-controls />
+    </vue-flow>
+  </div>
+
+  <div class="prop-panel" v-if="selectedNode">
+    <h3>节点属性</h3>
+    <label>节点编码</label><input v-model="selectedNode.data.nodeCode">
+    <label>节点名称</label><input v-model="selectedNode.data.label">
+    <label>节点类型</label>
+    <select v-model.number="selectedNode.data.nodeType" @change="onTypeChange">
+      <option v-for="nt in allNodes" :value="nt.type" :key="nt.type">{{nt.type}}-{{nt.name}}</option>
+    </select>
+    <label>下一节点</label><input v-model="selectedNode.data.nextNodeCode" placeholder="next_node_code">
+    <label>话术模板</label><textarea v-model="selectedNode.data.messageTemplate" placeholder="支持 ${变量}"></textarea>
+    <label>条件表达式</label><textarea v-model="selectedNode.data.conditionExpr" placeholder='{"field":"intent","op":"eq","value":"purchase"}'></textarea>
+    <label>节点配置(JSON)</label><textarea v-model="selectedNode.data.nodeConfig" placeholder='{"collectFields":["1","2"]}'></textarea>
+    <label>最大轮次</label><input v-model.number="selectedNode.data.maxRounds" type="number" min="0">
+    <button class="btn-primary" style="width:100%;margin-top:8px;padding:8px" @click="selectedNode=null">关闭</button>
+  </div>
+</div>
+
+<div class="modal-overlay" v-if="showGenerate">
+  <div class="modal">
+    <h4>🤖 AI生成工作流</h4>
+    <label>需求描述</label>
+    <textarea v-model="genReq" placeholder="例如:我需要一个旅游行业的客户跟进流程,包括意图识别、信息收集、发送方案、条件判断、创建跟进任务..."></textarea>
+    <label>行业类型</label>
+    <select v-model="genIndustry">
+      <option value="travel">旅游</option><option value="medical">医美</option>
+      <option value="education">教育</option><option value="insurance">保险</option>
+      <option value="general">通用</option>
+    </select>
+    <label>已有工作流JSON(可选-迭代优化)</label>
+    <textarea v-model="genExisting" placeholder="粘贴已有工作流JSON进行迭代优化...留空则全新生成"></textarea>
+    <label>迭代指令(可选)</label>
+    <input v-model="genInstruction" placeholder="如:增加关怀节点、优化话术、调整条件">
+    <div class="actions">
+      <button class="btn-secondary" @click="showGenerate=false">取消</button>
+      <button class="btn-primary" @click="aiGenerate()">生成</button>
+    </div>
+    <div v-if="genResult" style="margin-top:12px;background:#f0fdf4;padding:10px;border-radius:6px;font-size:12px">
+      <b>评分:{{genResult.score}}</b> {{genResult.details}}
+    </div>
+  </div>
+</div>
+
+<div class="modal-overlay" v-if="showLoad">
+  <div class="modal">
+    <h4>📂 加载工作流</h4>
+    <textarea v-model="loadJson" placeholder="粘贴工作流JSON..."></textarea>
+    <div class="actions">
+      <button class="btn-secondary" @click="showLoad=false">取消</button>
+      <button class="btn-primary" @click="importJson()">加载</button>
+    </div>
+  </div>
+</div>
+</div>
+
+<script>
+const {createApp,ref,computed,reactive,onMounted} = Vue
+const nodeGroups = {
+  '流程控制':[{type:1,name:'开始',icon:'🚀'},{type:99,name:'结束',icon:'🏁'},{type:4,name:'等待',icon:'⏳'}],
+  'AI智能':[{type:2,name:'AI处理',icon:'🧠'},{type:11,name:'知识检索',icon:'🔍'}],
+  '交互触达':[{type:3,name:'发送消息',icon:'💬'},{type:7,name:'信息收集',icon:'📋'},{type:10,name:'HTTP调用',icon:'🌐'}],
+  '逻辑控制':[{type:5,name:'条件判断',icon:'🔀'},{type:13,name:'循环迭代',icon:'🔄'},{type:16,name:'变量赋值',icon:'📝'}],
+  '业务操作':[{type:6,name:'创建任务',icon:'✅'},{type:8,name:'转人工',icon:'👤'},{type:9,name:'标签操作',icon:'🏷'}],
+  '扩展能力':[{type:12,name:'代码执行',icon:'⚡'},{type:14,name:'数据库查询',icon:'🗄'},{type:15,name:'子流程',icon:'📦'}]
+}
+const allNodes = Object.values(nodeGroups).flat()
+
+const typeToCategory = {}
+allNodes.forEach(n => {
+  if (n.type === 1) typeToCategory[n.type] = 'start'
+  else if (n.type === 99) typeToCategory[n.type] = 'end'
+  else if (n.type === 2 || n.type === 11) typeToCategory[n.type] = 'ai'
+  else if (n.type === 3 || n.type === 7 || n.type === 10) typeToCategory[n.type] = 'msg'
+  else if (n.type === 5 || n.type === 13 || n.type === 16) typeToCategory[n.type] = 'cond'
+  else typeToCategory[n.type] = 'default'
+})
+
+const app = createApp({
+  setup(){
+    const flowRef = ref(null)
+    const selectedNode = ref(null)
+    const elements = ref([
+      {id:'1',type:'start',position:{x:300,y:50},data:{label:'开始',nodeCode:'START',nodeType:1,nextNodeCode:'MSG_1',messageTemplate:'',conditionExpr:'',nodeConfig:'{}',maxRounds:0}},
+      {id:'2',type:'msg',position:{x:300,y:180},data:{label:'欢迎消息',nodeCode:'MSG_1',nodeType:3,nextNodeCode:'END',messageTemplate:'您好${customerName},欢迎咨询!',conditionExpr:'',nodeConfig:'{}',maxRounds:0}},
+      {id:'3',type:'end',position:{x:300,y:310},data:{label:'结束',nodeCode:'END',nodeType:99,nextNodeCode:'',messageTemplate:'',conditionExpr:'',nodeConfig:'{}',maxRounds:0}},
+      {id:'e1-2',source:'1',target:'2',animated:true},
+    ])
+    const showGenerate = ref(false), showLoad = ref(false)
+    const genReq = ref(''), genIndustry = ref('travel'), genExisting = ref(''), genInstruction = ref('')
+    const genResult = ref(null), loadJson = ref('')
+    let nodeIdCounter = elements.value.length
+
+    const nodeTypes = {
+      start:{template:'#node-start'}, ai:{template:'#node-ai'}, msg:{template:'#node-msg'},
+      cond:{template:'#node-cond'}, end:{template:'#node-end'}, default:{template:'#node-default'}
+    }
+
+    function onDragStart(ev,nt){
+      ev.dataTransfer.setData('application/json',JSON.stringify(nt))
+      ev.dataTransfer.effectAllowed = 'move'
+    }
+    function onDrop(ev){
+      const nt = JSON.parse(ev.dataTransfer.getData('application/json'))
+      const pos = flowRef.value?.screenToFlowCoordinate?.({x:ev.clientX,y:ev.clientY}) || {x:ev.offsetX,y:ev.offsetY}
+      nodeIdCounter++
+      const cat = typeToCategory[nt.type] || 'default'
+      elements.value.push({
+        id:String(nodeIdCounter), type:cat, position:pos,
+        data:{label:nt.name,nodeCode:nt.name.toUpperCase()+'_'+nodeIdCounter,nodeType:nt.type,
+              nextNodeCode:'',messageTemplate:'',conditionExpr:'',nodeConfig:'{}',maxRounds:0}
+      })
+    }
+    function onNodeClick({node}){ selectedNode.value = node }
+    function onConnect(conn){
+      elements.value.push({id:'e'+conn.source+'-'+conn.target,source:conn.source,target:conn.target,animated:true})
+    }
+    function onTypeChange(){
+      if(selectedNode.value){
+        selectedNode.value.type = typeToCategory[selectedNode.value.data.nodeType] || 'default'
+      }
+    }
+    function fitView(){ flowRef.value?.fitView() }
+    function undo(){ elements.value.pop() }
+    function exportJson(){
+      const nodes = elements.value.filter(e=>e.type&&e.data).map(e=>({nodeCode:e.data.nodeCode,nodeName:e.data.label,nodeType:e.data.nodeType,sortNo:parseInt(e.id),nextNodeCode:e.data.nextNodeCode,messageTemplate:e.data.messageTemplate||'',conditionExpr:e.data.conditionExpr||'',nodeConfig:e.data.nodeConfig||'{}',maxRounds:e.data.maxRounds||0}))
+      const edges = elements.value.filter(e=>e.source&&e.target).map((e,i)=>({edgeKey:'EDGE_'+i,sourceNodeCode:elements.value.find(n=>n.id===e.source)?.data?.nodeCode||'',targetNodeCode:elements.value.find(n=>n.id===e.target)?.data?.nodeCode||'',edgeLabel:''}))
+      const json = JSON.stringify({templateName:'工作流模板',description:'',nodes,edges},null,2)
+      navigator.clipboard.writeText(json).then(()=>alert('已复制到剪贴板'))
+      console.log(json)
+    }
+
+    async function saveWorkflow(){
+      exportJson()
+      const token = localStorage.getItem('company_token') || ''
+      try{
+        const r = await fetch('http://localhost:8006/workflow/lobster/template/save',{
+          method:'POST',headers:{'Content-Type':'application/json','Authorization':'Bearer '+token},
+          body:JSON.stringify(JSON.parse(await navigator.clipboard.readText()))
+        })
+        const d = await r.json()
+        alert(d.code===200?'保存成功!':'保存失败: '+d.msg)
+      }catch(e){alert('请先登录系统获取token,或在控制台复制JSON手动保存')}
+    }
+
+    async function aiGenerate(){
+      genResult.value = null
+      genStatus.value = 'submitting'
+      genProgress.value = '正在提交AI生成任务...'
+      
+      const body = {requirement:genReq.value,industryType:genIndustry.value,modelConfig:{modelA:'doubao-lite',modelB:'doubao-lite',modelC:'doubao-lite'}}
+      if(genExisting.value){
+        body.existingWorkflow = genExisting.value
+        body.modifyInstruction = genInstruction.value||'优化工作流结构'
+      }
+      try{
+        /* 第一步: 提交异步任务, 立即返回recordId */
+        const submitRes = await fetch('/workflow/ai-generator/generate',{
+          method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(body)
+        })
+        const submitData = await submitRes.json()
+        if(submitData.code!==200||!submitData.data||!submitData.data.recordId){
+          genStatus.value = 'error'
+          genProgress.value = '提交失败'
+          alert('AI生成任务提交失败')
+          return
+        }
+
+        const recordId = submitData.data.recordId
+        genProgress.value = 'AI正在生成工作流(模型A生成中)...'
+        
+        /* 第二步: 轮询任务状态, 每3秒查询一次, 最多轮询60次(3分钟) */
+        for(let i=0;i<60;i++){
+          await new Promise(r=>setTimeout(r,3000))
+          const pollRes = await fetch('/workflow/ai-generator/result/'+recordId+'/detail')
+          const pollData = await pollRes.json()
+          if(pollData.code===200&&pollData.data){
+            const result = pollData.data
+            if(result.status==='completed'||result.status==='done'){
+              genResult.value = {score:result.qualityScore||'85',details:result.suggestions||''}
+              elements.value = parseWorkflowJson(result.workflowJson || result.nodes || result)
+              genStatus.value = 'done'
+              genProgress.value = 'AI生成完成! (得分:'+(result.qualityScore||85)+')'
+              return
+            }
+            if(result.status==='failed'){
+              genStatus.value = 'error'
+              genProgress.value = '生成失败: '+(result.errorMsg||'未知错误')
+              return
+            }
+            /* 进度更新 */
+            if(i<5) genProgress.value = 'AI正在生成工作流(模型A生成中)...'
+            else if(i<10) genProgress.value = '模型B优化中...'
+            else genProgress.value = '模型C质检评分中...'
+          }
+        }
+        genStatus.value = 'error'
+        genProgress.value = '超时(3分钟),请重试'
+      }catch(e){
+        genStatus.value = 'error'
+        genProgress.value = '请求失败: '+e.message
+        alert('AI生成请求失败: '+e.message)
+      }
+    }
+
+    function importJson(){
+      try{
+        elements.value = parseWorkflowJson(JSON.parse(loadJson.value))
+        showLoad.value = false
+      }catch(e){alert('JSON格式错误: '+e.message)}
+    }
+
+    function parseWorkflowJson(wf){
+      if(typeof wf==='string') wf = JSON.parse(wf)
+      const nodes = (wf.nodes||[]).map((n,i)=>({id:String(i+1),type:typeToCategory[n.nodeType]||'default',position:{x:300,y:50+i*130},data:{label:n.nodeName||n.name||'',nodeCode:n.nodeCode||'',nodeType:n.nodeType||3,nextNodeCode:n.nextNodeCode||'',messageTemplate:n.messageTemplate||'',conditionExpr:n.conditionExpr||'',nodeConfig:typeof n.nodeConfig==='string'?n.nodeConfig:JSON.stringify(n.nodeConfig),maxRounds:n.maxRounds||0}}))
+      const edgeMap = {}
+      nodes.forEach(n=>{if(n.data.nextNodeCode) edgeMap[n.data.nodeCode]=n.data.nextNodeCode})
+      const edges = (wf.edges||[]).map((e,i)=>({id:'e'+i,source:nodes.find(n=>n.data.nodeCode===e.sourceNodeCode)?.id||'',target:nodes.find(n=>n.data.nodeCode===e.targetNodeCode)?.id||'',animated:true}))
+      nodeIdCounter = nodes.length
+      return [...nodes,...edges]
+    }
+
+    return {nodeGroups,allNodes,flowRef,elements,selectedNode,nodeTypes,
+      showGenerate,showLoad,genReq,genIndustry,genExisting,genInstruction,genResult,loadJson,
+      onDragStart,onDrop,onNodeClick,onConnect,onTypeChange,fitView,undo,exportJson,saveWorkflow,aiGenerate,importJson}
+  }
+})
+app.component('vue-flow',VueFlow.default)
+app.component('vue-flow-background',VueFlowBackground.default)
+app.component('vue-flow-minimap',VueFlowMinimap.default)
+app.component('vue-flow-controls',VueFlowControls.default)
+app.mount('#app')
+</script>
+</body>
+</html>

+ 254 - 0
public/wx.html

@@ -0,0 +1,254 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <link rel="icon" href="data:;base64,=">
+  <meta charset="UTF-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title></title>
+  <meta name="description" content="">
+  <link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/2.4.1/weui.min.css"></link>
+  <script src="https://n.stcfile.com/inner/wlh5/jquery.min.js"></script>
+  <link rel="stylesheet" type="text/css" href="https://n.stcfile.com/inner/wlh5/home_links.css">
+  <script>
+    window.onerror = e => {
+      console.error(e)
+    }
+  </script>
+</head>
+<body>
+  <div class="page full">
+    <div id="public-web-container" class="public-container">
+        <div id="safe-notice" style="display:none;">
+            <div class="safe-notice">
+                <img src="https://n.stcfile.com/inner/wlh5/safe.png">
+                <p>本链接经过<font style="font-weight: 500;color: #333333;">SSL安全加密</font>,请放心点击!</p>
+            </div>
+        </div>
+        <div id="style_normal" style="display:none;">
+            <img class="logo" src="">
+            <p class="notice-msg"><small style="font-weight: 500;">正在跳转中...</small><br>如未自动打开微信请点击下方按钮</p>
+            <div class="button-container" onclick="getInfos()">
+                <a id="public-web-jump-button" type="button" class="default" style="width: 66%; margin-top: 20px;">
+                    <span id="public-web-jump-button-loading" class="weui-primary-loading weui-primary-loading_transparent">
+                        <i class="weui-primary-loading__dot"></i>
+                    </span>
+                    <span style="font-weight: 500;">正在打开微信</span>
+                  </a>
+            </div>
+            <a id="dianjiimg_links" href="">
+            </a>
+            <div class="qrcodes-container" id="qrcodes"></div>
+        </div>
+        <div id="style_full" style="display:none;">
+            <a id="dianjiimg_links_full" href="">
+                <img class="fullimg" src="">
+            </a>
+            <div id="button_container_full" class="button-container-none">
+                <a id="public-web-jump-button-full" href="" style="">
+                </a>
+            </div>
+        </div>
+    </div>
+  </div>
+
+  <script type="text/javascript">
+    var cid=0;
+    $(document).ready(function() {
+        cid=getQueryString("id");
+        htmlInfo();
+        getInfos();
+    });
+
+    function  getQueryString(name){
+      var  reg = new  RegExp( "(^|&)" + name + "=([^&]*)(&|$)" );
+      var  r = window.location.search.substr(1).match(reg);
+      if (r!= null ) return   unescape(r[2]); return  null ;
+    }
+
+    
+    function htmlInfo() {
+      var mobile_flag = isMobile();
+        if (mobile_flag) {
+          $("#safe-notice").show();
+          $("#style_normal").show();
+          $(".logo").attr("src","https://n.stcfile.com/inner/wlh5/wx_202204.png")
+        } else {
+          $("#safe-notice").hide();
+          $("#style_normal").hide();
+          $(".public-container").html('请使用手机访问本链接'+'</p>');
+        }
+    }
+
+    function getInfos() {
+      
+      var weixin = isWeiXin();
+    //   var res={
+    //         "code": 200,
+    //         "msg": "success",
+    //         "result": {
+    //                 "openlink": "weixin:\/\/dl\/business\/?t=Dyq5kn9Vfyf"
+    //             }
+    //     };
+	   
+	//    if (res.code === 200) {
+    //     if (!weixin) {
+    //       $("#dianjiimg_links").attr('href', res.result.openlink)
+    //       // $("#public-web-jump-button").attr("href", res.result.openlink)
+    //       jsUpdate(res)
+    //     }
+	//    } else {
+	//    	    $(".public-container").html('<p class="error-msg">'+res.msg+'</p>');
+	//    }
+      
+      $.ajax({
+            type: "get",
+            //async: false,
+            //dataType: "jsonp",
+            //jsonp: "callback",//传递给请求处理程序或页面的,标识jsonp回调函数名(一般为:callback)
+            //jsonpCallback: "GetData",//callback的function名称
+            //url: "http://127.0.0.1:7015/app/user/getAppletScheme", 
+            url: "http://139.186.77.83:7015/app/user/getAppletScheme",
+            data: {
+              "cardId":cid,
+              // "domain": "eturl.cn",
+              // "cookie":"ca77320dfefbda77f218b15fb5e64e96",
+              // "f":"bd084627"
+            },
+            success: function(res) {
+                  if (res.code === 200) {
+                      if (!weixin) {
+                        $("#dianjiimg_links").attr('href', res.result.openlink)
+                        // $("#public-web-jump-button").attr("href", res.result.openlink)
+                        jsUpdate(res)
+                      }
+                  } 
+                  else {
+                        $(".public-container").html('<p class="error-msg">'+res.msg+'</p>');
+                  }
+              }
+      });
+   
+	}
+    function jsUpdate(res) {
+            var mobile_flag = isMobile();
+            var weixin = isWeiXin();
+            if(mobile_flag){
+                var baidu = isBaidu();
+                var uc = isUc();
+                var weibo = isWeibo();
+                var douyin = isDouyin();
+                if (weixin) {
+
+                } 
+                else if (uc) {
+                    $("#public-web-jump-button").html("点击立即前往微信");
+                    $("#dianjiimg").show();
+                    window.location.href = res.result.openlink;
+                } 
+                else if (douyin) {
+                    if (res.result.openlink !== '') {
+                      window.location.href = res.result.openlink;
+                      // $("#public-web-jump-button span").click();
+                    }
+                } 
+                else if (weibo) {
+                  window.location.href = res.result.openlink;
+                } 
+                else {
+                    $("#dianjiimg").show();
+                    if (res.result.openlink !== '') {
+                      window.location.href = res.result.openlink;
+                      // $("#public-web-jump-button span").click();
+                    }
+                    setTimeout(function (){
+                        $("#public-web-jump-button").html("点击立即前往微信");
+                        $("#dianjiimg").show();
+                    }, 3000);
+                }
+            } else {
+                // 强行调用一波URLScheme
+                if (res.result.openlink !== '') {
+                  window.location.href = res.result.openlink;
+                }
+                $(".notice-msg").html("请使用手机访问本网页!");
+            }
+        }
+
+    function isWeiXin(){
+        var ua = navigator.userAgent.toLowerCase()
+        var isWXWork = ua.match(/wxwork/i) == 'wxwork'
+        var isWeixin = !isWXWork && ua.match(/micromessenger/i) == 'micromessenger'
+        return isWeixin;
+    }
+
+    function isDouyin(){
+            ua = navigator.userAgent.toLowerCase();
+            if (ua.indexOf('aweme') >-1){
+                return true;
+            } else {
+                return false;
+            }
+        }
+
+    function isBaidu(){
+        ua = navigator.userAgent.toLowerCase();
+        if (ua.indexOf('baiduboxapp/') >-1){
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    function isUc() {
+        if (navigator.userAgent.match(/(UCBrowser|Quark)/i)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    function isWeibo() {
+        var ua = navigator.userAgent;
+        if(ua.indexOf('Weibo') > -1) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    function getQueryVariable(variable)
+    {
+        var query = window.location.search.substring(1);
+        var vars = query.split("&");
+        for (var i=0;i<vars.length;i++) {
+            var pair = vars[i].split("=");
+            if(pair[0] == variable){return pair[1];}
+        }
+        return(false);
+    }
+
+    function isMobile() {
+        var mobile_flag = true;
+        if (navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|XiaoMi|IEMobile)/i)) {
+            mobile_flag = true;
+        } else {
+            mobile_flag = false;
+        }
+        var screen_width = window.screen.availWidth;
+        if(screen_width < 700){
+            mobile_flag = true;
+        }
+        return mobile_flag;
+    }
+
+    function isIphone() {
+        if (navigator.userAgent.match(/(iPhone|iPod|ios|iPad)/i)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+  </script>
+</body>
+</html>

+ 1 - 9
src/App.vue

@@ -6,14 +6,6 @@
 
 <script>
 export default  {
-  name:  'App',
-    metaInfo() {
-        return {
-            title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
-            titleTemplate: title => {
-                return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
-            }
-        }
-    }
+  name:  'App'
 }
 </script>

+ 5 - 0
src/api/admin/ad.js

@@ -0,0 +1,5 @@
+import request from '@/utils/request'
+
+export function listAdAccount(query) {
+  return request({ url: '/admin/ad/list', method: 'get', params: query })
+}

+ 78 - 0
src/api/admin/aiChatQuality.js

@@ -0,0 +1,78 @@
+import request from '@/utils/request'
+
+// 查询AI聊天会话列表
+export function listChatSessions(query) {
+  return request({
+    url: '/admin/aiChatQuality/sessions',
+    method: 'get',
+    params: query
+  })
+}
+
+// 根据租户ID查询会话列表
+export function listByCompany(companyId) {
+  return request({
+    url: '/admin/aiChatQuality/sessions',
+    method: 'get',
+    params: { companyId }
+  })
+}
+
+// 获取会话详情
+export function getSessionDetail(sessionId) {
+  return request({
+    url: '/admin/aiChatQuality/session/' + sessionId,
+    method: 'get'
+  })
+}
+
+// 获取会话消息列表
+export function getSessionMessages(sessionId) {
+  return request({
+    url: '/admin/aiChatQuality/messages/' + sessionId,
+    method: 'get'
+  })
+}
+
+// 添加质检记录
+export function addQualityRecord(data) {
+  return request({
+    url: '/admin/aiChatQuality/record',
+    method: 'post',
+    data: data
+  })
+}
+
+// 查询质检记录列表
+export function listQualityRecords(query) {
+  return request({
+    url: '/admin/aiChatQuality/records',
+    method: 'get',
+    params: query
+  })
+}
+
+// 获取质检记录详情
+export function getQualityRecord(id) {
+  return request({
+    url: '/admin/aiChatQuality/record/' + id,
+    method: 'get'
+  })
+}
+
+// 修改质检记录
+export function updateQualityRecord(data) {
+  return request({
+    url: '/admin/aiChatQuality/record',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除质检记录
+export function deleteQualityRecord(id) {
+  return request({
+    url: '/admin/aiChatQuality/record/' + id,
+    method: 'delete'
+  })
+}

+ 29 - 0
src/api/admin/aiProvider.js

@@ -0,0 +1,29 @@
+import request from '@/utils/request'
+
+export function listAiProvider() {
+  return request({ url: '/knowledge/ai-provider/list', method: 'get' })
+}
+
+export function getAiProvider(id) {
+  return request({ url: '/knowledge/ai-provider/' + id, method: 'get' })
+}
+
+export function addAiProvider(data) {
+  return request({ url: '/knowledge/ai-provider', method: 'post', data })
+}
+
+export function updateAiProvider(id, data) {
+  return request({ url: '/knowledge/ai-provider/' + id, method: 'put', data })
+}
+
+export function deleteAiProvider(id) {
+  return request({ url: '/knowledge/ai-provider/' + id, method: 'delete' })
+}
+
+export function setDefaultAiProvider(id) {
+  return request({ url: '/knowledge/ai-provider/' + id + '/set-default', method: 'post' })
+}
+
+export function testAiProvider(data) {
+  return request({ url: '/knowledge/ai-provider/test', method: 'post', data })
+}

+ 59 - 0
src/api/admin/article.js

@@ -0,0 +1,59 @@
+import request from '@/utils/request'
+
+// 查询所有租户文章列表
+export function listAllArticles(query) {
+  return request({
+    url: '/admin/article/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询待审计文章列表
+export function listPendingArticles() {
+  return request({
+    url: '/admin/article/pending',
+    method: 'get'
+  })
+}
+
+// 根据租户ID查询文章列表
+export function listByCompany(companyId) {
+  return request({
+    url: '/admin/article/byCompany/' + companyId,
+    method: 'get'
+  })
+}
+
+// 获取文章详情
+export function getArticleInfo(articleId) {
+  return request({
+    url: '/admin/article/' + articleId,
+    method: 'get'
+  })
+}
+
+// 审计文章
+export function auditArticle(articleId, status, auditRemark) {
+  return request({
+    url: '/admin/article/audit/' + articleId,
+    method: 'put',
+    params: { status, auditRemark }
+  })
+}
+
+// 删除文章
+export function deleteArticle(articleId) {
+  return request({
+    url: '/admin/article/' + articleId,
+    method: 'delete'
+  })
+}
+
+// 获取文章统计信息
+export function getArticleStatistics() {
+  return request({
+    url: '/admin/article/statistics',
+    method: 'get'
+  })
+}

+ 94 - 0
src/api/admin/callRecord.js

@@ -0,0 +1,94 @@
+import request from '@/utils/request'
+
+// 查询所有租户外呼通话记录列表
+export function listAllCallRecords(query) {
+  return request({
+    url: '/admin/callRecord/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 根据租户ID查询外呼记录
+export function listByCompany(companyId) {
+  return request({
+    url: '/admin/callRecord/byCompany/' + companyId,
+    method: 'get'
+  })
+}
+
+// 获取外呼记录详情
+export function getCallRecordInfo(logId) {
+  return request({
+    url: '/admin/callRecord/' + logId,
+    method: 'get'
+  })
+}
+
+// 获取通话录音
+export function getCallAudio(logId) {
+  return request({
+    url: '/admin/callRecord/audio/' + logId,
+    method: 'get'
+  })
+}
+
+// 查询质检记录列表
+export function listQualityRecords(query) {
+  return request({
+    url: '/admin/callRecord/quality/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 获取质检记录详情
+export function getQualityRecord(id) {
+  return request({
+    url: '/admin/callRecord/quality/' + id,
+    method: 'get'
+  })
+}
+
+// 新增质检记录
+export function addQualityRecord(data) {
+  return request({
+    url: '/admin/callRecord/quality',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改质检记录
+export function updateQualityRecord(data) {
+  return request({
+    url: '/admin/callRecord/quality',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除质检记录
+export function deleteQualityRecord(id) {
+  return request({
+    url: '/admin/callRecord/quality/' + id,
+    method: 'delete'
+  })
+}
+
+// 报备质检
+export function reportQuality(logIds) {
+  return request({
+    url: '/admin/callRecord/report',
+    method: 'post',
+    data: logIds
+  })
+}
+
+// 获取通话统计信息
+export function getCallStatistics() {
+  return request({
+    url: '/admin/callRecord/statistics',
+    method: 'get'
+  })
+}

+ 34 - 0
src/api/admin/course.js

@@ -0,0 +1,34 @@
+import request from '@/utils/request'
+
+// 查询所有租户课程列表
+export function listAllCourses(query) {
+  return request({
+    url: '/admin/course/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 根据租户ID查询课程列表
+export function listByCompany(companyId) {
+  return request({
+    url: '/admin/course/byCompany/' + companyId,
+    method: 'get'
+  })
+}
+
+// 获取课程详情
+export function getCourseInfo(courseId) {
+  return request({
+    url: '/admin/course/' + courseId,
+    method: 'get'
+  })
+}
+
+// 获取课程统计信息
+export function getCourseStatistics() {
+  return request({
+    url: '/admin/course/statistics',
+    method: 'get'
+  })
+}

+ 5 - 0
src/api/admin/crm.js

@@ -0,0 +1,5 @@
+import request from '@/utils/request'
+
+export function listCrmCustomer(query) {
+  return request({ url: '/admin/crm/list', method: 'get', params: query })
+}

+ 34 - 0
src/api/admin/live.js

@@ -0,0 +1,34 @@
+import request from '@/utils/request'
+
+// 查询所有租户直播列表
+export function listAllLives(query) {
+  return request({
+    url: '/admin/live/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 根据租户ID查询直播列表
+export function listByCompany(companyId) {
+  return request({
+    url: '/admin/live/byCompany/' + companyId,
+    method: 'get'
+  })
+}
+
+// 获取直播详情
+export function getLiveInfo(liveId) {
+  return request({
+    url: '/admin/live/' + liveId,
+    method: 'get'
+  })
+}
+
+// 获取直播统计信息
+export function getLiveStatistics() {
+  return request({
+    url: '/admin/live/statistics',
+    method: 'get'
+  })
+}

+ 92 - 0
src/api/admin/lobster.js

@@ -0,0 +1,92 @@
+import request from '@/utils/request'
+
+// ======== 全局工作流实例监控 ========
+
+// 查看所有租户的工作流实例列表
+export function listAllInstances(params) {
+  return request({ url: '/admin/lobster/instance/list', method: 'get', params })
+}
+
+// 查看指定实例详情(跨租户)
+export function getInstanceDetail(instanceId) {
+  return request({ url: `/admin/lobster/instance/${instanceId}`, method: 'get' })
+}
+
+// 查看指定实例的节点执行日志
+export function getInstanceNodeLogs(instanceId) {
+  return request({ url: `/admin/lobster/instance/node-logs/${instanceId}`, method: 'get' })
+}
+
+// 强制终止指定实例(管理级操作)
+export function forceTerminateInstance(instanceId, reason) {
+  return request({ url: `/admin/lobster/instance/terminate/${instanceId}`, method: 'post', params: { reason } })
+}
+
+// 全局工作流运行统计
+export function getInstanceStats() {
+  return request({ url: '/admin/lobster/instance/stats', method: 'get' })
+}
+
+// ======== 全局死信队列管理 ========
+
+export function listAllDeadLetters(params) {
+  return request({ url: '/admin/lobster/dead-letter/list', method: 'get', params })
+}
+
+export function retryAllDeadLetters() {
+  return request({ url: '/admin/lobster/dead-letter/retry-all', method: 'post' })
+}
+
+export function getDeadLetterStats() {
+  return request({ url: '/admin/lobster/dead-letter/stats', method: 'get' })
+}
+
+// ======== 全局节点审核 ========
+
+export function listAllEventAudits(params) {
+  return request({ url: '/admin/lobster/event-audit/list', method: 'get', params })
+}
+
+export function approveEventAudit(id) {
+  return request({ url: `/admin/lobster/event-audit/approve/${id}`, method: 'post' })
+}
+
+export function rejectEventAudit(id, data) {
+  return request({ url: `/admin/lobster/event-audit/reject/${id}`, method: 'post', data })
+}
+
+export function getEventAuditDetail(id) {
+  return request({ url: `/admin/lobster/event-audit/${id}`, method: 'get' })
+}
+
+// ======== 全局优化建议 ========
+
+export function listAllOptimization(params) {
+  return request({ url: '/admin/lobster/optimization/list', method: 'get', params })
+}
+
+export function batchAuditOptimization(data) {
+  return request({ url: '/admin/lobster/optimization/batch-audit', method: 'post', data })
+}
+
+export function getOptimizationStats() {
+  return request({ url: '/admin/lobster/optimization/stats', method: 'get' })
+}
+
+// ======== 全局Token计费统计 ========
+
+export function listAllBillingRecords(params) {
+  return request({ url: '/admin/lobster/billing/records', method: 'get', params })
+}
+
+export function getBillingStats() {
+  return request({ url: '/admin/lobster/billing/stats', method: 'get' })
+}
+
+export function getTokenCoefficient() {
+  return request({ url: '/admin/lobster/billing/token-coefficient', method: 'get' })
+}
+
+export function updateTokenCoefficient(data) {
+  return request({ url: '/admin/lobster/billing/token-coefficient', method: 'put', data })
+}

+ 21 - 0
src/api/admin/moduleUsage.js

@@ -0,0 +1,21 @@
+import request from '@/utils/request'
+
+export function listModuleUsage(query) {
+  return request({ url: '/admin/module-usage/list', method: 'get', params: query })
+}
+
+export function getProxyDetail(proxyId, statDate) {
+  return request({ url: `/admin/module-usage/proxy/${proxyId}`, method: 'get', params: { statDate } })
+}
+
+export function getTenantDetail(tenantId) {
+  return request({ url: `/admin/module-usage/tenant/${tenantId}`, method: 'get' })
+}
+
+export function refreshStatistics() {
+  return request({ url: '/admin/module-usage/refresh', method: 'post' })
+}
+
+export function refreshTenantStatistics(tenantId) {
+  return request({ url: `/admin/module-usage/refresh/${tenantId}`, method: 'post' })
+}

+ 51 - 0
src/api/admin/product.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request'
+
+// 查询所有租户商品列表
+export function listAllProducts(query) {
+  return request({
+    url: '/admin/product/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询待审核商品列表
+export function listPendingProducts() {
+  return request({
+    url: '/admin/product/pending',
+    method: 'get'
+  })
+}
+
+// 根据租户ID查询商品列表
+export function listByCompany(companyId) {
+  return request({
+    url: '/admin/product/byCompany/' + companyId,
+    method: 'get'
+  })
+}
+
+// 获取商品详情
+export function getProductInfo(productId) {
+  return request({
+    url: '/admin/product/' + productId,
+    method: 'get'
+  })
+}
+
+// 审核商品
+export function auditProduct(productId, status, auditRemark) {
+  return request({
+    url: '/admin/product/audit/' + productId,
+    method: 'put',
+    params: { status, auditRemark }
+  })
+}
+
+// 获取商品统计信息
+export function getProductStatistics() {
+  return request({
+    url: '/admin/product/statistics',
+    method: 'get'
+  })
+}

+ 79 - 0
src/api/admin/proxy.js

@@ -0,0 +1,79 @@
+import request from '@/utils/request'
+
+// ======== 代理 CRUD ========
+
+export function listProxy(query) {
+  return request({ url: '/admin/proxy/list', method: 'get', params: query })
+}
+
+export function getProxy(proxyId) {
+  return request({ url: `/admin/proxy/${proxyId}`, method: 'get' })
+}
+
+export function addProxy(data) {
+  return request({ url: '/admin/proxy', method: 'post', data })
+}
+
+export function updateProxy(data) {
+  return request({ url: '/admin/proxy', method: 'put', data })
+}
+
+export function delProxy(proxyIds) {
+  return request({ url: `/admin/proxy/${proxyIds}`, method: 'delete' })
+}
+
+export function changeProxyStatus(proxyId, status) {
+  return request({ url: `/admin/proxy/changeStatus/${proxyId}`, method: 'put', params: { status } })
+}
+
+export function allEnabledProxies() {
+  return request({ url: '/admin/proxy/allEnabled', method: 'get' })
+}
+
+// ======== 代理服务价格配置 ========
+
+export function listServicePrice(query) {
+  return request({ url: '/proxy/servicePrice/list', method: 'get', params: query })
+}
+
+export function getServicePriceByProxy(proxyId) {
+  return request({ url: `/proxy/servicePrice/byProxy/${proxyId}`, method: 'get' })
+}
+
+export function addServicePrice(data) {
+  return request({ url: '/proxy/servicePrice', method: 'post', data })
+}
+
+export function updateServicePrice(data) {
+  return request({ url: '/proxy/servicePrice', method: 'put', data })
+}
+
+export function batchUpdateServicePrice(data) {
+  return request({ url: '/proxy/servicePrice/batch', method: 'put', data })
+}
+
+export function initDefaultPriceConfig(proxyId, proxyName) {
+  return request({ url: `/proxy/servicePrice/init/${proxyId}`, method: 'post', params: { proxyName } })
+}
+
+// ======== 代理-租户关联 ========
+
+export function listProxyTenantRel(query) {
+  return request({ url: '/proxy/tenantRel/list', method: 'get', params: query })
+}
+
+export function getTenantsByProxy(proxyId) {
+  return request({ url: `/proxy/tenantRel/byProxy/${proxyId}`, method: 'get' })
+}
+
+export function bindTenant(proxyId, tenantId, profitShareRatio) {
+  return request({ url: '/proxy/tenantRel/bind', method: 'post', params: { proxyId, tenantId, profitShareRatio } })
+}
+
+export function unbindTenant(tenantId) {
+  return request({ url: `/proxy/tenantRel/unbind/${tenantId}`, method: 'post' })
+}
+
+export function checkTenantBind(tenantId) {
+  return request({ url: `/proxy/tenantRel/checkBind/${tenantId}`, method: 'get' })
+}

+ 34 - 0
src/api/admin/qwExternalContact.js

@@ -0,0 +1,34 @@
+import request from '@/utils/request'
+
+// 查询所有租户企微用户列表
+export function listAllExternalContact(query) {
+  return request({
+    url: '/admin/qwContact/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询指定租户企微用户列表
+export function listByCompany(companyId) {
+  return request({
+    url: '/admin/qwContact/byCompany/' + companyId,
+    method: 'get'
+  })
+}
+
+// 获取企微用户详情
+export function getExternalContact(id) {
+  return request({
+    url: '/admin/qwContact/' + id,
+    method: 'get'
+  })
+}
+
+// 获取统计信息
+export function getStatistics() {
+  return request({
+    url: '/admin/qwContact/statistics',
+    method: 'get'
+  })
+}

+ 9 - 0
src/api/admin/sop.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+export function listSop(query) {
+  return request({ url: '/admin/sop/list', method: 'get', params: query })
+}
+
+export function listSopTemp(query) {
+  return request({ url: '/admin/sop/temp/list', method: 'get', params: query })
+}

+ 61 - 0
src/api/admin/statistics.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request'
+
+// 平台总览
+export function getOverview() {
+  return request({ url: '/admin/statistics/overview', method: 'get' })
+}
+
+// 代理分佣统计
+export function getProxyProfitStatistics(params) {
+  return request({ url: '/admin/statistics/proxyProfit', method: 'get', params })
+}
+
+// 代理分佣详情
+export function getProxyProfitDetail(proxyId, params) {
+  return request({ url: `/admin/statistics/proxyProfit/${proxyId}`, method: 'get', params })
+}
+
+// 租户消费统计
+export function getTenantConsumeStatistics(params) {
+  return request({ url: '/admin/statistics/tenantConsume', method: 'get', params })
+}
+
+// 租户消费详情
+export function getTenantDetail(tenantId, params) {
+  return request({ url: `/admin/statistics/tenantDetail/${tenantId}`, method: 'get', params })
+}
+
+// 消费类型统计
+export function getConsumeTypeStatistics(params) {
+  return request({ url: '/admin/statistics/consumeType', method: 'get', params })
+}
+
+// 平台成本汇总
+export function getCostSummary(params) {
+  return request({ url: '/admin/statistics/costSummary', method: 'get', params })
+}
+
+// 平台趋势
+export function getPlatformTrend(params) {
+  return request({ url: '/admin/statistics/trend', method: 'get', params })
+}
+
+// 小时统计
+export function getHourlyStatistics(statDate, dimension) {
+  return request({ url: '/admin/statistics/hourly', method: 'get', params: { statDate, dimension } })
+}
+
+// 服务成本配置
+export function getCostConfigList() {
+  return request({ url: '/admin/statistics/costConfig', method: 'get' })
+}
+
+// 原始消费记录
+export function getConsumeRecords(params) {
+  return request({ url: '/admin/statistics/consumeRecords', method: 'get', params })
+}
+
+// 手动执行统计
+export function executeStatistics(type) {
+  return request({ url: '/admin/statistics/execute', method: 'post', params: { type } })
+}

+ 5 - 0
src/api/admin/storeOrder.js

@@ -0,0 +1,5 @@
+import request from '@/utils/request'
+
+export function listStoreOrder(query) {
+  return request({ url: '/admin/storeOrder/list', method: 'get', params: query })
+}

+ 44 - 0
src/api/admin/sysCompany.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询所有租户列表
+export function listAllCompanies(query) {
+  return request({
+    url: '/admin/company/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 获取租户详情
+export function getCompanyInfo(companyId) {
+  return request({
+    url: '/admin/company/' + companyId,
+    method: 'get'
+  })
+}
+
+// 禁用租户
+export function disableCompany(companyId) {
+  return request({
+    url: '/admin/company/status/' + companyId,
+    method: 'put',
+    params: { status: 1 }
+  })
+}
+
+// 启用租户
+export function enableCompany(companyId) {
+  return request({
+    url: '/admin/company/status/' + companyId,
+    method: 'put',
+    params: { status: 0 }
+  })
+}
+
+// 获取租户统计信息
+export function getStatistics() {
+  return request({
+    url: '/admin/company/statistics',
+    method: 'get'
+  })
+}

+ 61 - 0
src/api/admin/sysUser.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request'
+
+// 查询所有租户员工列表
+export function listAllUsers(query) {
+  return request({
+    url: '/admin/companyUser/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 根据租户ID查询员工列表
+export function listByCompany(companyId) {
+  return request({
+    url: '/admin/companyUser/byCompany/' + companyId,
+    method: 'get'
+  })
+}
+
+// 获取员工详情
+export function getUserInfo(userId) {
+  return request({
+    url: '/admin/companyUser/' + userId,
+    method: 'get'
+  })
+}
+
+// 禁用员工账户
+export function disableUser(userId) {
+  return request({
+    url: '/admin/companyUser/status/' + userId,
+    method: 'put',
+    params: { status: 1 }
+  })
+}
+
+// 启用员工账户
+export function enableUser(userId) {
+  return request({
+    url: '/admin/companyUser/status/' + userId,
+    method: 'put',
+    params: { status: 0 }
+  })
+}
+
+// 查询员工账户变化记录
+export function listChangeLogs(query) {
+  return request({
+    url: '/admin/companyUser/changeList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 获取统计信息
+export function getStatistics() {
+  return request({
+    url: '/admin/companyUser/statistics',
+    method: 'get'
+  })
+}

+ 62 - 0
src/api/adv/advertiser.js

@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+// 分页查询广告商列表
+export function pageAdvertiser(query) {
+  return request({
+    url: '/adv/advertiser/page',
+    method: 'get',
+    params: query
+  })
+}
+
+// 根据ID查询广告商详情
+export function getAdvertiser(id) {
+  return request({
+    url: '/adv/advertiser/' + id,
+    method: 'get'
+  })
+}
+
+// 创建广告商
+export function addAdvertiser(data) {
+  return request({
+    url: '/adv/advertiser',
+    method: 'post',
+    data: data
+  })
+}
+
+// 更新广告商
+export function updateAdvertiser(id, data) {
+  return request({
+    url: '/adv/advertiser/' + id,
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除广告商
+export function delAdvertiser(id) {
+  return request({
+    url: '/adv/advertiser/' + id,
+    method: 'delete'
+  })
+}
+
+// 批量删除广告商
+export function batchDelAdvertiser(ids) {
+  return request({
+    url: '/adv/advertiser/batch',
+    method: 'delete',
+    data: ids
+  })
+}
+
+// 启用/停用广告商
+export function enableAdvertiser(id) {
+  return request({
+    url: '/adv/advertiser/enable/' + id,
+    method: 'post'
+  })
+}
+

+ 70 - 0
src/api/adv/callbackAccount.js

@@ -0,0 +1,70 @@
+import request from '@/utils/request'
+
+// 分页查询回传账号列表
+export function pageCallbackAccount(query) {
+  return request({
+    url: '/adv/callback-account/page',
+    method: 'get',
+    params: query
+  })
+}
+
+// 根据ID查询回传账号详情
+export function getCallbackAccount(id) {
+  return request({
+    url: '/adv/callback-account/' + id,
+    method: 'get'
+  })
+}
+
+// 创建回传账号
+export function addCallbackAccount(data) {
+  return request({
+    url: '/adv/callback-account',
+    method: 'post',
+    data: data
+  })
+}
+
+// 更新回传账号
+export function updateCallbackAccount(id, data) {
+  return request({
+    url: '/adv/callback-account/' + id,
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除回传账号
+export function delCallbackAccount(id) {
+  return request({
+    url: '/adv/callback-account/' + id,
+    method: 'delete'
+  })
+}
+
+// 批量删除回传账号
+export function batchDelCallbackAccount(ids) {
+  return request({
+    url: '/adv/callback-account/batch',
+    method: 'delete',
+    data: ids
+  })
+}
+
+// 查询事件类型
+export function queryEventType(advertiserId) {
+  return request({
+    url: '/adv/callback-account/queryEventType/' + advertiserId,
+    method: 'post'
+  })
+}
+
+// 保存转换事件
+export function saveEventType(id, data) {
+  return request({
+    url: '/adv/callback-account/saveEventType/' + id,
+    method: 'post',
+    data: data
+  })
+}

+ 29 - 0
src/api/adv/channel.js

@@ -0,0 +1,29 @@
+import request from '@/utils/request'
+
+// 查询分组列表
+export function pageProject(data) {
+  return request({
+    url: '/adv/channel/page',
+    method: 'get',
+    params: data
+  })
+}
+
+
+// 新增或更新渠道
+export function addOrUpdateChannel(data) {
+  return request({
+    url: '/adv/channel/addOrUpdate',
+    method: 'post',
+    data: data
+  })
+}
+
+// 批量复制渠道
+export function saveBatchChannel(data) {
+  return request({
+    url: '/adv/channel/saveBatch',
+    method: 'post',
+    data: data
+  })
+}

+ 18 - 0
src/api/adv/configuration.js

@@ -0,0 +1,18 @@
+import request from '@/utils/request'
+
+// 查询配置详情
+export function getConfigDetail() {
+    return request({
+        url: '/adv/config/detail',
+        method: 'get'
+    })
+}
+
+// 新增或修改配置
+export function addOrUpdateConfig(data) {
+    return request({
+        url: '/adv/config/addOrUpdate',
+        method: 'post',
+        data: data
+    })
+}

+ 10 - 0
src/api/adv/conversionLog.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 分页查询回传事件列表
+export function pageConversionLog(query) {
+  return request({
+    url: '/adv/conversion-log/page',
+    method: 'get',
+    params: query
+  })
+}

+ 63 - 0
src/api/adv/domain.js

@@ -0,0 +1,63 @@
+import request from '@/utils/request'
+
+// 分页查询域名列表
+export function pageDomain(query) {
+  return request({
+    url: '/adv/domains/page',
+    method: 'get',
+    params: query
+  })
+}
+
+// 根据ID查询域名详情
+export function getDomain(id) {
+  return request({
+    url: '/adv/domains/' + id,
+    method: 'get'
+  })
+}
+
+// 新增域名
+export function addDomain(data) {
+  return request({
+    url: '/adv/domains',
+    method: 'post',
+    data: data
+  })
+}
+
+// 更新域名
+export function updateDomain(id, data) {
+  return request({
+    url: '/adv/domains/' + id,
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除域名
+export function delDomain(id) {
+  return request({
+    url: '/adv/domains/' + id,
+    method: 'delete'
+  })
+}
+
+// 批量删除域名
+export function batchDelDomain(ids) {
+  return request({
+    url: '/adv/domains/batch',
+    method: 'delete',
+    data: ids
+  })
+}
+
+// 启用/禁用域名
+export function updateDomainStatus(id, status) {
+  return request({
+    url: '/adv/domains/' + id + '/status',
+    method: 'put',
+    params: { status }
+  })
+}
+

+ 73 - 0
src/api/adv/landingPageTemplate.js

@@ -0,0 +1,73 @@
+import request from '@/utils/request'
+
+// 分页查询模板列表
+export function pageTemplate(query) {
+  return request({
+    url: '/adv/landing-page-templates/page',
+    method: 'get',
+    params: query
+  })
+}
+
+
+
+// 根据ID查询模板详情
+export function getTemplate(id) {
+  return request({
+    url: '/adv/landing-page-templates/' + id,
+    method: 'get'
+  })
+}
+
+// 新增模板
+export function addTemplate(data) {
+  return request({
+    url: '/adv/landing-page-templates',
+    method: 'post',
+    data: data
+  })
+}
+
+// 更新模板
+export function updateTemplate(id, data) {
+  return request({
+    url: '/adv/landing-page-templates/' + id,
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除模板
+export function delTemplate(id) {
+  return request({
+    url: '/adv/landing-page-templates/' + id,
+    method: 'delete'
+  })
+}
+
+// 批量删除模板
+export function batchDelTemplate(ids) {
+  return request({
+    url: '/adv/landing-page-templates/batch',
+    method: 'delete',
+    data: ids
+  })
+}
+
+// 启用/禁用模板
+export function updateTemplateStatus(id, status) {
+  return request({
+    url: '/adv/landing-page-templates/enable/' + id,
+    method: 'post',
+    params: { status }
+  })
+}
+
+// 复制模板
+export function copyTemplate(id) {
+  return request({
+    url: '/adv/landing-page-templates/' + id + '/copy',
+    method: 'post'
+  })
+}
+

+ 19 - 0
src/api/adv/project.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 查询项目列表
+export function pageProject(data) {
+  return request({
+    url: '/adv/project/page',
+    method: 'get',
+    params: data
+  })
+}
+
+// 新增项目
+export function addProject(data) {
+  return request({
+    url: '/adv/project/add',
+    method: 'post',
+    data: data
+  })
+}

+ 54 - 0
src/api/adv/promotionAccount.js

@@ -0,0 +1,54 @@
+import request from '@/utils/request'
+
+// 分页查询推广账号列表
+export function pagePromotionAccount(query) {
+  return request({
+    url: '/adv/promotion-account/page',
+    method: 'get',
+    params: query
+  })
+}
+
+// 根据ID查询推广账号详情
+export function getPromotionAccount(id) {
+  return request({
+    url: '/adv/promotion-account/' + id,
+    method: 'get'
+  })
+}
+
+// 创建推广账号
+export function addPromotionAccount(data) {
+  return request({
+    url: '/adv/promotion-account',
+    method: 'post',
+    data: data
+  })
+}
+
+// 更新推广账号
+export function updatePromotionAccount(id, data) {
+  return request({
+    url: '/adv/promotion-account/' + id,
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除推广账号
+export function delPromotionAccount(id) {
+  return request({
+    url: '/adv/promotion-account/' + id,
+    method: 'delete'
+  })
+}
+
+// 批量删除推广账号
+export function batchDelPromotionAccount(ids) {
+  return request({
+    url: '/adv/promotion-account/batch',
+    method: 'delete',
+    data: ids
+  })
+}
+

+ 60 - 0
src/api/adv/site.js

@@ -0,0 +1,60 @@
+import request from '@/utils/request'
+
+// 查询站点列表
+export function listSite() {
+  return request({
+    url: '/adv/site/list',
+    method: 'get'
+  })
+}
+
+// 查询站点详情
+export function getSite(id) {
+  return request({
+    url: '/adv/site/' + id,
+    method: 'get'
+  })
+}
+
+// 创建站点
+export function addSite(data) {
+  return request({
+    url: '/adv/site',
+    method: 'post',
+    data: data
+  })
+}
+
+// 更新站点
+export function updateSite(id, data) {
+  return request({
+    url: '/adv/site/' + id,
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除站点
+export function delSite(id) {
+  return request({
+    url: '/adv/site/' + id,
+    method: 'delete'
+  })
+}
+
+// 查询站点统计数据
+export function getSiteStatistics(id) {
+  return request({
+    url: '/adv/site/' + id + '/statistics',
+    method: 'get'
+  })
+}
+
+// 启用/停用站点
+export function enableSite(id) {
+  return request({
+    url: '/adv/site/enable/' + id,
+    method: 'post'
+  })
+}
+

+ 34 - 0
src/api/adv/siteStatistics.js

@@ -0,0 +1,34 @@
+import request from '@/utils/request'
+
+// 查询站点统计列表
+export function pageSiteStatistics(query) {
+  return request({
+    url: '/adv/site-statistics/page',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询站点统计详情
+export function getSiteStatistics(id) {
+  return request({
+    url: '/adv/site-statistics/' + id,
+    method: 'get'
+  })
+}
+
+// 根据站点ID查询统计
+export function getSiteStatisticsBySiteId(siteId) {
+  return request({
+    url: '/adv/site-statistics/site/' + siteId,
+    method: 'get'
+  })
+}
+
+// 刷新站点统计数据
+export function refreshSiteStatistics(siteId) {
+  return request({
+    url: '/adv/site-statistics/refresh/' + siteId,
+    method: 'post'
+  })
+}

+ 36 - 0
src/api/adv/trackingLink.js

@@ -0,0 +1,36 @@
+import request from '@/utils/request'
+
+// 分页查询监测链接列表
+export function pageTrackingLink(query) {
+  return request({
+    url: '/adv/tracking-link/page',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询所有监测链接列表(不分页)
+export function listTrackingLink(query) {
+  return request({
+    url: '/adv/tracking-link/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 根据ID查询监测链接详情
+export function getTrackingLink(id) {
+  return request({
+    url: '/adv/tracking-link/' + id,
+    method: 'get'
+  })
+}
+
+// 根据广告商ID查询监测链接列表
+export function getTrackingLinkByAdvertiser(advertiserId) {
+  return request({
+    url: '/adv/tracking-link/advertiser/' + advertiserId,
+    method: 'get'
+  })
+}
+

+ 53 - 0
src/api/aiSipCall/aiSipCallBizGroup.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询aiSIP外呼技能组列表
+export function listAiSipCallBizGroup(query) {
+  return request({
+    url: '/company/aiSipCall/bizGroup/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询aiSIP外呼技能组详细
+export function getAiSipCallBizGroup(groupId) {
+  return request({
+    url: '/company/aiSipCall/bizGroup/' + groupId,
+    method: 'get'
+  })
+}
+
+// 新增aiSIP外呼技能组
+export function addAiSipCallBizGroup(data) {
+  return request({
+    url: '/company/aiSipCall/bizGroup',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改aiSIP外呼技能组
+export function updateAiSipCallBizGroup(data) {
+  return request({
+    url: '/company/aiSipCall/bizGroup',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除aiSIP外呼技能组
+export function delAiSipCallBizGroup(groupId) {
+  return request({
+    url: '/company/aiSipCall/bizGroup/' + groupId,
+    method: 'delete'
+  })
+}
+
+// 导出aiSIP外呼技能组
+export function exportAiSipCallBizGroup(query) {
+  return request({
+    url: '/company/aiSipCall/bizGroup/export',
+    method: 'get',
+    params: query
+  })
+}

+ 62 - 0
src/api/aiSipCall/aiSipCallGateway.js

@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+// 查询aiSIP外呼网关列表
+export function listAiSipCallGateway(query) {
+    return request({
+        url: '/company/aiSipCall/gateway/list',
+        method: 'get',
+        params: query
+    })
+}
+
+// 查询aiSIP外呼网关列表
+export function remoteList(data) {
+    return request({
+        url: '/company/aiSipCall/gateway/remoteList',
+        method: 'post',
+        data: data
+    })
+}
+
+// 查询aiSIP外呼网关详细
+export function getAiSipCallGateway(id) {
+    return request({
+        url: '/company/aiSipCall/gateway/' + id,
+        method: 'get'
+    })
+}
+
+// 新增aiSIP外呼网关
+export function addAiSipCallGateway(data) {
+    return request({
+        url: '/company/aiSipCall/gateway',
+        method: 'post',
+        data: data
+    })
+}
+
+// 修改aiSIP外呼网关
+export function updateAiSipCallGateway(data) {
+    return request({
+        url: '/company/aiSipCall/gateway',
+        method: 'put',
+        data: data
+    })
+}
+
+// 删除aiSIP外呼网关
+export function delAiSipCallGateway(id) {
+    return request({
+        url: '/company/aiSipCall/gateway/' + id,
+        method: 'delete'
+    })
+}
+
+// 导出aiSIP外呼网关
+export function exportAiSipCallGateway(query) {
+    return request({
+        url: '/company/aiSipCall/gateway/export',
+        method: 'get',
+        params: query
+    })
+}

+ 53 - 0
src/api/aiSipCall/aiSipCallLlmAgentAccount.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询aiSIP外呼大模型列表
+export function listAiSipCallLlmAgentAccount(query) {
+  return request({
+    url: '/company/aiSipCall/llmAgentAccount/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询aiSIP外呼大模型详细
+export function getAiSipCallLlmAgentAccount(id) {
+  return request({
+    url: '/company/aiSipCall/llmAgentAccount/' + id,
+    method: 'get'
+  })
+}
+
+// 新增aiSIP外呼大模型
+export function addAiSipCallLlmAgentAccount(data) {
+  return request({
+    url: '/company/aiSipCall/llmAgentAccount',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改aiSIP外呼大模型
+export function updateAiSipCallLlmAgentAccount(data) {
+  return request({
+    url: '/company/aiSipCall/llmAgentAccount',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除aiSIP外呼大模型
+export function delAiSipCalllLlmAgentAccount(id) {
+  return request({
+    url: '/company/aiSipCall/llmAgentAccount/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出aiSIP外呼大模型
+export function exportAiSipCallLlmAgentAccount(query) {
+  return request({
+    url: '/company/aiSipCall/llmAgentAccount/export',
+    method: 'get',
+    params: query
+  })
+}

+ 88 - 0
src/api/aiSipCall/aiSipCallOutboundCdr.js

@@ -0,0 +1,88 @@
+import request from '@/utils/request'
+
+// 查询aiSIP手动外呼通话记录列表
+export function listOutboundCdr(query) {
+  return request({
+    url: '/company/aiSipCall/outboundCdr/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询aiSIP手动外呼通话记录详细
+export function getOutboundCdr(id) {
+  return request({
+    url: '/company/aiSipCall/outboundCdr/' + id,
+    method: 'get'
+  })
+}
+
+// 新增aiSIP手动外呼通话记录
+export function addOutboundCdr(data) {
+  return request({
+    url: '/company/aiSipCall/outboundCdr',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改aiSIP手动外呼通话记录
+export function updateOutboundCdr(data) {
+  return request({
+    url: '/company/aiSipCall/outboundCdr',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除aiSIP手动外呼通话记录
+export function delOutboundCdr(id) {
+  return request({
+    url: '/company/aiSipCall/outboundCdr/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出aiSIP手动外呼通话记录
+export function exportOutboundCdr(query) {
+  return request({
+    url: '/company/aiSipCall/outboundCdr/export',
+    method: 'get',
+    params: query
+  })
+}
+// 取手动外呼客户沟通信息
+export function getCustCommunicationInfo(phoneNum,callType,uuid) {
+  return request({
+    url: '/company/aiSipCall/outboundCdr/getCustCommunicationInfo?phoneNum=' +  phoneNum + "&callType=" + callType + "&uuid=" + uuid,
+    method: 'get'
+  })
+}
+
+// 新增保存手动外呼沟通记录
+export function addCustcallrecord(data) {
+  return request({
+    url: '/company/aiSipCall/outboundCdr/add/custcallrecord',
+    method: 'post',
+    data: data
+  })
+}
+// 手动同步人工外呼通话记录
+export function manualPull() {
+  return request({
+    url: '/company/aiSipCall/outboundCdr/manualPull',
+    method: 'get'
+  })
+}
+
+/**
+ * 根据 uuid 同步通话记录
+ */
+export function syncByUuid(data) {
+    return request({
+        url: '/company/aiSipCall/outboundCdr/syncByUuid',
+        method: 'post',
+        data: data
+    })
+}
+

+ 61 - 0
src/api/aiSipCall/aiSipCallPhone.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request'
+
+// 查询aiSIP外呼通话记录列表
+export function listAiSipCallPhone(query) {
+  return request({
+    url: '/company/aiSipCall/phone/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询aiSIP外呼通话记录详细
+export function getAiSipCallPhone(id) {
+  return request({
+    url: '/company/aiSipCall/phone/' + id,
+    method: 'get'
+  })
+}
+
+// 新增aiSIP外呼通话记录
+export function addAiSipCallPhone(data) {
+  return request({
+    url: '/company/aiSipCall/phone',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改aiSIP外呼通话记录
+export function updateAiSipCallPhone(data) {
+  return request({
+    url: '/company/aiSipCall/phone',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除aiSIP外呼通话记录
+export function delAiSipCallPhone(id) {
+  return request({
+    url: '/company/aiSipCall/phone/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出aiSIP外呼通话记录
+export function exportAiSipCallPhone(query) {
+  return request({
+    url: '/company/aiSipCall/phone/export',
+    method: 'get',
+    params: query
+  })
+}
+// 同步aiSIP外呼通话记录
+export function manualPull() {
+  return request({
+    url: '/company/aiSipCall/phone/manualPull',
+    method: 'get'
+  })
+}
+

+ 86 - 0
src/api/aiSipCall/aiSipCallTask.js

@@ -0,0 +1,86 @@
+import request from '@/utils/request'
+
+// 查询aiSIP外呼任务列表
+export function listAiSipCallTask(query) {
+  return request({
+    url: '/company/aiSipCall/task/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询aiSIP外呼任务详细
+export function getAiSipCallTask(batchId) {
+  return request({
+    url: '/company/aiSipCall/task/' + batchId,
+    method: 'get'
+  })
+}
+
+// 新增aiSIP外呼任务
+export function addAiSipCallTask(data) {
+  return request({
+    url: '/company/aiSipCall/task',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改aiSIP外呼任务
+export function updateAiSipCallTask(data) {
+  return request({
+    url: '/company/aiSipCall/task',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除aiSIP外呼任务
+export function delAiSipCallTask(batchId) {
+  return request({
+    url: '/company/aiSipCall/task/' + batchId,
+    method: 'delete'
+  })
+}
+
+// 导出aiSIP外呼任务
+export function exportAiSipCallTask(query) {
+  return request({
+    url: '/company/aiSipCall/task/export',
+    method: 'get',
+    params: query
+  })
+}
+// 启动aiSIP外呼任务
+export function startTask(batchId) {
+  return request({
+    url: '/company/aiSipCall/task/startTask/' + batchId,
+    method: 'post'
+  })
+}
+// 暂停aiSIP外呼任务
+export function stopTask(batchId) {
+  return request({
+    url: '/company/aiSipCall/task/stopTask/' + batchId,
+    method: 'post'
+  })
+}
+// 公共导入数据
+export function commonImportExcel(data) {
+  return request({
+    url: '/company/aiSipCall/task/common/importExcel',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': undefined
+    }
+  })
+}
+// 下载aiSIP外呼模板
+export function downloadTemplateByType(type) {
+  return request({
+    url: '/company/aiSipCall/task/download/template/' + type,
+    method: 'get',
+    responseType: 'blob'
+  })
+}

+ 77 - 0
src/api/aiSipCall/aiSipCallUser.js

@@ -0,0 +1,77 @@
+import request from '@/utils/request'
+
+// 查询sip用户信息列表
+export function listAiSipCallUser(query) {
+  return request({
+    url: '/company/aiSipCall/aiSipCallUser/list',
+    method: 'get',
+    params: query
+  })
+}
+// 查询sip用户信息列表
+export function myCallUser(query) {
+  return request({
+    url: '/company/aiSipCall/aiSipCallUser/myCallUser',
+    method: 'get',
+    params: query
+  })
+}
+// 查询sip用户信息详细
+export function getAiSipCallUser(userId) {
+  return request({
+    url: '/company/aiSipCall/aiSipCallUser/' + userId,
+    method: 'get'
+  })
+}
+
+// 新增sip用户信息
+export function addAiSipCallUser(data) {
+  return request({
+    url: '/company/aiSipCall/aiSipCallUser',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改sip用户信息
+export function updateAiSipCallUser(data) {
+  return request({
+    url: '/company/aiSipCall/aiSipCallUser',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除sip用户信息
+export function delAiSipCallUser(userId) {
+  return request({
+    url: '/company/aiSipCall/aiSipCallUser/' + userId,
+    method: 'delete'
+  })
+}
+
+// 导出sip用户信息
+export function exportAiSipCallUser(query) {
+  return request({
+    url: '/company/aiSipCall/aiSipCallUser/export',
+    method: 'get',
+    params: query
+  })
+}
+// 获取未绑定的分机列表
+export function getUnBindExtnum(query) {
+  return request({
+    url: '/company/aiSipCall/aiSipCallUser/getUnBindExtnum',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询aiSIP工具条基础配置参数
+export function getToolbarBasicParam(data) {
+    return request({
+        url: '/company/aiSipCall/aiSipCallUser/getToolbarBasicParam',
+        method: 'post',
+        data: data
+    })
+}

+ 53 - 0
src/api/aiSipCall/aiSipCallVoiceTtsAliyun.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询aiSIP外呼阿里云音色列表
+export function listAiSipCallVoiceTtsAliyun(query) {
+  return request({
+    url: '/company/aiSipCall/voiceTtsAliyun/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询aiSIP外呼阿里云音色详细
+export function getAiSipCallVoiceTtsAliyun(id) {
+  return request({
+    url: '/company/aiSipCall/voiceTtsAliyun/' + id,
+    method: 'get'
+  })
+}
+
+// 新增aiSIP外呼阿里云音色
+export function addAiSipCallVoiceTtsAliyun(data) {
+  return request({
+    url: '/company/aiSipCall/voiceTtsAliyun',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改aiSIP外呼阿里云音色
+export function updateAiSipCallVoiceTtsAliyun(data) {
+  return request({
+    url: '/company/aiSipCall/voiceTtsAliyun',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除aiSIP外呼阿里云音色
+export function delAiSipCallVoiceTtsAliyun(id) {
+  return request({
+    url: '/company/aiSipCall/voiceTtsAliyun/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出aiSIP外呼阿里云音色
+export function exportAiSipCallVoiceTtsAliyun(query) {
+  return request({
+    url: '/company/aiSipCall/voiceTtsAliyun/export',
+    method: 'get',
+    params: query
+  })
+}

+ 1 - 9
src/api/bill/billLog.js

@@ -16,14 +16,6 @@ export function getBillLog(id) {
     method: 'get'
   })
 }
-// 查询订单开票记录详细
-export function reopen(id) {
-  return request({
-    url: '/bill/billLog/reopen',
-    method: 'get',
-    params: {id}
-  })
-}
 
 // 新增订单开票记录
 export function addBillLog(data) {
@@ -58,4 +50,4 @@ export function exportBillLog(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 31 - 0
src/api/billing/wallet.js

@@ -0,0 +1,31 @@
+import request from '@/utils/request'
+
+export function getMyWallet() {
+  return request({
+    url: '/company/balance/my',
+    method: 'get'
+  })
+}
+
+export function getMyBillingDetails(params) {
+  return request({
+    url: '/api/fee/billing/detail/my',
+    method: 'get',
+    params
+  })
+}
+
+export function getMyConsumeRecords(params) {
+  return request({
+    url: '/company/consumeRecord/myList',
+    method: 'get',
+    params
+  })
+}
+
+export function getMyBalance() {
+  return request({
+    url: '/company/balance/my',
+    method: 'get'
+  })
+}

+ 53 - 0
src/api/callRecord/callRecord.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询外呼记录质检列表
+export function listApi(query) {
+  return request({
+    url: '/callRecord/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询外呼记录质检详细
+export function getApi(id) {
+  return request({
+    url: '/callRecord/' + id,
+    method: 'get'
+  })
+}
+
+// 新增外呼记录质检
+export function addApi(data) {
+  return request({
+    url: '/callRecord',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改外呼记录质检
+export function updateApi(data) {
+  return request({
+    url: '/callRecord',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除外呼记录质检
+export function delApi(id) {
+  return request({
+    url: '/callRecord/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出外呼记录质检
+export function exportApi(query) {
+  return request({
+    url: '/callRecord/export',
+    method: 'post',
+    params: query
+  })
+}

+ 1 - 1
src/api/chat/chatDataset.js

@@ -50,4 +50,4 @@ export function exportChatDataset(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 1 - 1
src/api/chat/chatDatasetFile.js

@@ -50,4 +50,4 @@ export function exportChatDatasetFile(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 1 - 1
src/api/chat/chatKeyword.js

@@ -50,4 +50,4 @@ export function exportChatKeyword(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 1 - 1
src/api/chat/chatMsg.js

@@ -50,4 +50,4 @@ export function exportChatMsg(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 1 - 1
src/api/chat/chatMsgLogs.js

@@ -58,4 +58,4 @@ export function exportChatMsgLogs(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 1 - 11
src/api/chat/chatRole.js

@@ -59,14 +59,4 @@ export function exportChatRole(query) {
     method: 'get',
     params: query
   })
-}
-
-
-export function getAllAiRoleList(query) {
-  return request({
-    url: '/fastGpt/fastGptRole/getAllRoleList',
-    method: 'get',
-    params: query
-  })
-}
-
+}

+ 1 - 1
src/api/chat/chatSession.js

@@ -50,4 +50,4 @@ export function exportChatSession(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 2 - 1
src/api/chat/chatUpload.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 
-
+ 
 export function getUrl(data) {
   return request({
     url: '/chat/upload/getUrl',
@@ -8,3 +8,4 @@ export function getUrl(data) {
     data: data
   })
 }
+ 

+ 1 - 1
src/api/chat/chatUser.js

@@ -50,4 +50,4 @@ export function exportChatUser(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 8 - 42
src/api/common.js

@@ -1,52 +1,17 @@
 import request from '@/utils/request'
 
-
-export function getTask(taskId) {
+export function sendSmsCode(data) {
   return request({
-    url: '/common/getTask/'+taskId,
-    method: 'get'
-  })
-}
-
-export function getSignature() {
-    return request({
-      url: '/common/getSignature',
-      method: 'post',
-    })
-  }
-
-export function uploadHuaWeiVod(file) {
-  const formData = new FormData();
-  formData.append('file', file);
-
-  return request({
-    url: '/hwcloud/uploadHuaWeiVod',
+    url: '/common/sendSmsCode',
     method: 'post',
-    data: formData,
-    headers: {
-      'Content-Type': 'multipart/form-data'
-    }
-  });
-}
-
-export function uploadHuaWeiObs(file, progressCallback) {
-  const formData = new FormData();
-  formData.append('file', file);
-  return request({
-    url: '/hwcloud/uploadHuaWeiObs',
-    method: 'post',
-    data: formData,
-    headers: {
-      'Content-Type': 'multipart/form-data'
-    }
-  });
+    data: data
+  })
 }
 
-export function cdnStatistics(query) {
+export function getTask(taskId) {
   return request({
-    url: '/hwcloud/cdnStatistics',
-    method: 'get',
-    params:query
+    url: '/common/getTask/'+taskId,
+    method: 'get'
   })
 }
 
@@ -56,4 +21,5 @@ export function getTmpSecretKey(query) {
     method: 'get',
     params:query
   })
+
 }

+ 1 - 1
src/api/company/VoiceRoboticWx.js

@@ -50,4 +50,4 @@ export function exportVoiceRoboticWx(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 76 - 0
src/api/company/addwx.js

@@ -0,0 +1,76 @@
+import request from '@/utils/request'
+
+export function listAddwx(query) {
+  return request({
+    url: '/company/addwxLog/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function listAllAddWx(query) {
+  return request({
+    url: '/company/addwxLog/listAll',
+    method: 'get',
+    params: query
+  })
+}
+
+export function exportAddwx(query) {
+  return request({
+    url: '/company/addwxLog/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 删除调用日志_加微信
+export function delCompanyClient(logId) {
+  return request({
+    url: '/company/addwxLog/' + logId,
+    method: 'delete'
+  })
+}
+
+// // 查询调用日志_加微信详细
+// export function getAddwx(logId) {
+//   return request({
+//     url: '/company/addwx/' + logId,
+//     method: 'get'
+//   })
+// }
+
+// // 新增调用日志_加微信
+// export function addAddwx(data) {
+//   return request({
+//     url: '/company/addwx',
+//     method: 'post',
+//     data: data
+//   })
+// }
+
+// // 修改调用日志_加微信
+// export function updateAddwx(data) {
+//   return request({
+//     url: '/company/addwx',
+//     method: 'put',
+//     data: data
+//   })
+// }
+
+// // 删除调用日志_加微信
+// export function delAddwx(logId) {
+//   return request({
+//     url: '/company/addwx/' + logId,
+//     method: 'delete'
+//   })
+// }
+
+// // 导出调用日志_加微信
+// export function exportAddwx(query) {
+//   return request({
+//     url: '/company/addwx/export',
+//     method: 'get',
+//     params: query
+//   })
+// }

+ 8 - 0
src/api/company/aiCall.js

@@ -0,0 +1,8 @@
+import request from '@/utils/request'
+
+export function all() {
+    return request({
+        url: '/aicall/kbcat/all',
+        method: 'get'
+    })
+}

+ 49 - 0
src/api/company/aiModel.js

@@ -0,0 +1,49 @@
+import request from '@/utils/request'
+
+export function list(data) {
+    return request({
+        url: '/aicall/account/list',
+        method: 'post',
+        data: data
+    })
+}
+
+
+export function add(data) {
+    return request({
+        url: '/aicall/account/add',
+        method: 'post',
+        data: data
+    })
+}
+
+export function update(data) {
+    return request({
+        url: '/aicall/account/edit',
+        method: 'post',
+        data: data
+    })
+}
+
+
+export function remove(ids) {
+    return request({
+        url: '/aicall/account/remove',
+        method: 'post',
+        params: { ids: ids }
+    })
+}
+
+export function copy(id) {
+    return request({
+        url: `/aicall/account/copy/${id}`,
+        method: 'get'
+    })
+}
+
+export function getCidConfig() {
+    return request({
+        url: '/aicall/account/getCidConfig',
+        method: 'get'
+    })
+}

+ 105 - 0
src/api/company/aiModel/inboundCallManage.js

@@ -0,0 +1,105 @@
+import request from '@/utils/request'
+
+// 查询呼入配置列表
+export function listAimodelInboundcallmanage(query) {
+  return request({
+    url: '/company/ai_model/inbound_call_manage/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询呼入配置详细
+export function getAimodelInboundcallmanage(id) {
+  return request({
+    url: '/company/ai_model/inbound_call_manage/' + id,
+    method: 'get'
+  })
+}
+
+// 新增呼入配置
+export function addAimodelInboundcallmanage(data) {
+  return request({
+    url: '/company/ai_model/inbound_call_manage',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改呼入配置
+export function updateAimodelInboundcallmanage(data) {
+  return request({
+    url: '/company/ai_model/inbound_call_manage',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除呼入配置
+export function delAimodelInboundcallmanage(id) {
+  return request({
+    url: '/company/ai_model/inbound_call_manage/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出呼入配置
+export function exportAimodelInboundcallmanage(query) {
+  return request({
+    url: '/company/ai_model/inbound_call_manage/export',
+    method: 'post',
+    params: query
+  })
+}
+
+// 查询呼入记录列表
+export function listInboundcallmanageInboundcallrecord(query) {
+  return request({
+    url: '/company/ai_model/inbound_call_manage/record/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询呼入记录详细
+export function getInboundcallmanageInboundcallrecord(id) {
+  return request({
+    url: '/company/ai_model/inbound_call_manage/record/' + id,
+    method: 'get'
+  })
+}
+
+// 新增呼入记录
+export function addInboundcallmanageInboundcallrecord(data) {
+  return request({
+    url: '/company/ai_model/inbound_call_manage/record',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改呼入记录
+export function updateInboundcallmanageInboundcallrecord(data) {
+  return request({
+    url: '/company/ai_model/inbound_call_manage/record',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除呼入记录
+export function delInboundcallmanageInboundcallrecord(id) {
+  return request({
+    url: '/company/ai_model/inbound_call_manage/record/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出呼入记录
+export function exportInboundcallmanageInboundcallrecord(query) {
+  return request({
+    url: '/company/ai_model/inbound_call_manage/record/export',
+    method: 'post',
+    params: query
+  })
+}

+ 8 - 0
src/api/company/aiProvider.js

@@ -0,0 +1,8 @@
+import request from '@/utils/request'
+
+export function all() {
+    return request({
+        url: '/aicall/provider/all',
+        method: 'get'
+    })
+}

+ 43 - 0
src/api/company/aiWorkflow.js

@@ -0,0 +1,43 @@
+import request from '@/utils/request'
+
+/**
+ * 获取我的节点语音列表(分页)
+ * @param {Object} query - 查询参数
+ * @param {number} query.pageNum - 页码
+ * @param {number} query.pageSize - 每页数量
+ * @param {string} query.workflowName - 工作流名称(可选)
+ * @param {string} query.nodeName - 节点名称(可选)
+ * @param {string} query.nodeType - 节点类型(可选)
+ */
+export function getMyNodes(query) {
+  return request({
+    url: '/company/aiWorkflow/myNodes',
+    method: 'get',
+    params: query
+  })
+}
+
+/**
+ * 上传节点语音
+ * @param {Object} data - 上传数据
+ * @param {number} data.nodeId - 节点ID
+ * @param {string} data.voiceUrl - 语音URL
+ */
+export function uploadNodeVoice(data) {
+  return request({
+    url: '/company/aiWorkflow/uploadVoice',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 删除节点语音
+ * @param {number} nodeId - 节点ID
+ */
+export function deleteNodeVoice(nodeId) {
+  return request({
+    url: '/company/aiWorkflow/deleteVoice/' + nodeId,
+    method: 'delete'
+  })
+}

+ 47 - 0
src/api/company/approval.js

@@ -0,0 +1,47 @@
+import request from '@/utils/request'
+
+export function listSystemApproval(query) {
+  return request({
+    url: '/system/approval/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getSystemApproval(id) {
+  return request({
+    url: '/system/approval/' + id,
+    method: 'get'
+  })
+}
+
+export function addSystemApproval(data) {
+  return request({
+    url: '/system/approval',
+    method: 'post',
+    data: data
+  })
+}
+
+export function updateSystemApproval(data) {
+  return request({
+    url: '/system/approval',
+    method: 'put',
+    data: data
+  })
+}
+
+export function delSystemApproval(id) {
+  return request({
+    url: '/system/approval/' + id,
+    method: 'delete'
+  })
+}
+
+export function exportSystemApproval(query) {
+  return request({
+    url: '/system/approval/export',
+    method: 'post',
+    params: query
+  })
+}

+ 88 - 0
src/api/company/callphone.js

@@ -0,0 +1,88 @@
+import request from '@/utils/request'
+
+// 查询调用日志_ai打电话列表
+export function listCallphone(query) {
+  return request({
+    url: '/company/callphoneLog/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function groupList(query) {
+    return request({
+        url: '/company/callphoneLog/groupList',
+        method: 'get',
+        params: query
+    })
+}
+
+// 查询调用日志_ai打电话详细
+export function listCallPhoneByRoboticId(query) {
+    return request({
+        url: '/company/callphoneLog/listByCallerIdAndRoboticId',
+        method: 'get',
+        params: query
+    })
+}
+
+
+// 获取统计数据
+export function getCallPhoneLogCount() {
+    return request({
+        url: '/company/callphoneLog/count',
+        method: 'get'
+    })
+}
+
+// 导出调用日志_ai打电话
+export function exportCallphone(query) {
+    return request({
+        url: '/company/callphoneLog/export',
+        method: 'get',
+        params: query
+    })
+}
+
+// // 查询调用日志_ai打电话详细
+// export function getCallphone(logId) {
+//   return request({
+//     url: '/company/callphone/' + logId,
+//     method: 'get'
+//   })
+// }
+
+// // 新增调用日志_ai打电话
+// export function addCallphone(data) {
+//   return request({
+//     url: '/company/callphone',
+//     method: 'post',
+//     data: data
+//   })
+// }
+
+// // 修改调用日志_ai打电话
+// export function updateCallphone(data) {
+//   return request({
+//     url: '/company/callphone',
+//     method: 'put',
+//     data: data
+//   })
+// }
+
+// // 删除调用日志_ai打电话
+// export function delCallphone(logId) {
+//   return request({
+//     url: '/company/callphone/' + logId,
+//     method: 'delete'
+//   })
+// }
+
+// // 导出调用日志_ai打电话
+// export function exportCallphone(query) {
+//   return request({
+//     url: '/company/callphone/export',
+//     method: 'get',
+//     params: query
+//   })
+// }

+ 14 - 91
src/api/company/company.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 
-// 查询企业列表
+
 export function listCompany(query) {
   return request({
     url: '/company/company/list',
@@ -8,64 +8,25 @@ export function listCompany(query) {
     params: query
   })
 }
-
-export function allList(query) {
+export function getCompanyInfo() {
   return request({
-    url: '/company/company/allList',
-    method: 'get',
-    params: query
-  })
-}
-// 查询企业详细
-export function getCompany(companyId) {
-  return request({
-    url: '/company/company/' + companyId,
+    url: '/company/company/getCompanyInfo',
     method: 'get'
   })
 }
-
-// 新增企业
-export function addCompany(data) {
-  return request({
-    url: '/company/company',
-    method: 'post',
-    data: data
-  })
-}
-export function resetPwd(companyId) {
+export function getCompanyVoice() {
   return request({
-    url: '/company/company/resetPwd/'+companyId,
-    method: 'post'
+    url: '/company/company/getCompanyVoice',
+    method: 'get'
   })
 }
-
-
-
-// 修改企业
-export function updateCompany(data) {
+export function getCompanySms() {
   return request({
-    url: '/company/company',
-    method: 'put',
-    data: data
+    url: '/company/company/getCompanySms',
+    method: 'get'
   })
 }
 
-// 删除企业
-export function delCompany(companyId) {
-  return request({
-    url: '/company/company/' + companyId,
-    method: 'delete'
-  })
-}
-
-// 导出企业
-export function exportCompany(query) {
-  return request({
-    url: '/company/company/export',
-    method: 'get',
-    params: query
-  })
-}
 
 export function getCompanyList() {
   return request({
@@ -73,56 +34,18 @@ export function getCompanyList() {
     method: 'get'
   })
 }
-export function recharge(data) {
-  return request({
-    url: '/company/company/recharge',
-    method: 'post',
-    data: data
-  })
-}
-export function deduct(data) {
-  return request({
-    url: '/company/company/deduct',
-    method: 'post',
-    data: data
-  })
-}
 
-
-
-// 查询企业列表
-export function crmDayCountlist(query) {
-  return request({
-    url: '/company/company/crmDayCountlist',
-    method: 'get',
-    params: query
-  })
-}
-
-//查询区域
-export function getCitysArea(query) {
+export function allList(query) {
   return request({
-    url: '/his/city/getCitysArea',
+    url: '/company/company/allList',
     method: 'get',
     params: query
   })
 }
 
-// 批量修改公司显示状态
-export function batchUpdateCompanyLiveShow(data) {
-  return request({
-    url: '/company/company/batchUpdateLiveShow',
-    method: 'post',
-    data: data
-  })
-}
-
-// 查询企业列表
-export function liveShowList(query) {
+export function getCompanyListByCorId(corId) {
   return request({
-    url: '/company/company/liveShowList',
-    method: 'get',
-    params: query
+    url: '/company/company/getCompanyListByCorId/' + corId,
+    method: 'get'
   })
 }
-

+ 56 - 0
src/api/company/companyAccount.js

@@ -68,3 +68,59 @@ export function exportCompanyAccount(query) {
     params: query
   })
 }
+// 导出个微账号
+export function getWxQrCode(query) {
+  return request({
+    url: '/company/companyWx/getWxQrCode',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导出个微账号
+export function getLoginStatus(query) {
+  return request({
+    url: '/company/companyWx/getLoginStatus',
+    method: 'get',
+    params: query
+  })
+}
+// 导出个微账号
+export function bindService(query) {
+  return request({
+    url: '/company/companyWx/bindService',
+    method: 'get',
+    params: query
+  })
+}
+// 导出个微账号
+export function wakeUpLogin(query) {
+  return request({
+    url: '/company/companyWx/wakeUpLogin',
+    method: 'get',
+    params: query
+  })
+}
+// 导出个微账号
+export function updateWxInfo(query) {
+  return request({
+    url: '/company/companyWx/updateWxInfo',
+    method: 'get',
+    params: query
+  })
+}
+// 导出个微账号
+export function wxLoginOut(query) {
+  return request({
+    url: '/company/companyWx/wxLoginOut',
+    method: 'get',
+    params: query
+  })
+}
+export function syncWx(query) {
+  return request({
+    url: '/company/companyWx/syncWx',
+    method: 'get',
+    params: query
+  })
+}

+ 27 - 0
src/api/company/companyApply.js

@@ -0,0 +1,27 @@
+import request from '@/utils/request'
+
+// 查询更换会员归属申请列表
+export function listApply(query) {
+  return request({
+    url: '/company/apply/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询更换会员归属申请详细
+export function getApply(id) {
+  return request({
+    url: '/company/apply/' + id,
+    method: 'get'
+  })
+}
+
+// 审核更换会员归属申请
+export function auditApply(data) {
+  return request({
+    url: '/company/apply/audit',
+    method: 'post',
+    data: data
+  })
+}

+ 24 - 30
src/api/company/companyConfig.js

@@ -1,60 +1,54 @@
 import request from '@/utils/request'
 
-// 查询参数配置列表
-export function listCompanyConfig(query) {
-  return request({
-    url: '/company/companyConfig/list',
-    method: 'get',
-    params: query
-  })
-}
 
-export function getConfigByKey(configKey) {
+
+// 根据参数键名查询参数值
+export function getConfigKey(configKey) {
   return request({
-    url: '/company/companyConfig/getConfigByKey/' + configKey,
+    url: '/company/companyConfig/configKey/' + configKey,
     method: 'get'
   })
 }
 
-// 查询参数配置详细
-export function getCompanyConfig(configId) {
+export function getConfigByKey(configKey) {
   return request({
-    url: '/company/companyConfig/' + configId,
+    url: '/company/companyConfig/getConfigByKey/' + configKey,
     method: 'get'
   })
 }
 
-// 新增参数配置
-export function addCompanyConfig(data) {
+// 修改参数配置
+export function updateConfig(data) {
   return request({
     url: '/company/companyConfig',
-    method: 'post',
+    method: 'put',
     data: data
   })
 }
 
-// 修改参数配置
-export function updateCompanyConfig(data) {
+//配置公司默认是否开启小黑屋
+export function configUserCheck(data) {
   return request({
-    url: '/company/companyConfig',
-    method: 'put',
-    data: data
+    url: '/company/company/configUserCheck',
+    method: 'post',
+    params: data
   })
 }
 
-// 删除参数配置
-export function delCompanyConfig(configId) {
+export function getCompanyMiniAppList() {
   return request({
-    url: '/company/companyConfig/' + configId,
-    method: 'delete'
+    url: '/company/companyConfig/getCompanyMiniAppList',
+    method: 'get'
   })
 }
 
-// 导出参数配置
-export function exportCompanyConfig(query) {
+export function saveCompanyMiniApp(data) {
   return request({
-    url: '/company/companyConfig/export',
-    method: 'get',
-    params: query
+    url: '/company/companyConfig/saveCompanyMiniApp',
+    method: 'post',
+    data: data
   })
 }
+
+
+

+ 39 - 25
src/api/company/companyDept.js

@@ -1,7 +1,7 @@
 import request from '@/utils/request'
 
 // 查询部门列表
-export function listCompanyDept(query) {
+export function listDept(query) {
   return request({
     url: '/company/companyDept/list',
     method: 'get',
@@ -9,16 +9,47 @@ export function listCompanyDept(query) {
   })
 }
 
+// 查询部门列表(排除节点)
+export function listDeptExcludeChild(deptId) {
+  return request({
+    url: '/company/companyDept/list/exclude/' + deptId,
+    method: 'get'
+  })
+}
+
 // 查询部门详细
-export function getCompanyDept(deptId) {
+export function getDept(deptId) {
   return request({
     url: '/company/companyDept/' + deptId,
     method: 'get'
   })
 }
 
+// 查询部门下拉树结构
+export function treeselect() {
+  return request({
+    url: '/company/companyDept/treeselect',
+    method: 'get'
+  })
+}
+
+export function myDeptTreeselect() {
+  return request({
+    url: '/company/companyDept/myDeptTreeselect',
+    method: 'get'
+  })
+}
+
+// 根据角色ID查询部门树结构
+export function roleDeptTreeselect(roleId) {
+  return request({
+    url: '/company/companyDept/roleDeptTreeselect/' + roleId,
+    method: 'get'
+  })
+}
+
 // 新增部门
-export function addCompanyDept(data) {
+export function addDept(data) {
   return request({
     url: '/company/companyDept',
     method: 'post',
@@ -27,7 +58,7 @@ export function addCompanyDept(data) {
 }
 
 // 修改部门
-export function updateCompanyDept(data) {
+export function updateDept(data) {
   return request({
     url: '/company/companyDept',
     method: 'put',
@@ -36,34 +67,17 @@ export function updateCompanyDept(data) {
 }
 
 // 删除部门
-export function delCompanyDept(deptId) {
+export function delDept(deptId) {
   return request({
     url: '/company/companyDept/' + deptId,
     method: 'delete'
   })
 }
 
-// 导出部门
-export function exportCompanyDept(query) {
-  return request({
-    url: '/company/companyDept/export',
-    method: 'get',
-    params: query
-  })
-}
-
-export function treeselect(query) {
-  return request({
-    url: '/company/companyDept/treeselect',
-    method: 'get',
-    params: query
-  })
-}
 
-export function treeselectByCompanyId(query) {
+export function allTreeselect() {
   return request({
-    url: '/company/companyDept/treeselectByCompanyId/' + query,
-    method: 'get',
-    params: query
+    url: '/company/companyDept/allTreeselect',
+    method: 'get'
   })
 }

+ 27 - 30
src/api/company/companyMenu.js

@@ -1,7 +1,7 @@
 import request from '@/utils/request'
 
-// 查询菜单权限列表
-export function listCompanyMenu(query) {
+// 查询菜单列表
+export function listMenu(query) {
   return request({
     url: '/company/companyMenu/list',
     method: 'get',
@@ -9,55 +9,52 @@ export function listCompanyMenu(query) {
   })
 }
 
-// 查询菜单权限详细
-export function getCompanyMenu(menuId) {
+// 查询菜单详细
+export function getMenu(menuId) {
   return request({
     url: '/company/companyMenu/' + menuId,
     method: 'get'
   })
 }
 
-// 新增菜单权限
-export function addCompanyMenu(data) {
+// 查询菜单下拉树结构
+export function treeselect() {
   return request({
-    url: '/company/companyMenu',
-    method: 'post',
-    data: data
+    url: '/company/companyMenu/treeselect',
+    method: 'get'
   })
 }
 
-// 修改菜单权限
-export function updateCompanyMenu(data) {
+// 根据角色ID查询菜单下拉树结构
+export function roleMenuTreeselect(roleId) {
   return request({
-    url: '/company/companyMenu',
-    method: 'put',
-    data: data
+    url: '/company/companyMenu/roleMenuTreeselect/' + roleId,
+    method: 'get'
   })
 }
 
-// 删除菜单权限
-export function delCompanyMenu(menuId) {
+// 新增菜单
+export function addMenu(data) {
   return request({
-    url: '/company/companyMenu/' + menuId,
-    method: 'delete'
+    url: '/company/companyMenu',
+    method: 'post',
+    data: data
   })
 }
 
-// 导出菜单权限
-export function exportCompanyMenu(query) {
+// 修改菜单
+export function updateMenu(data) {
   return request({
-    url: '/company/companyMenu/export',
-    method: 'get',
-    params: query
+    url: '/company/companyMenu',
+    method: 'put',
+    data: data
   })
 }
 
-
-
-// 查询菜单下拉树结构
-export function treeselect() {
+// 删除菜单
+export function delMenu(menuId) {
   return request({
-    url: '/company/companyMenu/treeselect',
-    method: 'get'
+    url: '/company/companyMenu/' + menuId,
+    method: 'delete'
   })
-}
+}

+ 29 - 20
src/api/company/companyMoneyLogs.js

@@ -3,45 +3,46 @@ import request from '@/utils/request'
 // 查询企业账户记录列表
 export function listCompanyMoneyLogs(query) {
   return request({
-    url: '/company/companyMoneyLogs/list',
+    url: '/company/companyMoneyLogs/list',  
     method: 'get',
     params: query
   })
 }
 
-export function listCompanyMoneyLogs1(query) {
+// 查询企业账户记录详细
+export function getCompanyMoneyLogs(logsId) {
   return request({
-    url: '/company/companyMoneyLogs/list1',
-    method: 'get',
-    params: query
+    url: '/company/companyMoneyLogs/' + logsId,
+    method: 'get'
   })
 }
-export function listCompanyMoneyLogs2(query) {
+
+// 新增企业账户记录
+export function addCompanyMoneyLogs(data) {
   return request({
-    url: '/company/companyMoneyLogs/list2',
-    method: 'get',
-    params: query
+    url: '/company/companyMoneyLogs',
+    method: 'post',
+    data: data
   })
 }
-export function listCompanyMoneyLogs3(query) {
+
+// 修改企业账户记录
+export function updateCompanyMoneyLogs(data) {
   return request({
-    url: '/company/companyMoneyLogs/list3',
-    method: 'get',
-    params: query
+    url: '/company/companyMoneyLogs',
+    method: 'put',
+    data: data
   })
 }
 
-// 查询企业账户记录详细
-export function getCompanyMoneyLogs(logsId) {
+// 删除企业账户记录
+export function delCompanyMoneyLogs(logsId) {
   return request({
     url: '/company/companyMoneyLogs/' + logsId,
-    method: 'get'
+    method: 'delete'
   })
 }
 
- 
- 
-
 // 导出企业账户记录
 export function exportCompanyMoneyLogs(query) {
   return request({
@@ -49,4 +50,12 @@ export function exportCompanyMoneyLogs(query) {
     method: 'get',
     params: query
   })
-} 
+}
+
+export function getCompanyTotalMoneys(query) {
+  return request({
+    url: '/company/companyMoneyLogs/getCompanyTotalMoneys',
+    method: 'get',
+    params: query
+  })
+}

+ 13 - 13
src/api/company/companyPost.js

@@ -1,7 +1,7 @@
 import request from '@/utils/request'
 
-// 查询岗位信息列表
-export function list(query) {
+// 查询岗位列表
+export function listPost(query) {
   return request({
     url: '/company/companyPost/list',
     method: 'get',
@@ -9,16 +9,16 @@ export function list(query) {
   })
 }
 
-// 查询岗位信息详细
-export function getCompanyPost(postId) {
+// 查询岗位详细
+export function getPost(postId) {
   return request({
     url: '/company/companyPost/' + postId,
     method: 'get'
   })
 }
 
-// 新增岗位信息
-export function addCompanyPost(data) {
+// 新增岗位
+export function addPost(data) {
   return request({
     url: '/company/companyPost',
     method: 'post',
@@ -26,8 +26,8 @@ export function addCompanyPost(data) {
   })
 }
 
-// 修改岗位信息
-export function updateCompanyPost(data) {
+// 修改岗位
+export function updatePost(data) {
   return request({
     url: '/company/companyPost',
     method: 'put',
@@ -35,19 +35,19 @@ export function updateCompanyPost(data) {
   })
 }
 
-// 删除岗位信息
-export function delOperlog(postId) {
+// 删除岗位
+export function delPost(postId) {
   return request({
     url: '/company/companyPost/' + postId,
     method: 'delete'
   })
 }
 
-// 导出岗位信息
-export function exportOperlog(query) {
+// 导出岗位
+export function exportPost(query) {
   return request({
     url: '/company/companyPost/export',
     method: 'get',
     params: query
   })
-}
+}

+ 9 - 7
src/api/company/companyProfit.js

@@ -17,26 +17,28 @@ export function getCompanyProfit(profitId) {
   })
 }
 
-// 新增提现
-export function audit1(data) {
+ 
+export function profit(data) {
   return request({
-    url: '/company/companyProfit/audit1',
+    url: '/company/companyProfit/profit',
     method: 'post',
     data: data
   })
 }
 
-export function audit2(data) {
+export function cancel(data) {
   return request({
-    url: '/company/companyProfit/audit2',
+    url: '/company/companyProfit/cancel',
     method: 'post',
     data: data
   })
 }
 
-export function audit3(data) {
+
+// 新增提现
+export function addCompanyProfit(data) {
   return request({
-    url: '/company/companyProfit/audit3',
+    url: '/company/companyProfit',
     method: 'post',
     data: data
   })

+ 18 - 2
src/api/company/companyRecharge.js

@@ -52,10 +52,26 @@ export function exportCompanyRecharge(query) {
   })
 }
 
-export function audit(data) {
+// 充值接口
+export function recharge(data) {
   return request({
-    url: '/company/companyRecharge/audit',
+    url: '/company/companyRecharge/recharge',
     method: 'post',
     data: data
   })
 }
+
+export function redRecharge(data) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs/redRecharge',
+    method: 'post',
+    data: data
+  })
+}
+
+export function getCompanyRedPacketBalance() {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs/redBalance',
+    method: 'get'
+  })
+}

+ 7 - 7
src/api/company/companyRedPacketBalanceLogs.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 
-// 查询企业红包余额记录列表
+// 查询企业账户记录列表
 export function listCompanyRedPacketBalanceLogs(query) {
   return request({
     url: '/company/companyRedPacketBalanceLogs/list',
@@ -9,7 +9,7 @@ export function listCompanyRedPacketBalanceLogs(query) {
   })
 }
 
-// 查询企业红包余额记录详细
+// 查询企业账户记录详细
 export function getCompanyRedPacketBalanceLogs(logsId) {
   return request({
     url: '/company/companyRedPacketBalanceLogs/' + logsId,
@@ -17,7 +17,7 @@ export function getCompanyRedPacketBalanceLogs(logsId) {
   })
 }
 
-// 新增企业红包余额记录
+// 新增企业账户记录
 export function addCompanyRedPacketBalanceLogs(data) {
   return request({
     url: '/company/companyRedPacketBalanceLogs',
@@ -26,7 +26,7 @@ export function addCompanyRedPacketBalanceLogs(data) {
   })
 }
 
-// 修改企业红包余额记录
+// 修改企业账户记录
 export function updateCompanyRedPacketBalanceLogs(data) {
   return request({
     url: '/company/companyRedPacketBalanceLogs',
@@ -35,7 +35,7 @@ export function updateCompanyRedPacketBalanceLogs(data) {
   })
 }
 
-// 删除企业红包余额记录
+// 删除企业账户记录
 export function delCompanyRedPacketBalanceLogs(logsId) {
   return request({
     url: '/company/companyRedPacketBalanceLogs/' + logsId,
@@ -43,11 +43,11 @@ export function delCompanyRedPacketBalanceLogs(logsId) {
   })
 }
 
-// 导出企业红包余额记录
+// 导出企业账户记录
 export function exportCompanyRedPacketBalanceLogs(query) {
   return request({
     url: '/company/companyRedPacketBalanceLogs/export',
     method: 'get',
     params: query
   })
-}
+}

+ 34 - 12
src/api/company/companyRole.js

@@ -1,7 +1,7 @@
 import request from '@/utils/request'
 
-// 查询角色信息列表
-export function listCompanyRole(query) {
+// 查询角色列表
+export function listRole(query) {
   return request({
     url: '/company/companyRole/list',
     method: 'get',
@@ -9,16 +9,16 @@ export function listCompanyRole(query) {
   })
 }
 
-// 查询角色信息详细
-export function getCompanyRole(roleId) {
+// 查询角色详细
+export function getRole(roleId) {
   return request({
     url: '/company/companyRole/' + roleId,
     method: 'get'
   })
 }
 
-// 新增角色信息
-export function addCompanyRole(data) {
+// 新增角色
+export function addRole(data) {
   return request({
     url: '/company/companyRole',
     method: 'post',
@@ -26,8 +26,8 @@ export function addCompanyRole(data) {
   })
 }
 
-// 修改角色信息
-export function updateCompanyRole(data) {
+// 修改角色
+export function updateRole(data) {
   return request({
     url: '/company/companyRole',
     method: 'put',
@@ -35,16 +35,38 @@ export function updateCompanyRole(data) {
   })
 }
 
-// 删除角色信息
-export function delCompanyRole(roleId) {
+// 角色数据权限
+export function dataScope(data) {
+  return request({
+    url: '/company/companyRole/dataScope',
+    method: 'put',
+    data: data
+  })
+}
+
+// 角色状态修改
+export function changeRoleStatus(roleId, status) {
+  const data = {
+    roleId,
+    status
+  }
+  return request({
+    url: '/company/companyRole/changeStatus',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除角色
+export function delRole(roleId) {
   return request({
     url: '/company/companyRole/' + roleId,
     method: 'delete'
   })
 }
 
-// 导出角色信息
-export function exportCompanyRole(query) {
+// 导出角色
+export function exportRole(query) {
   return request({
     url: '/company/companyRole/export',
     method: 'get',

+ 44 - 0
src/api/company/companySms.js

@@ -25,6 +25,50 @@ export function addCompanySms(data) {
     data: data
   })
 }
+export function sendCustomerMsg(data) {
+  return request({
+    url: '/company/companySms/sendCustomerMsg',
+    method: 'post',
+    data: data
+  })
+}
+
+export function sendStoreOrderMsg(data) {
+  return request({
+    url: '/company/companySms/sendOrderMsg',
+    method: 'post',
+    data: data
+  })
+}
+
+export function sendPackageOrderMsg(data) {
+  return request({
+    url: '/company/companySms/sendPackageOrderMsg',
+    method: 'post',
+    data: data
+  })
+}
+                                
+export function sendCustomerBatchMsg(data) {
+  return request({
+    url: '/company/companySms/sendCustomerBatchMsg',
+    method: 'post',
+    data: data
+  })
+}
+
+
+export function getCompanySmsCount() {
+  return request({
+    url: '/company/companySms/getCompanySmsCount',
+    method: 'get'
+  })
+}
+
+
+
+
+
 
 // 修改公司短信
 export function updateCompanySms(data) {

+ 6 - 40
src/api/company/companySmsPackage.js

@@ -1,53 +1,19 @@
 import request from '@/utils/request'
 
-// 查询短信套餐包列表
-export function listCompanySmsPackage(query) {
+export function getSmsPackage(query) {
   return request({
-    url: '/company/companySmsPackage/list',
+    url: '/company/companySmsPackage/getSmsPackage',
     method: 'get',
     params: query
   })
 }
-
-// 查询短信套餐包详细
-export function getCompanySmsPackage(packageId) {
-  return request({
-    url: '/company/companySmsPackage/' + packageId,
-    method: 'get'
-  })
-}
-
-// 新增短信套餐包
-export function addCompanySmsPackage(data) {
+ 
+export function buySmsPackage(data) {
   return request({
-    url: '/company/companySmsPackage',
+    url: '/company/companySmsPackage/buySmsPackage',
     method: 'post',
     data: data
   })
 }
 
-// 修改短信套餐包
-export function updateCompanySmsPackage(data) {
-  return request({
-    url: '/company/companySmsPackage',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除短信套餐包
-export function delCompanySmsPackage(packageId) {
-  return request({
-    url: '/company/companySmsPackage/' + packageId,
-    method: 'delete'
-  })
-}
-
-// 导出短信套餐包
-export function exportCompanySmsPackage(query) {
-  return request({
-    url: '/company/companySmsPackage/export',
-    method: 'get',
-    params: query
-  })
-}
+ 

+ 10 - 8
src/api/company/companySmsTemp.js

@@ -8,6 +8,16 @@ export function listCompanySmsTemp(query) {
     params: query
   })
 }
+export function getSmsTempList(query) {
+  return request({
+    url: '/company/companySmsTemp/getSmsTempList',
+    method: 'get',
+    params: query
+  })
+}
+
+
+
 
 // 查询短信模板详细
 export function getCompanySmsTemp(tempId) {
@@ -50,12 +60,4 @@ export function exportCompanySmsTemp(query) {
     method: 'get',
     params: query
   })
-}
-
-export function audit(data) {
-  return request({
-    url: '/company/companySmsTemp/audit',
-    method: 'post',
-    data: data
-  })
 }

+ 1 - 1
src/api/company/companyTag.js

@@ -50,4 +50,4 @@ export function exportCompanyTag(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 1 - 1
src/api/company/companyTagGroup.js

@@ -50,4 +50,4 @@ export function exportCompanyTagGroup(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 297 - 40
src/api/company/companyUser.js

@@ -1,121 +1,378 @@
 import request from '@/utils/request'
+import { praseStrEmpty } from "@/utils/common";
 
-// 查询企业员工信息列表
-export function listCompanyUser(query) {
+// 查询用户列表
+export function listUser(query) {
   return request({
-    url: '/company/companyUser/list',
+    url: '/company/user/list',
     method: 'get',
     params: query
   })
 }
-export function getAllUserlist(query) {
+// 查询企微用户列表
+export function qwList(query) {
   return request({
-    url: '/company/companyUser/getAllUserlist',
+    url: '/company/user/qwList',
     method: 'get',
     params: query
   })
 }
+export function getList(query) {
+  return request({
+    url: '/company/user/getList',
+    method: 'get',
+    params: query
+  })
+}
+export function getUserList() {
+  return request({
+    url: '/company/user/getUserList',
+    method: 'get'
+  })
+}
+export function getQwUserList() {
+  return request({
+    url: '/company/user/getQwUserList',
+    method: 'get'
+  })
+}
+export function getQwAllUserList(id) {
+  return request({
+    url: '/company/user/getQwAllUserList/'+id,
+    method: 'get'
+  })
+}
+
+
+export function getQwMyUserList(id) {
+  return request({
+    url: '/company/user/getQwMyUserList/'+id,
+    method: 'get'
+  })
+}
+
+export function getQwDeptUserList(id) {
+  return request({
+    url: '/company/user/getQwDeptUserList/'+id,
+    method: 'get'
+  })
+}
+
+
 
 export function getUserListByDeptId(query) {
   return request({
-    url: '/company/companyUser/getUserListByDeptId',
+    url: '/company/user/getUserListByDeptId',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getUserListByDeptIdToQwId(query) {
+  return request({
+    url: '/company/user/getUserListByDeptIdToQwId',
     method: 'get',
     params: query
   })
 }
 
 
-// 查询企业员工信息详细
-export function getCompanyUser(userId) {
+export function getAddressBookList(query) {
   return request({
-    url: '/company/companyUser/' + userId,
+    url: '/company/user/getAddressBookList',
+    method: 'get',
+    params: query
+  })
+}
+
+
+
+// 查询用户详细
+export function getUser(userId) {
+  return request({
+    url: '/company/user/' + praseStrEmpty(userId),
     method: 'get'
   })
 }
 
-// 新增企业员工信息
-export function addCompanyUser(data) {
+// 新增用户
+export function addUser(data) {
   return request({
-    url: '/company/companyUser',
+    url: '/company/user',
     method: 'post',
     data: data
   })
 }
 
-// 修改企业员工信息
-export function updateCompanyUser(data) {
+//创建二维码
+export function addCodeUrl(data) {
   return request({
-    url: '/company/companyUser',
+    url: '/company/user/addCodeUrl',
+    method: 'post',
+    data: data
+  })
+}
+
+
+// 修改用户
+export function updateUser(data) {
+  return request({
+    url: '/company/user',
     method: 'put',
     data: data
   })
 }
 
-// 删除企业员工信息
-export function delCompanyUser(userId) {
+// 删除用户
+export function delUser(userIds) {
   return request({
-    url: '/company/companyUser/' + userId,
+    url: '/company/user/' + userIds,
     method: 'delete'
   })
 }
 
-// 导出企业员工信息
-export function exportCompanyUser(query) {
+// 导出用户
+export function exportUser(query) {
   return request({
-    url: '/company/companyUser/export',
+    url: '/company/user/export',
     method: 'get',
     params: query
   })
 }
 
+// 用户密码重置
+export function resetUserPwd(userId, password) {
+  const data = {
+    userId,
+    password
+  }
+  return request({
+    url: '/company/user/resetPwd',
+    method: 'put',
+    data: data
+  })
+}
+
+// 用户状态修改
+export function changeUserStatus(userId, status) {
+  const data = {
+    userId,
+    status
+  }
+  return request({
+    url: '/company/user/changeStatus',
+    method: 'put',
+    data: data
+  })
+}
 
-export function getUserList(companyId){
+// 查询用户个人信息
+export function getUserProfile() {
   return request({
-    url: '/company/companyUser/getUserList?companyId='+companyId,
+    url: '/company/user/profile',
     method: 'get'
   })
 }
 
-// 根据登录的用户公司获取所有的销售
-export function getCompanyUserList(data) {
+// 修改用户个人信息
+export function updateUserProfile(data) {
   return request({
-    url: '/company/companyUser/getCompanyUserList',
-    method: 'get',
+    url: '/company/user/profile',
+    method: 'put',
+    data: data
+  })
+}
+
+// 用户密码重置
+export function updateUserPwd(oldPassword, newPassword) {
+  const data = {
+    oldPassword,
+    newPassword
+  }
+  return request({
+    url: '/company/user/profile/updatePwd',
+    method: 'put',
     params: data
   })
 }
 
-// 获取所有的公司
-export function getCompanyList(data) {
+// 用户头像上传
+export function uploadAvatar(data) {
   return request({
-    url: '/company/company/getCompanyList',
+    url: '/company/user/profile/avatar',
+    method: 'post',
+    data: data
+  })
+}
+
+// 下载用户导入模板
+export function importTemplate() {
+  return request({
+    url: '/company/user/importTemplate',
+    method: 'get'
+  })
+}
+
+export function getSelectUserList(query) {
+  return request({
+    url: '/company/user/getSelectUserList',
     method: 'get',
-    params: data
+    params: query
   })
 }
 
-// 获取销售选项列表
-export function getCompanyUserListLikeName(query){
+/**
+* 获取地区
+*/
+export function getCitysAreaList(query) {
   return request({
-    url: '/company/companyUser/getCompanyUserListLikeName',
+    url: '/company/user/getCitysAreaList',
     method: 'get',
     params: query
   })
 }
-//更换会员归属销售
-export function changeCompanyUser(data, params) {
+
+/**
+* 批量修改 销售的所属区域(临时的)
+*/
+export function updateCompanyUserAreaList(data) {
   return request({
-    url: '/company/companyUser/changeCompanyUser',
+    url: '/company/user/updateCompanyUserAreaList',
     method: 'post',
-    data: data,
+    data: data
+  })
+}
+
+// 根据名称模糊查询用户列表
+export function getCompanyUserListLikeName(params) {
+  return request({
+    url: '/company/user/getCompanyUserListLikeName',
+    method: 'get',
     params: params
   })
 }
 
+// 根据名模糊查询用户列表
+export function getCompanyUserListLikeNameByDept(params) {
+  return request({
+    url: '/company/user/getCompanyUserListLikeNameDept',
+    method: 'get',
+    params: params
+  })
+}
+
+
+// 查询企业员工信息列表
+export function listCompanyUser(query) {
+  return request({
+    url: '/company/user/list',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询企业员工信息列表
-export function getCompanyUserListPage(query) {
+export function getCompanyUserList(query) {
+  return request({
+    url: '/company/user/getCompanyUserList',
+    method: 'get',
+    params: query
+  })
+}
+
+//生成域名
+export function generateSubDomain(query){
+  return request({
+    url: '/company/user/generateSubDomain',
+    method: 'get',
+    params: query
+  })
+}
+
+// 设置是否需要单独注册会员
+export function setIsRegisterMember(status, data) {
+  return request({
+    url: '/company/user/setRegister',
+    method: 'put',
+    params: status,
+    data: data
+  })
+}
+
+// 开关是否允许所有方式注册会员
+export function isAllowedAllRegister(status, data) {
+  return request({
+    url: '/company/user/allowedAllRegister',
+    method: 'put',
+    params: status,
+    data: data
+  })
+}
+
+// 绑定医生
+export function bindDoctorId(data) {
+  return request({
+    url: '/company/user/bindDoctorId',
+    method: 'post',
+    data: data
+  })
+}
+
+//解绑医生
+export function unBindDoctorId(userId) {
+  return request({
+    url: '/company/user/unBindDoctorId/'+userId,
+    method: 'get'
+  })
+}
+
+//批量修改用户的角色
+export function updateBatchUserRoles(data) {
+  return request({
+    url: '/company/user/updateBatchUserRoles',
+    method: 'post',
+    data: data
+  })
+}
+
+// 根据手机号码查询fs_user(完全匹配)
+export function queryFsUserByPhone(phone) {
+  return request({
+    url: '/company/user/fsUser/queryByPhone',
+    method: 'get',
+    params: { phone: phone }
+  })
+}
+
+// 批量绑定用户到员工
+export function batchBindCompanyUserId(data) {
+  return request({
+    url: '/company/user/batchBindCompanyUserId',
+    method: 'post',
+    data: data
+  })
+}
+
+// 查询已绑定的用户
+export function getBoundUsers(companyUserId) {
+  return request({
+    url: '/company/user/getBoundUsers/' + companyUserId,
+    method: 'get'
+  })
+}
+
+export function unBind(userId) {
+  return request({
+    url: '/company/user/unBind',
+    method: 'post',
+    data: { userId: userId }
+  })
+}
+
+// 查询我的企微列表
+export function myQwList(query) {
   return request({
-    url: '/company/companyUser/getCompanyUserListPage',
+    url: '/company/user/myQwList',
     method: 'get',
     params: query
   })

+ 64 - 0
src/api/company/companyUserCard.js

@@ -0,0 +1,64 @@
+import request from '@/utils/request'
+
+// 查询card列表
+export function listCard(query) {
+  return request({
+    url: '/company/companUsercard/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询card详细
+export function getCard(id) {
+  return request({
+    url: '/company/companUsercard/' + id,
+    method: 'get'
+  })
+}
+
+// 新增card
+export function addCard(data) {
+  return request({
+    url: '/company/companUsercard',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改card
+export function updateCard(data) {
+  return request({
+    url: '/company/companUsercard',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除card
+export function delCard(id) {
+  return request({
+    url: '/company/companUsercard/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出card
+export function exportCard(query) {
+  return request({
+      url: '/company/companUsercard/export',
+      method: 'get',
+      params: query
+  })
+}
+
+
+//群发短信
+export function sendCustomerBatchMsg(data) {
+    return request({
+        url: '/company/companUsercard/sendCustomerBatchMsg',
+        method: 'post',
+        data: data
+    })
+ }
+ 

+ 12 - 41
src/api/company/companyVoiceApi.js

@@ -1,60 +1,31 @@
 import request from '@/utils/request'
+ 
+
+export function callMobile(query) {
 
-// 查询呼叫接口列表
-export function listCompanyVoiceApi(query) {
   return request({
-    url: '/company/companyVoiceApi/list',
+    url: '/company/companyVoiceApi/callMobile' ,
     method: 'get',
     params: query
+
   })
 }
-export function getVoiceApiList() {
-  return request({
-    url: '/company/companyVoiceApi/getVoiceApiList',
-    method: 'get'
-  })
-}
-
+ 
+export function callOffMobile(voiceId) {
 
-// 查询呼叫接口详细
-export function getCompanyVoiceApi(apiId) {
   return request({
-    url: '/company/companyVoiceApi/' + apiId,
+    url: '/company/companyVoiceApi/callOffMobile?voiceId='+voiceId ,
     method: 'get'
   })
 }
+export function getSipAccount() {
 
-// 新增呼叫接口
-export function addCompanyVoiceApi(data) {
   return request({
-    url: '/company/companyVoiceApi',
-    method: 'post',
-    data: data
+    url: '/company/companyVoiceApi/getSipAccount' ,
+    method: 'get'
   })
 }
 
-// 修改呼叫接口
-export function updateCompanyVoiceApi(data) {
-  return request({
-    url: '/company/companyVoiceApi',
-    method: 'put',
-    data: data
-  })
-}
 
-// 删除呼叫接口
-export function delCompanyVoiceApi(apiId) {
-  return request({
-    url: '/company/companyVoiceApi/' + apiId,
-    method: 'delete'
-  })
-}
 
-// 导出呼叫接口
-export function exportCompanyVoiceApi(query) {
-  return request({
-    url: '/company/companyVoiceApi/export',
-    method: 'get',
-    params: query
-  })
-}
+ 

+ 8 - 12
src/api/company/companyVoiceCaller.js

@@ -10,9 +10,9 @@ export function listCompanyVoiceCaller(query) {
 }
 
 // 查询企业用户坐席详细
-export function getCompanyVoiceCaller(callingId) {
+export function getCompanyVoiceCaller(callerId) {
   return request({
-    url: '/company/companyVoiceCaller/' + callingId,
+    url: '/company/companyVoiceCaller/' + callerId,
     method: 'get'
   })
 }
@@ -36,9 +36,9 @@ export function updateCompanyVoiceCaller(data) {
 }
 
 // 删除企业用户坐席
-export function delCompanyVoiceCaller(callingId) {
+export function delCompanyVoiceCaller(callerId) {
   return request({
-    url: '/company/companyVoiceCaller/' + callingId,
+    url: '/company/companyVoiceCaller/' + callerId,
     method: 'delete'
   })
 }
@@ -52,21 +52,17 @@ export function exportCompanyVoiceCaller(query) {
   })
 }
 
-// 下载用户导入模板
-export function importTemplate() {
+export function getCallerList() {
   return request({
-    url: '/company/companyVoiceCaller/importTemplate',
+    url: '/company/companyVoiceCaller/getCallerList' ,
     method: 'get'
   })
 }
-export function recover(data) {
+export function bindCallerNo(data) {
   return request({
-    url: '/company/companyVoiceCaller/recover',
+    url: '/company/companyVoiceCaller/bindCallerNo',
     method: 'post',
     data: data
   })
 }
 
-
-
-

+ 6 - 31
src/api/company/companyVoicePackageOrder.js

@@ -9,45 +9,20 @@ export function listCompanyVoicePackageOrder(query) {
   })
 }
 
-// 查询套餐订单详细
-export function getCompanyVoicePackageOrder(orderId) {
+export function getVoicePackagelist(query) {
   return request({
-    url: '/company/companyVoicePackageOrder/' + orderId,
-    method: 'get'
+    url: '/company/companyVoicePackageOrder/getVoicePackagelist',
+    method: 'get',
+    params: query
   })
 }
 
-// 新增套餐订单
-export function addCompanyVoicePackageOrder(data) {
+export function buy(data) {
   return request({
-    url: '/company/companyVoicePackageOrder',
+    url: '/company/companyVoicePackageOrder/buy',
     method: 'post',
     data: data
   })
 }
 
-// 修改套餐订单
-export function updateCompanyVoicePackageOrder(data) {
-  return request({
-    url: '/company/companyVoicePackageOrder',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除套餐订单
-export function delCompanyVoicePackageOrder(orderId) {
-  return request({
-    url: '/company/companyVoicePackageOrder/' + orderId,
-    method: 'delete'
-  })
-}
 
-// 导出套餐订单
-export function exportCompanyVoicePackageOrder(query) {
-  return request({
-    url: '/company/companyVoicePackageOrder/export',
-    method: 'get',
-    params: query
-  })
-}

+ 62 - 0
src/api/company/companyVoiceRobotic.js

@@ -8,6 +8,14 @@ export function listRobotic(query) {
     params: query
   })
 }
+
+export function myListRobotic(query) {
+    return request({
+        url: '/company/companyVoiceRobotic/myList',
+        method: 'get',
+        params: query
+    })
+}
 // 查询机器人外呼任务列表
 export function listAll(query) {
   return request({
@@ -116,3 +124,57 @@ export function wxList(params) {
     params
   })
 }
+
+
+export function taskRun(params) {
+  return request({
+    url: '/company/companyVoiceRobotic/taskRun',
+    method: 'get',
+    params
+  })
+}
+
+export function getSmsTempList() {
+  return request({
+    url: '/company/companySmsTemp/getSmsTempList',
+    method: 'get'
+  })
+}
+
+export function getCIDGroupList(params) {
+  return request({
+    url: '/company/companyVoiceRobotic/getCIDGroupList',
+    method: 'get',
+    params
+  })
+}
+
+// 查询任务执行记录
+// export function getExecRecords(roboticId) {
+//   return request({
+//     url: '/company/companyVoiceRobotic/execRecords',
+//     method: 'get',
+//     params: { roboticId }
+//   })
+// }
+export function getExecRecords(query) {
+  return request({
+    url: '/company/companyVoiceRobotic/execRecords',
+    method: 'get',
+    params: query
+  })
+}
+export function wxListQw(params) {
+  return request({
+    url: '/company/companyVoiceRobotic/wxListQw',
+    method: 'get',
+    params
+  })
+}
+export function getCurrentCompanyId() {
+  return request({
+    url: '/company/companyVoiceRobotic/getCurrentCompanyId',
+    method: 'get'
+  })
+}
+

+ 53 - 0
src/api/company/companyVoiceRoboticCallBlacklist.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询外呼黑名单列表
+export function listVoiceRoboticCallBlacklist(query) {
+    return request({
+        url: '/company/companyVoiceRoboticCallBlacklist/list',
+        method: 'get',
+        params: query
+    })
+}
+
+// 查询外呼黑名单详情
+export function getVoiceRoboticCallBlacklist(id) {
+    return request({
+        url: '/company/companyVoiceRoboticCallBlacklist/' + id,
+        method: 'get'
+    })
+}
+
+// 新增外呼黑名单
+export function addVoiceRoboticCallBlacklist(data) {
+    return request({
+        url: '/company/companyVoiceRoboticCallBlacklist',
+        method: 'post',
+        data: data
+    })
+}
+
+// 修改外呼黑名单
+export function updateVoiceRoboticCallBlacklist(data) {
+    return request({
+        url: '/company/companyVoiceRoboticCallBlacklist',
+        method: 'put',
+        data: data
+    })
+}
+
+// 删除外呼黑名单
+export function delVoiceRoboticCallBlacklist(id) {
+    return request({
+        url: '/company/companyVoiceRoboticCallBlacklist/' + id,
+        method: 'delete'
+    })
+}
+
+// 修改状态
+export function changeVoiceRoboticCallBlacklistStatus(data) {
+    return request({
+        url: '/company/companyVoiceRoboticCallBlacklist/changeStatus',
+        method: 'put',
+        data: data
+    })
+}

+ 149 - 0
src/api/company/companyWorkflow.js

@@ -0,0 +1,149 @@
+import request from '@/utils/request'
+
+// 查询AI工作流列表
+export function listWorkflow(query) {
+  return request({
+    url: '/company/companyWorkflow/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function myListWorkflow(query) {
+    return request({
+        url: '/company/companyWorkflow/myList',
+        method: 'get',
+        params: query
+    })
+}
+
+// 查询AI工作流详细
+export function getWorkflow(workflowId) {
+  return request({
+    url: '/company/companyWorkflow/' + workflowId,
+    method: 'get'
+  })
+}
+
+// 新增AI工作流
+export function addWorkflow(data) {
+  return request({
+    url: '/company/companyWorkflow/save',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改AI工作流
+export function updateWorkflow(data) {
+  return request({
+    url: '/company/companyWorkflow/save',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改AI工作流状态
+export function updateWorkflowStatus(workflowId, status) {
+  return request({
+    url: '/company/companyWorkflow/status/' + workflowId + '/' + status,
+    method: 'put'
+  })
+}
+
+// 删除AI工作流
+export function delWorkflow(workflowId) {
+  return request({
+    url: '/company/companyWorkflow/' + workflowId,
+    method: 'delete'
+  })
+}
+
+// 复制AI工作流
+export function copyWorkflow(workflowId) {
+  return request({
+    url: '/company/companyWorkflow/copy/' + workflowId,
+    method: 'post'
+  })
+}
+
+// 获取节点类型列表
+export function getNodeTypes() {
+  return request({
+    url: '/company/companyWorkflow/nodeTypes',
+    method: 'get'
+  })
+}
+
+// 导出AI工作流
+export function exportWorkflow(query) {
+  return request({
+    url: '/company/companyWorkflow/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 根据workflowId获取绑定的销售列表
+export function getBindCompanyUserByWorkflowId(workflowId) {
+  return request({
+    url: '/company/companyWorkflow/getBindCompanyUserByWorkflowId/' + workflowId,
+    method: 'get'
+  })
+}
+
+// 获取销售列表
+export function listCompanyUser() {
+  return request({
+    url: '/company/companyWorkflow/listCompanyUser',
+    method: 'get'
+  })
+}
+
+// 检查销售是否已被绑定
+export function checkCompanyUserBeUsed(companyUserId) {
+  return request({
+    url: '/company/companyWorkflow/checkCompanyUserBeUsed/' + companyUserId,
+    method: 'get'
+  })
+}
+
+// 更新工作流绑定销售
+export function updateWorkflowBindCompanyUser(data) {
+  return request({
+    url: '/company/companyWorkflow/updateWorkflowBindCompanyUser',
+    method: 'post',
+    data: data
+  })
+}
+// 更新工作流绑定销售
+export function optionList() {
+  return request({
+    url: '/company/companyWorkflow/optionList',
+    method: 'get'
+  })
+}
+
+//查看工作流历史版本
+export function getWorkflowVersionList(workflowId) {
+    return request({
+        url: '/company/companyWorkflow/versionList/' + workflowId,
+        method: 'get'
+    })
+}
+
+// 查询版本详情
+export function getWorkflowVersionDetail(versionId) {
+    return request({
+        url: '/company/companyWorkflow/versionDetail/' + versionId,
+        method: 'get'
+    })
+}
+
+// 回退到指定版本
+export function rollbackWorkflowVersion(versionId) {
+    return request({
+        url: '/company/companyWorkflow/versionRollback/' + versionId,
+        method: 'post'
+    })
+}

+ 53 - 0
src/api/company/companyWorkflowManage.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询工作流模板管理列表
+export function listCompanyCompanyworkflowmanage(query) {
+  return request({
+    url: '/company/company_workflow_manage/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询工作流模板管理详细
+export function getCompanyCompanyworkflowmanage(id) {
+  return request({
+    url: '/company/company_workflow_manage/' + id,
+    method: 'get'
+  })
+}
+
+// 新增工作流模板管理
+export function addCompanyCompanyworkflowmanage(data) {
+  return request({
+    url: '/company/company_workflow_manage',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改工作流模板管理
+export function updateCompanyCompanyworkflowmanage(data) {
+  return request({
+    url: '/company/company_workflow_manage',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除工作流模板管理
+export function delCompanyCompanyworkflowmanage(id) {
+  return request({
+    url: '/company/company_workflow_manage/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出工作流模板管理
+export function exportCompanyCompanyworkflowmanage(query) {
+  return request({
+    url: '/company/company_workflow_manage/export',
+    method: 'post',
+    params: query
+  })
+}

+ 92 - 0
src/api/company/config.js

@@ -0,0 +1,92 @@
+import request from '@/utils/request'
+
+export function listConfig(query) {
+  return request({
+    url: '/system/config/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getConfig(configId) {
+  return request({
+    url: '/system/config/' + configId,
+    method: 'get'
+  })
+}
+
+export function getConfigByKey(configKey) {
+  return request({
+    url: '/system/config/getConfigByKey/' + configKey,
+    method: 'get'
+  })
+}
+
+export function getConfigKey(configKey) {
+  return request({
+    url: '/system/config/configKey/' + configKey,
+    method: 'get'
+  })
+}
+
+export function addConfig(data) {
+  return request({
+    url: '/system/config',
+    method: 'post',
+    data: data
+  })
+}
+
+export function updateConfig(data) {
+  return request({
+    url: '/system/config',
+    method: 'put',
+    data: data
+  })
+}
+
+export function delConfig(configId) {
+  return request({
+    url: '/system/config/' + configId,
+    method: 'delete'
+  })
+}
+
+export function refreshCache() {
+  return request({
+    url: '/system/config/refreshCache',
+    method: 'delete'
+  })
+}
+
+export function exportConfig(query) {
+  return request({
+    url: '/system/config/export',
+    method: 'get',
+    params: query
+  })
+}
+
+export function updateConfigByKey(data) {
+  return request({
+    url: '/system/config/updateConfigByKey',
+    method: 'post',
+    data: data
+  })
+}
+
+export function updateIsTownOn(query) {
+  return request({
+    url: '/system/config/updateIsTownOn',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getGatewayList(query) {
+  return request({
+    url: '/easyCall/gateway/list',
+    method: 'get',
+    params: query
+  })
+}

+ 60 - 0
src/api/company/dept.js

@@ -0,0 +1,60 @@
+import request from '@/utils/request'
+
+export function listDept(query) {
+  return request({
+    url: '/system/dept/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function listDeptExcludeChild(deptId) {
+  return request({
+    url: '/system/dept/list/exclude/' + deptId,
+    method: 'get'
+  })
+}
+
+export function getDept(deptId) {
+  return request({
+    url: '/system/dept/' + deptId,
+    method: 'get'
+  })
+}
+
+export function treeselect() {
+  return request({
+    url: '/system/dept/treeselect',
+    method: 'get'
+  })
+}
+
+export function roleDeptTreeselect(roleId) {
+  return request({
+    url: '/system/dept/roleDeptTreeselect/' + roleId,
+    method: 'get'
+  })
+}
+
+export function addDept(data) {
+  return request({
+    url: '/system/dept',
+    method: 'post',
+    data: data
+  })
+}
+
+export function updateDept(data) {
+  return request({
+    url: '/system/dept',
+    method: 'put',
+    data: data
+  })
+}
+
+export function delDept(deptId) {
+  return request({
+    url: '/system/dept/' + deptId,
+    method: 'delete'
+  })
+}

+ 62 - 0
src/api/company/dict/data.js

@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+export function listData(query) {
+  return request({
+    url: '/system/dict/data/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getData(dictCode) {
+  return request({
+    url: '/system/dict/data/' + dictCode,
+    method: 'get'
+  })
+}
+
+export function getDicts(dictType) {
+  return request({
+    url: '/system/dict/data/type/' + dictType,
+    method: 'get'
+  })
+}
+
+export function addData(data) {
+  return request({
+    url: '/system/dict/data',
+    method: 'post',
+    data: data
+  })
+}
+
+export function updateData(data) {
+  return request({
+    url: '/system/dict/data',
+    method: 'put',
+    data: data
+  })
+}
+
+export function delData(dictCode) {
+  return request({
+    url: '/system/dict/data/' + dictCode,
+    method: 'delete'
+  })
+}
+
+export function exportData(query) {
+  return request({
+    url: '/system/dict/data/export',
+    method: 'get',
+    params: query
+  })
+}
+
+export function allList(query) {
+  return request({
+    url: '/system/dict/data/allList',
+    method: 'get',
+    params: query
+  })
+}

+ 61 - 0
src/api/company/dict/type.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request'
+
+export function listType(query) {
+  return request({
+    url: '/system/dict/type/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getType(dictId) {
+  return request({
+    url: '/system/dict/type/' + dictId,
+    method: 'get'
+  })
+}
+
+export function addType(data) {
+  return request({
+    url: '/system/dict/type',
+    method: 'post',
+    data: data
+  })
+}
+
+export function updateType(data) {
+  return request({
+    url: '/system/dict/type',
+    method: 'put',
+    data: data
+  })
+}
+
+export function delType(dictId) {
+  return request({
+    url: '/system/dict/type/' + dictId,
+    method: 'delete'
+  })
+}
+
+export function refreshCache() {
+  return request({
+    url: '/system/dict/type/refreshCache',
+    method: 'delete'
+  })
+}
+
+export function exportType(query) {
+  return request({
+    url: '/system/dict/type/export',
+    method: 'get',
+    params: query
+  })
+}
+
+export function optionselect() {
+  return request({
+    url: '/system/dict/type/optionselect',
+    method: 'get'
+  })
+}

+ 33 - 0
src/api/company/easyCall.js

@@ -0,0 +1,33 @@
+import request from '@/utils/request'
+
+// 获取外呼网关列表(外呼线路)
+export function getGatewayList() {
+  return request({
+    url: '/company/easyCall/gateway/list',
+    method: 'get'
+  })
+}
+
+// 获取大模型配置列表(大模型底座)
+export function getLlmAccountList() {
+  return request({
+    url: '/company/easyCall/llmAccount/list',
+    method: 'get'
+  })
+}
+
+// 获取音色列表
+export function getVoiceCodeList() {
+  return request({
+    url: '/company/easyCall/voiceCode/list',
+    method: 'get'
+  })
+}
+
+// 获取技能组列表(tts厂商)
+export function getBusiGroupList() {
+  return request({
+    url: '/company/easyCall/busiGroup/list',
+    method: 'get'
+  })
+}

+ 27 - 0
src/api/company/firstDiagnosis.js

@@ -0,0 +1,27 @@
+import request from '@/utils/request'
+
+// 新增初诊单
+export function addFsFirstDiagnosis(data) {
+  return request({
+    url: '/his/diagnosis',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改初诊单
+export function updateFsFirstDiagnosis(data) {
+  return request({
+    url: '/his/diagnosis',
+    method: 'put',
+    data: data
+  })
+}
+
+// 查询初诊单详细
+export function getFsFirstDiagnosis(userId) {
+  return request({
+    url: '/his/diagnosis/' + userId,
+    method: 'get'
+  })
+}

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott