From 38d8379be1fd9a72b8bd511dfb57ad67292bdf1e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 29 十月 2021 18:42:32 +0800
Subject: [PATCH] 2021-10-29

---
 src/templates/zshare/modalform/index.jsx                      |   40 +++---
 src/tabviews/custom/components/chart/antv-scatter/index.jsx   |    2 
 src/tabviews/custom/components/chart/antv-bar-line/index.jsx  |    2 
 src/tabviews/custom/components/chart/antv-dashboard/index.jsx |    2 
 src/components/header/index.jsx                               |   12 +
 src/tabviews/custom/components/tree/antd-tree/index.jsx       |    2 
 public/options.json                                           |   10 
 src/tabviews/custom/components/carousel/data-card/index.jsx   |    2 
 src/tabviews/custom/components/table/edit-table/index.jsx     |    2 
 src/tabviews/subtable/index.jsx                               |    4 
 src/locales/en-US/main.js                                     |    9 -
 public/README.txt                                             |   10 
 src/tabviews/custom/components/chart/custom-chart/index.jsx   |    2 
 src/tabviews/custom/components/card/data-card/index.jsx       |    2 
 src/utils/utils.js                                            |   10 +
 src/tabviews/custom/components/form/tab-form/index.jsx        |    2 
 src/tabviews/custom/components/card/table-card/index.jsx      |    2 
 src/tabviews/custom/components/card/prop-card/index.jsx       |    2 
 src/locales/zh-CN/main.js                                     |    9 -
 src/templates/zshare/formconfig.jsx                           |   22 +++
 src/tabviews/custom/components/table/normal-table/index.jsx   |    2 
 src/templates/zshare/verifycard/index.jsx                     |    8 +
 src/tabviews/custom/components/chart/antv-pie/index.jsx       |    2 
 src/tabviews/custom/components/form/normal-form/index.jsx     |    2 
 src/components/header/resetpwd/index.jsx                      |   45 +++++--
 src/mob/components/formdragelement/card.jsx                   |    3 
 src/tabviews/custom/components/carousel/prop-card/index.jsx   |    2 
 src/templates/zshare/createinterface/index.jsx                |    5 
 src/tabviews/custom/components/card/balcony/index.jsx         |    4 
 src/views/login/index.jsx                                     |  119 ++++++++++++++-----
 30 files changed, 219 insertions(+), 121 deletions(-)

diff --git a/public/README.txt b/public/README.txt
index 9d9efdf..70fe1db 100644
--- a/public/README.txt
+++ b/public/README.txt
@@ -2,14 +2,14 @@
 
 appId             -- 浜戠鐢熸垚鐨勫簲鐢↖D
 appkey            -- 浜戠鐢熸垚鐨勫簲鐢ㄥ瘑閽�
-mainSystemApi     -- sso绯荤粺鐨勬帴鍙h矾寰勶紝娉細涓氬姟绯荤粺闇�瑕佸~鍐欙紝涓斿�间负閫氱敤鎺ュ彛鐨勫畬鏁磋矾寰�
-systemType        -- 鍒ゆ柇涓氬姟绯荤粺涓烘祴璇� (绌�) 鎴栨寮� (production) 锛屾寮忕郴缁熷紑鍙戞潈闄愬彧鍚湁绯荤粺鍗囩骇绛夐檺瀹氬姛鑳�
+mainSystemApi     -- 涓氬姟绯荤粺鐨勫崟鐐圭櫥褰曢摼鎺ュ湴鍧�锛屽紑鍙戠郴缁熷湴鍧�涓篽ttp://sso.mk9h.cn/cloud/webapi/dostars锛岀敓浜х郴缁熼渶瑕佷緷鎹惌寤虹殑鍗曠偣鐧诲綍绯荤粺鑷淇敼閰嶇疆
+systemType        -- 绯荤粺绫诲瀷锛屾寮忕郴缁熸槸濉玴roduction锛屽紑鍙戠郴缁熶负绌猴紝寮�鍙戠郴缁熶細鏈変竴閮ㄥ垎鐨勬暟鎹ā绯婂寲
 externalDatabase  -- 澶栬仈搴擄紝涓嶄娇鐢ㄦ椂榛樿涓篺alse
 lineColor         -- 鐧诲綍椤靛垎鍓茬嚎棰滆壊
 filter            -- 椤甸潰婊ら暅锛屽�间负'true'鏃讹紝椤甸潰鏄剧ず涓洪粦鐧借壊
-defaultApp        -- 榛樿搴旂敤锛岀郴缁熼渶榛樿鎵撳紑鏌愪釜瀛愬簲鐢ㄦ椂闇�濉啓搴旂敤缂栫爜锛岀┖鍊兼椂璺宠浆鍒扮鐞嗗悗鍙�
-defaultLang       -- 榛樿鎵撳紑鐨勫瓙搴旂敤璇█绫诲瀷锛屽~鍏efaultApp鏃舵湁鏁�
+defaultApp        -- 榛樿搴旂敤锛岀郴缁熼粯璁ゆ墦寮�鏌愪釜瀛愬簲鐢ㄦ椂闇�濉啓搴旂敤缂栫爜
+defaultLang       -- 鎵撳紑鐨勫瓙搴旂敤璇█绫诲瀷锛岄粯璁や负zh-CN
 WXAppID           -- 浣跨敤鍏紬鍙锋椂锛岀粦瀹氱殑鍏紬鍙稩D
-debugger          -- debugger妯″紡鏄惁寮�鍚紝寮�鍚悗绉诲姩绔瓙搴旂敤涓細鏈夋帶鍒跺彴
+debugger          -- 鍊间负true鏃跺紑鍚皟璇曟ā寮忥紝寮�鍚悗绉诲姩绔瓙搴旂敤涓細鏈夋帶鍒跺彴
 licenseKey        -- 璁稿彲瀵嗛挜锛屽湪鍐呴儴缃戠粶涓娇鐢ㄧ郴缁熸椂锛屼細璺宠繃epc楠岃瘉
 probation         -- 璇曠敤鏈燂紙YYYY-MM-DD锛夛紝鍦ㄦ寮忕郴缁熶腑锛岃瘯鐢ㄦ湡鍐呰皟鐢ㄧ郴缁熸帴鍙g殑鑴氭湰浼氳褰曚笅鏉�
\ No newline at end of file
diff --git a/public/options.json b/public/options.json
index f9c0b8f..95b2963 100644
--- a/public/options.json
+++ b/public/options.json
@@ -1,9 +1,9 @@
 {
-  "appId": "201912040924165801464FF1788654BC5AC73",
-  "appkey": "20191106103859640976D6E924E464D029CF0",
+  "appId": "202109161556242376DEC38C96FFF414E8DEF",
+  "appkey": "20210916155606327FB54C811DE824AFEB22C",
   "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
   "systemType": "",
-  "externalDatabase": "false",
+  "externalDatabase": "",
   "lineColor": "",
   "filter": "false",
   "defaultApp": "",
@@ -12,6 +12,6 @@
   "debugger": false,
   "licenseKey": "E1A8FE",
   "probation": "",
-  "host": "http://qingqiumarket.cn",
-  "service": "mkwms/"
+  "host": "http://demo.mk9h.cn",
+  "service": "kalai_mes/"
 }
\ No newline at end of file
diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx
index 0c8f549..281b65e 100644
--- a/src/components/header/index.jsx
+++ b/src/components/header/index.jsx
@@ -13,6 +13,7 @@
   initMenuPermission,
   logout
 } from '@/store/action'
+import asyncComponent from '@/utils/asyncComponent'
 import Api from '@/api'
 import MKEmitter from '@/utils/events.js'
 import options from '@/store/options.js'
@@ -20,12 +21,12 @@
 import enUS from '@/locales/en-US/main.js'
 import Utils from '@/utils/utils.js'
 import avatar from '@/assets/img/avatar.jpg'
-import Resetpwd from './resetpwd'
-import LoginForm from './loginform'
 import './index.scss'
 
 const { confirm } = Modal
 const { Search } = Input
+const Resetpwd = asyncComponent(() => import('./resetpwd'))
+const LoginForm = asyncComponent(() => import('./loginform'))
 
 class Header extends Component {
   static propTpyes = {
@@ -87,9 +88,14 @@
         if (result.status) {
           notification.success({
             top: 92,
-            message: this.state.dict['main.password.resetsuccess'],
+            message: '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�',
             duration: 2
           })
+          setTimeout(() => {
+            sessionStorage.clear()
+            this.props.logout()
+            this.props.history.replace('/login')
+          }, 2000)
         } else {
           notification.warning({
             top: 92,
diff --git a/src/components/header/resetpwd/index.jsx b/src/components/header/resetpwd/index.jsx
index 2f3b63a..70a6cc2 100644
--- a/src/components/header/resetpwd/index.jsx
+++ b/src/components/header/resetpwd/index.jsx
@@ -1,15 +1,11 @@
 import React, {Component} from 'react'
-import PropTypes from 'prop-types'
 import { Form, Input } from 'antd'
 
 class Resetpwd extends Component {
-  static propTpyes = {
-    dict: PropTypes.object
-  }
-
   state = {
     confirmDirty: false,
-    autoCompleteResult: []
+    autoCompleteResult: [],
+    level: localStorage.getItem(window.location.href.split('#')[0] + 'pwdlevel') || ''
   }
 
   onEnterSubmit = (e) => {
@@ -61,7 +57,7 @@
   compareToFirstPassword = (rule, value, callback) => {
     const { form } = this.props
     if (value && value !== form.getFieldValue('password')) {
-      callback(this.props.dict['main.password.diff'])
+      callback('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷达紒')
     } else {
       callback()
     }
@@ -69,14 +65,24 @@
 
   validateToNextPassword = (rule, value, callback) => {
     const { form } = this.props
+    const { level } = this.state
+
     if (value && this.state.confirmDirty) {
       form.validateFields(['confirm'], { force: true })
     }
-    callback()
+
+    if (level === 'letter_num' && value && /^[0-9a-zA-Z!@#$%^&*()_]*$/.test(value) && /^([^0-9]*|[^a-zA-Z]*)$/.test(value)) {
+      callback('瀵嗙爜涓繀椤诲惈鏈夋暟瀛楀拰瀛楁瘝銆�')
+    } else if ((level === 'char_num' || level === 'char_num_90') && value && /^[0-9a-zA-Z!@#$%^&*()_]*$/.test(value) && /^([^0-9]*|[^a-zA-Z]*|[^!@#$%^&*()_]*)$/.test(value)) {
+      callback('瀵嗙爜涓繀椤诲惈鏈夋暟瀛椼�佸瓧姣嶅拰鐗规畩瀛楃銆�')
+    } else {
+      callback()
+    }
   }
 
   render() {
     const { getFieldDecorator } = this.props.form
+    const { level } = this.state
 
     const formItemLayout = {
       labelCol: {
@@ -89,32 +95,41 @@
       }
     }
 
+    let rules = []
+    if (level) {
+      rules.push({
+        min: 8,
+        message: '瀵嗙爜闀垮害涓嶅彲灏忎簬8浣嶏紒'
+      })
+    }
+
     return (
       <Form {...formItemLayout} onKeyDown={this.onEnterSubmit} id="reset-password-form">
-        <Form.Item label={this.props.dict['main.password.origin']}>
+        <Form.Item label="鍘熷瘑鐮�">
           {getFieldDecorator('originpwd', {
             rules: [
               {
                 required: true,
-                message: this.props.dict['main.password.origin.required']
+                message: '璇疯緭鍏ュ師瀵嗙爜锛�'
               }
             ]
           })(<Input.Password autoFocus/>)}
         </Form.Item>
-        <Form.Item label={this.props.dict['main.password.new']} hasFeedback>
+        <Form.Item label="鏂板瘑鐮�" hasFeedback>
           {getFieldDecorator('password', {
             rules: [
               {
                 required: true,
-                message: this.props.dict['main.password.new.required']
+                message: '璇疯緭鍏ユ柊瀵嗙爜锛�'
               },
               {
                 pattern: /^[0-9a-zA-Z!@#$%^&*()_]*$/ig,
                 message: '瀵嗙爜鍙厑璁稿寘鍚暟瀛椼�佸瓧姣嶄互鍙�!@#$%&*()_銆�'
               },
+              ...rules,
               {
                 max: 50,
-                message: this.props.dict['main.password.maxlen']
+                message: '鏈�澶у瘑鐮侀暱搴︿负50浣嶏紒'
               },
               {
                 validator: this.validateToNextPassword
@@ -122,12 +137,12 @@
             ]
           })(<Input.Password />)}
         </Form.Item>
-        <Form.Item label={this.props.dict['main.password.confirm']} hasFeedback>
+        <Form.Item label="纭瀵嗙爜" hasFeedback>
           {getFieldDecorator('confirm', {
             rules: [
               {
                 required: true,
-                message: this.props.dict['main.password.confirm.required']
+                message: '璇风‘璁ゅ瘑鐮侊紒'
               },
               {
                 validator: this.compareToFirstPassword
diff --git a/src/locales/en-US/main.js b/src/locales/en-US/main.js
index c5f9d09..173c4bb 100644
--- a/src/locales/en-US/main.js
+++ b/src/locales/en-US/main.js
@@ -13,15 +13,6 @@
   'main.logout.hint': 'Are you sure you want to log out?',
   'main.verup': 'Version upgrade',
   'main.password': 'Change the password',
-  'main.password.origin': 'Original Password',
-  'main.password.origin.required': 'Please input your original password!',
-  'main.password.new': 'Password',
-  'main.password.new.required': 'Please input your password!',
-  'main.password.confirm': 'Confirm Password',
-  'main.password.confirm.required': 'Please confirm your password!',
-  'main.password.maxlen': 'The maximum password length is 12 bits!',
-  'main.password.diff': 'Two passwords that you enter is inconsistent!',
-  'main.password.resetsuccess': 'Password modified successfully!',
   'main.login.develop': 'Login developer',
   'main.revert.default': 'Restore default Settings',
   'main.copy.success': 'Copy success',
diff --git a/src/locales/zh-CN/main.js b/src/locales/zh-CN/main.js
index 600ca52..b944342 100644
--- a/src/locales/zh-CN/main.js
+++ b/src/locales/zh-CN/main.js
@@ -13,15 +13,6 @@
   'main.logout.hint': '鎮ㄧ‘瀹氳閫�鍑哄悧?',
   'main.verup': '鐗堟湰鍗囩骇',
   'main.password': '淇敼瀵嗙爜',
-  'main.password.origin': '鍘熷瘑鐮�',
-  'main.password.origin.required': '璇疯緭鍏ュ師瀵嗙爜锛�',
-  'main.password.new': '鏂板瘑鐮�',
-  'main.password.new.required': '璇疯緭鍏ユ柊瀵嗙爜锛�',
-  'main.password.confirm': '纭瀵嗙爜',
-  'main.password.confirm.required': '璇风‘璁ゅ瘑鐮侊紒',
-  'main.password.maxlen': '鏈�澶у瘑鐮侀暱搴︿负12浣嶏紒',
-  'main.password.diff': '涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷达紒',
-  'main.password.resetsuccess': '瀵嗙爜淇敼鎴愬姛锛�',
   'main.login.develop': '鐧诲綍寮�鍙戞満',
   'main.revert.default': '鎭㈠榛樿璁剧疆',
   'main.copy.success': '澶嶅埗鎴愬姛',
diff --git a/src/mob/components/formdragelement/card.jsx b/src/mob/components/formdragelement/card.jsx
index 60de5ef..e7b3a6c 100644
--- a/src/mob/components/formdragelement/card.jsx
+++ b/src/mob/components/formdragelement/card.jsx
@@ -185,8 +185,9 @@
       </div>
     } trigger="hover">
       <div className="page-card" style={{ opacity: opacity}}>
-        <div ref={node => drag(drop(node))}>
+        <div ref={node => drag(drop(node))} style={{ border: '0.5px solid transparent'}}>
           {card.type === 'split' ? formItem : <Form.Item
+            style={{marginTop: card.marginTop || 0, marginBottom: card.marginBottom || 0}}
             className={'ant-form-item' + (card.required === 'true' ? ' required' : '') + (card.splitline === 'false' ? ' no-boder' : '')}
           >
             {formItem}
diff --git a/src/tabviews/custom/components/card/balcony/index.jsx b/src/tabviews/custom/components/card/balcony/index.jsx
index aec9138..d29d901 100644
--- a/src/tabviews/custom/components/card/balcony/index.jsx
+++ b/src/tabviews/custom/components/card/balcony/index.jsx
@@ -251,7 +251,7 @@
     if (syncConfig) {
       if (!syncConfig.setting.supModule || syncConfig.setting.supModule !== MenuID) return
   
-      if (id !== this.state.BID) {
+      if (id !== this.state.BID || id !== '') {
         this.setState({ BID: id, BData: data }, () => {
           this.loadData()
         })
@@ -263,7 +263,7 @@
         this.setState({ show: id ? true : false })
       }
   
-      if (id !== this.state.BID) {
+      if (id !== this.state.BID || id !== '') {
         this.setState({ BID: id, BData: data }, () => {
           this.loadData()
         })
diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx
index 83cd92d..8ee0d13 100644
--- a/src/tabviews/custom/components/card/data-card/index.jsx
+++ b/src/tabviews/custom/components/card/data-card/index.jsx
@@ -328,7 +328,7 @@
     const { config } = this.state
 
     if (!config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id, BData: data, pageIndex: 1 }, () => {
         this.loadData()
       })
diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx
index 848a7f6..92d32a2 100644
--- a/src/tabviews/custom/components/card/prop-card/index.jsx
+++ b/src/tabviews/custom/components/card/prop-card/index.jsx
@@ -265,7 +265,7 @@
     const { config } = this.state
 
     if (!config.setting || !config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id, BData: data }, () => {
         this.loadData()
       })
diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx
index fc4ef0b..14107bf 100644
--- a/src/tabviews/custom/components/card/table-card/index.jsx
+++ b/src/tabviews/custom/components/card/table-card/index.jsx
@@ -183,7 +183,7 @@
     const { config } = this.state
 
     if (!config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id, BData: data, pageIndex: 1 }, () => {
         this.loadData()
       })
diff --git a/src/tabviews/custom/components/carousel/data-card/index.jsx b/src/tabviews/custom/components/carousel/data-card/index.jsx
index c2740e4..7de4d1f 100644
--- a/src/tabviews/custom/components/carousel/data-card/index.jsx
+++ b/src/tabviews/custom/components/carousel/data-card/index.jsx
@@ -165,7 +165,7 @@
     const { config } = this.state
 
     if (!config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id, BData: data }, () => {
         this.loadData()
       })
diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx
index 5750796..a9622b8 100644
--- a/src/tabviews/custom/components/carousel/prop-card/index.jsx
+++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -171,7 +171,7 @@
     const { config } = this.state
 
     if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id, BData: data }, () => {
         this.loadData()
       })
diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
index 38d7af4..1c7f5cc 100644
--- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -453,7 +453,7 @@
     const { config } = this.state
 
     if (!config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id }, () => {
         this.loadData()
       })
diff --git a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
index 5f64a9e..df4fba4 100644
--- a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -234,7 +234,7 @@
     const { config } = this.state
 
     if (!config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id }, () => {
         this.loadData()
       })
diff --git a/src/tabviews/custom/components/chart/antv-pie/index.jsx b/src/tabviews/custom/components/chart/antv-pie/index.jsx
index a660890..51eb7ce 100644
--- a/src/tabviews/custom/components/chart/antv-pie/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -187,7 +187,7 @@
     const { config } = this.state
 
     if (!config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id }, () => {
         this.loadData()
       })
diff --git a/src/tabviews/custom/components/chart/antv-scatter/index.jsx b/src/tabviews/custom/components/chart/antv-scatter/index.jsx
index 54a3ed8..99fb8fb 100644
--- a/src/tabviews/custom/components/chart/antv-scatter/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-scatter/index.jsx
@@ -205,7 +205,7 @@
     const { config } = this.state
 
     if (!config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id }, () => {
         this.loadData()
       })
diff --git a/src/tabviews/custom/components/chart/custom-chart/index.jsx b/src/tabviews/custom/components/chart/custom-chart/index.jsx
index 9ae9cd1..f7d88bd 100644
--- a/src/tabviews/custom/components/chart/custom-chart/index.jsx
+++ b/src/tabviews/custom/components/chart/custom-chart/index.jsx
@@ -203,7 +203,7 @@
     const { config } = this.state
 
     if (!config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id }, () => {
         this.loadData()
       })
diff --git a/src/tabviews/custom/components/form/normal-form/index.jsx b/src/tabviews/custom/components/form/normal-form/index.jsx
index 85fcccc..3d7cd2b 100644
--- a/src/tabviews/custom/components/form/normal-form/index.jsx
+++ b/src/tabviews/custom/components/form/normal-form/index.jsx
@@ -217,7 +217,7 @@
   resetParentParam = (MenuID, id) => {
     const { config } = this.state
     if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id }, () => {
         this.loadData()
       })
diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx
index 55a9f62..20cfcac 100644
--- a/src/tabviews/custom/components/form/tab-form/index.jsx
+++ b/src/tabviews/custom/components/form/tab-form/index.jsx
@@ -200,7 +200,7 @@
   resetParentParam = (MenuID, id) => {
     const { config } = this.state
     if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id }, () => {
         this.loadData()
       })
diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx
index 9d6eea6..0402567 100644
--- a/src/tabviews/custom/components/table/edit-table/index.jsx
+++ b/src/tabviews/custom/components/table/edit-table/index.jsx
@@ -373,7 +373,7 @@
     const { setting } = this.state
 
     if (!setting.supModule || setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({
         pageIndex: 1,
         BID: id,
diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx
index d1c9b60..3426437 100644
--- a/src/tabviews/custom/components/table/normal-table/index.jsx
+++ b/src/tabviews/custom/components/table/normal-table/index.jsx
@@ -485,7 +485,7 @@
     const { setting } = this.state
 
     if (!setting.supModule || setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({
         pageIndex: 1,
         BID: id,
diff --git a/src/tabviews/custom/components/tree/antd-tree/index.jsx b/src/tabviews/custom/components/tree/antd-tree/index.jsx
index 889398a..0bd6242 100644
--- a/src/tabviews/custom/components/tree/antd-tree/index.jsx
+++ b/src/tabviews/custom/components/tree/antd-tree/index.jsx
@@ -170,7 +170,7 @@
     const { config } = this.state
 
     if (!config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id }, () => {
         this.loadData()
       })
diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx
index e17dc76..afe536d 100644
--- a/src/tabviews/subtable/index.jsx
+++ b/src/tabviews/subtable/index.jsx
@@ -373,7 +373,7 @@
         return
       }
     }
-    
+
     if (this.props.Tab.supMenu && !BID) { // 涓昏〃ID涓嶅瓨鍦ㄦ椂锛屼笉鏌ヨ瀛愯〃
       this.setState({
         data: [],
@@ -921,7 +921,7 @@
 
     this.setState({BData: data, BID: id})
 
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       MKEmitter.emit('resetTable', this.props.Tab.uuid) // 鍒楄〃閲嶇疆
       this.setState({
         pageIndex: 1
diff --git a/src/templates/zshare/createinterface/index.jsx b/src/templates/zshare/createinterface/index.jsx
index 7f40704..9db5ce3 100644
--- a/src/templates/zshare/createinterface/index.jsx
+++ b/src/templates/zshare/createinterface/index.jsx
@@ -1010,6 +1010,9 @@
       if (!_arr.includes('modifyuserid')) {
         _form.push('modifyuserid=@userid@')
       }
+      if (!_arr.includes('modifyuser')) {
+        _form.push('modifyuser=@username')
+      }
       if (hasvoucher) {
         if (!_arr.includes('bvoucher')) {
           _arr.push('bvoucher')
@@ -1058,7 +1061,7 @@
     } else if (_actionType === 'LogicDelete') { // 閫昏緫鍒犻櫎
       _sql += `
         /* 榛樿sql */
-        update ${btn.sql} set deleted=1,modifydate=getdate(),modifyuserid=@userid@ where ${primaryKey}=@${primaryKey}@;`
+        update ${btn.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifyuserid=@userid@ where ${primaryKey}=@${primaryKey}@;`
       
     } else if (_actionType === 'delete') {      // 鐗╃悊鍒犻櫎
       let _msg = ''
diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index 1cc2fce..469ccd7 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -3115,6 +3115,28 @@
       options: inputfields
     },
     {
+      type: 'number',
+      key: 'marginTop',
+      label: '涓婅竟璺濓紙px锛�',
+      initVal: card.marginTop || 0,
+      min: 0,
+      max: 1000,
+      precision: 0,
+      required: false,
+      forbid: appType !== 'mob'
+    },
+    {
+      type: 'number',
+      key: 'marginBottom',
+      label: '涓嬭竟璺濓紙px锛�',
+      initVal: card.marginBottom || 0,
+      min: 0,
+      max: 1000,
+      precision: 0,
+      required: false,
+      forbid: appType !== 'mob'
+    },
+    {
       type: 'multiselect',
       key: 'blacklist',
       label: Formdict['header.form.blacklist'],
diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx
index 5b399e6..8ce224c 100644
--- a/src/templates/zshare/modalform/index.jsx
+++ b/src/templates/zshare/modalform/index.jsx
@@ -16,26 +16,26 @@
 const DataTable = asyncComponent(() => import('./datatable'))
 
 const modalTypeOptions = {
-  text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place'],
-  number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place'],
-  select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown'],
-  checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'arrange'],
-  radio: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'setAll', 'emptyText', 'splitline', 'arrange'],
-  checkcard: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'linkSubField', 'fieldlength', 'span', 'labelwidth', 'display', 'tooltip', 'extra', 'width', 'multiple', 'borderColor', 'splitline'],
-  multiselect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra'],
-  link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkField', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown'],
-  fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'splitline'],
-  switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline'],
-  date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline'],
-  datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'splitline'],
-  datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline'],
-  textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count', 'placeholder'],
-  color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra'],
-  hint: ['label', 'type', 'blacklist', 'message', 'span', 'labelwidth', 'splitline'],
-  split: ['label', 'type'],
-  brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'extra', 'encryption'],
-  funcvar: ['span', 'labelwidth', 'splitline'],
-  linkMain: ['readonly', 'required', 'hidden', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra']
+  text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place', 'marginTop', 'marginBottom'],
+  number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place', 'marginTop', 'marginBottom'],
+  select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'],
+  checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'arrange', 'marginTop', 'marginBottom'],
+  radio: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'setAll', 'emptyText', 'splitline', 'arrange', 'marginTop', 'marginBottom'],
+  checkcard: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'linkSubField', 'fieldlength', 'span', 'labelwidth', 'display', 'tooltip', 'extra', 'width', 'multiple', 'borderColor', 'splitline', 'marginTop', 'marginBottom'],
+  multiselect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'],
+  link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkField', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'],
+  fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'splitline', 'marginTop', 'marginBottom'],
+  switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'],
+  date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom'],
+  datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'splitline', 'marginTop', 'marginBottom'],
+  datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom'],
+  textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count', 'placeholder', 'marginTop', 'marginBottom'],
+  color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'],
+  hint: ['label', 'type', 'blacklist', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'],
+  split: ['label', 'type', 'marginTop', 'marginBottom'],
+  brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'extra', 'encryption', 'marginTop', 'marginBottom'],
+  funcvar: ['span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'],
+  linkMain: ['readonly', 'required', 'hidden', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom']
 }
 
 class MainSearch extends Component {
diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx
index 5b55948..7d58880 100644
--- a/src/templates/zshare/verifycard/index.jsx
+++ b/src/templates/zshare/verifycard/index.jsx
@@ -806,9 +806,15 @@
           if (!_arr.includes('submituserid')) {
             _form.push('submituserid=@userid@')
           }
+          if (!_arr.includes('submituser')) {
+            _form.push('submituser=@username')
+          }
         } else {
           if (!_arr.includes('modifydate')) {
             _form.push('modifydate=getdate()')
+          }
+          if (!_arr.includes('modifyuser')) {
+            _form.push('modifyuser=@username')
           }
           if (!_arr.includes('modifyuserid')) {
             _form.push('modifyuserid=@userid@')
@@ -852,7 +858,7 @@
         if (_verify.voucher && _verify.voucher.enabled) {
           _voucher = ',BVoucher=@BVoucher,FIBVoucherDate=@FIBVoucherDate,FiYear=@FiYear'
         }
-        _defaultsql = `update ${card.sql} set deleted=1,modifydate=getdate(),modifyuserid=@userid@${_voucher} where ${config.setting.primaryKey || 'id'}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID  from dbo.SplitComma(@ID@))'};`
+        _defaultsql = `update ${card.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifyuserid=@userid@${_voucher} where ${config.setting.primaryKey || 'id'}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID  from dbo.SplitComma(@ID@))'};`
       } else if (card.sqlType === 'delete') {
         let _msg = ''
         if (columns && columns.length > 0 && card.Ot !== 'notRequired' && card.Ot !== 'requiredOnce') {
diff --git a/src/utils/utils.js b/src/utils/utils.js
index 44fdb03..86fd067 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -1899,9 +1899,15 @@
       if (!_arr.includes('submituserid')) {
         _form.push('submituserid=@userid@')
       }
+      if (!_arr.includes('submituser')) {
+        _form.push('submituser=@username')
+      }
     } else {
       if (!_arr.includes('modifydate')) {
         _form.push('modifydate=getdate()')
+      }
+      if (!_arr.includes('modifyuser')) {
+        _form.push('modifyuser=@username')
       }
       if (!_arr.includes('modifyuserid')) {
         _form.push('modifyuserid=@userid@')
@@ -1950,7 +1956,7 @@
 
     _sql += `
       /* 榛樿sql */
-      update ${btn.sql} set deleted=1,modifydate=getdate(),modifyuserid=@userid@ where ${primaryKey}${_ID};`
+      update ${btn.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifyuserid=@userid@ where ${primaryKey}${_ID};`
   
   } else if (_actionType === 'delete') {      // 鐗╃悊鍒犻櫎
     let _msg = ''
@@ -2266,7 +2272,7 @@
       form = `
         insert into ${param.name} (${field1},createuserid) select ${field2},@UserID
         
-        update ${param.name} set ${field3},modifydate=getdate(),modifyuserid=@UserID
+        update ${param.name} set ${field3},modifydate=getdate(),modifyuser=@username,modifyuserid=@UserID
       `
     } else if (btn.OpenType === 'prompt' || btn.OpenType === 'exec') {
       form = `
diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx
index 80ac8f3..c333d44 100644
--- a/src/views/login/index.jsx
+++ b/src/views/login/index.jsx
@@ -1,5 +1,5 @@
 import React, { Component } from 'react'
-import { message, Modal } from 'antd'
+import { message, Modal, notification } from 'antd'
 import { connect } from 'react-redux'
 import md5 from 'md5'
 import moment from 'moment'
@@ -9,12 +9,14 @@
 import options, { styles } from '@/store/options.js'
 import zhCN from '@/locales/zh-CN/login.js'
 import enUS from '@/locales/en-US/login.js'
+import asyncComponent from '@/utils/asyncComponent'
 import asyncLoadComponent from '@/utils/asyncLoadComponent'
 import { modifyMemberLevel } from '@/store/action'
 import './index.scss'
 
 const LoginForm = asyncLoadComponent(() => import('./loginform'))
-const LoginCloudForm = asyncLoadComponent(() => import('./logincloudform'))
+const Resetpwd = asyncLoadComponent(() => import('@/components/header/resetpwd'))
+const LoginCloudForm = asyncComponent(() => import('./logincloudform'))
 const iszhCN = sessionStorage.getItem('lang') !== 'en-US'
 
 const _href = window.location.href.split('#')[0]
@@ -42,7 +44,8 @@
     loginWays: null,
     touristLogin: false,
     syncing: false,
-    visible: false
+    visible: false,
+    resetLoading: false
   }
 
   changelang (item) {
@@ -111,34 +114,34 @@
         localStorage.removeItem(_url)
       }
 
-      // let level = localStorage.getItem(_url + 'pwdlevel')
+      let level = localStorage.getItem(_url + 'pwdlevel')
 
-      // if (level) {
-      //   let visible = false
-      //   let tip = '瀵嗙爜寮哄害涓嶅锛岃淇敼瀵嗙爜锛�'
-      //   if (param.password.length < 8) {
-      //     visible = true
-      //   } else if (level === 'letter_num' && /^([^0-9]*|[^a-zA-Z]*)$/.test(param.password)) {
-      //     visible = true
-      //   } else if ((level === 'char_num' || level === 'char_num_90') && /^([^0-9]*|[^a-zA-Z]*|[^!@#$%^&*()_]*)$/.test(param.password)) {
-      //     visible = true
-      //   } else if (level === 'char_num_90' && res.modifydate) {
-      //     let s = (new Date().getTime() - new Date(res.modifydate).getTime()) / (1000 * 24 * 60 * 60)
-      //     if (!isNaN(s) && s > 90) {
-      //       visible = true
-      //       tip = '鎮ㄥ凡90澶╂湭淇敼瀵嗙爜锛岃鏇存崲瀵嗙爜鍚庝娇鐢紒'
-      //     }
-      //   }
+      if (level) {
+        let visible = false
+        let tip = '瀵嗙爜寮哄害涓嶅锛岃淇敼瀵嗙爜锛�'
+        if (param.password.length < 8) {
+          visible = true
+        } else if (level === 'letter_num' && /^([^0-9]*|[^a-zA-Z]*)$/.test(param.password)) {
+          visible = true
+        } else if ((level === 'char_num' || level === 'char_num_90') && /^([^0-9]*|[^a-zA-Z]*|[^!@#$%^&*()_]*)$/.test(param.password)) {
+          visible = true
+        } else if (level === 'char_num_90' && res.modifydate) {
+          let s = (new Date().getTime() - new Date(res.modifydate).getTime()) / (1000 * 24 * 60 * 60)
+          if (!isNaN(s) && s > 90) {
+            visible = true
+            tip = '鎮ㄥ凡90澶╂湭淇敼瀵嗙爜锛岃鏇存崲瀵嗙爜鍚庝娇鐢紒'
+          }
+        }
 
-      //   if (visible) {
-      //     message.warning(tip)
-      //     this.setState({
-      //       isDisabled: false,
-      //       visible: true
-      //     })
-      //     return
-      //   }
-      // }
+        if (visible) {
+          message.warning(tip)
+          this.setState({
+            isDisabled: false,
+            visible: true
+          })
+          return
+        }
+      }
 
       let _history = sessionStorage.getItem('history')
       if (_history) {
@@ -457,7 +460,7 @@
               app_version: res.app_version
             }
 
-            let level = res.pwd_level || 'char_num_90'
+            let level = res.pwd_level || ''
 
             if (level && !['letter_num', 'char_num', 'char_num_90'].includes(level)) {
               level = ''
@@ -626,7 +629,6 @@
       param.rduri = options.cloudServiceApi.replace('dostars', 'dostar')
     }
 
-
     this.logincloudRef.handleConfirm().then(result => {
       param.UserName = result.cloudusername
       param.Password = result.cloudpassword
@@ -669,6 +671,48 @@
         }
       })
     })
+  }
+
+  resetPwdSubmit = () => {
+    this.formRef.handleConfirm().then(res => {
+      this.setState({
+        resetLoading: true
+      })
+
+      let _param = {
+        func: 's_PwdUpt',
+        LText: `select '${res.originpwd}','${res.password}'`
+      }
+      
+      _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')          // 鏃堕棿鎴�
+      _param.LText = Utils.formatOptions(_param.LText)                   // 鍏抽敭瀛楃鏇挎崲锛宐ase64鍔犲瘑
+      _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)   // md5瀵嗛挜
+  
+      Api.getSystemConfig(_param).then(result => {
+        this.setState({
+          visible: !result.status,
+          resetLoading: false
+        })
+
+        if (result.status) {
+          notification.success({
+            top: 92,
+            message: '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�',
+            duration: 2
+          })
+          const input = document.getElementById('password')
+          if (input) {
+            input.select()
+          }
+        } else {
+          notification.warning({
+            top: 92,
+            message: result.message,
+            duration: 5
+          })
+        }
+      })
+    }, () => {})
   }
 
   /**
@@ -729,6 +773,19 @@
         >
           <LoginCloudForm handleSubmit={() => this.syncSubmit()} wrappedComponentRef={(inst) => this.logincloudRef = inst}/>
         </Modal>
+        {/* 淇敼瀵嗙爜 */}
+        <Modal
+          title="淇敼瀵嗙爜"
+          okText={this.state.dict['login.ok']}
+          cancelText={this.state.dict['login.cancel']}
+          visible={this.state.visible}
+          onOk={this.resetPwdSubmit}
+          confirmLoading={this.state.resetLoading}
+          onCancel={() => this.setState({visible: false, resetLoading: false})}
+          destroyOnClose
+        >
+          <Resetpwd wrappedComponentRef={(inst) => this.formRef = inst} resetPwdSubmit={this.resetPwdSubmit}/>
+        </Modal>
       </div>
     )
   }

--
Gitblit v1.8.0