Просмотр исходного кода

refactor(workflow): 修复IVR工作流相关问题和优化配置

- 修正短信模板API路径错误
- 调整节点面板图标边距样式
- 为SQL节点添加锚点处理逻辑
- 启用并更新保存IVR工作流的API调用
- 简化nginx配置,移除冗余服务配置
```

这个提交消息:
1. 使用`refactor`类型,因为大部分修改是代码结构调整和优化
2. 添加了`workflow`范围,明确修改主要涉及工作流功能
3. 简要说明了主要修改内容
4. 使用中文符合要求
5. 每个修改点简明扼要,突出重要变更
6. 没有重复信息,直接列出关键修改
weieryang месяцев назад: 7
Родитель
Сommit
3cf840286d

+ 5 - 361
nginx.conf

@@ -48,362 +48,28 @@ http {
48 48
 	gzip on;
49 49
 	server {
50 50
 		listen       8081;
51
-			server_name  12.34.56.78;
51
+		server_name  12.34.56.78; # 修改为自己的域名或IP地址
52 52
 
53 53
 		location / {
54
-			root   /home/nuoyi/dist;
54
+			root   /home/website/web; # 修改为自己的网站目录
55 55
 			try_files $uri $uri/ /index.html;
56 56
 			index  index.html index.htm;
57
-			}
58
-			
59
-		location /prod-api/{
60
-			proxy_set_header Host $http_host;
61
-			proxy_set_header X-Real-IP $remote_addr;
62
-			proxy_set_header REMOTE-HOST $remote_addr;
63
-			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
64
-			proxy_pass http://localhost:8080/;
65
-		}
66
-		
67
-		error_page   500 502 503 504  /50x.html;
68
-			location = /50x.html {
69
-				root   html;
70
-			}
71
-	}
72
-	server {
73
-		listen       8111;
74
-			server_name  12.34.56.78;
75
-	
76
-		location / { 
77
-			root   /home/website/zxdt/web;
78
-			try_files $uri $uri/ /index.html;
79
-			index  index.html index.htm;
80
-			}
81
-			
82
-		location /wav/{
83
-			proxy_set_header Host $http_host;
84
-			proxy_set_header X-Real-IP $remote_addr;
85
-			proxy_set_header REMOTE-HOST $remote_addr;
86
-			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
87
-			proxy_pass http://192.168.1.10:9000/;
88
-		}
89
-		
90
-		error_page   500 502 503 504  /50x.html;
91
-			location = /50x.html {
92
-				root   html;
93
-			}
94
-	}
95
-	server {
96
-		listen       8011;
97
-			server_name  12.34.56.78;
98
-	
99
-		location / { 
100
-			root   /home/website/zxkf/UI;
101
-			try_files $uri $uri/ /index.html;
102
-			index  index.html index.htm;
103
-			}
104
-			
105
-		location /wav/{
106
-			proxy_set_header Host $http_host;
107
-			proxy_set_header X-Real-IP $remote_addr;
108
-			proxy_set_header REMOTE-HOST $remote_addr;
109
-			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
110
-			proxy_pass http://192.168.1.10:9000/;
111
-		}
112
-		
113
-		error_page   500 502 503 504  /50x.html;
114
-			location = /50x.html {
115
-				root   html;
116
-			}
117
-	}
118
-	server {
119
-		listen       9001;
120
-			server_name  12.34.56.78;
121
-	
122
-		location / {
123
-			root   /home/nuoyi/distFlow;
124
-			try_files $uri $uri/ /index.html;
125
-			index  index.html index.htm;
126
-			}
127
-			
128
-		location /prod-api/{
129
-			proxy_set_header Host $http_host;
130
-			proxy_set_header X-Real-IP $remote_addr;
131
-			proxy_set_header REMOTE-HOST $remote_addr;
132
-			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
133
-			proxy_pass http://localhost:8080/;
134 57
 		}
135
-		
136
-		error_page   500 502 503 504  /50x.html;
137
-			location = /50x.html {
138
-				root   html;
139
-			}
140
-	}
141
-	
142
-	server {
143
-		listen       8091;
144
-			server_name  localhost;
145
-	
146
-		location / {
147
-			root   /home/website/ktgmes/UI/dist;
148
-			try_files $uri $uri/ /index.html;
149
-			index  index.html index.htm;
150
-			}
151 58
 			
152 59
 		location /prod-api/{
153 60
 			proxy_set_header Host $http_host;
154 61
 			proxy_set_header X-Real-IP $remote_addr;
155 62
 			proxy_set_header REMOTE-HOST $remote_addr;
156 63
 			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
157
-			proxy_pass http://localhost:8090/;
64
+			proxy_pass http://127.0.0.1:8080/; # 修改为自己的后端服务地址和端口
158 65
 		}
159 66
 		
160 67
 		error_page   500 502 503 504  /50x.html;
161
-			location = /50x.html {
162
-				root   html;
163
-			}
164
-	}
165
-	
166
-	server {
167
-		listen       8071;
168
-			server_name  localhost;
169
-	
170
-		location / {
171
-			root   /home/website/km/UI/dist;
172
-			try_files $uri $uri/ /index.html;
173
-			index  index.html index.htm;
174
-			}
175
-			
176
-		location /prod-api/{
177
-			proxy_set_header Host $http_host;
178
-			proxy_set_header X-Real-IP $remote_addr;
179
-			proxy_set_header REMOTE-HOST $remote_addr;
180
-			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
181
-			proxy_pass http://localhost:8070/;
68
+		location = /50x.html {
69
+			root   html;
182 70
 		}
183
-		
184
-		error_page   500 502 503 504  /50x.html;
185
-			location = /50x.html {
186
-				root   html;
187
-			}
188 71
 	}
189
-
190
-	server {
191
-		listen       8061;
192
-			server_name  localhost;
193 72
 	
194
-		location / {
195
-			root   /home/website/kfyy/UI;
196
-			try_files $uri $uri/ /index.html;
197
-			index  index.html index.htm;
198
-			}
199
-			
200
-		location /prod-api/{
201
-			proxy_set_header Host $http_host;
202
-			proxy_set_header X-Real-IP $remote_addr;
203
-			proxy_set_header REMOTE-HOST $remote_addr;
204
-			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
205
-			proxy_pass http://localhost:8060/;
206
-		}
207
-		
208
-		error_page   500 502 503 504  /50x.html;
209
-			location = /50x.html {
210
-				root   html;
211
-			}
212
-	}
213
-	
214
-	
215
-	server {
216
-		listen       8084;
217
-			server_name  localhost;
218
-	
219
-		location / {
220
-			root   /home/website/dataroom/UI;
221
-			try_files $uri $uri/ /index.html;
222
-			index  index.html index.htm;
223
-			}
224
-			
225
-		location /prod-api/{
226
-			proxy_set_header Host $http_host;
227
-			proxy_set_header X-Real-IP $remote_addr;
228
-			proxy_set_header REMOTE-HOST $remote_addr;
229
-			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
230
-			proxy_pass http://localhost:8083/;
231
-		}
232
-		
233
-		error_page   500 502 503 504  /50x.html;
234
-			location = /50x.html {
235
-				root   html;
236
-			}
237
-	}
238
-	
239
-	server {
240
-		listen       8021;
241
-			server_name  localhost;
242
-	
243
-		location / {
244
-			root   /home/website/xingyun/UI;
245
-			try_files $uri $uri/ /index.html;
246
-			index  index.html index.htm;
247
-			}
248
-			
249
-		location /prod-api/{
250
-			proxy_set_header Host $http_host;
251
-			proxy_set_header X-Real-IP $remote_addr;
252
-			proxy_set_header REMOTE-HOST $remote_addr;
253
-			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
254
-			proxy_pass http://localhost:8070/;
255
-		}
256
-		
257
-		error_page   500 502 503 504  /50x.html;
258
-			location = /50x.html {
259
-				root   html;
260
-			}
261
-	}
262
-	
263
-	server {
264
-		listen       8261;
265
-			server_name  localhost;
266
-	
267
-		location / {
268
-			root   /home/website/olderp/UI;
269
-			try_files $uri $uri/ /index.html;
270
-			index  index.html index.htm;
271
-			}
272
-			
273
-		location /prod-api/{
274
-			proxy_set_header Host $http_host;
275
-			proxy_set_header X-Real-IP $remote_addr;
276
-			proxy_set_header REMOTE-HOST $remote_addr;
277
-			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
278
-			proxy_pass http://localhost:8070/;
279
-		}
280
-		
281
-		error_page   500 502 503 504  /50x.html;
282
-			location = /50x.html {
283
-				root   html;
284
-			}
285
-	}
286
-	
287
-	server {
288
-		listen       8801;
289
-			server_name  localhost;
290
-	
291
-		location / {
292
-			root   /home/website/ylsf/UI;
293
-			try_files $uri $uri/ /index.html;
294
-			index  index.html index.htm;
295
-			}
296
-			
297
-		location /prod-api/{
298
-			proxy_set_header Host $http_host;
299
-			proxy_set_header X-Real-IP $remote_addr;
300
-			proxy_set_header REMOTE-HOST $remote_addr;
301
-			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
302
-			proxy_pass http://localhost:8070/;
303
-		}
304
-		
305
-		error_page   500 502 503 504  /50x.html;
306
-			location = /50x.html {
307
-				root   html;
308
-			}
309
-	}
310
-
311
-
312
-
313
-        server {
314
-                listen       8811;
315
-                        server_name  localhost;
316
-
317
-                location / {
318
-                        root   /home/website/xlrx/zhengzhou/web;
319
-                        try_files $uri $uri/ /index.html;
320
-                        index  index.html index.htm;
321
-                        }
322
-
323
-                location /prod-api/{
324
-                        proxy_set_header Host $http_host;
325
-                        proxy_set_header X-Real-IP $remote_addr;
326
-                        proxy_set_header REMOTE-HOST $remote_addr;
327
-                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
328
-                        proxy_pass http://localhost:8070/;
329
-                }
330
-
331
-                error_page   500 502 503 504  /50x.html;
332
-                        location = /50x.html {
333
-                                root   html;
334
-                        }
335
-        }
336
-
337
-
338
- server {
339
-                listen       8821;
340
-                        server_name  localhost;
341
-
342
-                location / {
343
-                        root   /home/website/xlrx/xinxiang/web;
344
-                        try_files $uri $uri/ /index.html;
345
-                        index  index.html index.htm;
346
-                        }
347
-
348
-                location /prod-api/{
349
-                        proxy_set_header Host $http_host;
350
-                        proxy_set_header X-Real-IP $remote_addr;
351
-                        proxy_set_header REMOTE-HOST $remote_addr;
352
-                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
353
-                        proxy_pass http://localhost:8070/;
354
-                }
355
-
356
-                error_page   500 502 503 504  /50x.html;
357
-                        location = /50x.html {
358
-                                root   html;
359
-                        }
360
-        }
361
-	 server {
362
-                listen       8151;
363
-                        server_name  localhost;
364
-
365
-                location / {
366
-                        root   /home/website/zhiNengZhiJian;
367
-                        try_files $uri $uri/ /index.html;
368
-                        index  index.html index.htm;
369
-                        }
370
-
371
-                location /prod-api/{
372
-                        proxy_set_header Host $http_host;
373
-                        proxy_set_header X-Real-IP $remote_addr;
374
-                        proxy_set_header REMOTE-HOST $remote_addr;
375
-                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
376
-                        proxy_pass http://localhost:8070/;
377
-                }
378
-
379
-                error_page   500 502 503 504  /50x.html;
380
-                        location = /50x.html {
381
-                                root   html;
382
-                        }
383
-        }
384
-	server {
385
-                listen       8221;
386
-                        server_name  localhost;
387
-
388
-                location / {
389
-                        root   /home/website/huojia;
390
-                        try_files $uri $uri/ /index.html;
391
-                        index  index.html index.htm;
392
-                        }
393
-
394
-                location /prod-api/{
395
-                        proxy_set_header Host $http_host;
396
-                        proxy_set_header X-Real-IP $remote_addr;
397
-                        proxy_set_header REMOTE-HOST $remote_addr;
398
-                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
399
-                        proxy_pass http://localhost:8070/;
400
-                }
401
-
402
-                error_page   500 502 503 504  /50x.html;
403
-                        location = /50x.html {
404
-                                root   html;
405
-                        }
406
-        }
407 73
 	# gzip_vary on;
408 74
 	# gzip_proxied any;
409 75
 	# gzip_comp_level 6;
@@ -418,25 +84,3 @@ http {
418 84
 	include /etc/nginx/conf.d/*.conf;
419 85
 	include /etc/nginx/sites-enabled/*;
420 86
 }
421
-
422
-
423
-#mail {
424
-#	# See sample authentication script at:
425
-#	# http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
426
-# 
427
-#	# auth_http localhost/auth.php;
428
-#	# pop3_capabilities "TOP" "USER";
429
-#	# imap_capabilities "IMAP4rev1" "UIDPLUS";
430
-# 
431
-#	server {
432
-#		listen     localhost:110;
433
-#		protocol   pop3;
434
-#		proxy      on;
435
-#	}
436
-# 
437
-#	server {
438
-#		listen     localhost:143;
439
-#		protocol   imap;
440
-#		proxy      on;
441
-#	}
442
-#}

+ 1 - 1
src/views/main/workflow/ivr/LFComponents/NodePanel.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div class="node-panel">
3 3
     <div class="node-type" v-for="(item, index) in treeList" :key="index" @mousedown="mousedownFunc(item)">
4
-      <SvgIcon style="width: 30px;height: 30px" :icon-class="item.type" color="#67C23A"/>
4
+      <SvgIcon style="width: 30px;height: 30px;margin-left: 15px;" :icon-class="item.type" color="#67C23A"/>
5 5
       <span style="display: block;">{{ item.name }}</span>
6 6
     </div>
7 7
    

+ 7 - 4
src/views/main/workflow/ivr/LFComponents/top.vue

@@ -27,9 +27,9 @@
27 27
     <template #footer>
28 28
       <div class="dialog-footer">
29 29
         <el-button @click="centerDialogVisible = false">取消</el-button>
30
-        <!-- <el-button type="primary" @click="savePlan">
30
+        <el-button type="primary" @click="savePlan">
31 31
           保存
32
-        </el-button> -->
32
+        </el-button>
33 33
       </div>
34 34
     </template>
35 35
   </el-dialog>
@@ -111,10 +111,13 @@ const savePlan = () => {
111 111
     if (valid) {
112 112
       saveLoading.value = true;
113 113
       const graphData = props.lf.getGraphData();
114
-      createPageData('/cycle/cycleplan', {
114
+      createPageData('/call/ivr', {
115 115
         name: form.name,
116 116
         content: form.content ?? '',
117
-        planDetails: JSON.stringify(graphData),
117
+        json: JSON.stringify({
118
+          flowName: form.name,
119
+          flowJson: graphData,
120
+        }),
118 121
       }).then((res) => {
119 122
         saveLoading.value = false;
120 123
         centerDialogVisible.value = false;

+ 7 - 4
src/views/main/workflow/ivr/index.vue

@@ -44,7 +44,7 @@ import NodePanel from './LFComponents/NodePanel.vue';
44 44
 import Control from './LFComponents/Control.vue';
45 45
 import top from './LFComponents/top.vue';
46 46
 import { ElMessage } from 'element-plus';
47
-// import { getPageListData } from '@/api/main/system/system';
47
+import { getPageListData } from '@/api/main/system/system';
48 48
 
49 49
 const props = defineProps({
50 50
   title: {
@@ -177,15 +177,18 @@ const $_registerNode = () => {
177 177
   $_render();
178 178
 };
179 179
 
180
+
180 181
 const $_render = async () => {
181 182
 
182 183
   let flowJson = {};
183 184
   if (cycleId.value) {
184 185
     // 获取数据
185
-    const result = null;//await getPageListData(`/cycle/cycleplan/${cycleId.value}`);
186
+    const result = await getPageListData(`/call/ivr`);
186 187
     console.log(result)
187
-    if (result && result.data?.planDetails) {
188
-      const details = JSON.parse(result.data.planDetails);
188
+    if (result && result.data?.length > 0) {
189
+      const flowDataInfo = result.data[0];
190
+      
191
+      const details = JSON.parse(flowDataInfo?.json)?.flowJson || {};
189 192
       // successNodes
190 193
       if (details.nodes && successNodes.value && successNodes.value.length > 0) {
191 194
         details.nodes = details.nodes.map((item) => {

+ 1 - 1
src/views/main/workflow/ivr/registerNode/sms/smsProperty.vue

@@ -104,7 +104,7 @@
104 104
   const tempList = ref(null);
105 105
 
106 106
   const getSmsTemplate = async () => {
107
-    getPageListData('/sms/template1', {
107
+    getPageListData('/sms/template', {
108 108
       // offset: 0,
109 109
       // size: 999,
110 110
     }).then(res => {

+ 12 - 0
src/views/main/workflow/ivr/registerNode/sql/sqlProperty.vue

@@ -254,6 +254,18 @@ onMounted(() => {
254 254
   propertyForm.name = props.nodeData.properties.name;
255 255
   propertyForm.desc = props.nodeData.properties.desc ? props.nodeData.properties.desc : '';
256 256
   propertyForm.attr = props.nodeData.properties.attr ? props.nodeData.properties.attr : {};
257
+  propertyForm.anchors = props.nodeData.properties.anchors? props.nodeData.properties.anchors : [];
258
+  console.log('props.nodeData.properties', props.nodeData.properties);
259
+
260
+  if (propertyForm.anchors.length) {
261
+    branchParams.show = true;
262
+    branchParams.showAdd = true;
263
+    propertyForm.nodeVars = [{
264
+      name: `${propertyForm.desc}结果`,
265
+      key: propertyForm.attr.id,
266
+      type: propertyForm.anchors[0].outParams.type,
267
+    }];
268
+  }
257 269
 
258 270
   // vars = [];
259 271
   // for (let key in propertyForm.attr) {