|
|
@@ -487,8 +487,6 @@ onMounted(async () => {
|
|
|
targetElement.insertAdjacentElement('afterend', newDiv);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- WebSocketStore.connect();
|
|
|
for (let i = 0; i < customComponent.length; i++) {
|
|
|
if (document.getElementById(customComponent[i].pid)) {
|
|
|
customComponent[i].visible = true;
|
|
|
@@ -497,6 +495,11 @@ onMounted(async () => {
|
|
|
divElement.appendChild(pElement);
|
|
|
}
|
|
|
}
|
|
|
+ try {
|
|
|
+ WebSocketStore.connect();
|
|
|
+ } catch (websocketErr) {
|
|
|
+
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
const viewListContent = ref([])
|
|
|
@@ -1003,11 +1006,16 @@ const findDynamicObjects = (formConfig) => {
|
|
|
return dynamicElements;
|
|
|
}
|
|
|
const sendWebsocket = (msg) => {
|
|
|
- const socketMap = {};
|
|
|
- socketMap.userId = userStore.employeeId;
|
|
|
- socketMap.type = 'REFRESH';
|
|
|
- socketMap.message = msg;
|
|
|
- WebSocketStore.send(JSON.stringify(socketMap));
|
|
|
+ try {
|
|
|
+ const socketMap = {};
|
|
|
+ socketMap.userId = userStore.employeeId;
|
|
|
+ socketMap.type = 'REFRESH';
|
|
|
+ socketMap.message = msg;
|
|
|
+ WebSocketStore.send(JSON.stringify(socketMap));
|
|
|
+ } catch (e) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
// 已阅
|
|
|
const handleReadFlow = () => {
|