psl弹窗调整

This commit is contained in:
fan 2023-10-10 13:49:55 +08:00
parent 0119db9891
commit 71105aa7fb
2 changed files with 10 additions and 6 deletions

View File

@ -652,13 +652,17 @@ abstract class GraphicSceneBase
}
private async load(): Promise<void> {
console.log(this._options.dataLoader, '=====');
if (this._options.dataLoader) {
const storage = await this._options.dataLoader();
console.log(storage, 'storage');
if (storage.canvasProperty) {
this.canvas.update(storage.canvasProperty);
console.log(this.canvas, 'canvas');
}
if (storage.datas) {
await this.loadGraphic(storage.datas);
console.log('load');
}
}
this._loaded = true;

View File

@ -44,7 +44,7 @@
<div id="line-app-container" class="overflow-hidden"></div>
</q-page-container>
<q-dialog v-model="pslDialog">
<q-page-container style="width: 510px; height: 650px; background: #fff">
<q-page-container style="width: 1920px; height: 950px">
<div id="psl-app-container" class="overflow-hidden"></div>
</q-page-container>
</q-dialog>
@ -219,17 +219,17 @@ function switchScene(val: MapInfo) {
function pslShow() {
pslDialog.value = true;
const pslApp = usePslStore().initLineApp();
nextTick(() => {
const dom = document.getElementById('psl-app-container');
if (dom) {
const pslApp = usePslStore().initLineApp();
usePslStore().addAllScene([{ type: 1, id: 145 }]);
pslApp.bindDom(dom);
usePslStore().setMapId(145);
usePslStore().addAllScene([{ type: 1, id: 146 }]);
usePslStore().setMapId(146);
usePslStore().setSimulationId(simulationId);
sceneName = getSceneNameFn({ type: 1, id: 145 });
sceneName = getSceneNameFn({ type: 1, id: 146 });
usePslStore().setSceneName(sceneName);
scene = pslApp.getScene(sceneName);
scene.bindDom(dom);
scene.reload();
dom.style.width = '500px';
dom.style.height = '600px';