From d4d2b680baff18f950da5e77463c1f0e26dbd567 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 03 四月 2025 10:10:25 +0800
Subject: [PATCH] 2025-04-03

---
 src/index.js                                            |   18 ++++--
 src/tabviews/custom/components/card/prop-card/index.jsx |    8 ++
 src/views/login/index.scss                              |   47 ++++++---------
 public/manifest.json                                    |    2 
 src/menu/components/card/data-card/options.jsx          |   10 +++
 src/views/main/index.jsx                                |   11 +++
 src/views/login/index.jsx                               |   51 +++++++++++++---
 7 files changed, 100 insertions(+), 47 deletions(-)

diff --git a/public/manifest.json b/public/manifest.json
index 18d9315..a87928a 100644
--- a/public/manifest.json
+++ b/public/manifest.json
@@ -6,5 +6,5 @@
   "display": "standalone",
   "theme_color": "#000000",
   "background_color": "#ffffff",
-  "mk_version": "20250301"
+  "mk_version": "20250402"
 }
diff --git a/src/index.js b/src/index.js
index c9d0634..fc30346 100644
--- a/src/index.js
+++ b/src/index.js
@@ -260,6 +260,8 @@
         GLOB.showline = _systemMsg.showline || ''
         GLOB.navBar = _systemMsg.navBar || 'shutter'
         GLOB.appVersion = _systemMsg.app_version || ''
+        GLOB.loginOtop = _systemMsg.loginOtop || ''
+        GLOB.loginOleft = _systemMsg.loginOleft || ''
         sessionStorage.setItem('appname', _systemMsg.appname || '')
 
         let levels = [30, 10, 20, 40, 50, 60, 70, 80, 90, 100]
@@ -402,12 +404,16 @@
         value: GLOB.debugger
       })
     } else if (GLOB.sysType === 'cloud') {
-      Object.defineProperty(GLOB, 'debugger', {
-        writable: false,
-        value: GLOB.debugger
-      })
-
-      GLOB.breakpoint = false
+      if (sessionStorage.getItem('cloudRun') === 'debug') {
+        GLOB.debugger = true
+      } else {
+        Object.defineProperty(GLOB, 'debugger', {
+          writable: false,
+          value: GLOB.debugger
+        })
+  
+        GLOB.breakpoint = false
+      }
     } else {
       if (sessionStorage.getItem('breakpoint')) {
         GLOB.debugger = true
diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx
index 4b010f9..9b0aeec 100644
--- a/src/menu/components/card/data-card/options.jsx
+++ b/src/menu/components/card/data-card/options.jsx
@@ -484,9 +484,19 @@
       forbid: subtype !== 'propcard' && subtype !== 'datacard',
       controlFields: [
         {field: 'emptyExec', notNull: true},
+        {field: 'execDelay', notNull: true},
       ]
     },
     {
+      type: 'number',
+      field: 'execDelay',
+      label: '鎵ц寤舵椂',
+      initval: wrap.execDelay,
+      tooltip: '鑷姩鎵ц鎸夐挳鐨勫欢鏃舵墽琛屾椂闂达紝鍗曚綅姣銆�',
+      required: false,
+      forbid: subtype !== 'propcard'
+    },
+    {
       type: 'radio',
       field: 'emptyExec',
       label: '绌哄�兼墽琛�',
diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx
index 0035cff..5008784 100644
--- a/src/tabviews/custom/components/card/prop-card/index.jsx
+++ b/src/tabviews/custom/components/card/prop-card/index.jsx
@@ -404,7 +404,13 @@
     if (config.setting.supModule && config.wrap.datatype === 'static' && !data.$$BID) {
 
     } else if (btn) {
-      MKEmitter.emit('triggerBtnId', config.wrap.autoExec, data.$$empty ? [] : [data])
+      if (config.wrap.execDelay) {
+        setTimeout(() => {
+          MKEmitter.emit('triggerBtnId', config.wrap.autoExec, data.$$empty ? [] : [data])
+        }, config.wrap.execDelay)
+      } else {
+        MKEmitter.emit('triggerBtnId', config.wrap.autoExec, data.$$empty ? [] : [data])
+      }
     } else if (!times || times < 20) {
       times = times ? times + 1 : 1
       this.autoTimer = setTimeout(() => {
diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx
index 0a0adc0..d0bc503 100644
--- a/src/views/login/index.jsx
+++ b/src/views/login/index.jsx
@@ -667,6 +667,20 @@
             if (!['shutter', 'linkage_navigation', 'linkage', 'menu_board', 'menu_board_navigation'].includes(res.menu_type)) {
               res.menu_type = 'shutter'
             }
+            
+            let loginOtop = ''
+            let loginOleft = ''
+            let windowWidth = window.innerWidth
+            let fix = null
+            res.login_screen_offset && res.login_screen_offset.forEach(item => {
+              if (!item.offset_x && !item.offset_y) return
+
+              if (fix === null || Math.abs(windowWidth - item.resolution_width) < fix) {
+                fix = Math.abs(windowWidth - item.resolution_width)
+                loginOtop = item.offset_y + item.y_unit
+                loginOleft = item.offset_x + item.x_unit
+              }
+            })
 
             let systemMsg = {
               favicon: res.titlelogo || '',
@@ -684,7 +698,9 @@
               navBar: res.menu_type, // shutter 鐧惧彾绐椼�乴inkage_navigation 鑱斿姩鑿滃崟銆乴inkage 鑱斿姩鑿滃崟_鏃犲鑸爮銆乵enu_board 鑿滃崟闈㈡澘銆乵enu_board_navigation 鑿滃崟闈㈡澘_鏍囩椤�
               app_version: res.app_version,
               Member_Level: 0,
-              appname: res.appname || ''
+              appname: res.appname || '',
+              loginOtop: loginOtop,
+              loginOleft: loginOleft
             }
 
             if ([10, 20, 30, 40, 50, 60, 70, 80, 90, 100].includes(res.member_level)) {
@@ -798,6 +814,9 @@
               window.location.reload()
               return
             }
+
+            window.GLOB.loginOtop = systemMsg.loginOtop
+            window.GLOB.loginOleft = systemMsg.loginOleft
             
             this.setState({
               loginWays: login_ways,
@@ -1024,12 +1043,24 @@
   render () {
     const { lineColor, loginlogo, bgImage, copyRight, webSite, ICP, loginWays, platName } = this.state
 
+    let wrapStyle = {}
+
+    if (bgImage) {
+      wrapStyle.backgroundImage = `url(${bgImage})`
+    }
+    if (window.GLOB.loginOtop) {
+      wrapStyle['--mk-login-offset-top'] = window.GLOB.loginOtop
+    }
+    if (window.GLOB.loginOleft) {
+      wrapStyle['--mk-login-offset-left'] = window.GLOB.loginOleft
+    }
+
     return (
-      <div className="login-container" id="mk-login-view">
+      <div className="login-container" id="mk-login-view" style={wrapStyle}>
         <div className="logo" style={lineColor ? {borderColor: lineColor} : {}}>
           {loginlogo ? <img src={loginlogo} alt=""/> : null}
         </div>
-        <div className="login-middle" style={bgImage ? {backgroundImage: 'url(' + bgImage + ')'} : null}>
+        <div className="login-middle">
           {loginWays ? <LoginForm
             auth={this.state.auth}
             authError={this.state.authError}
@@ -1041,13 +1072,13 @@
             authLogin={this.authLogin}
             wrappedComponentRef={(inst) => this.loginformRef = inst}
           /> : null}
-          <div className="login-bottom">
-            {webSite && copyRight ?
-              <a target="_blank" rel="noopener noreferrer" href={webSite} dangerouslySetInnerHTML={{ __html: copyRight.replace(/\s/ig, '&nbsp;') }}></a> :
-              <p dangerouslySetInnerHTML={{ __html: copyRight ? copyRight.replace(/\s/ig, '&nbsp;') : '' }}></p>
-            }
-            {ICP ? <a target="_blank" rel="noopener noreferrer" href="https://beian.miit.gov.cn/#/Integrated/index" dangerouslySetInnerHTML={{ __html: ICP.replace(/\s/ig, '&nbsp;') }}></a> : null}
-          </div>
+        </div>
+        <div className="login-bottom">
+          {webSite && copyRight ?
+            <a target="_blank" rel="noopener noreferrer" href={webSite} dangerouslySetInnerHTML={{ __html: copyRight.replace(/\s/ig, '&nbsp;') }}></a> :
+            <p dangerouslySetInnerHTML={{ __html: copyRight ? copyRight.replace(/\s/ig, '&nbsp;') : '' }}></p>
+          }
+          {ICP ? <a target="_blank" rel="noopener noreferrer" href="https://beian.miit.gov.cn/#/Integrated/index" dangerouslySetInnerHTML={{ __html: ICP.replace(/\s/ig, '&nbsp;') }}></a> : null}
         </div>
         {/* 缂栬緫鐘舵�佺櫥褰� */}
         <Modal
diff --git a/src/views/login/index.scss b/src/views/login/index.scss
index 736416c..085d3ea 100644
--- a/src/views/login/index.scss
+++ b/src/views/login/index.scss
@@ -3,9 +3,13 @@
   height: 100vh;
   min-height: 600px;
   background-color: var(--mk-sys-background);
-  background-size: cover;
+  // background-image: url('http://bms-test.kresstools.cn/Content/images/login2/bg_mid.png');
+  background-size: contain;
   background-repeat: no-repeat;
-  background-position: center center;
+  background-position: center 100px;
+  --mk-login-offset-top: 0px;
+  --mk-login-offset-left: 0px;
+
   .logo {
     position: relative;
     height: 100px;
@@ -29,13 +33,13 @@
 
   .login-middle {
     position: relative;
-    height: calc(100vh - 100px);
-    min-height: 475px;
-    background-image: url('http://bms-test.kresstools.cn/Content/images/login2/bg_mid.png');
-    background-size: contain;
-    background-repeat: no-repeat;
-    background-position: center center;
-    // border-bottom: 2px solid var(--mk-sys-color);
+    height: calc(100vh - 200px);
+    min-height: 420px;
+    display: flex;
+    align-items: center;
+    justify-content: right;
+    padding-right: 20vw;
+    overflow: hidden;
 
     .login-form-button {
       background-color: var(--mk-sys-color);
@@ -54,9 +58,6 @@
 
     .login-form {
       position: relative;
-      float: right;
-      margin-top: 6%;
-      margin-right: 20%;
       background: #ffffff;
       width: 22vw;
       min-width: 300px;
@@ -64,6 +65,9 @@
       overflow: hidden;
       border: 1px solid #bfbfbf;
       z-index: 3;
+      top: var(--mk-login-offset-top, 0px);
+      left: var(--mk-login-offset-left, 0px);
+      transition: all 0.2s;
 
       .login-way-title {
         font-size: 18px;
@@ -336,23 +340,8 @@
 @media screen and (max-width: 500px) {
   .login-container {
     .login-middle {
-      .login-form {
-        float: unset;
-        margin: 0 auto;
-        margin-top: 5%;
-      }
-    }
-  }
-}
-
-@media screen and (min-width: 1550px) {
-  .login-container {
-    .ant-tabs.ant-tabs-card {
-      .ant-tabs-card-bar {
-        .ant-tabs-tab {
-          font-size: 20px;
-        }
-      }
+      justify-content: center;
+      padding-right: 0px;
     }
   }
 }
\ No newline at end of file
diff --git a/src/views/main/index.jsx b/src/views/main/index.jsx
index 6971bcf..2686a48 100644
--- a/src/views/main/index.jsx
+++ b/src/views/main/index.jsx
@@ -68,6 +68,17 @@
           MKEmitter.emit('debugChange')
         }
       })
+    } else {
+      Object.defineProperty(window, 'debugger', {
+        configurable: true,
+        enumerable: true,
+        set(value) {
+          if (value === 1949) {
+            sessionStorage.setItem('cloudRun', 'debug')
+            window.location.reload()
+          }
+        }
+      })
     }
   }
 

--
Gitblit v1.8.0