From d3a618f09ab510de5c4ca772c44f60c218b61964 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 18 九月 2021 15:12:30 +0800
Subject: [PATCH] 2021-09-18

---
 src/menu/components/share/normalheader/index.scss        |    2 
 src/pc/modulesource/option.jsx                           |    3 
 src/assets/mobimg/tab-form.png                           |    0 
 src/menu/components/tree/antd-tree/options.jsx           |   11 ++
 src/views/login/loginform.jsx                            |   74 ++++++++++++-----
 src/menu/components/table/normal-table/options.jsx       |   20 ++--
 src/tabviews/custom/components/tree/antd-tree/index.jsx  |   23 ++++-
 src/tabviews/zshare/mutilform/index.scss                 |    2 
 src/mob/modulesource/option.jsx                          |    3 
 src/tabviews/zshare/mutilform/index.jsx                  |    1 
 src/views/login/index.scss                               |   20 +++++
 src/tabviews/custom/components/tree/antd-tree/index.scss |    2 
 src/tabviews/zshare/fileupload/index.jsx                 |   19 ++--
 src/menu/components/table/normal-table/columns/index.jsx |    2 
 src/tabviews/zshare/fileupload/index.scss                |   11 ++
 src/menu/modulesource/option.jsx                         |    3 
 16 files changed, 141 insertions(+), 55 deletions(-)

diff --git a/src/assets/mobimg/tab-form.png b/src/assets/mobimg/tab-form.png
new file mode 100644
index 0000000..a4bc70e
--- /dev/null
+++ b/src/assets/mobimg/tab-form.png
Binary files differ
diff --git a/src/menu/components/share/normalheader/index.scss b/src/menu/components/share/normalheader/index.scss
index ed805b2..7570654 100644
--- a/src/menu/components/share/normalheader/index.scss
+++ b/src/menu/components/share/normalheader/index.scss
@@ -21,7 +21,7 @@
     flex: 1;
   }
   .ant-input-search.ant-input-affix-wrapper {
-    width: calc(100% - 140px);
+    width: 50%;
     max-width: 130px;
     margin-top: 8px;
     margin-right: 25px;
diff --git a/src/menu/components/table/normal-table/columns/index.jsx b/src/menu/components/table/normal-table/columns/index.jsx
index 0fd6b6e..a7711e0 100644
--- a/src/menu/components/table/normal-table/columns/index.jsx
+++ b/src/menu/components/table/normal-table/columns/index.jsx
@@ -305,7 +305,7 @@
       })
       this.updateCol(column)
     } else if (column.type === 'custom') {
-      let newcard = {uuid: Utils.getuuid(), focus: true, eleType: 'text', datatype: 'dynamic'}
+      let newcard = {uuid: Utils.getuuid(), focus: true, eleType: 'text', datatype: 'dynamic', style: {paddingLeft: '4px'}}
   
       // 娉ㄥ唽浜嬩欢-娣诲姞鍏冪礌
       MKEmitter.emit('cardAddElement', [config.uuid, column.uuid], newcard)
diff --git a/src/menu/components/table/normal-table/options.jsx b/src/menu/components/table/normal-table/options.jsx
index d7f3582..aa5144e 100644
--- a/src/menu/components/table/normal-table/options.jsx
+++ b/src/menu/components/table/normal-table/options.jsx
@@ -133,16 +133,6 @@
     },
     {
       type: 'number',
-      field: 'fontSize',
-      label: '瀛椾綋澶у皬',
-      initval: wrap.fontSize || 24,
-      min: 12,
-      max: 30,
-      precision: 0,
-      required: false
-    },
-    {
-      type: 'number',
       field: 'width',
       label: '瀹藉害',
       initval: wrap.width || 24,
@@ -154,6 +144,16 @@
     },
     {
       type: 'number',
+      field: 'fontSize',
+      label: '瀛椾綋澶у皬',
+      initval: wrap.fontSize || 14,
+      min: 12,
+      max: 30,
+      precision: 0,
+      required: false
+    },
+    {
+      type: 'number',
       field: 'height',
       label: '楂樺害',
       initval: wrap.height || '',
diff --git a/src/menu/components/tree/antd-tree/options.jsx b/src/menu/components/tree/antd-tree/options.jsx
index a968ff0..f03e80a 100644
--- a/src/menu/components/tree/antd-tree/options.jsx
+++ b/src/menu/components/tree/antd-tree/options.jsx
@@ -111,6 +111,17 @@
       ]
     },
     {
+      type: 'radio',
+      field: 'selected',
+      label: '棣栬閫変腑',
+      initval: wrap.selected || 'false',
+      required: false,
+      options: [
+        {value: 'false', label: '鍚�'},
+        {value: 'true', label: '鏄�'},
+      ]
+    },
+    {
       type: 'multiselect',
       field: 'blacklist',
       label: '榛戝悕鍗�',
diff --git a/src/menu/modulesource/option.jsx b/src/menu/modulesource/option.jsx
index fe6dd69..4c8e13f 100644
--- a/src/menu/modulesource/option.jsx
+++ b/src/menu/modulesource/option.jsx
@@ -18,6 +18,7 @@
 import Carousel from '@/assets/mobimg/carousel.png'
 import Carousel1 from '@/assets/mobimg/carousel1.png'
 import form from '@/assets/mobimg/form.png'
+import tabForm from '@/assets/mobimg/tab-form.png'
 import dashboard from '@/assets/mobimg/dashboard.png'
 import ratioboard from '@/assets/mobimg/ratioboard.png'
 import scatter from '@/assets/mobimg/scatter.png'
@@ -31,7 +32,7 @@
   { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '灞炴�у崱', width: 24 },
   { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '鍙诞鍔ㄥ崱', width: 24 },
   { type: 'menu', url: form, component: 'form', subtype: 'stepform', title: '琛ㄥ崟锛堝垎姝ワ級', width: 24 },
-  { type: 'menu', url: form, component: 'form', subtype: 'tabform', title: '琛ㄥ崟锛坱ab椤碉級', width: 24 },
+  { type: 'menu', url: tabForm, component: 'form', subtype: 'tabform', title: '琛ㄥ崟锛坱ab椤碉級', width: 24 },
   { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '杞挱-鍔ㄦ�佹暟鎹�', width: 24, forbid: ['billPrint'] },
   { type: 'menu', url: Carousel1, component: 'carousel', subtype: 'propcard', title: '杞挱-闈欐�佹暟鎹�', width: 24, forbid: ['billPrint'] },
   { type: 'menu', url: NormalTable, component: 'table', subtype: 'normaltable', title: '甯哥敤琛�', width: 24 },
diff --git a/src/mob/modulesource/option.jsx b/src/mob/modulesource/option.jsx
index dfc9675..3dd06ad 100644
--- a/src/mob/modulesource/option.jsx
+++ b/src/mob/modulesource/option.jsx
@@ -18,6 +18,7 @@
 import Carousel from '@/assets/mobimg/carousel.png'
 import Carousel1 from '@/assets/mobimg/carousel1.png'
 import form from '@/assets/mobimg/form.png'
+import tabForm from '@/assets/mobimg/tab-form.png'
 import Login from '@/assets/mobimg/login.png'
 // import dashboard from '@/assets/mobimg/dashboard.png'
 import NavTop from '@/assets/mobimg/navtop-mob.png'
@@ -35,7 +36,7 @@
   { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '灞炴�у崱', width: 24 },
   { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '鍙诞鍔ㄥ崱', width: 24 },
   { type: 'menu', url: form, component: 'form', subtype: 'stepform', title: '琛ㄥ崟锛堝垎姝ワ級', width: 24 },
-  { type: 'menu', url: form, component: 'form', subtype: 'tabform', title: '琛ㄥ崟锛坱ab椤碉級', width: 24 },
+  { type: 'menu', url: tabForm, component: 'form', subtype: 'tabform', title: '琛ㄥ崟锛坱ab椤碉級', width: 24 },
   { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '杞挱-鍔ㄦ�佹暟鎹�', width: 24 },
   { type: 'menu', url: Carousel1, component: 'carousel', subtype: 'propcard', title: '杞挱-闈欐�佹暟鎹�', width: 24 },
   { type: 'menu', url: NormalTable, component: 'table', subtype: 'normaltable', title: '甯哥敤琛�', width: 24 },
diff --git a/src/pc/modulesource/option.jsx b/src/pc/modulesource/option.jsx
index 59832b5..36dd1a1 100644
--- a/src/pc/modulesource/option.jsx
+++ b/src/pc/modulesource/option.jsx
@@ -19,6 +19,7 @@
 import Carousel from '@/assets/mobimg/carousel.png'
 import Carousel1 from '@/assets/mobimg/carousel1.png'
 import form from '@/assets/mobimg/form.png'
+import tabForm from '@/assets/mobimg/tab-form.png'
 import Login from '@/assets/mobimg/login.png'
 import dashboard from '@/assets/mobimg/dashboard.png'
 import ratioboard from '@/assets/mobimg/ratioboard.png'
@@ -34,7 +35,7 @@
   { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '灞炴�у崱', width: 24 },
   { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '鍙诞鍔ㄥ崱', width: 24 },
   { type: 'menu', url: form, component: 'form', subtype: 'stepform', title: '琛ㄥ崟锛堝垎姝ワ級', width: 24 },
-  { type: 'menu', url: form, component: 'form', subtype: 'tabform', title: '琛ㄥ崟锛坱ab椤碉級', width: 24 },
+  { type: 'menu', url: tabForm, component: 'form', subtype: 'tabform', title: '琛ㄥ崟锛坱ab椤碉級', width: 24 },
   { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '杞挱-鍔ㄦ�佹暟鎹�', width: 24 },
   { type: 'menu', url: Carousel1, component: 'carousel', subtype: 'propcard', title: '杞挱-闈欐�佹暟鎹�', width: 24 },
   { type: 'menu', url: NormalTable, component: 'table', subtype: 'normaltable', title: '甯哥敤琛�', width: 24 },
diff --git a/src/tabviews/custom/components/tree/antd-tree/index.jsx b/src/tabviews/custom/components/tree/antd-tree/index.jsx
index 7ead72b..889398a 100644
--- a/src/tabviews/custom/components/tree/antd-tree/index.jsx
+++ b/src/tabviews/custom/components/tree/antd-tree/index.jsx
@@ -57,9 +57,9 @@
       sync: _sync
     }, () => {
       if (config.setting.sync !== 'true' && config.setting.onload === 'true') {
-        this.loadData()
+        this.loadData(null, 'init')
       } else if (config.setting.sync === 'true' && _data) {
-        this.handleData()
+        this.handleData('init')
       }
     })
   }
@@ -77,7 +77,7 @@
       }
 
       this.setState({sync: false, data: _data}, () => {
-        this.handleData()
+        this.handleData('init')
       })
     } else if (config.setting.syncRefresh && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
       this.setState({}, () => {
@@ -180,7 +180,7 @@
   /**
    * @description 鏁版嵁鍔犺浇
    */
-  async loadData (hastimer) {
+  async loadData (hastimer, type) {
     const { mainSearch, menuType } = this.props
     const { config, arr_field, BID } = this.state
 
@@ -215,7 +215,7 @@
         data: result.data,
         loading: false
       }, () => {
-        this.handleData()
+        this.handleData(type)
       })
     } else {
       this.setState({
@@ -230,7 +230,7 @@
     }
   }
 
-  handleData = () => {
+  handleData = (type) => {
     const { data, searchkey, config } = this.state
     if (!data || data.length === 0) {
       this.setState({
@@ -277,9 +277,20 @@
     }
 
     this.setState({
+      expandedKeys: _treeNodes[0] ? [_treeNodes[0].$key] : [],
       treedata: _treedata,
       treeNodes: _treeNodes,
     })
+
+    if (type === 'init' && _treeNodes[0] && config.wrap.selected === 'true') {
+      this.setState({
+        selectedKeys: [_treeNodes[0].$key]
+      })
+
+      setTimeout(() => {
+        MKEmitter.emit('resetSelectLine', config.uuid, _treeNodes[0].$key, '')
+      }, 200)
+    }
   }
 
   treeFilter = (value) => {
diff --git a/src/tabviews/custom/components/tree/antd-tree/index.scss b/src/tabviews/custom/components/tree/antd-tree/index.scss
index 8e3a725..78de410 100644
--- a/src/tabviews/custom/components/tree/antd-tree/index.scss
+++ b/src/tabviews/custom/components/tree/antd-tree/index.scss
@@ -25,7 +25,7 @@
       z-index: 1;
     }
     .ant-input-search.ant-input-affix-wrapper {
-      width: calc(100% - 140px);
+      width: 50%;
       max-width: 130px;
       margin-top: 6px;
       float: right;
diff --git a/src/tabviews/zshare/fileupload/index.jsx b/src/tabviews/zshare/fileupload/index.jsx
index a10dbd5..3ef6469 100644
--- a/src/tabviews/zshare/fileupload/index.jsx
+++ b/src/tabviews/zshare/fileupload/index.jsx
@@ -61,8 +61,13 @@
       accepts = ['.jpg', '.png', '.gif', '.jpeg']
       accept = accepts.join(',')
     } else if (config.suffix) {
-      accepts = config.suffix.split(',')
-      accept = config.suffix
+      accepts = config.suffix.split(',').map(item => {
+        if (!/^\./ig.test(item)) {
+          item = '.' + item
+        }
+        return item
+      })
+      accept = accepts.join(',')
     }
     let rduri = config.rduri || ''
     
@@ -225,12 +230,10 @@
       })
       
       if (!pass) {
-        notification.warning({
-          top: 92,
-          message: '鏂囦欢鏍煎紡閿欒锛�',
-          duration: 5
-        })
-        return
+        setTimeout(() => {
+          this.onFail('鏂囦欢鏍煎紡閿欒锛�')
+        }, 10)
+        return false
       }
     }
 
diff --git a/src/tabviews/zshare/fileupload/index.scss b/src/tabviews/zshare/fileupload/index.scss
index 6b612d6..4f0cf99 100644
--- a/src/tabviews/zshare/fileupload/index.scss
+++ b/src/tabviews/zshare/fileupload/index.scss
@@ -10,7 +10,16 @@
       bottom: 0px;
     }
   }
-  
+  .ant-upload-list-picture-card-container {
+    width: 90px;
+    height: 90px;
+  }
+  .ant-upload-list-picture-card .ant-upload-list-item-undefined {
+    border-color: #f5222d;
+    .ant-upload-list-item-name {
+      color: #f5222d;
+    }
+  }
   .ant-upload-list-picture-card .ant-upload-list-item {
     width: 90px;
     height: 90px;
diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx
index 524f2ca..6d5929a 100644
--- a/src/tabviews/zshare/mutilform/index.jsx
+++ b/src/tabviews/zshare/mutilform/index.jsx
@@ -690,6 +690,7 @@
           content = (<MKDatePicker config={item} onChange={(val) => this.recordChange({[item.field]: val})} />)
         } else if (item.type === 'fileupload') {
           className = item.readonly ? 'readonly' : ''
+          className += item.fileType === 'picture-card' ? ' file-upload' : ''
           content = (<MKFileUpload config={item} onChange={(val) => this.recordChange({[item.field]: val})} />)
         } else if (item.type === 'textarea') {
           content = (<MKTextArea config={item} onChange={(val, defer) => !defer && this.recordChange({[item.field]: val})}/>)
diff --git a/src/tabviews/zshare/mutilform/index.scss b/src/tabviews/zshare/mutilform/index.scss
index d25d8ca..051bd32 100644
--- a/src/tabviews/zshare/mutilform/index.scss
+++ b/src/tabviews/zshare/mutilform/index.scss
@@ -24,7 +24,7 @@
   .ant-form-item {
     display: flex;
   }
-  .ant-form-item.checkcard {
+  .ant-form-item.checkcard, .ant-form-item.file-upload {
     margin-bottom: 10px;
     .ant-form-item-control {
       line-height: 1.5;
diff --git a/src/views/login/index.scss b/src/views/login/index.scss
index c183885..80c6e97 100644
--- a/src/views/login/index.scss
+++ b/src/views/login/index.scss
@@ -45,6 +45,26 @@
       overflow: hidden;
       border: 1px solid #bfbfbf;
 
+      .login-way-title {
+        font-size: 18px;
+        line-height: 45px;
+        display: flex;
+      }
+      .login-way-title::before, .login-way-title::after {
+        display: inline-block;
+        content: ' ';
+        height: 0.5px;
+        flex: 1;
+        background-color: red;
+        position: relative;
+        top: 22px;
+      }
+      .login-way-title::before {
+        margin: 0 10px 0 1.6vw;
+      }
+      .login-way-title::after {
+        margin: 0 1.6vw 0 10px;
+      }
       .login-way-wrap {
         height: 50px;
         line-height: 50px;
diff --git a/src/views/login/loginform.jsx b/src/views/login/loginform.jsx
index 068518f..43cfa46 100644
--- a/src/views/login/loginform.jsx
+++ b/src/views/login/loginform.jsx
@@ -365,8 +365,9 @@
             <div className={'login-way' + (activeKey === item.type ? ' active' : '')} onClick={() => this.onChangeTab(item.type)} key={item.type}>{item.label}</div>
           ))}
         </div>
-        <div className="form-item-wrap">
-          {activeKey === 'uname_pwd' ? <Form.Item>
+        {/* <div className="login-way-title">鐢ㄦ埛鐧诲綍</div> */}
+        {activeKey === 'uname_pwd' ? <div className="form-item-wrap">
+          <Form.Item>
             {getFieldDecorator('username', {
               rules: [{ required: true, message: this.props.dict['login.username.empty'] }],
               initialValue: this.state.username || '',
@@ -377,8 +378,8 @@
                 autoComplete="off"
               />,
             )}
-          </Form.Item> : null}
-          {activeKey === 'uname_pwd' ? <Form.Item>
+          </Form.Item>
+          <Form.Item>
             {getFieldDecorator('password', {
               initialValue: this.state.password || '',
               rules: [
@@ -388,8 +389,39 @@
                 }
               ]
             })(<Input.Password placeholder={this.props.dict['login.password']} prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} />)}
+          </Form.Item>
+          <Form.Item className="minline">
+            {getFieldDecorator('remember', {
+              valuePropName: 'checked',
+              initialValue: remember,
+            })(<Checkbox onChange={this.rememberChange}>{this.props.dict['login.remember']}</Checkbox>)}
+          </Form.Item>
+          {this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right">
+            {getFieldDecorator('lang', {
+              initialValue: this.props.lang,
+            })(
+              <Select
+                onChange={(value) => {this.changelang(value)}}
+                getPopupContainer={() => document.getElementById('login-form')}
+              >
+                {this.props.langList.map((item, index) => {
+                  return <Select.Option key={index} value={item.Lang}>{item.LangName}</Select.Option>
+                })}
+              </Select>
+            )}
           </Form.Item> : null}
-          {activeKey === 'sms_vcode' ? <Form.Item>
+          <Form.Item className="btn-login">
+            <Button type="primary" htmlType="submit" className="login-form-button" disabled={this.props.isDisabled} loading={this.props.isDisabled}>
+              {this.props.dict['login.submit']}
+            </Button>
+          </Form.Item>
+          {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line">
+            <a href="http://www.minkesoft.com/signup" target="_blank" rel="noopener noreferrer" className="register">娉ㄥ唽</a>
+            <a href="http://www.minkesoft.com/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">蹇樿瀵嗙爜锛�</a>
+          </Form.Item> : null}
+        </div> : null}
+        {activeKey === 'sms_vcode' ? <div className="form-item-wrap">
+          <Form.Item>
             {getFieldDecorator('phone', {
               rules: [{ required: true, message: this.props.dict['login.phone.empty'] }],
               initialValue: '',
@@ -399,8 +431,8 @@
                 autoComplete="off"
               />
             )}
-          </Form.Item> : null}
-          {activeKey === 'sms_vcode' ? <Form.Item className="vercode">
+          </Form.Item>
+          <Form.Item className="vercode">
             {getFieldDecorator('vercode', {
               initialValue: '',
               rules: [
@@ -420,14 +452,8 @@
                 autoComplete="off"
               />
             )}
-          </Form.Item> : null}
-          {activeKey === 'uname_pwd' ? <Form.Item className="minline">
-            {getFieldDecorator('remember', {
-              valuePropName: 'checked',
-              initialValue: remember,
-            })(<Checkbox onChange={this.rememberChange}>{this.props.dict['login.remember']}</Checkbox>)}
-          </Form.Item> : null}
-          {activeKey !== 'app_scan' && this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right">
+          </Form.Item>
+          {this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right">
             {getFieldDecorator('lang', {
               initialValue: this.props.lang,
             })(
@@ -441,12 +467,18 @@
               </Select>
             )}
           </Form.Item> : null}
-          {['uname_pwd', 'sms_vcode'].includes(activeKey) ? <Form.Item className="btn-login">
+          <Form.Item className="btn-login">
             <Button type="primary" htmlType="submit" className="login-form-button" disabled={this.props.isDisabled} loading={this.props.isDisabled}>
               {this.props.dict['login.submit']}
             </Button>
+          </Form.Item>
+          {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line">
+            <a href="http://www.minkesoft.com/signup" target="_blank" rel="noopener noreferrer" className="register">娉ㄥ唽</a>
+            <a href="http://www.minkesoft.com/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">蹇樿瀵嗙爜锛�</a>
           </Form.Item> : null}
-          {activeKey === 'app_scan' ? <div className="form-scan-wrap">
+        </div> : null}
+        {activeKey === 'app_scan' ? <div className="form-item-wrap">
+          <div className="form-scan-wrap">
             <div className="qr-wrap">
               {scanId ? <QrCode card={{qrWidth: 500, color: '#000000'}} value={`mkpcscan,${window.GLOB.appkey},${scanId}`}/> : null}
               {timeout ? <div className="qrcode-out">
@@ -455,12 +487,8 @@
               </div> : null}
             </div>
             璇蜂娇鐢ㄥ鎴风鎵竴鎵櫥褰�
-          </div> : null}
-          {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line">
-            <a href="http://www.minkesoft.com/signup" target="_blank" rel="noopener noreferrer" className="register">娉ㄥ唽</a>
-            <a href="http://www.minkesoft.com/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">蹇樿瀵嗙爜锛�</a>
-          </Form.Item> : null}
-        </div>
+          </div>
+        </div> : null}
       </Form>
     )
   }

--
Gitblit v1.8.0