From 5223edbcccfed84a33a706e5637ee65a61f377aa Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 22 十二月 2021 18:00:39 +0800 Subject: [PATCH] 2021-12-22 --- src/mob/components/search/single-search/index.jsx | 4 src/menu/picturecontroller/index.jsx | 16 ++-- src/menu/components/share/sourcecomponent/inputform/index.jsx | 5 + src/views/pcdesign/index.jsx | 8 +- src/templates/zshare/formconfig.jsx | 1 src/menu/components/share/actioncomponent/formconfig.jsx | 1 src/templates/sharecomponent/actioncomponent/actionform/index.jsx | 44 ++++++++++---- src/templates/zshare/unattended/index.jsx | 3 src/menu/pastecontroller/index.jsx | 3 src/menu/versions/index.jsx | 4 src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 4 src/templates/menuconfig/editthdmenu/preview/index.jsx | 3 src/components/mkIcon/index.scss | 3 + src/templates/zshare/editcomponent/index.jsx | 5 + /dev/null | 0 src/menu/components/share/actioncomponent/actionform/index.jsx | 44 ++++++++++---- src/menu/stylecombcontrolbutton/index.jsx | 3 src/views/mobdesign/index.jsx | 8 +- src/templates/menuconfig/editthdmenu/preview/index.scss | 2 src/menu/components/group/normal-group/index.jsx | 4 src/menu/sysinterface/index.jsx | 4 src/views/menudesign/index.jsx | 2 22 files changed, 108 insertions(+), 63 deletions(-) diff --git a/src/components/mkIcon/index.scss b/src/components/mkIcon/index.scss index 2de7c81..33cd208 100644 --- a/src/components/mkIcon/index.scss +++ b/src/components/mkIcon/index.scss @@ -39,6 +39,9 @@ clear: both; } .mk-icon-wrap { + .ant-modal { + top: 50px!important; + } .ant-col { text-align: center; line-height: 55px; diff --git a/src/components/preview/index.jsx b/src/components/preview/index.jsx deleted file mode 100644 index 0e12ebc..0000000 --- a/src/components/preview/index.jsx +++ /dev/null @@ -1,57 +0,0 @@ -import React, {Component} from 'react' -import PropTypes from 'prop-types' -import { Button} from 'antd' -import './index.scss' - -class Preview extends Component { - static propTpyes = { - preview: PropTypes.any, - cancel: PropTypes.func - } - - state = { - show: false, - url: '' - } - - UNSAFE_componentWillReceiveProps (nextProps) { - if (nextProps.preview) { - this.setState({ - url: nextProps.preview - }) - setTimeout(() => { - this.setState({ - show: true - }) - }, 10) - } else { - this.setState({ - show: false - }) - setTimeout(() => { - this.setState({ - url: '' - }) - }, 500) - } - } - - close = () => { - this.props.cancel() - } - - render () { - return ( - <div> - {this.state.url && - <div className={'preview-box ' + (this.state.show ? 'active' : '')} onClick={this.close}> - <Button shape="circle" icon="close" /> - {this.state.url && <img src={this.state.url} alt=""/>} - </div> - } - </div> - ) - } -} - -export default Preview \ No newline at end of file diff --git a/src/components/preview/index.scss b/src/components/preview/index.scss deleted file mode 100644 index ea0d380..0000000 --- a/src/components/preview/index.scss +++ /dev/null @@ -1,26 +0,0 @@ -.preview-box { - position: fixed; - z-index: 1100; - left: 0; - right: 0px; - top: 0px; - bottom: 0px; - background: rgba($color: #000000, $alpha: 0.6); - line-height: 100vh; - text-align: center; - opacity: 0; - transition: opacity 0.5s; - cursor: zoom-out; - img { - max-width: 80vw; - max-height: 90vh; - } - button { - position: absolute; - top: 4vh; - right: 4vw; - } -} -.active { - opacity: 1; -} \ No newline at end of file diff --git a/src/menu/baseScript/index.jsx b/src/menu/baseScript/index.jsx deleted file mode 100644 index 696dc32..0000000 --- a/src/menu/baseScript/index.jsx +++ /dev/null @@ -1,75 +0,0 @@ -import React, {Component} from 'react' -import PropTypes from 'prop-types' -import { is, fromJS } from 'immutable' -import { Modal, Button, notification } from 'antd' - -import SettingForm from './settingform' -import './index.scss' - -class BaseScript extends Component { - static propTpyes = { - config: PropTypes.object, - updateConfig: PropTypes.func - } - - state = { - visible: false, - baseSql: null - } - - shouldComponentUpdate (nextProps, nextState) { - return !is(fromJS(this.state), fromJS(nextState)) - } - - trigger = () => { - const { config } = this.props - - this.setState({ - baseSql: config.baseSql || {enable: true, sql: ''}, - visible: true - }) - } - - submit = () => { - let config = fromJS(this.props.config).toJS() - - this.settingRef.handleConfirm().then(res => { - if (res.enable && (!res.sql || /^\s+$/ig.test(res.sql))) { - notification.warning({ - top: 92, - message: '鍚敤鍩虹SQL鏃讹紝璇峰畬鍠剆ql璇彞銆�', - duration: 5 - }) - return - } - - config.baseSql = res - this.props.updateConfig(config) - this.setState({ visible: false }) - }) - } - - render() { - const { visible, baseSql } = this.state - - return ( - <div style={{display: 'inline-block'}}> - <Button className="mk-border-danger" icon="database" onClick={this.trigger}>鍩虹SQL</Button> - <Modal - title="鍩虹SQL" - wrapClassName="base-script-modal" - visible={visible} - width={800} - maskClosable={false} - onOk={this.submit} - onCancel={() => { this.setState({ visible: false })}} - destroyOnClose - > - <SettingForm baseSql={baseSql} wrappedComponentRef={(inst) => this.settingRef = inst}/> - </Modal> - </div> - ) - } -} - -export default BaseScript \ No newline at end of file diff --git a/src/menu/baseScript/index.scss b/src/menu/baseScript/index.scss deleted file mode 100644 index 377efe2..0000000 --- a/src/menu/baseScript/index.scss +++ /dev/null @@ -1,8 +0,0 @@ -.base-script-modal { - .ant-modal { - top: 70px; - } - .ant-modal-body { - min-height: 150px; - } -} \ No newline at end of file diff --git a/src/menu/baseScript/settingform/index.jsx b/src/menu/baseScript/settingform/index.jsx deleted file mode 100644 index fbcc584..0000000 --- a/src/menu/baseScript/settingform/index.jsx +++ /dev/null @@ -1,69 +0,0 @@ -import React, {Component} from 'react' -import PropTypes from 'prop-types' -import { Form, Row, Col, Switch } from 'antd' - -import CodeMirror from '@/templates/zshare/codemirror' -// import './index.scss' - -class SettingForm extends Component { - static propTpyes = { - baseSql: PropTypes.object - } - - state = { - enable: this.props.baseSql.enable - } - - handleConfirm = () => { - // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� - return new Promise((resolve, reject) => { - this.props.form.validateFieldsAndScroll((err, values) => { - if (!err) { - values.enable = this.state.enable - resolve(values) - } else { - reject(err) - } - }) - }) - } - - render() { - const { baseSql } = this.props - const { getFieldDecorator } = this.props.form - - const formItemLayout = { - labelCol: { - xs: { span: 24 }, - sm: { span: 3 } - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 21 } - } - } - - return ( - <Form {...formItemLayout}> - <Row gutter={24}> - <Col span={24}> - <Form.Item label="鏄惁鍚敤"> - <Switch defaultChecked={baseSql.enable} onChange={(val) => {this.setState({enable: val})}} checkedChildren="鏄�" unCheckedChildren="鍚�" /> - </Form.Item> - </Col> - <Col span={24}> - <Form.Item label="SQL"> - {getFieldDecorator('sql', { - initialValue: baseSql.sql || '' - })( - <CodeMirror /> - )} - </Form.Item> - </Col> - </Row> - </Form> - ) - } -} - -export default Form.create()(SettingForm) \ No newline at end of file diff --git a/src/menu/baseScript/settingform/index.scss b/src/menu/baseScript/settingform/index.scss deleted file mode 100644 index e69de29..0000000 --- a/src/menu/baseScript/settingform/index.scss +++ /dev/null diff --git a/src/menu/components/group/normal-group/index.jsx b/src/menu/components/group/normal-group/index.jsx index deb0300..2c087bc 100644 --- a/src/menu/components/group/normal-group/index.jsx +++ b/src/menu/components/group/normal-group/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { Popover, Button } from 'antd' -import { EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' +import { EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined, PrinterOutlined } from '@ant-design/icons' import MKEmitter from '@/utils/events.js' import asyncComponent from '@/utils/asyncComponent' @@ -195,7 +195,7 @@ } trigger="hover"> <ToolOutlined /> </Popover> - {group.setting && group.setting.print === 'true' ? <Button className="print-button" icon="printer" onClick={this.print}></Button> : null} + {group.setting && group.setting.print === 'true' ? <Button className="print-button" onClick={this.print}><PrinterOutlined /></Button> : null} <GroupComponents config={group} handleList={this.updateComponent} deleteCard={this.deleteCard} /> </div> ) diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 029a6df..d328729 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -16,7 +16,7 @@ exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width'], excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'resetPageIndex', 'pagination', 'search', 'width'], - popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'placement', 'syncComponent', 'clickouter'], + popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'syncComponent', 'clickouter'], tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'linkmenu', 'width'], innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'open'], funcbutton: ['label', 'OpenType', 'funcType', 'show', 'swipe', 'icon', 'class', 'color', 'width'] @@ -39,6 +39,7 @@ funcType: null, // 鍔熻兘绫诲瀷 procMode: null, // 鍙傛暟鏂瑰紡 control: '', + display: '', pageTemplate: null, appType: sessionStorage.getItem('appType'), Ot: null, @@ -98,14 +99,16 @@ let _intertype = card.intertype || 'system' // 鎺ュ彛绫诲瀷 let _funcType = card.funcType || '' // 鍔熻兘鎸夐挳榛樿绫诲瀷 let _procMode = card.procMode || 'system' + let _display = card.display || 'modal' let _Ot = card.Ot let _pageTemplate = card.pageTemplate || '' let control = card.control || '' - let _options = this.getOptions(_opentype, _intertype, _funcType, _pageTemplate, _procMode, _Ot, control) + let _options = this.getOptions(_opentype, _intertype, _funcType, _pageTemplate, _procMode, _Ot, control, _display) this.setState({ Ot: _Ot, + display: _display, control: control, openType: _opentype, interType: _intertype, @@ -156,7 +159,7 @@ }) } - getOptions = (_opentype, _intertype, _funcType, _pageTemplate, _procMode, _Ot, _control) => { + getOptions = (_opentype, _intertype, _funcType, _pageTemplate, _procMode, _Ot, _control, _display) => { let _options = actionTypeOptions[_opentype] ? fromJS(actionTypeOptions[_opentype]).toJS() : [] // 閫夐」鍒楄〃 if (_opentype === 'innerpage') { // 鏂伴〉闈紝鍙�夋ā鏉�(鑷畾涔夋椂锛屽彲濉叆澶栭儴閾炬帴) @@ -196,7 +199,11 @@ } else if (_funcType === 'goBack') { _options.push('reload') } - } else if (_opentype !== 'popview' && _opentype !== 'tab') { + } else if (_opentype === 'popview') { + if (_display === 'drawer') { + _options.push('placement') + } + } else if (_opentype !== 'tab') { if (_intertype === 'custom') { _options = _options.filter(m => m !== 'output') _options.push('procMode', 'interface', 'callbackType', 'cbTable', 'proInterface', 'method', 'cross') @@ -245,10 +252,10 @@ */ optionChange = (key, value) => { const { type } = this.props - const { openType, procMode, Ot, pageTemplate, control } = this.state + const { openType, procMode, Ot, pageTemplate, control, display } = this.state if (key === 'OpenType') { - let _options = this.getOptions(value, 'system', this.state.funcType, '', 'system', Ot, control) + let _options = this.getOptions(value, 'system', this.state.funcType, '', 'system', Ot, control, 'modal') let _fieldval = {} let _formlist = this.state.formlist.map(item => { @@ -259,6 +266,8 @@ item.options = this.state.interTypeOptions.filter(op => (iscustom || op.value !== 'custom')) } else if (item.key === 'control') { item.initVal = control + } else if (item.key === 'display') { + item.initVal = 'modal' } if (item.hidden) return item @@ -305,6 +314,7 @@ openType: value, intertype: 'system', procMode: 'system', + display: 'modal', pageTemplate: '', formlist: _formlist }, () => { @@ -319,7 +329,7 @@ this.props.form.setFieldsValue(_fieldval) }) } else if (key === 'funcType') { - let _options = this.getOptions(openType, this.state.interType, value, pageTemplate, procMode, Ot, control) + let _options = this.getOptions(openType, this.state.interType, value, pageTemplate, procMode, Ot, control, display) let _fieldval = {} if (value === 'print') { @@ -416,7 +426,7 @@ }) } else if (key === 'pageTemplate') { let _fieldval = {} - let _options = this.getOptions(openType, this.state.interType, this.state.funcType, value, procMode, Ot, control) + let _options = this.getOptions(openType, this.state.interType, this.state.funcType, value, procMode, Ot, control, display) this.setState({ pageTemplate: value, @@ -440,7 +450,7 @@ this.props.form.setFieldsValue(_fieldval) }) } else if (key === 'intertype') { - let _options = this.getOptions(openType, value, this.state.funcType, pageTemplate, procMode, Ot, control) + let _options = this.getOptions(openType, value, this.state.funcType, pageTemplate, procMode, Ot, control, display) this.setState({ interType: value, @@ -462,7 +472,7 @@ }) }) } else if (key === 'procMode') { - let _options = this.getOptions(openType, this.state.interType, this.state.funcType, pageTemplate, value, Ot, control) + let _options = this.getOptions(openType, this.state.interType, this.state.funcType, pageTemplate, value, Ot, control, display) this.setState({ procMode: value, @@ -476,7 +486,7 @@ }) }) } else if (key === 'Ot') { - let _options = this.getOptions(openType, this.state.interType, this.state.funcType, pageTemplate, procMode, value, control) + let _options = this.getOptions(openType, this.state.interType, this.state.funcType, pageTemplate, procMode, value, control, display) this.setState({ Ot: value, @@ -486,7 +496,7 @@ }) }) } else if (key === 'control') { - let _options = this.getOptions(openType, this.state.interType, this.state.funcType, pageTemplate, procMode, Ot, value) + let _options = this.getOptions(openType, this.state.interType, this.state.funcType, pageTemplate, procMode, Ot, value, display) this.setState({ control: value, @@ -495,6 +505,16 @@ return item }) }) + } else if (key === 'display') { + let _options = this.getOptions(openType, this.state.interType, this.state.funcType, pageTemplate, procMode, Ot, control, value) + + this.setState({ + display: value, + formlist: this.state.formlist.map(item => { + item.hidden = !_options.includes(item.key) + return item + }) + }) } else if (key === 'sysInterface') { if (value === 'true') { this.props.form.setFieldsValue({ diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 1cd8396..9ee1698 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -697,7 +697,6 @@ key: 'placement', label: '鎶藉眽鏂瑰悜', initVal: card.placement || 'right', - tooltip: '浣跨敤鎶藉眽鏃舵湁鏁堛��', required: false, options: [{ value: 'right', diff --git a/src/menu/components/share/sourcecomponent/inputform/index.jsx b/src/menu/components/share/sourcecomponent/inputform/index.jsx index 7518cf2..729dda2 100644 --- a/src/menu/components/share/sourcecomponent/inputform/index.jsx +++ b/src/menu/components/share/sourcecomponent/inputform/index.jsx @@ -2,6 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { Input, Form, Row, Col, Pagination, Empty, Button, Modal, notification } from 'antd' +import { PlusOutlined } from '@ant-design/icons' import Api from '@/api' import Utils from '@/utils/utils.js' @@ -174,8 +175,8 @@ </Form.Item> : null} {keyword === 'system' ? <Search value={searchKey} placeholder="" onChange={(e) => this.setState({searchKey: e.target.value})} onSearch={this.changeSearch} enterButton/> : null} - {keyword === 'system' ? <Button className="picture-plus mk-green" icon="plus" onClick={() => this.handleSource({typecharone: type})}> - 娣诲姞 + {keyword === 'system' ? <Button className="picture-plus mk-green" onClick={() => this.handleSource({typecharone: type})}> + <PlusOutlined /> 娣诲姞 </Button> : null} {keyword === 'system' && list.length ? <Row gutter={16} style={{minHeight: '250px'}}> diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx index eb105f6..f0cb87c 100644 --- a/src/menu/pastecontroller/index.jsx +++ b/src/menu/pastecontroller/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { Modal, Button, notification } from 'antd' +import { SnippetsOutlined } from '@ant-design/icons' import MenuUtils from '@/utils/utils-custom.js' import MKEmitter from '@/utils/events.js' @@ -109,7 +110,7 @@ return ( <div style={{display: 'inline-block'}}> - <Button style={{borderColor: '#40a9ff', color: '#40a9ff'}} icon="snippets" onClick={() => {this.setState({visible: true})}}>绮樿创</Button> + <Button style={{borderColor: '#40a9ff', color: '#40a9ff'}} onClick={() => {this.setState({visible: true})}}><SnippetsOutlined />绮樿创</Button> <Modal title="绮樿创" visible={visible} diff --git a/src/menu/picturecontroller/index.jsx b/src/menu/picturecontroller/index.jsx index b6bdce1..acf10d8 100644 --- a/src/menu/picturecontroller/index.jsx +++ b/src/menu/picturecontroller/index.jsx @@ -1,6 +1,6 @@ import React, {Component} from 'react' import { Modal, Button, Row, Col, Input, message, Tabs, Empty, Pagination, notification } from 'antd' -import { CopyOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons' +import { PlusOutlined, CopyOutlined, EditOutlined, DeleteOutlined, PictureOutlined } from '@ant-design/icons' import Api from '@/api' import Utils from '@/utils/utils.js' @@ -236,7 +236,7 @@ return ( <div style={{display: 'inline-block'}}> - <Button className="mk-border-purple" icon="picture" onClick={this.trigger}>璧勬簮绠$悊</Button> + <Button className="mk-border-purple" onClick={this.trigger}><PictureOutlined /> 璧勬簮绠$悊</Button> <Modal title="绮樿创" wrapClassName="picture-control-model" @@ -258,8 +258,8 @@ <Search placeholder="" value={imageKey} onChange={(e) => this.setState({imageKey: e.target.value})} onSearch={this.filterPicture} enterButton /> </Col> <Col span={16}> - <Button className="picture-plus mk-green" icon="plus" onClick={() => this.handleSource({typecharone: 'image'})}> - 娣诲姞 + <Button className="picture-plus mk-green" onClick={() => this.handleSource({typecharone: 'image'})}> + <PlusOutlined /> 娣诲姞 </Button> </Col> </Row> @@ -289,8 +289,8 @@ <Search placeholder="" value={videoKey} onChange={e => this.setState({videoKey: e.target.value})} onSearch={this.filterVideo} enterButton /> </Col> <Col span={16}> - <Button className="picture-plus mk-green" icon="plus" onClick={() => this.handleSource({typecharone: 'video'})}> - 娣诲姞 + <Button className="picture-plus mk-green" onClick={() => this.handleSource({typecharone: 'video'})}> + <PlusOutlined /> 娣诲姞 </Button> </Col> </Row> @@ -318,8 +318,8 @@ <Row style={{marginBottom: '15px'}}> <Col span={24}> 鍙坊鍔犲簲鐢ㄤ腑甯哥敤鐨勯鑹诧紝鍙互鏄嫳鏂囦唬鐮併�丠EX鏍煎紡銆丷GB鏍煎紡锛屾渶澶氬彲娣诲姞25绉嶃�� - {colorlist.length < 25 ? <Button className="picture-plus mk-green" icon="plus" onClick={() => this.handleSource({typecharone: 'color'})}> - 娣诲姞 + {colorlist.length < 25 ? <Button className="picture-plus mk-green" onClick={() => this.handleSource({typecharone: 'color'})}> + <PlusOutlined /> 娣诲姞 </Button> : null} </Col> </Row> diff --git a/src/menu/stylecombcontrolbutton/index.jsx b/src/menu/stylecombcontrolbutton/index.jsx index b644e5b..3beaaf4 100644 --- a/src/menu/stylecombcontrolbutton/index.jsx +++ b/src/menu/stylecombcontrolbutton/index.jsx @@ -2,6 +2,7 @@ import PropTypes from 'prop-types' import { fromJS } from 'immutable' import { Button } from 'antd' +import { FontColorsOutlined } from '@ant-design/icons' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -148,7 +149,7 @@ render() { const { label } = this.state return ( - <Button className="style-control-button" icon="font-colors" title="鎵归噺璋冩暣鏍峰紡" onClick={this.triggerStyleChange}>{label}</Button> + <Button className="style-control-button" title="鎵归噺璋冩暣鏍峰紡" onClick={this.triggerStyleChange}><FontColorsOutlined/> {label}</Button> ) } } diff --git a/src/menu/sysinterface/index.jsx b/src/menu/sysinterface/index.jsx index 41ca3dc..589f57b 100644 --- a/src/menu/sysinterface/index.jsx +++ b/src/menu/sysinterface/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { Modal, Button, Popconfirm, message } from 'antd' -import { StopTwoTone, CopyOutlined, EditOutlined, CheckCircleTwoTone, DeleteOutlined } from '@ant-design/icons' +import { StopTwoTone, ApiOutlined, CopyOutlined, EditOutlined, CheckCircleTwoTone, DeleteOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' import asyncComponent from '@/utils/asyncComponent' @@ -178,7 +178,7 @@ return ( <div style={{display: 'inline-block'}}> - <Button className="mk-border-green" icon="api" onClick={this.trigger}>鎺ュ彛绠$悊</Button> + <Button className="mk-border-green" onClick={this.trigger}><ApiOutlined /> 鎺ュ彛绠$悊</Button> <Modal title="鎺ュ彛绠$悊" wrapClassName="interface-controller-modal" diff --git a/src/menu/versions/index.jsx b/src/menu/versions/index.jsx index da697a0..1eb76b9 100644 --- a/src/menu/versions/index.jsx +++ b/src/menu/versions/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { Modal, Button, notification } from 'antd' -import { QuestionCircleOutlined } from '@ant-design/icons' +import { QuestionCircleOutlined, CalendarOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -130,7 +130,7 @@ return ( <div style={{display: 'inline-block'}}> - <Button style={{borderColor: '#40a9ff', color: '#40a9ff'}} icon="calendar" onClick={this.trigger}>鐗堟湰绠$悊</Button> + <Button style={{borderColor: '#40a9ff', color: '#40a9ff'}} onClick={this.trigger}><CalendarOutlined /> 鐗堟湰绠$悊</Button> <Modal title="" wrapClassName="version-modal" diff --git a/src/mob/components/search/single-search/index.jsx b/src/mob/components/search/single-search/index.jsx index 4631146..6f11afb 100644 --- a/src/mob/components/search/single-search/index.jsx +++ b/src/mob/components/search/single-search/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { Popover, Input, Button } from 'antd' -import { ToolOutlined, ScanOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined } from '@ant-design/icons' +import { ToolOutlined, ScanOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined, SearchOutlined } from '@ant-design/icons' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' @@ -140,7 +140,7 @@ <div className="search-wrap" style={{borderRadius: card.wrap.borderRadius || 0, height: card.wrap.height || 32}}> <Input placeholder={card.wrap.label} value={card.wrap.initval || ''} /> {card.wrap.scan === 'show' ? <ScanOutlined style={{lineHeight: `${card.wrap.height || 32}px`}} /> : null} - {card.wrap.show === 'text' ? <Button type="primary">鎼滅储</Button> : <Button icon="search" type="primary"></Button>} + {card.wrap.show === 'text' ? <Button type="primary">鎼滅储</Button> : <Button type="primary"><SearchOutlined/></Button>} </div> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index 5ec93f1..fe08fdc 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { Table, Typography, Switch, Modal, Input, InputNumber, Tooltip, Button, notification, message } from 'antd' -import { ExclamationCircleOutlined, EditOutlined } from '@ant-design/icons' +import { ExclamationCircleOutlined, EditOutlined, PlusOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -1064,7 +1064,7 @@ pagination={_pagination} /> {_footer ? <div className={'normal-table-footer ' + (_pagination ? 'pagination' : '')}>{_footer}</div> : null} - {pickup && setting.addable === 'true' ? <Button onClick={this.addLine} style={{display: 'block', width: '100%', color: '#26C281', border: '1px solid #dddddd', borderRadius: 0}} icon="plus" type="link"></Button> : null} + {pickup && setting.addable === 'true' ? <Button onClick={this.addLine} style={{display: 'block', width: '100%', color: '#26C281', border: '1px solid #dddddd', borderRadius: 0}} type="link"><PlusOutlined /></Button> : null} </div> ) } diff --git a/src/templates/menuconfig/editthdmenu/preview/index.jsx b/src/templates/menuconfig/editthdmenu/preview/index.jsx index dfb97ce..569a6e9 100644 --- a/src/templates/menuconfig/editthdmenu/preview/index.jsx +++ b/src/templates/menuconfig/editthdmenu/preview/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { Button } from 'antd' +import { CloseOutlined } from '@ant-design/icons' import './index.scss' class Preview extends Component { @@ -53,7 +54,7 @@ <div> {this.state.url && this.props.template && <div className={'preview-box ' + (this.state.show ? 'active' : '')} onClick={this.close}> - <Button shape="circle" icon="close"></Button> + <Button shape="circle"><CloseOutlined /></Button> <Button type="primary" onClick={() => {this.props.confirm(this.props.template, type)}}>浣跨敤妯℃澘</Button> {this.state.url && <img src={this.state.url} alt=""/>} </div> diff --git a/src/templates/menuconfig/editthdmenu/preview/index.scss b/src/templates/menuconfig/editthdmenu/preview/index.scss index 1a52608..69852a3 100644 --- a/src/templates/menuconfig/editthdmenu/preview/index.scss +++ b/src/templates/menuconfig/editthdmenu/preview/index.scss @@ -3,7 +3,7 @@ z-index: 1100; left: 0; right: 0px; - top: 0px; + top: 40px; bottom: 0px; background: rgba($color: #000000, $alpha: 0.6); line-height: 100vh; diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx index e348183..2fa4671 100644 --- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx @@ -18,7 +18,7 @@ exec: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output'], excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'icon', 'class', 'sheet', 'execSuccess', 'execError'], excelOut: ['label', 'OpenType', 'intertype', 'icon', 'class', 'execSuccess', 'execError', 'pagination', 'search'], - popview: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose', 'display', 'ratio', 'placement', 'clickouter'], + popview: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose', 'display', 'ratio', 'clickouter'], tab: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position'], innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position'], funcbutton: ['label', 'OpenType', 'funcType', 'icon', 'class'] @@ -42,6 +42,7 @@ position: null, // 鎸夐挳浣嶇疆 procMode: null, // 澶栭儴鎺ュ彛鍙傛暟澶勭悊鏂瑰紡 control: '', + display: '', pageTemplate: null, Ot: null, requireOptions: [{ @@ -104,6 +105,7 @@ let _pageTemplate = card.pageTemplate // 鏂伴〉闈㈢被鍨� let _Ot = card.Ot || 'requiredSgl' let control = card.control || '' + let _display = card.display || 'modal' if (_opentype === 'outerpage') { card.pageTemplate = 'custom' @@ -111,9 +113,10 @@ } let _tabs = this.props.tabs.filter(tab => tab.type === 'SubTable') - let _options = this.getOptions(_opentype, _intertype, _funcType, _pageTemplate, _procMode, _Ot, control) + let _options = this.getOptions(_opentype, _intertype, _funcType, _pageTemplate, _procMode, _Ot, control, _display) this.setState({ + display: _display, control: control, Ot: _Ot, openType: _opentype, @@ -179,7 +182,7 @@ } } - getOptions = (_opentype, _intertype, _funcType, _pageTemplate, _procMode, _Ot, _control) => { + getOptions = (_opentype, _intertype, _funcType, _pageTemplate, _procMode, _Ot, _control, _display) => { let _options = fromJS(actionTypeOptions[_opentype]).toJS() // 閫夐」鍒楄〃 if (_opentype === 'innerpage') { // 鏂伴〉闈紝鍙�夋ā鏉�(鑷畾涔夋椂锛屽彲濉叆澶栭儴閾炬帴) @@ -215,7 +218,11 @@ } else if (_funcType === 'closetab') { _options.push('refreshTab') } - } else if (_opentype !== 'popview') { // 鎵撳紑鏂瑰紡涓嶆槸寮圭獥椤甸潰鏃� + } else if (_opentype === 'popview') { + if (_display === 'drawer') { + _options.push('placement') + } + } else { if (_intertype === 'custom') { _options.push('procMode', 'interface', 'callbackType', 'cbTable', 'proInterface', 'method', 'cross') if (_procMode === 'system') { @@ -250,11 +257,11 @@ * @description 鍒囨崲 */ optionChange = (key, value) => { - const { openType, funcType, procMode, Ot, control } = this.state + const { openType, funcType, procMode, Ot, control, display } = this.state const { card } = this.props if (key === 'OpenType') { - let _options = this.getOptions(value, 'system', '', this.state.pageTemplate, 'system', Ot, control) + let _options = this.getOptions(value, 'system', '', this.state.pageTemplate, 'system', Ot, control, 'modal') let _fieldval = {} let _formlist = this.state.formlist.map(item => { item.hidden = !_options.includes(item.key) @@ -264,6 +271,8 @@ item.options = this.state.interTypeOptions.filter(op => (iscustom || op.value !== 'custom')) } else if (item.key === 'control') { item.initVal = control + } else if (item.key === 'display') { + item.initVal = 'modal' } if (item.hidden) return item @@ -303,6 +312,7 @@ funcType: '', intertype: 'system', procMode: 'system', + display: 'modal', formlist: _formlist }, () => { if (value === 'excelIn') { @@ -341,7 +351,7 @@ this.props.form.setFieldsValue(_fieldval) }) } else if (key === 'funcType') { - let _options = this.getOptions('funcbutton', this.state.interType, value, card.pageTemplate, procMode, Ot, control) + let _options = this.getOptions('funcbutton', this.state.interType, value, card.pageTemplate, procMode, Ot, control, display) let _fieldval = {} if (value === 'print') { @@ -401,7 +411,7 @@ this.props.form.setFieldsValue(_fieldval) }) } else if (key === 'pageTemplate') { - let _options = this.getOptions('innerpage', this.state.interType, this.state.funcType, value, procMode, Ot, control) + let _options = this.getOptions('innerpage', this.state.interType, this.state.funcType, value, procMode, Ot, control, display) let _fieldval = {} this.setState({ @@ -427,7 +437,7 @@ this.props.form.setFieldsValue(_fieldval) }) } else if (key === 'intertype') { - let _options = this.getOptions(openType, value, funcType, '', procMode, Ot, control) + let _options = this.getOptions(openType, value, funcType, '', procMode, Ot, control, display) this.setState({ interType: value, @@ -447,7 +457,7 @@ }) }) } else if (key === 'procMode') { - let _options = this.getOptions(openType, this.state.interType, funcType, '', value, Ot, control) + let _options = this.getOptions(openType, this.state.interType, funcType, '', value, Ot, control, display) this.setState({ procMode: value, @@ -461,7 +471,7 @@ }) }) } else if (key === 'Ot') { - let _options = this.getOptions(openType, this.state.interType, funcType, this.state.pageTemplate, procMode, value, control) + let _options = this.getOptions(openType, this.state.interType, funcType, this.state.pageTemplate, procMode, value, control, display) this.setState({ Ot: value, @@ -471,7 +481,7 @@ }) }) } else if (key === 'control') { - let _options = this.getOptions(openType, this.state.interType, funcType, this.state.pageTemplate, procMode, Ot, value) + let _options = this.getOptions(openType, this.state.interType, funcType, this.state.pageTemplate, procMode, Ot, value, display) this.setState({ control: value, @@ -480,6 +490,16 @@ return item }) }) + } else if (key === 'display') { + let _options = this.getOptions(openType, this.state.interType, funcType, this.state.pageTemplate, procMode, Ot, control, value) + + this.setState({ + display: value, + formlist: this.state.formlist.map(item => { + item.hidden = !_options.includes(item.key) + return item + }) + }) } else if (key === 'sysInterface') { if (value === 'true') { this.props.form.setFieldsValue({ diff --git a/src/templates/zshare/editcomponent/index.jsx b/src/templates/zshare/editcomponent/index.jsx index a642c43..f26d9e3 100644 --- a/src/templates/zshare/editcomponent/index.jsx +++ b/src/templates/zshare/editcomponent/index.jsx @@ -2,6 +2,7 @@ import PropTypes from 'prop-types' import { fromJS } from 'immutable' import { Modal, Spin, notification, Button } from 'antd' +import { UnlockOutlined, SnippetsOutlined } from '@ant-design/icons' import Api from '@/api' import Utils from '@/utils/utils.js' @@ -203,8 +204,8 @@ return ( <div style={{display: 'inline-block'}}> - {MenuID ? <Button className="mk-border-green" onClick={this.handleThaw} icon="unlock">瑙e喕鎸夐挳</Button> : null} - <Button style={{borderColor: '#40a9ff', color: '#40a9ff'}} onClick={() => this.setState({pasteVisible: true})} icon="snippets">{dict['header.form.paste']}</Button> + {MenuID ? <Button className="mk-border-green" onClick={this.handleThaw}><UnlockOutlined /> 瑙e喕鎸夐挳</Button> : null} + <Button style={{borderColor: '#40a9ff', color: '#40a9ff'}} onClick={() => this.setState({pasteVisible: true})}><SnippetsOutlined /> {dict['header.form.paste']}</Button> {/* 瑙e喕鎸夐挳妯℃�佹 */} <Modal title="瑙e喕鎸夐挳" diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index bca124f..d57f0c6 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -1344,7 +1344,6 @@ key: 'placement', label: '鎶藉眽鏂瑰悜', initVal: card.placement || 'right', - tooltip: '浣跨敤鎶藉眽鏃舵湁鏁堛��', required: false, options: [{ value: 'right', diff --git a/src/templates/zshare/unattended/index.jsx b/src/templates/zshare/unattended/index.jsx index 2a5852a..4b6b8f5 100644 --- a/src/templates/zshare/unattended/index.jsx +++ b/src/templates/zshare/unattended/index.jsx @@ -2,6 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { Modal, Button } from 'antd' +import { UserOutlined } from '@ant-design/icons' import SettingForm from './settingform' import './index.scss' @@ -56,7 +57,7 @@ return ( <div style={{display: 'inline-block'}}> - <Button className="mk-border-purple" icon="user" onClick={this.trigger}>鏃犱汉鍊煎畧</Button> + <Button className="mk-border-purple" onClick={this.trigger}><UserOutlined/> 鏃犱汉鍊煎畧</Button> <Modal title="鏃犱汉鍊煎畧" wrapClassName="unattended-field-modal" diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index f5246d3..bd830f0 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -36,7 +36,6 @@ const PaddingController = asyncComponent(() => import('@/menu/padcontroller')) const StyleController = asyncComponent(() => import('@/menu/stylecontroller')) const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) -// const BaseScript = asyncComponent(() => import('@/menu/baseScript')) const Versions = asyncComponent(() => import('@/menu/versions')) const SysInterface = asyncComponent(() => import('@/menu/sysinterface')) const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent')) @@ -991,7 +990,6 @@ <div> {config && config.MenuName} </div> } bordered={false} extra={ <div> - {/* <BaseScript config={config} updateConfig={this.updateConfig}/> */} <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/> <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> <SysInterface config={config} updateConfig={this.updateConfig}/> diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index e900bdd..f6106f5 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -6,7 +6,7 @@ import moment from 'moment' import HTML5Backend from 'react-dnd-html5-backend' import { ConfigProvider, notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd' -import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons' +import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, RedoOutlined } from '@ant-design/icons' import Api from '@/api' import Utils, { setGLOBFuncs } from '@/utils/utils.js' @@ -1553,12 +1553,12 @@ <SysInterface config={config} updateConfig={this.updateConfig}/> <PictureController/> <Quotecomponent config={config} updateConfig={this.updateConfig}/> - <Button className="mk-border-green" icon="home" onClick={this.setHomeView}>璁句负棣栭〉</Button> - <Button className="mk-border-purple" icon="login" onClick={this.setLoginView}>璁句负鐧诲綍椤�</Button> + <Button className="mk-border-green" onClick={this.setHomeView}><HomeOutlined /> 璁句负棣栭〉</Button> + <Button className="mk-border-purple" onClick={this.setLoginView}><LoginOutlined /> 璁句负鐧诲綍椤�</Button> <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> <Transfer MenuID={MenuId} /> <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/> - <Button className="mk-border-danger" icon="redo" onClick={this.refreshView}>寮哄埗鍒锋柊</Button> + <Button className="mk-border-danger" onClick={this.refreshView}><RedoOutlined /> 寮哄埗鍒锋柊</Button> <Button type="default" onClick={this.closeView}>鍏抽棴</Button> </div> </div> diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index 6f9c9a3..8649210 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -6,7 +6,7 @@ import moment from 'moment' import HTML5Backend from 'react-dnd-html5-backend' import { ConfigProvider, notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd' -import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons' +import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, RedoOutlined } from '@ant-design/icons' import Api from '@/api' import Utils, { setGLOBFuncs } from '@/utils/utils.js' @@ -1673,12 +1673,12 @@ <SysInterface config={config} updateConfig={this.updateConfig}/> <PictureController/> <Quotecomponent config={config} updateConfig={this.updateConfig}/> - <Button className="mk-border-green" icon="home" onClick={this.setHomeView}>璁句负棣栭〉</Button> - <Button className="mk-border-purple" icon="login" onClick={this.setLoginView}>璁句负鐧诲綍椤�</Button> + <Button className="mk-border-green" onClick={this.setHomeView}><HomeOutlined /> 璁句负棣栭〉</Button> + <Button className="mk-border-purple" onClick={this.setLoginView}><LoginOutlined/> 璁句负鐧诲綍椤�</Button> <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> <Transfer MenuID={MenuId} /> <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/> - <Button className="mk-border-danger" icon="redo" onClick={this.refreshView}>寮哄埗鍒锋柊</Button> + <Button className="mk-border-danger" onClick={this.refreshView}><RedoOutlined /> 寮哄埗鍒锋柊</Button> <Button type="default" onClick={this.closeView}>鍏抽棴</Button> </div> </div> -- Gitblit v1.8.0