From 0d63712b03fc8b8542da904b67c6bea133b4f9d8 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 23 五月 2022 16:31:19 +0800
Subject: [PATCH] 移动端状态栏与字段黑名单

---
 public/options.json                                                      |   14 +++---
 src/mob/components/topbar/normal-navbar/options.jsx                      |    6 ++-
 src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx |    3 +
 src/mob/searchconfig/settingform/index.jsx                               |   33 ++++++++--------
 src/components/normalform/modalform/index.jsx                            |    2 
 src/components/normalform/modalform/mkTable/index.jsx                    |    1 
 src/templates/zshare/formconfig.jsx                                      |    6 ++-
 src/menu/components/form/tab-form/index.jsx                              |   25 ++++++++++++
 8 files changed, 61 insertions(+), 29 deletions(-)

diff --git a/public/options.json b/public/options.json
index f5f2215..fa76f1c 100644
--- a/public/options.json
+++ b/public/options.json
@@ -1,18 +1,18 @@
 {
-  "appId": "202108312122504607B107A83F55B40C98CCF",
-  "appkey": "20210831212235413F287EC3BF489424496C8",
+  "appId": "201912040924165801464FF1788654BC5AC73",
+  "appkey": "20191106103859640976D6E924E464D029CF0",
   "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
   "systemType": "",
   "externalDatabase": "false",
   "lineColor": "",
   "filter": "false",
-  "defaultApp": "mkindustry",
+  "defaultApp": "mk",
   "defaultLang": "zh-CN",
   "WXAppID": "",
   "debugger": false,
-  "licenseKey": "7EFE13KIKLILIJB64C12",
-  "probation": "2021-12-31",
+  "licenseKey": "",
+  "probation": "",
   "keepPassword": "true",
-  "host": "http://demo.mk9h.cn",
-  "service": "erp_new/"
+  "host": "http://qingqiumarket.cn",
+  "service": "MKWMS/"
 }
\ No newline at end of file
diff --git a/src/components/normalform/modalform/index.jsx b/src/components/normalform/modalform/index.jsx
index 6586950..5915aaf 100644
--- a/src/components/normalform/modalform/index.jsx
+++ b/src/components/normalform/modalform/index.jsx
@@ -263,7 +263,7 @@
       } else if (item.type === 'source') {
         content = (<SourceComponent type="" placement="right"/>)
       } else if (item.type === 'table') {
-        content = (<MKTable columns={item.columns || []} actions={item.actions || []}/>)
+        content = (<MKTable tip={item.tip || ''} columns={item.columns || []} actions={item.actions || []}/>)
       }
 
       if (!content) return
diff --git a/src/components/normalform/modalform/mkTable/index.jsx b/src/components/normalform/modalform/mkTable/index.jsx
index c5ae0e9..6cb9b90 100644
--- a/src/components/normalform/modalform/mkTable/index.jsx
+++ b/src/components/normalform/modalform/mkTable/index.jsx
@@ -452,6 +452,7 @@
               })}
             />
           </DndProvider>
+          {this.props.tip ? this.props.tip : null}
         </div>
       </EditableContext.Provider>
     )
diff --git a/src/menu/components/form/tab-form/index.jsx b/src/menu/components/form/tab-form/index.jsx
index 9457252..a369c18 100644
--- a/src/menu/components/form/tab-form/index.jsx
+++ b/src/menu/components/form/tab-form/index.jsx
@@ -673,6 +673,30 @@
     this.updateComponent({...this.state.card, wrap: res})
   }
 
+  clearGroup = () => {
+    let group = fromJS(this.state.group).toJS()
+    let card = fromJS(this.state.card).toJS()
+    let _this = this
+
+    group.fields = []
+
+    card.subcards = card.subcards.map(item => {
+      if (item.uuid === group.uuid) {
+        return group
+      }
+      return item
+    })
+
+    confirm({
+      content: `纭畾娓呯┖琛ㄥ崟鍚楋紵`,
+      onOk() {
+        _this.setState({card, group})
+        _this.props.updateConfig(card)
+      },
+      onCancel() {}
+    })
+  }
+
   clickComponent = (e) => {
     if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
       e.stopPropagation()
@@ -714,6 +738,7 @@
         {group ? <div className="form-area">
           <PlusOutlined className="plus" title="娣诲姞琛ㄥ崟" onClick={this.addForm}/>
           <FieldsComponent config={group} type="form" plusFields={this.plusFields} />
+          <span style={{color: 'red', marginLeft: '30px', cursor: 'pointer'}} onClick={this.clearGroup}>娓呯┖</span>
           <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
           {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(1)}>1鍒�</Button> : null}
           {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(2)}>2鍒�</Button> : null}
diff --git a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
index d8a652f..ba62d69 100644
--- a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
+++ b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
@@ -415,7 +415,8 @@
       label: Formdict['header.form.blacklist'],
       initVal: card.blacklist || [],
       required: false,
-      options: roleList
+      options: roleList,
+      forbidden: appType === 'mob'
     }
   ]
 }
diff --git a/src/mob/components/topbar/normal-navbar/options.jsx b/src/mob/components/topbar/normal-navbar/options.jsx
index 5a016d9..2565095 100644
--- a/src/mob/components/topbar/normal-navbar/options.jsx
+++ b/src/mob/components/topbar/normal-navbar/options.jsx
@@ -56,7 +56,8 @@
       field: 'title',
       label: '鏍囬',
       initval: wrap.title || '',
-      tooltip: '浣跨敤鎼滅储妗嗘椂锛屾爣棰樼敤浜庢悳绱㈡潯浠堕殣钘忔椂锛堝綋鍚敤榛戝悕鍗曪紝鐧诲綍鐢ㄦ埛鏃犳潈闄愭椂锛夋樉绀恒��',
+      // tooltip: '浣跨敤鎼滅储妗嗘椂锛屾爣棰樼敤浜庢悳绱㈡潯浠堕殣钘忔椂锛堝綋鍚敤榛戝悕鍗曪紝鐧诲綍鐢ㄦ埛鏃犳潈闄愭椂锛夋樉绀恒�傛敞锛欯username浠h〃鐢ㄦ埛鍚嶏紝@fullname浠h〃濮撳悕銆�',
+      tooltip: '娉細@username浠h〃鐢ㄦ埛鍚嶏紝@fullname浠h〃濮撳悕銆�',
       required: false
     },
     {
@@ -64,7 +65,7 @@
       field: 'menuPosition',
       label: '鑿滃崟浣嶇疆',
       initval: wrap.menuPosition || 'right',
-      tooltip: '鑷畾涔夎彍鍗曠殑浣嶇疆銆�',
+      tooltip: '鑷畾涔夎彍鍗曠殑浣嶇疆銆傛敞锛氳彍鍗曚綅浜庡乏渚ф椂浼氭樉绀哄ご鍍忥紝涓旇繑鍥炲姛鑳借绂佺敤銆�',
       required: false,
       options: [
         {value: 'left', label: '宸︿晶'},
@@ -188,6 +189,7 @@
       required: false,
       span: 24,
       actions: ['view'],
+      tip: <span style={{fontSize: '12px', color: '#959595', position: 'relative', top: '-8px'}}>褰撲娇鐢ㄥ浘鏍�<MkIcon type="user"/>锛屼笖鍙充晶鍙湁涓�涓彍鍗曟椂锛屼細鏄剧ず鐢ㄦ埛澶村儚銆�</span>,
       columns: [
         {
           title: '鍥炬爣',
diff --git a/src/mob/searchconfig/settingform/index.jsx b/src/mob/searchconfig/settingform/index.jsx
index 96693bb..f753ef8 100644
--- a/src/mob/searchconfig/settingform/index.jsx
+++ b/src/mob/searchconfig/settingform/index.jsx
@@ -1,6 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Input, Radio, Select, Tooltip } from 'antd'
+import { Form, Row, Col, Input, Radio, Tooltip } from 'antd'
 import { QuestionCircleOutlined } from '@ant-design/icons'
 
 import asyncComponent from '@/utils/asyncComponent'
@@ -16,23 +16,23 @@
   }
 
   state = {
-    roleList: [],
+    // roleList: [],
     type: this.props.config.setting.type || 'title'
   }
 
   UNSAFE_componentWillMount() {
-    let roleList = sessionStorage.getItem('sysRoles')
-    if (roleList) {
-      try {
-        roleList = JSON.parse(roleList)
-      } catch (e) {
-        roleList = []
-      }
-    } else {
-      roleList = []
-    }
+    // let roleList = sessionStorage.getItem('sysRoles')
+    // if (roleList) {
+    //   try {
+    //     roleList = JSON.parse(roleList)
+    //   } catch (e) {
+    //     roleList = []
+    //   }
+    // } else {
+    //   roleList = []
+    // }
 
-    this.setState({roleList})
+    // this.setState({roleList})
   }
 
   handleConfirm = () => {
@@ -59,7 +59,7 @@
   render() {
     const { config } = this.props
     const { getFieldDecorator } = this.props.form
-    const { type, roleList } = this.state
+    const { type } = this.state
 
     const formItemLayout = {
       labelCol: {
@@ -234,7 +234,8 @@
               )}
             </Form.Item>
           </Col>
-          {type === 'search' ? <Col span={12}>
+          {/* 鍘婚櫎绉诲姩绔瓧娈垫潈闄� */}
+          {/* {type === 'search' ? <Col span={12}>
             <Form.Item label="榛戝悕鍗�">
               {getFieldDecorator('blacklist', {
                 initialValue: config.setting.blacklist || []
@@ -250,7 +251,7 @@
                 </Select>
               )}
             </Form.Item>
-          </Col> : null}
+          </Col> : null} */}
         </Row>
       </Form>
     )
diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index e67cd6e..c8dbbd5 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -846,7 +846,8 @@
       label: Formdict['header.form.blacklist'],
       initVal: card.blacklist || [],
       required: false,
-      options: roleList || []
+      options: roleList || [],
+      forbid: appType === 'mob'
     }
   ]
 }
@@ -3487,7 +3488,8 @@
       label: Formdict['header.form.blacklist'],
       initVal: card.blacklist || [],
       required: false,
-      options: roleList
+      options: roleList,
+      forbid: appType === 'mob'
     }
   ]
 }

--
Gitblit v1.8.0