From b0c7a660750a8b29e7f8b3a648296d56c50fd2ca Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 29 十一月 2022 18:43:10 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/treepage/index.jsx | 6 src/views/design/index.jsx | 2 src/menu/datasource/verifycard/utils.jsx | 10 src/tabviews/formtab/index.jsx | 29 - src/mob/components/sharecode/options.jsx | 58 ++++ src/mob/mobshell/index.jsx | 1 src/assets/mobimg/share.jpg | 0 src/mob/modulesource/option.jsx | 2 src/templates/zshare/verifycard/customscript/index.jsx | 2 src/views/design/header/editfirstmenu/index.jsx | 8 src/tabviews/calendar/index.jsx | 5 src/tabviews/zshare/actionList/excelInbutton/index.jsx | 81 +++++ src/components/mkIcon/index.scss | 38 ++ src/menu/components/share/actioncomponent/dragaction/index.jsx | 2 src/views/billprint/index.scss | 3 src/templates/zshare/verifycard/customform/index.jsx | 16 + src/menu/components/form/formaction/index.jsx | 2 src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx | 2 src/views/billprint/index.jsx | 1 src/tabviews/custom/components/form/simple-form/index.jsx | 3 src/tabviews/subtable/index.jsx | 6 src/tabviews/subtabtable/index.jsx | 6 src/tabviews/zshare/actionList/normalbutton/index.jsx | 190 +++++++++----- src/views/design/sidemenu/editthdmenu/index.jsx | 8 src/components/mk-icon/index.jsx | 14 src/mob/mobshell/card.jsx | 3 src/menu/datasource/verifycard/index.jsx | 5 src/tabviews/custom/components/form/tab-form/index.jsx | 3 src/views/design/sidemenu/editsecmenu/index.jsx | 5 src/tabviews/custom/components/table/normal-table/index.jsx | 4 src/templates/zshare/verifycard/index.jsx | 10 src/mob/components/sharecode/index.jsx | 129 +++++++++ src/components/mkIcon/index.jsx | 74 ++++ src/tabviews/zshare/mutilform/index.jsx | 5 src/mob/components/menubar/normal-menubar/index.scss | 7 src/tabviews/custom/components/form/step-form/index.jsx | 3 src/mob/components/sharecode/index.scss | 35 ++ 37 files changed, 603 insertions(+), 175 deletions(-) diff --git a/src/assets/mobimg/share.jpg b/src/assets/mobimg/share.jpg new file mode 100644 index 0000000..41d3bc6 --- /dev/null +++ b/src/assets/mobimg/share.jpg Binary files differ diff --git a/src/components/mk-icon/index.jsx b/src/components/mk-icon/index.jsx index 9fff348..bb8a2ee 100644 --- a/src/components/mk-icon/index.jsx +++ b/src/components/mk-icon/index.jsx @@ -464,11 +464,15 @@ render() { const { type, ...resProps } = this.props - if (!type || !MkIcons[type]) return null - - return ( - MkIcons[type](resProps) - ) + if (!type) { + return null + } else if (MkIcons[type]) { + return ( + MkIcons[type](resProps) + ) + } else { + return <span className={'anticon ' + (resProps.className || '')} style={resProps.style || null} dangerouslySetInnerHTML={{ __html: type }}></span> + } } } export default MkIcon \ No newline at end of file diff --git a/src/components/mkIcon/index.jsx b/src/components/mkIcon/index.jsx index dcb0684..0447f06 100644 --- a/src/components/mkIcon/index.jsx +++ b/src/components/mkIcon/index.jsx @@ -1,13 +1,15 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Modal, Row, Col, Button } from 'antd' -import { CloseCircleFilled } from '@ant-design/icons' +import { Modal, Row, Col, Button, Tabs, notification } from 'antd' +import { CloseCircleFilled, RedoOutlined } from '@ant-design/icons' +import Api from '@/api' import { minkeIconSystem } from '@/utils/option.js' import MkIcon from '@/components/mk-icon' import './index.scss' +const { TabPane } = Tabs // ['direction', 'edit', 'normal', 'data', 'hint'] class MkEditIcon extends Component { @@ -19,6 +21,7 @@ selectIcon: '', allowClear: false, icons: [], + cusicons: [], visible: false } @@ -42,6 +45,16 @@ this.setState({selectIcon: val, allowClear: this.props.allowClear === true, icons}) } + componentDidMount() { + if (!window.GLOB.designView) { + if (sessionStorage.getItem('systemIcons')) { + this.setState({cusicons: JSON.parse(sessionStorage.getItem('systemIcons'))}) + } else { + this.getIcons() + } + } + } + shouldComponentUpdate (nextProps, nextState) { return !is(fromJS(this.state), fromJS(nextState)) } @@ -51,8 +64,33 @@ this.props.onChange(val) } + getIcons = () => { + Api.getSystemConfig({ func: 's_get_icons' }).then(res => { + if (!res.status) { + notification.warning({ + top: 92, + message: res.message, + duration: 5 + }) + sessionStorage.setItem('systemIcons', JSON.stringify([])) + return + } else if (!res.data) { + return + } + + let icons = res.data.map(item => { + item.icon_svg = window.decodeURIComponent(window.atob(item.icon_svg)) + return item + }) + + sessionStorage.setItem('systemIcons', JSON.stringify(icons)) + + this.setState({cusicons: icons}) + }) + } + render() { - const { selectIcon, visible, icons, allowClear } = this.state + const { selectIcon, visible, icons, allowClear, cusicons } = this.state return ( <div className="mk-icon-box"> @@ -60,8 +98,8 @@ <MkIcon className="trigger" onClick={() => this.setState({visible: true})} type="swap"/> {allowClear && selectIcon ? <CloseCircleFilled className="close" onClick={() => this.checkIcon('')}/> : null} <Modal - wrapClassName="popview-modal mk-icon-wrap" - title={'鍥炬爣閫夋嫨'} + wrapClassName="mk-pop-modal mk-icon-wrap" + // title={'鍥炬爣閫夋嫨'} visible={visible} width={800} maskClosable={false} @@ -71,11 +109,27 @@ ]} destroyOnClose > - <Row> - {icons.map(icon => <Col className={icon === selectIcon ? 'active' : ''} key={icon} span={4}> - <MkIcon onClick={() => this.checkIcon(icon)} type={icon} /> - </Col>)} - </Row> + <Tabs className={cusicons.length > 0 ? 'dubble-tabs' : ''}> + <TabPane tab="绯荤粺" key="setting"> + <Row> + {icons.map(icon => <Col className={icon === selectIcon ? 'active' : ''} key={icon} span={4}> + <MkIcon onClick={() => this.checkIcon(icon)} type={icon} /> + </Col>)} + </Row> + </TabPane> + <TabPane tab={ + <span className="tab-control"> + <RedoOutlined onClick={(e) => {this.getIcons()}}/> + 鑷畾涔� + </span> + } key="scripts"> + <Row> + {cusicons.map(icon => <Col key={icon.id} span={4} onClick={() => this.checkIcon(icon.icon_svg)}> + <MkIcon type={icon.icon_svg} /> + </Col>)} + </Row> + </TabPane> + </Tabs> </Modal> </div> ) diff --git a/src/components/mkIcon/index.scss b/src/components/mkIcon/index.scss index ebbd502..9338b1b 100644 --- a/src/components/mkIcon/index.scss +++ b/src/components/mkIcon/index.scss @@ -49,9 +49,6 @@ clear: both; } .mk-icon-wrap { - .ant-modal { - top: 50px!important; - } .ant-col { text-align: center; line-height: 55px; @@ -65,4 +62,39 @@ color: #1890ff; } } + .tab-control { + position: relative; + .anticon-redo { + display: none; + position: absolute; + left: -20px; + top: 0px; + } + } + .ant-tabs-tab-active.ant-tabs-tab { + .tab-control { + .anticon-redo { + display: inline-block; + } + } + } + .ant-tabs-nav .ant-tabs-tab { + padding: 12px 20px; + } + .ant-tabs-top.dubble-tabs { + .ant-tabs-bar { + padding-top: 10px!important; + } + } + .ant-tabs-top:not(.dubble-tabs) { + .ant-tabs-top-bar { + border-bottom: 0px; + .ant-tabs-nav-container { + display: none; + } + } + .ant-tabs-content { + max-height: calc(100vh - 180px)!important; + } + } } diff --git a/src/menu/components/form/formaction/index.jsx b/src/menu/components/form/formaction/index.jsx index 57d9865..50fae57 100644 --- a/src/menu/components/form/formaction/index.jsx +++ b/src/menu/components/form/formaction/index.jsx @@ -63,6 +63,8 @@ group.subButton.style = style } else if (card.type === 'next') { group.nextButton.style = style + } else if (card.type === 'close') { + group.closeButton.style = style } this.props.updateconfig(group) diff --git a/src/menu/components/share/actioncomponent/dragaction/index.jsx b/src/menu/components/share/actioncomponent/dragaction/index.jsx index b59ac72..73abf27 100644 --- a/src/menu/components/share/actioncomponent/dragaction/index.jsx +++ b/src/menu/components/share/actioncomponent/dragaction/index.jsx @@ -114,7 +114,7 @@ newcard.focus = true newcard.label = 'button' newcard.verify = null - newcard.show = 'link' + newcard.show = 'button' newcard.Ot = 'requiredSgl' newcard.OpenType = item.value newcard.class = 'primary' diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx index 59ae132..507b1ed 100644 --- a/src/menu/datasource/verifycard/index.jsx +++ b/src/menu/datasource/verifycard/index.jsx @@ -595,6 +595,11 @@ return } + if (change && columns.length === 0) { + reject() + return + } + if ((setting.interType === 'system' && setting.execute !== 'false') || _scripts.length > 0) { let timestamp = moment().format('YYYY-MM-DD HH:mm:ss') let r = SettingUtils.getDebugSql(setting, _scripts, columns, searches, defaultSearch, timestamp) diff --git a/src/menu/datasource/verifycard/utils.jsx b/src/menu/datasource/verifycard/utils.jsx index d4145df..06c8b82 100644 --- a/src/menu/datasource/verifycard/utils.jsx +++ b/src/menu/datasource/verifycard/utils.jsx @@ -22,6 +22,10 @@ }) } + if (!arr_field) { + arr_field = '*' + } + if (setting.interType === 'system' && setting.execute !== 'false') { _dataresource = setting.dataresource || '' } @@ -161,7 +165,7 @@ let sumSql = '' - if (arr_field && _dataresource && /\/\*\$sum@/ig.test(_dataresource)) { + if (_dataresource && /\/\*\$sum@/ig.test(_dataresource)) { let _sql = _dataresource.replace(/\/\*\$sum@|@sum\$\*\//ig, '') _sql = `/*system_query*/${_sql} ${_search}` if (_customScript) { @@ -180,7 +184,7 @@ } // 鏁版嵁婧愬鐞�, 瀛樺湪鏄剧ず鍒楁椂 - if (arr_field && _dataresource) { + if (_dataresource) { if (/\s/.test(_dataresource)) { _dataresource = '(' + _dataresource + ') tb' } @@ -234,7 +238,7 @@ sumSql = sumSql.replace(/\n/g, ' ') } sql = sql.replace(/\n/g, ' ') - + return { error, sql, sumSql, errors: errors.join('锛�') } } } \ No newline at end of file diff --git a/src/mob/components/menubar/normal-menubar/index.scss b/src/mob/components/menubar/normal-menubar/index.scss index 8732c16..e8b3434 100644 --- a/src/mob/components/menubar/normal-menubar/index.scss +++ b/src/mob/components/menubar/normal-menubar/index.scss @@ -89,6 +89,13 @@ } } } + .grid-layout { + >.ant-col { + display: inline-block; + float: none; + vertical-align: top; + } + } } .menu-menubar-edit-box::after { display: block; diff --git a/src/mob/components/sharecode/index.jsx b/src/mob/components/sharecode/index.jsx new file mode 100644 index 0000000..c06ef33 --- /dev/null +++ b/src/mob/components/sharecode/index.jsx @@ -0,0 +1,129 @@ +import React, { Component } from 'react' +import PropTypes from 'prop-types' +import { is, fromJS } from 'immutable' +import { Popover } from 'antd' +import { ToolOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined } from '@ant-design/icons' + +import { resetStyle } from '@/utils/utils-custom.js' +import asyncIconComponent from '@/utils/asyncIconComponent' +import getWrapForm from './options' +import MKEmitter from '@/utils/events.js' +import ShareImg from '@/assets/mobimg/share.jpg' +import './index.scss' + +const NormalForm = asyncIconComponent(() => import('@/components/normalform')) + +class ShareComponent extends Component { + static propTpyes = { + card: PropTypes.object, + updateConfig: PropTypes.func, + deletecomponent: PropTypes.func + } + + state = {} + + /** + * @description 鎼滅储鏉′欢鍒濆鍖� + */ + UNSAFE_componentWillMount () { + const { card } = this.props + + if (card.isNew) { + let _card = { + uuid: card.uuid, + type: card.type, + width: 24, + name: card.name, + subtype: card.subtype, + wrap: { name: card.name, width: 24 }, + style: {marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px', paddingLeft: '20px', paddingRight: '20px', paddingTop: '20px', paddingBottom: '20px'} + } + this.setState({ + card: _card + }) + this.props.updateConfig(_card) + } else { + this.setState({ + card: fromJS(card).toJS() + }) + } + } + + /** + * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊 + */ + componentWillUnmount () { + this.setState = () => { + return + } + } + + shouldComponentUpdate (nextProps, nextState) { + return !is(fromJS(this.state), fromJS(nextState)) + } + + getStyle = (style) => { + let _card = {...this.state.card, style} + + this.setState({ + card: _card + }) + + this.props.updateConfig(_card) + } + + changeStyle = () => { + const { card } = this.state + + MKEmitter.emit('changeStyle', ['border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) + } + + /** + * @description 鍗$墖琛屽灞備俊鎭洿鏂帮紙鏁版嵁婧愶紝鏍峰紡绛夛級 + */ + updateComponent = (component) => { + this.setState({ + card: component + }) + + component.width = component.wrap.width + component.name = component.wrap.name + + this.props.updateConfig(component) + } + + getWrapForms = () => { + const { wrap } = this.state.card + + return getWrapForm(wrap) + } + + updateWrap = (res) => { + this.updateComponent({...this.state.card, wrap: res}) + } + + render() { + const { card } = this.state + let _style = resetStyle(card.style) + + return ( + <div className="share-wrap" id={card.uuid} style={_style}> + <div className="share-image" style={{backgroundImage: `url('${ShareImg}')`}}></div> + <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ + <div className="mk-popover-control"> + <NormalForm title="璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}> + <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/> + </NormalForm> + <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/> + <DeleteOutlined className="close" onClick={() => this.props.deletecomponent(card.uuid)} /> + </div> + } trigger="hover"> + <ToolOutlined /> + </Popover> + <div className="component-name"><div className="center">{card.name}</div></div> + </div> + ) + } +} + +export default ShareComponent \ No newline at end of file diff --git a/src/mob/components/sharecode/index.scss b/src/mob/components/sharecode/index.scss new file mode 100644 index 0000000..80e707c --- /dev/null +++ b/src/mob/components/sharecode/index.scss @@ -0,0 +1,35 @@ +.share-wrap { + min-height: 84px; + position: relative; + background: #ffffff; + overflow: hidden; + + >.anticon-tool { + position: absolute; + z-index: 3; + font-size: 16px; + right: 1px; + top: 1px; + cursor: pointer; + padding: 5px; + background: rgba(255, 255, 255, 0.55); + } + .share-image { + background: #ffffff; + overflow: hidden; + background-repeat: no-repeat; + background-size: cover; + background-position: center; + padding-top: 100%; + } +} + +.share-wrap::after { + display: block; + content: ' '; + clear: both; +} +.share-wrap:hover { + z-index: 1; + box-shadow: 0px 0px 4px #1890ff; +} \ No newline at end of file diff --git a/src/mob/components/sharecode/options.jsx b/src/mob/components/sharecode/options.jsx new file mode 100644 index 0000000..4efeeed --- /dev/null +++ b/src/mob/components/sharecode/options.jsx @@ -0,0 +1,58 @@ +/** + * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 + */ +export default function (wrap) { + let menulist = sessionStorage.getItem('appMenus') + + if (menulist) { + try { + menulist = JSON.parse(menulist) + } catch (e) { + menulist = [] + } + } else { + menulist = [] + } + + 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: 'select', + field: 'linkMenuId', + label: '鍏宠仈鑿滃崟', + initval: wrap.linkMenuId || '', + tooltip: '鍙嚜瀹氫箟鍒嗕韩鑿滃崟锛岀┖鍊兼椂涓哄綋鍓嶉〉闈€��', + required: false, + options: menulist + }, + { + type: 'color', + field: 'color', + label: '棰滆壊', + initval: wrap.color || '#000000', + tooltip: '灏忕▼搴忎腑鏃犳晥銆�', + isHex: true, + required: true + }, + ] + + return wrapForm +} \ No newline at end of file diff --git a/src/mob/mobshell/card.jsx b/src/mob/mobshell/card.jsx index b0c4f65..517db7f 100644 --- a/src/mob/mobshell/card.jsx +++ b/src/mob/mobshell/card.jsx @@ -30,6 +30,7 @@ const Balcony = asyncComponent(() => import('@/menu/components/card/balcony')) const Timeline = asyncComponent(() => import('@/menu/components/timeline/normal-timeline')) const OfficialAccount = asyncComponent(() => import('@/mob/components/official')) +const ShareCode = asyncComponent(() => import('@/mob/components/sharecode')) const Iframe = asyncComponent(() => import('@/menu/components/iframe')) const Card = ({ id, card, moveCard, findCard, delCard, updateConfig }) => { @@ -142,6 +143,8 @@ return (<OfficialAccount card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) } else if (card.type === 'iframe') { return (<Iframe card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) + } else if (card.type === 'sharecode') { + return (<ShareCode card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) } } diff --git a/src/mob/mobshell/index.jsx b/src/mob/mobshell/index.jsx index 2581edb..028e209 100644 --- a/src/mob/mobshell/index.jsx +++ b/src/mob/mobshell/index.jsx @@ -142,6 +142,7 @@ balcony: '娴姩鍗�', timeline: '鏃堕棿杞�', officialAccount: '鍏虫敞鍏紬鍙�', + sharecode: '鍒嗕韩鐮�', login: '鐧诲綍' } let i = 1 diff --git a/src/mob/modulesource/option.jsx b/src/mob/modulesource/option.jsx index 7e35a6b..1fc604b 100644 --- a/src/mob/modulesource/option.jsx +++ b/src/mob/modulesource/option.jsx @@ -28,6 +28,7 @@ import timeline from '@/assets/mobimg/timeline.png' import officialAccount from '@/assets/mobimg/guanzhu.jpg' import Iframe from '@/assets/img/newpage.jpg' +import Share from '@/assets/mobimg/share.jpg' // 缁勪欢閰嶇疆淇℃伅 export const menuOptions = [ @@ -62,5 +63,6 @@ { type: 'menu', url: group, component: 'group', subtype: 'normalgroup', title: '鍒嗙粍', width: 24 }, { type: 'menu', url: Login, component: 'login', subtype: 'normallogin', title: '娉ㄥ唽/鐧诲綍', width: 24 }, { type: 'menu', url: officialAccount, component: 'officialAccount', subtype: 'officialAccount', title: '鍏虫敞鍏紬鍙凤紙灏忕▼搴忎腑锛�', width: 24, adapter: 'mini' }, + { type: 'menu', url: Share, component: 'sharecode', subtype: 'sharecode', title: '鍒嗕韩鐮�', width: 24 }, { type: 'menu', url: Iframe, component: 'iframe', subtype: 'iframe', title: 'iframe', width: 24 } ] diff --git a/src/tabviews/calendar/index.jsx b/src/tabviews/calendar/index.jsx index 6eda2ef..7dec056 100644 --- a/src/tabviews/calendar/index.jsx +++ b/src/tabviews/calendar/index.jsx @@ -104,11 +104,6 @@ } // 鏉冮檺杩囨护 - if (!window.GLOB.mkHS) { - if (config.tab && !window.GLOB.mkActions[config.tab.linkTab]) { - config.tab = null - } - } if (config.tab) { config.tab.uuid = Utils.getuuid() } diff --git a/src/tabviews/custom/components/form/simple-form/index.jsx b/src/tabviews/custom/components/form/simple-form/index.jsx index 00ca0ca..b29ce9c 100644 --- a/src/tabviews/custom/components/form/simple-form/index.jsx +++ b/src/tabviews/custom/components/form/simple-form/index.jsx @@ -288,8 +288,6 @@ render() { const { config, loading, BID, BData, data, group, dict } = this.state - if (config.setting.supModule && !BID) return null - return ( <div className="custom-simple-form-box" id={'anchor' + config.uuid} style={{...config.style}}> {loading ? @@ -305,6 +303,7 @@ dict={dict} data={data} action={group} + unload={config.setting.supModule && !BID} inputSubmit={() => this.mkFormSubmit(group.uuid)} wrappedComponentRef={(inst) => this.formRef = inst} /> : null} diff --git a/src/tabviews/custom/components/form/step-form/index.jsx b/src/tabviews/custom/components/form/step-form/index.jsx index 4fdc3f0..c5c8315 100644 --- a/src/tabviews/custom/components/form/step-form/index.jsx +++ b/src/tabviews/custom/components/form/step-form/index.jsx @@ -380,8 +380,6 @@ render() { const { config, loading, BID, BData, data, group, dict, step } = this.state - if (config.setting.supModule && !BID) return null - return ( <div className="custom-normal-form-box" id={'anchor' + config.uuid} style={{...config.style}}> {loading ? @@ -406,6 +404,7 @@ dict={dict} data={data} action={group} + unload={config.setting.supModule && !BID} inputSubmit={() => this.mkFormSubmit(group.uuid)} wrappedComponentRef={(inst) => this.formRef = inst} /> : null} diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx index 519040b..66e5dd2 100644 --- a/src/tabviews/custom/components/form/tab-form/index.jsx +++ b/src/tabviews/custom/components/form/tab-form/index.jsx @@ -300,8 +300,6 @@ render() { const { config, loading, BID, BData, data, group, dict } = this.state - if (config.setting.supModule && !BID) return null - return ( <div className="custom-tab-form-box" id={'anchor' + config.uuid} style={{...config.style}}> {loading ? @@ -323,6 +321,7 @@ dict={dict} data={data} action={group} + unload={config.setting.supModule && !BID} inputSubmit={() => this.mkFormSubmit(group.uuid)} wrappedComponentRef={(inst) => this.formRef = inst} /> : null} diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx index d95478b..9349ff3 100644 --- a/src/tabviews/custom/components/table/normal-table/index.jsx +++ b/src/tabviews/custom/components/table/normal-table/index.jsx @@ -714,7 +714,7 @@ BData={BData} columns={config.columns} selectedData={selectedData} - /> : <div style={{height: '25px'}}></div>} + /> : <div className="mk-action-space" style={{height: '25px'}}></div>} <div className="main-table-box"> <MainTable setting={setting} @@ -743,7 +743,7 @@ BData={BData} columns={config.columns} selectedData={selectedData} - /> : <div style={{height: '15px'}}></div>} + /> : <div className="mk-action-space" style={{height: '25px'}}></div>} <div className={'main-table-box ' + (!actions || actions.length === 0 ? 'no-action' : '')}> <MainTable setting={setting} diff --git a/src/tabviews/formtab/index.jsx b/src/tabviews/formtab/index.jsx index d5dab3d..98691d1 100644 --- a/src/tabviews/formtab/index.jsx +++ b/src/tabviews/formtab/index.jsx @@ -102,28 +102,15 @@ config.tabgroups = _tabgroups } - if (!window.GLOB.mkHS) { - config.action = config.action.filter(item => window.GLOB.mkActions[item.uuid]) - config.tabgroups.forEach(group => { - group.sublist = group.sublist.filter(tab => { - if (tab.supMenu === 'mainTable') { - tab.supMenu = MenuID - } - tab.ContainerId = this.state.ContainerId - return window.GLOB.mkActions[tab.linkTab] - }) + config.tabgroups.forEach(group => { + group.sublist = group.sublist.map(tab => { + if (tab.supMenu === 'mainTable') { + tab.supMenu = MenuID + } + tab.ContainerId = this.state.ContainerId + return tab }) - } else { - config.tabgroups.forEach(group => { - group.sublist = group.sublist.filter(tab => { - if (tab.supMenu === 'mainTable') { - tab.supMenu = MenuID - } - tab.ContainerId = this.state.ContainerId - return true - }) - }) - } + }) // 鎸夐挳绫诲瀷鍏煎 config.action = config.action.map(item => { diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index 51ebb7b..b261601 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -134,11 +134,7 @@ config = updateSubTable(config) // 鏉冮檺杩囨护 - if (!window.GLOB.mkHS) { - config.action = config.action.filter(item => item.hidden !== 'true' && window.GLOB.mkActions[item.uuid]) - } else { - config.action = config.action.filter(item => item.hidden !== 'true') - } + config.action = config.action.filter(item => item.hidden !== 'true') config.search = Utils.initSearchVal(config.search) diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx index 9ef2fed..154233c 100644 --- a/src/tabviews/subtabtable/index.jsx +++ b/src/tabviews/subtabtable/index.jsx @@ -127,11 +127,7 @@ } // 鏉冮檺杩囨护 - if (!window.GLOB.mkHS) { - config.action = config.action.filter(item => item.hidden !== 'true' && window.GLOB.mkActions[item.uuid]) - } else { - config.action = config.action.filter(item => item.hidden !== 'true') - } + config.action = config.action.filter(item => item.hidden !== 'true') config.search = Utils.initSearchVal(config.search) diff --git a/src/tabviews/treepage/index.jsx b/src/tabviews/treepage/index.jsx index 11e2f0b..29bc25e 100644 --- a/src/tabviews/treepage/index.jsx +++ b/src/tabviews/treepage/index.jsx @@ -115,7 +115,7 @@ // 鏉冮檺杩囨护 config.tabgroups.forEach(group => { - group.sublist = group.sublist.filter(tab => { + group.sublist = group.sublist.map(tab => { if (tab.supMenu === 'mainTable' || (!tab.supMenu && tab.level === 0)) { tab.isTreeNode = true } @@ -124,8 +124,8 @@ } tab.ContainerId = this.state.ContainerId - return window.GLOB.mkActions[tab.linkTab]} - ) + return tab + }) }) let _tabgroups = [] diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx index 97a19f4..09ee076 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx @@ -14,6 +14,8 @@ import MkIcon from '@/components/mk-icon' // import './index.scss' +const { confirm } = Modal + class ExcelInButton extends Component { static propTpyes = { BID: PropTypes.string, // 涓昏〃ID @@ -337,29 +339,86 @@ param.excel_in_type = 'true' param.LText1 = Utils.formatOptions(result.insert) - param.LText2 = Utils.formatOptions(result.bottom) - param.LText = Utils.formatOptions(result.sql) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + param.LText2 = result.bottom + param.LText = result.sql + + let unCheckParam = null + + if (/\$check@|@check\$/ig.test(param.LText2) || /\$check@|@check\$/ig.test(param.LText)) { + unCheckParam = fromJS(param).toJS() + param.LText = param.LText.replace(/\$check@|@check\$/ig, '') + param.LText2 = param.LText2.replace(/\$check@|@check\$/ig, '') + } + + param.LText2 = Utils.formatOptions(param.LText2) + param.LText = Utils.formatOptions(param.LText) param.secretkey = Utils.encrypt(param.LText, param.timestamp) if (window.GLOB.mkHS && param.timestamp) { // 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } param.menuname = btn.logLabel - + if (window.GLOB.probation) { param.s_debug_type = 'Y' } - Api.genericInterface(param).then((res) => { - if (res.status) { - this.execSuccess(res) - } else { - this.execError(res) + if (unCheckParam) { + unCheckParam.LText = unCheckParam.LText.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/') + unCheckParam.LText = Utils.formatOptions(unCheckParam.LText) + unCheckParam.LText2 = unCheckParam.LText2.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/') + unCheckParam.LText2 = Utils.formatOptions(unCheckParam.LText2) + + unCheckParam.secretkey = Utils.encrypt(unCheckParam.LText, unCheckParam.timestamp) + + unCheckParam.menuname = btn.logLabel + + if (window.GLOB.probation) { + unCheckParam.s_debug_type = 'Y' } - }, () => { - this.execError({}) - }) + + Api.genericInterface(param).then(res => { + if (res.status) { + this.execSuccess(res) + } else if (res.ErrCode === 'C') { + const _this = this + confirm({ + title: '缁х画鎵ц锛�', + content: res.message, + onOk() { + return new Promise(resolve => { + Api.genericInterface(unCheckParam).then(result => { + if (result.status) { + _this.execSuccess(result) + } else { + _this.execError(result) + } + resolve() + }) + }) + }, + onCancel() { + _this.execError(res) + } + }) + } else { + this.execError(res) + } + }, () => { + this.execError({}) + }) + } else { + Api.genericInterface(param).then((res) => { + if (res.status) { + this.execSuccess(res) + } else { + this.execError(res) + } + }, () => { + this.execError({}) + }) + } } else if (btn.intertype === 'inner' && btn.innerFunc) { // 鑷畾涔夊瓨鍌ㄨ繃绋� param.func = btn.innerFunc diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index bdbd6f8..7b6b06b 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -42,7 +42,6 @@ loadingTotal: '', disabled: false, hidden: false, - checkParam: null, autoMatic: false, check: false } @@ -402,7 +401,6 @@ let param = { // 绯荤粺瀛樺偍杩囩▼ func: 'sPC_TableData_InUpDe' } - let check_param = null if (this.props.BID) { param.BID = this.props.BID @@ -442,11 +440,9 @@ param.secretkey = Utils.encrypt('', param.timestamp) if (/\$check@|@check\$/ig.test(param.LText)) { - check_param = fromJS(param).toJS() - check_param.LText = check_param.LText.replace(/\$check@/ig, '/*') - check_param.LText = check_param.LText.replace(/@check\$/ig, '*/') - check_param.LText = Utils.formatOptions(check_param.LText) - + if (btn.intertype === 'system') { + param.$unCheckParam = fromJS(param).toJS() + } param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } @@ -487,11 +483,9 @@ param.secretkey = Utils.encrypt('', param.timestamp) if (/\$check@|@check\$/ig.test(param.LText)) { - check_param = fromJS(param).toJS() - check_param.LText = check_param.LText.replace(/\$check@/ig, '/*') - check_param.LText = check_param.LText.replace(/@check\$/ig, '*/') - check_param.LText = Utils.formatOptions(check_param.LText) - + if (btn.intertype === 'system') { + param.$unCheckParam = fromJS(param).toJS() + } param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } @@ -522,11 +516,9 @@ param.secretkey = Utils.encrypt('', param.timestamp) if (/\$check@|@check\$/ig.test(param.LText)) { - check_param = fromJS(param).toJS() - check_param.LText = check_param.LText.replace(/\$check@/ig, '/*') - check_param.LText = check_param.LText.replace(/@check\$/ig, '*/') - check_param.LText = Utils.formatOptions(check_param.LText) - + if (btn.intertype === 'system') { + param.$unCheckParam = fromJS(param).toJS() + } param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } @@ -536,9 +528,6 @@ if (window.GLOB.mkHS) { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) - if (check_param) { - check_param.open_key = Utils.encryptOpenKey(check_param.secretkey, check_param.timestamp) - } } param.menuname = btn.logLabel @@ -547,13 +536,18 @@ param.s_debug_type = 'Y' } - if (check_param) { - check_param.menuname = btn.logLabel - this.setState({checkParam: check_param}) - } - if (window.GLOB.breakpoint) { param.func = 'sPC_TableData_InUpDe_debug' + } + + if (param.$unCheckParam) { + param.$unCheckParam.LText = param.$unCheckParam.LText.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/') + param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText) + param.$unCheckParam.menuname = btn.logLabel + + if (window.GLOB.probation) { + param.$unCheckParam.s_debug_type = 'Y' + } } _params.push(param) @@ -589,11 +583,18 @@ } else { param.LText = param.LText.replace(/@\$|\$@/ig, '') } - param.LText = param.LText.replace(/\$check@|@check\$/ig, '') param.exec_type = 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) + + if (/\$check@|@check\$/ig.test(param.LText)) { + if (btn.intertype === 'system') { + param.$unCheckParam = fromJS(param).toJS() + } + param.LText = param.LText.replace(/\$check@|@check\$/ig, '') + } + param.LText = Utils.formatOptions(param.LText) } else if (btn.OpenType === 'pop') { // 琛ㄥ崟 if (index !== 0) { @@ -629,11 +630,18 @@ } else { param.LText = param.LText.replace(/@\$|\$@/ig, '') } - param.LText = param.LText.replace(/\$check@|@check\$/ig, '') param.exec_type = 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) + + if (/\$check@|@check\$/ig.test(param.LText)) { + if (btn.intertype === 'system') { + param.$unCheckParam = fromJS(param).toJS() + } + param.LText = param.LText.replace(/\$check@|@check\$/ig, '') + } + param.LText = Utils.formatOptions(param.LText) } else { param.ID = primaryId @@ -655,11 +663,18 @@ } else { param.LText = param.LText.replace(/@\$|\$@/ig, '') } - param.LText = param.LText.replace(/\$check@|@check\$/ig, '') param.exec_type = 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) + + if (/\$check@|@check\$/ig.test(param.LText)) { + if (btn.intertype === 'system') { + param.$unCheckParam = fromJS(param).toJS() + } + param.LText = param.LText.replace(/\$check@|@check\$/ig, '') + } + param.LText = Utils.formatOptions(param.LText) } } @@ -675,6 +690,16 @@ if (window.GLOB.breakpoint) { param.func = 'sPC_TableData_InUpDe_debug' + } + + if (param.$unCheckParam) { + param.$unCheckParam.LText = param.$unCheckParam.LText.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/') + param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText) + param.$unCheckParam.menuname = btn.logLabel + + if (window.GLOB.probation) { + param.$unCheckParam.s_debug_type = 'Y' + } } return param @@ -995,7 +1020,9 @@ params = this.getInnerParam(data, formdata) } - if (params.length <= 20) { + if (params[0].$unCheckParam) { + this.checkLoopRequest(params, btn, _resolve) + } else if (params.length <= 20) { let deffers = params.map((param, i) => { return new Promise(resolve => { setTimeout(() => { @@ -1529,6 +1556,69 @@ } else { this.innerLoopRequest(params, btn, _resolve) } + } else { + this.execError(res) + _resolve() + } + }, () => { + this.updateStatus() + _resolve() + }) + } + + /** + * @description 鏁版嵁妫�楠屽惊鐜墽琛� + */ + checkLoopRequest = (params, btn, _resolve) => { + let param = params.shift() + let unCheckParam = param.$unCheckParam + + delete param.$unCheckParam + + this.setState({ + loadingNumber: params.length + }) + + Api.genericInterface(param).then(res => { + if (res.status) { + this.triggerNote(res) // 娑堟伅 + + if (params.length === 0) { + this.execSuccess(res) + _resolve() + } else { + this.checkLoopRequest(params, btn, _resolve) + } + } else if (res.ErrCode === 'C') { + const _this = this + confirm({ + title: '缁х画鎵ц锛�', + content: res.message, + onOk() { + return new Promise(resolve => { + Api.genericInterface(unCheckParam).then(result => { + if (result.status) { + _this.triggerNote(result) // 娑堟伅 + + if (params.length === 0) { + _this.execSuccess(result) + _resolve() + } else { + _this.checkLoopRequest(params, btn, _resolve) + } + } else { + _this.execError(res) + _resolve() + } + resolve() + }) + }) + }, + onCancel() { + _this.execError(res) + _resolve() + } + }) } else { this.execError(res) _resolve() @@ -2245,48 +2335,6 @@ loadingNumber: '', loadingTotal: '', }) - - if (res.ErrCode === 'C') { - const _this = this - if (this.state.checkParam) { - let param = this.state.checkParam - confirm({ - title: res.message || res.ErrMesg, - content: '缁х画鎵ц锛�', - onOk() { - return new Promise(resolve => { - Api.genericInterface(param).then((result) => { - if (result.status) { - _this.execSuccess(result) - } else { - _this.execError(result) - } - resolve() - }, () => { - _this.setState({ - visible: false - }) - resolve() - }) - }) - }, - onCancel() { - _this.setState({ - visible: false - }) - if (btn.execError !== 'never') { - MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines) - } - } - }) - this.setState({checkParam: null}) - return - } else { - Modal.error({ - title: res.message || res.ErrMesg, - }) - } - } if (btnconfig && btnconfig.setting && btnconfig.setting.errFocus) { MKEmitter.emit('mkFC', 'focus', btnconfig.setting.errFocus) diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 31e52f0..1f25c6c 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -35,6 +35,7 @@ data: PropTypes.any, // 琛ㄦ牸鏁版嵁 BID: PropTypes.any, // 涓昏〃ID BData: PropTypes.any, // 涓昏〃鏁版嵁 + unload: PropTypes.any, // 涓嬫媺鑿滃崟涓嶅姞杞芥暟鎹� inputSubmit: PropTypes.func // input鍥炶溅鎻愪氦 } @@ -45,7 +46,7 @@ record = {} componentDidMount () { - const { action } = this.props + const { action, unload } = this.props let data = {} let BData = {} @@ -506,6 +507,8 @@ this.record = record this.setState({ formlist }, () => { + if (unload) return + if (action.setting && action.setting.focus && fieldMap.has(action.setting.focus)) { setTimeout(() => { MKEmitter.emit('mkFC', 'focus', fieldMap.get(action.setting.focus).uuid) diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx index 31105a0..f288e7d 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx @@ -183,7 +183,7 @@ } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`) + param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/\$check@|@check\$/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`) param.LText = param.LText.replace(/\n/g, ' ') // 澶栬仈鏁版嵁搴撴浛鎹� diff --git a/src/templates/zshare/verifycard/customform/index.jsx b/src/templates/zshare/verifycard/customform/index.jsx index be0e47b..32a9516 100644 --- a/src/templates/zshare/verifycard/customform/index.jsx +++ b/src/templates/zshare/verifycard/customform/index.jsx @@ -106,8 +106,18 @@ let param = { func: 's_debug_sql', exec_type: 'y', - LText: this.props.initsql + values.sql } + + param.LText = `${this.props.initsql} + /* 鑷畾涔夐獙璇� */ + select @tbid='', @ErrorCode='',@retmsg='' + select top 1 @tbid='X' from (${values.sql}) a + If @tbid = '' + Begin + select @ErrorCode='${values.errorCode}',@retmsg='${values.errmsg}' + goto aaa + end + aaa: select @ErrorCode as ErrorCode,@retmsg as retmsg` if (window.GLOB.funcs && window.GLOB.funcs.length > 0) { window.GLOB.funcs.forEach(item => { @@ -126,8 +136,10 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`) + + console.info(`/* sql 楠岃瘉 */\n${param.LText.replace(/\n\s{10}/ig, '\n')}`) + param.LText = param.LText.replace(/\n/g, ' ') - param.LText = Utils.formatOptions(param.LText) param.secretkey = Utils.encrypt('', param.timestamp) diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx index 944c203..1f172d4 100644 --- a/src/templates/zshare/verifycard/customscript/index.jsx +++ b/src/templates/zshare/verifycard/customscript/index.jsx @@ -333,7 +333,7 @@ </Col> <Col span={24} className="sql"> <Form.Item label={ - <Tooltip placement="topLeft" overlayStyle={{width: '320px', maxWidth: '320px'}} title={<><div>{'璋冭瘯鏇挎崲绗� /*$breakpoint_begin_xxxx@ 銆丂breakpoint_end_xxxx$*/锛屽湪鎺у埗鍙颁腑杈撳叆 window.debug = \'xxxx\' 浼氬惎鐢ㄥ搴旂殑璋冭瘯璇彞锛屽揩鎹烽敭 ctrl+c 鎴栧湪鎺у埗鍙颁腑杈撳叆 window.debug = false 鍏抽棴璋冭瘯銆傛敞锛氳皟璇曟椂瀛楃 $breakpoint_proc@ 灏嗚鏇挎崲銆�'}</div><div style={{height: '5px'}}></div><div>{'鏁版嵁妫�鏌ユ浛鎹㈢ $check@ -> \'\'銆� @check$ -> \'\'锛孍rrorCode绛変簬C鏃� $check@ -> /*銆� @check$ -> */銆傛敞锛�1銆侀渶浣跨敤绯荤粺鎺ュ彛 2銆佽璁剧疆涓衡�滈�夋嫨澶氳鈥濇椂鏃犳晥銆�'}</div></>}> + <Tooltip placement="topLeft" overlayStyle={{width: '320px', maxWidth: '320px'}} title={<><div>{'璋冭瘯鏇挎崲绗� /*$breakpoint_begin_xxxx@ 銆丂breakpoint_end_xxxx$*/锛屽湪鎺у埗鍙颁腑杈撳叆 window.debug = \'xxxx\' 浼氬惎鐢ㄥ搴旂殑璋冭瘯璇彞锛屽揩鎹烽敭 ctrl+c 鎴栧湪鎺у埗鍙颁腑杈撳叆 window.debug = false 鍏抽棴璋冭瘯銆傛敞锛氳皟璇曟椂瀛楃 $breakpoint_proc@ 灏嗚鏇挎崲銆�'}</div><div style={{height: '5px'}}></div><div>{'鏁版嵁妫�鏌ユ浛鎹㈢ $check@ -> \'\'銆� @check$ -> \'\'锛孍rrorCode绛変簬C鏃朵細璇㈤棶鏄惁缁х画鎵ц锛岀‘瀹氭椂 $check@ -> /*銆� @check$ -> */銆傛敞锛�1銆侀渶浣跨敤绯荤粺鎺ュ彛 2銆佽璁剧疆涓衡�滈�夋嫨澶氳鈥濇椂鏃犳晥銆�'}</div></>}> <QuestionCircleOutlined className="mk-form-tip" /> sql </Tooltip> diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index c198cbb..8b7680b 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -664,8 +664,8 @@ resolve(_fields) } }).then(_fields => { - let _usefulfields = ['UserName', 'FullName', 'RoleID', 'mk_departmentcode', 'mk_organization', 'mk_user_type', 'mk_nation', 'mk_province', 'mk_city', 'mk_district', 'mk_address', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode'] - let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@RoleID nvarchar(512)', '@mk_departmentcode nvarchar(512)', '@mk_organization nvarchar(512)', '@mk_user_type nvarchar(20)', '@mk_nation nvarchar(50)', '@mk_province nvarchar(50)', '@mk_city nvarchar(50)', '@mk_district nvarchar(50)', '@mk_address nvarchar(100)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)', '@bid nvarchar(50)'] + let _usefulfields = ['UserName', 'FullName', 'RoleID', 'mk_departmentcode', 'mk_organization', 'mk_user_type', 'mk_nation', 'mk_province', 'mk_city', 'mk_district', 'mk_address', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode', 'tbid'] + let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@RoleID nvarchar(512)', '@mk_departmentcode nvarchar(512)', '@mk_organization nvarchar(512)', '@mk_user_type nvarchar(20)', '@mk_nation nvarchar(50)', '@mk_province nvarchar(50)', '@mk_city nvarchar(50)', '@mk_district nvarchar(50)', '@mk_address nvarchar(100)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)', '@bid nvarchar(50)', '@tbid nvarchar(50)'] let _select = ['@UserName=\'\'', '@FullName=\'\'', '@RoleID=\'\'', '@mk_departmentcode=\'\'', '@mk_organization=\'\'', '@mk_user_type=\'\'', '@mk_nation=\'\'', '@mk_province=\'\'', '@mk_city=\'\'', '@mk_district=\'\'', '@mk_address=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\'', '@bid=\'\''] let fieldArr = _usefulfields.map(_f => _f.toLowerCase()) let hasBid = false @@ -724,10 +724,8 @@ let hasColumn = false if (columns && columns.length > 0) { if (btnTab) { // 琛ㄥ崟鏍囩 - if (btnTab.Ot !== 'notRequired' && btnTab.Ot !== 'requiredOnce') { - hasColumn = true - } - } else if (card.Ot !== 'notRequired' && card.Ot !== 'requiredOnce') { + hasColumn = btnTab.Ot !== 'notRequired' + } else if (card.Ot !== 'notRequired') { hasColumn = true } } diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx index 379eecf..1b0e280 100644 --- a/src/views/billprint/index.jsx +++ b/src/views/billprint/index.jsx @@ -343,6 +343,7 @@ }) } component.cols = getColumns(component.cols) + component.statFields = [] } if (component.wrap && component.wrap.datatype === 'static') { diff --git a/src/views/billprint/index.scss b/src/views/billprint/index.scss index 835f079..0903dc2 100644 --- a/src/views/billprint/index.scss +++ b/src/views/billprint/index.scss @@ -46,6 +46,9 @@ .g2-tooltip { display: none; } + .mk-action-space { + display: none; + } } .print-page { diff --git a/src/views/design/header/editfirstmenu/index.jsx b/src/views/design/header/editfirstmenu/index.jsx index c565b22..58bee24 100644 --- a/src/views/design/header/editfirstmenu/index.jsx +++ b/src/views/design/header/editfirstmenu/index.jsx @@ -118,11 +118,11 @@ } handleButton = (type) => { + const that = this // 鑿滃崟缂栬緫锛氭坊鍔狅紝纭畾锛屽彇娑� let _menuchange = !is(fromJS(this.state.menulist), fromJS(this.props.menulist)) if (type === 'confirm' && _menuchange) { - let _this = this let param = { func: 'sPC_Menu_SortUpt', LText: this.state.menulist.map((item, index) => { @@ -141,7 +141,7 @@ onOk() { return Api.getSystemConfig(param).then(res => { if (res.status) { - _this.props.reload() + that.props.reload() } else { notification.warning({ top: 92, @@ -154,13 +154,11 @@ onCancel() {} }) } else if (type === 'cancel' && _menuchange) { - let _this = this - confirm({ title: '鑿滃崟椤哄簭宸茶皟鏁达紝鏀惧純淇濆瓨鍚楋紵', content: '', onOk() { - _this.props.exitEdit() + that.props.exitEdit() }, onCancel() {} }) diff --git a/src/views/design/index.jsx b/src/views/design/index.jsx index 01b330d..0c565d0 100644 --- a/src/views/design/index.jsx +++ b/src/views/design/index.jsx @@ -7,6 +7,7 @@ import { setGLOBFuncs } from '@/utils/utils.js' import Sidemenu from './sidemenu' +import '@/assets/css/design.scss' import './index.scss' const _locale = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS @@ -15,6 +16,7 @@ componentDidMount() { window.debugger = false window.GLOB.breakpoint = false + window.GLOB.designView = true sessionStorage.removeItem('breakpoint') setGLOBFuncs() } diff --git a/src/views/design/sidemenu/editsecmenu/index.jsx b/src/views/design/sidemenu/editsecmenu/index.jsx index c76db28..ad44fad 100644 --- a/src/views/design/sidemenu/editsecmenu/index.jsx +++ b/src/views/design/sidemenu/editsecmenu/index.jsx @@ -106,6 +106,7 @@ } handleSubBtn = (type) => { + const that = this if (type === 'confirm') { // 淇濆瓨璋冩暣鍚庣殑椤哄簭 let param = { func: 'sPC_Menu_SortUpt', @@ -139,13 +140,11 @@ }) } else if (type === 'close') { // 閫�鍑虹紪杈� if (this.state.change) { - let _this = this - confirm({ title: '鑿滃崟椤哄簭宸茶皟鏁达紝鏀惧純淇濆瓨鍚楋紵', content: '', onOk() { - _this.props.exitEdit() + that.props.exitEdit() }, onCancel() {} }) diff --git a/src/views/design/sidemenu/editthdmenu/index.jsx b/src/views/design/sidemenu/editthdmenu/index.jsx index 3357669..4da6159 100644 --- a/src/views/design/sidemenu/editthdmenu/index.jsx +++ b/src/views/design/sidemenu/editthdmenu/index.jsx @@ -136,6 +136,7 @@ } handleSubBtn = (type) => { + const that = this // 鎿嶄綔鎸夐挳锛氭坊鍔犮�佽В闄ゅ喕缁撱�佺‘璁ゅ強鍏抽棴 if (type === 'confirm') { let param = { @@ -170,15 +171,12 @@ }) } else if (type === 'close') { if (this.state.change) { - let _this = this - confirm({ title: '鑿滃崟椤哄簭宸茶皟鏁达紝鏀惧純淇濆瓨鍚楋紵', content: '', onOk() { - _this.props.exitEdit() - }, - onCancel() {} + that.props.exitEdit() + } }) } else { this.props.exitEdit() -- Gitblit v1.8.0