diff --git a/src/drawApp/iscsApp.ts b/src/drawApp/iscsApp.ts index 042de0d..0fd32d0 100644 --- a/src/drawApp/iscsApp.ts +++ b/src/drawApp/iscsApp.ts @@ -121,16 +121,10 @@ function handleSubscribe(app: IDrawApp) { app.deleteGraphics(...graphics); } } else { - storage = iscsGraphicData.IscsGraphicStorage.deserialize( - toUint8Array(base64) - ); if (syncData.submenu === '火灾报警平面图') { for (let i = 0; i < storage.fasOfPlatformAlarmStorages.length; i++) { const fasPlatformAlarm = storage.fasOfPlatformAlarmStorages[i]; if (fasPlatformAlarm.stationName == syncData.station) { - // canvasProperty = fasPlatformAlarm.canvas; - // datas = loadCommonDrawDatas(fasPlatformAlarm); - // break; syncData.datas.forEach((data) => { handlerNoEditCommonData( data, @@ -150,12 +144,6 @@ function handleSubscribe(app: IDrawApp) { ) { const ctvOfStationControl = storage.cctvOfStationControlStorages[i]; if (ctvOfStationControl.stationName == syncData.station) { - // canvasProperty = ctvOfStationControl.canvas; - // datas = loadCommonDrawDatas(ctvOfStationControl); - // ctvOfStationControl.cctvButtons.forEach((cctvButton) => { - // datas.push(new CCTVButtonData(cctvButton)); - // }); - // break; syncData.datas.forEach((data) => { handlerNoEditCommonData( data, @@ -202,18 +190,17 @@ export async function loadDrawDatas(): Promise { if (!hasLoadData) { base64 = (await getDraft(id)).data; - hasLoadData = true; - } - if (base64) { - if (!hasLoadData) { + if (base64) { storage = iscsGraphicData.IscsGraphicStorage.deserialize( toUint8Array(base64) ); } - + hasLoadData = true; + } + if (hasLoadData) { let datas = []; let canvasProperty; - + console.log(storage); switch (drawStore.selectSubmenuAndStation.submenu) { case '火灾报警平面图': for (let i = 0; i < storage.fasOfPlatformAlarmStorages.length; i++) { diff --git a/src/layouts/IscsDrawLayout.vue b/src/layouts/IscsDrawLayout.vue index bcea97a..e56578e 100644 --- a/src/layouts/IscsDrawLayout.vue +++ b/src/layouts/IscsDrawLayout.vue @@ -343,21 +343,23 @@ onMounted(() => { const drawApp = drawStore.initDrawApp(); drawApp.bindDom(dom); drawApp.reload(); - const _record = drawApp.opRecord.record; - drawApp.opRecord.record = function (op) { - handleRecordData(op); - _record.call(drawApp.opRecord, op); - }; - const _undo = drawApp.opRecord.undo; - drawApp.opRecord.undo = function () { - _undo.call(drawApp.opRecord); - console.log('undo'); - }; - const _redo = drawApp.opRecord.redo; - drawApp.opRecord.redo = function () { - _redo.call(drawApp.opRecord); - console.log('redo'); - }; + if (route.query.isShared == '1') { + const _record = drawApp.opRecord.record; + drawApp.opRecord.record = function (op) { + handleRecordData(op); + _record.call(drawApp.opRecord, op); + }; + const _undo = drawApp.opRecord.undo; + drawApp.opRecord.undo = function () { + _undo.call(drawApp.opRecord); + console.log('undo'); + }; + const _redo = drawApp.opRecord.redo; + drawApp.opRecord.redo = function () { + _redo.call(drawApp.opRecord); + console.log('redo'); + }; + } onResize(); } else { drawStore.setDraftId(null); diff --git a/src/pages/IscsDraftManage.vue b/src/pages/IscsDraftManage.vue index b1c191e..a5ee606 100644 --- a/src/pages/IscsDraftManage.vue +++ b/src/pages/IscsDraftManage.vue @@ -486,7 +486,10 @@ function goToPath(row: DraftItem) { let path = `/iscsPainting/${row.id}`; const iscsStyle = allRequestData.find((item) => item.draftData.id == row.id) .options.style; - router.push({ path: path, query: { iscsStyle } }); + router.push({ + path: path, + query: { iscsStyle, isShared: row.isShared ? 1 : 2 }, + }); } //发布相关