refactor(websocket): 重构 WebSocket 服务端

- 优化 CsWsClientManager 类,改用 clientMap 存储客户端连接
- 重构 CsWsMessage 类,将 bizType 改为 bizCode
- 优化 CsWsServer 类,增加任务线程管理功能
- 重构 PipelineInstanceService 接口,修改 queryLastPipelineDetailWs 方法参数
- 优化 PipelineInstanceServiceImpl 中的查询逻辑
- 更新前端 WebSocket 连接逻辑,采用新的 sid 格式
This commit is contained in:
2025-07-24 20:01:56 +08:00
parent 44aad9816f
commit 8df8d1c08e
13 changed files with 151 additions and 100 deletions
@@ -11,7 +11,7 @@ export default {
* @param confirmCallBack 确认回调
* @param cancelCallBack 取消回调
*/
FullConfirm(questionText, msgType, confirmCallBack, cancelCallBack) {
FullConfirm: function(questionText, msgType, confirmCallBack, cancelCallBack) {
let currentType = 'info'
if (msgType === 's') {
currentType = 'success'
@@ -38,7 +38,7 @@ export default {
* @param confirmCallBack 确认回调
* @param cancelCallBack 取消回调
*/
DeleteConfirm(confirmCallBack, cancelCallBack) {
DeleteConfirm: function(confirmCallBack, cancelCallBack) {
this.FullConfirm('确定删除本条数据吗?', 'w', confirmCallBack, cancelCallBack)
}, /**
* 数据删除确认对话框(自定义提示内容)
@@ -46,7 +46,7 @@ export default {
* @param confirmCallBack 确认回调
* @param cancelCallBack 取消回调
*/
DeleteMessageConfirm(message, confirmCallBack, cancelCallBack) {
DeleteMessageConfirm: function(message, confirmCallBack, cancelCallBack) {
this.FullConfirm(message, 'w', confirmCallBack, cancelCallBack)
}, /**
* 数据输入对话框
@@ -56,7 +56,7 @@ export default {
* @param confirmCallBack 校验通过回调
* @param cancelCallBack 取消回调
*/
TextInputConfirm(title, patternText, errorMsg, confirmCallBack, cancelCallBack) {
TextInputConfirm: function(title, patternText, errorMsg, confirmCallBack, cancelCallBack) {
Vue.prototype.$prompt('', title, {
confirmButtonText: '确定', cancelButtonText: '取消', inputPattern: patternText, inputErrorMessage: errorMsg
}).then(({ value }) => {
@@ -73,7 +73,7 @@ export default {
* @param title 标题
* @param content 内容
*/
ShowConfirm(title, content) {
ShowConfirm: function(title, content) {
Vue.prototype.$alert(content, title, {
confirmButtonText: '关闭'
})
@@ -3,22 +3,22 @@ import Vue from 'vue'
* 消息提示
*/
export default {
Info(content) {
Info: function(content) {
Vue.prototype.$message({
message: content, type: 'info'
})
},
Success(content) {
Success: function(content) {
Vue.prototype.$message({
message: content, type: 'success'
})
},
Warning(content) {
Warning: function(content) {
Vue.prototype.$message({
message: content, type: 'warning'
})
},
Error(content) {
Error: function(content) {
Vue.prototype.$message({
message: content, type: 'error'
})
@@ -4,17 +4,17 @@ import Vue from 'vue'
* 通知
*/
export default {
Info(content) {
Info: function(content) {
Vue.prototype.$notify({ message: content, type: 'info' })
}, Success(content) {
}, Success: function(content) {
Vue.prototype.$notify({ message: content, type: 'success' })
}, SuccessDuration(content, durationTime) {
}, SuccessDuration: function(content, durationTime) {
Vue.prototype.$notify({ message: content, type: 'success', duration: durationTime })
}, Warning(content) {
}, Warning: function(content) {
Vue.prototype.$notify({ message: content, type: 'warning' })
}, Error(content) {
}, Error: function(content) {
Vue.prototype.$notify({ message: content, type: 'error' })
}, ErrorDuration(content, durationTime) {
}, ErrorDuration: function(content, durationTime) {
Vue.prototype.$notify({ message: content, type: 'error', duration: durationTime })
}
}