From b21542ffa283ca3fff2d1d7bdd431eb7722fa5f8 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 09 十二月 2021 16:24:32 +0800
Subject: [PATCH] 2021-12-09

---
 src/templates/modalconfig/settingform/index.jsx                   |    3 
 src/views/mobdesign/menuform/index.jsx                            |   51 +++++-----
 src/menu/components/card/cardcellcomponent/elementform/index.jsx  |    2 
 src/tabviews/zshare/actionList/printbutton/index.jsx              |   26 +++--
 src/mob/components/formdragelement/card.jsx                       |    6 
 src/templates/sharecomponent/fieldscomponent/index.jsx            |   21 ++++
 src/menu/components/card/cardcellcomponent/formconfig.jsx         |    3 
 src/templates/modalconfig/index.jsx                               |    2 
 src/views/appmanage/index.jsx                                     |   15 ++
 src/mob/modalconfig/index.jsx                                     |    2 
 src/tabviews/zshare/actionList/normalbutton/index.jsx             |   30 +++--
 src/templates/modalconfig/dragelement/card.jsx                    |    2 
 src/views/appmanage/submutilform/index.jsx                        |   77 +++++++--------
 src/views/mobdesign/index.jsx                                     |   19 +++
 src/utils/option.js                                               |   14 ++
 src/templates/sharecomponent/searchcomponent/searchform/index.jsx |    9 +
 16 files changed, 172 insertions(+), 110 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
index 4f24969..53b8bf3 100644
--- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -200,6 +200,8 @@
           this.props.form.setFieldsValue({width: 24, color: '#1890ff'})
         } else if (value === 'splitline') {
           this.props.form.setFieldsValue({width: 24, color: '#e8e8e8'})
+        } else if (value === 'qrcode') {
+          this.props.form.setFieldsValue({color: '#000000'})
         } else if (value === 'text' || value === 'number') {
           this.props.form.setFieldsValue({format: ''})
         }
diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx
index ac90789..8987fa7 100644
--- a/src/menu/components/card/cardcellcomponent/formconfig.jsx
+++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -190,7 +190,8 @@
     {
       type: 'color',
       key: 'color',
-      label: '杩涘害鏉¢鑹�',
+      label: '棰滆壊',
+      tooltip: '杩涘害鏉″畬鎴愬尯鍩熴�佸垎鍓茬嚎鎴栦簩缁寸爜鐨勯鑹层��',
       initVal: card.color || '#1890ff',
       required: true
     },
diff --git a/src/mob/components/formdragelement/card.jsx b/src/mob/components/formdragelement/card.jsx
index dddd925..a92dc7f 100644
--- a/src/mob/components/formdragelement/card.jsx
+++ b/src/mob/components/formdragelement/card.jsx
@@ -190,13 +190,15 @@
       </div>
     } trigger="hover">
       <div className="page-card" style={{ opacity: opacity}}>
-        <div ref={node => drag(drop(node))} style={{ border: '0.5px solid transparent'}}>
+        <div ref={node => drag(drop(node))} style={{ border: '0.5px solid transparent'}} onDoubleClick={edit}>
           {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}
-            {showField ? <div className="field-name">{card.field}{card.hidden === 'true' ? '(闅愯棌)' : ''}</div> : ''}
+            {showField ? <div className="field-name" style={card.writein === 'false' ? {color: 'orange'} : {}}>
+              {card.field}{card.hidden === 'true' ? '锛堥殣钘忥級' : ''}{card.readonly === 'true' ? '锛堝彧璇伙級' : ''}
+            </div> : ''}
           </Form.Item>}
         </div>
       </div>
diff --git a/src/mob/modalconfig/index.jsx b/src/mob/modalconfig/index.jsx
index 8f2b651..3c54c06 100644
--- a/src/mob/modalconfig/index.jsx
+++ b/src/mob/modalconfig/index.jsx
@@ -468,7 +468,7 @@
         <Modal
           title={this.state.dict['model.edit']}
           visible={this.state.settingVisible}
-          width={850}
+          width={900}
           maskClosable={false}
           onOk={this.settingSave}
           onCancel={() => { this.setState({ settingVisible: false }) }}
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 7278fd3..a0668c4 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1692,7 +1692,7 @@
     const { btnconfig, autoMatic } = this.state
 
     if (btnconfig) {
-      if (!autoMatic && btnconfig.setting.display === 'prompt') { // 濡傛灉琛ㄥ崟浠ユ槸鍚︽灞曠ず
+      if (!autoMatic && (btnconfig.setting.display === 'prompt' || btnconfig.setting.display === 'exec')) { // 濡傛灉琛ㄥ崟浠ユ槸鍚︽灞曠ず
         this.modelconfirm()
       } else {
         this.setState({
@@ -1736,7 +1736,7 @@
           this.setState({
             btnconfig: _LongParam
           }, () => {
-            if (!autoMatic && _LongParam.setting.display === 'prompt') { // 濡傛灉琛ㄥ崟浠ユ槸鍚︽灞曠ず
+            if (!autoMatic && (_LongParam.setting.display === 'prompt' || _LongParam.setting.display === 'exec')) { // 濡傛灉琛ㄥ崟浠ユ槸鍚︽灞曠ず
               this.modelconfirm()
             } else {
               this.setState({
@@ -1845,17 +1845,21 @@
       })
     })
 
-    confirm({
-      title: this.state.dict['main.action.confirm.tip'],
-      onOk() {
-        return new Promise(resolve => {
-          _this.execSubmit(selines, resolve, result)
-        })
-      },
-      onCancel() {
-        _this.setState({ loading: false })
-      }
-    })
+    if (btnconfig.setting.display === 'exec') {
+      this.execSubmit(selines, () => {}, result)
+    } else {
+      confirm({
+        title: this.state.dict['main.action.confirm.tip'],
+        onOk() {
+          return new Promise(resolve => {
+            _this.execSubmit(selines, resolve, result)
+          })
+        },
+        onCancel() {
+          _this.setState({ loading: false })
+        }
+      })
+    }
   }
 
   /**
diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index e16fd39..288cd71 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -1349,7 +1349,7 @@
     const { btnconfig, autoMatic } = this.state
 
     if (btnconfig) {
-      if (!autoMatic && btnconfig.setting.display === 'prompt') { // 濡傛灉琛ㄥ崟浠ユ槸鍚︽灞曠ず
+      if (!autoMatic && (btnconfig.setting.display === 'prompt' || btnconfig.setting.display === 'exec')) { // 濡傛灉琛ㄥ崟浠ユ槸鍚︽灞曠ず
         this.modelconfirm()
       } else {
         this.setState({
@@ -1393,7 +1393,7 @@
           this.setState({
             btnconfig: _LongParam
           }, () => {
-            if (!autoMatic && _LongParam.setting.display === 'prompt') { // 濡傛灉琛ㄥ崟浠ユ槸鍚︽灞曠ず
+            if (!autoMatic && (_LongParam.setting.display === 'prompt' || _LongParam.setting.display === 'exec')) { // 濡傛灉琛ㄥ崟浠ユ槸鍚︽灞曠ず
               this.modelconfirm()
             } else {
               this.setState({
@@ -1500,15 +1500,19 @@
       })
     })
 
-    confirm({
-      title: this.state.dict['main.action.confirm.tip'],
-      onOk() {
-        _this.triggerPrint(selines, result)
-      },
-      onCancel() {
-        _this.setState({ loading: false })
-      }
-    })
+    if (btnconfig.setting.display === 'exec') {
+      this.execSubmit(selines, () => {}, result)
+    } else {
+      confirm({
+        title: this.state.dict['main.action.confirm.tip'],
+        onOk() {
+          _this.triggerPrint(selines, result)
+        },
+        onCancel() {
+          _this.setState({ loading: false })
+        }
+      })
+    }
   }
 
   /**
diff --git a/src/templates/modalconfig/dragelement/card.jsx b/src/templates/modalconfig/dragelement/card.jsx
index 796dcc8..a7eceb7 100644
--- a/src/templates/modalconfig/dragelement/card.jsx
+++ b/src/templates/modalconfig/dragelement/card.jsx
@@ -155,7 +155,7 @@
           >
             {formItem}
             {showField ? <div className="field-name" style={card.writein === 'false' ? {color: 'orange'} : {}}>
-              {card.field}{card.hidden === 'true' ? '锛堥殣钘忥級' : ''}
+              {card.field}{card.hidden === 'true' ? '锛堥殣钘忥級' : ''}{card.readonly === 'true' ? '锛堝彧璇伙級' : ''}
             </div> : ''}
           </Form.Item>}
         </div>
diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx
index 8c690fb..3859994 100644
--- a/src/templates/modalconfig/index.jsx
+++ b/src/templates/modalconfig/index.jsx
@@ -773,7 +773,7 @@
         <Modal
           title={dict['model.edit']}
           visible={this.state.settingVisible}
-          width={850}
+          width={900}
           maskClosable={false}
           onOk={this.settingSave}
           onCancel={() => { this.setState({ settingVisible: false }) }}
diff --git a/src/templates/modalconfig/settingform/index.jsx b/src/templates/modalconfig/settingform/index.jsx
index d2eea85..3810cd0 100644
--- a/src/templates/modalconfig/settingform/index.jsx
+++ b/src/templates/modalconfig/settingform/index.jsx
@@ -223,8 +223,9 @@
               })(
                 <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => this.setState({display: e.target.value})}>
                   {appType !== 'mob' ? <Radio value="modal">妯℃�佹</Radio> : null}
-                  <Radio value="prompt">鏄惁妗�</Radio>
                   <Radio value="drawer">鎶藉眽</Radio>
+                  <Radio value="prompt">鏄惁妗�</Radio>
+                  <Radio value="exec">鐩存帴鎵ц</Radio>
                 </Radio.Group>
               )}
             </Form.Item>
diff --git a/src/templates/sharecomponent/fieldscomponent/index.jsx b/src/templates/sharecomponent/fieldscomponent/index.jsx
index 85b0013..d69e4c5 100644
--- a/src/templates/sharecomponent/fieldscomponent/index.jsx
+++ b/src/templates/sharecomponent/fieldscomponent/index.jsx
@@ -200,6 +200,27 @@
           required: 'true'
         }
 
+        if (item.type === 'text' && item.length >= 256) {
+          newcard.type = 'textarea'
+          newcard.fieldlength = item.length
+          if (lastItem && lastItem.type === newcard.type) {
+            newcard.span = lastItem.span
+            newcard.labelwidth = lastItem.labelwidth
+          } else if (lastItem) {
+            newcard.span = 24
+            if (lastItem.span === 12) {
+              newcard.labelwidth = 16.2
+            } else if (lastItem.span === 8) {
+              newcard.labelwidth = 10.5
+            } else if (lastItem.span === 8) {
+              newcard.labelwidth = 7.7
+            }
+          } else {
+            newcard.span = 24
+            newcard.labelwidth = 16.2
+          }
+        }
+
         items.push(newcard)
         keys.push(item.field.toLowerCase())
       })
diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx
index db164c5..10232b9 100644
--- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx
+++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx
@@ -26,8 +26,13 @@
       {value: 3, label: '鍓嶄笁澶�'},
       {value: 7, label: '鍓嶄竷澶�'},
       {value: 30, label: '鍓�30澶�'},
-      {value: -1, label: '鏄庡ぉ'},
-      {value: -2, label: '鍚庡ぉ'}
+      {value: 90, text: '鍓�90澶�'},
+      {value: -1, text: '鏄庡ぉ'},
+      {value: -2, text: '鍚庡ぉ'},
+      {value: -3, text: '鍚庝笁澶�'},
+      {value: -7, text: '鍚庝竷澶�'},
+      {value: -30, text: '鍚�30澶�'},
+      {value: -90, text: '鍚�90澶�'},
     ]
   },
   {
diff --git a/src/utils/option.js b/src/utils/option.js
index ed22d33..7c3ef9c 100644
--- a/src/utils/option.js
+++ b/src/utils/option.js
@@ -115,8 +115,13 @@
     {value: 3, text: '鍓嶄笁澶�'},
     {value: 7, text: '鍓嶄竷澶�'},
     {value: 30, text: '鍓�30澶�'},
+    {value: 90, text: '鍓�90澶�'},
     {value: -1, text: '鏄庡ぉ'},
-    {value: -2, text: '鍚庡ぉ'}
+    {value: -2, text: '鍚庡ぉ'},
+    {value: -3, text: '鍚庝笁澶�'},
+    {value: -7, text: '鍚庝竷澶�'},
+    {value: -30, text: '鍚�30澶�'},
+    {value: -90, text: '鍚�90澶�'},
   ],
   dateweek: [
     {value: '', text: _dict['model.empty']},
@@ -156,8 +161,13 @@
     {value: 3, text: '鍓嶄笁澶�'},
     {value: 7, text: '鍓嶄竷澶�'},
     {value: 30, text: '鍓�30澶�'},
+    {value: 90, text: '鍓�90澶�'},
     {value: -1, text: '鏄庡ぉ'},
-    {value: -2, text: '鍚庡ぉ'}
+    {value: -2, text: '鍚庡ぉ'},
+    {value: -3, text: '鍚庝笁澶�'},
+    {value: -7, text: '鍚庝竷澶�'},
+    {value: -30, text: '鍚�30澶�'},
+    {value: -90, text: '鍚�90澶�'},
   ]
 }
 
diff --git a/src/views/appmanage/index.jsx b/src/views/appmanage/index.jsx
index 9658cb1..913707c 100644
--- a/src/views/appmanage/index.jsx
+++ b/src/views/appmanage/index.jsx
@@ -472,7 +472,14 @@
               cell.apptype = _param.apptype || ''
               cell.delay = _param.delay || 0
               cell.statusBarColor = _param.statusBarColor || 'black'
-              cell.adapter = _param.adapter || 'false'
+              cell.adapter = _param.adapter || ''
+              if (cell.adapter && (cell.adapter === 'true' || cell.adapter === 'false')) {
+                cell.adapter = ''
+              }
+            }
+
+            if (!cell.adapter && (cell.user_binding || cell.apptype)) {
+              cell.adapter = 'app,weixin'
             }
 
             return cell
@@ -605,7 +612,7 @@
     sublist = sublist.filter(item => item.ID !== record.ID)
 
     // param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}'`)
-    param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', adapter: item.adapter || 'false'})))}'`)
+    param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', adapter: item.adapter || ''})))}'`)
     param.LText = param.LText.join(' union all ')
     param.LText = Utils.formatOptions(param.LText)
     
@@ -829,7 +836,7 @@
 
       if (visible === 'edit') {
         // param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}'`)
-        param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', adapter: item.adapter || 'false'})))}'`)
+        param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', adapter: item.adapter || ''})))}'`)
         param.LText = param.LText.join(' union all ')
         param.LText = Utils.formatOptions(param.LText)
       }
@@ -915,7 +922,7 @@
       }
 
       // param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}'`)
-      param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', adapter: item.adapter || 'false'})))}'`)
+      param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', adapter: item.adapter || ''})))}'`)
       param.LText = param.LText.join(' union all ')
       param.LText = Utils.formatOptions(param.LText)
 
diff --git a/src/views/appmanage/submutilform/index.jsx b/src/views/appmanage/submutilform/index.jsx
index 96b98d8..bb23ae7 100644
--- a/src/views/appmanage/submutilform/index.jsx
+++ b/src/views/appmanage/submutilform/index.jsx
@@ -15,20 +15,26 @@
     inputSubmit: PropTypes.func  // input鍥炶溅鎻愪氦
   }
 
-  state = {msgs: [], typename: 'mob', user_binding: []}
+  state = {msgs: [], typename: 'mob', user_binding: [], adapters: []}
 
   UNSAFE_componentWillMount() {
     const { card } = this.props
     let msgs = sessionStorage.getItem('msgTemplate')
     let user_binding = []
+    let adapters = []
     let typename = 'mob'
 
     if (card) {
       typename = card.typename || 'mob'
       user_binding = card.user_binding ? card.user_binding.split(',') : []
+      adapters = card.adapter ? card.adapter.split(',') : []
+
+      if (!adapters.includes('weixin') && !adapters.includes('wxmini')) {
+        user_binding = []
+      }
     }
 
-    this.setState({msgs: JSON.parse(msgs), typename, user_binding})
+    this.setState({msgs: JSON.parse(msgs), typename, user_binding, adapters})
   }
 
   /**
@@ -39,6 +45,7 @@
       this.props.form.validateFieldsAndScroll((err, values) => {
         if (!err) {
           values.user_binding = values.user_binding ? values.user_binding.join(',') : ''
+          values.adapter = values.adapter ? values.adapter.join(',') : ''
           if (values.user_binding.indexOf('sms_vcode') > -1 && !values.sms_id) {
             notification.warning({
               top: 92,
@@ -57,6 +64,13 @@
     this.setState({user_binding: vals})
   }
 
+  onAdapterChange = (vals) => {
+    this.setState({adapters: vals})
+    if (!vals.includes('weixin') && !vals.includes('wxmini')) {
+      this.setState({user_binding: []})
+    }
+  }
+
   /**
    * @description 鍥炶溅鎻愪氦
    */
@@ -68,7 +82,7 @@
   render() {
     const { card, type } = this.props
     const { getFieldDecorator } = this.props.form
-    const { msgs, typename, user_binding } = this.state
+    const { msgs, typename, user_binding, adapters } = this.state
     const formItemLayout = {
       labelCol: {
         xs: { span: 24 },
@@ -89,7 +103,7 @@
                 initialValue: typename
               })(
                 <Select disabled={type === 'edit'} onChange={(val) => this.setState({typename: val})}>
-                  <Select.Option value="mob">绉诲姩绔�(鍖呮嫭android銆乮os)</Select.Option>
+                  <Select.Option value="mob">绉诲姩绔�</Select.Option>
                   <Select.Option value="pad">Pad绔�</Select.Option>
                   <Select.Option value="pc">PC绔�</Select.Option>
                 </Select>
@@ -108,18 +122,6 @@
               )}
             </Form.Item>
           </Col>
-          {/* <Col span={12}>
-            <Form.Item label="鐧诲綍">
-              {getFieldDecorator('login_types', {
-                initialValue: card ? card.login_types || 'true' : 'true'
-              })(
-                <Radio.Group>
-                  <Radio value="true">闇�瑕�</Radio>
-                  <Radio value="false">涓嶉渶瑕�</Radio>
-                </Radio.Group>
-              )}
-            </Form.Item>
-          </Col> */}
           <Col span={12}>
             <Form.Item label="鏉冮檺绠$悊">
               {getFieldDecorator('role_type', {
@@ -157,12 +159,20 @@
             </Form.Item>
           </Col>
           {typename !== 'pc' ? <Col span={12}>
-            <Form.Item label={
-              <Tooltip placement="topLeft" title="浣跨敤鍏紬鍙锋巿鏉冪櫥褰曟垨浣跨敤灏忕▼搴忔椂锛屾槸鍚﹂渶瑕佺粦瀹氱敤鎴枫��">
-                <QuestionCircleOutlined className="mk-form-tip" />
-                鐢ㄦ埛缁戝畾
-              </Tooltip>
-            }>
+            <Form.Item label="閫傞厤">
+              {getFieldDecorator('adapter', {
+                initialValue: adapters
+              })(
+                <Checkbox.Group onChange={this.onAdapterChange}>
+                  <Checkbox value="app">app</Checkbox>
+                  <Checkbox value="weixin">鍏紬鍙�</Checkbox>
+                  <Checkbox value="wxmini">灏忕▼搴�</Checkbox>
+                </Checkbox.Group>
+              )}
+            </Form.Item>
+          </Col> : null}
+          {typename !== 'pc' && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={12}>
+            <Form.Item label="鐢ㄦ埛缁戝畾">
               {getFieldDecorator('user_binding', {
                 initialValue: user_binding
               })(
@@ -237,7 +247,7 @@
               )}
             </Form.Item>
           </Col> : null}
-          {typename !== 'pc' ? <Col span={12}>
+          {typename !== 'pc' && adapters.includes('app') ? <Col span={12}>
             <Form.Item label={
               <Tooltip placement="topLeft" title="鍦ㄤ娇鐢ㄦ槑绉戜簯APP鏃讹紝椤甸潰鐨勫垏鎹㈡ā寮�">
                 <QuestionCircleOutlined className="mk-form-tip" />
@@ -256,7 +266,7 @@
           </Col> : null}
           {typename !== 'pc' ? <Col span={12}>
             <Form.Item label={
-              <Tooltip placement="topLeft" title="鍦ㄤ娇鐢ㄦ槑绉戜簯APP鏃讹紝涓斿湪app妯″紡涓棤鏁�">
+              <Tooltip placement="topLeft" title="鍦ㄤ娇鐢ㄥ皬绋嬪簭鎴栨槑绉戜簯APP鏃讹紙app妯″紡涓級鏃犳晥">
                 <QuestionCircleOutlined className="mk-form-tip" />
                 寤惰繜鍔犺浇(ms)
               </Tooltip>
@@ -266,7 +276,7 @@
               })(<InputNumber min={0} max={5000} precision={0} onPressEnter={this.handleSubmit}/>)}
             </Form.Item>
           </Col> : null}
-          {typename !== 'pc' ? <Col span={12}>
+          {typename !== 'pc' && adapters.includes('app') ? <Col span={12}>
             <Form.Item label={
               <Tooltip placement="topLeft" title="鍦ㄤ娇鐢ㄦ槑绉戜簯APP鏃讹紝鐘舵�佹爮鐨勫瓧浣撻鑹层��">
                 <QuestionCircleOutlined className="mk-form-tip" />
@@ -279,23 +289,6 @@
                 <Radio.Group>
                   <Radio value="black">榛戣壊</Radio>
                   <Radio value="white">鐧借壊</Radio>
-                </Radio.Group>
-              )}
-            </Form.Item>
-          </Col> : null}
-          {typename !== 'pc' ? <Col span={12}>
-            <Form.Item label={
-              <Tooltip placement="topLeft" title="璇风‘璁ゅ綋鍓嶅簲鐢ㄦ槸鍚﹀湪灏忕▼搴忎腑浣跨敤銆�">
-                <QuestionCircleOutlined className="mk-form-tip" />
-                灏忕▼搴�
-              </Tooltip>
-            }>
-              {getFieldDecorator('adapter', {
-                initialValue: card ? card.adapter || 'false' : 'false'
-              })(
-                <Radio.Group>
-                  <Radio value="false">涓嶉�傞厤</Radio>
-                  <Radio value="true">閫傞厤</Radio>
                 </Radio.Group>
               )}
             </Form.Item>
diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx
index 03da9bc..44a255b 100644
--- a/src/views/mobdesign/index.jsx
+++ b/src/views/mobdesign/index.jsx
@@ -70,7 +70,8 @@
     direction: 'vertical',
     settingshow: true,
     controlshow: true,
-    comloading: false
+    comloading: false,
+    adapters: []
   }
 
   UNSAFE_componentWillMount() {
@@ -85,7 +86,7 @@
         sessionStorage.setItem('role_type', param.role_type || 'true')
         sessionStorage.setItem('login_types', param.login_types || 'false')
         sessionStorage.setItem('typename', param.typename || 'mob')
-        sessionStorage.setItem('adapter', param.adapter || 'false')
+        sessionStorage.setItem('adapter', param.adapter || '')
 
         this.setState({
           localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS,
@@ -105,7 +106,15 @@
           window.GLOB.shellHeight = 853
         }
 
+        let adapters = sessionStorage.getItem('adapter')
+        if (adapters) {
+          adapters = adapters.split(',')
+        } else {
+          adapters = []
+        }
+
         this.setState({
+          adapters,
           MenuId: param.MenuID
         }, () => {
           this.getMenuParam(param)
@@ -908,6 +917,7 @@
   }
 
   submitConfig = () => {
+    const { adapters } = this.state
     let config = fromJS(this.state.config).toJS()
 
     if (!config.MenuName || !config.MenuNo || (config.cacheUseful === 'true' && !config.cacheTime)) {
@@ -942,7 +952,7 @@
         config.loginview = false
       }
 
-      if (sessionStorage.getItem('adapter') === 'true') {
+      if (adapters.includes('wxmini')) {
         config = this.getMiniStyle(config)
       }
 
@@ -1463,7 +1473,7 @@
 
 
   render () {
-    const { localedict, comloading, loading, settingshow, controlshow, activeKey, dict, MenuId, config, menuloading, customComponents } = this.state
+    const { localedict, comloading, loading, settingshow, controlshow, activeKey, dict, MenuId, config, menuloading, customComponents, adapters } = this.state
 
     return (
       <ConfigProvider locale={localedict}>
@@ -1485,6 +1495,7 @@
                       dict={dict}
                       config={config}
                       MenuId={MenuId}
+                      adapters={adapters}
                       updateConfig={this.updateConfig}
                     /> : null}
                     {config ? <UrlFieldComponent config={config} updateConfig={this.updateConfig}/> : null}
diff --git a/src/views/mobdesign/menuform/index.jsx b/src/views/mobdesign/menuform/index.jsx
index 97f4805..95da5b8 100644
--- a/src/views/mobdesign/menuform/index.jsx
+++ b/src/views/mobdesign/menuform/index.jsx
@@ -15,6 +15,7 @@
     dict: PropTypes.object, // 瀛楀吀椤�
     config: PropTypes.object,
     MenuId: PropTypes.string,
+    adapters: PropTypes.array,
     updateConfig: PropTypes.func
   }
 
@@ -61,7 +62,7 @@
   }
 
   render() {
-    const { dict, config } = this.props
+    const { dict, config, adapters } = this.props
     const { getFieldDecorator } = this.props.form
     const formItemLayout = {
       labelCol: {
@@ -182,6 +183,28 @@
             </Form.Item>
           </Col> : null}
           <Col span={24}>
+            <Form.Item label="涓嬫媺鍒锋柊">
+              {getFieldDecorator('pullRefresh', {
+                initialValue: config.pullRefresh || 'false'
+              })(
+                <Radio.Group onChange={(e) => {this.selectChange('pullRefresh', e.target.value)}}>
+                  <Radio value="false">鍏抽棴</Radio>
+                  <Radio value="true">寮�鍚�</Radio>
+                </Radio.Group>
+              )}
+            </Form.Item>
+          </Col>
+          {adapters.includes('app') || adapters.includes('wxmini') ? <Col span={24}>
+            <Form.Item className="status-bar" label={
+              <Tooltip placement="topLeft" title="鍦ㄦ槑绉戜簯APP鎴栧皬绋嬪簭涓紝鐘舵�佹爮鐨勮儗鏅壊銆�">
+                <QuestionCircleOutlined className="mk-form-tip" />
+                鐘舵�佹爮
+              </Tooltip>
+            }>
+              <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val) => {this.selectChange('statusBarbgColor', val)}} />
+            </Form.Item>
+          </Col> : null}
+          {adapters.includes('app') ? <Col span={24}>
             <Form.Item label={
               <Tooltip placement="topLeft" title="鍦ㄦ槑绉戜簯APP涓湁鏁堛��">
                 <QuestionCircleOutlined className="mk-form-tip" />
@@ -194,30 +217,8 @@
                 <SourceComponent type="picture" placement="right" onChange={(val) => {this.selectChange('advertUrl', val)}}/>
               )}
             </Form.Item>
-          </Col>
-          <Col span={24}>
-            <Form.Item label="涓嬫媺鍒锋柊">
-              {getFieldDecorator('pullRefresh', {
-                initialValue: config.pullRefresh || 'false'
-              })(
-                <Radio.Group onChange={(e) => {this.selectChange('pullRefresh', e.target.value)}}>
-                  <Radio value="false">鍏抽棴</Radio>
-                  <Radio value="true">寮�鍚�</Radio>
-                </Radio.Group>
-              )}
-            </Form.Item>
-          </Col>
-          <Col span={24}>
-            <Form.Item className="status-bar" label={
-              <Tooltip placement="topLeft" title="鍦ㄦ槑绉戜簯APP涓紝鐘舵�佹爮鐨勮儗鏅壊銆�">
-                <QuestionCircleOutlined className="mk-form-tip" />
-                鐘舵�佹爮
-              </Tooltip>
-            }>
-              <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val) => {this.selectChange('statusBarbgColor', val)}} />
-            </Form.Item>
-          </Col>
-          {config.advertUrl ? <Col span={24}>
+          </Col> : null}
+          {adapters.includes('app') && config.advertUrl ? <Col span={24}>
             <Form.Item label="鍋滅暀(s)">
               {getFieldDecorator('advertTime', {
                 initialValue: config.advertTime || 3,

--
Gitblit v1.8.0