From 71fce3cc19f80a6e0eba36cfc5e67995ee9712ff Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 23 七月 2020 09:23:59 +0800 Subject: [PATCH] 2020-07-23 --- src/mob/components/login/mob-login-2/index.scss | 7 - src/tabviews/formtab/index.jsx | 2 src/tabviews/subtable/index.scss | 2 src/tabviews/formtab/formgroup/index.jsx | 6 src/tabviews/zshare/topSearch/index.jsx | 10 +- src/templates/zshare/formconfig.jsx | 32 ++--- src/templates/sharecomponent/cardcomponent/index.scss | 2 src/tabviews/zshare/cardcomponent/index.scss | 10 + src/setupProxy.js | 2 src/tabviews/zshare/mutilform/index.jsx | 10 +- src/mob/components/login/mob-login-2/index.jsx | 134 ++++++++++++++------------ src/templates/sharecomponent/cardcomponent/index.jsx | 8 src/tabviews/zshare/actionList/normalbutton/index.jsx | 4 src/tabviews/zshare/cardcomponent/index.jsx | 2 src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx | 18 ++ src/templates/sharecomponent/chartgroupcomponent/index.jsx | 9 + 16 files changed, 138 insertions(+), 120 deletions(-) diff --git a/src/mob/components/login/mob-login-2/index.jsx b/src/mob/components/login/mob-login-2/index.jsx index 1848e65..7a4bfe5 100644 --- a/src/mob/components/login/mob-login-2/index.jsx +++ b/src/mob/components/login/mob-login-2/index.jsx @@ -31,17 +31,25 @@ password: { uuid: Utils.getuuid(), eleType: 'input', content: '瀵嗙爜', style: {}}, login: { uuid: Utils.getuuid(), eleType: 'button', content: '鐧诲綍', style: {fontSize: '16px', color: '#ffffff', textAlign: 'center', lineHeight: 2.4, backgroundColor: '#44a8f2'}}, phone: { uuid: Utils.getuuid(), eleType: 'button', content: '鎵嬫満鐭俊鐧诲綍', style: {fontSize: '16px', color: '#44a8f2', textAlign: 'center', lineHeight: 2.4, border: '1px solid #44a8f2'}}, - register: { uuid: Utils.getuuid(), eleType: 'text', content: '娉ㄥ唽', style: {fontSize: '12px', color: '#44a8f2', textAlign: 'left'}}, + register: { uuid: Utils.getuuid(), eleType: 'text', content: '娉ㄥ唽', style: {fontSize: '14px', color: '#44a8f2', textAlign: 'left'}}, lose: { uuid: Utils.getuuid(), eleType: 'text', content: '蹇樿瀵嗙爜锛�', style: {fontSize: '12px', color: '#44a8f2', textAlign: 'right', textDecoration: 'underline'}}, - auth: { uuid: Utils.getuuid(), eleType: 'text', subItems: [ - {type: 'qq', icon: 'qq', label: 'QQ'}, - {type: 'wechat', icon: 'wechat', label: '寰俊'}, - ], content: '鍏朵粬鐧诲綍鏂瑰紡', style: {fontSize: '14px', color: '#bcbcbc', textAlign: 'center', marginTop: '30px', marginBottom: '20px'}}, + auth: { + uuid: Utils.getuuid(), eleType: 'text', + subItems: [ + {type: 'qq', icon: 'qq', label: 'QQ'}, + {type: 'wechat', icon: 'wechat', label: '寰俊'}, + ], + content: '鍏朵粬鐧诲綍鏂瑰紡', style: {fontSize: '14px', color: '#bcbcbc', textAlign: 'center', marginTop: '30px', marginBottom: '20px'} + }, copyright: { uuid: Utils.getuuid(), eleType: 'textarea', content: 'Copyright漏2017 鎵�鏈夌浉鍏崇増鏉冨綊 鍖椾含鏄庣鏅崕淇℃伅鎶�鏈湁闄愬叕鍙�', style: {fontSize: '12px', textAlign: 'center'} }, - links: { uuid: Utils.getuuid(), eleType: 'link', substyle: false, subItems: [ - {eleType: 'link', content: '闅愮鏀跨瓥', url: '', uuid: Utils.getuuid()}, - {eleType: 'link', content: '浣跨敤鏉℃', url: '', uuid: Utils.getuuid()}, - ], style: {fontSize: '12px', textAlign: 'center', color: '#44a8f2', textDecoration: 'underline'} } + links: { + uuid: Utils.getuuid(), eleType: 'link', substyle: false, + subItems: [ + {eleType: 'link', content: '闅愮鏀跨瓥', url: '', uuid: Utils.getuuid()}, + {eleType: 'link', content: '浣跨敤鏉℃', url: '', uuid: Utils.getuuid()}, + ], + style: {fontSize: '12px', textAlign: 'center', color: '#44a8f2', textDecoration: 'underline'} + } } } @@ -220,62 +228,60 @@ if (view === 'account') return ( <div className="mob-login-2" onClick={this.editBox} style={card.box.style}> - <div className="mob-login-body"> - {card.title ? <div className={'plat-name ' + (editId === card.title.uuid ? 'editing' : '')} style={titleStyle} onClick={this.editTitle}> - <ContentUpdate element={card.title} updateContent={(ele) => this.updateContent({...card, title: ele})}/> - {card.title.content} - </div> : null} - - <div className={`mk-login-input ${editId === card.user.uuid ? 'editing' : ''}`} onClick={(e) => this.editPlaceholder(e, 'user')}> - <ContentUpdate element={card.user} deletable={false} updateContent={(ele) => this.updateContent({...card, user: ele})}/> - <InputItem placeholder={card.user.content}></InputItem> - </div> - <div className={`mk-login-input ${editId === card.password.uuid ? 'editing' : ''}`} onClick={(e) => this.editPlaceholder(e, 'password')}> - <ContentUpdate element={card.password} deletable={false} updateContent={(ele) => this.updateContent({...card, password: ele})}/> - <InputItem placeholder={card.password.content}></InputItem> - </div> - <Button - className={'login ' + (editId === card.login.uuid ? 'editing' : '')} - onDoubleClick={() => this.props.doubleClickCard(card.login)} - style={card.login.style} - onClick={(e) => this.editLogin(e, 'login')} - > - <ContentUpdate element={card.login} deletable={false} updateContent={(ele) => this.updateContent({...card, login: ele})}/> - {card.login.content} - </Button> - <Button - className={'login ' + (editId === card.phone.uuid ? 'editing' : '')} - onDoubleClick={() => this.props.doubleClickCard(card.phone)} - style={card.phone.style} - onClick={(e) => this.editLogin(e, 'phone')} - > - <ContentUpdate element={card.phone} updateContent={(ele) => this.updateContent({...card, phone: ele})}/> - {card.phone.content} - </Button> - <div className="row-box"> - {card.register ? <div className={'col-item ' + (editId === card.register.uuid ? 'editing' : '')} style={card.register.style} onClick={this.editRegister}> - <ContentUpdate element={card.register} updateContent={(ele) => this.updateContent({...card, register: ele})}/> - {card.register.content} - </div> : null} - {card.lose ? <div className={'col-item right ' + (editId === card.lose.uuid ? 'editing' : '')} style={card.lose.style} onClick={this.editLose}> - <ContentUpdate element={card.lose} updateContent={(ele) => this.updateContent({...card, lose: ele})}/> - {card.lose.content} - </div> : null} - <div style={{clear: 'both'}}></div> - </div> - {card.auth ? <div className={'plat-name ' + (editId === card.auth.uuid ? 'editing' : '')} style={card.auth.style} onClick={this.editAuth}> - <ContentUpdate element={card.auth} updateContent={(ele) => this.updateContent({...card, auth: ele})}/> - {card.auth.content} - </div> : null} - {card.auth ? <div className="other-auth"> - {card.auth.subItems.map(cell => ( - <span key={cell.type}> - <Icon type={cell.icon} /> - <p>{cell.label}</p> - </span> - ))} - </div> : null} + {card.title ? <div className={'plat-name ' + (editId === card.title.uuid ? 'editing' : '')} style={titleStyle} onClick={this.editTitle}> + <ContentUpdate element={card.title} updateContent={(ele) => this.updateContent({...card, title: ele})}/> + {card.title.content} + </div> : null} + + <div className={`mk-login-input ${editId === card.user.uuid ? 'editing' : ''}`} onClick={(e) => this.editPlaceholder(e, 'user')}> + <ContentUpdate element={card.user} deletable={false} updateContent={(ele) => this.updateContent({...card, user: ele})}/> + <InputItem placeholder={card.user.content}></InputItem> </div> + <div className={`mk-login-input ${editId === card.password.uuid ? 'editing' : ''}`} onClick={(e) => this.editPlaceholder(e, 'password')}> + <ContentUpdate element={card.password} deletable={false} updateContent={(ele) => this.updateContent({...card, password: ele})}/> + <InputItem placeholder={card.password.content}></InputItem> + </div> + <Button + className={'login ' + (editId === card.login.uuid ? 'editing' : '')} + onDoubleClick={() => this.props.doubleClickCard(card.login)} + style={card.login.style} + onClick={(e) => this.editLogin(e, 'login')} + > + <ContentUpdate element={card.login} deletable={false} updateContent={(ele) => this.updateContent({...card, login: ele})}/> + {card.login.content} + </Button> + <Button + className={'login ' + (editId === card.phone.uuid ? 'editing' : '')} + onDoubleClick={() => this.props.doubleClickCard(card.phone)} + style={card.phone.style} + onClick={(e) => this.editLogin(e, 'phone')} + > + <ContentUpdate element={card.phone} updateContent={(ele) => this.updateContent({...card, phone: ele})}/> + {card.phone.content} + </Button> + <div className="row-box"> + {card.register ? <div className={'col-item ' + (editId === card.register.uuid ? 'editing' : '')} style={card.register.style} onClick={this.editRegister}> + <ContentUpdate element={card.register} updateContent={(ele) => this.updateContent({...card, register: ele})}/> + {card.register.content} + </div> : null} + {card.lose ? <div className={'col-item right ' + (editId === card.lose.uuid ? 'editing' : '')} style={card.lose.style} onClick={this.editLose}> + <ContentUpdate element={card.lose} updateContent={(ele) => this.updateContent({...card, lose: ele})}/> + {card.lose.content} + </div> : null} + <div style={{clear: 'both'}}></div> + </div> + {card.auth ? <div className={'plat-name ' + (editId === card.auth.uuid ? 'editing' : '')} style={card.auth.style} onClick={this.editAuth}> + <ContentUpdate element={card.auth} updateContent={(ele) => this.updateContent({...card, auth: ele})}/> + {card.auth.content} + </div> : null} + {card.auth ? <div className="other-auth"> + {card.auth.subItems.map(cell => ( + <span key={cell.type}> + <Icon type={cell.icon} /> + <p>{cell.label}</p> + </span> + ))} + </div> : null} {card.copyright ? <div className={'company-msg ' + (editId === card.copyright.uuid ? 'editing' : '')} style={card.copyright.style} onClick={this.editMsg}> <ContentUpdate element={card.copyright} updateContent={(ele) => this.updateContent({...card, copyright: ele})}/> {card.copyright.content} diff --git a/src/mob/components/login/mob-login-2/index.scss b/src/mob/components/login/mob-login-2/index.scss index 589674c..6642ec3 100644 --- a/src/mob/components/login/mob-login-2/index.scss +++ b/src/mob/components/login/mob-login-2/index.scss @@ -7,13 +7,6 @@ background-size: cover; background-position: center center; - .mob-login-body { - min-height: calc((80 / 100) * 615px); - border-top: 1px solid transparent; - border-bottom: 1px solid transparent; - margin-bottom: 10px; - } - .plat-name { position: relative; max-width: 280px; diff --git a/src/setupProxy.js b/src/setupProxy.js index 1aca9db..96428c2 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -1,8 +1,6 @@ const proxy = require('http-proxy-middleware') const host = 'http://qingqiumarket.cn' const service = 'mkwms/' -// const host = 'http://cloud.mk9h.cn' -// const service = '' module.exports = function(app) { app.use(proxy('/webapi', { diff --git a/src/tabviews/formtab/formgroup/index.jsx b/src/tabviews/formtab/formgroup/index.jsx index 96fef81..d4aaa8f 100644 --- a/src/tabviews/formtab/formgroup/index.jsx +++ b/src/tabviews/formtab/formgroup/index.jsx @@ -212,7 +212,7 @@ duration: 5 }) } else { - item.options = item.oriOptions.filter(option => option.parentId === supItem.initval) + item.options = item.oriOptions.filter(option => option.ParentID === supItem.initval) } } return item @@ -239,7 +239,7 @@ groups = groups.map(group => { group.sublist = group.sublist.map(item => { if (item.type === 'link' && item.linkField === supfield.field) { - item.options = item.oriOptions.filter(option => option.parentId === supfield.initval) + item.options = item.oriOptions.filter(option => option.ParentID === supfield.initval) item.initval = item.options[0] ? item.options[0].Value : '' fieldsvalue[item.field] = item.initval @@ -270,7 +270,7 @@ groups = groups.map(group => { group.sublist = group.sublist.map(item => { if (item.type === 'link' && item.linkField === _field.field) { - item.options = item.oriOptions.filter(option => option.parentId === value) + item.options = item.oriOptions.filter(option => option.ParentID === value) item.initval = item.options[0] ? item.options[0].Value : '' fieldsvalue[item.field] = item.initval diff --git a/src/tabviews/formtab/index.jsx b/src/tabviews/formtab/index.jsx index b8f1139..67fba19 100644 --- a/src/tabviews/formtab/index.jsx +++ b/src/tabviews/formtab/index.jsx @@ -259,7 +259,7 @@ } if (res.search.type === 'link') { - _item.parentId = cell[res.search.linkField] + _item.ParentID = cell[res.search.linkField] } else if (res.search.type === 'select' && res.search.linkSubField && res.search.linkSubField.length > 0) { res.search.linkSubField.forEach(_field => { _item[_field] = (cell[_field] || cell[_field] === 0) ? cell[_field] : '' diff --git a/src/tabviews/subtable/index.scss b/src/tabviews/subtable/index.scss index b99b92c..f7dc06c 100644 --- a/src/tabviews/subtable/index.scss +++ b/src/tabviews/subtable/index.scss @@ -17,7 +17,7 @@ .ant-tabs-bar { position: relative; z-index: 1; - top: -10px; + top: 0px; margin: 0; border: 0; .ant-tabs-nav-scroll { diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 3627805..e53c507 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -141,7 +141,7 @@ } } else if (btn.intertype === 'outer') { // 鎺ュ彛鍦板潃涓嶅瓨鍦ㄦ椂鎶ラ敊 - if (!btn.interface) { + if (!btn.interface && btn.sysInterface !== 'true') { this.actionSettingError() return } @@ -1069,7 +1069,7 @@ {show === 'icon' ? <Button className="action-cell" icon={btn.icon || 'dash'} loading={loading} onClick={() => {this.actionTrigger()}}></Button> : null} {show === 'text' ? <Button className="action-cell" loading={loading} onClick={() => {this.actionTrigger()}}>{btn.label}</Button> : null} {show === 'all' ? <Button className="action-cell" icon={btn.icon || ''} loading={loading} onClick={() => {this.actionTrigger()}}>{btn.label}</Button> : null} - {show && show.indexOf('plus') > -1 ? <Button className="action-cell" style={{fontSize: show.substring(4) + 'px'}} icon="plus" loading={loading} onClick={() => {this.actionTrigger()}}></Button> : null} + {show && show.indexOf('plus') > -1 ? <Button className="action-cell" style={{fontSize: show.substring(4) + 'px'}} icon={btn.icon || 'plus'} loading={loading} onClick={() => {this.actionTrigger()}}></Button> : null} {this.getModels()} </div> ) diff --git a/src/tabviews/zshare/cardcomponent/index.jsx b/src/tabviews/zshare/cardcomponent/index.jsx index 87dedb9..229ce3c 100644 --- a/src/tabviews/zshare/cardcomponent/index.jsx +++ b/src/tabviews/zshare/cardcomponent/index.jsx @@ -567,7 +567,7 @@ actions.forEach(item => { if ((item.Ot && item.Ot !== 'notRequired' && !['excelIn', 'excelOut'].includes(item.OpenType)) || item.funcType === 'changeuser') { actionMap.set(item.uuid, item) - } else if (plot.insert === 'true' && !insertAction && item.OpenType === 'pop' && item.sqlType === 'insert' && item.Ot === 'notRequired') { + } else if (plot.extraAction && plot.extraAction === item.uuid && ['pop', 'prompt', 'exec'].includes(item.OpenType) && item.Ot === 'notRequired') { insertAction = item } else if (plot.actions && plot.actions.length > 0 && plot.actions.includes(item.uuid) && (item.OpenType === 'excelOut' || (item.OpenType === 'excelIn' && item.Ot === 'notRequired'))) { actionList.push(item) diff --git a/src/tabviews/zshare/cardcomponent/index.scss b/src/tabviews/zshare/cardcomponent/index.scss index 371dc8d..0ae1b0b 100644 --- a/src/tabviews/zshare/cardcomponent/index.scss +++ b/src/tabviews/zshare/cardcomponent/index.scss @@ -105,7 +105,15 @@ border: 0; width: 100%; height: 100%; - color: rgb(38, 194, 129); + color: #d9d9d9; + transition: color 0.3s linear; + } + } + } + .mk-card-insert:hover { + .mk-btn-wrap { + .ant-btn { + color: #1890ff; } } } diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 42b2724..00a1445 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -227,7 +227,7 @@ item.supInitVal = '' } else { item.supInitVal = supItem.initval - item.options = item.oriOptions.filter(option => option.parentId === supItem.initval) + item.options = item.oriOptions.filter(option => option.ParentID === supItem.initval) } } @@ -321,7 +321,7 @@ } if (res.$search.type === 'link') { - item.parentId = cell[res.$search.linkField] + item.ParentID = cell[res.$search.linkField] } else if (res.$search.type === 'select' && res.$search.linkSubField && res.$search.linkSubField.length > 0) { res.$search.linkSubField.forEach(_field => { item[_field] = (cell[_field] || cell[_field] === 0) ? cell[_field] : '' @@ -357,7 +357,7 @@ _formlist = _formlist.map(item => { if (item.type === 'link') { if (item.supInitVal) { - item.options = item.oriOptions.filter(option => option.parentId === item.supInitVal) + item.options = item.oriOptions.filter(option => option.ParentID === item.supInitVal) } else { item.options = item.oriOptions } @@ -381,7 +381,7 @@ formlist = formlist.map(item => { if (item.type === 'link' && item.linkField === supfield.field) { - item.options = item.oriOptions.filter(option => option.parentId === supfield.initval) + item.options = item.oriOptions.filter(option => option.ParentID === supfield.initval) item.initval = item.options[0] ? item.options[0].Value : '' if (this.props.form.getFieldValue(item.field) !== undefined) { @@ -410,7 +410,7 @@ let _record = {} formlist = formlist.map(item => { if (item.type === 'link' && item.linkField === _field.field) { - item.options = item.oriOptions.filter(option => option.parentId === value) + item.options = item.oriOptions.filter(option => option.ParentID === value) item.initval = item.options[0] ? item.options[0].Value : '' if (this.props.form.getFieldValue(item.field) !== undefined) { diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index 478a1a4..b38f024 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -76,7 +76,7 @@ duration: 5 }) } else { - item.options = item.oriOptions.filter(option => option.parentId === supItem.initval) + item.options = item.oriOptions.filter(option => option.ParentID === supItem.initval) } } else if (item.type === 'group' && item.Hide !== 'true') { _groups.push(fromJS(item).toJS()) @@ -174,7 +174,7 @@ } if (res.search.type === 'link') { - _item.parentId = cell[res.search.linkField] + _item.ParentID = cell[res.search.linkField] } item.options.push(_item) @@ -212,7 +212,7 @@ let supItem = _list.filter(form => form.field === item.linkField)[0] if (supItem) { - item.options = item.oriOptions.filter(option => option.parentId === supItem.initval) + item.options = item.oriOptions.filter(option => option.ParentID === supItem.initval) } } @@ -230,7 +230,7 @@ supfields.forEach(supfield => { formlist = formlist.map(item => { if (item.type === 'link' && item.linkField === supfield.field) { - item.options = item.oriOptions.filter(option => option.parentId === supfield.initval) + item.options = item.oriOptions.filter(option => option.ParentID === supfield.initval) item.initval = item.options[0] ? item.options[0].Value : '' if (this.props.form.getFieldValue(item.field) !== undefined) { @@ -257,7 +257,7 @@ let fieldsvalue = {} formlist = formlist.map(item => { if (item.type === 'link' && item.linkField === _field.field) { - item.options = item.oriOptions.filter(option => option.parentId === value) + item.options = item.oriOptions.filter(option => option.ParentID === value) item.initval = item.options[0] ? item.options[0].Value : '' if (this.props.form.getFieldValue(item.field) !== undefined) { diff --git a/src/templates/sharecomponent/cardcomponent/index.jsx b/src/templates/sharecomponent/cardcomponent/index.jsx index 92149c9..350c9f5 100644 --- a/src/templates/sharecomponent/cardcomponent/index.jsx +++ b/src/templates/sharecomponent/cardcomponent/index.jsx @@ -38,7 +38,7 @@ UNSAFE_componentWillReceiveProps (nextProps) { if (!is(fromJS(this.props.card), fromJS(nextProps.card))) { setTimeout(() => { - if (nextProps.card.insert === 'true' && this.cardRef) { + if (nextProps.card.extraAction && this.cardRef) { if (this.cardRef.offsetWidth !== this.state.cardwidth || this.cardRef.offsetHeight !== this.state.cardheight) { this.setState({ cardwidth: this.cardRef.offsetWidth, @@ -311,7 +311,7 @@ componentDidMount() { const { card } = this.props - if (card.insert === 'true' && this.cardRef) { + if (card.extraAction && this.cardRef) { this.setState({ cardwidth: this.cardRef.offsetWidth, cardheight: this.cardRef.offsetHeight @@ -322,7 +322,7 @@ componentDidUpdate() { const { card } = this.props - if (card.insert === 'true' && this.cardRef) { + if (card.extraAction && this.cardRef) { if (this.cardRef.offsetWidth !== this.state.cardwidth || this.cardRef.offsetHeight !== this.state.cardheight) { this.setState({ cardwidth: this.cardRef.offsetWidth, @@ -437,7 +437,7 @@ </ul> : null } </div> - {card.insert === 'true' ? + {card.extraAction ? <div className={'ant-card chart-card chart-card-insert' + outclass} style={{ width: cardwidth, height: cardheight }} > <Icon type="plus" style={cardwidth > cardheight ? {fontSize: cardheight / 2 + 'px', lineHeight: cardheight + 'px'} : {fontSize: cardwidth / 2 + 'px', lineHeight: cardheight + 'px'}} /> </div> : null diff --git a/src/templates/sharecomponent/cardcomponent/index.scss b/src/templates/sharecomponent/cardcomponent/index.scss index 1e5a274..e295051 100644 --- a/src/templates/sharecomponent/cardcomponent/index.scss +++ b/src/templates/sharecomponent/cardcomponent/index.scss @@ -30,7 +30,7 @@ .chart-card-insert { text-align: center; i { - color: #26C281; + color: #1890ff; } } diff --git a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx index 6d1a5b7..e530784 100644 --- a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx +++ b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx @@ -224,7 +224,7 @@ item.hidden = false } else if (item.key === 'switch' && _type === 'card') { item.hidden = false - } else if (item.key === 'insert') { + } else if (item.key === 'extraAction') { item.hidden = _type !== 'card' } else if (item.key === 'bgfield') { item.hidden = _type !== 'card' @@ -280,7 +280,7 @@ item.hidden = false } else if (item.key === 'switch' && value === 'card') { item.hidden = false - } else if (item.key === 'insert') { + } else if (item.key === 'extraAction') { item.hidden = value !== 'card' } else if (item.key === 'bgfield') { item.hidden = value !== 'card' @@ -401,7 +401,12 @@ } else if (item.type === 'select') { // 涓嬫媺鎼滅储 fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <Form.Item label={item.tooltip ? + <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> + <Icon type="question-circle" /> + {item.label} + </Tooltip> : item.label + }> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -462,7 +467,12 @@ } else if (item.type === 'multiselect') { // 澶氶�� fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <Form.Item label={item.tooltip ? + <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> + <Icon type="question-circle" /> + {item.label} + </Tooltip> : item.label + }> {getFieldDecorator(item.key, { initialValue: item.initVal || [] })( diff --git a/src/templates/sharecomponent/chartgroupcomponent/index.jsx b/src/templates/sharecomponent/chartgroupcomponent/index.jsx index 8650363..82b4a90 100644 --- a/src/templates/sharecomponent/chartgroupcomponent/index.jsx +++ b/src/templates/sharecomponent/chartgroupcomponent/index.jsx @@ -138,10 +138,17 @@ item.actions = item.actions.filter(cell => keys.includes(cell)) } + let extraActions = config.action.filter(item => ['pop', 'prompt', 'exec'].includes(item.OpenType) && item.Ot === 'notRequired') + extraActions = extraActions.map(cell => ({value: cell.uuid, text: cell.label})) + + if (item.extraAction && extraActions.filter(cell => cell.uuid === item.extraAction).length === 0) { + item.extraAction = '' + } + this.setState({ card: item, modaltype: _type, - formlist: getChartViewForm(item, this.props.sysRoles, _columns, actions) + formlist: getChartViewForm(item, this.props.sysRoles, _columns, actions, extraActions) }) } diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index c0774c5..fc2a31e 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -1576,12 +1576,13 @@ /** * @description 鑾峰彇鍥捐〃瑙嗗浘澶栭儴閰嶇疆琛ㄥ崟 - * @param {object} card // 鎼滅储鏉′欢瀵硅薄 - * @param {Array} roleList // 瑙掕壊鍒楄〃-榛戝悕鍗� - * @param {Array} columns // 鏄剧ず鍒� - * @param {Array} actions // 鎸夐挳缁� + * @param {object} card // 鎼滅储鏉′欢瀵硅薄 + * @param {Array} roleList // 瑙掕壊鍒楄〃-榛戝悕鍗� + * @param {Array} columns // 鏄剧ず鍒� + * @param {Array} actions // 鎸夐挳缁別xcel + * @param {Array} extraActions // 甯歌鎸夐挳 */ -export function getChartViewForm (card, roleList = [], _columns, actions) { +export function getChartViewForm (card, roleList = [], _columns, actions, extraActions) { let _charts = [{ value: 'line', text: '鎶樼嚎鍥�' @@ -1739,19 +1740,13 @@ }] }, { - type: 'radio', - key: 'insert', - label: '娣诲姞鍗$墖', - initVal: card.insert || 'false', - tooltip: '閫夋嫨鏄剧ず娣诲姞鍗$墖锛屼笖瀛樺湪鎿嶄綔绫诲瀷涓烘坊鍔犵殑鎸夐挳鏃讹紝鍗$墖灏鹃儴浼氬鍔犳坊鍔犲姛鑳藉崱鐗囷紙鍙樉绀虹涓�涓坊鍔犳寜閽級', + type: 'select', + key: 'extraAction', + label: '鎵╁睍鍗$墖', + initVal: card.extraAction || '', + tooltip: '缁戝畾涓嶉�夎鐨勬寜閽紝鍗$墖灏鹃儴浼氬鍔犲姛鑳藉崱鐗�', required: false, - options: [{ - value: 'true', - text: '鏄剧ず' - }, { - value: 'false', - text: '闅愯棌' - }] + options: extraActions }, { type: 'multiselect', @@ -1764,8 +1759,9 @@ { type: 'multiselect', key: 'actions', - label: '鎸夐挳缁�', + label: '鎵╁睍鎸夐挳', initVal: card.actions || [], + tooltip: '鍙粦瀹氬凡鏈夌殑excel瀵煎叆銆佸鍑烘寜閽�', required: false, options: actions } -- Gitblit v1.8.0