From 1dfbdd345812e76abdeec3ee5efe9424dc13a733 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 16 六月 2020 19:13:33 +0800
Subject: [PATCH] 2020-06-16

---
 src/mob/mobcard/index.scss                                           |   40 ++++++
 src/mob/header/index.jsx                                             |   16 ++
 src/templates/subtableconfig/source.jsx                              |    2 
 src/views/404/index.jsx                                              |    4 
 src/assets/img/card7.png                                             |    0 
 src/components/header/index.jsx                                      |    4 
 src/assets/img/card3.png                                             |    0 
 src/templates/comtableconfig/index.jsx                               |    2 
 src/assets/img/card6.png                                             |    0 
 src/views/mobdesign/index.scss                                       |    0 
 src/views/mobmanage/index.scss                                       |    4 
 src/tabviews/subtabtable/index.jsx                                   |   46 +++++--
 src/views/mobdesign/index.jsx                                        |    0 
 src/assets/img/card2.png                                             |    0 
 src/mob/mobcard/index.jsx                                            |   78 +++++++++++++
 src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx |   30 ++++-
 src/assets/img/card5.png                                             |    0 
 src/views/404/index.scss                                             |   10 +
 src/templates/comtableconfig/source.jsx                              |    2 
 src/templates/sharecomponent/cardcomponent/dragdetail/index.scss     |   21 +++
 src/router/index.js                                                  |    6 
 src/templates/subtableconfig/index.jsx                               |    2 
 src/tabviews/zshare/cardcomponent/index.scss                         |   21 +++
 src/assets/img/card1.png                                             |    0 
 src/views/mobmanage/index.jsx                                        |   28 ++++
 src/assets/img/card8.png                                             |    0 
 src/mob/header/index.scss                                            |    8 +
 src/assets/img/card4.png                                             |    0 
 src/views/login/index.jsx                                            |    7 
 29 files changed, 294 insertions(+), 37 deletions(-)

diff --git a/src/assets/img/card1.png b/src/assets/img/card1.png
index 12d7596..0347deb 100644
--- a/src/assets/img/card1.png
+++ b/src/assets/img/card1.png
Binary files differ
diff --git a/src/assets/img/card2.png b/src/assets/img/card2.png
index 0dea932..6401ec7 100644
--- a/src/assets/img/card2.png
+++ b/src/assets/img/card2.png
Binary files differ
diff --git a/src/assets/img/card3.png b/src/assets/img/card3.png
index c29126f..54f6ba5 100644
--- a/src/assets/img/card3.png
+++ b/src/assets/img/card3.png
Binary files differ
diff --git a/src/assets/img/card4.png b/src/assets/img/card4.png
index f9a881a..4b8fc42 100644
--- a/src/assets/img/card4.png
+++ b/src/assets/img/card4.png
Binary files differ
diff --git a/src/assets/img/card5.png b/src/assets/img/card5.png
index 599b0da..cb3f1ce 100644
--- a/src/assets/img/card5.png
+++ b/src/assets/img/card5.png
Binary files differ
diff --git a/src/assets/img/card6.png b/src/assets/img/card6.png
new file mode 100644
index 0000000..f067bca
--- /dev/null
+++ b/src/assets/img/card6.png
Binary files differ
diff --git a/src/assets/img/card7.png b/src/assets/img/card7.png
new file mode 100644
index 0000000..231abc5
--- /dev/null
+++ b/src/assets/img/card7.png
Binary files differ
diff --git a/src/assets/img/card8.png b/src/assets/img/card8.png
new file mode 100644
index 0000000..c825d3b
--- /dev/null
+++ b/src/assets/img/card8.png
Binary files differ
diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx
index 52532fa..ef2b78d 100644
--- a/src/components/header/index.jsx
+++ b/src/components/header/index.jsx
@@ -678,7 +678,9 @@
         {this.props.editLevel === 'HS' ? <Button className="level4-close" type="primary" onClick={this.exitManage}>閫�鍑�</Button> : null}
         {/* 杩涘叆缂栬緫鎸夐挳 */}
         {this.props.editState && !this.props.editLevel ? <Icon onClick={this.enterEdit} className="edit-check" type="edit" /> : null}
-        {this.props.editState && !this.props.editLevel ? <a href="#/mobile" target="_blank" className="mobile" type="edit"> 绉诲姩绔� <Icon type="arrow-right" /></a> : null}
+        {/* {this.props.editState && !this.props.editLevel && options.systemType === 'local' && window.GLOB.systemType !== 'official' ?
+          <a href="#/mobmanage" target="_blank" className="mobile" type="edit"> 绉诲姩绔� <Icon type="arrow-right" /></a> : null
+        } */}
         {/* 缂栬緫鑿滃崟 */}
         {this.props.editLevel === 'level1' ? <EditMenu menulist={this.state.menulist} reload={this.reload} exitEdit={this.exitEdit}/> : null}
         {/* 澶村儚銆佺敤鎴峰悕 */}
diff --git a/src/mob/header/index.jsx b/src/mob/header/index.jsx
index da88082..0777948 100644
--- a/src/mob/header/index.jsx
+++ b/src/mob/header/index.jsx
@@ -1,5 +1,5 @@
 import React, {Component} from 'react'
-// import PropTypes from 'prop-types'
+import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
 import { connect } from 'react-redux'
 import { withRouter } from 'react-router-dom'
@@ -14,9 +14,10 @@
 const { confirm } = Modal
 
 class MobHeader extends Component {
-  // static propTpyes = {
-  //   collapse: PropTypes.bool,
-  // }
+  static propTpyes = {
+    view: PropTypes.string,
+  }
+
   state = {
     dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     logourl: window.GLOB.mainlogo,
@@ -46,9 +47,16 @@
   }
 
   render () {
+    const { view } = this.props
+
     return (
       <header className="mob-header-container">
         <div className="header-logo"><img src={this.state.logourl} alt=""/></div>
+        {view === 'manage' ?
+          <div className="mob-manage-title">
+            绉诲姩绔鐞�
+          </div> :null
+        }
         <Dropdown className="header-setting" overlay={
           <Menu>
             <Menu.Item key="2" onClick={this.logout}>{this.state.dict['mob.header.logout']}</Menu.Item>
diff --git a/src/mob/header/index.scss b/src/mob/header/index.scss
index b6b01d7..b25948b 100644
--- a/src/mob/header/index.scss
+++ b/src/mob/header/index.scss
@@ -42,4 +42,12 @@
       }
     }
   }
+  .mob-manage-title {
+    position: absolute;
+    left: calc(50vw - 45px);
+    color: #ffffff;
+    font-size: 16px;
+    line-height: 48px;
+    letter-spacing: 2px;
+  }
 }
\ No newline at end of file
diff --git a/src/mob/mobcard/index.jsx b/src/mob/mobcard/index.jsx
new file mode 100644
index 0000000..3cbb63d
--- /dev/null
+++ b/src/mob/mobcard/index.jsx
@@ -0,0 +1,78 @@
+import React, {Component} from 'react'
+import { is, fromJS } from 'immutable'
+import { Button, Card, Spin, Icon, Row, Col } from 'antd'
+
+import Api from '@/api'
+// import Utils from '@/utils/utils.js'
+import './index.scss'
+
+class CardChart extends Component {
+  state = {
+    loading: false,
+    data: []
+  }
+
+  shouldComponentUpdate (nextProps, nextState) {
+    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
+  }
+
+  UNSAFE_componentWillMount() {
+    this.getMobCards()
+  }
+
+  getMobCards = () => {
+    let param = {
+      func: 's_get_kei'
+    }
+    
+    // _param.LText = Utils.formatOptions(_param.LText)                   // 鍏抽敭瀛楃鏇挎崲锛宐ase64鍔犲瘑
+    // _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' // 鏃堕棿鎴�
+    // _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)   // md5瀵嗛挜
+
+    Api.getCloudConfig(param).then(res => {
+
+    })
+  }
+
+  render() {
+    const { data, loading } = this.state
+
+    return (
+      <div className="mob-card-row-box">
+        {loading ?
+          <div className="loading-mask">
+            <div className="ant-spin-blur"></div>
+            <Spin />
+          </div> : null
+        }
+        <Row gutter={24}>
+          {data && data.length > 0 &&
+            data.map((item, i) => (
+              <Col key={i} span={6}>
+                <Card
+                  size="small"
+                  className="chart-card"
+                  actions={[
+                    <Button />,
+                  ]}
+                >
+                  <div className="ant-card-meta-detail">
+                    
+                  </div>
+                </Card>
+              </Col>
+            ))
+          }
+          
+          <Col span={6} key="insert">
+            <div className="chart-card insert" onClick={() => {}}>
+              <Icon type="plus" />
+            </div>
+          </Col>
+        </Row>
+      </div>
+    )
+  }
+}
+
+export default CardChart
\ No newline at end of file
diff --git a/src/mob/mobcard/index.scss b/src/mob/mobcard/index.scss
new file mode 100644
index 0000000..09ccb9e
--- /dev/null
+++ b/src/mob/mobcard/index.scss
@@ -0,0 +1,40 @@
+.mob-card-row-box {
+  padding: 40px 20px;
+
+  .chart-card {
+    height: 250px;
+    border: 1px solid #e8e8e8;
+  }
+
+  .chart-card.insert {
+    text-align: center;
+    cursor: pointer;
+
+    .anticon-plus {
+      color: rgb(38, 194, 129);
+      font-size: 100px;
+      line-height: 250px;
+    }
+  }
+
+  .loading-mask {
+    position: absolute;
+    left: 20px;
+    top: 0;
+    right: 20px;
+    bottom: 0;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    text-align: justify;
+    z-index: 1;
+
+    .ant-spin-blur {
+      position: absolute;
+      width: 100%;
+      height: 100%;
+      opacity: 0.5;
+      background: #ffffff;
+    }
+  }
+}
diff --git a/src/router/index.js b/src/router/index.js
index 9cc1088..221e91f 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -8,7 +8,8 @@
 const Main = asyncLoadComponent(() => import('@/views/main'))
 const Login = asyncLoadComponent(() => import('@/views/login'))
 const NotFound = asyncComponent(() => import('@/views/404'))
-const Mobile = asyncLoadComponent(() => import('@/views/mobile'))
+const MobManage = asyncLoadComponent(() => import('@/views/mobmanage'))
+const MobDesign = asyncLoadComponent(() => import('@/views/mobdesign'))
 const PrintT = asyncLoadComponent(() => import('@/views/printTemplate'))
 
 const routers = [
@@ -16,7 +17,8 @@
   {path: '/print/:param', name: 'print', component: PrintT, auth: false},
   {path: '/ssologin/:param', name: 'ssologin', auth: true},
   {path: '/main', name: 'main', component: Main, auth: true},
-  {path: '/mobile', name: 'mobile', component: Mobile, auth: true},
+  {path: '/mobmanage', name: 'mobmanage', component: MobManage, auth: true},
+  {path: '/mobdesign', name: 'mobdesign', component: MobDesign, auth: true},
   {path: '/main/:param', name: 'pmain', component: Main, auth: true}
 ]
 
diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx
index e56bbeb..0ea607b 100644
--- a/src/tabviews/subtabtable/index.jsx
+++ b/src/tabviews/subtabtable/index.jsx
@@ -104,23 +104,35 @@
       let _hideCol = []      // 闅愯棌鍙婂悎骞跺垪涓瓧娈电殑uuid闆�
       let colMap = new Map()
 
-      // 鍏煎鍥捐〃
-      let chartId = ''
-      if (!config.charts) {
-        config.expand = true
-        config.charts = [{
-          uuid: Utils.getuuid(),
-          label: '',
-          title: '',
-          chartType: 'table',
-          icon: 'table',
-          Hide: 'false',
-          blacklist: []
-        }]
-      } else if (config.charts.length === 1) {
-        config.expand = true
+      // 鏃х増鏈吋瀹�
+      if (!config.version || config.version < '1.0') {
+        // 鍏煎鍥捐〃
+        if (!config.charts) {
+          config.expand = true
+          config.charts = [{ uuid: Utils.getuuid(), label: '', title: '', chartType: 'table', icon: 'table', Hide: 'false', blacklist: [] }]
+        } else {
+          config.charts.forEach(card => {
+            if (card.chartType === 'card') {
+              card.details = card.details.map(_cell => {
+                _cell.fontSize = _cell.fontSize || 14
+                if (!_cell.width) {
+                  _cell.width = 100
+                } else if (_cell.width === 'helf') {
+                  _cell.width = 50
+                } else if (_cell.width === 'third') {
+                  _cell.width = 33
+                }
+                if (!_cell.fontWeight && _cell.bold === 'true') {
+                  _cell.fontWeight = 'normal'
+                }
+                _cell.height = _cell.height || 1
+  
+                return _cell
+              })
+            }
+          })
+        }
       }
-      chartId = config.charts[0].uuid
 
       // 浠呮敮鎸乪xec銆乸rompt銆乸op 涓夌绫诲瀷鎸夐挳
       config.action = config.action.filter(item => ['exec', 'prompt', 'pop'].includes(item.OpenType))
@@ -182,6 +194,8 @@
         config.expand = true
       }
 
+      let chartId = config.charts[0] ? config.charts[0].uuid : ''
+
       // 1銆佺瓫閫夊瓧娈甸泦锛�2銆佽繃婊ら殣钘忓垪鍙婂悎骞跺垪涓殑瀛楁uuid
       config.columns.forEach(col => {
         if (col.field) {
diff --git a/src/tabviews/zshare/cardcomponent/index.scss b/src/tabviews/zshare/cardcomponent/index.scss
index bea0e34..778634f 100644
--- a/src/tabviews/zshare/cardcomponent/index.scss
+++ b/src/tabviews/zshare/cardcomponent/index.scss
@@ -232,6 +232,27 @@
         .line3 {
           -webkit-line-clamp: 3;
         }
+        .line4 {
+          -webkit-line-clamp: 4;
+        }
+        .line5 {
+          -webkit-line-clamp: 5;
+        }
+        .line6 {
+          -webkit-line-clamp: 6;
+        }
+        .line7 {
+          -webkit-line-clamp: 7;
+        }
+        .line8 {
+          -webkit-line-clamp: 8;
+        }
+        .line9 {
+          -webkit-line-clamp: 9;
+        }
+        .line10 {
+          -webkit-line-clamp: 10;
+        }
       }
       .ant-card-meta-detail > div:not(:last-child) {
         margin-bottom: 2px;
diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx
index 58b09b3..0ff3ba4 100644
--- a/src/templates/comtableconfig/index.jsx
+++ b/src/templates/comtableconfig/index.jsx
@@ -105,7 +105,7 @@
 
     if (!_config.version || _config.version < '1.0') {
       // 閰嶇疆榛樿鍊硷紝鍏煎
-      // _config.version = '1.0'
+      _config.version = '1.0'
       _config.Template = 'CommonTable'
       _config.easyCode = _config.easyCode || ''
   
diff --git a/src/templates/comtableconfig/source.jsx b/src/templates/comtableconfig/source.jsx
index 33320ef..daf9aff 100644
--- a/src/templates/comtableconfig/source.jsx
+++ b/src/templates/comtableconfig/source.jsx
@@ -6,7 +6,7 @@
 
 class CommonTableBaseData {
   baseConfig = {
-    // version: '1.0',
+    version: '1.0',
     type: 'system',
     Template: 'CommonTable',
     enabled: false,
diff --git a/src/templates/sharecomponent/cardcomponent/dragdetail/index.scss b/src/templates/sharecomponent/cardcomponent/dragdetail/index.scss
index 154c98e..aafcc24 100644
--- a/src/templates/sharecomponent/cardcomponent/dragdetail/index.scss
+++ b/src/templates/sharecomponent/cardcomponent/dragdetail/index.scss
@@ -28,6 +28,27 @@
     .content.line3 {
       -webkit-line-clamp: 3;
     }
+    .content.line4 {
+      -webkit-line-clamp: 4;
+    }
+    .content.line5 {
+      -webkit-line-clamp: 5;
+    }
+    .content.line6 {
+      -webkit-line-clamp: 6;
+    }
+    .content.line7 {
+      -webkit-line-clamp: 7;
+    }
+    .content.line8 {
+      -webkit-line-clamp: 8;
+    }
+    .content.line9 {
+      -webkit-line-clamp: 9;
+    }
+    .content.line10 {
+      -webkit-line-clamp: 10;
+    }
   }
 
   .align-center {
diff --git a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
index 5016c8f..dd3336d 100644
--- a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
+++ b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
@@ -16,8 +16,11 @@
 import card1 from '@/assets/img/card1.png'
 import card2 from '@/assets/img/card2.png'
 import card3 from '@/assets/img/card3.png'
-// import card4 from '@/assets/img/card4.png'
+import card4 from '@/assets/img/card4.png'
 import card5 from '@/assets/img/card5.png'
+import card6 from '@/assets/img/card6.png'
+import card7 from '@/assets/img/card7.png'
+import card8 from '@/assets/img/card8.png'
 import './index.scss'
 
 const syslegends = {
@@ -121,15 +124,30 @@
       subelement: ['content', 'avatar']
     },
     {
+      uuid: 'card6',
+      url: card6,
+      subelement: ['content', 'header']
+    },
+    {
       uuid: 'card3',
       url: card3,
       subelement: ['content', 'avatar', 'header']
     },
-    // {
-    //   uuid: 'card4',
-    //   url: card4,
-    //   subelement: ['content', 'avatar', 'bottom']
-    // },
+    {
+      uuid: 'card8',
+      url: card8,
+      subelement: ['content', 'bottom']
+    },
+    {
+      uuid: 'card4',
+      url: card4,
+      subelement: ['content', 'avatar', 'bottom']
+    },
+    {
+      uuid: 'card7',
+      url: card7,
+      subelement: ['content', 'header', 'bottom']
+    },
     {
       uuid: 'card5',
       url: card5,
diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx
index c3edad5..e6dfb0d 100644
--- a/src/templates/subtableconfig/index.jsx
+++ b/src/templates/subtableconfig/index.jsx
@@ -130,7 +130,7 @@
 
     if (!_config.version || _config.version < '1.0') {
       // 閰嶇疆榛樿鍊硷紝鍏煎
-      // _config.version = '1.0'
+      _config.version = '1.0'
       
       // 鍏煎鍥捐〃
       if (!_config.charts) {
diff --git a/src/templates/subtableconfig/source.jsx b/src/templates/subtableconfig/source.jsx
index 7a1edef..76866b1 100644
--- a/src/templates/subtableconfig/source.jsx
+++ b/src/templates/subtableconfig/source.jsx
@@ -6,7 +6,7 @@
 
 class SubTableBaseData {
   baseConfig = {
-    // version: '1.0',
+    version: '1.0',
     type: 'system',
     Template: 'SubTable',
     enabled: false,
diff --git a/src/views/404/index.jsx b/src/views/404/index.jsx
index 53fdcbf..7c8f4b0 100644
--- a/src/views/404/index.jsx
+++ b/src/views/404/index.jsx
@@ -1,5 +1,7 @@
 import React, {Component} from 'react'
 import { withRouter } from 'react-router-dom'
+
+import { Button } from 'antd'
 import Lostsvg from '@/components/lostsvg'
 import './index.scss'
 
@@ -18,7 +20,7 @@
           <div className="ant-result-title">404</div>
           <div className="ant-result-subtitle">鎶辨瓑锛屼綘璁块棶鐨勯〉闈笉瀛樺湪锛岃鑱旂郴绠$悊鍛樸��</div>
           <div className="ant-result-extra">
-            <button type="button" onClick={() => {this.tomain()}} className="ant-btn ant-btn-primary"><span>杩斿洖涓婚〉</span></button>
+            <Button onClick={() => {this.tomain()}} type="primary">杩斿洖涓婚〉</Button>
           </div>
         </div>
       </main>
diff --git a/src/views/404/index.scss b/src/views/404/index.scss
index e69de29..3991a27 100644
--- a/src/views/404/index.scss
+++ b/src/views/404/index.scss
@@ -0,0 +1,10 @@
+.ant-pro-basicLayout-content {
+  text-align: center;
+  padding-top: 10vh;
+  .ant-result-title {
+    margin-top: 10px;
+  }
+  .ant-result-subtitle {
+    margin-bottom: 15px;
+  }
+}
\ No newline at end of file
diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx
index 8f39432..0e9ccb9 100644
--- a/src/views/login/index.jsx
+++ b/src/views/login/index.jsx
@@ -1,13 +1,14 @@
 import React, {Component} from 'react'
 import { message, Modal } from 'antd'
-import {connect} from 'react-redux'
+import { connect } from 'react-redux'
 import md5 from 'md5'
 import moment from 'moment'
+
 import Api from '@/api'
+import Utils from '@/utils/utils.js' 
+import options from '@/store/options.js'
 import zhCN from '@/locales/zh-CN/login.js'
 import enUS from '@/locales/en-US/login.js'
-import options from '@/store/options.js'
-import Utils from '@/utils/utils.js'
 import asyncLoadComponent from '@/utils/asyncLoadComponent'
 import { modifyMemberLevel } from '@/store/action'
 import './index.scss'
diff --git a/src/views/mobile/index.jsx b/src/views/mobdesign/index.jsx
similarity index 100%
rename from src/views/mobile/index.jsx
rename to src/views/mobdesign/index.jsx
diff --git a/src/views/mobile/index.scss b/src/views/mobdesign/index.scss
similarity index 100%
rename from src/views/mobile/index.scss
rename to src/views/mobdesign/index.scss
diff --git a/src/views/mobmanage/index.jsx b/src/views/mobmanage/index.jsx
new file mode 100644
index 0000000..7d81aa0
--- /dev/null
+++ b/src/views/mobmanage/index.jsx
@@ -0,0 +1,28 @@
+import React, {Component} from 'react'
+import asyncComponent from '@/utils/asyncComponent'
+import './index.scss'
+
+const Header = asyncComponent(() => import('@/mob/header'))
+const MobCard = asyncComponent(() => import('@/mob/mobcard'))
+
+class MobileManage extends Component {
+  /**
+   * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊
+   */
+  componentWillUnmount () {
+    this.setState = () => {
+      return
+    }
+  }
+
+  render () {
+    return (
+      <div className="mobile-manage">
+        <Header view="manage" />
+        <MobCard />
+      </div>
+    )
+  }
+}
+
+export default MobileManage
\ No newline at end of file
diff --git a/src/views/mobmanage/index.scss b/src/views/mobmanage/index.scss
new file mode 100644
index 0000000..d553fdd
--- /dev/null
+++ b/src/views/mobmanage/index.scss
@@ -0,0 +1,4 @@
+.mobile-manage {
+  background: #fff;
+  
+}

--
Gitblit v1.8.0