From 812070dc565f03bafb0b62696004aa676ed1b787 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 19 八月 2021 15:50:16 +0800 Subject: [PATCH] 2021-08-19 --- src/menu/components/form/formaction/formconfig.jsx | 16 - src/menu/components/carousel/data-card/options.jsx | 3 src/menu/components/editor/braft-editor/options.jsx | 4 src/menu/components/card/data-card/options.jsx | 3 src/views/pcdesign/index.jsx | 13 + src/menu/components/form/dragtitle/options.jsx | 99 +++++++++++ src/menu/components/form/tab-form/index.jsx | 59 +---- src/views/design/sidemenu/config.jsx | 8 src/menu/components/card/balcony/options.jsx | 4 src/menu/components/form/normal-form/index.jsx | 63 +----- src/menu/components/form/dragtitle/index.jsx | 7 /dev/null | 15 - src/mob/components/menubar/normal-menubar/options.jsx | 22 -- src/api/index.js | 2 src/menu/components/form/normal-form/options.jsx | 106 +++++++++++ src/menu/components/code/sandbox/options.jsx | 4 src/pc/components/login/wrapsetting/settingform/index.jsx | 33 --- src/views/mobdesign/index.jsx | 14 + src/menu/components/form/dragtitle/card.jsx | 40 +++ src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx | 1 20 files changed, 320 insertions(+), 196 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index a695892..eca6130 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -14,7 +14,7 @@ 1585192949946f3et2ts8tn82krmumdf,15855615451212m12ip23vpcm79kloro,1587005717541lov40vg61q7l1rbveon,1590458676585agbbr63t6ihighg2i1g,1602315375262ikd33ii0nii34pt861o,1582771068837vsv54a089lgp45migbg, 1582777675954ifu05upurs465omoth7,158294809668898cklbv6c5bou8e1fpu,1584676379094iktph45fb8imhg96bql,1584695125339vo5g7iqgfn01qmrd6s2,1584699661372vhmpp9dn9foo0eob722,15848421131551gg04ie8sitsd3f7467, 1589782279158ngr675kk3oksin35sul,1589788042787ffdt9hle4s45k9r1nvs,15900310928174dro07ihfckghpb5h13,1594095599055qicg2eb642v5qglhnuo,1599613340050c8nu6rbst9d4emnnbsq,1577972969199lei1g0qkvlh4tkc908m, - 1578479100252lfbp29v1kafk4s4q4ig,1577971621421tg4v0i1ur8873k7e0ob,1577929944419lgc5h3hepum765e2k7u,1588493493409k9guqp067d31lu7blsv` + 1578479100252lfbp29v1kafk4s4q4ig,1577971621421tg4v0i1ur8873k7e0ob,1577929944419lgc5h3hepum765e2k7u,1588493493409k9guqp067d31lu7blsv,15827879285193g85m3i2uprektpgmpf` if (window.openDatabase) { CacheUtils.openWebSql(options.sysType) diff --git a/src/menu/components/card/balcony/options.jsx b/src/menu/components/card/balcony/options.jsx index 45fb759..06e8c95 100644 --- a/src/menu/components/card/balcony/options.jsx +++ b/src/menu/components/card/balcony/options.jsx @@ -8,6 +8,7 @@ let modules = MenuUtils.getLinkModules(fromJS(window.GLOB.customMenu).toJS().components) || [] let supmodules = MenuUtils.getSupModules(fromJS(window.GLOB.customMenu).toJS().components, '') || [] let roleList = sessionStorage.getItem('sysRoles') + let appType = sessionStorage.getItem('appType') if (roleList) { try { @@ -210,7 +211,8 @@ label: '榛戝悕鍗�', initval: wrap.blacklist || [], required: false, - options: roleList + options: roleList, + forbid: !!appType }, ] diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx index b276f76..c02de20 100644 --- a/src/menu/components/card/data-card/options.jsx +++ b/src/menu/components/card/data-card/options.jsx @@ -159,7 +159,8 @@ label: '榛戝悕鍗�', initval: wrap.blacklist || [], required: false, - options: roleList + options: roleList, + forbid: !!appType }, ] diff --git a/src/menu/components/carousel/data-card/options.jsx b/src/menu/components/carousel/data-card/options.jsx index 6631041..76bef49 100644 --- a/src/menu/components/carousel/data-card/options.jsx +++ b/src/menu/components/carousel/data-card/options.jsx @@ -125,7 +125,8 @@ label: '榛戝悕鍗�', initval: wrap.blacklist || [], required: false, - options: roleList + options: roleList, + forbid: !!appType }, ] diff --git a/src/menu/components/code/sandbox/options.jsx b/src/menu/components/code/sandbox/options.jsx index daf40ba..31f5585 100644 --- a/src/menu/components/code/sandbox/options.jsx +++ b/src/menu/components/code/sandbox/options.jsx @@ -2,6 +2,7 @@ * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ export default function (wrap) { + let appType = sessionStorage.getItem('appType') let roleList = sessionStorage.getItem('sysRoles') if (roleList) { @@ -52,7 +53,8 @@ label: '榛戝悕鍗�', initval: wrap.blacklist || [], required: false, - options: roleList + options: roleList, + forbid: !!appType }, ] diff --git a/src/menu/components/editor/braft-editor/options.jsx b/src/menu/components/editor/braft-editor/options.jsx index bfe95e3..ec4e0fe 100644 --- a/src/menu/components/editor/braft-editor/options.jsx +++ b/src/menu/components/editor/braft-editor/options.jsx @@ -2,6 +2,7 @@ * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ export default function (wrap, columns) { + let appType = sessionStorage.getItem('appType') let roleList = sessionStorage.getItem('sysRoles') if (roleList) { @@ -77,7 +78,8 @@ label: '榛戝悕鍗�', initval: wrap.blacklist || [], required: false, - options: roleList + options: roleList, + forbid: !!appType }, ] diff --git a/src/menu/components/form/dragtitle/card.jsx b/src/menu/components/form/dragtitle/card.jsx index 48e07f4..0ebb97b 100644 --- a/src/menu/components/form/dragtitle/card.jsx +++ b/src/menu/components/form/dragtitle/card.jsx @@ -1,10 +1,15 @@ import React from 'react' +import { fromJS } from 'immutable' import { useDrag, useDrop } from 'react-dnd' import { Icon, Popover } from 'antd' +import getForm from './options' +import asyncIconComponent from '@/utils/asyncIconComponent' import './index.scss' -const Card = ({ id, card, active, moveCard, findCard, editCard, closeCard, selectCard }) => { +const NormalForm = asyncIconComponent(() => import('@/components/normalform')) + +const Card = ({ id, card, active, moveCard, findCard, closeCard, selectCard, updateGroup }) => { const originalIndex = findCard(id).index const [{ isDragging }, drag] = useDrag({ item: { type: 'form', id, originalIndex }, @@ -28,10 +33,6 @@ }) const opacity = isDragging ? 0 : 1 - const edit = () => { - editCard(id) - } - const close = () => { closeCard(id) } @@ -40,10 +41,37 @@ selectCard(id) } + const getForms = () =>{ + return getForm(card) + } + + const updateSetting = (res) => { + let _card = fromJS(card).toJS() + + if (res.prevEnable) { + _card.prevButton.enable = res.prevEnable + delete res.prevEnable + } + if (res.subEnable) { + _card.subButton.enable = res.subEnable + delete res.subEnable + } + if (res.nextEnable) { + _card.nextButton.enable = res.nextEnable + delete res.nextEnable + } + + _card.setting = res + + updateGroup(_card) + } + return ( <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="edit" type="edit" onClick={edit} /> + <NormalForm title="鍒嗙粍缂栬緫" width={850} update={updateSetting} getForms={getForms}> + <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/> + </NormalForm> <Icon className="close" type="close" onClick={close} /> </div> } trigger="hover"> diff --git a/src/menu/components/form/dragtitle/index.jsx b/src/menu/components/form/dragtitle/index.jsx index 87c40ac..138a259 100644 --- a/src/menu/components/form/dragtitle/index.jsx +++ b/src/menu/components/form/dragtitle/index.jsx @@ -28,11 +28,6 @@ } } - const editCard = id => { - const { card } = findCard(id) - handleGroup(card) - } - const closeCard = id => { const { card } = findCard(id) closeGroup(card) @@ -52,8 +47,8 @@ active={card.uuid === selectId} card={card} moveCard={moveCard} - editCard={editCard} closeCard={closeCard} + updateGroup={handleGroup} findCard={findCard} selectCard={selectCard} /> diff --git a/src/menu/components/form/dragtitle/options.jsx b/src/menu/components/form/dragtitle/options.jsx new file mode 100644 index 0000000..90f9176 --- /dev/null +++ b/src/menu/components/form/dragtitle/options.jsx @@ -0,0 +1,99 @@ +/** + * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 + */ +export default function (group) { + let appType = sessionStorage.getItem('appType') + let fields = [{field: '', label: '绌�'}] + + if (appType === 'mob') { + group.fields.forEach(f => { + if (f.field && ['text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { + fields.push(f) + } + }) + } else { + group.fields.forEach(f => { + if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { + fields.push(f) + } + }) + } + + const groupForm = [ + { + type: 'text', + field: 'title', + label: '鏍囬', + initval: group.setting.title || '', + required: true + }, + { + type: 'text', + field: 'status', + label: '鐘舵�佸��', + initval: group.setting.status || '', + tooltip: '鐢ㄤ簬琛ㄥ崟鍔犺浇鏃剁殑鐘舵�佹帶鍒躲��', + required: false, + forbid: !group.prevButton + }, + { + type: 'select', + field: 'focus', + label: '鐒︾偣', + initval: group.setting.focus || '', + required: false, + options: fields + }, + { + type: 'radio', + field: 'align', + label: '琛ㄥ崟鎺掑垪', + initval: group.setting.align || 'left_right', + required: false, + options: [ + {value: 'left_right', label: '宸﹀彸'}, + {value: 'up_down', label: '涓婁笅'}, + ], + forbid: appType === 'mob' + }, + { + type: 'radio', + field: 'prevEnable', + label: '涓婁竴姝�', + initval: group.prevButton ? group.prevButton.enable || 'false' : 'false', + tooltip: '绗竴缁勪笉鏄剧ず銆�', + required: false, + options: [ + {value: 'true', label: '鏄剧ず'}, + {value: 'false', label: '闅愯棌'}, + ], + forbid: !group.prevButton + }, + { + type: 'radio', + field: 'subEnable', + label: '鎻愪氦', + initval: group.subButton.enable || 'true', + required: false, + options: [ + {value: 'true', label: '鏄剧ず'}, + {value: 'false', label: '闅愯棌'}, + ] + }, + { + type: 'radio', + field: 'nextEnable', + label: '璺宠繃', + initval: group.nextButton ? group.nextButton.enable || 'false' : 'false', + tooltip: '鏈�鍚庝竴缁勪笉鏄剧ず銆�', + required: false, + options: [ + {value: 'true', label: '鏄剧ず'}, + {value: 'false', label: '闅愯棌'}, + ], + forbid: !group.nextButton + }, + ] + + return groupForm +} \ No newline at end of file diff --git a/src/menu/components/form/formaction/formconfig.jsx b/src/menu/components/form/formaction/formconfig.jsx index 9b358d1..06eaf88 100644 --- a/src/menu/components/form/formaction/formconfig.jsx +++ b/src/menu/components/form/formaction/formconfig.jsx @@ -273,20 +273,6 @@ tooltip: '鎵ц鎴愬姛鍚庨渶瑕佸埛鏂扮殑缁勪欢銆�', required: false, options: modules - }, - // { - // type: 'radio', - // key: 'enable', - // label: '鏄惁鏄剧ず', - // initVal: card.enable || 'true', - // required: false, - // options: [{ - // value: 'true', - // text: '鏄剧ず' - // }, { - // value: 'false', - // text: '闅愯棌' - // }] - // } + } ] } diff --git a/src/menu/components/form/normal-form/groupform/index.jsx b/src/menu/components/form/normal-form/groupform/index.jsx deleted file mode 100644 index 4f56a21..0000000 --- a/src/menu/components/form/normal-form/groupform/index.jsx +++ /dev/null @@ -1,199 +0,0 @@ -import React, {Component} from 'react' -import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Radio, Select, Tooltip, Icon } from 'antd' -import { formRule } from '@/utils/option.js' -import './index.scss' - -class SettingForm extends Component { - static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� - group: PropTypes.object, // 琛ㄥ崟閰嶇疆淇℃伅 - inputSubmit: PropTypes.any // 鍥炶溅鎻愪氦浜嬩欢 - } - - state = { - fields: null, - appType: sessionStorage.getItem('appType') - } - - UNSAFE_componentWillMount () { - const { group } = this.props - const { appType } = this.state - let fields = [] - - if (appType === 'mob') { - group.fields.forEach(f => { - if (f.field && ['text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { - fields.push(f) - } - }) - } else { - group.fields.forEach(f => { - if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { - fields.push(f) - } - }) - } - - this.setState({ - fields: fields - }) - } - - handleConfirm = () => { - // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� - return new Promise((resolve, reject) => { - this.props.form.validateFieldsAndScroll((err, values) => { - if (!err) { - resolve(values) - } else { - reject(err) - } - }) - }) - } - - handleSubmit = (e) => { - e.preventDefault() - - if (this.props.inputSubmit) { - this.props.inputSubmit() - } - } - - render() { - const { group, dict } = this.props - const { getFieldDecorator } = this.props.form - const { fields, appType } = this.state - - const formItemLayout = { - labelCol: { - xs: { span: 24 }, - sm: { span: 8 } - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 } - } - } - - return ( - <Form {...formItemLayout} className="ant-advanced-search-form modal-setting-form"> - <Row gutter={24}> - <Col span={12}> - <Form.Item label="鏍囬"> - {getFieldDecorator('title', { - initialValue: group.setting.title, - rules: [ - { - max: formRule.input.max, - message: formRule.input.message - } - ] - })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鐢ㄤ簬琛ㄥ崟鍔犺浇鏃剁殑鐘舵�佹帶鍒躲��"> - <Icon type="question-circle" /> - 鐘舵�佸�� - </Tooltip> - }> - {getFieldDecorator('status', { - initialValue: group.setting.status || '', - rules: [ - { - max: formRule.input.max, - message: formRule.input.message - } - ] - })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="鐒︾偣"> - {getFieldDecorator('focus', { - initialValue: group.setting.focus || '' - })( - <Select - showSearch - filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} - > - <Select.Option value=""> - {dict['model.empty']} - </Select.Option> - {fields.map(option => - <Select.Option id={option.uuid} title={option.label} key={option.uuid} value={option.field}> - {option.label} - </Select.Option> - )} - </Select> - )} - </Form.Item> - </Col> - {appType !== 'mob' ? <Col span={12}> - <Form.Item label="琛ㄥ崟鎺掑垪"> - {getFieldDecorator('align', { - initialValue: group.setting.align || 'left_right' - })( - <Radio.Group> - <Radio value="left_right">宸﹀彸</Radio> - <Radio value="up_down">涓婁笅</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> : null} - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="绗竴缁勪笉鏄剧ず銆�"> - <Icon type="question-circle" /> - 涓婁竴姝� - </Tooltip> - }> - {getFieldDecorator('prevEnable', { - initialValue: group.prevButton.enable - })( - <Radio.Group> - <Radio value="true">鏄剧ず</Radio> - <Radio value="false">闅愯棌</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="鎻愪氦"> - {getFieldDecorator('subEnable', { - initialValue: group.subButton.enable - })( - <Radio.Group> - <Radio value="true">鏄剧ず</Radio> - <Radio value="false">闅愯棌</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鏈�鍚庝竴缁勪笉鏄剧ず銆�"> - <Icon type="question-circle" /> - 璺宠繃 - </Tooltip> - }> - {getFieldDecorator('nextEnable', { - initialValue: group.nextButton.enable - })( - <Radio.Group> - <Radio value="true">鏄剧ず</Radio> - <Radio value="false">闅愯棌</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> - </Row> - </Form> - ) - } -} - -export default Form.create()(SettingForm) \ No newline at end of file diff --git a/src/menu/components/form/normal-form/groupform/index.scss b/src/menu/components/form/normal-form/groupform/index.scss deleted file mode 100644 index 9a74987..0000000 --- a/src/menu/components/form/normal-form/groupform/index.scss +++ /dev/null @@ -1,18 +0,0 @@ -.ant-advanced-search-form.modal-setting-form { - .textarea { - .ant-form-item-label { - width: 16.3%; - } - .ant-form-item-control-wrapper { - width: 83.33333333%; - } - } - .ant-input-number { - width: 100%; - } - .anticon-question-circle { - color: #c49f47; - position: relative; - left: -3px; - } -} \ No newline at end of file diff --git a/src/menu/components/form/normal-form/index.jsx b/src/menu/components/form/normal-form/index.jsx index 3ad8ebf..860f126 100644 --- a/src/menu/components/form/normal-form/index.jsx +++ b/src/menu/components/form/normal-form/index.jsx @@ -11,17 +11,17 @@ import { resetStyle } from '@/utils/utils-custom.js' import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' +import getWrapForm from './options' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' import './index.scss' const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform')) +const NormalForm = asyncIconComponent(() => import('@/components/normalform')) const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) -const WrapComponent = asyncIconComponent(() => import('@/menu/components/form/wrapsetting')) const CardComponent = asyncComponent(() => import('@/templates/modalconfig/dragelement')) const MobCardComponent = asyncComponent(() => import('@/mob/components/formdragelement')) const FormTitle = asyncComponent(() => import('../dragtitle')) -const GroupForm = asyncComponent(() => import('./groupform')) const FormAction = asyncComponent(() => import('../formaction')) const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent')) @@ -79,7 +79,7 @@ sort: 1, style: {}, fields: [], - prevButton: {label: '涓婁竴姝�', type: 'prev', enable: 'true', style: {marginRight: '15px', paddingTop: '5px', paddingBottom: '5px'}}, + prevButton: {label: '涓婁竴姝�', type: 'prev', enable: 'false', style: {marginRight: '15px', paddingTop: '5px', paddingBottom: '5px'}}, subButton: {label: '鎻愪氦', type: 'submit', enable: 'true', style: {backgroundColor: '#1890ff', color: '#ffffff', paddingLeft: '25px', paddingRight: '25px', paddingTop: '5px', paddingBottom: '5px'}}, nextButton: {label: '璺宠繃', type: 'next', enable: 'false', style: {paddingTop: '5px', paddingBottom: '5px'}} }] @@ -211,7 +211,7 @@ sort: card.subcards.length + 1, style: {}, fields: [], - prevButton: {label: '涓婁竴姝�', type: 'prev', enable: 'true', style: {marginRight: '15px', paddingTop: '5px', paddingBottom: '5px'}}, + prevButton: {label: '涓婁竴姝�', type: 'prev', enable: 'false', style: {marginRight: '15px', paddingTop: '5px', paddingBottom: '5px'}}, subButton: {label: '鎻愪氦', type: 'submit', enable: 'true', style: {backgroundColor: '#1890ff', color: '#ffffff', paddingLeft: '25px', paddingRight: '25px', paddingTop: '5px', paddingBottom: '5px'}}, nextButton: {label: '璺宠繃', type: 'next', enable: 'false', style: {paddingTop: '5px', paddingBottom: '5px'}} } @@ -220,8 +220,7 @@ this.setState({ card, - group: newcard, - groupvisible: true + group: newcard }) this.props.updateConfig(card) } @@ -244,10 +243,7 @@ } changeGroup = (item) => { - this.setState({ - group: item, - groupvisible: true - }) + this.updateGroup(item) } closeGroup = (cell) => { @@ -286,25 +282,6 @@ this.props.updateConfig(card) } - handleGroupSubmit = () => { - let group = fromJS(this.state.group).toJS() - - this.groupRef.handleConfirm().then(res => { - group.prevButton.enable = res.prevEnable - group.subButton.enable = res.subEnable - group.nextButton.enable = res.nextEnable - - delete res.prevEnable - delete res.subEnable - delete res.nextEnable - - group.setting = res - - this.setState({groupvisible: false}) - this.updateGroup(group) - }) - } - changecols = (type) => { let card = fromJS(this.state.card).toJS() let config = fromJS(this.state.group).toJS() @@ -647,6 +624,14 @@ }) } + getWrapForms = () => { + return getWrapForm(this.state.card) + } + + updateWrap = (res) => { + this.updateComponent({...this.state.card, wrap: res}) + } + clickComponent = (e) => { if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') { e.stopPropagation() @@ -662,7 +647,9 @@ <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> <Icon className="plus" title="娣诲姞鍒嗙粍" onClick={this.addCard} type="plus" /> - <WrapComponent config={card} updateConfig={this.updateComponent} /> + <NormalForm title="琛ㄥ崟璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}> + <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/> + </NormalForm> <CopyComponent type="propcard" card={card}/> <PasteComponent config={card} options={['form']} updateConfig={this.pasteForm} /> <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" /> @@ -709,22 +696,6 @@ />} <FormAction config={card} group={group} updateconfig={this.updateGroup}/> </div> : null} - <Modal - title="鍒嗙粍缂栬緫" - visible={this.state.groupvisible} - width={850} - maskClosable={false} - onCancel={() => this.setState({groupvisible: false})} - onOk={this.handleGroupSubmit} - destroyOnClose - > - <GroupForm - dict={dict} - group={group} - inputSubmit={this.handleGroupSubmit} - wrappedComponentRef={(inst) => this.groupRef = inst} - /> - </Modal> <Modal title={this.state.dict['model.edit']} visible={this.state.visible} diff --git a/src/menu/components/form/normal-form/options.jsx b/src/menu/components/form/normal-form/options.jsx new file mode 100644 index 0000000..1d8278c --- /dev/null +++ b/src/menu/components/form/normal-form/options.jsx @@ -0,0 +1,106 @@ +/** + * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 + */ +export default function (config) { + let appType = sessionStorage.getItem('appType') + let roleList = sessionStorage.getItem('sysRoles') + let wrap = config.wrap + + if (roleList) { + try { + roleList = JSON.parse(roleList) + } catch { + roleList = [] + } + } else { + roleList = [] + } + + const wrapForm = [ + { + type: 'text', + field: 'name', + label: '缁勪欢鍚嶇О', + initval: wrap.name || '', + tooltip: '鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�', + required: true + }, + { + type: 'number', + field: 'width', + label: '瀹藉害', + initval: wrap.width || 24, + tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', + min: 1, + max: 24, + precision: 0, + required: true + }, + { + type: 'radio', + field: 'datatype', + label: '鍒濆鍊�', + initval: wrap.datatype || 'static', + tooltip: '鍒濆鍊兼潵婧愪簬鏁版嵁婧愭垨琛ㄥ崟榛樿鍊笺��', + required: false, + options: [ + {value: 'dynamic', label: '鍔ㄦ��'}, + {value: 'static', label: '闈欐��'}, + ] + }, + { + type: 'select', + field: 'statusControl', + label: '鐘舵�佹帶鍒�', + initval: wrap.statusControl || '', + tooltip: '琛ㄥ崟鍔犺浇鏃剁殑鐘舵�侊紝褰撳瓧娈靛�间笌琛ㄥ崟缁勭殑鐘舵�佸�间竴鑷存椂锛屽惎鐢ㄥ搴旂殑琛ㄥ崟缁勩��', + required: false, + options: config.columns, + forbid: config.subtype === 'tabform' + }, + { + type: 'radio', + field: 'groupLabel', + label: '鍒嗙粍鍚嶇О', + initval: wrap.groupLabel || 'show', + tooltip: '鍔犺浇鏃舵槸鍚︽樉绀哄垎缁勫悕绉般��', + required: false, + options: [ + {value: 'show', label: '鏄剧ず'}, + {value: 'hidden', label: '闅愯棌'}, + ] + }, + { + type: 'radio', + field: 'tabtype', + label: '鍒嗙粍椋庢牸', + initval: wrap.tabtype || 'mktab', + required: false, + options: [ + {value: 'mktab', label: 'tab椤�'}, + {value: 'mkbtn', label: '鎸夐挳缁�'}, + ], + forbid: config.subtype !== 'tabform' + }, + { + type: 'color', + field: 'color', + label: '棰滆壊鎺у埗', + initval: wrap.color || '#1890ff', + tooltip: '瀹屾垚鍚庣殑棰滆壊', + required: false, + forbid: config.subtype === 'tabform' + }, + { + type: 'multiselect', + field: 'blacklist', + label: '榛戝悕鍗�', + initval: wrap.blacklist || [], + required: false, + options: roleList, + forbid: !!appType + }, + ] + + return wrapForm +} \ No newline at end of file diff --git a/src/menu/components/form/tab-form/groupform/index.jsx b/src/menu/components/form/tab-form/groupform/index.jsx deleted file mode 100644 index 2929541..0000000 --- a/src/menu/components/form/tab-form/groupform/index.jsx +++ /dev/null @@ -1,147 +0,0 @@ -import React, {Component} from 'react' -import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Radio, Select } from 'antd' -import { formRule } from '@/utils/option.js' -import './index.scss' - -class SettingForm extends Component { - static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� - group: PropTypes.object, // 琛ㄥ崟閰嶇疆淇℃伅 - inputSubmit: PropTypes.any // 鍥炶溅鎻愪氦浜嬩欢 - } - - state = { - fields: null, - appType: sessionStorage.getItem('appType') - } - - UNSAFE_componentWillMount () { - const { group } = this.props - const { appType } = this.state - let fields = [] - - if (appType === 'mob') { - group.fields.forEach(f => { - if (f.field && ['text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { - fields.push(f) - } - }) - } else { - group.fields.forEach(f => { - if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { - fields.push(f) - } - }) - } - - this.setState({ - fields: fields - }) - } - - handleConfirm = () => { - // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� - return new Promise((resolve, reject) => { - this.props.form.validateFieldsAndScroll((err, values) => { - if (!err) { - resolve(values) - } else { - reject(err) - } - }) - }) - } - - handleSubmit = (e) => { - e.preventDefault() - - if (this.props.inputSubmit) { - this.props.inputSubmit() - } - } - - render() { - const { group, dict } = this.props - const { getFieldDecorator } = this.props.form - const { fields, appType } = this.state - - const formItemLayout = { - labelCol: { - xs: { span: 24 }, - sm: { span: 8 } - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 } - } - } - - return ( - <Form {...formItemLayout} className="ant-advanced-search-form modal-setting-form"> - <Row gutter={24}> - <Col span={12}> - <Form.Item label="鏍囬"> - {getFieldDecorator('title', { - initialValue: group.setting.title, - rules: [ - { - max: formRule.input.max, - message: formRule.input.message - } - ] - })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="鐒︾偣"> - {getFieldDecorator('focus', { - initialValue: group.setting.focus || '' - })( - <Select - showSearch - filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} - > - <Select.Option value=""> - {dict['model.empty']} - </Select.Option> - {fields.map(option => - <Select.Option id={option.uuid} title={option.label} key={option.uuid} value={option.field}> - {option.label} - </Select.Option> - )} - </Select> - )} - </Form.Item> - </Col> - {appType !== 'mob' ? <Col span={12}> - <Form.Item label="琛ㄥ崟鎺掑垪"> - {getFieldDecorator('align', { - initialValue: group.setting.align || 'left_right' - })( - <Radio.Group> - <Radio value="left_right">宸﹀彸</Radio> - <Radio value="up_down">涓婁笅</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> : null} - <Col span={12}> - <Form.Item label="鎻愪氦"> - {getFieldDecorator('subEnable', { - initialValue: group.subButton.enable - })( - <Radio.Group> - <Radio value="true">鏄剧ず</Radio> - <Radio value="false">闅愯棌</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> - </Row> - </Form> - ) - } -} - -export default Form.create()(SettingForm) \ No newline at end of file diff --git a/src/menu/components/form/tab-form/groupform/index.scss b/src/menu/components/form/tab-form/groupform/index.scss deleted file mode 100644 index 9a74987..0000000 --- a/src/menu/components/form/tab-form/groupform/index.scss +++ /dev/null @@ -1,18 +0,0 @@ -.ant-advanced-search-form.modal-setting-form { - .textarea { - .ant-form-item-label { - width: 16.3%; - } - .ant-form-item-control-wrapper { - width: 83.33333333%; - } - } - .ant-input-number { - width: 100%; - } - .anticon-question-circle { - color: #c49f47; - position: relative; - left: -3px; - } -} \ No newline at end of file diff --git a/src/menu/components/form/tab-form/index.jsx b/src/menu/components/form/tab-form/index.jsx index bb2b210..5397c8c 100644 --- a/src/menu/components/form/tab-form/index.jsx +++ b/src/menu/components/form/tab-form/index.jsx @@ -11,17 +11,17 @@ import { resetStyle } from '@/utils/utils-custom.js' import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' +import getWrapForm from '../normal-form/options' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' import './index.scss' const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform')) const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) -const WrapComponent = asyncIconComponent(() => import('@/menu/components/form/wrapsetting')) +const NormalForm = asyncIconComponent(() => import('@/components/normalform')) const CardComponent = asyncComponent(() => import('@/templates/modalconfig/dragelement')) const MobCardComponent = asyncComponent(() => import('@/mob/components/formdragelement')) const FormTitle = asyncComponent(() => import('../dragtitle')) -const GroupForm = asyncComponent(() => import('./groupform')) const FormAction = asyncComponent(() => import('../formaction')) const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent')) @@ -216,8 +216,7 @@ this.setState({ card, - group: newcard, - groupvisible: true + group: newcard }) this.props.updateConfig(card) } @@ -236,13 +235,6 @@ selectGroup = (item) => { this.setState({ group: item - }) - } - - changeGroup = (item) => { - this.setState({ - group: item, - groupvisible: true }) } @@ -280,21 +272,6 @@ this.setState({card, group}) this.props.updateConfig(card) - } - - handleGroupSubmit = () => { - let group = fromJS(this.state.group).toJS() - - this.groupRef.handleConfirm().then(res => { - group.subButton.enable = res.subEnable - - delete res.subEnable - - group.setting = res - - this.setState({groupvisible: false}) - this.updateGroup(group) - }) } changecols = (type) => { @@ -639,6 +616,14 @@ }) } + getWrapForms = () => { + return getWrapForm(this.state.card) + } + + updateWrap = (res) => { + this.updateComponent({...this.state.card, wrap: res}) + } + clickComponent = (e) => { if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') { e.stopPropagation() @@ -654,7 +639,9 @@ <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> <Icon className="plus" title="娣诲姞鍒嗙粍" onClick={this.addCard} type="plus" /> - <WrapComponent config={card} updateConfig={this.updateComponent} /> + <NormalForm title="琛ㄥ崟璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}> + <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/> + </NormalForm> <CopyComponent type="propcard" card={card}/> <PasteComponent config={card} options={['form']} updateConfig={this.pasteForm} /> <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" /> @@ -671,7 +658,7 @@ tabtype={card.wrap.tabtype || ''} selectId={group ? group.uuid : ''} handleList={this.changecards} - handleGroup={this.changeGroup} + handleGroup={this.updateGroup} closeGroup={this.closeGroup} selectGroup={this.selectGroup} /> @@ -702,22 +689,6 @@ />} <FormAction config={card} group={group} updateconfig={this.updateGroup}/> </div> : null} - <Modal - title="鍒嗙粍缂栬緫" - visible={this.state.groupvisible} - width={850} - maskClosable={false} - onCancel={() => this.setState({groupvisible: false})} - onOk={this.handleGroupSubmit} - destroyOnClose - > - <GroupForm - dict={dict} - group={group} - inputSubmit={this.handleGroupSubmit} - wrappedComponentRef={(inst) => this.groupRef = inst} - /> - </Modal> <Modal title={this.state.dict['model.edit']} visible={this.state.visible} diff --git a/src/menu/components/form/wrapsetting/index.jsx b/src/menu/components/form/wrapsetting/index.jsx deleted file mode 100644 index c159968..0000000 --- a/src/menu/components/form/wrapsetting/index.jsx +++ /dev/null @@ -1,83 +0,0 @@ -import React, {Component} from 'react' -import PropTypes from 'prop-types' -import { is, fromJS } from 'immutable' -import { Icon, Modal } from 'antd' - -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' -import SettingForm from './settingform' -import './index.scss' - -class DataSource extends Component { - static propTpyes = { - config: PropTypes.any, - updateConfig: PropTypes.func - } - - state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, - visible: false, - wrap: null - } - - UNSAFE_componentWillMount () { - const { config } = this.props - - this.setState({wrap: fromJS(config.wrap).toJS()}) - } - - shouldComponentUpdate (nextProps, nextState) { - return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) - } - - editDataSource = () => { - this.setState({ - visible: true - }) - } - - verifySubmit = () => { - const { config } = this.props - - this.verifyRef.handleConfirm().then(res => { - - this.setState({ - wrap: res, - visible: false - }) - this.props.updateConfig({...config, wrap: res}) - }) - } - - render () { - const { config } = this.props - const { visible, dict, wrap } = this.state - - return ( - <div className="model-menu-setting-wrap"> - <Icon type="edit" title="缂栬緫" onClick={() => this.editDataSource()} /> - <Modal - wrapClassName="popview-modal" - title="琛ㄥ崟璁剧疆" - visible={visible} - width={800} - maskClosable={false} - okText={dict['model.submit']} - onOk={this.verifySubmit} - onCancel={() => { this.setState({ visible: false }) }} - destroyOnClose - > - <SettingForm - dict={dict} - wrap={wrap} - config={config} - inputSubmit={this.verifySubmit} - wrappedComponentRef={(inst) => this.verifyRef = inst} - /> - </Modal> - </div> - ) - } -} - -export default DataSource \ No newline at end of file diff --git a/src/menu/components/form/wrapsetting/index.scss b/src/menu/components/form/wrapsetting/index.scss deleted file mode 100644 index 04372e6..0000000 --- a/src/menu/components/form/wrapsetting/index.scss +++ /dev/null @@ -1,7 +0,0 @@ -.model-menu-setting-wrap { - display: inline-block; - - >.anticon-edit { - color: #1890ff; - } -} \ No newline at end of file diff --git a/src/menu/components/form/wrapsetting/settingform/index.jsx b/src/menu/components/form/wrapsetting/settingform/index.jsx deleted file mode 100644 index 83e7804..0000000 --- a/src/menu/components/form/wrapsetting/settingform/index.jsx +++ /dev/null @@ -1,217 +0,0 @@ -import React, {Component} from 'react' -import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Radio, Tooltip, Icon, InputNumber, Select } from 'antd' - -import asyncComponent from '@/utils/asyncComponent' -import './index.scss' - -const ColorSketch = asyncComponent(() => import('@/mob/colorsketch')) - -class SettingForm extends Component { - static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� - config: PropTypes.object, // 鍗$墖琛屼俊鎭� - wrap: PropTypes.object, // 鏁版嵁婧愰厤缃� - inputSubmit: PropTypes.func // 鍥炶溅浜嬩欢 - } - - state = { - roleList: [] - } - - UNSAFE_componentWillMount () { - let roleList = sessionStorage.getItem('sysRoles') - if (roleList) { - try { - roleList = JSON.parse(roleList) - } catch { - roleList = [] - } - } else { - roleList = [] - } - - this.setState({roleList}) - } - - handleConfirm = () => { - // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� - return new Promise((resolve, reject) => { - this.props.form.validateFieldsAndScroll((err, values) => { - if (!err) { - resolve(values) - } else { - reject(err) - } - }) - }) - } - - handleSubmit = (e) => { - e.preventDefault() - - if (this.props.inputSubmit) { - this.props.inputSubmit() - } - } - - render() { - const { wrap, config } = this.props - const { getFieldDecorator } = this.props.form - const { roleList } = this.state - - const formItemLayout = { - labelCol: { - xs: { span: 24 }, - sm: { span: 8 } - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 } - } - } - - return ( - <div className="model-menu-setting-form"> - <Form {...formItemLayout}> - <Row gutter={24}> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�"> - <Icon type="question-circle" /> - 缁勪欢鍚嶇О - </Tooltip> - }> - {getFieldDecorator('name', { - initialValue: wrap.name, - rules: [ - { - required: true, - message: this.props.dict['form.required.input'] + '缁勪欢鍚嶇О!' - } - ] - })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��"> - <Icon type="question-circle" /> - 瀹藉害 - </Tooltip> - }> - {getFieldDecorator('width', { - initialValue: wrap.width || 24, - rules: [ - { - required: true, - message: this.props.dict['form.required.input'] + '瀹藉害!' - } - ] - })(<InputNumber min={1} max={24} precision={0} onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鍒濆鍊兼潵婧愪簬鏁版嵁婧愭垨琛ㄥ崟榛樿鍊笺��"> - <Icon type="question-circle" /> - 鍒濆鍊� - </Tooltip> - }> - {getFieldDecorator('datatype', { - initialValue: wrap.datatype || 'dynamic' - })( - <Radio.Group> - <Radio value="dynamic">鍔ㄦ��</Radio> - <Radio value="static">闈欐��</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> - {config.subtype !== 'tabform' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="琛ㄥ崟鍔犺浇鏃剁殑鐘舵�侊紝褰撳瓧娈靛�间笌琛ㄥ崟缁勭殑鐘舵�佸�间竴鑷存椂锛屽惎鐢ㄥ搴旂殑琛ㄥ崟缁勩��"> - <Icon type="question-circle" /> - 鐘舵�佹帶鍒� - </Tooltip> - }> - {getFieldDecorator('statusControl', { - initialValue: wrap.statusControl || '' - })( - <Select> - <Select.Option key='' value={''}>鏃�</Select.Option> - {config.columns.map(option => - <Select.Option key={option.uuid} value={option.field}>{option.label}</Select.Option> - )} - </Select> - )} - </Form.Item> - </Col> : null} - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鍔犺浇鏃舵槸鍚︽樉绀哄垎缁勫悕绉般��"> - <Icon type="question-circle" /> - 鍒嗙粍鍚嶇О - </Tooltip> - }> - {getFieldDecorator('groupLabel', { - initialValue: wrap.groupLabel || 'show' - })( - <Radio.Group> - <Radio value="show">鏄剧ず</Radio> - <Radio value="hidden">闅愯棌</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> - {config.subtype === 'tabform' ? <Col span={12}> - <Form.Item label="鍒嗙粍椋庢牸"> - {getFieldDecorator('tabtype', { - initialValue: wrap.tabtype || 'mktab' - })( - <Radio.Group> - <Radio value="mktab">tab椤�</Radio> - <Radio value="mkbtn">鎸夐挳缁�</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> : null} - {config.subtype !== 'tabform' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="瀹屾垚鍚庣殑棰滆壊"> - <Icon type="question-circle" /> - 棰滆壊鎺у埗 - </Tooltip> - }> - {getFieldDecorator('color', { - initialValue: wrap.color || '#1890ff' - })( - <ColorSketch /> - )} - </Form.Item> - </Col> : null} - <Col span={12}> - <Form.Item label="榛戝悕鍗�"> - {getFieldDecorator('blacklist', { - initialValue: wrap.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> - </div> - ) - } -} - -export default Form.create()(SettingForm) \ No newline at end of file diff --git a/src/menu/components/form/wrapsetting/settingform/index.scss b/src/menu/components/form/wrapsetting/settingform/index.scss deleted file mode 100644 index 65d3417..0000000 --- a/src/menu/components/form/wrapsetting/settingform/index.scss +++ /dev/null @@ -1,15 +0,0 @@ -.model-menu-setting-form { - position: relative; - - .anticon-question-circle { - color: #c49f47; - margin-right: 3px; - } - .ant-input-number { - width: 100%; - } - .color-sketch-block { - position: relative; - top: 6px; - } -} \ No newline at end of file diff --git a/src/mob/components/menubar/normal-menubar/options.jsx b/src/mob/components/menubar/normal-menubar/options.jsx index 54a7cc3..c8d9f80 100644 --- a/src/mob/components/menubar/normal-menubar/options.jsx +++ b/src/mob/components/menubar/normal-menubar/options.jsx @@ -2,18 +2,6 @@ * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ export default function (wrap) { - let roleList = sessionStorage.getItem('sysRoles') - - if (roleList) { - try { - roleList = JSON.parse(roleList) - } catch { - roleList = [] - } - } else { - roleList = [] - } - const menuWrapForm = [ { type: 'text', @@ -40,15 +28,7 @@ max: 24, precision: 0, required: true - }, - { - type: 'multiselect', - field: 'blacklist', - label: '榛戝悕鍗�', - initval: wrap.blacklist || [], - required: false, - options: roleList - }, + } ] return menuWrapForm diff --git a/src/pc/components/login/wrapsetting/settingform/index.jsx b/src/pc/components/login/wrapsetting/settingform/index.jsx index 0c32e57..cf36b2f 100644 --- a/src/pc/components/login/wrapsetting/settingform/index.jsx +++ b/src/pc/components/login/wrapsetting/settingform/index.jsx @@ -13,25 +13,13 @@ } state = { - roleList: [], msgTemps: [], appMenus: [], link: this.props.wrap.link || 'menu' } UNSAFE_componentWillMount () { - let roleList = sessionStorage.getItem('sysRoles') let msgTemps = sessionStorage.getItem('msgTemplate') - - if (roleList) { - try { - roleList = JSON.parse(roleList) - } catch { - roleList = [] - } - } else { - roleList = [] - } if (msgTemps) { try { @@ -54,7 +42,7 @@ appMenus = [] } - this.setState({roleList, msgTemps, appMenus}) + this.setState({msgTemps, appMenus}) } handleConfirm = () => { @@ -89,7 +77,7 @@ render() { const { wrap } = this.props const { getFieldDecorator } = this.props.form - const { roleList, msgTemps, appMenus, link } = this.state + const { msgTemps, appMenus, link } = this.state const formItemLayout = { labelCol: { @@ -239,23 +227,6 @@ > {msgTemps.map(option => <Select.Option key={option.ID} value={option.ID}>{option.SignName + ' - ' + option.TemplateCode}</Select.Option> - )} - </Select> - )} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="榛戝悕鍗�"> - {getFieldDecorator('blacklist', { - initialValue: wrap.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> )} diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx index f937f81..b5fadc0 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx @@ -475,6 +475,7 @@ </Radio.Group> </Form.Item> </Col> + <div style={{color: '#959595', fontSize: '13px', paddingTop: '30px', float: 'right'}}>鎵ц鎴愬姛鍚庣殑鍥炶皟鍑芥暟銆�</div> <Col span={24} className="sql"> <Form.Item label={'sql'}> {getFieldDecorator('sql', { diff --git a/src/views/design/sidemenu/config.jsx b/src/views/design/sidemenu/config.jsx index 9cca512..804b697 100644 --- a/src/views/design/sidemenu/config.jsx +++ b/src/views/design/sidemenu/config.jsx @@ -97,6 +97,14 @@ // MenuID: '1606794243739c5ihs58lucpskp3r4s2', // MenuNo: 's_custom_componentsM', // MenuName: '鑷畾涔夌粍浠�', + }, { + src: '', + systems: ['production', 'local'], + PageParam: {OpenType: 'newtab', Template: 'ManageTable'}, + type: 'ManageTable', + MenuID: '15827879285193g85m3i2uprektpgmpf', + MenuNo: 'bd_mes_techM', + MenuName: '宸ヨ壓涓绘暟鎹�', }] }, { MenuID: 'systemManageViewInterface', diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index f1a3c70..a0f07b8 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -677,7 +677,10 @@ title: item.name, children: [] } - if (item.type === 'tabs') { + + if (item.type === 'topbar' || item.type === 'login') { + return null + } else if (item.type === 'tabs') { let tabs = [] item.subtabs.forEach(tab => { let s = traversal(tab.components) @@ -753,6 +756,13 @@ title: menu.setting.name } }) + } else if (item.type === 'form') { + m.children = item.subcards.map(m => { + return { + key: m.uuid, + title: m.setting.title + } + }) } else if (item.type === 'table' && item.subtype === 'normaltable') { item.action && item.action.forEach(btn => { this.checkBtn(btn) @@ -772,8 +782,6 @@ }) }) } - - if (m.children.length === 0) return null return m }) diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index 9317a02..f610e2d 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -738,7 +738,9 @@ title: item.name, children: [] } - if (item.type === 'tabs') { + if (item.type === 'login') { + return null + } else if (item.type === 'tabs') { let tabs = [] item.subtabs.forEach(tab => { let s = traversal(tab.components) @@ -829,6 +831,13 @@ title: menu.setting.name } }) + } else if (item.type === 'form') { + m.children = item.subcards.map(m => { + return { + key: m.uuid, + title: m.setting.title + } + }) } else if (item.type === 'table' && item.subtype === 'normaltable') { item.action && item.action.forEach(btn => { this.checkBtn(btn) @@ -854,8 +863,6 @@ }) }) } - - if (m.children.length === 0) return null return m }) -- Gitblit v1.8.0