From 9b6ce1a5778c6e1a813237e87588c0052aae1bbb Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 29 四月 2020 17:26:15 +0800 Subject: [PATCH] 2020-04-29 --- src/templates/comtableconfig/index.jsx | 66 +++++++++----------------------- 1 files changed, 19 insertions(+), 47 deletions(-) diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index ac8f3cc..c3135c9 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -10,8 +10,8 @@ import Api from '@/api' import Utils from '@/utils/utils.js' import options from '@/store/options.js' -import zhCN from '@/locales/zh-CN/comtable.js' -import enUS from '@/locales/en-US/comtable.js' +import zhCN from '@/locales/zh-CN/model.js' +import enUS from '@/locales/en-US/model.js' import { getSearchForm, getActionForm, getColumnForm } from '@/templates/zshare/formconfig' import { queryTableSql } from '@/utils/option.js' @@ -455,8 +455,8 @@ handleAction = (card, type) => { let ableField = this.props.permFuncField.join(', ') let functip = <div> - <p style={{marginBottom: '5px'}}>{this.state.dict['header.modal.func.innerface'].replace('@ableField', ableField)}</p> - <p>{this.state.dict['header.modal.func.outface']}</p> + <p style={{marginBottom: '5px'}}>{this.state.dict['model.tooltip.func.innerface'].replace('@ableField', ableField)}</p> + <p>{this.state.dict['model.tooltip.func.outface']}</p> </div> this.setState({ @@ -1272,22 +1272,13 @@ this.menuformRef.handleConfirm().then(res => { this.actionFormRef.handleConfirm().then(result => { - if (!['pop', 'exec', 'prompt'].includes(result.OpenType) || result.funcType || result.intertype !== 'inner' || result.innerFunc ) { - notification.warning({ - top: 92, - message: '鎵撳紑鏂瑰紡涓� 寮圭獥锛堣〃鍗曪級銆佹彁绀烘鎴栫洿鎺ユ墽琛岋紝涓斾娇鐢ㄧ郴缁熷嚱鏁版椂锛屾墠鍙互鍒涘缓鎺ュ彛锛�', - duration: 5 - }) - return - } - let _menu = { type: 'main', MenuID: menu.MenuID, menuName: res.menuName, menuNo: res.menuNo } - + this.refs.btnCreatInterface.triggerInInterface(result, config, _menu) }) }) @@ -1330,7 +1321,7 @@ confirm({ content: `纭畾鍒犻櫎<<${element.card.label}>>鍚楋紵`, - okText: this.state.dict['header.confirm'], + okText: this.state.dict['model.confirm'], cancelText: this.state.dict['header.cancel'], onOk() { let _config = null @@ -2110,7 +2101,7 @@ if (config.isAdd) { confirm({ content: '鑿滃崟灏氭湭鎻愪氦锛岀‘瀹氭斁寮冧繚瀛樺悧锛�', - okText: this.state.dict['header.confirm'], + okText: this.state.dict['model.confirm'], cancelText: this.state.dict['header.cancel'], onOk() { _this.props.handleView() @@ -2209,25 +2200,6 @@ }) } - const textmatch = { // 閫夋嫨text鏃跺尮閰嶈鍒� - text: 'like', - number: 'like', - datetime: 'like', - date: 'like' - } - const selectmatch = { // 閫夋嫨select鏃跺尮閰嶈鍒� - text: '=', - number: '=', - datetime: '=', - date: '=' - } - const datematch = { // 閫夋嫨dateRange鏃跺尮閰嶈鍒� - text: 'between', - number: 'between', - datetime: 'between', - date: 'between' - } - // 鑾峰彇宸查�夊瓧娈甸泦鍚� let cards = this.refs.searchcard.state.selectCards @@ -2255,12 +2227,12 @@ if (cell.type !== item.type) { // 鏁版嵁绫诲瀷淇敼 if (cell.type === 'select') { - item.match = selectmatch[cell.datatype] + item.match = '=' } else if (cell.type === 'daterange') { - item.match = datematch[cell.datatype] + item.match = 'between' } else { cell.type = 'text' - item.match = textmatch[cell.datatype] + item.match = 'like' } item.type = cell.type @@ -2277,11 +2249,11 @@ _columns.forEach(item => { let _match = '' if (item.type === 'select') { - _match = selectmatch[item.datatype] + _match = '=' } else if (item.type === 'daterange') { - _match = datematch[item.datatype] + _match = 'between' } else { - _match = textmatch[item.datatype] + _match = 'like' } let newcard = { @@ -2734,7 +2706,7 @@ confirm({ content: `纭畾鏂板缓鏍囩缁勫悧锛焋, - okText: this.state.dict['header.confirm'], + okText: this.state.dict['model.confirm'], cancelText: this.state.dict['header.cancel'], onOk() { let newgroup = 'tabs' + Utils.getuuid() @@ -2759,7 +2731,7 @@ confirm({ content: `纭畾鍒犻櫎鏍囩缁勫悧锛焋, - okText: this.state.dict['header.confirm'], + okText: this.state.dict['model.confirm'], cancelText: this.state.dict['header.cancel'], onOk() { @@ -3119,7 +3091,7 @@ hasbtncrtinter ? <CreateInterface key="interface" dict={this.state.dict} ref="btnCreatInterface" trigger={this.btnCreatInterface}/> : null, modaltype === 'actionEdit' ? <CreateFunc key="create" dict={this.state.dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null, <Button key="cancel" onClick={this.editModalCancel}>{this.state.dict['header.cancel']}</Button>, - <Button key="confirm" type="primary" onClick={this.handleSubmit}>{this.state.dict['header.confirm']}</Button> + <Button key="confirm" type="primary" onClick={this.handleSubmit}>{this.state.dict['model.confirm']}</Button> ]} destroyOnClose > @@ -3210,7 +3182,7 @@ {/* 鏍规嵁瀛楁鍚嶆坊鍔犳樉绀哄垪鍙婃悳绱㈡潯浠� */} <Modal wrapClassName="common-table-fields-modal" - title={this.state.dict['header.edit']} + title={this.state.dict['model.edit']} visible={this.state.tableVisible} width={'65vw'} maskClosable={false} @@ -3279,7 +3251,7 @@ </Modal> {/* 璁剧疆鍏ㄥ眬閰嶇疆鍙婂垪琛ㄦ暟鎹簮 */} <Modal - title={this.state.dict['header.edit']} + title={this.state.dict['model.edit']} visible={this.state.settingVisible} width={750} maskClosable={false} @@ -3292,7 +3264,7 @@ <CreateInterface key="interface" dict={this.state.dict} ref="tableCreatInterface" trigger={this.tableCreatInterface}/>, <CreateFunc key="create" dict={this.state.dict} ref="tableCreatFunc" trigger={this.tableCreatFunc}/>, <Button key="cancel" onClick={() => { this.setState({ settingVisible: false }) }}>{this.state.dict['header.cancel']}</Button>, - <Button key="confirm" type="primary" loading={this.state.sqlVerifing} onClick={this.settingSave}>{this.state.dict['header.confirm']}</Button> + <Button key="confirm" type="primary" loading={this.state.sqlVerifing} onClick={this.settingSave}>{this.state.dict['model.confirm']}</Button> ]} destroyOnClose > -- Gitblit v1.8.0