From a757b75163d77acc5111637fbe20ec61d895a72b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 11 八月 2021 23:15:29 +0800
Subject: [PATCH] 2021-08-11

---
 src/pc/components/login/wrapsetting/settingform/index.jsx |   72 +++++++++++++++++++++++++++++++++---
 1 files changed, 66 insertions(+), 6 deletions(-)

diff --git a/src/pc/components/login/wrapsetting/settingform/index.jsx b/src/pc/components/login/wrapsetting/settingform/index.jsx
index 8b3269c..0c32e57 100644
--- a/src/pc/components/login/wrapsetting/settingform/index.jsx
+++ b/src/pc/components/login/wrapsetting/settingform/index.jsx
@@ -1,6 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Input, Tooltip, Icon, InputNumber, Select, Checkbox, notification } from 'antd'
+import { Form, Row, Col, Input, Tooltip, Icon, InputNumber, Select, Checkbox, notification, Radio } from 'antd'
 
 import StyleInput from '@/menu/stylecontroller/styleInput'
 import './index.scss'
@@ -14,7 +14,9 @@
 
   state = {
     roleList: [],
-    msgTemps: []
+    msgTemps: [],
+    appMenus: [],
+    link: this.props.wrap.link || 'menu'
   }
 
   UNSAFE_componentWillMount () {
@@ -41,7 +43,18 @@
       msgTemps = []
     }
 
-    this.setState({roleList, msgTemps})
+    let appMenus = sessionStorage.getItem('appMenus')
+    if (appMenus) {
+      try {
+        appMenus = JSON.parse(appMenus)
+      } catch {
+        appMenus = []
+      }
+    } else {
+      appMenus = []
+    }
+
+    this.setState({roleList, msgTemps, appMenus})
   }
 
   handleConfirm = () => {
@@ -76,7 +89,7 @@
   render() {
     const { wrap } = this.props
     const { getFieldDecorator } = this.props.form
-    const { roleList, msgTemps } = this.state
+    const { roleList, msgTemps, appMenus, link } = this.state
 
     const formItemLayout = {
       labelCol: {
@@ -124,8 +137,9 @@
                 })(
                   <Checkbox.Group
                     options={[
-                      { label: '璐﹀彿瀵嗙爜', value: 'uname_pwd' },
-                      { label: '鐭俊楠岃瘉鐮�', value: 'sms_vcode' },
+                      { label: '璐﹀彿', value: 'uname_pwd' },
+                      { label: '鐭俊', value: 'sms_vcode' },
+                      { label: '鎵爜', value: 'app_scan' },
                     ]}
                   />
                 )}
@@ -151,6 +165,18 @@
             </Col>
             <Col span={12}>
               <Form.Item label={
+                <Tooltip placement="topLeft" title="鐧诲綍妗嗙殑鏈�澶у搴﹀�笺��">
+                  <Icon type="question-circle" />
+                  鏈�澶у搴�
+                </Tooltip>
+              }>
+                {getFieldDecorator('maxWidth', {
+                  initialValue: wrap.maxWidth || ''
+                })(<InputNumber min={100} max={2000} precision={0} onPressEnter={this.handleSubmit} />)}
+              </Form.Item>
+            </Col>
+            <Col span={12}>
+              <Form.Item label={
                 <Tooltip placement="topLeft" title="缁勪欢鍗犵敤鐨勬渶灏忛珮搴︼紝鐢ㄤ簬椤甸潰甯冨眬銆�">
                   <Icon type="question-circle" />
                   楂樺害
@@ -161,6 +187,40 @@
                 })(<StyleInput options={['px', 'vh', 'vw', '%']}/>)}
               </Form.Item>
             </Col>
+            <Col span={12}>
+              <Form.Item label="閾炬帴">
+                {getFieldDecorator('link', {
+                  initialValue: wrap.link || 'menu'
+                })(
+                  <Radio.Group onChange={(e) => this.setState({link: e.target.value})}>
+                    <Radio key="menu" value="menu"> 鑿滃崟 </Radio>
+                    <Radio key="linkmenu" value="linkmenu"> 鍏宠仈鑿滃崟 </Radio>
+                  </Radio.Group>
+                )}
+              </Form.Item>
+            </Col>
+            {link === 'linkmenu' ? <Col span={12}>
+              <Form.Item label="鍏宠仈鑿滃崟">
+                {getFieldDecorator('linkmenu', {
+                  initialValue: wrap.linkmenu || '',
+                  rules: [
+                    {
+                      required: true,
+                      message: this.props.dict['form.required.select'] + '鑿滃崟!'
+                    }
+                  ]
+                })(
+                  <Select
+                    showSearch
+                    filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
+                  >
+                    {appMenus.map(option =>
+                      <Select.Option key={option.MenuID} value={option.MenuID}>{option.MenuName}</Select.Option>
+                    )}
+                  </Select>
+                )}
+              </Form.Item>
+            </Col> : null}
             {/* $楠岃瘉鐮�$  $mob$  $send_type$ */}
             <Col span={12}>
               <Form.Item label={

--
Gitblit v1.8.0