From cb9ade2afd2a367ad767bc605ab7086c695dd010 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 09 十二月 2022 15:53:32 +0800 Subject: [PATCH] 2022-12-09 --- src/templates/formtabconfig/index.jsx | 425 ++++++---------------------------------------------- 1 files changed, 51 insertions(+), 374 deletions(-) diff --git a/src/templates/formtabconfig/index.jsx b/src/templates/formtabconfig/index.jsx index 317f850..028b214 100644 --- a/src/templates/formtabconfig/index.jsx +++ b/src/templates/formtabconfig/index.jsx @@ -1,16 +1,13 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import {connect} from 'react-redux' import { is, fromJS } from 'immutable' import { DndProvider } from 'react-dnd' import HTML5Backend from 'react-dnd-html5-backend' import moment from 'moment' -import { Button, Card, Modal, Collapse, notification, Spin, Select, List, Empty, Switch, Tooltip } from 'antd' -import { QuestionCircleOutlined, CloseOutlined, RedoOutlined, SettingOutlined, PlusOutlined, DeleteOutlined, EditOutlined, SnippetsOutlined } from '@ant-design/icons' +import { Button, Card, Modal, Collapse, notification, Spin, Switch, Tooltip } from 'antd' +import { QuestionCircleOutlined, RedoOutlined, SettingOutlined, PlusOutlined, DeleteOutlined, EditOutlined, SnippetsOutlined } from '@ant-design/icons' import Api from '@/api' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import Utils, { FuncUtils } from '@/utils/utils.js' import { getModalForm, getActionForm } from '@/templates/zshare/formconfig' import { queryTableSql } from '@/utils/option.js' @@ -22,7 +19,6 @@ import SettingForm from './settingform' import DragElement from './dragelement' import GroupForm from './groupform' -import EditCard from '@/templates/zshare/editcard' import MenuForm from '@/templates/zshare/menuform' import SourceElement from '@/templates/zshare/dragsource' @@ -31,7 +27,6 @@ import './index.scss' const { Panel } = Collapse -const { Option } = Select const { confirm } = Modal const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform')) const CreateFunc = asyncComponent(() => import('@/templates/zshare/createfunc')) @@ -46,10 +41,8 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, // 瀛楀吀 config: null, // 椤甸潰閰嶇疆 modaltype: '', // 妯℃�佹绫诲瀷锛屾帶鍒舵ā鎬佹鏄剧ず - tableVisible: false, // 鏁版嵁琛ㄥ瓧娈垫ā鎬佹 tableColumns: [], // 琛ㄦ牸鏄剧ず鍒� fields: null, // 鎼滅储鏉′欢鍙婃樉绀哄垪锛屽彲閫夊瓧娈� menuformlist: null, // 鍩烘湰淇℃伅琛ㄥ崟瀛楁 @@ -61,7 +54,6 @@ settingVisible: false, // 鍏ㄥ眬閰嶇疆妯℃�佹 closeVisible: false, // 鍏抽棴妯℃�佹 tables: [], // 鍙敤琛ㄥ悕 - selectedTables: [], // 宸查�夎〃鍚� originMenu: null, // 鍘熷鑿滃崟 delActions: [], // 鍒犻櫎鎸夐挳鍒楄〃 tabviews: [], // 鎵�鏈夋爣绛鹃〉 @@ -143,12 +135,11 @@ openEdition: btnTab.open_edition || '', columns: columns, originMenu: JSON.parse(JSON.stringify(_config)), - selectedTables: _config.tables, menuformlist: [ { type: 'text', key: 'menuName', - label: this.state.dict['model.menu'] + this.state.dict['model.name'], + label: '鑿滃崟鍚嶇О', initVal: menu.MenuName, readonly: true }, @@ -195,73 +186,6 @@ duration: 5 }) } - }) - - let deffers = this.state.selectedTables.map(item => { - return new Promise(resolve => { - Api.getSystemConfig({func: 'sPC_Get_FieldName', TBName: item.TbName}).then(res => { - res.TBName = item.TbName - resolve(res) - }) - }) - }) - Promise.all(deffers).then(response => { - let _columns = [] - response.forEach(res => { - if (res.status) { - let tabmsg = { - tableName: res.TBName, - columns: res.FDName.map(item => { - let _type = item.FieldType.toLowerCase() - let _decimal = 0 - if (/^nvarchar/.test(_type)) { - _type = 'text' - } else if (/^int/.test(_type)) { - _type = 'number' - } else if (/^decimal/.test(_type)) { - _decimal = _type.split(',')[1] - _decimal = parseInt(_decimal) - if (_decimal > 4) { - _decimal = 4 - } - _type = 'number' - } else if (/^decimal/.test(_type)) { - _decimal = _type.split(',')[1] - _decimal = parseInt(_decimal) - if (_decimal > 4) { - _decimal = 4 - } - _type = 'number' - } else if (/^datetime/.test(_type)) { - _type = 'datetime' - } else if (/^date/.test(_type)) { - _type = 'date' - } else { - _type = 'text' - } - - return { - field: item.FieldName, - label: item.FieldDec, - type: _type, - datatype: _type, - decimal: _decimal - } - }) - } - _columns.push(tabmsg) - } else { - notification.warning({ - top: 92, - message: res.message, - duration: 5 - }) - } - }) - - this.setState({ - tableColumns: _columns - }) }) Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => { @@ -595,20 +519,22 @@ let param = { func: 's_debug_sql', exec_type: 'y', - LText: res.dataSource + LText: `declare @mk_organization nvarchar(512) + ${res.dataSource}` } - param.LText = param.LText.replace(/@\$|\$@/ig, '') + param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`) + param.LText = param.LText.replace(/\n/g, ' ') param.LText = Utils.formatOptions(param.LText) - param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) if (window.GLOB.mainSystemApi && res.database === 'sso') { param.rduri = window.GLOB.mainSystemApi } - Api.getLocalConfig(param).then(result => { + Api.genericInterface(param).then(result => { if (result.status) { this.setState({ sqlVerifing: false, @@ -749,20 +675,14 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) - Api.getLocalConfig(param) + Api.genericInterface(param) } let _config = {...config, setting: setting} - let newLText = Utils.formatOptions(FuncUtils.getTableFunc(setting, menu, _config)) // 鍒涘缓瀛樺偍杩囩▼sql + let newLText = Utils.formatOptions(FuncUtils.getTableFunc(setting.innerFunc, menu, _config)) // 鍒涘缓瀛樺偍杩囩▼sql let DelText = Utils.formatOptions(FuncUtils.dropfunc(setting.innerFunc)) // 鍒犻櫎瀛樺偍杩囩▼sql - this.refs.tableCreatFunc.exec(setting.innerFunc, newLText, DelText).then(result => { - if (result === 'success') { - this.setState({ - config: _config - }) - } - }) + this.refs.tableCreatFunc.exec(setting.innerFunc, newLText, DelText) }) } @@ -862,7 +782,7 @@ } let _LongParam = '' - let _config = {...config, tables: this.state.selectedTables} + let _config = {...config} // 鏁版嵁鏉ユ簮涓烘煡璇笖鏈缃富閿椂锛屽惎鐢ㄤ负false if (_config.setting.datatype === 'query' && !_config.setting.primaryKey) { @@ -1141,7 +1061,7 @@ }, () => { notification.warning({ top: 92, - message: this.state.dict['model.menu.basemsg'], + message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒', duration: 5 }) }) @@ -1233,7 +1153,7 @@ onCancel() {} }) } else { - let _config = {...config, tables: this.state.selectedTables} + let _config = {...config} if (!is(fromJS(_config), fromJS(originMenu))) { this.setState({ @@ -1243,174 +1163,6 @@ this.handleViewBack() } } - } - - queryField = (type) => { - const {selectedTables, tableColumns, config} = this.state - // 鍒ゆ柇鏄惁宸查�夋嫨琛ㄥ悕 - if (selectedTables.length === 0) { - notification.warning({ - top: 92, - message: '璇烽�夋嫨琛ㄥ悕锛�', - duration: 5 - }) - return - } - - // 琛ㄥ瓧娈甸泦杞负map鏁版嵁 - let columns = new Map() - tableColumns.forEach(table => { - table.columns.forEach(column => { - columns.set(column.field, column) - }) - }) - - if (type === 'search') { - // 娣诲姞鎼滅储鏉′欢锛屽瓧娈甸泦涓瓨鍦ㄦ悳绱㈡潯浠跺瓧娈碉紝浣跨敤鎼滅储鏉′欢瀵硅薄鏇挎崲瀛楁闆嗭紝璁剧疆鏁版嵁绫诲瀷 - config.groups.forEach(group => { - group.sublist.forEach(item => { - if (columns.has(item.field)) { - let _datatype = columns.get(item.field).datatype - columns.set(item.field, {...item, selected: true, datatype: _datatype}) - } - }) - }) - } - - // 鏄剧ず瀛楁闆嗗脊绐� - this.setState({ - tableVisible: true, - fields: [...columns.values()] - }) - } - - addFieldSubmit = () => { - const {config} = this.state - // 瀛楁闆嗕负绌猴紝鍏抽棴寮圭獥 - if (!this.state.fields || this.state.fields.length === 0) { - this.setState({ - tableVisible: false, - }) - } - - // 鑾峰彇宸查�夊瓧娈甸泦鍚� - let cards = this.refs.searchcard.state.selectCards - let columnsMap = new Map() - cards.forEach(card => { - columnsMap.set(card.field, card) - }) - - let groups = config.groups.map(group => { - group.sublist = group.sublist.map(item => { - if (columnsMap.has(item.field)) { - let cell = columnsMap.get(item.field) - - if (cell.selected && cell.type !== item.type) { // 鏁版嵁绫诲瀷淇敼 - item.type = cell.type - item.initval = '' - } - columnsMap.delete(item.field) - } - return item - }) - return group - }) - - let items = [...columnsMap.values()].map(item => { - let newcard = { - uuid: Utils.getuuid(), - label: item.label, - field: item.field, - initval: '', - type: item.type, - resourceType: '0', - options: [], - orderType: 'asc' - } - - return newcard - }) - - groups = groups.map(group => { - if (group.isDefault) { - group.sublist = [...group.sublist, ...items] - group.sublist = group.sublist.filter(item => !item.origin) - } - return group - }) - - this.setState({ - config: {...config, groups: groups} - }) - notification.success({ - top: 92, - message: '鎿嶄綔鎴愬姛', - duration: 2 - }) - } - - onTableChange = (value) => { - const {tables, selectedTables, tableColumns} = this.state - - let _table = tables.filter(item => item.TbName === value)[0] - let isSelected = !!selectedTables.filter(cell => cell.TbName === value)[0] - if (!isSelected) { - this.setState({ - selectedTables: [...selectedTables, _table] - }) - Api.getSystemConfig({func: 'sPC_Get_FieldName', TBName: value}).then(res => { - if (res.status) { - let tabmsg = { - tableName: _table.name, - columns: res.FDName.map(item => { - let _type = item.FieldType.toLowerCase() - let _decimal = 0 - if (/^nvarchar/.test(_type)) { - _type = 'text' - } else if (/^int/.test(_type)) { - _type = 'number' - } else if (/^decimal/.test(_type)) { - _decimal = _type.split(',')[1] - _decimal = parseInt(_decimal) - _type = 'number' - } else if (/^datetime/.test(_type)) { - _type = 'datetime' - } else if (/^date/.test(_type)) { - _type = 'date' - } else { - _type = 'text' - } - - return { - field: item.FieldName, - label: item.FieldDec, - type: _type, - datatype: _type, - decimal: _decimal - } - }) - } - this.setState({ - tableColumns: [...tableColumns, tabmsg] - }) - } else { - notification.warning({ - top: 92, - message: res.message, - duration: 5 - }) - } - }) - } - } - - deleteTable = (table) => { - const {selectedTables, tableColumns} = this.state - - this.setState({ - selectedTables: selectedTables.filter(item => item.TbName !== table.TbName), - tableColumns: tableColumns.filter(item => item.tableName !== table.TbName) - }) } changeSetting = () => { @@ -1440,7 +1192,7 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) - Api.getLocalConfig(param) + Api.genericInterface(param) } if (res.interType === 'inner' && !res.innerFunc && res.dataresource && /\s/.test(res.dataresource)) { @@ -1454,13 +1206,14 @@ LText: res.dataresource } - param.LText = param.LText.replace(/@\$|\$@/ig, '') - - param.LText = Utils.formatOptions(param.LText) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`) + param.LText = param.LText.replace(/\n/g, ' ') + + param.LText = Utils.formatOptions(param.LText) param.secretkey = Utils.encrypt('', param.timestamp) - Api.getLocalConfig(param).then(result => { + Api.genericInterface(param).then(result => { if (result.status) { this.setState({ sqlVerifing: false, @@ -1499,7 +1252,7 @@ }) } else { this.menuformRef.handleConfirm().then(res => { - let _config = {...config, tables: this.state.selectedTables} + let _config = {...config} if (!is(fromJS(originMenu), fromJS(_config))) { notification.warning({ @@ -1777,62 +1530,23 @@ <div className="tools"> <Collapse accordion defaultActiveKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}> {/* 鍩烘湰淇℃伅 */} - <Panel forceRender={true} header={this.state.dict['header.menu.basedata']} key="0" id="common-basedata"> + <Panel forceRender={true} header="鍩烘湰淇℃伅" key="0" id="common-basedata"> {/* 鑿滃崟淇℃伅 */} <MenuForm - dict={this.state.dict} formlist={this.state.menuformlist} wrappedComponentRef={(inst) => this.menuformRef = inst} /> - {/* 琛ㄥ悕娣诲姞 */} - <div className="ant-col ant-form-item-label"> - <label> - <Tooltip placement="topLeft" title="姝ゅ鍙互娣诲姞閰嶇疆鐩稿叧鐨勫父鐢ㄨ〃锛屽湪娣诲姞鎼滅储鏉′欢鍜屾樉绀哄垪鏃讹紝鍙�氳繃宸ュ叿鏍忎腑鐨勬坊鍔犳寜閽紝鎵归噺娣诲姞琛ㄦ牸鐩稿叧瀛楁銆�"> - <QuestionCircleOutlined className="mk-form-tip" /> - {this.state.dict['header.menu.table.add']} - </Tooltip> - </label> - </div> - <Select - showSearch - className="tables" - style={{ width: '100%' }} - optionFilterProp="children" - value="璇烽�夋嫨琛ㄥ悕" - onChange={this.onTableChange} - showArrow={false} - getPopupContainer={() => document.getElementById('common-basedata')} - filterOption={(input, option) => { - return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 || - option.props.value.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }} - > - {this.state.tables.map((table, index) => ( - <Option key={index} title={table.TbName} value={table.TbName}>{table.Remark}</Option> - ))} - </Select> - {this.state.selectedTables.length > 0 && <List - size="small" - bordered - dataSource={this.state.selectedTables} - renderItem={(item, index) => <List.Item key={index} title={item.Remark + ' (' + item.TbName + ')'}> - {item.Remark + ' (' + item.TbName + ')'} - <CloseOutlined onClick={() => this.deleteTable(item)}/> - <div className="bottom-mask"></div> - </List.Item>} - />} </Panel> {/* 鎼滅储鏉′欢娣诲姞 */} - <Panel header={this.state.dict['header.menu.form']} key="1"> + <Panel header="琛ㄥ崟" key="1"> <div className="search-element"> {Source.searchItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) })} </div> - <Button type="primary" block onClick={() => this.queryField('search')}>鎵归噺娣诲姞</Button> </Panel> {/* 鎸夐挳娣诲姞 */} - <Panel header={this.state.dict['header.menu.action']} key="2"> + <Panel header="鎸夐挳" key="2"> <div className="search-element"> {Source.actionItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) @@ -1840,7 +1554,7 @@ </div> </Panel> {/* 娣诲姞鏍囩 */} - <Panel header={this.state.dict['header.menu.tab']} key="4"> + <Panel header="鏍囩椤�" key="4"> <div className="search-element"> {Source.tabItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) @@ -1878,14 +1592,14 @@ } bordered={false} extra={ <div> <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={this.state.config.enabled} onChange={this.onEnabledChange} /> - <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button> - <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button> + <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>淇濆瓨</Button> + <Button onClick={this.cancelConfig}>杩斿洖</Button> </div> } style={{ width: '100%' }}> <SettingOutlined onClick={this.changeSetting} /> - <Tooltip placement="bottomLeft" overlayClassName="middle" title="鍦ㄥ乏渚у伐鍏锋爮銆婃悳绱€�嬩腑锛岄�夋嫨瀵瑰簲鎼滅储妗嗘嫋鑷虫澶勬坊鍔狅紱鎴栫偣鍑绘寜閽�婃坊鍔犳悳绱㈡潯浠躲�嬫壒閲忔坊鍔狅紝閫夋嫨鎵归噺娣诲姞鏃讹紝闇�鎻愬墠閫夋嫨浣跨敤琛ㄣ��"> + {/* <Tooltip placement="bottomLeft" overlayClassName="middle" title="鍦ㄥ乏渚у伐鍏锋爮銆婃悳绱€�嬩腑锛岄�夋嫨瀵瑰簲鎼滅储妗嗘嫋鑷虫澶勬坊鍔狅紱鎴栫偣鍑绘寜閽�婃坊鍔犳悳绱㈡潯浠躲�嬫壒閲忔坊鍔狅紝閫夋嫨鎵归噺娣诲姞鏃讹紝闇�鎻愬墠閫夋嫨浣跨敤琛ㄣ��"> <QuestionCircleOutlined style={{position: 'relative', color: '#c49f47', left: '5px', top: '20px'}} /> - </Tooltip> + </Tooltip> */} <Collapse activeKey={config.groups.map(group => group.uuid)} expandIconPosition={'right'} @@ -1902,7 +1616,7 @@ <EditOutlined onClick={() => { this.handleGroup(group) }}/> </span> )}> - {group.isDefault ? <SnippetsOutlined title={this.state.dict['header.form.paste']} onClick={() => {this.setState({pasteVisible: true})}} /> : null} + {group.isDefault ? <SnippetsOutlined title="绮樿创" onClick={() => {this.setState({pasteVisible: true})}} /> : null} <DragElement type="search" groupId={group.uuid} @@ -1916,9 +1630,9 @@ ))} </Collapse> <div className="action-list"> - <Tooltip placement="bottomLeft" overlayClassName="middle" title="鍦ㄥ乏渚у伐鍏锋爮銆婃寜閽�嬩腑锛岄�夋嫨瀵瑰簲绫诲瀷鐨勬寜閽嫋鑷虫澶勬坊鍔狅紝濡傞�夋嫨鎸夐挳绫诲瀷涓鸿〃鍗曘�佹柊鏍囩椤电瓑鍚湁閰嶇疆椤甸潰鐨勬寜閽紝鍙湪宸︿晶宸ュ叿鏍�-鎸夐挳-鍙厤缃寜閽锛岀偣鍑绘寜閽畬鎴愮浉鍏抽厤缃�傛敞锛氬綋璁剧疆鎸夐挳鏄剧ず浣嶇疆涓鸿〃鏍兼椂锛屾樉绀哄垪浼氬鍔犳搷浣滃垪銆�"> + {/* <Tooltip placement="bottomLeft" overlayClassName="middle" title="鍦ㄥ乏渚у伐鍏锋爮銆婃寜閽�嬩腑锛岄�夋嫨瀵瑰簲绫诲瀷鐨勬寜閽嫋鑷虫澶勬坊鍔狅紝濡傞�夋嫨鎸夐挳绫诲瀷涓鸿〃鍗曘�佹柊鏍囩椤电瓑鍚湁閰嶇疆椤甸潰鐨勬寜閽紝鍙湪宸︿晶宸ュ叿鏍�-鎸夐挳-鍙厤缃寜閽锛岀偣鍑绘寜閽畬鎴愮浉鍏抽厤缃�傛敞锛氬綋璁剧疆鎸夐挳鏄剧ず浣嶇疆涓鸿〃鏍兼椂锛屾樉绀哄垪浼氬鍔犳搷浣滃垪銆�"> <QuestionCircleOutlined style={{position: 'absolute', color: '#c49f47', left: '5px', top: '5px'}} /> - </Tooltip> + </Tooltip> */} <DragElement type="action" list={this.state.config.action} @@ -1950,7 +1664,6 @@ destroyOnClose > <ModalForm - dict={this.state.dict} card={this.state.card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} @@ -1959,21 +1672,20 @@ </Modal> {/* 缂栬緫鎸夐挳锛氬鍒躲�佺紪杈� */} <Modal - title={this.state.dict['model.action'] + '-' + this.state.dict['model.edit']} + title="鎸夐挳缂栬緫" visible={modaltype === 'actionEdit'} - width={900} + width={920} maskClosable={false} onCancel={this.editModalCancel} footer={[ this.state.card && this.state.card.btnType !== 'cancel' ? - <CreateFunc key="create" dict={this.state.dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null, - <Button key="cancel" onClick={this.editModalCancel}>{this.state.dict['model.cancel']}</Button>, - <Button key="confirm" type="primary" onClick={this.handleSubmit}>{this.state.dict['model.confirm']}</Button> + <CreateFunc key="create" ref="btnCreatFunc" trigger={this.creatFunc}/> : null, + <Button key="cancel" onClick={this.editModalCancel}>鍙栨秷</Button>, + <Button key="confirm" type="primary" onClick={this.handleSubmit}>纭畾</Button> ]} destroyOnClose > <ActionForm - dict={this.state.dict} card={this.state.card} tabs={this.state.tabviews} formlist={this.state.formlist} @@ -1981,37 +1693,13 @@ wrappedComponentRef={(inst) => this.actionFormRef = inst} /> </Modal> - {/* 鏍规嵁瀛楁鍚嶆坊鍔犳樉绀哄垪鍙婃悳绱㈡潯浠� */} - <Modal - wrapClassName="common-table-fields-modal" - title={this.state.dict['model.edit']} - visible={this.state.tableVisible} - width={'65vw'} - maskClosable={false} - cancelText={this.state.dict['model.close']} - onOk={this.addFieldSubmit} - onCancel={() => { // 鍙栨秷娣诲姞 - this.setState({ - tableVisible: false - }) - }} - destroyOnClose - > - {this.state.fields && this.state.fields.length > 0 ? - <EditCard data={this.state.fields} ref="searchcard" type={'form'} dict={this.state.dict} /> : null - } - {(!this.state.fields || this.state.fields.length === 0) && - <Empty /> - } - </Modal> {/* 鎸夐挳浣跨敤绯荤粺瀛樺偍杩囩▼鏃讹紝楠岃瘉淇℃伅妯℃�佹 */} <Modal - wrapClassName="common-table-fields-modal" - title={'楠岃瘉淇℃伅'} + wrapClassName="mk-pop-modal" visible={this.state.profileVisible} width={'90vw'} maskClosable={false} - okText={this.state.dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { if (this.verifyRef.handleCancel) { @@ -2030,12 +1718,11 @@ config={this.state.config} columns={this.state.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} - dict={this.state.dict} /> </Modal> {/* 璁剧疆鍏ㄥ眬閰嶇疆鍙婂垪琛ㄦ暟鎹簮 */} <Modal - title={this.state.dict['model.edit']} + title="缂栬緫" visible={this.state.settingVisible} width={700} maskClosable={false} @@ -2045,14 +1732,13 @@ }) }} footer={[ - <CreateFunc key="create" dict={this.state.dict} ref="tableCreatFunc" trigger={this.tableCreatFunc}/>, - <Button key="cancel" onClick={() => { this.setState({ settingVisible: false }) }}>{this.state.dict['model.cancel']}</Button>, - <Button key="confirm" type="primary" loading={this.state.sqlVerifing} onClick={this.settingSave}>{this.state.dict['model.confirm']}</Button> + <CreateFunc key="create" ref="tableCreatFunc" trigger={this.tableCreatFunc}/>, + <Button key="cancel" onClick={() => { this.setState({ settingVisible: false }) }}>鍙栨秷</Button>, + <Button key="confirm" type="primary" loading={this.state.sqlVerifing} onClick={this.settingSave}>纭畾</Button> ]} destroyOnClose > <SettingForm - dict={this.state.dict} menu={this.props.menu} config={this.state.config} inputSubmit={this.settingSave} @@ -2066,13 +1752,13 @@ visible={this.state.closeVisible} onCancel={() => { this.setState({closeVisible: false}) }} footer={[ - <Button key="save" className="mk-btn mk-green" loading={this.state.menucloseloading} onClick={this.submitConfig}>{this.state.dict['model.save']}</Button>, - <Button key="confirm" className="mk-btn mk-yellow" onClick={this.handleViewBack}>{this.state.dict['model.notsave']}</Button>, - <Button key="cancel" onClick={() => { this.setState({closeVisible: false}) }}>{this.state.dict['model.cancel']}</Button> + <Button key="save" className="mk-btn mk-green" loading={this.state.menucloseloading} onClick={this.submitConfig}>淇濆瓨</Button>, + <Button key="confirm" className="mk-btn mk-yellow" onClick={this.handleViewBack}>涓嶄繚瀛�</Button>, + <Button key="cancel" onClick={() => { this.setState({closeVisible: false}) }}>鍙栨秷</Button> ]} destroyOnClose > - {this.state.dict['header.menu.config.placeholder']} + 閰嶇疆宸蹭慨鏀癸紝鏄惁淇濆瓨閰嶇疆淇℃伅锛� </Modal> <Modal title="鍒嗙粍绠$悊" @@ -2085,7 +1771,6 @@ > <GroupForm groups={config.groups} - dict={this.state.dict} group={this.state.editgroup} inputSubmit={this.handleGroupSave} wrappedComponentRef={(inst) => this.groupRef = inst} @@ -2093,7 +1778,7 @@ </Modal> {/* 鎸夐挳閰嶇疆淇℃伅绮樿创澶嶅埗 */} <Modal - title={this.state.dict['header.form.paste']} + title="绮樿创" visible={this.state.pasteVisible} width={600} maskClosable={false} @@ -2102,8 +1787,8 @@ destroyOnClose > <PasteForm - dict={this.state.dict} wrappedComponentRef={(inst) => this.pasteFormRef = inst} + inputSubmit={this.pasteSubmit} /> </Modal> {this.state.loading && <Spin size="large" />} @@ -2112,12 +1797,4 @@ } } -const mapStateToProps = () => { - return {} -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(ComTableConfig) +export default ComTableConfig -- Gitblit v1.8.0