From 6c56a138c17dc9aff9d175d20645eb176d2e024b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 03 三月 2021 19:03:18 +0800
Subject: [PATCH] 2021-03-03

---
 src/menu/components/tabs/tablabelform/index.jsx |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/src/menu/components/tabs/tablabelform/index.jsx b/src/menu/components/tabs/tablabelform/index.jsx
index 3a63a0d..784a9f9 100644
--- a/src/menu/components/tabs/tablabelform/index.jsx
+++ b/src/menu/components/tabs/tablabelform/index.jsx
@@ -12,10 +12,21 @@
     inputSubmit: PropTypes.func    // 鍥炶溅浜嬩欢
   }
 
-  state = {}
+  state = {roleList: []}
 
   UNSAFE_componentWillMount () {
+    let roleList = sessionStorage.getItem('sysRoles')
+    if (roleList) {
+      try {
+        roleList = JSON.parse(roleList)
+      } catch {
+        roleList = []
+      }
+    } else {
+      roleList = []
+    }
 
+    this.setState({roleList})
   }
 
   handleConfirm = () => {
@@ -42,6 +53,7 @@
   render() {
     const { tab } = this.props
     const { getFieldDecorator } = this.props.form
+    const { roleList } = this.state
 
     const formItemLayout = {
       labelCol: {
@@ -85,6 +97,23 @@
               )}
             </Form.Item>
           </Col>
+          <Col span={24}>
+            <Form.Item label="榛戝悕鍗�">
+              {getFieldDecorator('blacklist', {
+                initialValue: tab.blacklist || []
+              })(
+                <Select
+                  showSearch
+                  mode="multiple"
+                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
+                >
+                  {roleList.map(option =>
+                    <Select.Option key={option.uuid} value={option.value}>{option.text}</Select.Option>
+                  )}
+                </Select>
+              )}
+            </Form.Item>
+          </Col>
         </Row>
       </Form>
     )

--
Gitblit v1.8.0