From fa3c957b2913452f3b1c7039dfab3ceb554045f4 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 02 十一月 2024 23:26:41 +0800
Subject: [PATCH] 2024-11-02

---
 src/components/header/index.scss                               |   34 ------
 src/components/header/sysmessage.jsx                           |   57 +++++++++--
 src/components/header/sysmessage.scss                          |   73 ++++++++++++++
 src/views/mobdesign/index.scss                                 |   29 +++++
 src/views/pcdesign/index.scss                                  |   29 +++++
 src/views/appcheck/index.jsx                                   |    2 
 src/views/appmanage/index.jsx                                  |    2 
 src/views/pcdesign/index.jsx                                   |    4 
 src/tabviews/custom/components/card/double-data-card/index.jsx |   17 ++-
 src/views/mobdesign/index.jsx                                  |    4 
 src/tabviews/custom/components/card/data-card/index.jsx        |   12 +
 11 files changed, 201 insertions(+), 62 deletions(-)

diff --git a/src/components/header/index.scss b/src/components/header/index.scss
index 471f2e5..7ba7cf0 100644
--- a/src/components/header/index.scss
+++ b/src/components/header/index.scss
@@ -309,38 +309,4 @@
       margin-top: 15px;
     }
   }
-}
-.mk-msg-icon {
-  font-size: 16px;
-  margin-top: 17px;
-  margin-right: 20px;
-  margin-left: 0px;
-  color: #1CD66C;
-  cursor: pointer;
-}
-.mk-msg-icon[data-title] {
-  position: relative;
-
-  &::before {
-    content: " ";
-    position: absolute;
-    top: 6px;
-    left: 2px;
-    z-index: -1;
-    width: 12px;
-    height: 3px;
-    display: block;
-    background: #fff;
-  }
-  &::after {
-    position: absolute;
-    top: -10px;
-    left: 15px;
-    color: #f5222d;
-    font-size: 12px;
-    line-height: 16px;
-    white-space: nowrap;
-    font-weight: 600;
-    content: attr(data-title);
-  }
 }
\ No newline at end of file
diff --git a/src/components/header/sysmessage.jsx b/src/components/header/sysmessage.jsx
index 339debe..3c3b82a 100644
--- a/src/components/header/sysmessage.jsx
+++ b/src/components/header/sysmessage.jsx
@@ -1,31 +1,66 @@
 import React, { Component } from 'react'
-import { MessageFilled } from '@ant-design/icons'
+import { notification } from 'antd'
+import { MessageFilled, CloseOutlined } from '@ant-design/icons'
 
-import MKEmitter from '@/utils/events.js'
+import Api from '@/api'
+// import MKEmitter from '@/utils/events.js'
+
+import './sysmessage.scss'
 
 class SysMessage extends Component {
   state = {
-
+    visible: false,
+    notices: []
   }
 
   UNSAFE_componentWillMount () {
     
   }
 
-  open = () => {
-    let menu = {
-      MenuID: 'message_page_id',
-      MenuName: '绯荤粺娑堟伅',
-      type: 'SysMessage'
+  getMsgList = () => {
+    let param = {
+      func: 's_get_kei'
     }
 
-    MKEmitter.emit('modifyTabs', menu)
+    Api.getSystemConfig(param).then(result => {
+      if (result.status) {
+        let notices = result.data
+
+        this.setState({ notices })
+      } else {
+        notification.warning({
+          top: 92,
+          message: result.message,
+          duration: 5
+        })
+      }
+    })
+  }
+
+  open = () => {
+    // let menu = {
+    //   MenuID: 'message_page_id',
+    //   MenuName: '绯荤粺娑堟伅',
+    //   type: 'SysMessage'
+    // }
+
+    // MKEmitter.emit('modifyTabs', menu)
+    this.setState({ visible: true })
   }
 
   render() {
-    return (
+    const { visible } = this.state
+
+    return (<>
       <MessageFilled className="mk-msg-icon" data-title="23" onClick={this.open} />
-    )
+      <div className={'mk-msg-wrap' + (visible ? ' visible' : '')}>
+        <div className="title">
+          绯荤粺娑堟伅
+          <CloseOutlined />
+        </div>
+        <div>list</div>
+      </div>
+    </>)
   }
 }
 
diff --git a/src/components/header/sysmessage.scss b/src/components/header/sysmessage.scss
new file mode 100644
index 0000000..6973c88
--- /dev/null
+++ b/src/components/header/sysmessage.scss
@@ -0,0 +1,73 @@
+.mk-msg-icon {
+  font-size: 16px;
+  margin-top: 17px;
+  margin-right: 20px;
+  margin-left: 0px;
+  color: #1CD66C;
+  cursor: pointer;
+}
+.mk-msg-icon[data-title] {
+  position: relative;
+
+  &::before {
+    content: " ";
+    position: absolute;
+    top: 6px;
+    left: 2px;
+    z-index: -1;
+    width: 12px;
+    height: 3px;
+    display: block;
+    background: #fff;
+  }
+  &::after {
+    position: absolute;
+    top: -10px;
+    left: 15px;
+    color: #f5222d;
+    font-size: 12px;
+    line-height: 16px;
+    white-space: nowrap;
+    font-weight: 600;
+    content: attr(data-title);
+  }
+}
+.mk-msg-wrap {
+  position: fixed;
+  width: 200px;
+  height: 400px;
+  top: 92px;
+  right: 15px;
+  z-index: -1;
+  opacity: 0;
+  padding: 10px;
+  font-size: 13px;
+  background-color: #fff;
+  background-clip: padding-box;
+  color: rgba(0, 0, 0, 0.85);
+  border: 0;
+  border-radius: 4px;
+  -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+  pointer-events: auto;
+  transition: all 0.2s;
+
+  .title {
+    text-align: center;
+
+    .anticon-close {
+      position: absolute;
+      right: 10px;
+      color: rgba(0, 0, 0, 0.45);
+      cursor: pointer;
+      transition: color 0.2s;
+    }
+    .anticon-close:hover {
+      color: rgba(0, 0, 0, 0.85);
+    }
+  }
+}
+.mk-msg-wrap.visible {
+  z-index: 3000;
+  opacity: 1;
+}
\ No newline at end of file
diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx
index 92f4093..a8fb5a3 100644
--- a/src/tabviews/custom/components/card/data-card/index.jsx
+++ b/src/tabviews/custom/components/card/data-card/index.jsx
@@ -191,12 +191,16 @@
     }
 
     if (_config.wrap.zHeight) {
+      _config.wrap.zoomStyle = {}
       if (_config.wrap.zHeight <= 100) {
         if (_config.wrap.zHeight < 0) {
-          _config.wrap.zHeight = `calc(100vh - ${-_config.wrap.zHeight}px)`
+          _config.wrap.zoomStyle.maxHeight = `calc(100vh - ${-_config.wrap.zHeight}px)`
+          _config.wrap.zoomStyle.minHeight = '100px'
         } else {
-          _config.wrap.zHeight = _config.wrap.zHeight + 'vh'
+          _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'vh'
         }
+      } else {
+        _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'px'
       }
 
       if (_config.style) {
@@ -204,7 +208,7 @@
       }
       _config.wrap.layout += ' fix-height'
     } else {
-      _config.wrap.zHeight = 'none'
+      _config.wrap.zoomStyle = null
     }
 
     this.setState({
@@ -1234,7 +1238,7 @@
         {config.wrap.pickup === 'true' && this.state.data.length > 0 ? <div className="pickup-wrap"><Switch title="鏀惰捣" checkedChildren={window.GLOB.dict['open'] || '寮�'} unCheckedChildren={window.GLOB.dict['shut'] || '鍏�'} checked={pickup} onChange={this.pickupChange} /></div> : null}
         <div className={`data-zoom ${config.wrap.wrapClass}`}>
           {switchable ? <div className={'prev-page ' + (pageIndex === 1 ? 'disabled' : '')} onClick={this.prevPage}><div><div><img src={preImg} alt=""/></div></div></div> : null}
-          <Row className={'card-row-list ' + config.wrap.layout} style={{maxHeight: config.wrap.zHeight}}>
+          <Row className={'card-row-list ' + config.wrap.layout} style={config.wrap.zoomStyle}>
             {precards.map((item, index) => (
               <Col key={'pre' + index} className="extend-card" style={item.wStyle} span={item.setting.width || 6}>
                 {item.setting.cardRole === 'header' ? <TableHeader card={item} data={extendData} refresh={this.refreshByHeader}>
diff --git a/src/tabviews/custom/components/card/double-data-card/index.jsx b/src/tabviews/custom/components/card/double-data-card/index.jsx
index da1f7b4..90b5ea2 100644
--- a/src/tabviews/custom/components/card/double-data-card/index.jsx
+++ b/src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -130,20 +130,23 @@
     _config.wrap.wrapClass =  `${_config.wrap.selStyle} ${_config.wrap.cardType || ''}`
 
     if (_config.wrap.zHeight || _config.wrap.minWidth) {
+      _config.wrap.zoomStyle = {
+        maxHeight: 'none',
+        '--mk-data-zoom-width': _config.wrap.minWidth ? _config.wrap.minWidth + 'px' : '100%'
+      }
+
       if (_config.wrap.zHeight) {
         if (_config.wrap.zHeight <= 100) {
           if (_config.wrap.zHeight < 0) {
-            _config.wrap.zHeight = `calc(100vh - ${-_config.wrap.zHeight}px)`
+            _config.wrap.zoomStyle.maxHeight = `calc(100vh - ${-_config.wrap.zHeight}px)`
+            _config.wrap.zoomStyle.minHeight = '100px'
           } else {
-            _config.wrap.zHeight = _config.wrap.zHeight + 'vh'
+            _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'vh'
           }
+        } else {
+          _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'px'
         }
         _config.wrap.wrapClass += ' fix-height'
-      }
-      _config.wrap.minWidth = _config.wrap.minWidth ? _config.wrap.minWidth + 'px' : '100%'
-      _config.wrap.zoomStyle = {
-        maxHeight: _config.wrap.zHeight || 'none',
-        '--mk-data-zoom-width': _config.wrap.minWidth
       }
     } else {
       _config.wrap.zoomStyle = null
diff --git a/src/views/appcheck/index.jsx b/src/views/appcheck/index.jsx
index bb78f91..5e669d2 100644
--- a/src/views/appcheck/index.jsx
+++ b/src/views/appcheck/index.jsx
@@ -27,7 +27,7 @@
   bg_black_style_magenta: {name: '娲嬬孩鑹�', color: '#eb2f96'},
   bg_black_style_grass_green: {name: '鑽夌豢鑹�', color: '#aeb303'},
   bg_black_style_deep_red: {name: '娣辩孩鑹�', color: '#c32539'},
-  bg_black_style_deep_blue: {name: '娣辩孩鑹�', color: '#1d3661'}
+  bg_black_style_deep_blue: {name: '娣辫摑鑹�', color: '#1d3661'}
 }
 
 class AppCheck extends Component {
diff --git a/src/views/appmanage/index.jsx b/src/views/appmanage/index.jsx
index c352ad1..8781fbf 100644
--- a/src/views/appmanage/index.jsx
+++ b/src/views/appmanage/index.jsx
@@ -37,7 +37,7 @@
   bg_black_style_magenta: {name: '娲嬬孩鑹�', color: '#eb2f96'},
   bg_black_style_grass_green: {name: '鑽夌豢鑹�', color: '#aeb303'},
   bg_black_style_deep_red: {name: '娣辩孩鑹�', color: '#c32539'},
-  bg_black_style_deep_blue: {name: '娣辩孩鑹�', color: '#1d3661'}
+  bg_black_style_deep_blue: {name: '娣辫摑鑹�', color: '#1d3661'}
 }
 
 class AppManage extends Component {
diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx
index fac19ba..4d66399 100644
--- a/src/views/mobdesign/index.jsx
+++ b/src/views/mobdesign/index.jsx
@@ -2249,8 +2249,8 @@
               <PictureController/>
               <Quotecomponent config={config} updateConfig={this.updateConfig}/>
               <StyleCombControlButton menu={config} />
-              <Button className="mk-border-green set-home" disabled={MenuId === appHomeId} onClick={this.setHomeView}><HomeOutlined /> 璁句负棣栭〉</Button>
-              <Button className="mk-border-purple" disabled={MenuId === appLoginId} onClick={this.setLoginView}><LoginOutlined /> 璁句负鐧诲綍椤�</Button>
+              <Button className="mk-border-green set-home" disabled={MenuId === appHomeId} data-title="褰撳墠鑿滃崟涓哄簲鐢ㄩ椤�" onClick={this.setHomeView}><HomeOutlined /> 璁句负棣栭〉</Button>
+              <Button className="mk-border-purple" disabled={MenuId === appLoginId} data-title="褰撳墠鑿滃崟涓哄簲鐢ㄧ櫥褰曢〉" onClick={this.setLoginView}><LoginOutlined /> 璁句负鐧诲綍椤�</Button>
               <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
               <Transfer MenuID={MenuId} />
               {config ? <Versions MenuId={MenuId} Template="webPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null}
diff --git a/src/views/mobdesign/index.scss b/src/views/mobdesign/index.scss
index 6d6d812..ff5bcce 100644
--- a/src/views/mobdesign/index.scss
+++ b/src/views/mobdesign/index.scss
@@ -292,6 +292,35 @@
       height: 20px;
     }
   }
+
+  [data-title]:disabled {
+    position: relative;
+    &::after {
+      position: absolute;
+      z-index: 20;
+      top: -35px;
+      left: 50%;
+      pointer-events: none;
+      opacity: 0;
+      transform: translateX(-50%) translateY(-5px);
+      transition: opacity .3s, transform .3s;
+      padding: 8px;
+      background-color: #21242a;
+      border-radius: 4px;
+      box-shadow: 0 5px 15px rgba(#000, .2);
+      color: #fff;
+      font-size: 13px;
+      line-height: 16px;
+      white-space: nowrap;
+      content: attr(data-title);
+    }
+    &:hover {
+      &::after {
+        opacity: 1;
+        transform: translateX(-50%) translateY(0);
+      }
+    }
+  }
 }
 
 .mk-mob-view.userbind {
diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx
index a0cbab2..7fef173 100644
--- a/src/views/pcdesign/index.jsx
+++ b/src/views/pcdesign/index.jsx
@@ -1872,8 +1872,8 @@
                 <PictureController/>
                 <Quotecomponent config={config} updateConfig={this.updateConfig}/>
                 <StyleCombControlButton menu={config} />
-                <Button className="mk-border-green" disabled={MenuId === appHomeId} onClick={this.setHomeView}><HomeOutlined /> 璁句负棣栭〉</Button>
-                <Button className="mk-border-purple" disabled={MenuId === appLoginId} onClick={this.setLoginView}><LoginOutlined/> 璁句负鐧诲綍椤�</Button>
+                <Button className="mk-border-green" disabled={MenuId === appHomeId} data-title="褰撳墠鑿滃崟涓哄簲鐢ㄩ椤�" onClick={this.setHomeView}><HomeOutlined /> 璁句负棣栭〉</Button>
+                <Button className="mk-border-purple" disabled={MenuId === appLoginId} data-title="褰撳墠鑿滃崟涓哄簲鐢ㄧ櫥褰曢〉" onClick={this.setLoginView}><LoginOutlined/> 璁句负鐧诲綍椤�</Button>
                 <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
                 <Transfer MenuID={MenuId} />
                 {config ? <Versions MenuId={MenuId} Template="webPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null}
diff --git a/src/views/pcdesign/index.scss b/src/views/pcdesign/index.scss
index 0d2b917..b9138e1 100644
--- a/src/views/pcdesign/index.scss
+++ b/src/views/pcdesign/index.scss
@@ -266,6 +266,35 @@
     border: 1px solid rgba(0, 0, 0, 0.07);
     background: rgba(0, 0, 0, 0);
   }
+
+  [data-title]:disabled {
+    position: relative;
+    &::after {
+      position: absolute;
+      z-index: 20;
+      top: -35px;
+      left: 50%;
+      pointer-events: none;
+      opacity: 0;
+      transform: translateX(-50%) translateY(-5px);
+      transition: opacity .3s, transform .3s;
+      padding: 8px;
+      background-color: #21242a;
+      border-radius: 4px;
+      box-shadow: 0 5px 15px rgba(#000, .2);
+      color: #fff;
+      font-size: 13px;
+      line-height: 16px;
+      white-space: nowrap;
+      content: attr(data-title);
+    }
+    &:hover {
+      &::after {
+        opacity: 1;
+        transform: translateX(-50%) translateY(0);
+      }
+    }
+  }
 }
 .mk-pc-view + .modal-form-board {
   padding-top: 0px;

--
Gitblit v1.8.0