From 413b42a497ed1b695ceb0acada0122e553021ddb Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期四, 16 四月 2026 16:29:19 +0800
Subject: [PATCH] #仿真系统优化V3.0.0.2

---
 src/main/webapp/components/MapCanvas.js |   39 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 38 insertions(+), 1 deletions(-)

diff --git a/src/main/webapp/components/MapCanvas.js b/src/main/webapp/components/MapCanvas.js
index df54318..9da0b10 100644
--- a/src/main/webapp/components/MapCanvas.js
+++ b/src/main/webapp/components/MapCanvas.js
@@ -33,6 +33,7 @@
           </div>
           <div :style="mapToolRowStyle()">
             <button type="button" @click="openStationColorConfigPage" :style="mapToolButtonStyle(false)">绔欑偣棰滆壊</button>
+            <button v-if="fakeOperationVisible" type="button" @click="openFakeOperationConfigPage" :style="mapToolButtonStyle(false)">浠跨湡鎿嶄綔</button>
           </div>
           <div v-if="levList && levList.length > 1" :style="mapToolFloorSectionStyle()">
             <div :style="mapToolSectionLabelStyle()">妤煎眰</div>
@@ -153,7 +154,8 @@
         'machine-pakout': 0x97b400,
         'site-run-block': 0xe69138,
         'site-error': 0xDB2828
-      }
+      },
+      fakeOperationVisible: false
     }
   },
     mounted() {
@@ -162,6 +164,7 @@
     this.startContainerResizeObserve();
     this.loadMapTransformConfig();
     this.loadStationColorConfig();
+    this.loadFakeProcessStatus();
     this.loadLocList();
     this.connectWs();
 
@@ -2616,6 +2619,40 @@
       }
       window.open(url, '_blank');
     },
+    loadFakeProcessStatus() {
+      if (typeof window === 'undefined' || typeof $ === 'undefined' || typeof baseUrl === 'undefined') {
+        this.fakeOperationVisible = false;
+        return;
+      }
+      $.ajax({
+        url: baseUrl + '/openapi/getFakeSystemRunStatus',
+        method: 'get',
+        success: function (res) {
+          const data = res && res.data ? res.data : null;
+          this.fakeOperationVisible = !!(data && data.isFake);
+        }.bind(this),
+        error: function () {
+          this.fakeOperationVisible = false;
+        }.bind(this)
+      });
+    },
+    openFakeOperationConfigPage() {
+      if (typeof window === 'undefined' || !this.fakeOperationVisible) { return; }
+      const url = (typeof baseUrl !== 'undefined' ? baseUrl : '') + '/views/watch/fakeOperationConfig.html';
+      const layerInstance = (window.top && window.top.layer) || window.layer;
+      if (layerInstance && typeof layerInstance.open === 'function') {
+        layerInstance.open({
+          type: 2,
+          title: '浠跨湡鎿嶄綔',
+          maxmin: true,
+          area: ['1180px', '820px'],
+          shadeClose: false,
+          content: url
+        });
+        return;
+      }
+      window.open(url, '_blank');
+    },
     parseRotation(value) {
       const num = parseInt(value, 10);
       if (!isFinite(num)) { return 0; }

--
Gitblit v1.9.1