From 318642cd6837a38a4bf5dfe059bcbb6cafe3bca8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 二月 2021 15:28:28 +0800 Subject: [PATCH] 2021-02-02 --- src/menu/components/share/actioncomponent/actionform/index.jsx | 12 ++++- src/components/header/index.jsx | 4 +- src/templates/formtabconfig/actionform/index.scss | 10 ++++ src/menu/components/share/actioncomponent/actionform/index.scss | 10 ++++ src/templates/sharecomponent/actioncomponent/actionform/index.jsx | 6 +- src/templates/sharecomponent/actioncomponent/actionform/index.scss | 10 ++++ src/templates/formtabconfig/actionform/index.jsx | 12 ++++- 7 files changed, 50 insertions(+), 14 deletions(-) diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx index f4a77de..5d9c7b7 100644 --- a/src/components/header/index.jsx +++ b/src/components/header/index.jsx @@ -771,9 +771,9 @@ {this.props.editLevel === 'HS' ? <Button className="level4-close" type="primary" onClick={this.exitManage}>閫�鍑�</Button> : null} {/* 杩涘叆缂栬緫鎸夐挳 */} {this.props.editState && !this.props.editLevel ? <Icon onClick={this.enterEdit} className="edit-check" type="edit" /> : null} - {this.props.editState && !this.props.editLevel && options.sysType === 'local' && window.GLOB.systemType !== 'production' ? + {/* {this.props.editState && !this.props.editLevel && options.sysType === 'local' && window.GLOB.systemType !== 'production' ? <a href="#/mobmanage" target="_blank" className="mobile" type="edit"> 搴旂敤绠$悊 <Icon type="arrow-right" /></a> : null - } + } */} {/* window.btoa(window.encodeURIComponent(JSON.stringify({ MenuType: 'home', MenuId: 'home_page_id', MenuName: '棣栭〉' }))) */} {this.props.editState && !this.props.editLevel && window.GLOB.systemType !== 'production' && this.props.memberLevel >= 20 ? <a className="home-edit" href={`#/menudesign/JTdCJTIyTWVudVR5cGUlMjIlM0ElMjJob21lJTIyJTJDJTIyTWVudUlkJTIyJTNBJTIyaG9tZV9wYWdlX2lkJTIyJTJDJTIyTWVudU5hbWUlMjIlM0ElMjIlRTklQTYlOTYlRTklQTElQjUlMjIlN0Q=`} target="_blank" rel="noopener noreferrer"> diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 5da6f2a..e584aea 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -557,8 +557,14 @@ <Col span={24} key={index}> <Form.Item label={item.label} className="textarea"> {getFieldDecorator(item.key, { - initialValue: item.initVal - })(<TextArea rows={2} />)} + initialValue: item.initVal, + rules: [ + { + required: item.readonly ? false : !!item.required, + message: this.props.dict['form.required.input'] + item.label + '!' + } + ] + })(<TextArea rows={2} readOnly={item.readonly}/>)} </Form.Item> </Col> ) @@ -650,7 +656,7 @@ } } return ( - <Form {...formItemLayout} className="ant-advanced-search-form commontable-action-form" id="winter"> + <Form {...formItemLayout} className="menu-action-list-form" id="winter"> <Row gutter={24}>{this.getFields()}</Row> </Form> ) diff --git a/src/menu/components/share/actioncomponent/actionform/index.scss b/src/menu/components/share/actioncomponent/actionform/index.scss index 75b421d..535dd29 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.scss +++ b/src/menu/components/share/actioncomponent/actionform/index.scss @@ -1,4 +1,4 @@ -.ant-advanced-search-form.commontable-action-form { +.menu-action-list-form { min-height: 190px; .superconfig { color: #1890ff; @@ -36,4 +36,12 @@ top: 4.5px; } } + .ant-input:read-only { + background: #fafafa; + resize: none; + } + .ant-input:read-only:hover, .ant-input:read-only:focus { + border-color: #d9d9d9; + box-shadow: none; + } } \ No newline at end of file diff --git a/src/templates/formtabconfig/actionform/index.jsx b/src/templates/formtabconfig/actionform/index.jsx index 798f054..db149bb 100644 --- a/src/templates/formtabconfig/actionform/index.jsx +++ b/src/templates/formtabconfig/actionform/index.jsx @@ -333,8 +333,14 @@ <Col span={24} key={index}> <Form.Item label={item.label} className="textarea"> {getFieldDecorator(item.key, { - initialValue: item.initVal - })(<TextArea rows={4} />)} + initialValue: item.initVal, + rules: [ + { + required: item.readonly ? false : !!item.required, + message: this.props.dict['form.required.input'] + item.label + '!' + } + ] + })(<TextArea rows={4} readOnly={item.readonly}/>)} </Form.Item> </Col> ) @@ -387,7 +393,7 @@ } } return ( - <Form {...formItemLayout} className="ant-advanced-search-form commontable-action-form" id="winter"> + <Form {...formItemLayout} className="formtab-action-list-form" id="winter"> <Row gutter={24}>{this.getFields()}</Row> </Form> ) diff --git a/src/templates/formtabconfig/actionform/index.scss b/src/templates/formtabconfig/actionform/index.scss index c25cef2..2e104bd 100644 --- a/src/templates/formtabconfig/actionform/index.scss +++ b/src/templates/formtabconfig/actionform/index.scss @@ -1,4 +1,4 @@ -.ant-advanced-search-form.commontable-action-form { +.formtab-action-list-form { min-height: 190px; .superconfig { color: #1890ff; @@ -30,4 +30,12 @@ top: 4.5px; } } + .ant-input:read-only { + background: #fafafa; + resize: none; + } + .ant-input:read-only:hover, .ant-input:read-only:focus { + border-color: #d9d9d9; + box-shadow: none; + } } \ No newline at end of file diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx index 6310dc9..464e035 100644 --- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx @@ -644,11 +644,11 @@ initialValue: item.initVal, rules: [ { - required: !!item.required, + required: item.readonly ? false : !!item.required, message: this.props.dict['form.required.input'] + item.label + '!' } ] - })(<TextArea rows={2} />)} + })(<TextArea rows={2} readOnly={item.readonly} />)} </Form.Item> </Col> ) @@ -731,7 +731,7 @@ } } return ( - <Form {...formItemLayout} className="ant-advanced-search-form commontable-action-form" id="winter"> + <Form {...formItemLayout} className="normal-action-list-form" id="winter"> <Row gutter={24}>{this.getFields()}</Row> </Form> ) diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.scss b/src/templates/sharecomponent/actioncomponent/actionform/index.scss index 75b421d..653ac93 100644 --- a/src/templates/sharecomponent/actioncomponent/actionform/index.scss +++ b/src/templates/sharecomponent/actioncomponent/actionform/index.scss @@ -1,4 +1,4 @@ -.ant-advanced-search-form.commontable-action-form { +.normal-action-list-form { min-height: 190px; .superconfig { color: #1890ff; @@ -36,4 +36,12 @@ top: 4.5px; } } + .ant-input:read-only { + background: #fafafa; + resize: none; + } + .ant-input:read-only:hover, .ant-input:read-only:focus { + border-color: #d9d9d9; + box-shadow: none; + } } \ No newline at end of file -- Gitblit v1.8.0