代码调整
This commit is contained in:
parent
c0cc5fac14
commit
f6e0785633
@ -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<IGraphicStorage> {
|
||||
|
||||
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++) {
|
||||
|
@ -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);
|
||||
|
@ -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 },
|
||||
});
|
||||
}
|
||||
|
||||
//发布相关
|
||||
|
Loading…
Reference in New Issue
Block a user