From 2bccb9ec7bdefe23292a22bc153463cfa1479a49 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 21 六月 2024 16:25:42 +0800 Subject: [PATCH] 2024-06-21 --- src/tabviews/zshare/actionList/funcbutton/index.jsx | 35 src/views/appcheck/index.jsx | 217 +++--- src/tabviews/zshare/actionList/popupbutton/index.jsx | 13 src/tabviews/zshare/topSearch/index.jsx | 16 src/tabviews/custom/components/card/double-data-card/index.jsx | 6 src/utils/utils-custom.js | 62 + src/views/main/index.jsx | 17 src/views/mkiframe/index.jsx | 11 src/tabviews/zshare/actionList/excelInbutton/index.jsx | 33 src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 49 src/views/rolemanage/index.jsx | 103 +- src/tabviews/custom/popview/index.jsx | 10 src/views/basedesign/index.jsx | 105 +- src/views/tabledesign/index.jsx | 8 src/tabviews/basetable/index.jsx | 6 src/views/systemfunc/index.jsx | 10 src/tabviews/zshare/actionList/index.jsx | 4 src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx | 20 src/api/index.js | 48 src/tabviews/custom/components/share/normalTable/index.jsx | 6 src/tabviews/zshare/actionList/newpagebutton/index.jsx | 6 src/tabviews/subtable/index.jsx | 6 src/tabviews/subtabtable/index.jsx | 6 src/tabviews/commontable/index.jsx | 6 src/tabviews/zshare/actionList/normalbutton/index.jsx | 111 +- src/views/mobdesign/index.jsx | 169 ++-- src/views/interface/index.jsx | 10 src/tabviews/zshare/actionList/changeuserbutton/index.jsx | 6 src/views/menudesign/index.jsx | 8 src/tabviews/custom/components/card/data-card/index.jsx | 8 src/index.js | 25 src/tabviews/custom/components/card/table-card/index.jsx | 2 src/tabviews/zshare/actionList/tabbutton/index.jsx | 18 src/tabviews/zshare/actionList/funczip/index.jsx | 27 src/views/pcdesign/index.jsx | 7 src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 78 +- src/tabviews/zshare/actionList/printbutton/index.jsx | 85 +- src/setupProxy.js | 6 src/tabviews/zshare/mutilform/index.jsx | 47 src/tabviews/custom/index.jsx | 10 src/views/appmanage/index.jsx | 425 ++++++------ src/views/systemproc/index.jsx | 8 src/views/imdesign/index.jsx | 153 ++-- src/templates/sharecomponent/searchcomponent/searchform/index.jsx | 7 src/views/login/index.jsx | 6 45 files changed, 1,001 insertions(+), 1,018 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 707c722..50f5937 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -98,13 +98,16 @@ } /** - * @description 寰俊涓氬姟璇锋眰 + * @description 寰俊涓氬姟璇锋眰 鍘熸帴鍙� 'wxpay/getaccesstoken' */ wxAccessToken (domain = '') { - let _url = window.GLOB.baseurl + 'wxpay/getaccesstoken' + let _url = domain || window.GLOB.baseurl - if (domain) { - _url = domain + 'wxpay/getaccesstoken' + if (/qingqiumarket.cn|cloud.mk9h.cn/.test(_url)) { + _url = _url.replace('http://qingqiumarket.cn', 'http://qingqiumarket.cn:8080') + _url = _url.replace('http://cloud.mk9h.cn', 'http://cloud.mk9h.cn:8080') + _url = _url.replace('https://qingqiumarket.cn', 'https://qingqiumarket.cn:8443') + _url = _url.replace('https://cloud.mk9h.cn', 'https://cloud.mk9h.cn:8443') } return new Promise(resolve => { @@ -113,8 +116,10 @@ } else { window.GLOB.accessToken = {domain} axios({ - url: _url, - method: 'get' + url: _url + 'wechat/jsapi/getaccesstoken', + method: 'post', + headers: { 'Content-Type': 'application/json' }, + data: JSON.stringify({appId: 'wx4d8a34c8d4494872'}) }).then(res => { if (res.oa_access_token) { window.GLOB.accessToken.accessTime = parseInt(new Date().getTime() / 1000) @@ -129,6 +134,7 @@ /** * @description 寰俊涓氬姟璇锋眰 + * 39涓� qingqiumarket.cn|cloud.mk9h.cn|sso.mk9h.cn */ wxNginxRequest (url, method, param) { let _url = url @@ -138,16 +144,11 @@ if (process.env.NODE_ENV === 'production') { _url = document.location.origin + '/' + url } - if (/^http:\/\/(qingqiumarket.cn|cloud.mk9h.cn|sso.mk9h.cn)/.test(_url)) { - _url = window.GLOB.location + ':8080/' + url - if (process.env.NODE_ENV === 'production') { - _url = document.location.origin + ':8080/' + url - } - } else if (/^https:\/\/(qingqiumarket.cn|cloud.mk9h.cn|sso.mk9h.cn)/.test(_url)) { - _url = window.GLOB.location + ':8443/' + url - if (process.env.NODE_ENV === 'production') { - _url = document.location.origin + ':8443/' + url - } + if (/qingqiumarket.cn|cloud.mk9h.cn/.test(_url)) { + _url = _url.replace('http://qingqiumarket.cn', 'http://qingqiumarket.cn:8080') + _url = _url.replace('http://cloud.mk9h.cn', 'http://cloud.mk9h.cn:8080') + _url = _url.replace('https://qingqiumarket.cn', 'https://qingqiumarket.cn:8443') + _url = _url.replace('https://cloud.mk9h.cn', 'https://cloud.mk9h.cn:8443') } } @@ -1029,16 +1030,11 @@ if (process.env.NODE_ENV === 'production') { _url = document.location.origin + '/file/oss/upload' } - if (/^http:\/\/(qingqiumarket.cn|cloud.mk9h.cn|sso.mk9h.cn)/.test(_url)) { - _url = window.GLOB.location + ':8080/file/oss/upload' - if (process.env.NODE_ENV === 'production') { - _url = document.location.origin + ':8080/file/oss/upload' - } - } else if (/^https:\/\/(qingqiumarket.cn|cloud.mk9h.cn|sso.mk9h.cn)/.test(_url)) { - _url = window.GLOB.location + ':8443/file/oss/upload' - if (process.env.NODE_ENV === 'production') { - _url = document.location.origin + ':8443/file/oss/upload' - } + if (/qingqiumarket.cn|cloud.mk9h.cn/.test(_url)) { + _url = _url.replace('http://qingqiumarket.cn', 'http://qingqiumarket.cn:8080') + _url = _url.replace('http://cloud.mk9h.cn', 'http://cloud.mk9h.cn:8080') + _url = _url.replace('https://qingqiumarket.cn', 'https://qingqiumarket.cn:8443') + _url = _url.replace('https://cloud.mk9h.cn', 'https://cloud.mk9h.cn:8443') } return axios({ diff --git a/src/index.js b/src/index.js index 3fd7db9..dbc9c37 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,8 @@ import React from 'react' import ReactDOM from 'react-dom' +import { ConfigProvider } from 'antd' +import zhCN from 'antd/es/locale/zh_CN' + import Route from './router' import md5 from 'md5' import * as serviceWorker from './serviceWorker' @@ -17,13 +20,6 @@ } return uuid.join('') })()) -} - -const render = Component => { - ReactDOM.render( - <Component/>, - document.getElementById('root') - ) } fetch('../options.json') @@ -369,7 +365,20 @@ window.GLOB.SyncData = new Map() // 瀛樺偍鍚屾鏌ヨ鏁版嵁 window.GLOB.mkThdMenus = new Map() // 涓夌骇鑿滃崟 - render(Route) + if (lang === 'zh-CN' || !/#\/(login|main|billprint|docprint|tab|iframe|view|ssologin)/.test(window.location.href)) { // 寮�鍙戜娇鐢ㄤ腑鏂� + ReactDOM.render( + <ConfigProvider locale={zhCN}> + <Route/> + </ConfigProvider>, + document.getElementById('root') + ) + } else { + ReactDOM.render( + <Route/>, + document.getElementById('root') + ) + } + }) serviceWorker.unregister() diff --git a/src/setupProxy.js b/src/setupProxy.js index 4d69c53..c82ef96 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -36,6 +36,12 @@ changeOrigin: true })) + app.use(proxy('/wechat', { + target: `${options.host}/${options.service}`, + secure: false, + changeOrigin: true + })) + // app.use(proxy('/trans', { // target: `${host}/${service}`, // secure: false, diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx index 5205276..3d13f4b 100644 --- a/src/tabviews/basetable/index.jsx +++ b/src/tabviews/basetable/index.jsx @@ -504,12 +504,6 @@ if (cell.OpenType === 'excelOut') { // 瀵煎嚭 cell.$menuName = item.$menuname - - if (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0) { - cell.errorType = 'error1' - } else if (cell.intertype === 'system' && cell.verify.dataType !== 'custom' && item.setting.interType !== 'system') { - cell.errorType = 'error2' - } } if (cell.verify) { diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index e94c925..463dc0b 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -305,12 +305,6 @@ if (item.OpenType === 'excelOut') { // 瀵煎嚭 item.$menuName = MenuName - - if (!item.verify || !item.verify.columns || item.verify.columns.length === 0) { - item.errorType = 'error1' - } else if (item.intertype === 'system' && item.verify.dataType !== 'custom' && config.setting.interType !== 'system') { - item.errorType = 'error2' - } } if (item.verify && item.verify.invalid === 'true') { diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index 1e25f5f..b442a83 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -616,7 +616,7 @@ MKEmitter.emit('resetSelectLine', config.uuid, last ? last.$$uuid : '', last) MKEmitter.emit('syncBalconyData', config.uuid, items, data.length > 0 && data.length === keys.length) if (items.length === 0) { - message.warning('鏈幏鍙栧埌鏁版嵁锛�') + message.warning(window.GLOB.dict['no_data'] || '鏈幏鍙栧埌鏁版嵁锛�') } } else { this.setState({ @@ -1222,7 +1222,7 @@ selectedData={selectedData} /> : null } - {config.wrap.pickup === 'true' && this.state.data.length > 0 ? <div className="pickup-wrap"><Switch title="鏀惰捣" checkedChildren="寮�" unCheckedChildren="鍏�" checked={pickup} onChange={this.pickupChange} /></div> : null} + {config.wrap.pickup === 'true' && this.state.data.length > 0 ? <div className="pickup-wrap"><Switch title="鏀惰捣" checkedChildren={window.GLOB.dict['open'] || '寮�'} unCheckedChildren={window.GLOB.dict['shut'] || '鍏�'} checked={pickup} onChange={this.pickupChange} /></div> : null} <div className={`data-zoom ${config.wrap.wrapClass}`}> {switchable ? <div className={'prev-page ' + (pageIndex === 1 ? 'disabled' : '')} onClick={this.prevPage}><div><div><img src={preImg} alt=""/></div></div></div> : null} <Row className={'card-row-list ' + config.wrap.layout} style={{maxHeight: config.wrap.zHeight}}> @@ -1271,8 +1271,8 @@ {switchable ? <div className={'prev-page ' + (total <= _total ? 'disabled' : '')} onClick={this.nextPage}><div><div><img src={nextImg} alt=""/></div></div></div> : null} </div> {config.$empty && data.length === 0 ? <Empty description={false}/> : null} - {config.wrap.pagestyle === 'page' ? <Pagination size="small" total={total} showTotal={(t, range) => total > 0 ? `${range[0]}-${range[1]} 鍏� ${total} 鏉 : `鍏� ${total} 鏉} pageSize={pageSize} showSizeChanger={true} pageSizeOptions={this.state.pageOptions} onChange={this.changePageIndex} onShowSizeChange={this.pageSizeChange} current={pageIndex}/> : null} - {config.wrap.pagestyle === 'more' && data.length > 0 ? <div className={'mk-more' + (pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>鏌ョ湅鏇村<DownOutlined/></div> : null} + {config.wrap.pagestyle === 'page' ? <Pagination size="small" total={total} showTotal={(t, range) => total > 0 ? `${range[0]}-${range[1]} ${window.GLOB.dict['of'] || '鍏�'} ${total} ${window.GLOB.dict['items'] || '鏉�'}` : `${total} ${window.GLOB.dict['items'] || '鏉�'}`} pageSize={pageSize} showSizeChanger={true} pageSizeOptions={this.state.pageOptions} onChange={this.changePageIndex} onShowSizeChange={this.pageSizeChange} current={pageIndex}/> : null} + {config.wrap.pagestyle === 'more' && data.length > 0 ? <div className={'mk-more' + (pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>{window.GLOB.dict['view_more'] || '鏌ョ湅鏇村'}<DownOutlined/></div> : null} </div> ) } diff --git a/src/tabviews/custom/components/card/double-data-card/index.jsx b/src/tabviews/custom/components/card/double-data-card/index.jsx index 0000c90..a5fd92e 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.jsx +++ b/src/tabviews/custom/components/card/double-data-card/index.jsx @@ -1159,7 +1159,7 @@ selectedData={selectedData} /> : null } - {config.wrap.pickup === 'true' && this.state.data.length > 0 ? <div className="pickup-wrap"><Switch title="鏀惰捣" checkedChildren="寮�" unCheckedChildren="鍏�" checked={pickup} onChange={this.pickupChange} /></div> : null} + {config.wrap.pickup === 'true' && this.state.data.length > 0 ? <div className="pickup-wrap"><Switch title="鏀惰捣" checkedChildren={window.GLOB.dict['open'] || '寮�'} unCheckedChildren={window.GLOB.dict['shut'] || '鍏�'} checked={pickup} onChange={this.pickupChange} /></div> : null} <div className={config.wrap.zoomStyle ? 'data-zoom-box' : ''} style={config.wrap.zoomStyle}> <div className={`data-zoom ${config.wrap.wrapClass}`}> <Row className="card-row-list"> @@ -1239,8 +1239,8 @@ </div> {config.$empty && data.length === 0 ? <Empty description={false}/> : null} </div> - {config.wrap.pagestyle === 'page' ? <Pagination size="small" total={total} showTotal={(t, range) => total > 0 ? `${range[0]}-${range[1]} 鍏� ${total} 鏉 : `鍏� ${total} 鏉} pageSize={pageSize} showSizeChanger={true} pageSizeOptions={this.state.pageOptions} onChange={this.changePageIndex} onShowSizeChange={this.pageSizeChange} current={pageIndex}/> : null} - {config.wrap.pagestyle === 'more' && data.length > 0 ? <div className={'mk-more' + (pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>鏌ョ湅鏇村<DownOutlined/></div> : null} + {config.wrap.pagestyle === 'page' ? <Pagination size="small" total={total} showTotal={(t, range) => total > 0 ? `${range[0]}-${range[1]} ${window.GLOB.dict['of'] || '鍏�'} ${total} ${window.GLOB.dict['items'] || '鏉�'}` : `${total} ${window.GLOB.dict['items'] || '鏉�'}`} pageSize={pageSize} showSizeChanger={true} pageSizeOptions={this.state.pageOptions} onChange={this.changePageIndex} onShowSizeChange={this.pageSizeChange} current={pageIndex}/> : null} + {config.wrap.pagestyle === 'more' && data.length > 0 ? <div className={'mk-more' + (pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>{window.GLOB.dict['view_more'] || '鏌ョ湅鏇村'}<DownOutlined/></div> : null} </div> ) } diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx index 5251e62..ef25ae7 100644 --- a/src/tabviews/custom/components/card/table-card/index.jsx +++ b/src/tabviews/custom/components/card/table-card/index.jsx @@ -612,7 +612,7 @@ {data && data.length === 0 ? <Empty description={false}/> : null} </Row> {config.wrap.pagestyle === 'page' ? <Pagination size="small" current={pageIndex} total={total} onChange={this.changePageIndex} /> : null} - {config.wrap.pagestyle === 'more' && data && data.length > 0 ? <div className={'mk-more' + (config.setting.pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>鏌ョ湅鏇村<DownOutlined/></div> : null} + {config.wrap.pagestyle === 'more' && data && data.length > 0 ? <div className={'mk-more' + (config.setting.pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>{window.GLOB.dict['view_more'] || '鏌ョ湅鏇村'}<DownOutlined/></div> : null} </div> ) } diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index 25493d5..6ef27dd 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -873,7 +873,7 @@ MKEmitter.emit('resetSelectLine', MenuID, '', '') MKEmitter.emit('syncBalconyData', MenuID, data, data.length > 0) if (data.length === 0) { - message.warning('鏈幏鍙栧埌鏁版嵁锛�') + message.warning(window.GLOB.dict['no_data'] || '鏈幏鍙栧埌鏁版嵁锛�') } } else { this.setState({ @@ -1163,7 +1163,7 @@ pageSizeOptions: pageOptions, showSizeChanger: true, total: this.props.total || 0, - showTotal: (total, range) => `${range[0]}-${range[1]} 鍏� ${total} 鏉 + showTotal: (total, range) => `${range[0]}-${range[1]} ${window.GLOB.dict['of'] || '鍏�'} ${total} ${window.GLOB.dict['items'] || '鏉�'}` } } @@ -1208,7 +1208,7 @@ return ( <div className={`normal-custom-table ${setting.tableHeader || ''} ${setting.parity === 'true' ? 'mk-parity' : ''} ${height ? 'fixed-table-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || 'middle'} table-col-${columns.length} ${fixed}`} style={style}> {(setting.tableType === 'radio' || setting.tableType === 'checkbox') && data && data.length > 0 ? - <Switch title="鏀惰捣" className="main-pickup" checkedChildren="寮�" unCheckedChildren="鍏�" checked={pickup} onChange={this.pickupChange} /> : null + <Switch title="鏀惰捣" className="main-pickup" checkedChildren={window.GLOB.dict['open'] || '寮�'} unCheckedChildren={window.GLOB.dict['shut'] || '鍏�'} checked={pickup} onChange={this.pickupChange} /> : null } <Table components={components} diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index 4aba73f..9529a8e 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -1383,7 +1383,8 @@ allColumns: null, checkForms: [], allForms: [], - reseting: false + reseting: false, + dict: window.GLOB.dict } timer = null @@ -1625,7 +1626,7 @@ } checkLine = () => { - const { edData, forms, checkForms } = this.state + const { edData, forms, checkForms, dict } = this.state let data = edData.filter(item => item.$$uuid === this.blurId)[0] @@ -1668,7 +1669,7 @@ if (col.type === 'text') { let val = record[col.field] !== undefined ? (record[col.field] + '') : '' if (col.required === 'true' && !val) { - err = `${col.label}涓嶅彲涓虹┖` + err = `${col.label}${dict['not_empty'] || '涓嶅彲涓虹┖'}` } else if (col.datatype === 'datetime' && !val) { val = '1949-10-01' } @@ -1677,27 +1678,27 @@ let val = record[col.field] if (col.required === 'true' && !val) { - err = `${col.label}涓嶅彲涓�${col.noValue === 'hide' ? '绌�' : '0'}` + err = `${col.label}${col.noValue === 'hide' ? (dict['not_empty'] || '涓嶅彲涓虹┖') : dict['not_zero'] || '涓嶅彲涓�0'}` } else if (col.noValue === 'hide' && !val) { if (col.clearField && checkForms.includes(col.clearField) && !record[col.clearField]) { - err = `璇峰~鍐� ${col.label} 鎴� ${col.clearName}` + err = `${dict['input_tip'] || '璇峰~鍐� '}${col.label} ${dict['or'] || '鎴�'} ${col.clearName}` } val = 0 } else if (!val && val !== 0) { - err = `${col.label}涓嶅彲涓虹┖` + err = `${col.label}${dict['not_empty'] || '涓嶅彲涓虹┖'}` } else { val = +val if (isNaN(val)) { - err = `${col.label}鏁版嵁鏍煎紡閿欒` + err = `${col.label} ${dict['data_format'] || '鏁版嵁鏍煎紡閿欒'}` return } val = +val.toFixed(col.decimal || 0) if (typeof(col.max) === 'number' && val > col.max) { - err = `${col.label}涓嶅彲澶т簬${col.max}` + err = `${col.label}${dict['max_limit'] || ' 涓嶅彲澶т簬 '}${col.max}` } else if (typeof(col.min) === 'number' && val < col.min) { - err = `${col.label}涓嶅彲灏忎簬${col.min}` + err = `${col.label}${dict['less_limit'] || ' 涓嶅彲灏忎簬 '}${col.min}` } } @@ -2230,7 +2231,7 @@ checkData = () => { const { setting } = this.props - const { edData, forms, checkForms, selectedRowKeys } = this.state + const { edData, forms, checkForms, selectedRowKeys, dict } = this.state let data = fromJS(edData).toJS() @@ -2244,7 +2245,7 @@ if (data.length === 0) { notification.warning({ top: 92, - message: '璇烽�夋嫨闇�瑕佹彁浜ょ殑鏁版嵁锛�', + message: dict['select_row'] || '璇烽�夋嫨闇�瑕佹彁浜ょ殑鏁版嵁锛�', duration: 5 }) return null @@ -2254,7 +2255,7 @@ if (data.length === 0) { notification.warning({ top: 92, - message: '鏁版嵁鏈慨鏀癸紝涓嶅彲鎻愪氦锛�', + message: dict['un_modified'] || '鏁版嵁鏈慨鏀癸紝涓嶅彲鎻愪氦锛�', duration: 5 }) return null @@ -2288,7 +2289,7 @@ if (col.type === 'text') { let val = item[col.field] !== undefined ? (item[col.field] + '') : '' if (col.required === 'true' && !val) { - line.push(`${col.label}涓嶅彲涓虹┖`) + line.push(`${col.label}${dict['not_empty'] || '涓嶅彲涓虹┖'}`) } else if (col.datatype === 'datetime' && !val) { val = '1949-10-01' } @@ -2296,31 +2297,31 @@ } else if (col.type === 'number') { let val = item[col.field] if (col.required === 'true' && !val) { - err = `${col.label}涓嶅彲涓�${col.noValue === 'hide' ? '绌�' : '0'}` + err = `${col.label}${col.noValue === 'hide' ? (dict['not_empty'] || '涓嶅彲涓虹┖') : dict['not_zero'] || '涓嶅彲涓�0'}` } else if (col.noValue === 'hide' && !val) { if (col.clearField && checkForms.includes(col.clearField) && !item[col.clearField]) { - let msg = `璇峰~鍐� ${col.label} 鎴� ${col.clearName}` + let msg = `${dict['input_tip'] || '璇峰~鍐� '}${col.label} ${dict['or'] || '鎴�'} ${col.clearName}` if (!line.includes(msg)) { line.push(msg) } } val = 0 } else if (!val && val !== 0) { - line.push(`${col.label}涓嶅彲涓虹┖`) + line.push(`${col.label}${dict['not_empty'] || '涓嶅彲涓虹┖'}`) return } else { val = +val if (isNaN(val)) { - line.push(`${col.label}鏁版嵁鏍煎紡閿欒`) + line.push(`${col.label} ${dict['data_format'] || '鏁版嵁鏍煎紡閿欒'}`) return } val = +val.toFixed(col.decimal || 0) if (typeof(col.max) === 'number' && val > col.max) { - line.push(`${col.label}涓嶅彲澶т簬${col.max}`) + line.push(`${col.label}${dict['max_limit'] || ' 涓嶅彲澶т簬 '}${col.max}`) } else if (typeof(col.min) === 'number' && val < col.min) { - line.push(`${col.label}涓嶅彲灏忎簬${col.min}`) + line.push(`${col.label}${dict['less_limit'] || ' 涓嶅彲灏忎簬 '}${col.min}`) } } @@ -2329,7 +2330,7 @@ }) if (line.length > 0) { - err += `绗�${Index}琛岋細` + line.join('锛�') + '锛�' + err += (dict['line'] ? `${dict['line']} ${Index}锛歚 : `绗�${Index}琛岋細`) + line.join('锛�') + '锛�' } if (!item.$deleted) { Index++ @@ -2353,14 +2354,14 @@ submit = (record) => { const { submit, BID, setting } = this.props - const { forms } = this.state + const { forms, dict } = this.state this.setState({visible: false, midData: null}) if (setting.supModule && !BID) { notification.warning({ top: 92, - message: '闇�瑕佷笂绾т富閿�硷紒', + message: dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) @@ -2438,17 +2439,18 @@ execSuccess = (res, record) => { const { submit } = this.props - const { edData } = this.state + const { edData, dict } = this.state if (res && res.ErrCode === 'S') { // 鎵ц鎴愬姛 notification.success({ top: 92, - message: res.message || '鎵ц鎴愬姛', + message: res.message || dict['exc_success'] || '鎵ц鎴愬姛', duration: submit.stime ? submit.stime : 2 }) } else if (res && res.ErrCode === 'Y') { // 鎵ц鎴愬姛 Modal.success({ - title: res.message || '鎵ц鎴愬姛' + title: res.message || dict['exc_success'] || '鎵ц鎴愬姛', + okText: dict['got_it'] || '鐭ラ亾浜�' }) } else if (res && res.ErrCode === '-1') { // 瀹屾垚鍚庝笉鎻愮ず @@ -2494,26 +2496,28 @@ execError = (res, record) => { const { submit } = this.props + const { dict } = this.state if (res.ErrCode === 'E') { Modal.error({ - title: res.message || '鎵ц澶辫触锛�', + title: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', + okText: dict['got_it'] || '鐭ラ亾浜�' }) } else if (res.ErrCode === 'N') { notification.error({ top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: submit.ntime ? submit.ntime : 10 }) } else if (res.ErrCode === 'F') { notification.error({ className: 'notification-custom-error', top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: submit.ftime ? submit.ftime : 10 }) } else if (res.ErrCode === 'NM') { - message.error(res.message || '鎵ц澶辫触锛�') + message.error(res.message || dict['exc_fail'] || '鎵ц澶辫触锛�') } this.setState({ @@ -2627,7 +2631,7 @@ render() { const { setting, lineMarks, submit } = this.props - const { edData, columns, loading, pageOptions, selectedRowKeys, visible, midData, reseting } = this.state + const { edData, columns, loading, pageOptions, selectedRowKeys, visible, midData, reseting, dict } = this.state if (reseting) return null @@ -2658,7 +2662,7 @@ pageSizeOptions: pageOptions, showSizeChanger: true, total: this.props.total || 0, - showTotal: (total, range) => `${range[0]}-${range[1]} 鍏� ${total} 鏉 + showTotal: (total, range) => `${range[0]}-${range[1]} ${dict['of'] || '鍏�'} ${total} ${dict['items'] || '鏉�'}` } } @@ -2683,7 +2687,7 @@ return ( <> {setting.hasSubmit && edData.length > 0 ? <div className="edit-custom-table-btn-wrap" style={submit.wrapStyle}> - <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-table" type="link">鎻愪氦</Button> + <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-table" type="link">{dict['submit'] || '鎻愪氦'}</Button> </div> : null} <div className={`edit-custom-table ${setting.tableHeader || ''} ${setting.parity === 'true' ? 'mk-parity' : ''} ${height ? 'fixed-table-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''} mk-edit-${setting.editType || 'simple'}`} style={style}> <Table @@ -2707,7 +2711,7 @@ onChange={this.changeTable} pagination={_pagination} /> - {setting.hasSubmit && _data.length > 10 ? <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-footer-table" type="link">鎻愪氦</Button> : null} + {setting.hasSubmit && _data.length > 10 ? <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-footer-table" type="link">{dict['submit'] || '鎻愪氦'}</Button> : null} </div> <Modal className="mk-user-confirm" @@ -2716,13 +2720,13 @@ maskClosable={false} closable={false} footer={[ - <Button key="cancel" onClick={() => { this.setState({ visible: false, midData: null }) }}>鍙栨秷</Button>, - <Button key="refresh" className="table-refresh" onClick={() => { midData && this.updateMutil(midData) }}>鍒锋柊琛ㄦ牸</Button>, - <Button key="confirm" type="primary" onClick={() => setTimeout(() => {this.submit()}, 10)}>鎻愪氦鏁版嵁</Button> + <Button key="cancel" onClick={() => { this.setState({ visible: false, midData: null }) }}>{dict['cancel'] || '鍙栨秷'}</Button>, + <Button key="refresh" className="table-refresh" onClick={() => { midData && this.updateMutil(midData) }}>{dict['refresh'] || '鍒锋柊琛ㄦ牸'}</Button>, + <Button key="confirm" type="primary" onClick={() => setTimeout(() => {this.submit()}, 10)}>{dict['submit'] || '鎻愪氦鏁版嵁'}</Button> ]} destroyOnClose > - <div><QuestionCircleOutlined />琛ㄦ牸涓湁鏁版嵁灏氭湭鎻愪氦</div> + <div><QuestionCircleOutlined />{dict['data_not_sub'] || '琛ㄦ牸涓湁鏁版嵁灏氭湭鎻愪氦'}</div> </Modal> </> ) diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 2e02bbb..ce3f77e 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -956,16 +956,6 @@ if (cell.OpenType === 'excelOut') { // 瀵煎嚭 cell.$menuName = item.$menuname - - if (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0) { - cell.errorType = 'error1' - } else if (cell.intertype === 'system' && cell.verify.dataType !== 'custom') { - if (item.setting.interType !== 'system') { - cell.errorType = 'error2' - } else if (item.type === 'balcony' || item.subtype === 'propcard') { - cell.errorType = 'error2' - } - } } else if (cell.OpenType === 'pop' && item.$cache && item.$time && cell.modal) { cell.modal.$cache = item.$cache cell.modal.$time = item.$time diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx index bfc26d7..cf6e6a3 100644 --- a/src/tabviews/custom/popview/index.jsx +++ b/src/tabviews/custom/popview/index.jsx @@ -667,16 +667,6 @@ if (cell.OpenType === 'excelOut') { // 瀵煎嚭 cell.$menuName = item.$menuname - - if (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0) { - cell.errorType = 'error1' - } else if (cell.intertype === 'system' && cell.verify.dataType !== 'custom') { - if (item.setting.interType !== 'system') { - cell.errorType = 'error2' - } else if (item.type === 'balcony' || item.subtype === 'propcard') { - cell.errorType = 'error2' - } - } } if (cell.verify) { diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index 39cbb1d..4dd6804 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -230,12 +230,6 @@ if (item.OpenType === 'excelOut') { // 瀵煎嚭 item.$menuName = Tab.label - - if (!item.verify || !item.verify.columns || item.verify.columns.length === 0) { - item.errorType = 'error1' - } else if (item.intertype === 'system' && item.verify.dataType !== 'custom' && config.setting.interType !== 'system') { - item.errorType = 'error2' - } } if (item.verify && item.verify.invalid === 'true') { diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx index bc3c2db..888ef15 100644 --- a/src/tabviews/subtabtable/index.jsx +++ b/src/tabviews/subtabtable/index.jsx @@ -203,12 +203,6 @@ if (item.OpenType === 'excelOut') { // 瀵煎嚭 item.$menuName = Tab.label - - if (!item.verify || !item.verify.columns || item.verify.columns.length === 0) { - item.errorType = 'error1' - } else if (item.intertype === 'system' && item.verify.dataType !== 'custom' && config.setting.interType !== 'system') { - item.errorType = 'error2' - } } if (item.verify && item.verify.invalid === 'true') { diff --git a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx index 06cb05f..76bfb7c 100644 --- a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx +++ b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx @@ -125,7 +125,7 @@ // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁 notification.warning({ top: 92, - message: '璇烽�夋嫨鍗曡鏁版嵁锛�', + message: window.GLOB.dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�', duration: 5 }) return @@ -162,7 +162,9 @@ param[setting.primaryKey] = primaryId confirm({ - title: '纭畾瑕佹墽琛屽悧?', + title: window.GLOB.dict['exec_sure'] || '纭畾瑕佹墽琛屽悧?', + okText: window.GLOB.dict['ok'] || '纭畾', + cancelText: window.GLOB.dict['cancel'] || '鍙栨秷', onOk() { return new Promise(resolve => { Api.genericInterface(param).then(res => { diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx index 713ad82..1be21b1 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx @@ -29,6 +29,7 @@ disabled: false, hidden: false, primaryId: '', + dict: window.GLOB.dict } UNSAFE_componentWillMount () { @@ -108,7 +109,7 @@ */ actionTrigger = (triggerId, record, type, lid) => { const { setting, BID, btn, selectedData, LID } = this.props - const { loading, disabled } = this.state + const { loading, disabled, dict } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return @@ -119,20 +120,14 @@ if (setting.supModule && !BID) { notification.warning({ top: 92, - message: '闇�瑕佷笂绾т富閿�硷紒', + message: dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) } else if (btn.Ot === 'requiredSgl' && data.length !== 1) { // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁 notification.warning({ top: 92, - message: '璇烽�夋嫨鍗曡鏁版嵁锛�', - duration: 5 - }) - } else if (!btn.verify || !btn.verify.sheet || !btn.verify.columns || btn.verify.columns.length === 0) { - notification.warning({ - top: 92, - message: 'excel瀵煎叆楠岃瘉淇℃伅鏈缃紒', + message: dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�', duration: 5 }) } else { @@ -164,16 +159,18 @@ */ execSuccess = (res = {}) => { const { btn } = this.props + const { dict } = this.state if (res.ErrCode === 'S' || !res.ErrCode) { // 鎵ц鎴愬姛 notification.success({ top: 92, - message: res.message || '鎵ц鎴愬姛锛�', + message: res.message || dict['exc_success'] || '鎵ц鎴愬姛锛�', duration: btn.verify && btn.verify.stime ? btn.verify.stime : 2 }) } else if (res.ErrCode === 'Y') { // 鎵ц鎴愬姛 Modal.success({ - title: res.message || '鎵ц鎴愬姛锛�' + title: res.message || dict['exc_success'] || '鎵ц鎴愬姛锛�', + okText: dict['got_it'] || '鐭ラ亾浜�', }) } else if (res.ErrCode === '-1') { // 瀹屾垚鍚庝笉鎻愮ず @@ -226,6 +223,7 @@ */ execError = (res = {}) => { const { btn } = this.props + const { dict } = this.state if (!['LoginError', 'C', '-2', 'E', 'N', 'F', 'NM'].includes(res.ErrCode)) { res.ErrCode = 'E' @@ -233,23 +231,24 @@ if (res.ErrCode === 'E') { Modal.error({ - title: res.message || '鎵ц澶辫触锛�', + title: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', + okText: dict['got_it'] || '鐭ラ亾浜�' }) } else if (res.ErrCode === 'N') { notification.error({ top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: btn.verify && btn.verify.ntime ? btn.verify.ntime : 10 }) } else if (res.ErrCode === 'F') { notification.error({ className: 'notification-custom-error', top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: btn.verify && btn.verify.ftime ? btn.verify.ftime : 10 }) } else if (res.ErrCode === 'NM') { - message.error(res.message || '鎵ц澶辫触锛�') + message.error(res.message || dict['exc_fail'] || '鎵ц澶辫触锛�') } this.setState({ @@ -380,8 +379,10 @@ } else if (res.ErrCode === 'C') { const _this = this confirm({ - title: '璇风‘璁�', + title: window.GLOB.dict['exec_sure'] || '璇风‘璁�', content: res.message, + okText: window.GLOB.dict['ok'] || '纭畾', + cancelText: window.GLOB.dict['cancel'] || '鍙栨秷', onOk() { return new Promise(resolve => { Api.genericInterface(unCheckParam).then(result => { diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 31dd53a..cd40165 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -23,9 +23,10 @@ } state = { - loading: false, // 瀵煎嚭涓� + loading: false, hidden: false, - disabled: false + disabled: false, + dict: window.GLOB.dict } UNSAFE_componentWillMount () { @@ -92,7 +93,7 @@ */ actionTrigger = (triggerId, _, type, lid) => { const { setting, BID, btn, LID } = this.props - const { loading, disabled } = this.state + const { loading, disabled, dict } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return @@ -101,19 +102,7 @@ if (setting.supModule && !BID) { notification.warning({ top: 92, - message: '闇�瑕佷笂绾т富閿�硷紒', - duration: 5 - }) - } else if (btn.errorType === 'error1') { - notification.warning({ - top: 92, - message: '璇疯缃鍑哄垪锛�', - duration: 5 - }) - } else if (btn.errorType === 'error2') { - notification.warning({ - top: 92, - message: '鎸夐挳闇�鑷畾涔夊鍑烘暟鎹簮锛�', + message: dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) } else { @@ -145,7 +134,7 @@ if (!valid) { notification.warning({ top: 92, - message: '鎼滅储鏉′欢涓嶅彲涓虹┖锛�', + message: window.GLOB.dict['miss_search'] || '鎼滅储鏉′欢涓嶅彲涓虹┖锛�', duration: 5 }) return @@ -345,7 +334,7 @@ Api.genericInterface(res).then(result => { if (result.status) { if (!result.data) { - this.execError({ErrCode: 'N', message: '鏈幏鍙栧埌鏁版嵁淇℃伅锛�'}) + this.execError({ErrCode: 'N', message: window.GLOB.dict['no_data'] || '鏈幏鍙栧埌鏁版嵁淇℃伅锛�'}) } else if (result.data.length >= pageSize) { data = data.concat(result.data) pageIndex++ @@ -427,7 +416,7 @@ Api.genericInterface(param).then(result => { if (result.status) { if (!result.data) { - this.execError({ErrCode: 'N', message: '鏈幏鍙栧埌鏁版嵁淇℃伅锛�'}) + this.execError({ErrCode: 'N', message: window.GLOB.dict['no_data'] || '鏈幏鍙栧埌鏁版嵁淇℃伅锛�'}) } else if (result.data.length >= pageSize) { data = data.concat(result.data) pageIndex++ @@ -450,6 +439,7 @@ */ exportExcel = (data = [], ErrCode, msg, search) => { const { btn } = this.props + const { dict } = this.state let imgCol = false let merge = false @@ -523,7 +513,7 @@ if (errors.length) { notification.error({ top: 92, - message: '鏁版嵁涓己灏戝瓧娈碉細' + errors.join('銆�'), + message: (dict['miss_field'] || '鏁版嵁涓己灏戝瓧娈�') + '锛�' + errors.join('銆�'), duration: 5 }) @@ -540,7 +530,7 @@ // eslint-disable-next-line let func = new Function('XLSX', 'data', 'columns', 'searches', 'callback', btn.verify.excel_func) func(XLSX, data, columns, search, (res) => { - res = res || {ErrCode: ErrCode || 'S', message: msg || '瀵煎嚭鎴愬姛锛�'} + res = res || {ErrCode: ErrCode || 'S', message: msg || dict['exc_success'] || '瀵煎嚭鎴愬姛锛�'} this.execSuccess(res) }) } else if (imgCol) { @@ -621,7 +611,7 @@ this.table2excel(column, table) - this.execSuccess({ErrCode: ErrCode || 'S', message: msg || '瀵煎嚭鎴愬姛锛�'}) + this.execSuccess({ErrCode: ErrCode || 'S', message: msg || dict['exc_success'] || '瀵煎嚭鎴愬姛锛�'}) } else { let table = [] let _header = [] @@ -781,7 +771,7 @@ XLSX.writeFile(wb, `${btn.verify.excelName || btn.$menuName || ''}${moment().format('YYYYMMDDHHmmss')}.xlsx`) - this.execSuccess({ErrCode: ErrCode || 'S', message: msg || '瀵煎嚭鎴愬姛锛�'}) + this.execSuccess({ErrCode: ErrCode || 'S', message: msg || dict['exc_success'] || '瀵煎嚭鎴愬姛锛�'}) } } catch (e) { console.warn(e) @@ -985,7 +975,8 @@ }) } else if (res.ErrCode === 'Y') { // 鎵ц鎴愬姛 Modal.success({ - title: res.message + title: res.message, + okText: window.GLOB.dict['got_it'] || '鐭ラ亾浜�' }) } else if (res.ErrCode === '-1') { // 瀹屾垚鍚庝笉鎻愮ず @@ -1038,6 +1029,7 @@ */ execError = (res = {}) => { const { btn } = this.props + const { dict } = this.state if (!['LoginError', 'C', '-2', 'E', 'N', 'F', 'NM'].includes(res.ErrCode)) { res.ErrCode = 'E' @@ -1045,23 +1037,24 @@ if (res.ErrCode === 'E') { Modal.error({ - title: res.message || '鎵ц澶辫触锛�', + title: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', + okText: dict['got_it'] || '鐭ラ亾浜�' }) } else if (res.ErrCode === 'N') { notification.error({ top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: btn.verify && btn.verify.ntime ? btn.verify.ntime : 10 }) } else if (res.ErrCode === 'F') { notification.error({ className: 'notification-custom-error', top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: btn.verify && btn.verify.ftime ? btn.verify.ftime : 10 }) } else if (res.ErrCode === 'NM') { - message.error(res.message || '鎵ц澶辫触锛�') + message.error(res.message || dict['exc_fail'] || '鎵ц澶辫触锛�') } this.setState({ diff --git a/src/tabviews/zshare/actionList/funcbutton/index.jsx b/src/tabviews/zshare/actionList/funcbutton/index.jsx index cf887d2..10786db 100644 --- a/src/tabviews/zshare/actionList/funcbutton/index.jsx +++ b/src/tabviews/zshare/actionList/funcbutton/index.jsx @@ -23,6 +23,7 @@ loading: false, disabled: false, hidden: false, + dict: window.GLOB.dict } UNSAFE_componentWillMount () { @@ -102,7 +103,7 @@ */ actionTrigger = (triggerId, record, type, lid) => { const { btn, BID, selectedData, LID } = this.props - const { loading } = this.state + const { loading, dict } = this.state if (loading) return if (triggerId && btn.uuid !== triggerId) return @@ -112,14 +113,14 @@ let error = '' if (btn.funcType === 'shareLink' && window.GLOB.systemType === 'production' && !btn.shareProUrl) { - error = '灏氭湭璁剧疆姝e紡绯荤粺閾炬帴鍦板潃锛�' + error = dict['no_prod_link'] || '灏氭湭璁剧疆姝e紡绯荤粺閾炬帴鍦板潃锛�' } else if (btn.funcType === 'refund') { if (data.length === 0) { - error = '璇烽�夋嫨琛岋紒' + error = dict['select_row'] || '璇烽�夋嫨琛岋紒' } else if (data.length !== 1) { - error = '璇烽�夋嫨鍗曡鏁版嵁锛�' + error = dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�' } else if (!data[0].$$uuid) { - error = '鏈幏鍙栧埌璁㈠崟缂栧彿锛�' + error = dict['no_ordercode'] || '鏈幏鍙栧埌璁㈠崟缂栧彿锛�' } } @@ -160,7 +161,9 @@ const that = this confirm({ - title: btn.tipTitle || '纭畾瑕佹墽琛屽悧?', + title: btn.tipTitle || dict['exec_sure'] || '纭畾瑕佹墽琛屽悧?', + okText: dict['ok'] || '纭畾', + cancelText: dict['cancel'] || '鍙栨秷', onOk() { that.execRefund(orderId) }, @@ -172,7 +175,7 @@ execRefund = (orderId) => { Api.setRefund(orderId).then(res => { if (!res.status) { - this.execError({ErrCode: 'E', message: '鎵ц澶辫触锛�', ...res}) + this.execError({ErrCode: 'E', message: window.GLOB.dict['exc_fail'] || '鎵ц澶辫触锛�', ...res}) } else { this.execSuccess({ErrCode: 'S', ...res}) } @@ -243,22 +246,24 @@ title: btn.shareTip }) } else { - message.success('宸插鍒跺埌鍓垏鏉裤��') + message.success(window.GLOB.dict['copied'] || '宸插鍒跺埌鍓垏鏉裤��') } } execSuccess = (res = {}) => { const { btn } = this.props + const { dict } = this.state if (res.ErrCode === 'S' || !res.ErrCode) { // 鎵ц鎴愬姛 notification.success({ top: 92, - message: res.message || '鎵ц鎴愬姛锛�', + message: res.message || dict['exc_success'] || '鎵ц鎴愬姛锛�', duration: btn.verify && btn.verify.stime ? btn.verify.stime : 2 }) } else if (res.ErrCode === 'Y') { // 鎵ц鎴愬姛 Modal.success({ - title: res.message || '鎵ц鎴愬姛锛�' + title: res.message || dict['exc_success'] || '鎵ц鎴愬姛锛�', + okText: dict['got_it'] || '鐭ラ亾浜�' }) } else if (res.ErrCode === '-1') { // 瀹屾垚鍚庝笉鎻愮ず @@ -275,6 +280,7 @@ execError = (res) => { const { btn } = this.props + const { dict } = this.state if (!['LoginError', 'C', '-2', 'E', 'N', 'F', 'NM'].includes(res.ErrCode)) { res.ErrCode = 'E' @@ -282,23 +288,24 @@ if (res.ErrCode === 'E') { Modal.error({ - title: res.message || '鎵ц澶辫触锛�', + title: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', + okText: dict['got_it'] || '鐭ラ亾浜�' }) } else if (res.ErrCode === 'N') { notification.error({ top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: btn.verify && btn.verify.ntime ? btn.verify.ntime : 10 }) } else if (res.ErrCode === 'F') { notification.error({ className: 'notification-custom-error', top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: btn.verify && btn.verify.ftime ? btn.verify.ftime : 10 }) } else if (res.ErrCode === 'NM') { - message.error(res.message || '鎵ц澶辫触锛�') + message.error(res.message || dict['exc_fail'] || '鎵ц澶辫触锛�') } this.setState({ diff --git a/src/tabviews/zshare/actionList/funczip/index.jsx b/src/tabviews/zshare/actionList/funczip/index.jsx index 5181920..9bee41a 100644 --- a/src/tabviews/zshare/actionList/funczip/index.jsx +++ b/src/tabviews/zshare/actionList/funczip/index.jsx @@ -22,6 +22,7 @@ loading: false, disabled: false, hidden: false, + dict: window.GLOB.dict } UNSAFE_componentWillMount () { @@ -101,7 +102,7 @@ */ actionTrigger = (triggerId, record, type, lid) => { const { BID, btn, selectedData, setting, LID } = this.props - const { loading, disabled } = this.state + const { loading, disabled, dict } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return @@ -112,21 +113,21 @@ if (setting.supModule && !BID) { notification.warning({ top: 92, - message: '闇�瑕佷笂绾т富閿�硷紒', + message: dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) return } else if (btn.Ot !== 'notRequired' && data.length === 0) { notification.warning({ top: 92, - message: '璇烽�夋嫨琛岋紒', + message: dict['select_row'] || '璇烽�夋嫨琛岋紒', duration: 5 }) return } else if (btn.Ot === 'requiredSgl' && data.length !== 1) { notification.warning({ top: 92, - message: '璇烽�夋嫨鍗曡鏁版嵁锛�', + message: dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�', duration: 5 }) return @@ -351,43 +352,47 @@ */ execError = (res) => { const { btn } = this.props + const { dict } = this.state this.setState({ loading: false }) if (res.ErrCode === '01') { - message.error('鏈幏鍙栧埌涓嬭浇鏂囦欢銆�') + message.error(dict['exc_fail'] || '鏈幏鍙栧埌涓嬭浇鏂囦欢銆�') return } else if (res.ErrCode === '02') { Modal.error({ - title: '閮ㄥ垎鏂囦欢涓嬭浇澶辫触锛�1銆佽妫�鏌ユ枃浠惰矾寰勬槸鍚︽纭紝2銆佽妫�鏌ユ枃浠舵槸鍚﹁法鍩熴��', + title: dict['exc_fail'] || '閮ㄥ垎鏂囦欢涓嬭浇澶辫触锛�1銆佽妫�鏌ユ枃浠惰矾寰勬槸鍚︽纭紝2銆佽妫�鏌ユ枃浠舵槸鍚﹁法鍩熴��', + okText: dict['got_it'] || '鐭ラ亾浜�' }) return } else if (res.ErrCode === '03') { Modal.error({ - title: '鏂囦欢涓嬭浇澶辫触锛�1銆佽妫�鏌ユ枃浠惰矾寰勬槸鍚︽纭紝2銆佽妫�鏌ユ枃浠舵槸鍚﹁法鍩熴��', + title: dict['exc_fail'] || '鏂囦欢涓嬭浇澶辫触锛�1銆佽妫�鏌ユ枃浠惰矾寰勬槸鍚︽纭紝2銆佽妫�鏌ユ枃浠舵槸鍚﹁法鍩熴��', + okText: dict['got_it'] || '鐭ラ亾浜�' }) return } else if (res.ErrCode === 'E') { Modal.error({ - title: res.message || '鎵ц澶辫触锛�', + title: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', + okText: dict['got_it'] || '鐭ラ亾浜�' }) } else if (res.ErrCode === 'N') { notification.error({ top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: 10 }) } else if (res.ErrCode === 'F') { notification.error({ className: 'notification-custom-error', top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: 10 }) } else if (res.ErrCode === 'NM') { - message.error(res.message || '鎵ц澶辫触锛�') + message.error(res.message || dict['exc_fail'] || '鎵ц澶辫触锛�') } if (btn.execError !== 'never') { diff --git a/src/tabviews/zshare/actionList/index.jsx b/src/tabviews/zshare/actionList/index.jsx index 8e213d8..d0a7bd4 100644 --- a/src/tabviews/zshare/actionList/index.jsx +++ b/src/tabviews/zshare/actionList/index.jsx @@ -231,7 +231,7 @@ <div className="button-list toolbar-button"> {this.getButtonList(actions)} {mores ? <Dropdown overlay={<div className="mk-button-dropdown-wrap">{this.getButtonList(mores)}</div>} trigger={['hover']}> - <div className="mk-button-more">鏇村<DownOutlined/></div> + <div className="mk-button-more">{window.GLOB.dict['more'] || '鏇村'}<DownOutlined/></div> </Dropdown> : null} </div> </Affix> @@ -241,7 +241,7 @@ <div className="button-list toolbar-button"> {this.getButtonList(actions)} {mores ? <Dropdown overlay={<div className="mk-button-dropdown-wrap">{this.getButtonList(mores)}</div>} trigger={['hover']}> - <div className="mk-button-more">鏇村<DownOutlined/></div> + <div className="mk-button-more">{window.GLOB.dict['more'] || '鏇村'}<DownOutlined/></div> </Dropdown> : null} </div> ) diff --git a/src/tabviews/zshare/actionList/newpagebutton/index.jsx b/src/tabviews/zshare/actionList/newpagebutton/index.jsx index 79913ba..55bdf19 100644 --- a/src/tabviews/zshare/actionList/newpagebutton/index.jsx +++ b/src/tabviews/zshare/actionList/newpagebutton/index.jsx @@ -114,7 +114,7 @@ // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹� notification.warning({ top: 92, - message: '璇烽�夋嫨琛岋紒', + message: window.GLOB.dict['select_row'] || '璇烽�夋嫨琛岋紒', duration: 5 }) return @@ -122,14 +122,14 @@ // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁 notification.warning({ top: 92, - message: '璇烽�夋嫨鍗曡鏁版嵁锛�', + message: window.GLOB.dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�', duration: 5 }) return } else if (btn.pageTemplate === 'custom' && window.GLOB.systemType === 'production' && !btn.proUrl) { notification.warning({ top: 92, - message: '灏氭湭璁剧疆姝e紡绯荤粺閾炬帴鍦板潃锛�', + message: window.GLOB.dict['no_prod_link'] || '灏氭湭璁剧疆姝e紡绯荤粺閾炬帴鍦板潃锛�', duration: 5 }) return diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 5c2a729..8f0c450 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -44,7 +44,8 @@ hidden: false, autoMatic: false, check: false, - count: 0 + count: 0, + dict: window.GLOB.dict } moduleParams = null @@ -206,7 +207,7 @@ */ actionTrigger = (triggerId, record, type, lid, callback) => { const { btn, selectedData, LID } = this.props - const { loading, disabled } = this.state + const { loading, disabled, dict } = this.state if (type === 'preButton') { if (btn.uuid !== triggerId) return @@ -242,7 +243,9 @@ } else if (btn.OpenType === 'prompt') { this.setState({loading: true}) confirm({ - title: btn.tipTitle || '纭畾瑕佹墽琛屽悧?', + title: btn.tipTitle || dict['exec_sure'] || '纭畾瑕佹墽琛屽悧?', + okText: dict['ok'] || '纭畾', + cancelText: dict['cancel'] || '鍙栨秷', onOk() { return new Promise(resolve => { _this.execSubmit(data, resolve) @@ -319,7 +322,7 @@ preTrigger = (callback) => { const { btn, selectedData } = this.props - const { loading, disabled } = this.state + const { loading, disabled, dict } = this.state if (loading || disabled) { callback() @@ -352,7 +355,9 @@ } else if (btn.OpenType === 'prompt') { this.setState({loading: true}) confirm({ - title: btn.tipTitle || '纭畾瑕佹墽琛屽悧?', + title: btn.tipTitle || dict['exec_sure'] || '纭畾瑕佹墽琛屽悧?', + okText: dict['ok'] || '纭畾', + cancelText: dict['cancel'] || '鍙栨秷', onOk() { return new Promise(resolve => { _this.execSubmit(data, resolve) @@ -402,11 +407,12 @@ checkBtnData = (data) => { const { BID, btn, setting } = this.props + const { dict } = this.state if (setting.supModule && !BID) { notification.warning({ top: 92, - message: '闇�瑕佷笂绾т富閿�硷紒', + message: dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) return false @@ -414,7 +420,7 @@ // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹� notification.warning({ top: 92, - message: '璇烽�夋嫨琛岋紒', + message: dict['select_row'] || '璇烽�夋嫨琛岋紒', duration: 5 }) return false @@ -422,42 +428,17 @@ // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁 notification.warning({ top: 92, - message: '璇烽�夋嫨鍗曡鏁版嵁锛�', + message: dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�', duration: 5 }) return false - } else if (btn.intertype === 'system') { - if (data.length === 0 && btn.verify && btn.verify.voucher && btn.verify.voucher.enabled) { - notification.warning({ - top: 92, - message: '浣跨敤鍒涘缓鍑瘉鍑芥暟锛岄渶瑕侀�夋嫨琛岋紒', - duration: 5 - }) - return false - } - } else if (btn.intertype === 'custom' || btn.intertype === 'outer') { - if (btn.callbackType === 'script' && (!btn.verify || !btn.verify.cbScripts || !btn.verify.cbScripts.filter(item => item.status !== 'false').length === 0)) { - notification.warning({ - top: 92, - message: '浣跨敤鑷畾涔夎剼鏈洖璋冩椂锛屽洖璋冭剼鏈笉鍙负绌猴紒', - duration: 5 - }) - return false - } else if (btn.procMode === 'system' && data.length === 0 && btn.verify && btn.verify.voucher && btn.verify.voucher.enabled) { - notification.warning({ - top: 92, - message: '浣跨敤鍒涘缓鍑瘉鍑芥暟锛岄渶瑕侀�夋嫨琛岋紒', - duration: 5 - }) - return false - } else if (btn.intertype === 'custom' && window.GLOB.systemType === 'production' && !btn.proInterface) { - notification.warning({ - top: 92, - message: '灏氭湭璁剧疆姝e紡绯荤粺鎺ュ彛鍦板潃锛�', - duration: 5 - }) - return false - } + } else if (btn.intertype === 'custom' && window.GLOB.systemType === 'production' && !btn.proInterface) { + notification.warning({ + top: 92, + message: dict['no_prod_link'] || '灏氭湭璁剧疆姝e紡绯荤粺鎺ュ彛鍦板潃锛�', + duration: 5 + }) + return false } return true @@ -1081,7 +1062,7 @@ if (times > 50) { notification.warning({ top: 92, - message: '鍓嶇疆鎸夐挳鍔犺浇澶辫触锛�', + message: window.GLOB.dict['pre_btn_failed'] || '鍓嶇疆鎸夐挳鍔犺浇澶辫触锛�', duration: 5 }) this.setState({loading: false}) @@ -1119,7 +1100,7 @@ if (setting.supModule && !BID) { notification.warning({ top: 92, - message: '闇�瑕佷笂绾т富閿�硷紒', + message: window.GLOB.dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) _resolve() @@ -1846,8 +1827,10 @@ } const _this = this confirm({ - title: '璇风‘璁�', + title: window.GLOB.dict['exec_sure'] || '璇风‘璁�', content: msg, + okText: window.GLOB.dict['ok'] || '纭畾', + cancelText: window.GLOB.dict['cancel'] || '鍙栨秷', onOk() { return new Promise(resolve => { Api.genericInterface(unCheckParam).then(result => { @@ -2244,7 +2227,7 @@ */ execSuccess = (res = {}) => { const { btn } = this.props - const { autoMatic } = this.state + const { autoMatic, dict } = this.state if (btn.resetForms) { let data = {} @@ -2326,18 +2309,19 @@ if (btn.formType !== 'counter' || res.message) { notification.success({ top: 92, - message: res.message || '鎵ц鎴愬姛锛�', + message: res.message || dict['exc_success'] || '鎵ц鎴愬姛锛�', duration: btn.verify && btn.verify.stime ? btn.verify.stime : 2 }) } } else if (res.ErrCode === 'Y') { // 鎵ц鎴愬姛 - let msg = res.message || '鎵ц鎴愬姛锛�' + let msg = res.message || dict['exc_success'] || '鎵ц鎴愬姛锛�' if (/\n|\r/.test(msg)) { msg = msg.replace(/\n|\r/ig, '<br/>') msg = <span dangerouslySetInnerHTML={{__html: msg}}></span> } Modal.success({ title: msg, + okText: dict['got_it'] || '鐭ラ亾浜�', onOk: () => { this.successContinue(sign, id, res, focusField) } @@ -2467,7 +2451,7 @@ if (!url) { notification.warning({ top: 92, - message: '灏氭湭娣诲姞姝e紡绯荤粺閾炬帴鍦板潃锛�', + message: window.GLOB.dict['no_prod_link'] || '灏氭湭璁剧疆姝e紡绯荤粺閾炬帴鍦板潃锛�', duration: 5 }) return @@ -2986,7 +2970,7 @@ */ execError = (res = {}) => { const { btn } = this.props - const { autoMatic } = this.state + const { autoMatic, dict } = this.state if (this.preCallback) { this.setState({ @@ -2998,7 +2982,7 @@ } else if (autoMatic) { notification.error({ top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: 10 }) @@ -3038,13 +3022,14 @@ } if (res.ErrCode === 'E') { - let msg = res.message || '鎵ц澶辫触锛�' + let msg = res.message || dict['exc_fail'] || '鎵ц澶辫触锛�' if (/\n|\r/.test(msg)) { msg = msg.replace(/\n|\r/ig, '<br/>') msg = <span dangerouslySetInnerHTML={{__html: msg}}></span> } Modal.error({ title: msg, + okText: dict['got_it'] || '鐭ラ亾浜�', onOk: () => { this.errorContinue(sign) } @@ -3053,18 +3038,18 @@ } else if (res.ErrCode === 'N') { notification.error({ top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: btn.verify && btn.verify.ntime ? btn.verify.ntime : 10 }) } else if (res.ErrCode === 'F') { notification.error({ className: 'notification-custom-error', top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: btn.verify && btn.verify.ftime ? btn.verify.ftime : 10 }) } else if (res.ErrCode === 'NM') { - message.error(res.message || '鎵ц澶辫触锛�') + message.error(res.message || dict['exc_fail'] || '鎵ц澶辫触锛�') } else if (res.ErrCode === '-2') { this.setState({ loadingNumber: '', @@ -3297,7 +3282,7 @@ modelconfirm = () => { const { BID } = this.props - const { btnconfig, selines } = this.state + const { btnconfig, selines, dict } = this.state let _this = this let result = [] @@ -3441,7 +3426,9 @@ this.execSubmit(selines, () => {}, result) } else { confirm({ - title: btnconfig.setting.tipTitle || '纭畾瑕佹墽琛屽悧?', + title: btnconfig.setting.tipTitle || dict['exec_sure'] || '纭畾瑕佹墽琛屽悧?', + okText: dict['ok'] || '纭畾', + cancelText: dict['cancel'] || '鍙栨秷', onOk() { return new Promise(resolve => { _this.execSubmit(selines, resolve, result) @@ -3460,7 +3447,7 @@ */ getModels = () => { const { BID, btn, BData } = this.props - const { btnconfig, visible } = this.state + const { btnconfig, visible, dict } = this.state if (!btnconfig || !btnconfig.setting) return null @@ -3496,10 +3483,10 @@ /> <div className="ant-drawer-footer" style={{ position: 'absolute', zIndex: 1, right: 0, bottom: 0, width: '100%', borderTop: '1px solid #e9e9e9', padding: '10px 16px', background: '#fff', textAlign: 'right'}}> <Button onClick={this.handleCancel} style={{ marginRight: 8 }}> - {btnconfig.setting.formType !== 'check' ? '鍙栨秷' : '鍏抽棴'} + {btnconfig.setting.formType !== 'check' ? dict['cancel'] || '鍙栨秷' : dict['close'] || '鍏抽棴'} </Button> {btnconfig.setting.formType !== 'check' ? <Button onClick={this.handleOk} loading={this.state.confirmLoading} type="primary"> - 纭畾 + {dict['ok'] || '纭畾'} </Button> : null} </div> </Drawer> @@ -3527,6 +3514,8 @@ wrapClassName={'action-modal' + (btnconfig.setting.moveable === 'true' ? ' moveable-modal modal-' + btn.uuid : '')} visible={visible} width={width} + okText={dict['ok'] || '纭畾'} + cancelText={dict['cancel'] || '鍙栨秷'} onOk={this.handleOk} maskStyle={btnconfig.setting.moveable === 'true' ? {backgroundColor: 'rgba(0, 0, 0, 0.15)'} : null} confirmLoading={this.state.confirmLoading} @@ -3591,7 +3580,7 @@ changeLineCount = (count) => { const { btn, selectedData } = this.props - const { disabled } = this.state + const { disabled, dict } = this.state if (disabled) return @@ -3601,7 +3590,7 @@ // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹� notification.warning({ top: 92, - message: '璇烽�夋嫨琛岋紒', + message: dict['select_row'] || '璇烽�夋嫨琛岋紒', duration: 5 }) return @@ -3609,7 +3598,7 @@ // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁 notification.warning({ top: 92, - message: '璇烽�夋嫨鍗曡鏁版嵁锛�', + message: dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�', duration: 5 }) return diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx index dce034b..c6a9e99 100644 --- a/src/tabviews/zshare/actionList/popupbutton/index.jsx +++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx @@ -30,6 +30,7 @@ disabled: false, hidden: false, loading: false, + dict: window.GLOB.dict } UNSAFE_componentWillMount () { @@ -143,7 +144,7 @@ */ actionTrigger = (triggerId, record, type, lid) => { const { setting, BID, btn, selectedData, LID } = this.props - const { loading, disabled } = this.state + const { loading, disabled, dict } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return @@ -154,7 +155,7 @@ if (setting.supModule && !BID) { notification.warning({ top: 92, - message: '闇�瑕佷笂绾т富閿�硷紒', + message: dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) return @@ -162,7 +163,7 @@ // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁 notification.warning({ top: 92, - message: data.length === 0 ? '璇烽�夋嫨琛岋紒' : '璇烽�夋嫨鍗曡鏁版嵁锛�', + message: data.length === 0 ? dict['select_row'] || '璇烽�夋嫨琛岋紒' : dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�', duration: 5 }) return @@ -230,7 +231,7 @@ getPop = () => { const { btn } = this.props - const { popData, primaryId, visible } = this.state + const { popData, primaryId, visible, dict } = this.state let ratio = btn.ratio || 85 @@ -248,7 +249,7 @@ visible={visible} onCancel={this.popclose} footer={[ - <Button key="close" onClick={this.popclose}>鍏抽棴</Button> + <Button key="close" onClick={this.popclose}>{dict['close'] || '鍏抽棴'}</Button> ]} destroyOnClose > @@ -292,7 +293,7 @@ {btn.$view === 'popview' ? <PopView Tab={btn} param={{$BID: (popData ? primaryId : this.props.BID), ...(popData || this.props.BData || {})}} /> : null} <div className="close-drawer"> <Button onClick={this.popclose}> - 鍏抽棴 + {dict['close'] || '鍏抽棴'} </Button> </div> </Drawer> diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index 08898cd..6d2e96c 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -37,7 +37,8 @@ loading: false, disabled: false, hidden: false, - autoMatic: false + autoMatic: false, + dict: window.GLOB.dict } UNSAFE_componentWillMount () { @@ -132,7 +133,7 @@ */ actionTrigger = (triggerId, record, type, lid) => { const { BID, btn, selectedData, setting, LID } = this.props - const { loading, disabled } = this.state + const { loading, disabled, dict } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return @@ -141,7 +142,7 @@ if (setting.supModule && !BID) { notification.warning({ top: 92, - message: '闇�瑕佷笂绾т富閿�硷紒', + message: dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) return @@ -156,7 +157,7 @@ // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹� notification.warning({ top: 92, - message: '璇烽�夋嫨琛岋紒', + message: dict['select_row'] || '璇烽�夋嫨琛岋紒', duration: 5 }) return @@ -164,21 +165,7 @@ // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁 notification.warning({ top: 92, - message: '璇烽�夋嫨鍗曡鏁版嵁锛�', - duration: 5 - }) - return - } else if (!btn.verify || !btn.verify.printMode) { - notification.warning({ - top: 92, - message: '璇峰畬鍠勬墦鍗伴獙璇佷俊鎭紒', - duration: 5 - }) - return - } else if (btn.intertype === 'system' && btn.verify.dataType === 'custom' && (!btn.verify.setting || btn.verify.columns.length === 0)) { - notification.warning({ - top: 92, - message: '鑷畾涔夋墦鍗版暟鎹璁剧疆鏁版嵁婧愶紒', + message: dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�', duration: 5 }) return @@ -203,7 +190,9 @@ } else if (btn.execMode === 'prompt') { this.setState({ loading: true }) confirm({ - title: '纭畾瑕佹墽琛屽悧?', + title: dict['exec_sure'] || '纭畾瑕佹墽琛屽悧?', + okText: dict['ok'] || '纭畾', + cancelText: dict['cancel'] || '鍙栨秷', onOk() { _this.triggerPrint(data) }, @@ -507,7 +496,7 @@ if (list.length === 0) { notification.warning({ top: 92, - message: '鏈幏鍙栧埌鎵撳嵃鏁版嵁锛�', + message: window.GLOB.dict['no_data'] || '鏈幏鍙栧埌鎵撳嵃鏁版嵁锛�', duration: 5 }) return false @@ -534,7 +523,7 @@ if (!result.ConfigParam) { notification.warning({ top: 92, - message: '鏈幏鍙栧埌鎵撳嵃妯℃澘淇℃伅锛�', + message: window.GLOB.dict['no_print_temp'] || '鏈幏鍙栧埌鎵撳嵃妯℃澘淇℃伅锛�', duration: 5 }) this.setState({ loading: false }) @@ -785,7 +774,7 @@ notification.warning({ top: 92, - message: '鑷畾涔夊嚱鏁版墽琛岄敊璇紒', + message: window.GLOB.dict['func_error'] || '鑷畾涔夊嚱鏁版墽琛岄敊璇紒', duration: 5 }) } @@ -1345,7 +1334,7 @@ let imgs = [] if (!res.ConfigParam) { - error = '鏈幏鍙栧埌鎵撳嵃妯℃澘淇℃伅锛�' + error = window.GLOB.dict['no_print_temp'] || '鏈幏鍙栧埌鎵撳嵃妯℃澘淇℃伅锛�' } else { try { configParam = JSON.parse(window.decodeURIComponent(window.atob(res.ConfigParam))) @@ -1502,7 +1491,7 @@ if (list.length === 0) { notification.warning({ top: 92, - message: '鏈幏鍙栧埌鎵撳嵃鏁版嵁锛�', + message: window.GLOB.dict['no_data'] || '鏈幏鍙栧埌鎵撳嵃鏁版嵁锛�', duration: 5 }) this.setState({ loading: false }) @@ -1621,7 +1610,7 @@ Api.postekPrint(param).then(res => { if (res.retval === '0') { if (params.length === 0) { - this.execSuccess({ ErrCode: 'S', message: '鎵撳嵃璇锋眰宸插彂鍑恒��', status: true }) + this.execSuccess({ ErrCode: 'S', message: window.GLOB.dict['print_out'] || '鎵撳嵃璇锋眰宸插彂鍑恒��', status: true }) } else { setTimeout(() => { this.loopRFIDPrint(params) @@ -1639,6 +1628,8 @@ execPrint = (list, template) => { const { btn } = this.props + const { dict } = this.state + let _errors = [] let defaultPrinter = btn.verify.defaultPrinter || 'lackprinter' @@ -1739,13 +1730,13 @@ if (btn.verify.emptyTip === 'false') { this.execSuccess({ ErrCode: '-1', - message: '鏈幏鍙栧埌鎵撳嵃淇℃伅锛�', + message: dict['no_data'] || '鏈幏鍙栧埌鎵撳嵃淇℃伅锛�', status: true }) } else { this.execError({ ErrCode: 'N', - message: '鏈幏鍙栧埌鎵撳嵃淇℃伅锛�', + message: dict['no_data'] || '鏈幏鍙栧埌鎵撳嵃淇℃伅锛�', status: false }) } @@ -1759,7 +1750,7 @@ lackerror.push(`鏁版嵁涓湭鑾峰彇鍒版ā鏉匡紙${err.title}锛�${err.lacks.join('銆�')} 瀛楁`) } if (err.emptys.length > 0) { - emptyerror.push(`鏁版嵁涓ā鏉匡紙${err.title}锛� ${err.emptys.join('銆�')} 瀛楁涓嶅彲涓虹┖`) + emptyerror.push(dict['not_empty'] ? `${err.title}: ${err.emptys.join('銆�')} ${dict['not_empty']}` : `鏁版嵁涓ā鏉匡紙${err.title}锛� ${err.emptys.join('銆�')} 瀛楁涓嶅彲涓虹┖`) } }) @@ -1783,7 +1774,7 @@ if (printerList.length === 0) { this.execSuccess({ ErrCode: '-1', - message: '鏈幏鍙栧埌鎵撳嵃淇℃伅锛�', + message: dict['no_data'] || '鏈幏鍙栧埌鎵撳嵃淇℃伅锛�', status: true }) return @@ -1795,7 +1786,7 @@ this.syncMessageSend(printerList, () => { this.execSuccess({ ErrCode: 'S', - message: '鎵撳嵃璇锋眰宸插彂鍑恒��', + message: dict['print_out'] || '鎵撳嵃璇锋眰宸插彂鍑恒��', status: true }) }) @@ -1806,7 +1797,7 @@ this.syncMessageSend(printerList, () => { this.execSuccess({ ErrCode: 'S', - message: '鎵撳嵃璇锋眰宸插彂鍑恒��', + message: dict['print_out'] || '鎵撳嵃璇锋眰宸插彂鍑恒��', status: true }) }) @@ -1857,7 +1848,7 @@ socket.onerror = () => { this.execError({ ErrCode: 'N', - message: '鏃犳硶杩炴帴鍒�:' + btn.verify.linkUrl, + message: (dict['un_connect'] || '鏃犳硶杩炴帴鍒�') + ':' + btn.verify.linkUrl, status: false }) } @@ -1893,17 +1884,18 @@ */ execSuccess = (res = {}) => { const { btn } = this.props - const { autoMatic, btnconfig } = this.state + const { autoMatic, btnconfig, dict } = this.state if ((res.ErrCode === 'S' || !res.ErrCode) || autoMatic) { // 鎵ц鎴愬姛 notification.success({ top: 92, - message: res.message || '鎵ц鎴愬姛锛�', + message: res.message || dict['exc_success'] || '鎵ц鎴愬姛锛�', duration: btn.verify && btn.verify.stime ? btn.verify.stime : 2 }) } else if (res.ErrCode === 'Y') { // 鎵ц鎴愬姛 Modal.success({ - title: res.message || '鎵ц鎴愬姛锛�' + title: res.message || dict['exc_success'] || '鎵ц鎴愬姛锛�', + okText: dict['got_it'] || '鐭ラ亾浜�' }) } else if (res.ErrCode === '-1') { // 瀹屾垚鍚庝笉鎻愮ず @@ -1942,7 +1934,7 @@ */ execError = (res) => { const { btn } = this.props - const { btnconfig, autoMatic } = this.state + const { btnconfig, autoMatic, dict } = this.state if (!['LoginError', 'C', '-2', 'E', 'N', 'F', 'NM'].includes(res.ErrCode)) { res.ErrCode = 'E' @@ -1950,23 +1942,24 @@ if (res.ErrCode === 'E' && !autoMatic) { Modal.error({ - title: res.message || '鎵ц澶辫触锛�', + title: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', + okText: dict['got_it'] || '鐭ラ亾浜�' }) } else if (res.ErrCode === 'N' || autoMatic) { notification.error({ top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: btn.verify && btn.verify.ntime ? btn.verify.ntime : 10 }) } else if (res.ErrCode === 'F') { notification.error({ className: 'notification-custom-error', top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: btn.verify && btn.verify.ftime ? btn.verify.ftime : 10 }) } else if (res.ErrCode === 'NM') { - message.error(res.message || '鎵ц澶辫触锛�') + message.error(res.message || dict['exc_fail'] || '鎵ц澶辫触锛�') } this.setState({ @@ -2114,7 +2107,7 @@ } modelconfirm = () => { - const { btnconfig, selines } = this.state + const { btnconfig, selines, dict } = this.state let _this = this let result = [] let _data = {} @@ -2257,7 +2250,9 @@ this.execSubmit(selines, () => {}, result) } else { confirm({ - title: '纭畾瑕佹墽琛屽悧?', + title: dict['exec_sure'] || '纭畾瑕佹墽琛屽悧?', + okText: dict['ok'] || '纭畾', + cancelText: dict['cancel'] || '鍙栨秷', onOk() { _this.triggerPrint(selines, result) }, @@ -2273,7 +2268,7 @@ */ getModels = () => { const { BID, btn } = this.props - const { btnconfig } = this.state + const { btnconfig, dict } = this.state if (!this.state.visible || !btnconfig || !btnconfig.setting) return null @@ -2307,6 +2302,8 @@ visible={this.state.visible} confirmLoading={this.state.confirmLoading} width={width} + okText={dict['ok'] || '纭畾'} + cancelText={dict['cancel'] || '鍙栨秷'} maskStyle={btnconfig.setting.moveable === 'true' ? {backgroundColor: 'rgba(0, 0, 0, 0.15)'} : null} onOk={this.handleOk} onCancel={this.handleCancel} diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx index d96f206..94322e0 100644 --- a/src/tabviews/zshare/actionList/tabbutton/index.jsx +++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx @@ -22,7 +22,8 @@ state = { disabled: false, hidden: false, - primaryId: '' + primaryId: '', + dict: window.GLOB.dict } UNSAFE_componentWillMount () { @@ -102,7 +103,7 @@ */ actionTrigger = (triggerId, record, type, lid) => { const { btn, selectedData, BID, LID } = this.props - const { disabled } = this.state + const { disabled, dict } = this.state if (disabled || btn.multiMenus) return if (triggerId && btn.uuid !== triggerId) return @@ -114,7 +115,7 @@ // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹� notification.warning({ top: 92, - message: '璇烽�夋嫨琛岋紒', + message: dict['select_row'] || '璇烽�夋嫨琛岋紒', duration: 5 }) return false @@ -122,7 +123,7 @@ // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁 notification.warning({ top: 92, - message: '璇烽�夋嫨鍗曡鏁版嵁锛�', + message: dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�', duration: 5 }) return @@ -187,7 +188,7 @@ if (!menu) { notification.warning({ top: 92, - message: '鑿滃崟宸插垹闄ゆ垨娌℃湁璁块棶鏉冮檺锛�', + message: dict['no_perm'] || '鑿滃崟宸插垹闄ゆ垨娌℃湁璁块棶鏉冮檺锛�', duration: 5 }) return @@ -219,6 +220,7 @@ triggerMenu = (tab) => { const { btn, selectedData, BID } = this.props + const { dict } = this.state let data = selectedData || [] @@ -226,7 +228,7 @@ // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹� notification.warning({ top: 92, - message: '璇烽�夋嫨琛岋紒', + message: dict['select_row'] || '璇烽�夋嫨琛岋紒', duration: 5 }) return false @@ -234,7 +236,7 @@ // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁 notification.warning({ top: 92, - message: '璇烽�夋嫨鍗曡鏁版嵁锛�', + message: dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�', duration: 5 }) return @@ -283,7 +285,7 @@ if (!menu) { notification.warning({ top: 92, - message: '鑿滃崟宸插垹闄ゆ垨娌℃湁璁块棶鏉冮檺锛�', + message: dict['no_perm'] || '鑿滃崟宸插垹闄ゆ垨娌℃湁璁块棶鏉冮檺锛�', duration: 5 }) return diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 75e47b3..3b6fcc1 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -6,7 +6,6 @@ import moment from 'moment' import Api from '@/api' -import { formRule } from '@/utils/option.js' import Utils from '@/utils/utils.js' import asyncComponent from '@/utils/asyncComponent' import MKEmitter from '@/utils/events.js' @@ -48,7 +47,8 @@ timestamp: '', n_id: '', focusId: '', - reFocusId: '' + reFocusId: '', + dict: window.GLOB.dict } record = {} @@ -56,6 +56,7 @@ componentDidMount () { const { action, unload } = this.props + const { dict } = this.state let data = {} let BData = {} @@ -315,14 +316,14 @@ if (item.required === 'true') { item.rules.push({ required: true, - message: item.label + '涓嶅彲涓虹┖!' + message: item.label + (dict['not_empty'] || '涓嶅彲涓虹┖锛�') }) } item.rules.push({ validator: (rule, value, callback) => { if (/'/.test(value)) { - callback('涓嶅彲浣跨敤鑻辨枃鐘舵�佺殑鍗曞紩鍙凤紒') + callback(dict['single_quot'] || '涓嶅彲浣跨敤鑻辨枃鐘舵�佺殑鍗曞紩鍙凤紒') // } else if (/--/.test(value)) { // callback('涓嶅彲浣跨敤 -- 锛�') } else { @@ -334,7 +335,7 @@ if (!item.lenControl || item.lenControl === 'limit') { item.rules.push({ max: item.fieldlength, - message: formRule.input.formMessage.replace('@max', item.fieldlength) + message: (dict['max_char'] || '鏈�澶欯max涓瓧绗�').replace('@max', item.fieldlength) }) } @@ -346,7 +347,7 @@ } item.rules.push({ pattern: reg, - message: item.regularText || formRule.input.numbermsg + message: item.regularText || dict['enter_num'] || '璇疯緭鍏ユ暟瀛楋紒' }) } else if (item.regular === 'letter') { let reg = /^[a-zA-Z]*$/ @@ -355,7 +356,7 @@ } item.rules.push({ pattern: reg, - message: item.regularText || formRule.input.lettermsg + message: item.regularText || dict['enter_letter'] || '璇疯緭鍏ュ瓧姣嶏紒' }) } else if (item.regular === 'letter_number') { let reg = /^[a-zA-Z0-9]*$/ @@ -364,7 +365,7 @@ } item.rules.push({ pattern: reg, - message: item.regularText || '璇疯緭鍏ユ暟瀛楁垨瀛楁瘝' + message: item.regularText || dict['enter_num_letter'] || '璇疯緭鍏ユ暟瀛楁垨瀛楁瘝' }) } else if (item.regular === 'letter&number') { let reg = /^[a-zA-Z0-9@_.]*$/ @@ -373,24 +374,24 @@ } item.rules.push({ pattern: reg, - message: item.regularText || '璇疯緭鍏ユ暟瀛椼�佸瓧姣嶄互鍙夽_.' + message: item.regularText || dict['enter_num_letter_char'] || '璇疯緭鍏ユ暟瀛椼�佸瓧姣嶄互鍙夽_.' }) } else if (item.regular === 'phone') { item.rules.push({ pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, - message: item.regularText || '璇锋纭緭鍏ユ墜鏈哄彿' + message: item.regularText || dict['phone_error'] || '璇锋纭緭鍏ユ墜鏈哄彿' }) } else if (item.regular === 'email') { item.rules.push({ pattern: /^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/, - message: item.regularText || '璇锋纭緭鍏ラ偖绠卞湴鍧�' + message: item.regularText || dict['email_error'] || '璇锋纭緭鍏ラ偖绠卞湴鍧�' }) } } } else if (item.type === 'number') { item.rules = [{ required: true, - message: item.label + '涓嶅彲涓虹┖!' + message: item.label + (dict['not_empty'] || '涓嶅彲涓虹┖锛�') }] if (typeof(item.min) === 'number' || typeof(item.max) === 'number' || item.notZero === 'true') { @@ -399,7 +400,7 @@ if (isNaN(value)) { callback() } else if (item.notZero === 'true' && value === 0) { - callback(item.label + '涓嶅彲涓�0') + callback(item.label + (dict['not_zero'] || '涓嶅彲涓�0')) } else if (typeof(item.min) === 'number' && value < item.min) { if (item.min < 1e-6) { if (item.min === 1e-6) { @@ -418,10 +419,10 @@ callback(item.label + '鏈�灏忓�间负 ' + item.min) } } else { - callback(item.label + '鏈�灏忓�间负 ' + item.min) + callback(item.label + (dict['less_limit'] || '鏈�灏忓�间负 ') + item.min) } } else if (typeof(item.max) === 'number' && value > item.max) { - callback(item.label + '鏈�澶у�间负 ' + item.max) + callback(item.label + (dict['max_limit'] || '鏈�澶у�间负 ') + item.max) } else { callback() } @@ -432,14 +433,14 @@ if (item.required === 'true') { item.rules.push({ required: true, - message: item.label + '涓嶅彲涓虹┖!' + message: item.label + (dict['not_empty'] || '涓嶅彲涓虹┖锛�') }) } item.rules.push({ validator: (rule, value, callback) => { if (/'/.test(value)) { - callback('涓嶅彲浣跨敤鑻辨枃鐘舵�佺殑鍗曞紩鍙凤紒') + callback(dict['single_quot'] || '涓嶅彲浣跨敤鑻辨枃鐘舵�佺殑鍗曞紩鍙凤紒') // } else if (/--/.test(value)) { // callback('涓嶅彲浣跨敤 -- 锛�') } else { @@ -448,38 +449,38 @@ } }, { max: item.fieldlength, - message: formRule.input.formMessage.replace('@max', item.fieldlength) + message: (dict['max_char'] || '鏈�澶欯max涓瓧绗�').replace('@max', item.fieldlength) }) } else if (item.type === 'brafteditor') { if (item.required === 'true') { item.rules.push({ required: true, - message: item.label + '涓嶅彲涓虹┖!' + message: item.label + (dict['not_empty'] || '涓嶅彲涓虹┖锛�') }) } item.rules.push({ max: item.fieldlength, - message: formRule.input.formMessage.replace('@max', item.fieldlength) + message: (dict['max_char'] || '鏈�澶欯max涓瓧绗�').replace('@max', item.fieldlength) }) } else if (item.type === 'linkMain' || item.type === 'vercode') { if (item.required === 'true') { item.rules.push({ required: true, - message: item.label + '涓嶅彲涓虹┖!' + message: item.label + (dict['not_empty'] || '涓嶅彲涓虹┖锛�') }) } } else { if (item.required === 'true') { item.rules.push({ required: true, - message: '璇烽�夋嫨' + item.label + '!' + message: (dict['select_tip'] || '璇烽�夋嫨') + item.label + '!' }) } if (['cascader', 'checkbox', 'checkcard', 'fileupload', 'multiselect'].includes(item.type) && item.fieldlength) { item.rules.push({ max: item.fieldlength, - message: formRule.input.formMessage.replace('@max', item.fieldlength) + message: (dict['max_char'] || '鏈�澶欯max涓瓧绗�').replace('@max', item.fieldlength) }) } } diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index 47f13bc..f169891 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -730,7 +730,7 @@ const _rules = [ { required: item.required, - message: item.label + '涓嶅彲涓虹┖!' + message: item.label + (window.GLOB.dict['not_empty'] || '涓嶅彲涓虹┖锛�') } ] @@ -791,13 +791,13 @@ wrapperCol={setting.wrapperCol} > {setting.show ? <Button style={style} type="primary" onClick={this.handleSubmit}> - 鎼滅储 + {window.GLOB.dict['search'] || '鎼滅储'} </Button> : null} {setting.show ? <Button style={{ marginLeft: 8, ...style }} onClick={this.handleReset}> - 閲嶇疆 + {window.GLOB.dict['reset'] || '閲嶇疆'} </Button> : null} {setting.showAdv ? <Button className={visible ? 'visible' : ''} type="link" onClick={this.handleAdvance}> - 楂樼骇{setting.advanceType === 'pulldown' ? <DownOutlined /> : null} + {window.GLOB.dict['senior'] || '楂樼骇'}{setting.advanceType === 'pulldown' ? <DownOutlined /> : null} </Button> : null} </Form.Item> </Col> @@ -807,7 +807,7 @@ <Col className="mk-search-col search-button" key="actions"> <Form.Item> <Button type="primary" onClick={this.handleSubmit}> - 鎼滅储 + {window.GLOB.dict['search'] || '鎼滅储'} </Button> </Form.Item> </Col> @@ -893,7 +893,7 @@ notification.warning({ top: 92, - message: '璇疯緭鍏�' + labels.join('銆�') + ' !', + message: (window.GLOB.dict['input_tip'] || '璇疯緭鍏�') + labels.join('銆�') + ' !', duration: 3 }) return @@ -1141,7 +1141,7 @@ </Row> : null} </Form> {setting.advanceType === 'modal' ? <Modal - title="楂樼骇鎼滅储" + title={window.GLOB.dict['adv_search'] || '楂樼骇鎼滅储'} maskClosable={false} visible={visible} width={setting.advWidth} @@ -1157,7 +1157,7 @@ /> </Modal> : null} {setting.advanceType === 'drawer' ? <Drawer - title="楂樼骇鎼滅储" + title={window.GLOB.dict['adv_search'] || '楂樼骇鎼滅储'} className="mk-search-drawer" width={setting.advWidth} height={setting.advHeight} diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx index 59cfe17..f0d8651 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx @@ -232,11 +232,25 @@ let _value = '' if (value === 'default') { - let fields = usefulfields.filter(item => item.import !== 'false') - fields = fields.map(col => col.Column).join(',') + let fields = [] + let decls = [] + usefulfields.forEach(col => { + if (col.import === 'false') return + + if (col.type === 'date') { + decls.push(`${col.Column} Nvarchar(50)`) + } else { + decls.push(`${col.Column} ${col.type}`) + } + fields.push(col.Column) + }) + + decls = decls.join(',') + fields = fields.join(',') if (fields) { fields = fields + ',' + decls = decls + ',' } let database = btn.sheet.match(/(.*)\.(.*)\.|@db@/ig) || '' @@ -244,7 +258,7 @@ database = database ? (database[0] || '') : '' - _value = `Insert into ${database}${sheet} (${fields}createuserid,createuser,createstaff,bid)\nSelect ${fields}@userid@,@username,@fullname,@BID@ From #${sheet}` + _value = `/* create table #${sheet} (${decls}jskey nvarchar(50),BID nvarchar(50) ) */\nInsert into ${database}${sheet} (${fields}createuserid,createuser,createstaff,bid)\nSelect ${fields}@userid@,@username,@fullname,@BID@ From #${sheet}` } else if (value === 'flowSql') { let sheet = btn.sheet.replace(/(.*)\.(.*)\.|@db@/ig, '') diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx index d8cc4d1..0979803 100644 --- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx @@ -234,8 +234,11 @@ if (this.record.selectStyle === 'custom') { shows.push('backgroundColor') } - if (this.record.multiple === 'dropdown' && this.record.resourceType === '1') { - shows.push('mark', 'parentField') + if (this.record.multiple === 'dropdown') { + shows.push('mark') + if (this.record.resourceType === '1') { + shows.push('parentField') + } } } shows.push('linkField') diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index 68420fa..1141a14 100644 --- a/src/utils/utils-custom.js +++ b/src/utils/utils-custom.js @@ -1799,23 +1799,31 @@ if (!cell.modal || cell.modal.fields.length === 0) { errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅腑琛ㄥ崟灏氭湭娣诲姞`}) } - } else if (cell.OpenType === 'excelIn' && (!cell.verify || !cell.verify.sheet || !cell.verify.columns || cell.verify.columns.length === 0)) { - errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅腑瀵煎叆鍒楁湭璁剧疆锛乣}) + } else if (cell.OpenType === 'excelIn') { + if (!cell.verify || !cell.verify.sheet || !cell.verify.columns || cell.verify.columns.length === 0) { + errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅腑瀵煎叆鍒楁湭璁剧疆锛乣}) + } } else if (cell.OpenType === 'excelOut') { if (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0) { errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅腑瀵煎嚭鍒楁湭璁剧疆锛乣}) - } else if (cell.intertype === 'system' && cell.verify.dataType !== 'custom' && card.$c_ds && columns.length > 0) { - let cols = [] - cell.verify.columns.forEach(col => { - if (col.output === 'false' || col.Column === '$Index') return - if (!columns.includes(col.Column)) { - cols.push(col.Column) + } else if (cell.intertype === 'system' && cell.verify.dataType !== 'custom') { + if (!card.setting || card.setting.interType !== 'system') { + errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濋渶鑷畾涔夊鍑烘暟鎹簮锛乣}) + } else if (card.type === 'balcony' || card.subtype === 'propcard') { + errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濋渶鑷畾涔夊鍑烘暟鎹簮锛乣}) + } else if (card.$c_ds && columns.length > 0) { + let cols = [] + cell.verify.columns.forEach(col => { + if (col.output === 'false' || col.Column === '$Index') return + if (!columns.includes(col.Column)) { + cols.push(col.Column) + } + }) + if (cols.length) { + errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅腑瀵煎嚭鍒楋紙${cols.join('銆�')}锛夊湪瀛楁闆嗕腑涓嶅瓨鍦紒`}) } - }) - if (cols.length) { - errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅腑瀵煎嚭鍒楋紙${cols.join('銆�')}锛夊湪瀛楁闆嗕腑涓嶅瓨鍦紒`}) } - } + } } if (['pop', 'prompt', 'exec'].includes(cell.OpenType) && cell.verify && !cell.output) { @@ -1823,6 +1831,32 @@ errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濇湭璁剧疆杩斿洖鍊肩煭淇″彂閫佹棤鏁堬紒`}) } else if (cell.verify.emailEnable === 'true') { errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濇湭璁剧疆杩斿洖鍊奸偖浠跺彂閫佹棤鏁堬紒`}) + } + } + + if (['exec', 'prompt', 'pop', 'form', 'formSubmit'].includes(cell.OpenType)) { + if (cell.OpenType === 'form' && cell.formType === 'count_line') return + + if (cell.intertype === 'system') { + if (cell.Ot === 'notRequired' && cell.verify && cell.verify.voucher && cell.verify.voucher.enabled) { + errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅娇鐢ㄤ簡鍒涘缓鍑瘉鍑芥暟锛岄渶瑕侀�夋嫨琛岋紒`}) + } + } else if (cell.intertype === 'custom' || cell.intertype === 'outer') { + if (cell.callbackType === 'script' && (!cell.verify || !cell.verify.cbScripts || !cell.verify.cbScripts.filter(item => item.status !== 'false').length === 0)) { + errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅娇鐢ㄤ簡鑷畾涔夎剼鏈洖璋冿紝鍥炶皟鑴氭湰涓嶅彲涓虹┖锛乣}) + } else if (cell.procMode === 'system' && cell.Ot === 'notRequired' && cell.verify && cell.verify.voucher && cell.verify.voucher.enabled) { + errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅娇鐢ㄤ簡鍒涘缓鍑瘉鍑芥暟锛岄渶瑕侀�夋嫨琛岋紒`}) + } + } + } else if (cell.OpenType === 'funcbutton' && cell.funcType === 'print') { + if (!cell.verify || !cell.verify.printMode) { + errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濊瀹屽杽楠岃瘉淇℃伅锛乣}) + } else if (cell.intertype === 'system' && cell.verify.dataType === 'custom' && (!cell.verify.setting || cell.verify.columns.length === 0)) { + errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅娇鐢ㄤ簡鑷畾涔夋墦鍗版暟鎹紝璇疯缃暟鎹簮锛乣}) + } + } else if (cell.OpenType === 'innerpage' || cell.OpenType === 'outerpage') { + if (!cell.pageTemplate) { + errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濋〉闈㈢被鍨嬭缃敊璇紒`}) } } } @@ -2601,13 +2635,13 @@ if (item.wrap.click === 'menu') { resetMenu(item.wrap) } else if (item.wrap.click === 'menus') { - resetMenus(config.wrap) + resetMenus(item.wrap) } } else if (item.plot && (item.plot.click === 'menu' || item.plot.click === 'menus')) { if (item.plot.click === 'menu') { resetMenu(item.plot) } else if (item.plot.click === 'menus') { - resetMenus(config.plot) + resetMenus(item.plot) } } if (item.setting && (!item.wrap || !item.wrap.datatype || item.wrap.datatype === 'dynamic')) { diff --git a/src/views/appcheck/index.jsx b/src/views/appcheck/index.jsx index 70f7493..3154996 100644 --- a/src/views/appcheck/index.jsx +++ b/src/views/appcheck/index.jsx @@ -1,7 +1,6 @@ import React, {Component} from 'react' -import { Spin, notification, Table, ConfigProvider, Typography, Row, Col, Tooltip } from 'antd' +import { Spin, notification, Table, Typography, Row, Col, Tooltip } from 'antd' import { QuestionCircleOutlined } from '@ant-design/icons' -import zhCN from 'antd/es/locale/zh_CN' import Api from '@/api' import { langs } from '@/store/options.js' @@ -138,116 +137,114 @@ return ( <div className="mk-app-check"> - <ConfigProvider locale={zhCN}> - <Header view="manage" /> - {loading ? - <div className="loading-mask"> - <Spin size="large" /> - </div> : null - } - <div className="view-wrap"> - <div className="left-view"> - <div className="app-table"> - <Table - rowKey="ID" - columns={columns} - dataSource={applist} - pagination={false} - rowSelection={{ type: 'radio', selectedRowKeys: selectApp ? [selectApp.ID] : [], onChange: this.onSelectChange }} - onRow={(record) => ({ onClick: () => this.setState({ selectApp: record })})} - /> - </div> - </div> - <div className="right-view"> - {selectApp ? <div className="app-title">{selectApp.remark}</div> : null} - {selectApp && selectApp.sublist.map((item, index) => { - let css = skinStyle[item.css] ? skinStyle[item.css].name : '' - let color = skinStyle[item.css] ? skinStyle[item.css].color : '#e8e8e8' - let binding = '' - if (item.user_binding) { - if (item.user_binding.indexOf('uname_pwd') > -1) { - binding = '鐢ㄦ埛鍚�' - } - if (item.user_binding.indexOf('sms_vcode') > -1) { - binding = binding ? binding + '锛屾墜鏈哄彿' : '鎵嬫満鍙�' - } - } - return ( - <div className="sub-app" key={index} style={{borderColor: color}}> - <Row> - <Col span={12}> - <div className="app-item"> - <div className="label">搴旂敤绫诲瀷:</div> - <div className="content" style={{fontSize: '18px', fontWeight: 600}}>{item.typename}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - <div className="label">璇█:</div> - <div className="content" style={{textDecoration: 'underline'}}>{langs[item.lang]}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - <div className="label">鏉冮檺绠$悊:</div> - <div className="content">{item.role_type === 'false' ? '涓嶅惎鐢�' : '鍚敤'}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - <div className="label">鐨偆:</div> - <div className="content" style={{color: color}}>{css}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - {binding ? <div className="label"> - <Tooltip placement="topLeft" title="寰俊鍏紬鍙风櫥褰曟椂锛岀郴缁熺敤鎴蜂笌寰俊鐢ㄦ埛鐨勭粦瀹氭柟寮忋��"> - <QuestionCircleOutlined className="mk-form-tip" /> - 鐢ㄦ埛缁戝畾: - </Tooltip> - </div> : null} - <div className="content">{binding}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - <div className="label">鏍囬:</div> - <div className="content">{item.title || '鏃�'}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - <div className="label">缃戠珯澶村儚:</div> - <div className="content">{item.favicon ? <img style={{width: '18px', height: '18px'}} src={item.favicon} alt="" /> : '鏃�'}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - <div className="label">鐗堟潈:</div> - <div className="content">{item.copyright || '鏃�'}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - <div className="label">LOGO:</div> - <div className="content">{item.logo ? <img style={{height: '18px'}} src={item.logo} alt="" /> : '鏃�'}</div> - </div> - </Col> - </Row> - <div className="action"> - <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${window.GLOB.baseurl}${item.typename === 'pad' ? 'mob' : item.typename}/index.html#/index/${this.state.selectApp.kei_no}/${item.typename !== 'pc' ? item.typename + '/' : ''}${item.lang}` }}></Paragraph> - </div> - </div> - ) - })} + <Header view="manage" /> + {loading ? + <div className="loading-mask"> + <Spin size="large" /> + </div> : null + } + <div className="view-wrap"> + <div className="left-view"> + <div className="app-table"> + <Table + rowKey="ID" + columns={columns} + dataSource={applist} + pagination={false} + rowSelection={{ type: 'radio', selectedRowKeys: selectApp ? [selectApp.ID] : [], onChange: this.onSelectChange }} + onRow={(record) => ({ onClick: () => this.setState({ selectApp: record })})} + /> </div> </div> - </ConfigProvider> + <div className="right-view"> + {selectApp ? <div className="app-title">{selectApp.remark}</div> : null} + {selectApp && selectApp.sublist.map((item, index) => { + let css = skinStyle[item.css] ? skinStyle[item.css].name : '' + let color = skinStyle[item.css] ? skinStyle[item.css].color : '#e8e8e8' + let binding = '' + if (item.user_binding) { + if (item.user_binding.indexOf('uname_pwd') > -1) { + binding = '鐢ㄦ埛鍚�' + } + if (item.user_binding.indexOf('sms_vcode') > -1) { + binding = binding ? binding + '锛屾墜鏈哄彿' : '鎵嬫満鍙�' + } + } + return ( + <div className="sub-app" key={index} style={{borderColor: color}}> + <Row> + <Col span={12}> + <div className="app-item"> + <div className="label">搴旂敤绫诲瀷:</div> + <div className="content" style={{fontSize: '18px', fontWeight: 600}}>{item.typename}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + <div className="label">璇█:</div> + <div className="content" style={{textDecoration: 'underline'}}>{langs[item.lang]}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + <div className="label">鏉冮檺绠$悊:</div> + <div className="content">{item.role_type === 'false' ? '涓嶅惎鐢�' : '鍚敤'}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + <div className="label">鐨偆:</div> + <div className="content" style={{color: color}}>{css}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + {binding ? <div className="label"> + <Tooltip placement="topLeft" title="寰俊鍏紬鍙风櫥褰曟椂锛岀郴缁熺敤鎴蜂笌寰俊鐢ㄦ埛鐨勭粦瀹氭柟寮忋��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鐢ㄦ埛缁戝畾: + </Tooltip> + </div> : null} + <div className="content">{binding}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + <div className="label">鏍囬:</div> + <div className="content">{item.title || '鏃�'}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + <div className="label">缃戠珯澶村儚:</div> + <div className="content">{item.favicon ? <img style={{width: '18px', height: '18px'}} src={item.favicon} alt="" /> : '鏃�'}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + <div className="label">鐗堟潈:</div> + <div className="content">{item.copyright || '鏃�'}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + <div className="label">LOGO:</div> + <div className="content">{item.logo ? <img style={{height: '18px'}} src={item.logo} alt="" /> : '鏃�'}</div> + </div> + </Col> + </Row> + <div className="action"> + <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${window.GLOB.baseurl}${item.typename === 'pad' ? 'mob' : item.typename}/index.html#/index/${this.state.selectApp.kei_no}/${item.typename !== 'pc' ? item.typename + '/' : ''}${item.lang}` }}></Paragraph> + </div> + </div> + ) + })} + </div> + </div> </div> ) } diff --git a/src/views/appmanage/index.jsx b/src/views/appmanage/index.jsx index 26ae31c..21ccb4b 100644 --- a/src/views/appmanage/index.jsx +++ b/src/views/appmanage/index.jsx @@ -1,10 +1,9 @@ import React, {Component} from 'react' import { fromJS } from 'immutable' -import { Spin, notification, Input, Button, Table, Modal, ConfigProvider, Typography, Row, Col, Tooltip } from 'antd' +import { Spin, notification, Input, Button, Table, Modal, Typography, Row, Col, Tooltip } from 'antd' import { QuestionCircleOutlined } from '@ant-design/icons' import moment from 'moment' import md5 from 'md5' -import zhCN from 'antd/es/locale/zh_CN' import Api from '@/api' import Utils from '@/utils/utils.js' @@ -1084,222 +1083,220 @@ return ( <div className="mk-app-manage"> - <ConfigProvider locale={zhCN}> - <Header view="manage" /> - {loading ? - <div className="loading-mask"> - <Spin size="large" /> - </div> : null - } - <div className="view-wrap"> - <div className="left-view"> - <div className="app-table"> - <div className="app-action"> - <Button className="mk-green" onClick={() => this.setState({ visible: 'plus' })}>娣诲姞搴旂敤</Button> - </div> - <Table - rowKey="ID" - columns={columns} - dataSource={applist} - pagination={false} - rowSelection={{ type: 'radio', selectedRowKeys: selectApp ? [selectApp.ID] : [], onChange: this.onSelectChange }} - onRow={(record) => ({ onClick: () => this.setState({ selectApp: record })})} - /> + <Header view="manage" /> + {loading ? + <div className="loading-mask"> + <Spin size="large" /> + </div> : null + } + <div className="view-wrap"> + <div className="left-view"> + <div className="app-table"> + <div className="app-action"> + <Button className="mk-green" onClick={() => this.setState({ visible: 'plus' })}>娣诲姞搴旂敤</Button> </div> - <div className={'trans-table' + (this.state.transTotal <= 10 ? ' no-footer' : '')}> - <div className="app-action"> - <Button className="mk-green" onClick={() => this.setState({ transVisible: 'plus' })}>娣诲姞浼犺緭鍙�</Button> - <Search placeholder="缁煎悎鎼滅储" onSearch={value => this.tranSearch(value)} enterButton /> - </div> - <Table - rowKey="ID" - columns={transcolumns} - dataSource={translist} - pagination={{ - current: this.state.transIndex, - pageSize: 10, - total: this.state.transTotal || 0, - showTotal: (total, range) => `${range[0]}-${range[1]} 鍏� ${total} 鏉 - }} - rowSelection={{ type: 'radio', selectedRowKeys: selectTran ? [selectTran.ID] : [], onChange: this.onTransChange }} - onRow={(record) => ({ onClick: () => { - if (this.forbid) { - this.forbid = false - return - } - this.onTransSelect(record) - }})} - onChange={this.changeTable} - /> + <Table + rowKey="ID" + columns={columns} + dataSource={applist} + pagination={false} + rowSelection={{ type: 'radio', selectedRowKeys: selectApp ? [selectApp.ID] : [], onChange: this.onSelectChange }} + onRow={(record) => ({ onClick: () => this.setState({ selectApp: record })})} + /> + </div> + <div className={'trans-table' + (this.state.transTotal <= 10 ? ' no-footer' : '')}> + <div className="app-action"> + <Button className="mk-green" onClick={() => this.setState({ transVisible: 'plus' })}>娣诲姞浼犺緭鍙�</Button> + <Search placeholder="缁煎悎鎼滅储" onSearch={value => this.tranSearch(value)} enterButton /> </div> - {selectTran ? <div className="script-table"> - <div className="app-action"> - <Button className="mk-green" onClick={() => this.setState({ scriptVisible: true })}>娣诲姞鑴氭湰</Button> - <Button className="mk-danger" onClick={this.deleteScripts} style={{marginLeft: '15px'}}>鍒犻櫎</Button> - <Search placeholder="缁煎悎鎼滅储" defaultValue={this.state.scriptSearchKey} onSearch={value => this.scriptSearch(value)} enterButton /> - </div> - <Table - rowKey="ID" - columns={scriptcolumns} - dataSource={scriptlist} - pagination={{ - current: this.state.scriptIndex, - pageSize: 10, - total: this.state.scriptTotal || 0, - showTotal: (total, range) => `${range[0]}-${range[1]} 鍏� ${total} 鏉 - }} - rowSelection={{ type: 'checkbox', selectedRowKeys: selectScriptKeys, onChange: this.onScriptChange }} - onRow={(record) => ({ onClick: () => this.onScriptSelect(record)})} - onChange={this.changeScriptTable} - /> - </div> : null} + <Table + rowKey="ID" + columns={transcolumns} + dataSource={translist} + pagination={{ + current: this.state.transIndex, + pageSize: 10, + total: this.state.transTotal || 0, + showTotal: (total, range) => `${range[0]}-${range[1]} 鍏� ${total} 鏉 + }} + rowSelection={{ type: 'radio', selectedRowKeys: selectTran ? [selectTran.ID] : [], onChange: this.onTransChange }} + onRow={(record) => ({ onClick: () => { + if (this.forbid) { + this.forbid = false + return + } + this.onTransSelect(record) + }})} + onChange={this.changeTable} + /> </div> - <div className="right-view"> - {selectApp ? <div className="app-title">{selectApp.remark}</div> : null} - {selectApp && selectApp.sublist.map((item, index) => { - let css = skinStyle[item.css] ? skinStyle[item.css].name : '' - let color = skinStyle[item.css] ? skinStyle[item.css].color : '#e8e8e8' - let binding = '' - if (item.user_binding === 'true') { - binding = '鐢ㄦ埛缁戝畾' - } - if (item.share === 'true') { - binding = binding ? binding + '銆佸垎浜�' : '鍒嗕韩' - } - - return ( - <div className="sub-app" key={index} style={{borderColor: color}}> - <Row> - <Col span={12}> - <div className="app-item"> - <div className="label">搴旂敤绫诲瀷:</div> - <div className="content" style={{fontSize: '18px', fontWeight: 600}}>{item.typename}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - <div className="label">璇█:</div> - <div className="content" style={{textDecoration: 'underline'}}>{langs[item.lang]}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - <div className="label">鏉冮檺绠$悊:</div> - <div className="content">{item.role_type === 'false' ? '涓嶅惎鐢�' : '鍚敤'}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - {/* <div className="label">鐨偆:</div> - <div className="content" style={{color: color}}>{css}</div> */} - </div> - </Col> - <Col span={12}> - <div className="app-item"> - <div className="label">鐨偆:</div> - <div className="content" style={{color: color}}>{css}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - {/* {binding ? <div className="label"> - <Tooltip placement="topLeft" title="寰俊鍏紬鍙风櫥褰曟椂锛岀郴缁熺敤鎴蜂笌寰俊鐢ㄦ埛鐨勭粦瀹氭柟寮忋��"> - <QuestionCircleOutlined className="mk-form-tip" /> - 鐢ㄦ埛缁戝畾: - </Tooltip> - </div> : null} */} - {binding ? <div className="label"> - <Tooltip placement="topLeft" title="寰俊鍏紬鍙锋垨灏忕▼搴忎腑锛岀粦瀹氱郴缁熺敤鎴枫�佽嚜瀹氫箟鍒嗕韩绛夊姛鑳姐��"> - <QuestionCircleOutlined className="mk-form-tip" /> - 鎵╁睍鍔熻兘: - </Tooltip> - </div> : null} - <div className="content">{binding}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - <div className="label">鏍囬:</div> - <div className="content">{item.title || '鏃�'}</div> - </div> - </Col> - <Col span={12}> - <div className="app-item"> - <div className="label">缃戠珯澶村儚:</div> - <div className="content">{item.favicon ? <img style={{width: '18px', height: '18px', borderRadius: '4px'}} src={item.favicon} alt="" /> : '鏃�'}</div> - </div> - </Col> - </Row> - <div className="action"> - {item.lang !== 'zh-CN' ? <TransMenu app={item} supApp={selectApp} /> : null} - <Button type="link" onClick={() => this.jumpMenu(item)} style={{color: 'rgba(30, 228, 224, 1)'}}>鑿滃崟&鏉冮檺</Button> - <Button type="link" onClick={() => this.setState({ selectSubApp: item, subVisible: 'edit' })} style={{color: '#8E44AD'}}>淇敼</Button> - <Button type="link" onClick={() => this.deleteSubApp(item)} style={{color: '#ff4d4f'}}>鍒犻櫎</Button> - <Button type="link" onClick={() => this.jumpApp(item)}>缂栬緫搴旂敤</Button> - <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${window.GLOB.baseurl}${item.typename === 'pad' ? 'mob' : item.typename}/index.html#/index/${this.state.selectApp.kei_no}/${item.typename !== 'pc' ? item.typename + '/' : ''}${item.lang}` }}></Paragraph> - </div> - </div> - ) - })} - </div> + {selectTran ? <div className="script-table"> + <div className="app-action"> + <Button className="mk-green" onClick={() => this.setState({ scriptVisible: true })}>娣诲姞鑴氭湰</Button> + <Button className="mk-danger" onClick={this.deleteScripts} style={{marginLeft: '15px'}}>鍒犻櫎</Button> + <Search placeholder="缁煎悎鎼滅储" defaultValue={this.state.scriptSearchKey} onSearch={value => this.scriptSearch(value)} enterButton /> + </div> + <Table + rowKey="ID" + columns={scriptcolumns} + dataSource={scriptlist} + pagination={{ + current: this.state.scriptIndex, + pageSize: 10, + total: this.state.scriptTotal || 0, + showTotal: (total, range) => `${range[0]}-${range[1]} 鍏� ${total} 鏉 + }} + rowSelection={{ type: 'checkbox', selectedRowKeys: selectScriptKeys, onChange: this.onScriptChange }} + onRow={(record) => ({ onClick: () => this.onScriptSelect(record)})} + onChange={this.changeScriptTable} + /> + </div> : null} </div> - <Modal - title={'缂栬緫搴旂敤'} - width={'600px'} - maskClosable={false} - visible={visible !== false} - onCancel={() => this.setState({visible: false, confirmloading: false})} - confirmLoading={this.state.confirmloading} - onOk={this.submitCard} - cancelText="鍙栨秷" - okText="纭畾" - destroyOnClose - > - <MutilForm type={visible} card={visible === 'edit' ? selectApp : ''} wrappedComponentRef={(inst) => this.mobcardRef = inst} inputSubmit={this.submitCard} /> - </Modal> - <Modal - title={transVisible === 'plus' ? '娣诲姞浼犺緭鍙�' : '缂栬緫浼犺緭鍙�'} - width={'600px'} - maskClosable={false} - visible={transVisible !== false} - onCancel={() => this.setState({transVisible: false, confirmloading: false})} - confirmLoading={this.state.confirmloading} - onOk={this.submitTrans} - cancelText="鍙栨秷" - okText="纭畾" - destroyOnClose - > - <TransForm type={transVisible} card={transVisible === 'edit' ? this.state.editTran : ''} wrappedComponentRef={(inst) => this.transRef = inst} inputSubmit={this.submitTrans} /> - </Modal> - <Modal - title={'娣诲姞鑴氭湰'} - width={900} - maskClosable={false} - visible={scriptVisible} - onCancel={() => this.setState({scriptVisible: false, confirmloading: false})} - confirmLoading={this.state.confirmloading} - onOk={this.submitScript} - cancelText="鍙栨秷" - okText="纭畾" - destroyOnClose - > - <ScriptForm applist={applist} wrappedComponentRef={(inst) => this.scriptRef = inst} inputSubmit={this.submitScript} /> - </Modal> - <Modal - title={subVisible === 'plus' ? '娣诲姞瀛愬簲鐢�' : '缂栬緫瀛愬簲鐢�'} - width={'850px'} - maskClosable={false} - visible={subVisible !== false} - onCancel={() => this.setState({subVisible: false, confirmloading: false})} - confirmLoading={this.state.confirmloading} - onOk={this.submitSubCard} - cancelText="鍙栨秷" - okText="纭畾" - destroyOnClose - > - <SubMutilForm type={subVisible} card={subVisible === 'edit' ? selectSubApp : ''} wrappedComponentRef={(inst) => this.submobcardRef = inst} inputSubmit={this.submitSubCard} /> - </Modal> - </ConfigProvider> + <div className="right-view"> + {selectApp ? <div className="app-title">{selectApp.remark}</div> : null} + {selectApp && selectApp.sublist.map((item, index) => { + let css = skinStyle[item.css] ? skinStyle[item.css].name : '' + let color = skinStyle[item.css] ? skinStyle[item.css].color : '#e8e8e8' + let binding = '' + if (item.user_binding === 'true') { + binding = '鐢ㄦ埛缁戝畾' + } + if (item.share === 'true') { + binding = binding ? binding + '銆佸垎浜�' : '鍒嗕韩' + } + + return ( + <div className="sub-app" key={index} style={{borderColor: color}}> + <Row> + <Col span={12}> + <div className="app-item"> + <div className="label">搴旂敤绫诲瀷:</div> + <div className="content" style={{fontSize: '18px', fontWeight: 600}}>{item.typename}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + <div className="label">璇█:</div> + <div className="content" style={{textDecoration: 'underline'}}>{langs[item.lang]}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + <div className="label">鏉冮檺绠$悊:</div> + <div className="content">{item.role_type === 'false' ? '涓嶅惎鐢�' : '鍚敤'}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + {/* <div className="label">鐨偆:</div> + <div className="content" style={{color: color}}>{css}</div> */} + </div> + </Col> + <Col span={12}> + <div className="app-item"> + <div className="label">鐨偆:</div> + <div className="content" style={{color: color}}>{css}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + {/* {binding ? <div className="label"> + <Tooltip placement="topLeft" title="寰俊鍏紬鍙风櫥褰曟椂锛岀郴缁熺敤鎴蜂笌寰俊鐢ㄦ埛鐨勭粦瀹氭柟寮忋��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鐢ㄦ埛缁戝畾: + </Tooltip> + </div> : null} */} + {binding ? <div className="label"> + <Tooltip placement="topLeft" title="寰俊鍏紬鍙锋垨灏忕▼搴忎腑锛岀粦瀹氱郴缁熺敤鎴枫�佽嚜瀹氫箟鍒嗕韩绛夊姛鑳姐��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鎵╁睍鍔熻兘: + </Tooltip> + </div> : null} + <div className="content">{binding}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + <div className="label">鏍囬:</div> + <div className="content">{item.title || '鏃�'}</div> + </div> + </Col> + <Col span={12}> + <div className="app-item"> + <div className="label">缃戠珯澶村儚:</div> + <div className="content">{item.favicon ? <img style={{width: '18px', height: '18px', borderRadius: '4px'}} src={item.favicon} alt="" /> : '鏃�'}</div> + </div> + </Col> + </Row> + <div className="action"> + {item.lang !== 'zh-CN' ? <TransMenu app={item} supApp={selectApp} /> : null} + <Button type="link" onClick={() => this.jumpMenu(item)} style={{color: 'rgba(30, 228, 224, 1)'}}>鑿滃崟&鏉冮檺</Button> + <Button type="link" onClick={() => this.setState({ selectSubApp: item, subVisible: 'edit' })} style={{color: '#8E44AD'}}>淇敼</Button> + <Button type="link" onClick={() => this.deleteSubApp(item)} style={{color: '#ff4d4f'}}>鍒犻櫎</Button> + <Button type="link" onClick={() => this.jumpApp(item)}>缂栬緫搴旂敤</Button> + <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${window.GLOB.baseurl}${item.typename === 'pad' ? 'mob' : item.typename}/index.html#/index/${this.state.selectApp.kei_no}/${item.typename !== 'pc' ? item.typename + '/' : ''}${item.lang}` }}></Paragraph> + </div> + </div> + ) + })} + </div> + </div> + <Modal + title={'缂栬緫搴旂敤'} + width={'600px'} + maskClosable={false} + visible={visible !== false} + onCancel={() => this.setState({visible: false, confirmloading: false})} + confirmLoading={this.state.confirmloading} + onOk={this.submitCard} + cancelText="鍙栨秷" + okText="纭畾" + destroyOnClose + > + <MutilForm type={visible} card={visible === 'edit' ? selectApp : ''} wrappedComponentRef={(inst) => this.mobcardRef = inst} inputSubmit={this.submitCard} /> + </Modal> + <Modal + title={transVisible === 'plus' ? '娣诲姞浼犺緭鍙�' : '缂栬緫浼犺緭鍙�'} + width={'600px'} + maskClosable={false} + visible={transVisible !== false} + onCancel={() => this.setState({transVisible: false, confirmloading: false})} + confirmLoading={this.state.confirmloading} + onOk={this.submitTrans} + cancelText="鍙栨秷" + okText="纭畾" + destroyOnClose + > + <TransForm type={transVisible} card={transVisible === 'edit' ? this.state.editTran : ''} wrappedComponentRef={(inst) => this.transRef = inst} inputSubmit={this.submitTrans} /> + </Modal> + <Modal + title={'娣诲姞鑴氭湰'} + width={900} + maskClosable={false} + visible={scriptVisible} + onCancel={() => this.setState({scriptVisible: false, confirmloading: false})} + confirmLoading={this.state.confirmloading} + onOk={this.submitScript} + cancelText="鍙栨秷" + okText="纭畾" + destroyOnClose + > + <ScriptForm applist={applist} wrappedComponentRef={(inst) => this.scriptRef = inst} inputSubmit={this.submitScript} /> + </Modal> + <Modal + title={subVisible === 'plus' ? '娣诲姞瀛愬簲鐢�' : '缂栬緫瀛愬簲鐢�'} + width={'850px'} + maskClosable={false} + visible={subVisible !== false} + onCancel={() => this.setState({subVisible: false, confirmloading: false})} + confirmLoading={this.state.confirmloading} + onOk={this.submitSubCard} + cancelText="鍙栨秷" + okText="纭畾" + destroyOnClose + > + <SubMutilForm type={subVisible} card={subVisible === 'edit' ? selectSubApp : ''} wrappedComponentRef={(inst) => this.submobcardRef = inst} inputSubmit={this.submitSubCard} /> + </Modal> </div> ) } diff --git a/src/views/basedesign/index.jsx b/src/views/basedesign/index.jsx index d81bdb4..5e9d0f5 100644 --- a/src/views/basedesign/index.jsx +++ b/src/views/basedesign/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' -import { notification, Spin, ConfigProvider } from 'antd' -import zhCN from 'antd/es/locale/zh_CN' +import { notification, Spin } from 'antd' import Api from '@/api' import asyncComponent from '@/utils/asyncComponent' @@ -187,58 +186,56 @@ return ( <div className="mk-base-design-wrap"> - <ConfigProvider locale={zhCN}> - <Header/> - {this.state.tabview === 'CommonTable' ? - <ComTableConfig - menu={editMenu} - reloadmenu={() => {localStorage.setItem('menuUpdate', new Date().getTime())}} - handleView={this.handleView} - /> : null - } - {this.state.tabview === 'SubTable' ? - <SubTable - menu={editMenu} - editTab={this.state.editTab} - editSubTab={this.state.editSubTab} - tabConfig={this.state.tabConfig} - btnTab={btnTab} - btnTabConfig={this.state.btnTabConfig} - config={subConfig} - handleView={this.handleView} - /> : null - } - {this.state.tabview === 'Modal' ? - <ModalConfig - menu={editMenu} - editTab={this.state.editTab} - tabConfig={this.state.tabConfig} - editSubTab={this.state.editSubTab} - subTabConfig={this.state.subTabConfig} - btnTab={btnTab} - btnTabConfig={this.state.btnTabConfig} - editAction={this.state.editAction} - subConfig={subConfig} - handleView={this.handleView} - /> : null - } - {this.state.tabview === 'TreePage' ? - <TreePageConfig - menu={editMenu} - reloadmenu={() => {localStorage.setItem('menuUpdate', new Date().getTime())}} - handleView={this.handleView} - /> : null - } - {this.state.tabview === 'FormTab' ? - <UpdateFormTab - menu={editMenu} - btnTab={btnTab} - config={subConfig} - handleView={this.handleView} - /> : null - } - {loading ? <Spin className="loading-view" size="large"/> : null} - </ConfigProvider> + <Header/> + {this.state.tabview === 'CommonTable' ? + <ComTableConfig + menu={editMenu} + reloadmenu={() => {localStorage.setItem('menuUpdate', new Date().getTime())}} + handleView={this.handleView} + /> : null + } + {this.state.tabview === 'SubTable' ? + <SubTable + menu={editMenu} + editTab={this.state.editTab} + editSubTab={this.state.editSubTab} + tabConfig={this.state.tabConfig} + btnTab={btnTab} + btnTabConfig={this.state.btnTabConfig} + config={subConfig} + handleView={this.handleView} + /> : null + } + {this.state.tabview === 'Modal' ? + <ModalConfig + menu={editMenu} + editTab={this.state.editTab} + tabConfig={this.state.tabConfig} + editSubTab={this.state.editSubTab} + subTabConfig={this.state.subTabConfig} + btnTab={btnTab} + btnTabConfig={this.state.btnTabConfig} + editAction={this.state.editAction} + subConfig={subConfig} + handleView={this.handleView} + /> : null + } + {this.state.tabview === 'TreePage' ? + <TreePageConfig + menu={editMenu} + reloadmenu={() => {localStorage.setItem('menuUpdate', new Date().getTime())}} + handleView={this.handleView} + /> : null + } + {this.state.tabview === 'FormTab' ? + <UpdateFormTab + menu={editMenu} + btnTab={btnTab} + config={subConfig} + handleView={this.handleView} + /> : null + } + {loading ? <Spin className="loading-view" size="large"/> : null} </div> ) } diff --git a/src/views/imdesign/index.jsx b/src/views/imdesign/index.jsx index 0c60d63..1960d4b 100644 --- a/src/views/imdesign/index.jsx +++ b/src/views/imdesign/index.jsx @@ -2,12 +2,11 @@ import { withRouter } from 'react-router' import { is, fromJS } from 'immutable' import moment from 'moment' -import { ConfigProvider, notification, Modal, Collapse, Button, Spin } from 'antd' +import { notification, Modal, Collapse, Button, Spin } from 'antd' import { DoubleLeftOutlined, DoubleRightOutlined, LeftOutlined, UserOutlined, EllipsisOutlined } from '@ant-design/icons' import Api from '@/api' import Utils from '@/utils/utils.js' -import antdZhCN from 'antd/es/locale/zh_CN' // import MKEmitter from '@/utils/events.js' import asyncComponent from '@/utils/asyncComponent' import getWrapForm from './options' @@ -422,93 +421,91 @@ const { loading, settingshow, controlshow, MenuId, config, menuloading } = this.state return ( - <ConfigProvider locale={antdZhCN}> - <div className="mk-mob-view" id="mk-mob-design-view"> - <Header/> - {loading ? <Spin className="view-spin" size="large" /> : null} - <div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}> - <div className="draw"> - {settingshow ? <DoubleLeftOutlined onClick={() => {this.setState({settingshow: false})}} /> : null} - {!settingshow ? <DoubleRightOutlined onClick={() => {this.setState({settingshow: true})}} /> : null} - </div> - <div className="pc-setting-tools"> - <Collapse accordion defaultActiveKey="basedata" bordered={false}> - {/* 鍩烘湰淇℃伅 */} - <Panel header="鍩烘湰淇℃伅" forceRender key="basedata"> - {/* 鑿滃崟淇℃伅 */} - {config ? <MenuForm - config={config} - MenuId={MenuId} - updateConfig={this.updateConfig} - /> : null} - </Panel> - <Panel header="椤甸潰鏍峰紡" key="background"> - {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null} - </Panel> - </Collapse> - </div> + <div className="mk-mob-view" id="mk-mob-design-view"> + <Header/> + {loading ? <Spin className="view-spin" size="large" /> : null} + <div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}> + <div className="draw"> + {settingshow ? <DoubleLeftOutlined onClick={() => {this.setState({settingshow: false})}} /> : null} + {!settingshow ? <DoubleRightOutlined onClick={() => {this.setState({settingshow: true})}} /> : null} </div> - <div className={'menu-control ' + (!controlshow ? 'hidden' : '')}> - <div className="draw"> - {controlshow ? <DoubleRightOutlined onClick={() => {this.setState({controlshow: false})}}/> : null} - {!controlshow ? <DoubleLeftOutlined onClick={() => {this.setState({controlshow: true})}}/> : null} - </div> - <div className="wrap"> - <Button type="primary" onClick={this.submitConfig} id="save-config" loading={menuloading}>淇濆瓨</Button> - <NormalForm title="鍗虫椂閫氫俊璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}> - <Button type="default" style={{borderColor: 'rgb(64, 169, 255)', color: 'rgb(64, 169, 255)'}}>璁剧疆</Button> - </NormalForm> - <Button type="default" className="mk-border-purple" onClick={this.backView}>鍚庨��</Button> - <CreateView resetmenu={this.getAppMenus} /> - <Transfer MenuID={MenuId} /> - <Button type="default" onClick={this.closeView}>鍏抽棴</Button> - </div> + <div className="pc-setting-tools"> + <Collapse accordion defaultActiveKey="basedata" bordered={false}> + {/* 鍩烘湰淇℃伅 */} + <Panel header="鍩烘湰淇℃伅" forceRender key="basedata"> + {/* 鑿滃崟淇℃伅 */} + {config ? <MenuForm + config={config} + MenuId={MenuId} + updateConfig={this.updateConfig} + /> : null} + </Panel> + <Panel header="椤甸潰鏍峰紡" key="background"> + {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null} + </Panel> + </Collapse> </div> - <div className={'menu-body menu-view'}> - <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}> - <div className="instant-message" style={config ? config.style : null}> - <div className="header"> - <LeftOutlined/> - <span className="title">鏈嬪弸</span> - {config && config.wrap.linkmenu ? <EllipsisOutlined onDoubleClick={this.changeEditMenu}/> : null} - </div> - <div className="mk-content-wrap"> - <div className="line-wrap"> - <div className="time-line">12:34</div> - <div className="line-msg"> - <div className="portrait"> - <div className="img"><UserOutlined /></div> - </div> - <div className="msg"> - <div className="title">鏈嬪弸</div> - <div className="words">鎮ㄥソ</div> - </div> + </div> + <div className={'menu-control ' + (!controlshow ? 'hidden' : '')}> + <div className="draw"> + {controlshow ? <DoubleRightOutlined onClick={() => {this.setState({controlshow: false})}}/> : null} + {!controlshow ? <DoubleLeftOutlined onClick={() => {this.setState({controlshow: true})}}/> : null} + </div> + <div className="wrap"> + <Button type="primary" onClick={this.submitConfig} id="save-config" loading={menuloading}>淇濆瓨</Button> + <NormalForm title="鍗虫椂閫氫俊璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}> + <Button type="default" style={{borderColor: 'rgb(64, 169, 255)', color: 'rgb(64, 169, 255)'}}>璁剧疆</Button> + </NormalForm> + <Button type="default" className="mk-border-purple" onClick={this.backView}>鍚庨��</Button> + <CreateView resetmenu={this.getAppMenus} /> + <Transfer MenuID={MenuId} /> + <Button type="default" onClick={this.closeView}>鍏抽棴</Button> + </div> + </div> + <div className={'menu-body menu-view'}> + <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}> + <div className="instant-message" style={config ? config.style : null}> + <div className="header"> + <LeftOutlined/> + <span className="title">鏈嬪弸</span> + {config && config.wrap.linkmenu ? <EllipsisOutlined onDoubleClick={this.changeEditMenu}/> : null} + </div> + <div className="mk-content-wrap"> + <div className="line-wrap"> + <div className="time-line">12:34</div> + <div className="line-msg"> + <div className="portrait"> + <div className="img"><UserOutlined /></div> </div> - </div> - <div className="line-wrap"> - <div className="time-line">12:45</div> - <div className="line-msg right"> - <div className="msg"> - <div className="words"> - 鎮ㄥソ - </div> - </div> - <div className="portrait"> - <div className="img"><UserOutlined /></div> - </div> + <div className="msg"> + <div className="title">鏈嬪弸</div> + <div className="words">鎮ㄥソ</div> </div> </div> </div> - <div className="send-wrap"> - <div className="adm-input"></div> - <div className="send"><Button>鍙戦��</Button></div> + <div className="line-wrap"> + <div className="time-line">12:45</div> + <div className="line-msg right"> + <div className="msg"> + <div className="words"> + 鎮ㄥソ + </div> + </div> + <div className="portrait"> + <div className="img"><UserOutlined /></div> + </div> + </div> </div> + </div> + <div className="send-wrap"> + <div className="adm-input"></div> + <div className="send"><Button>鍙戦��</Button></div> </div> </div> </div> - <StyleController /> </div> - </ConfigProvider> + <StyleController /> + </div> ) } } diff --git a/src/views/interface/index.jsx b/src/views/interface/index.jsx index 0c6f74b..3d88456 100644 --- a/src/views/interface/index.jsx +++ b/src/views/interface/index.jsx @@ -1,6 +1,4 @@ import React, {Component} from 'react' -import { ConfigProvider } from 'antd' -import zhCN from 'antd/es/locale/zh_CN' import Header from './header' import History from './history' @@ -12,11 +10,9 @@ render () { return ( <div className="interface-view"> - <ConfigProvider locale={zhCN}> - <Header key="header"/> - <History key="history"/> - <WorkSpace key="workspace"/> - </ConfigProvider> + <Header key="header"/> + <History key="history"/> + <WorkSpace key="workspace"/> </div> ) } diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index b94807a..3361a92 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -654,6 +654,12 @@ if (res.lang_translation_js && res.lang_data && res.lang_data[0] && (res.lang_data.length > 1 || res.lang_data[0].Lang !== 'zh-CN')) { let lang = sessionStorage.getItem('lang') let js_trans = res.lang_translation_js.map(item => { + if (['not_empty', 'not_zero', 'max_limit', 'less_limit']) { + item.translation = ' ' + item.translation + } + if (['input_tip', 'select_tip', 'max_limit', 'less_limit']) { + item.translation = item.translation + ' ' + } if (lang === item.lang) { window.GLOB.dict[item.msn_code] = item.translation } diff --git a/src/views/main/index.jsx b/src/views/main/index.jsx index 8f64b52..8723ebc 100644 --- a/src/views/main/index.jsx +++ b/src/views/main/index.jsx @@ -1,7 +1,4 @@ import React, {Component} from 'react' -import { ConfigProvider } from 'antd' -// import enUS from 'antd/es/locale/en_US' -import zhCN from 'antd/es/locale/zh_CN' import asyncComponent from '@/utils/asyncComponent' import Header from '@/components/header' @@ -76,14 +73,12 @@ return ( <div className="mk-main-view"> - <ConfigProvider locale={zhCN}> - <Header key="header"/> - {navBar === 'shutter' ? <Sidemenu key="sidemenu"/> : null} - {navBar === 'shutter' || navBar === 'menu_board_navigation' ? - <Tabview key="tabview"/> : - <Breadview key="breadview"/>} - {window.GLOB.systemType === 'production' ? <QueryLog /> : null} - </ConfigProvider> + <Header key="header"/> + {navBar === 'shutter' ? <Sidemenu key="sidemenu"/> : null} + {navBar === 'shutter' || navBar === 'menu_board_navigation' ? + <Tabview key="tabview"/> : + <Breadview key="breadview"/>} + {window.GLOB.systemType === 'production' ? <QueryLog /> : null} <ImgScale /> </div> ) diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index f27bfda..f453d28 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -4,7 +4,7 @@ import { is, fromJS } from 'immutable' import moment from 'moment' import HTML5Backend from 'react-dnd-html5-backend' -import { ConfigProvider, notification, Modal, Collapse, Card, Switch, Button, Typography, Spin } from 'antd' +import { notification, Modal, Collapse, Card, Switch, Button, Typography, Spin } from 'antd' import { DoubleLeftOutlined, DoubleRightOutlined, EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons' import html2canvas from 'html2canvas' import md5 from 'md5' @@ -12,7 +12,6 @@ import Api from '@/api' import Utils, { setGLOBFuncs } from '@/utils/utils.js' import { langs } from '@/store/options' -import antdZhCN from 'antd/es/locale/zh_CN' import MKEmitter from '@/utils/events.js' import { getTables, getFuncsAndInters, getLangTrans } from '@/utils/utils-custom.js' import asyncComponent from '@/utils/asyncComponent' @@ -23,7 +22,6 @@ const { Panel } = Collapse const { confirm } = Modal const { Paragraph } = Typography -const _locale = antdZhCN const MenuForm = asyncComponent(() => import('./menuform')) const HomeForm = asyncComponent(() => import('./homeform')) @@ -1212,7 +1210,7 @@ const { view, comloading, MenuType, MenuId, config, settingshow, ParentId, menuloading, eyeopen, needUpdate, langName } = this.state return ( - <ConfigProvider locale={_locale}> + <> <Header menuName={config ? config.MenuName + langName : ''}/> <DndProvider backend={HTML5Backend}> {view !== 'popview' ? <div className={'pc-menu-view ' + (MenuType || '')}> @@ -1289,7 +1287,7 @@ <ModalController /> <StyleController /> <StyleCombController /> - </ConfigProvider> + </> ) } } diff --git a/src/views/mkiframe/index.jsx b/src/views/mkiframe/index.jsx index b6e9761..329ef36 100644 --- a/src/views/mkiframe/index.jsx +++ b/src/views/mkiframe/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' -import { Spin, notification, ConfigProvider } from 'antd' -import zhCN from 'antd/es/locale/zh_CN' +import { Spin, notification } from 'antd' import Api from '@/api' import asyncComponent from '@/utils/asyncLoadComponent' @@ -267,11 +266,9 @@ return ( <div className="main-iframe"> - <ConfigProvider locale={zhCN}> - {loading ? <Spin size="large" /> : null} - {!loading && type === 'CustomPage' ? <CustomPage MenuID={MenuId} param={{$BID: BID}} changeTemp={this.changeTemp}/> : null} - {!loading && type === 'BaseTable' ? <BaseTable MenuID={MenuId} param={{$BID: BID}} changeTemp={this.changeTemp}/> : null} - </ConfigProvider> + {loading ? <Spin size="large" /> : null} + {!loading && type === 'CustomPage' ? <CustomPage MenuID={MenuId} param={{$BID: BID}} changeTemp={this.changeTemp}/> : null} + {!loading && type === 'BaseTable' ? <BaseTable MenuID={MenuId} param={{$BID: BID}} changeTemp={this.changeTemp}/> : null} <ImgScale /> </div> ) diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index 7381eb5..dbf4105 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -3,14 +3,13 @@ import { withRouter } from 'react-router' import { is, fromJS } from 'immutable' import HTML5Backend from 'react-dnd-html5-backend' -import { ConfigProvider, notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd' +import { notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd' import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, ArrowLeftOutlined, EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons' import moment from 'moment' import md5 from 'md5' import Api from '@/api' import Utils, { setGLOBFuncs } from '@/utils/utils.js' -import antdZhCN from 'antd/es/locale/zh_CN' import MKEmitter from '@/utils/events.js' import MenuUtils, { getTables, getFuncsAndInters, getLangTrans } from '@/utils/utils-custom.js' import asyncComponent from '@/utils/asyncComponent' @@ -2075,92 +2074,90 @@ const { view, viewType, comloading, loading, settingshow, controlshow, activeKey, MenuId, config, menuloading, adapters, eyeopen, needUpdate } = this.state return ( - <ConfigProvider locale={antdZhCN}> - <div className={'mk-mob-view ' + viewType} id="mk-mob-design-view"> - <Header/> - {loading ? <Spin className="view-spin" size="large" /> : null} - <DndProvider backend={HTML5Backend}> - {view !== 'popview' ? <><div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}> - <div className="draw"> - {settingshow ? <DoubleLeftOutlined onClick={() => {this.setState({settingshow: false})}} /> : null} - {!settingshow ? <DoubleRightOutlined onClick={() => {this.setState({settingshow: true})}} /> : null} - </div> - <div className="pc-setting-tools"> - <Collapse accordion activeKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}> - {/* 鍩烘湰淇℃伅 */} - <Panel header="鍩烘湰淇℃伅" forceRender className="basedata" key="basedata"> - {config ? <> - <MenuForm - config={config} - MenuId={MenuId} - adapters={adapters} - updateConfig={(con) => { - this.updateConfig(con) - if (con.direction !== config.direction) { - this.changeView(con.direction) - } - }} - /> - <UrlFieldComponent config={config} updateConfig={this.updateConfig}/> - {/* 琛ㄥ悕娣诲姞 */} - <TableComponent config={config} updatetable={this.updateConfig}/> - <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>鑿滃崟ID</Paragraph> - <Paragraph style={{padding: '10px 0px 0px 18px'}} copyable={{ text: `${window.GLOB.baseurl}mob/index.html#/index/${sessionStorage.getItem('kei_no')}/${sessionStorage.getItem('typename')}/${sessionStorage.getItem('lang')}/${MenuId}/@BID@` }}>鑿滃崟閾炬帴</Paragraph> - <NormalCss config={config} updateConfig={this.updateConfig}/> - </> : null} - </Panel> - {/* 缁勪欢娣诲姞 */} - <Panel header="缁勪欢" className="component" key="component"> - <SourceWrap /> - </Panel> - <Panel header="鍏冪礌" key="element"> - <Modulecell /> - </Panel> - <Panel header="椤甸潰鏍峰紡" key="background"> - {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null} - </Panel> - </Collapse> - </div> + <div className={'mk-mob-view ' + viewType} id="mk-mob-design-view"> + <Header/> + {loading ? <Spin className="view-spin" size="large" /> : null} + <DndProvider backend={HTML5Backend}> + {view !== 'popview' ? <><div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}> + <div className="draw"> + {settingshow ? <DoubleLeftOutlined onClick={() => {this.setState({settingshow: false})}} /> : null} + {!settingshow ? <DoubleRightOutlined onClick={() => {this.setState({settingshow: true})}} /> : null} </div> - <div className={'menu-control' + (!controlshow ? ' hidden' : '')}> - <div className="draw"> - {controlshow ? <DoubleRightOutlined onClick={() => {this.setState({controlshow: false})}}/> : null} - {!controlshow ? <DoubleLeftOutlined onClick={() => {this.setState({controlshow: true})}}/> : null} - </div> - <div className="wrap"> - <Button type="primary" className={needUpdate ? 'update-tip' : ''} onClick={this.submitConfig} id="save-config" loading={menuloading}>淇濆瓨</Button> - {config ? <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={config.enabled} onChange={this.onEnabledChange} /> : null} - <ArrowLeftOutlined title="鍚庨��" className="back-view" onClick={this.backView}/> - {config ? <Debug config={config}/> : null} - <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 缁勪欢鍚�</Button> - <CreateView resetmenu={this.getAppMenus} /> - <PasteController insert={this.insert} /> - <TableNodes config={config} /> - <ViewNodes config={config} MenuId={MenuId}/> - <SysInterface config={config} updateConfig={this.updateConfig}/> - <PictureController/> - <Quotecomponent config={config} updateConfig={this.updateConfig}/> - <StyleCombControlButton menu={config} /> - <Button className="mk-border-green set-home" onClick={this.setHomeView}><HomeOutlined /> 璁句负棣栭〉</Button> - <Button className="mk-border-purple set-login" onClick={this.setLoginView}><LoginOutlined /> 璁句负鐧诲綍椤�</Button> - <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> - <Transfer MenuID={MenuId} /> - {config ? <Versions MenuId={MenuId} Template="webPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null} - <Button type="default" onClick={this.closeView}>鍏抽棴</Button> - </div> + <div className="pc-setting-tools"> + <Collapse accordion activeKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}> + {/* 鍩烘湰淇℃伅 */} + <Panel header="鍩烘湰淇℃伅" forceRender className="basedata" key="basedata"> + {config ? <> + <MenuForm + config={config} + MenuId={MenuId} + adapters={adapters} + updateConfig={(con) => { + this.updateConfig(con) + if (con.direction !== config.direction) { + this.changeView(con.direction) + } + }} + /> + <UrlFieldComponent config={config} updateConfig={this.updateConfig}/> + {/* 琛ㄥ悕娣诲姞 */} + <TableComponent config={config} updatetable={this.updateConfig}/> + <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>鑿滃崟ID</Paragraph> + <Paragraph style={{padding: '10px 0px 0px 18px'}} copyable={{ text: `${window.GLOB.baseurl}mob/index.html#/index/${sessionStorage.getItem('kei_no')}/${sessionStorage.getItem('typename')}/${sessionStorage.getItem('lang')}/${MenuId}/@BID@` }}>鑿滃崟閾炬帴</Paragraph> + <NormalCss config={config} updateConfig={this.updateConfig}/> + </> : null} + </Panel> + {/* 缁勪欢娣诲姞 */} + <Panel header="缁勪欢" className="component" key="component"> + <SourceWrap /> + </Panel> + <Panel header="鍏冪礌" key="element"> + <Modulecell /> + </Panel> + <Panel header="椤甸潰鏍峰紡" key="background"> + {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null} + </Panel> + </Collapse> </div> - <div className={'menu-body menu-view' + (menuloading ? ' saving' : '') + (eyeopen ? ' eye-open' : '')}> - {config && !comloading ? <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}> - <MobShell menu={config} handleList={this.updateConfig} /> - </div> : null} - </div></> : <PopView btn={this.state.popConfig} save={this.submitPopConfig} cancel={this.closePop}/>} - </DndProvider> - <StyleController /> - <StyleCombController /> - <ModalController /> - <SearchController /> - </div> - </ConfigProvider> + </div> + <div className={'menu-control' + (!controlshow ? ' hidden' : '')}> + <div className="draw"> + {controlshow ? <DoubleRightOutlined onClick={() => {this.setState({controlshow: false})}}/> : null} + {!controlshow ? <DoubleLeftOutlined onClick={() => {this.setState({controlshow: true})}}/> : null} + </div> + <div className="wrap"> + <Button type="primary" className={needUpdate ? 'update-tip' : ''} onClick={this.submitConfig} id="save-config" loading={menuloading}>淇濆瓨</Button> + {config ? <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={config.enabled} onChange={this.onEnabledChange} /> : null} + <ArrowLeftOutlined title="鍚庨��" className="back-view" onClick={this.backView}/> + {config ? <Debug config={config}/> : null} + <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 缁勪欢鍚�</Button> + <CreateView resetmenu={this.getAppMenus} /> + <PasteController insert={this.insert} /> + <TableNodes config={config} /> + <ViewNodes config={config} MenuId={MenuId}/> + <SysInterface config={config} updateConfig={this.updateConfig}/> + <PictureController/> + <Quotecomponent config={config} updateConfig={this.updateConfig}/> + <StyleCombControlButton menu={config} /> + <Button className="mk-border-green set-home" onClick={this.setHomeView}><HomeOutlined /> 璁句负棣栭〉</Button> + <Button className="mk-border-purple set-login" onClick={this.setLoginView}><LoginOutlined /> 璁句负鐧诲綍椤�</Button> + <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> + <Transfer MenuID={MenuId} /> + {config ? <Versions MenuId={MenuId} Template="webPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null} + <Button type="default" onClick={this.closeView}>鍏抽棴</Button> + </div> + </div> + <div className={'menu-body menu-view' + (menuloading ? ' saving' : '') + (eyeopen ? ' eye-open' : '')}> + {config && !comloading ? <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}> + <MobShell menu={config} handleList={this.updateConfig} /> + </div> : null} + </div></> : <PopView btn={this.state.popConfig} save={this.submitPopConfig} cancel={this.closePop}/>} + </DndProvider> + <StyleController /> + <StyleCombController /> + <ModalController /> + <SearchController /> + </div> ) } } diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index 8e522f6..b1abf07 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -3,7 +3,7 @@ import { withRouter } from 'react-router' import { is, fromJS } from 'immutable' import HTML5Backend from 'react-dnd-html5-backend' -import { ConfigProvider, notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd' +import { notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd' import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, ArrowLeftOutlined, EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons' import moment from 'moment' import md5 from 'md5' @@ -11,7 +11,6 @@ import Api from '@/api' import Utils, { setGLOBFuncs } from '@/utils/utils.js' import { getTables, getFuncsAndInters, getLangTrans } from '@/utils/utils-custom.js' -import antdZhCN from 'antd/es/locale/zh_CN' import MKEmitter from '@/utils/events.js' import MenuUtils from '@/utils/utils-custom.js' import asyncComponent from '@/utils/asyncComponent' @@ -1723,7 +1722,7 @@ const { view, loading, comloading, activeKey, settingshow, controlshow, MenuId, config, menuloading, eyeopen, needUpdate } = this.state return ( - <ConfigProvider locale={antdZhCN}> + <> <DndProvider backend={HTML5Backend}> {view !== 'popview' ? <div className={'mk-pc-view '} id="mk-pc-design-view"> {loading ? <Spin className="view-spin" size="large" /> : null} @@ -1800,7 +1799,7 @@ <StyleController /> <StyleCombController /> <ModalController /> - </ConfigProvider> + </> ) } } diff --git a/src/views/rolemanage/index.jsx b/src/views/rolemanage/index.jsx index c8bdd69..e030560 100644 --- a/src/views/rolemanage/index.jsx +++ b/src/views/rolemanage/index.jsx @@ -1,9 +1,8 @@ import React, {Component} from 'react' import { fromJS } from 'immutable' -import { Spin, notification, Button, Table, Modal, ConfigProvider, Tree, Input, Empty } from 'antd' +import { Spin, notification, Button, Table, Modal, Tree, Input, Empty } from 'antd' import moment from 'moment' import md5 from 'md5' -import zhCN from 'antd/es/locale/zh_CN' import { ApiOutlined } from '@ant-design/icons' import Api from '@/api' @@ -920,61 +919,59 @@ return ( <div className="mk-role-manage"> - <ConfigProvider locale={zhCN}> - <Header app={app} /> - {loading ? - <div className="loading-mask"> - <Spin size="large" /> - </div> : null - } - <div className="view-wrap"> - <div className="left-view"> - <div className="app-table"> - <div className="app-action"> - <Button className="mk-green" onClick={this.triggerThaw}>瑙e喕鑿滃崟</Button> - <Search placeholder="缁煎悎鎼滅储" onSearch={value => this.setState({ searchkey: value })} enterButton /> - </div> - <Table - rowKey="MenuID" - columns={columns} - dataSource={_menulist} - pagination={false} - onChange={this.changeTable} - /> - </div> - </div> - <div className="right-view"> + <Header app={app} /> + {loading ? + <div className="loading-mask"> + <Spin size="large" /> + </div> : null + } + <div className="view-wrap"> + <div className="left-view"> + <div className="app-table"> <div className="app-action"> - <Button className="mk-primary" onClick={this.initTree}>閲嶇疆</Button> - {/* <Button className="mk-purple" onClick={this.syncTree}>鍚屾</Button> */} - <Button className="mk-green save" onClick={this.saveTree}>淇濆瓨</Button> + <Button className="mk-green" onClick={this.triggerThaw}>瑙e喕鑿滃崟</Button> + <Search placeholder="缁煎悎鎼滅储" onSearch={value => this.setState({ searchkey: value })} enterButton /> </div> - {trees && trees.length ? <Tree - className="draggable-tree" - defaultExpandedKeys={this.state.expandedKeys} - // showLine - draggable - blockNode - onDrop={this.onDrop} - > - {this.renderNode(trees)} - </Tree> : <div className="empty"> - <Empty /> - </div>} + <Table + rowKey="MenuID" + columns={columns} + dataSource={_menulist} + pagination={false} + onChange={this.changeTable} + /> </div> </div> - <Modal - title="瑙i櫎鍐荤粨" - visible={this.state.visible} - width={600} - onOk={this.thawSubmit} - confirmLoading={this.state.confirmLoading} - onCancel={() => this.setState({visible: false, targetKeys: []})} - destroyOnClose - > - <TransferForm onChange={(vals) => this.setState({targetKeys: vals})} menulist={this.state.thawmenulist}/> - </Modal> - </ConfigProvider> + <div className="right-view"> + <div className="app-action"> + <Button className="mk-primary" onClick={this.initTree}>閲嶇疆</Button> + {/* <Button className="mk-purple" onClick={this.syncTree}>鍚屾</Button> */} + <Button className="mk-green save" onClick={this.saveTree}>淇濆瓨</Button> + </div> + {trees && trees.length ? <Tree + className="draggable-tree" + defaultExpandedKeys={this.state.expandedKeys} + // showLine + draggable + blockNode + onDrop={this.onDrop} + > + {this.renderNode(trees)} + </Tree> : <div className="empty"> + <Empty /> + </div>} + </div> + </div> + <Modal + title="瑙i櫎鍐荤粨" + visible={this.state.visible} + width={600} + onOk={this.thawSubmit} + confirmLoading={this.state.confirmLoading} + onCancel={() => this.setState({visible: false, targetKeys: []})} + destroyOnClose + > + <TransferForm onChange={(vals) => this.setState({targetKeys: vals})} menulist={this.state.thawmenulist}/> + </Modal> </div> ) } diff --git a/src/views/systemfunc/index.jsx b/src/views/systemfunc/index.jsx index 9c33163..179eb01 100644 --- a/src/views/systemfunc/index.jsx +++ b/src/views/systemfunc/index.jsx @@ -1,7 +1,5 @@ import React, {Component} from 'react' -import { ConfigProvider } from 'antd' import { withRouter } from 'react-router-dom' -import zhCN from 'antd/es/locale/zh_CN' import asyncComponent from '@/utils/asyncComponent' import Header from './header' @@ -59,11 +57,9 @@ render () { return ( <div className="mk-main-view"> - <ConfigProvider locale={zhCN}> - <Sidemenu key="sidemenu"/> - <Tabview key="tabview"/> - <Header key="header"/> - </ConfigProvider> + <Sidemenu key="sidemenu"/> + <Tabview key="tabview"/> + <Header key="header"/> <ImgScale /> </div> ) diff --git a/src/views/systemproc/index.jsx b/src/views/systemproc/index.jsx index 9f1f68a..d6bf70e 100644 --- a/src/views/systemproc/index.jsx +++ b/src/views/systemproc/index.jsx @@ -1,7 +1,5 @@ import React, {Component} from 'react' -import { ConfigProvider } from 'antd' import { withRouter } from 'react-router-dom' -import zhCN from 'antd/es/locale/zh_CN' import Header from '../systemfunc/header' import Proc from './proc' @@ -20,10 +18,8 @@ return ( <div className="mk-proc-view"> - <ConfigProvider locale={zhCN}> - <Header key="header"/> - <Proc func={func} /> - </ConfigProvider> + <Header key="header"/> + <Proc func={func} /> </div> ) } diff --git a/src/views/tabledesign/index.jsx b/src/views/tabledesign/index.jsx index 6443288..6dd9642 100644 --- a/src/views/tabledesign/index.jsx +++ b/src/views/tabledesign/index.jsx @@ -4,14 +4,13 @@ import { is, fromJS } from 'immutable' import moment from 'moment' import HTML5Backend from 'react-dnd-html5-backend' -import { ConfigProvider, notification, Modal, Collapse, Card, Switch, Button, Typography } from 'antd' +import { notification, Modal, Collapse, Card, Switch, Button, Typography } from 'antd' import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons' import md5 from 'md5' import Api from '@/api' import Utils, { setGLOBFuncs } from '@/utils/utils.js' import { langs } from '@/store/options' -import antdZhCN from 'antd/es/locale/zh_CN' import MKEmitter from '@/utils/events.js' import { getTables, getFuncsAndInters, getLangTrans } from '@/utils/utils-custom.js' import SourceElement from '@/templates/zshare/dragsource' @@ -24,7 +23,6 @@ const { Panel } = Collapse const { confirm } = Modal const { Paragraph } = Typography -const _locale = antdZhCN const MenuForm = asyncComponent(() => import('./menuform')) const PopView = asyncComponent(() => import('./popview')) @@ -864,7 +862,7 @@ const { view, activeKey, comloading, MenuId, config, settingshow, ParentId, menuloading, langName } = this.state return ( - <ConfigProvider locale={_locale}> + <> <Header menuName={config ? config.MenuName + langName : ''}/> <DndProvider backend={HTML5Backend}> {view !== 'popview' ? <div className="pc-table-view"> @@ -941,7 +939,7 @@ </DndProvider> <StyleController /> <ModalController /> - </ConfigProvider> + </> ) } } -- Gitblit v1.8.0