diff --git a/src/App.vue b/src/App.vue
index 1325c29..b42526e 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -3,7 +3,30 @@
diff --git a/src/drawApp/iscsApp.ts b/src/drawApp/iscsApp.ts
index bf787ff..94bc930 100644
--- a/src/drawApp/iscsApp.ts
+++ b/src/drawApp/iscsApp.ts
@@ -25,6 +25,7 @@ import { getJwt } from 'src/api/UserApi';
import { fromUint8Array, toUint8Array } from 'js-base64';
import { getWebsocketUrl } from 'src/configs/UrlManage';
import { sync_data_message } from 'src/protos/sync_data_message';
+import { useAuthStore } from 'src/stores/auth-store';
// import { getOnlyToken } from 'src/configs/TokenManage';
let drawApp: IDrawApp | null = null;
@@ -87,6 +88,11 @@ function handleSubscribe(app: IDrawApp) {
destination: `/rtss_simulation/draft/iscs/${drawStore.draftId}`,
messageHandle: (message: Uint8Array) => {
const syncData = sync_data_message.SyncData.deserialize(message);
+ console.log(syncData.userId, useAuthStore().userId, 'userID');
+ if (syncData.userId === useAuthStore().userId) {
+ console.info('当前用户操作');
+ return;
+ }
if (
syncData.submenu === drawStore.selectSubmenuAndStation.submenu &&
syncData.station === drawStore.selectSubmenuAndStation.station
diff --git a/src/layouts/IscsDrawLayout.vue b/src/layouts/IscsDrawLayout.vue
index 242786e..d8786f1 100644
--- a/src/layouts/IscsDrawLayout.vue
+++ b/src/layouts/IscsDrawLayout.vue
@@ -257,6 +257,7 @@ import { successNotify } from 'src/utils/CommonNotify';
import { saveDrawDatas } from 'src/drawApp/iscsApp';
import { saveDrawToServer } from 'src/drawApp/commonApp';
import { sync_data_message } from 'src/protos/sync_data_message';
+import { useAuthStore } from 'src/stores/auth-store';
const $q = useQuasar();
const route = useRoute();
@@ -533,6 +534,7 @@ function handleRecordData(op) {
datas: [],
submenu: drawStore.selectSubmenuAndStation.submenu,
station: drawStore.selectSubmenuAndStation.station,
+ userId: useAuthStore().userId,
};
op.obj.forEach((g) => {
const gData = g.saveData();
@@ -545,7 +547,7 @@ function handleRecordData(op) {
);
});
drawApp.publishMessage(
- '/rtss_simulation/draft/iscs/7',
+ `/rtss_simulation/draft/iscs/${drawStore.draftId}`,
new sync_data_message.SyncData({ ...syncData }).serialize()
);
}
diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue
index 937e408..d87dc03 100644
--- a/src/layouts/MainLayout.vue
+++ b/src/layouts/MainLayout.vue
@@ -121,24 +121,24 @@