From e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 17 十月 2022 17:57:34 +0800 Subject: [PATCH] 2022-10-17 --- src/menu/components/chart/antv-bar/chartcompile/index.jsx | 13 src/templates/zshare/modalform/index.jsx | 22 src/templates/zshare/editcard/index.jsx | 11 src/mob/searchconfig/index.jsx | 16 src/menu/components/share/markcomponent/index.jsx | 9 src/menu/components/card/cardcellcomponent/elementform/index.jsx | 19 src/menu/components/chart/antv-scatter/chartcompile/index.jsx | 11 src/pc/components/navbar/normal-navbar/linksetting/index.jsx | 7 src/templates/sharecomponent/settingcalcomponent/verifycard/columnform/index.jsx | 9 src/templates/zshare/verifycard/customscript/index.jsx | 3 src/views/menudesign/printmenuform/index.jsx | 13 src/templates/sharecomponent/chartcomponent/index.jsx | 4 src/menu/components/chart/antv-scatter/index.jsx | 5 src/templates/sharecomponent/columncomponent/markcolumn/index.jsx | 2 src/templates/modalconfig/index.jsx | 43 src/mob/components/official/index.jsx | 7 src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx | 8 src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx | 5 src/mob/modalconfig/index.jsx | 17 src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx | 9 src/menu/components/table/edit-table/columns/editColumn/index.jsx | 14 src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx | 29 src/tabviews/zshare/actionList/changeuserbutton/index.jsx | 7 src/menu/datasource/verifycard/index.jsx | 13 src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx | 51 src/views/imdesign/menuform/index.jsx | 11 src/menu/components/form/formaction/formconfig.jsx | 37 src/menu/components/share/usercomponent/settingform/index.jsx | 3 src/templates/formtabconfig/settingform/index.jsx | 33 src/menu/components/card/cardcellcomponent/index.jsx | 27 src/menu/components/form/tab-form/index.jsx | 11 src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx | 35 src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx | 37 src/templates/sharecomponent/actioncomponent/verifyexcelout/columnform/index.jsx | 14 src/templates/zshare/verifycard/uniqueform/index.jsx | 17 src/templates/subtableconfig/index.jsx | 26 src/templates/sharecomponent/actioncomponent/verifymegvii/index.jsx | 1 src/menu/components/chart/antv-pie/index.jsx | 5 src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx | 3 src/menu/components/editor/braft-editor/editorcontent/index.jsx | 7 src/menu/components/share/actioncomponent/actionform/index.jsx | 40 src/menu/components/table/edit-table/columns/tableIn/uniqueform/index.jsx | 13 src/templates/zshare/customscript/index.jsx | 7 src/menu/components/table/normal-table/columns/index.jsx | 7 src/templates/sharecomponent/treesettingcomponent/index.jsx | 6 src/menu/components/tabs/paste/index.jsx | 4 src/menu/components/table/edit-table/columns/index.jsx | 8 src/menu/components/chart/antv-dashboard/chartcompile/index.jsx | 13 src/templates/sharecomponent/actioncomponent/verifyexcelin/columnform/index.jsx | 26 src/menu/components/form/formaction/actionform/index.jsx | 13 src/templates/sharecomponent/actioncomponent/verifyexcelin/uniqueform/index.jsx | 13 src/templates/comtableconfig/index.jsx | 34 src/menu/components/chart/chart-custom/index.jsx | 5 src/menu/components/table/base-table/columns/editColumn/formconfig.jsx | 75 src/menu/components/form/simple-form/index.jsx | 11 src/menu/components/chart/antv-bar/index.jsx | 5 src/templates/sharecomponent/cardcomponent/index.jsx | 12 src/menu/components/table/edit-table/index.jsx | 3 src/templates/sharecomponent/tabscomponent/index.jsx | 7 src/templates/calendarconfig/calcomponent/calendarform/index.jsx | 21 src/mob/components/search/single-search/index.jsx | 10 src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx | 9 src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx | 9 src/menu/components/table/base-table/columns/editColumn/index.jsx | 13 src/menu/components/form/step-form/index.jsx | 11 src/views/pcdesign/index.jsx | 15 src/pc/quotecomponent/settingform/index.jsx | 5 src/menu/datasource/verifycard/settingform/index.jsx | 19 src/templates/sharecomponent/tabscomponent/tabform/index.jsx | 11 src/menu/components/share/actioncomponent/index.jsx | 27 src/menu/components/search/main-search/index.jsx | 11 src/templates/modalconfig/menuform/index.jsx | 5 src/templates/modalconfig/source.jsx | 20 src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx | 3 src/tabviews/zshare/settingcomponent/editTable/index.jsx | 11 src/pc/createview/settingform/index.jsx | 9 src/views/login/index.jsx | 15 src/templates/zshare/createinterface/mutilform/index.jsx | 7 src/menu/components/table/edit-table/columns/tableIn/index.jsx | 10 src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx | 7 src/components/thawmenu/index.jsx | 2 src/menu/components/share/searchcomponent/index.jsx | 6 src/views/menudesign/homeform/index.jsx | 5 src/pc/components/navbar/normal-navbar/menusetting/index.jsx | 7 src/templates/treepageconfig/index.jsx | 26 src/views/menudesign/menuform/index.jsx | 27 src/menu/datasource/index.jsx | 8 src/templates/treepageconfig/source.jsx | 6 src/templates/zshare/menuform/index.jsx | 5 src/menu/components/table/normal-table/columns/editColumn/index.jsx | 13 src/menu/components/form/formaction/index.jsx | 18 src/templates/formtabconfig/groupform/index.jsx | 3 src/templates/zshare/verifycard/contrastform/index.jsx | 21 src/templates/formtabconfig/source.jsx | 10 src/templates/sharecomponent/settingcomponent/settingform/index.jsx | 7 src/templates/sharecomponent/cardcomponent/carddetailform/index.jsx | 9 src/templates/calendarconfig/source.jsx | 18 src/views/mobdesign/index.jsx | 15 src/views/menudesign/index.jsx | 12 src/menu/datasource/verifycard/columnform/index.jsx | 16 src/templates/zshare/verifycard/voucherform/index.jsx | 15 src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx | 15 src/templates/zshare/modalform/datatable/index.jsx | 3 src/menu/components/share/actioncomponent/formconfig.jsx | 69 src/templates/sharecomponent/actioncomponent/actionform/index.jsx | 50 src/templates/calendarconfig/index.jsx | 28 src/menu/pastecontroller/index.jsx | 4 src/templates/sharecomponent/columncomponent/gridbtnform/index.jsx | 21 src/menu/components/chart/antv-dashboard/index.jsx | 5 src/templates/zshare/createinterface/index.jsx | 10 src/menu/components/table/base-table/columns/index.jsx | 7 src/templates/calendarconfig/tabcomponent/index.jsx | 8 src/views/imdesign/index.jsx | 11 src/menu/components/code/sandbox/editorcode/index.jsx | 7 src/templates/sharecomponent/searchcomponent/searchform/index.jsx | 24 src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx | 65 src/templates/sharecomponent/settingcomponent/index.jsx | 14 src/templates/subtableconfig/source.jsx | 48 src/views/mobdesign/menuform/index.jsx | 15 src/views/pcdesign/menuform/index.jsx | 13 src/templates/formtabconfig/index.jsx | 56 src/templates/zshare/verifycard/callbackcustomscript/index.jsx | 3 src/templates/sharecomponent/chartcomponent/chartcompile/index.jsx | 13 src/menu/datasource/verifycard/customscript/index.jsx | 5 src/mob/modalconfig/source.jsx | 17 src/templates/sharecomponent/searchcomponent/index.jsx | 11 src/pc/quotecomponent/index.jsx | 8 src/templates/zshare/editcomponent/index.jsx | 12 src/templates/sharecomponent/fieldscomponent/index.jsx | 11 src/menu/components/code/sandbox/index.jsx | 3 src/templates/sharecomponent/columncomponent/index.jsx | 18 src/templates/zshare/verifycard/customform/index.jsx | 13 src/templates/sharecomponent/columncomponent/colspanform/index.jsx | 49 src/menu/components/chart/chart-custom/chartcompile/index.jsx | 3 src/templates/calendarconfig/tabcomponent/tabform/index.jsx | 7 src/templates/modalconfig/dragelement/index.jsx | 4 src/templates/sharecomponent/settingcalcomponent/index.jsx | 8 src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx | 9 src/templates/calendarconfig/calcomponent/index.jsx | 6 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx | 17 src/index.js | 4 src/menu/components/share/usercomponent/index.jsx | 7 src/templates/comtableconfig/menuform/index.jsx | 28 src/templates/zshare/createfunc/index.jsx | 1 src/templates/zshare/formconfig.jsx | 313 +++--- src/menu/components/chart/antv-pie/chartcompile/index.jsx | 13 src/templates/zshare/verifycard/index.jsx | 37 src/templates/formtabconfig/actionform/index.jsx | 31 src/pc/createview/index.jsx | 8 /dev/null | 161 --- src/menu/components/card/cardcellcomponent/formconfig.jsx | 15 src/templates/sharecomponent/actioncomponent/index.jsx | 27 src/components/normalform/index.jsx | 7 src/menu/modalconfig/index.jsx | 23 src/templates/sharecomponent/tabscomponent/tabdragelement/index.jsx | 4 src/menu/components/share/normalform/index.jsx | 1 src/templates/subtableconfig/menuform/index.jsx | 11 src/utils/option.js | 14 src/menu/components/share/markcomponent/markform/index.jsx | 9 src/templates/sharecomponent/chartgroupcomponent/index.jsx | 9 src/templates/sharecomponent/columncomponent/columnform/index.jsx | 13 161 files changed, 1,112 insertions(+), 1,727 deletions(-) diff --git a/src/components/normalform/index.jsx b/src/components/normalform/index.jsx index 5ef4c9d..c587960 100644 --- a/src/components/normalform/index.jsx +++ b/src/components/normalform/index.jsx @@ -3,8 +3,6 @@ import { is, fromJS } from 'immutable' import { Modal } from 'antd' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import ModalForm from './modalform' class NormalFormComponent extends Component { @@ -17,7 +15,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, visible: false, formlist: [] } @@ -62,7 +59,7 @@ render () { const { title, width, children, double } = this.props - const { visible, dict, formlist } = this.state + const { visible, formlist } = this.state return ( <> @@ -73,7 +70,7 @@ visible={visible} width={width} maskClosable={false} - okText={dict['model.confirm']} + okText="纭畾" onOk={this.submit} onCancel={this.cancel} destroyOnClose diff --git a/src/components/thawmenu/index.jsx b/src/components/thawmenu/index.jsx index 843b8da..dbf1672 100644 --- a/src/components/thawmenu/index.jsx +++ b/src/components/thawmenu/index.jsx @@ -61,7 +61,7 @@ if (targetKeys.length === 0) { notification.warning({ top: 92, - message: this.state.dict['form.required.select'] + this.state.dict['model.menu'], + message: '璇烽�夋嫨鑿滃崟', duration: 5 }) return diff --git a/src/index.js b/src/index.js index ee1ef18..21fe5a0 100644 --- a/src/index.js +++ b/src/index.js @@ -79,7 +79,9 @@ GLOB.accessToken = {} GLOB.mkHS = false - if (config.externalDatabase + '' !== 'false' && config.externalDatabase !== undefined) { + if (sessionStorage.getItem('externalDatabase')) { + GLOB.externalDatabase = `[${sessionStorage.getItem('externalDatabase')}]..` + } else if (config.externalDatabase + '' !== 'false' && config.externalDatabase !== undefined) { GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : '' } else { GLOB.externalDatabase = null diff --git a/src/locales/en-US/mob.js b/src/locales/en-US/mob.js deleted file mode 100644 index c5f7804..0000000 --- a/src/locales/en-US/mob.js +++ /dev/null @@ -1,27 +0,0 @@ -export default { - 'mob.login': '鐧诲綍', - 'mob.confirm': '纭畾', - 'mob.submit': '鎻愪氦', - 'mob.cancel': '鍙栨秷', - 'mob.edit': '缂栬緫', - 'mob.logout': '閫�鍑�', - 'mob.return': '杩斿洖', - 'mob.name': '鍚嶇О', - 'mob.param': '鍙傛暟', - 'mob.enable': '鍚�', - 'mob.disable': '鍋�', - 'mob.save': '淇濆瓨', - 'mob.style': 'Style', - 'mob.menu': '鑿滃崟', - 'mob.menu.first': '涓�绾�', - 'mob.menu.second': '浜岀骇', - 'mob.menu.opentype': '鎵撳紑鏂瑰紡', - 'mob.menu.easycode': '鍔╄鐮�', - 'mob.component': '缁勪欢', - 'mob.status.open': '鍚敤', - 'mob.status.change': '鍒囨崲', - 'mob.query.delete': '纭畾鍒犻櫎鍚楋紵', - 'mob.logout.hint': '鎮ㄧ‘瀹氳閫�鍑哄悧?', - 'mob.required.input': '璇疯緭鍏�', - 'mob.required.select': '璇烽�夋嫨', -} \ No newline at end of file diff --git a/src/locales/en-US/model.js b/src/locales/en-US/model.js deleted file mode 100644 index 052d23c..0000000 --- a/src/locales/en-US/model.js +++ /dev/null @@ -1,161 +0,0 @@ -export default { - 'model.confirm': 'Ok', - 'model.submit': 'Submit', - 'model.delete': 'Delete', - 'model.cancel': 'Cancel', - 'model.edit': 'Edit', - 'model.copy': 'Copy', - 'model.back': 'Return', - 'model.save': 'Save', - 'model.notsave': 'Don\'t save', - 'model.close': 'Close', - 'model.notclose': 'Don\'t close', - 'header.reset': 'Reset', - 'model.enable': 'Enable', - 'model.disable': 'Disable', - 'model.required': 'Required', - 'model.import': 'Import ', - 'model.export': 'Export ', - 'model.hidden': 'Hidden', - 'model.length': 'Length', - 'model.sort': 'Sort', - 'model.true': 'True', - 'model.false': 'False', - 'model.add': 'Add ', - 'model.batchAdd': 'BatchAdd', - 'model.update': 'Update ', - 'model.thaw': 'Thaw ', - 'model.menu': 'Menu ', - 'model.name': 'Name', - 'model.icon': 'Icon', - 'model.param': 'Param', - 'model.super': 'The superior ', - 'model.openway': 'Open ', - 'model.new': 'New ', - 'model.window': 'Window', - 'model.empty': 'Empty', - 'model.pay': 'Pay', - 'model.switch.open': 'Open', - 'model.switch.close': 'Close', - 'model.menu.level1': 'Level 1 menu', - 'model.menu.level2': 'Level 2 menu', - 'model.menu.level3': 'Level 3 menu', - 'model.menu.basemsg': 'Please complete the basic information !', - 'header.menu.basedata': 'The basic information', - 'header.menu.table.add': 'Add tables', - 'header.menu.config.placeholder': 'Configuration has been modified, do you want to save configuration information ?', - 'header.menu.config.notsave': 'The menu has not been saved, please save the menu configuration first锛�', - 'header.menu.config.update': 'Menu configuration has been modified, please save锛�', - 'header.menu.form': 'The form', - 'header.menu.group.add': 'Add a group', - 'header.menu.search': 'Search', - 'header.menu.action': 'Button', - 'header.menu.column': 'Column', - 'header.menu.tabName': 'Tag name', - 'header.menu.Remark': 'Note', - 'header.menu.tab': 'Tab', - 'model.menu.tab.subtable': 'Child table', - 'header.menu.datasource': 'The data source', - 'header.menu.maintable': 'The main table', - 'header.menu.query': 'The query', - 'header.form.modal.placeholder': 'Please add the form', - 'model.form.width': 'Width', - 'header.form.title': 'Title', - 'model.form.field': 'Field', - 'header.form.innerFunc': 'Internal func', - 'header.form.outerFunc': 'External function', - 'header.form.callbackFunc': 'Callback function', - 'model.form.afterSuccess': 'Success', - 'model.form.afterError': 'Failure', - 'header.form.refresh': 'Refresh', - 'header.form.refresh.never': 'Don\'t refresh', - 'header.form.refresh.grid': 'Refresh the table', - 'header.form.popClose': 'Label closing', - 'header.form.toolbar': 'The toolbar', - 'header.form.grid': 'Table', - 'header.form.intertype': 'Interface type', - 'header.form.interface': 'Address of the interface', - 'header.form.sysInterface': 'The system interface', - 'model.interface.system': '绯荤粺', - 'model.interface.inner': 'Internal', - 'model.interface.outer': 'External', - 'header.form.pageTemplate': 'The page template', - 'model.form.type': 'Type', - 'model.form.text': 'Text', - 'header.form.description': '鎻忚堪', - 'model.form.textarea': 'Multiline text', - 'header.form.funcvar': '鍑芥暟鍙橀噺', - 'model.form.picture': 'Picture', - 'model.form.number': 'Number', - 'header.form.letter': '瀛楁瘝', - 'model.form.colspan': 'The columns of the merger', - 'model.form.select': 'Select', - 'model.form.multiselect': 'Multi-select', - 'model.form.href': 'Link', - 'model.form.link': 'Linkage menu', - 'model.form.linkform': 'Linkage form', - 'model.form.datemonth': 'Date(Month)', - 'model.form.daterange': 'Date(Range)', - 'model.form.dategroup': 'Date(Group)', - 'header.form.initval': 'Initial Value', - 'header.form.decimal': '灏忔暟浣�', - 'header.form.format': '鏍煎紡鍖�', - 'header.form.prefix': '鍓嶇紑', - 'header.form.postfix': '鍚庣紑', - 'header.form.isRequired': '琛岃缃�', - 'header.form.notRequired': '涓嶉�夋嫨琛�', - 'header.form.requiredSgl': '閫夋嫨鍗曡', - 'header.form.required': '閫夋嫨澶氳', - 'header.form.requiredOnce': '澶氳鎷兼帴', - 'header.form.openType': '鎵撳紑鏂瑰紡', - 'header.form.pop': '寮圭獥', - 'model.form.popform': 'Popup form', - 'model.form.popview': 'Pop-up tag', - 'model.form.tab': 'The tag page', - 'header.form.linkTab': '鍏宠仈鏍囩', - 'header.form.subTab': '涓嬬骇鏍囩', - 'header.form.supTab': '涓婄骇鏍囩', - 'header.form.equalTab': '鍚岀骇鏍囩', - 'header.form.currenttab': '褰撳墠鑿滃崟', - 'model.form.excelIn': 'Import excel', - 'model.form.excelOut': 'Export excel', - 'model.form.newpage': 'The new page', - 'model.form.newpage.type': 'Page type', - 'model.pageUrl': 'Page address', - 'model.form.prompt': 'Prompt', - 'model.form.exec': 'Direct execution', - 'model.form.paramJoint': 'Joint param', - 'model.form.align': 'Alignment', - 'model.form.alignLeft': 'The left', - 'model.form.alignRight': 'The Right', - 'model.form.alignCenter': 'The center', - 'model.form.columnWidth': 'Column width', - 'header.form.custom': '鑷畾涔�', - 'header.form.datasource': '鏁版嵁婧�', - 'model.form.tablename': 'Table name', - 'header.form.action.type': '鎿嶄綔绫诲瀷', - 'header.form.action.insert': '娣诲姞', - 'header.form.action.update': '淇敼', - 'header.form.action.audit': '瀹℃牳', - 'header.form.match': '鍖归厤妯″紡', - 'header.form.matchVal': '鍖归厤鍊�', - 'header.form.asc': '姝e簭', - 'header.form.desc': '鍊掑簭', - 'header.form.dropdown': '涓嬫媺鑿滃崟', - 'header.form.button': '鎸夐挳', - 'model.form.style': '椋庢牸', - 'model.form.color': 'Color', - 'model.query.delete': '纭畾鍒犻櫎鍚�?', - 'header.form.status.change': '鐘舵�佸垏鎹�', - 'model.form.funcbutton': 'Function button', - 'model.form.execMode': 'Mode', - 'header.form.paste': '绮樿创', - 'header.form.ratio': '姣斾緥', - 'header.form.blacklist': '榛戝悕鍗�', - 'model.form.linkmenu': 'Association', - 'model.action': '鎸夐挳', - 'form.required.input': 'Please enter the ', - 'form.required.select': 'Please select a ', - 'form.required.add': 'Please add ', - 'model.tooltip.func.innerface': '鍑芥暟鍚嶇О闇�浠ableField绛夊瓧绗﹀紑濮�;', -} \ No newline at end of file diff --git a/src/locales/zh-CN/mob.js b/src/locales/zh-CN/mob.js deleted file mode 100644 index 107ba2c..0000000 --- a/src/locales/zh-CN/mob.js +++ /dev/null @@ -1,27 +0,0 @@ -export default { - 'mob.login': '鐧诲綍', - 'mob.confirm': '纭畾', - 'mob.submit': '鎻愪氦', - 'mob.cancel': '鍙栨秷', - 'mob.edit': '缂栬緫', - 'mob.logout': '閫�鍑�', - 'mob.return': '杩斿洖', - 'mob.name': '鍚嶇О', - 'mob.param': '鍙傛暟', - 'mob.enable': '鍚�', - 'mob.disable': '鍋�', - 'mob.save': '淇濆瓨', - 'mob.style': '鏍峰紡', - 'mob.menu': '鑿滃崟', - 'mob.menu.first': '涓�绾�', - 'mob.menu.second': '浜岀骇', - 'mob.menu.opentype': '鎵撳紑鏂瑰紡', - 'mob.menu.easycode': '鍔╄鐮�', - 'mob.component': '缁勪欢', - 'mob.status.open': '鍚敤', - 'mob.status.change': '鍒囨崲', - 'mob.query.delete': '纭畾鍒犻櫎鍚楋紵', - 'mob.logout.hint': '鎮ㄧ‘瀹氳閫�鍑哄悧?', - 'mob.required.input': '璇疯緭鍏�', - 'mob.required.select': '璇烽�夋嫨', -} \ No newline at end of file diff --git a/src/locales/zh-CN/model.js b/src/locales/zh-CN/model.js deleted file mode 100644 index e05e953..0000000 --- a/src/locales/zh-CN/model.js +++ /dev/null @@ -1,161 +0,0 @@ -export default { - 'model.confirm': '纭畾', - 'model.submit': '鎻愪氦', - 'model.delete': '鍒犻櫎', - 'model.cancel': '鍙栨秷', - 'model.edit': '缂栬緫', - 'model.copy': '澶嶅埗', - 'model.back': '杩斿洖', - 'model.save': '淇濆瓨', - 'model.notsave': '涓嶄繚瀛�', - 'model.close': '鍏抽棴', - 'model.notclose': '涓嶅叧闂�', - 'header.reset': '閲嶇疆', - 'model.enable': '鍚�', - 'model.disable': '鍋�', - 'model.required': '蹇呭~', - 'model.import': '瀵煎叆', - 'model.export': '瀵煎嚭', - 'model.hidden': '闅愯棌', - 'model.length': '闀垮害', - 'model.sort': '鎺掑簭', - 'model.true': '鏄�', - 'model.false': '鍚�', - 'model.add': '娣诲姞', - 'model.batchAdd': '鎵归噺娣诲姞', - 'model.update': '淇敼', - 'model.thaw': '瑙e喕', - 'model.menu': '鑿滃崟', - 'model.name': '鍚嶇О', - 'model.icon': '鍥炬爣', - 'model.param': '鍙傛暟', - 'model.super': '涓婄骇', - 'model.openway': '鎵撳紑鏂瑰紡', - 'model.new': '鏂�', - 'model.window': '绐楀彛', - 'model.empty': '绌�', - 'model.pay': '鏀粯', - 'model.switch.open': '寮�', - 'model.switch.close': '鍏�', - 'model.menu.level1': '涓�绾ц彍鍗�', - 'model.menu.level2': '浜岀骇鑿滃崟', - 'model.menu.level3': '涓夌骇鑿滃崟', - 'model.menu.basemsg': '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒', - 'header.menu.basedata': '鍩烘湰淇℃伅', - 'header.menu.table.add': '娣诲姞琛ㄥ悕', - 'header.menu.config.placeholder': '閰嶇疆宸蹭慨鏀癸紝鏄惁淇濆瓨閰嶇疆淇℃伅锛�', - 'header.menu.config.notsave': '鑿滃崟灏氭湭淇濆瓨锛岃鍏堜繚瀛樿彍鍗曢厤缃紒', - 'header.menu.config.update': '鑿滃崟閰嶇疆宸蹭慨鏀癸紝璇蜂繚瀛橈紒', - 'header.menu.form': '琛ㄥ崟', - 'header.menu.group.add': '娣诲姞鍒嗙粍', - 'header.menu.search': '鎼滅储', - 'header.menu.action': '鎸夐挳', - 'header.menu.column': '鏄剧ず鍒�', - 'header.menu.tabName': '鏍囩鍚嶇О', - 'header.menu.Remark': '澶囨敞', - 'header.menu.tab': '鏍囩椤�', - 'model.menu.tab.subtable': '瀛愯〃', - 'header.menu.datasource': '鏁版嵁鏉ユ簮', - 'header.menu.maintable': '涓昏〃', - 'header.menu.query': '鏌ヨ', - 'header.form.modal.placeholder': '璇锋坊鍔犺〃鍗�', - 'model.form.width': '瀹藉害', - 'header.form.title': '鏍囬', - 'model.form.field': '瀛楁', - 'header.form.innerFunc': '鍐呴儴鍑芥暟', - 'header.form.outerFunc': '澶栭儴鍑芥暟', - 'header.form.callbackFunc': '鍥炶皟鍑芥暟', - 'model.form.afterSuccess': '鎴愬姛鍚�', - 'model.form.afterError': '澶辫触鍚�', - 'header.form.refresh': '鍒锋柊', - 'header.form.refresh.never': '涓嶅埛鏂�', - 'header.form.refresh.grid': '鍒锋柊琛ㄦ牸', - 'header.form.popClose': '鍏抽棴鍚�', - 'header.form.toolbar': '宸ュ叿鏍�', - 'header.form.grid': '琛ㄦ牸', - 'header.form.intertype': '鎺ュ彛绫诲瀷', - 'header.form.interface': '鎺ュ彛鍦板潃', - 'header.form.sysInterface': '绯荤粺鎺ュ彛', - 'model.interface.system': '绯荤粺', - 'model.interface.inner': '鍐呴儴', - 'model.interface.outer': '澶栭儴', - 'header.form.pageTemplate': '椤甸潰妯℃澘', - 'model.form.type': '绫诲瀷', - 'model.form.text': '鏂囨湰', - 'header.form.description': '鎻忚堪', - 'model.form.textarea': '澶氳鏂囨湰', - 'header.form.funcvar': '鍑芥暟鍙橀噺', - 'model.form.picture': '鍥剧墖', - 'model.form.number': '鏁板瓧', - 'header.form.letter': '瀛楁瘝', - 'model.form.colspan': '鍚堝苟鍒�', - 'model.form.select': '涓嬫媺閫夋嫨', - 'model.form.multiselect': '涓嬫媺澶氶��', - 'model.form.href': '閾炬帴', - 'model.form.link': '鑱斿姩鑿滃崟', - 'model.form.linkform': '鍏宠仈琛ㄥ崟', - 'model.form.datemonth': '鏃ユ湡锛堟湀锛�', - 'model.form.daterange': '鏃ユ湡锛堝尯闂达級', - 'model.form.dategroup': '鏃ユ湡锛堢粍鍚堬級', - 'header.form.initval': '鍒濆鍊�', - 'header.form.decimal': '灏忔暟浣�', - 'header.form.format': '鏍煎紡鍖�', - 'header.form.prefix': '鍓嶇紑', - 'header.form.postfix': '鍚庣紑', - 'header.form.isRequired': '琛岃缃�', - 'header.form.notRequired': '涓嶉�夋嫨琛�', - 'header.form.requiredSgl': '閫夋嫨鍗曡', - 'header.form.required': '閫夋嫨澶氳', - 'header.form.requiredOnce': '澶氳鎷兼帴', - 'header.form.openType': '鎵撳紑鏂瑰紡', - 'header.form.pop': '寮圭獥', - 'model.form.popform': '寮圭獥锛堣〃鍗曪級', - 'model.form.popview': '寮圭獥锛堟爣绛撅級', - 'model.form.tab': '鏍囩椤�', - 'header.form.linkTab': '鍏宠仈鏍囩', - 'header.form.subTab': '涓嬬骇鏍囩', - 'header.form.supTab': '涓婄骇鏍囩', - 'header.form.equalTab': '鍚岀骇鏍囩', - 'header.form.currenttab': '褰撳墠鑿滃崟', - 'model.form.excelIn': '瀵煎叆Excel', - 'model.form.excelOut': '瀵煎嚭Excel', - 'model.form.newpage': '鏂伴〉闈�', - 'model.form.newpage.type': '椤甸潰绫诲瀷', - 'model.pageUrl': '椤甸潰鍦板潃', - 'model.form.prompt': '鎻愮ず妗�', - 'model.form.exec': '鐩存帴鎵ц', - 'model.form.paramJoint': '鎷兼帴鍙傛暟', - 'model.form.align': '瀵归綈鏂瑰紡', - 'model.form.alignLeft': '宸﹀榻�', - 'model.form.alignRight': '鍙冲榻�', - 'model.form.alignCenter': '灞呬腑', - 'model.form.columnWidth': '鍒楀', - 'header.form.custom': '鑷畾涔�', - 'header.form.datasource': '鏁版嵁婧�', - 'model.form.tablename': '琛ㄥ悕', - 'header.form.action.type': '鎿嶄綔绫诲瀷', - 'header.form.action.insert': '娣诲姞', - 'header.form.action.update': '淇敼', - 'header.form.action.audit': '瀹℃牳', - 'header.form.match': '鍖归厤妯″紡', - 'header.form.matchVal': '鍖归厤鍊�', - 'header.form.asc': '姝e簭', - 'header.form.desc': '鍊掑簭', - 'header.form.dropdown': '涓嬫媺鑿滃崟', - 'header.form.button': '鎸夐挳', - 'model.form.style': '椋庢牸', - 'model.form.color': '棰滆壊', - 'model.query.delete': '纭畾鍒犻櫎鍚�?', - 'header.form.status.change': '鐘舵�佸垏鎹�', - 'model.form.funcbutton': '鍔熻兘鎸夐挳', - 'model.form.execMode': '鎵ц鏂瑰紡', - 'header.form.paste': '绮樿创', - 'header.form.ratio': '姣斾緥', - 'header.form.blacklist': '榛戝悕鍗�', - 'model.form.linkmenu': '鍏宠仈鑿滃崟', - 'model.action': '鎸夐挳', - 'form.required.input': '璇疯緭鍏�', - 'form.required.select': '璇烽�夋嫨', - 'form.required.add': '璇锋坊鍔�', - 'model.tooltip.func.innerface': '鍑芥暟鍚嶇О闇�浠ableField绛夊瓧绗﹀紑濮�;', -} \ No newline at end of file diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx index 8964a75..fa8a097 100644 --- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx +++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx @@ -30,7 +30,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, // 缁勪欢淇℃伅 formlist: PropTypes.any, // 琛ㄥ崟淇℃伅 card: PropTypes.any, // 鎸夐挳淇℃伅 @@ -361,7 +360,7 @@ rules: [ { required: item.readonly ? false : !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' }, { max: formRule.input.max, @@ -386,7 +385,7 @@ rules: [ { required: item.readonly ? false : !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<TextArea autoSize={{minRows: 2}} disabled={item.readonly} placeholder={item.placeholder || ''} />)} @@ -406,7 +405,7 @@ initialValue: item.initVal, rules: [{ required: item.readonly ? false : !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' }] })(<InputNumber min={item.min || 0} max={item.max || 10000} precision={item.precision || 0} onPressEnter={this.handleSubmit} />)} </Form.Item> @@ -425,7 +424,7 @@ initialValue: item.initVal || '', rules: [{ required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' }] })( <Select @@ -458,7 +457,7 @@ initialValue: item.initVal || '', rules: [{ required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' }] })( <MkEditIcon /> @@ -479,7 +478,7 @@ initialValue: item.initVal, rules: [{ required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' }] })( <Radio.Group onChange={(e) => {this.onChange(e, item.key)}} disabled={item.readonly}> @@ -502,7 +501,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -529,7 +528,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -552,7 +551,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx index ab7b202..02e8d29 100644 --- a/src/menu/components/card/cardcellcomponent/formconfig.jsx +++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx @@ -1,8 +1,3 @@ -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' - -const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS - /** * @description 鑾峰彇鍏冪礌閰嶇疆淇℃伅 * @param {*} card @@ -535,15 +530,15 @@ { type: 'radio', key: 'joint', - label: Formdict['model.form.paramJoint'], + label: '鎷兼帴鍙傛暟', initVal: card.joint || 'true', required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -555,10 +550,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx index c00048b..2cb20e5 100644 --- a/src/menu/components/card/cardcellcomponent/index.jsx +++ b/src/menu/components/card/cardcellcomponent/index.jsx @@ -3,8 +3,6 @@ import { is, fromJS } from 'immutable' import { Modal, Button } from 'antd' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import asyncComponent from '@/utils/asyncComponent' import { getCardCellForm } from './formconfig' import { getActionForm } from '@/menu/components/share/actioncomponent/formconfig' @@ -34,7 +32,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, appType: sessionStorage.getItem('appType'), card: null, // 缂栬緫涓厓绱� formlist: null, // 琛ㄥ崟淇℃伅 @@ -293,8 +290,9 @@ } let ableField = usefulFields.join(', ') + let msg = `鍑芥暟鍚嶇О闇�浠�${ableField}绛夊瓧绗﹀紑濮�;` let functip = <div> - <p style={{marginBottom: '5px'}}>{this.state.dict['model.tooltip.func.innerface'].replace('@ableField', ableField)}</p> + <p style={{marginBottom: '5px'}}>{msg}</p> </div> let supId = '' @@ -465,11 +463,11 @@ */ deleteElement = (card) => { const { cardCell, side } = this.props - const { dict, elements, appType } = this.state + const { elements, appType } = this.state let _this = this confirm({ - content: dict['model.confirm'] + dict['model.delete'] + '鍏冪礌鍚楋紵', + content: '纭畾鍒犻櫎鍏冪礌鍚楋紵', onOk() { let _elements = elements.filter(item => item.uuid !== card.uuid) @@ -642,14 +640,12 @@ getVerify = (card) => { const { cards } = this.props - const { dict } = this.state if (!card) return null if (['pop', 'prompt', 'exec', 'form'].includes(card.OpenType)) { return <VerifyCard card={card} - dict={dict} config={cards} columns={cards.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} @@ -657,21 +653,18 @@ } else if (card.OpenType === 'excelIn') { return <VerifyExcelIn card={card} - dict={dict} columns={cards.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } else if (card.OpenType === 'excelOut') { return <VerifyExcelOut card={card} - dict={dict} config={cards} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } else if (card.OpenType === 'funcbutton' && card.funcType === 'print') { return <VerifyPrint card={card} - dict={dict} columns={cards.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> @@ -680,7 +673,7 @@ render() { const { cards, cardCell } = this.props - const { elements, visible, actvisible, profVisible, card, dict, record } = this.state + const { elements, visible, actvisible, profVisible, card, record } = this.state return ( <div className="model-menu-card-cell-list"> @@ -709,7 +702,6 @@ destroyOnClose > <ElementForm - dict={dict} card={card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} @@ -725,14 +717,13 @@ maskClosable={false} onCancel={this.editModalCancel} footer={[ - record && record.intertype === 'inner' ? <CreateFunc key="create" dict={dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null, - <Button key="cancel" onClick={this.editModalCancel}>{dict['model.cancel']}</Button>, - <Button key="confirm" type="primary" onClick={this.handleActionSubmit}>{dict['model.confirm']}</Button> + record && record.intertype === 'inner' ? <CreateFunc key="create" ref="btnCreatFunc" trigger={this.creatFunc}/> : null, + <Button key="cancel" onClick={this.editModalCancel}>鍙栨秷</Button>, + <Button key="confirm" type="primary" onClick={this.handleActionSubmit}>纭畾</Button> ]} destroyOnClose > <ActionForm - dict={dict} type={cards.type === 'balcony' ? '' : 'card'} card={card} formlist={this.state.formlist} @@ -748,7 +739,7 @@ visible={profVisible} width={'90vw'} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { if (this.verifyRef.handleCancel) { diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx index 8a3a691..432e43f 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx @@ -1,8 +1,3 @@ -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' - -const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS - /** * @description 鑾峰彇鍥捐〃瑙嗗浘閰嶇疆琛ㄥ崟 * @param {object} card // 鍥捐〃瀵硅薄 @@ -368,10 +363,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', diff --git a/src/menu/components/chart/antv-bar/chartcompile/index.jsx b/src/menu/components/chart/antv-bar/chartcompile/index.jsx index 70b73e8..7feda4a 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/index.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/index.jsx @@ -17,7 +17,6 @@ class LineChartDrawerForm extends Component { static propTpyes = { - dict: PropTypes.object, plot: PropTypes.object, config: PropTypes.object, plotchange: PropTypes.func @@ -365,7 +364,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.onSubmit}/>)} @@ -386,7 +385,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<InputNumber min={item.min} max={item.max} precision={item.decimal} onPressEnter={this.onSubmit}/>)} @@ -407,7 +406,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -436,7 +435,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -787,7 +786,7 @@ {config.name ? <div className="mk-com-name">{config.name} - 缂栬緫</div> : null} <Tabs activeKey={view} className="menu-chart-edit-box" onChange={this.changeTab}> <TabPane tab="缁勪欢璁剧疆" key="base"> - <NormalForm dict={this.props.dict} formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> + <NormalForm formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> </TabPane> <TabPane tab="鍥捐〃璁剧疆" key="normal"> <Form {...formItemLayout}> @@ -816,7 +815,7 @@ </Form.Item> </Form> </Col> : null} - {datatype === 'statistics' ? <Button className="color-add mk-green" onClick={this.addColor}>{this.props.dict['model.add']}</Button> : null} + {datatype === 'statistics' ? <Button className="color-add mk-green" onClick={this.addColor}>娣诲姞</Button> : null} {datatype === 'statistics' ? <EditTable actions={['edit', 'move', 'del']} data={plot.colors || []} columns={ramp ==='true' ? rampStatColorColumns : statColorColumns} onChange={this.changeColor}/> : null} {datatype !== 'statistics' ? <EditTable actions={['edit']} data={plot.colors || []} columns={ramp ==='true' ? rampColorColumns : colorColumns} onChange={this.changeColor}/> : null} </div> diff --git a/src/menu/components/chart/antv-bar/index.jsx b/src/menu/components/chart/antv-bar/index.jsx index f3c0ce8..51de3eb 100644 --- a/src/menu/components/chart/antv-bar/index.jsx +++ b/src/menu/components/chart/antv-bar/index.jsx @@ -12,8 +12,6 @@ import { resetStyle, getTables } from '@/utils/utils-custom.js' import Utils from '@/utils/utils.js' import { chartColors } from '@/utils/option.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import './index.scss' const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) @@ -33,7 +31,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, appType: sessionStorage.getItem('appType'), eventListener: null @@ -1362,7 +1359,7 @@ <div className="mk-popover-control"> {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch}/> : null} {appType !== 'mob' ? <PlusSquareOutlined className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton}/> : null} - <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/> + <ChartCompileForm config={card} plotchange={this.updateComponent}/> <CopyComponent type="line" card={card}/> <PasteComponent config={card} options={['action', 'search']} updateConfig={this.updateComponent} /> <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/> diff --git a/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx index f60d210..453f22e 100644 --- a/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx @@ -1,8 +1,3 @@ -// import zhCN from '@/locales/zh-CN/model.js' -// import enUS from '@/locales/en-US/model.js' - -// const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS - /** * @description 鑾峰彇鍥捐〃瑙嗗浘閰嶇疆琛ㄥ崟 * @param {object} card // 鍥捐〃瀵硅薄 diff --git a/src/menu/components/chart/antv-dashboard/chartcompile/index.jsx b/src/menu/components/chart/antv-dashboard/chartcompile/index.jsx index 1bc8301..dd69b91 100644 --- a/src/menu/components/chart/antv-dashboard/chartcompile/index.jsx +++ b/src/menu/components/chart/antv-dashboard/chartcompile/index.jsx @@ -17,7 +17,6 @@ class LineChartDrawerForm extends Component { static propTpyes = { - dict: PropTypes.object, plot: PropTypes.object, config: PropTypes.object, plotchange: PropTypes.func @@ -88,7 +87,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.onSubmit}/>)} @@ -109,7 +108,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<InputNumber min={item.min} max={item.max} precision={item.decimal} onPressEnter={this.onSubmit}/>)} @@ -130,7 +129,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -159,7 +158,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -311,7 +310,7 @@ {config.name ? <div className="mk-com-name">{config.name} - 缂栬緫</div> : null} <Tabs activeKey={view} className="menu-chart-edit-box" onChange={this.changeTab}> <TabPane tab="缁勪欢璁剧疆" key="base"> - <NormalForm dict={this.props.dict} formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> + <NormalForm formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> </TabPane> <TabPane tab="鍥捐〃璁剧疆" key="normal"> <Form {...formItemLayout}> @@ -320,7 +319,7 @@ </TabPane> {plot ? <TabPane tab="棰滆壊璁剧疆" key="color"> <div> - <Button className="color-add mk-green" onClick={this.addColor}>{this.props.dict['model.add']}</Button> + <Button className="color-add mk-green" onClick={this.addColor}>娣诲姞</Button> <EditTable actions={['edit', 'move', 'del']} data={plot.colors || []} columns={colorColumns} onChange={this.changeColor}/> </div> </TabPane> : null} diff --git a/src/menu/components/chart/antv-dashboard/index.jsx b/src/menu/components/chart/antv-dashboard/index.jsx index 78d65c8..b05efaa 100644 --- a/src/menu/components/chart/antv-dashboard/index.jsx +++ b/src/menu/components/chart/antv-dashboard/index.jsx @@ -9,8 +9,6 @@ import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' import { resetStyle, getTables } from '@/utils/utils-custom.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import './index.scss' const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) @@ -65,7 +63,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, appType: sessionStorage.getItem('appType'), eventListener: null @@ -537,7 +534,7 @@ <div className="menu-dashboard-edit-box" style={{..._style, height: card.plot.height || 400}} onClick={this.clickComponent} id={card.uuid}> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/> + <ChartCompileForm config={card} plotchange={this.updateComponent}/> <CopyComponent type="dashboard" card={card}/> <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/> <ClockComponent config={card} updateConfig={this.updateComponent}/> diff --git a/src/menu/components/chart/antv-pie/chartcompile/index.jsx b/src/menu/components/chart/antv-pie/chartcompile/index.jsx index e1a7d47..1a2ad2d 100644 --- a/src/menu/components/chart/antv-pie/chartcompile/index.jsx +++ b/src/menu/components/chart/antv-pie/chartcompile/index.jsx @@ -17,7 +17,6 @@ class LineChartDrawerForm extends Component { static propTpyes = { - dict: PropTypes.object, plot: PropTypes.object, config: PropTypes.object, plotchange: PropTypes.func @@ -114,7 +113,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.onSubmit}/>)} @@ -135,7 +134,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<InputNumber min={item.min} max={item.max} precision={item.decimal} onPressEnter={this.onSubmit}/>)} @@ -156,7 +155,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -185,7 +184,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -337,7 +336,7 @@ {config.name ? <div className="mk-com-name">{config.name} - 缂栬緫</div> : null} <Tabs activeKey={view} className="menu-chart-edit-box" onChange={this.changeTab}> <TabPane tab="缁勪欢璁剧疆" key="base"> - <NormalForm dict={this.props.dict} formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> + <NormalForm formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> </TabPane> <TabPane tab="鍥捐〃璁剧疆" key="normal"> <Form {...formItemLayout}> @@ -346,7 +345,7 @@ </TabPane> {plot ? <TabPane tab="棰滆壊璁剧疆" key="color"> <div> - <Button className="color-add mk-green" onClick={this.addColor}>{this.props.dict['model.add']}</Button> + <Button className="color-add mk-green" onClick={this.addColor}>娣诲姞</Button> <EditTable actions={['edit', 'move', 'del']} data={plot.colors || []} columns={colorColumns} onChange={this.changeColor}/> </div> </TabPane> : null} diff --git a/src/menu/components/chart/antv-pie/index.jsx b/src/menu/components/chart/antv-pie/index.jsx index b87e46b..d8aa2b3 100644 --- a/src/menu/components/chart/antv-pie/index.jsx +++ b/src/menu/components/chart/antv-pie/index.jsx @@ -11,8 +11,6 @@ import asyncIconComponent from '@/utils/asyncIconComponent' import { resetStyle, getTables } from '@/utils/utils-custom.js' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import './index.scss' const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) @@ -30,7 +28,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, appType: sessionStorage.getItem('appType'), eventListener: null @@ -695,7 +692,7 @@ <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch}/> : null} - <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/> + <ChartCompileForm config={card} plotchange={this.updateComponent}/> <CopyComponent type="pie" card={card}/> <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/> <ClockComponent config={card} updateConfig={this.updateComponent}/> diff --git a/src/menu/components/chart/antv-scatter/chartcompile/index.jsx b/src/menu/components/chart/antv-scatter/chartcompile/index.jsx index d618b15..245d259 100644 --- a/src/menu/components/chart/antv-scatter/chartcompile/index.jsx +++ b/src/menu/components/chart/antv-scatter/chartcompile/index.jsx @@ -14,7 +14,6 @@ class LineChartDrawerForm extends Component { static propTpyes = { - dict: PropTypes.object, plot: PropTypes.object, config: PropTypes.object, plotchange: PropTypes.func @@ -66,7 +65,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.onSubmit}/>)} @@ -87,7 +86,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<InputNumber min={item.min} max={item.max} precision={item.decimal} onPressEnter={this.onSubmit}/>)} @@ -108,7 +107,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -137,7 +136,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -256,7 +255,7 @@ {config.name ? <div className="mk-com-name">{config.name} - 缂栬緫</div> : null} <Tabs activeKey={view} className="menu-chart-edit-box" onChange={this.changeTab}> <TabPane tab="缁勪欢璁剧疆" key="base"> - <NormalForm dict={this.props.dict} formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> + <NormalForm formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> </TabPane> <TabPane tab="鍥捐〃璁剧疆" key="normal"> <Form {...formItemLayout}> diff --git a/src/menu/components/chart/antv-scatter/index.jsx b/src/menu/components/chart/antv-scatter/index.jsx index 82cd104..bfc607a 100644 --- a/src/menu/components/chart/antv-scatter/index.jsx +++ b/src/menu/components/chart/antv-scatter/index.jsx @@ -10,8 +10,6 @@ import asyncIconComponent from '@/utils/asyncIconComponent' import { resetStyle, getTables } from '@/utils/utils-custom.js' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import './index.scss' const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) @@ -31,7 +29,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, appType: sessionStorage.getItem('appType'), eventListener: null @@ -381,7 +378,7 @@ <div className="mk-popover-control"> {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch}/> : null} {appType !== 'mob' ? <PlusSquareOutlined className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton}/> : null} - <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/> + <ChartCompileForm config={card} plotchange={this.updateComponent}/> <CopyComponent type="line" card={card}/> <PasteComponent config={card} options={['action', 'search']} updateConfig={this.updateComponent}/> <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/> diff --git a/src/menu/components/chart/chart-custom/chartcompile/index.jsx b/src/menu/components/chart/chart-custom/chartcompile/index.jsx index fd2e219..5ab0fa2 100644 --- a/src/menu/components/chart/chart-custom/chartcompile/index.jsx +++ b/src/menu/components/chart/chart-custom/chartcompile/index.jsx @@ -14,7 +14,6 @@ class CustomChartDrawerForm extends Component { static propTpyes = { - dict: PropTypes.object, plot: PropTypes.object, config: PropTypes.object, plotchange: PropTypes.func @@ -105,7 +104,7 @@ {config.name ? <div className="mk-com-name">{config.name} - 缂栬緫</div> : null} <Tabs activeKey={view} onChange={this.changeTab}> <TabPane tab="缁勪欢璁剧疆" key="base"> - <NormalForm dict={this.props.dict} formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> + <NormalForm formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> </TabPane> {plot ? <TabPane tab="JS" key="JS"> {plot.chartType === 'antv' ? <div>鍏ュ弬锛欳hart銆� DataSet銆� wrap锛坉om鑺傜偣锛夈�乨ata銆� config</div> : <div>鍏ュ弬锛歟charts銆� DataSet銆� wrap锛坉om鑺傜偣锛夈�� data銆� config</div>} diff --git a/src/menu/components/chart/chart-custom/index.jsx b/src/menu/components/chart/chart-custom/index.jsx index 1119530..4a1590c 100644 --- a/src/menu/components/chart/chart-custom/index.jsx +++ b/src/menu/components/chart/chart-custom/index.jsx @@ -12,8 +12,6 @@ import asyncIconComponent from '@/utils/asyncIconComponent' import { resetStyle, getTables } from '@/utils/utils-custom.js' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import './index.scss' const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) @@ -30,7 +28,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, appType: sessionStorage.getItem('appType'), } @@ -261,7 +258,7 @@ <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch}/> : null} - <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/> + <ChartCompileForm config={card} plotchange={this.updateComponent}/> <CopyComponent type="line" card={card}/> <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/> <ClockComponent config={card} updateConfig={this.updateComponent}/> diff --git a/src/menu/components/code/sandbox/editorcode/index.jsx b/src/menu/components/code/sandbox/editorcode/index.jsx index a1de4bf..45acab3 100644 --- a/src/menu/components/code/sandbox/editorcode/index.jsx +++ b/src/menu/components/code/sandbox/editorcode/index.jsx @@ -4,8 +4,6 @@ import { Modal, Tabs, message } from 'antd' import { FormOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import asyncComponent from '@/utils/asyncComponent' import './index.scss' @@ -19,7 +17,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, visible: false, html: '', css: '', @@ -75,7 +72,7 @@ } render () { - const { visible, dict, html, css, js } = this.state + const { visible, html, css, js } = this.state return ( <div style={{display: 'inline-block'}}> @@ -86,7 +83,7 @@ visible={visible} width={950} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { this.setState({ visible: false }) }} destroyOnClose diff --git a/src/menu/components/code/sandbox/index.jsx b/src/menu/components/code/sandbox/index.jsx index 66148a2..4f4d644 100644 --- a/src/menu/components/code/sandbox/index.jsx +++ b/src/menu/components/code/sandbox/index.jsx @@ -9,8 +9,6 @@ import { resetStyle } from '@/utils/utils-custom.js' import MKEmitter from '@/utils/events.js' import getWrapForm from './options' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import './index.scss' @@ -29,7 +27,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, back: false } diff --git a/src/menu/components/editor/braft-editor/editorcontent/index.jsx b/src/menu/components/editor/braft-editor/editorcontent/index.jsx index 40aa871..b6a6afc 100644 --- a/src/menu/components/editor/braft-editor/editorcontent/index.jsx +++ b/src/menu/components/editor/braft-editor/editorcontent/index.jsx @@ -4,8 +4,6 @@ import { Modal } from 'antd' import { FormOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import asyncComponent from '@/utils/asyncComponent' import './index.scss' @@ -18,7 +16,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, visible: false, html: null } @@ -54,7 +51,7 @@ render () { const { config } = this.props - const { visible, dict, html } = this.state + const { visible, html } = this.state if (!config) return null @@ -68,7 +65,7 @@ visible={visible} width={950} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { this.setState({ visible: false }) }} destroyOnClose diff --git a/src/menu/components/form/formaction/actionform/index.jsx b/src/menu/components/form/formaction/actionform/index.jsx index 306130a..b67cad8 100644 --- a/src/menu/components/form/formaction/actionform/index.jsx +++ b/src/menu/components/form/formaction/actionform/index.jsx @@ -11,7 +11,6 @@ class ActionForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� formlist: PropTypes.any, // 琛ㄥ崟淇℃伅 card: PropTypes.any, // 鎸夐挳淇℃伅 inputSubmit: PropTypes.any // 鍥炶溅鎻愪氦浜嬩欢 @@ -255,7 +254,7 @@ rules: [ { required: item.readonly ? false : !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' }, ..._rules ] @@ -285,7 +284,7 @@ rules: [ { required: item.readonly ? false : !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<InputNumber min={0} max={10000} precision={0} onPressEnter={this.handleSubmit}/>)} @@ -306,7 +305,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -341,7 +340,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -367,7 +366,7 @@ rules: [ { required: item.readonly ? false : !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<TextArea rows={2} readOnly={item.readonly}/>)} @@ -388,7 +387,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( diff --git a/src/menu/components/form/formaction/formconfig.jsx b/src/menu/components/form/formaction/formconfig.jsx index f27f8b5..5295788 100644 --- a/src/menu/components/form/formaction/formconfig.jsx +++ b/src/menu/components/form/formaction/formconfig.jsx @@ -1,8 +1,3 @@ -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' - -const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS - /** * @description 鑾峰彇琛ㄥ崟鎸夐挳閰嶇疆淇℃伅 * @param {*} card 缂栬緫鎸夐挳 @@ -63,18 +58,18 @@ { type: 'radio', key: 'intertype', - label: Formdict['header.form.intertype'], + label: '鎺ュ彛绫诲瀷', initVal: card.intertype || 'system', required: true, options: [{ value: 'system', - text: Formdict['model.interface.system'] + text: '绯荤粺' }, { value: 'inner', - text: Formdict['model.interface.inner'] + text: '鍐呴儴' }, { value: 'outer', - text: Formdict['model.interface.outer'] + text: '澶栭儴' }, { value: 'custom', text: '鑷畾涔�' @@ -100,31 +95,31 @@ { type: 'radio', key: 'sqlType', - label: Formdict['header.form.action.type'], + label: '鎿嶄綔绫诲瀷', initVal: card.sqlType || '', required: true, options: [{ value: 'insert', - text: Formdict['header.form.action.insert'] + text: '娣诲姞' }, { value: 'update', - text: Formdict['header.form.action.update'] + text: '淇敼' }, { value: 'audit', - text: Formdict['header.form.action.audit'] + text: '瀹℃牳' }] }, { type: 'text', key: 'sql', - label: Formdict['model.form.tablename'], + label: '琛ㄥ悕', initVal: card.sql || tableName || '', required: true }, { type: 'text', key: 'innerFunc', - label: Formdict['header.form.innerFunc'], + label: '鍐呴儴鍑芥暟', initVal: card.innerFunc || '', tooltip: functip, fields: usefulFields, @@ -143,28 +138,28 @@ { type: 'text', key: 'url', - label: Formdict['model.pageUrl'], + label: '椤甸潰鍦板潃', initVal: card.url || '', required: true }, { type: 'radio', key: 'sysInterface', - label: Formdict['header.form.sysInterface'], + label: '绯荤粺鎺ュ彛', initVal: card.sysInterface || 'false', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'text', key: 'outerFunc', - label: Formdict['header.form.outerFunc'], + label: '澶栭儴鍑芥暟', initVal: card.outerFunc || '', required: false, readonly: false @@ -245,7 +240,7 @@ { type: 'text', key: 'callbackFunc', - label: Formdict['header.form.callbackFunc'], + label: '鍥炶皟鍑芥暟', initVal: card.callbackFunc || '', required: true, readonly: false diff --git a/src/menu/components/form/formaction/index.jsx b/src/menu/components/form/formaction/index.jsx index b5ac2d0..f0e70b2 100644 --- a/src/menu/components/form/formaction/index.jsx +++ b/src/menu/components/form/formaction/index.jsx @@ -4,8 +4,6 @@ import { Modal, Button, Popover } from 'antd' import { FontColorsOutlined, EditOutlined, ProfileOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import asyncComponent from '@/utils/asyncComponent' import { getActionForm } from './formconfig' import { resetStyle } from '@/utils/utils-custom.js' @@ -24,7 +22,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, appType: sessionStorage.getItem('appType'), card: null, // 缂栬緫涓厓绱� formlist: null, // 琛ㄥ崟淇℃伅 @@ -89,8 +86,9 @@ } let ableField = usefulFields.join(', ') + let msg = `鍑芥暟鍚嶇О闇�浠�${ableField}绛夊瓧绗﹀紑濮�;` let functip = <div> - <p style={{marginBottom: '5px'}}>{this.state.dict['model.tooltip.func.innerface'].replace('@ableField', ableField)}</p> + <p style={{marginBottom: '5px'}}>{msg}</p> </div> let supId = '' @@ -196,7 +194,7 @@ render() { const { group, config } = this.props - const { visible, profVisible, card, dict } = this.state + const { visible, profVisible, card } = this.state return ( <div className="mk-form-action"> @@ -227,19 +225,18 @@ </Popover> : null} {/* 缂栬緫鎸夐挳锛氬鍒躲�佺紪杈� */} <Modal - title={dict['model.edit']} + title="缂栬緫" visible={visible} width={920} maskClosable={false} onCancel={this.editModalCancel} footer={[ - <Button key="cancel" onClick={this.editModalCancel}>{dict['model.cancel']}</Button>, - <Button key="confirm" type="primary" onClick={this.handleActionSubmit}>{dict['model.confirm']}</Button> + <Button key="cancel" onClick={this.editModalCancel}>鍙栨秷</Button>, + <Button key="confirm" type="primary" onClick={this.handleActionSubmit}>纭畾</Button> ]} destroyOnClose > <ActionForm - dict={dict} card={card} setting={config.setting} formlist={this.state.formlist} @@ -253,7 +250,7 @@ visible={profVisible} width={'90vw'} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { if (this.verifyRef.handleCancel) { @@ -270,7 +267,6 @@ > <VerifyCard card={{...group.subButton, modal: {fields: group.fields}}} - dict={dict} config={config} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} diff --git a/src/menu/components/form/simple-form/index.jsx b/src/menu/components/form/simple-form/index.jsx index 7d659ad..20e3704 100644 --- a/src/menu/components/form/simple-form/index.jsx +++ b/src/menu/components/form/simple-form/index.jsx @@ -13,8 +13,6 @@ import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' import getWrapForm from './options' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import './index.scss' const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform')) @@ -39,7 +37,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, appType: sessionStorage.getItem('appType'), card: null, back: false, @@ -652,7 +649,7 @@ } render() { - const { card, dict, appType } = this.state + const { card, appType } = this.state return ( <div className="menu-simple-form-edit-box" style={resetStyle(card.style)} onClick={this.clickComponent} id={card.uuid}> @@ -677,7 +674,7 @@ <PlusOutlined className="plus" title="娣诲姞琛ㄥ崟" onClick={this.addForm}/> <FieldsComponent config={card.subcards[0]} type="form" plusFields={this.plusFields} /> <span style={{color: 'red', marginLeft: '30px', cursor: 'pointer'}} onClick={this.clearGroup}>娓呯┖</span> - <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> + <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(1)}>1鍒�</Button> : null} {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(2)}>2鍒�</Button> : null} {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(3)}>3鍒�</Button> : null} @@ -687,7 +684,6 @@ list={card.subcards[0].fields} setting={card.subcards[0].setting} showField={this.state.showField} - placeholder={dict['header.form.modal.placeholder']} handleList={this.handleList} handleForm={this.handleForm} closeForm={this.closeForm} @@ -716,7 +712,7 @@ </div> </div> <Modal - title={this.state.dict['model.edit']} + title="缂栬緫" visible={this.state.visible} width={950} maskClosable={false} @@ -726,7 +722,6 @@ destroyOnClose > <ModalForm - dict={this.state.dict} card={this.state.editform} formlist={this.state.formlist} inputSubmit={this.handleSubmit} diff --git a/src/menu/components/form/step-form/index.jsx b/src/menu/components/form/step-form/index.jsx index d67c2b7..83e0c76 100644 --- a/src/menu/components/form/step-form/index.jsx +++ b/src/menu/components/form/step-form/index.jsx @@ -13,8 +13,6 @@ import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' import getWrapForm from './options' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import './index.scss' const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform')) @@ -39,7 +37,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, appType: sessionStorage.getItem('appType'), card: null, back: false, @@ -735,7 +732,7 @@ } render() { - const { card, dict, group, appType } = this.state + const { card, group, appType } = this.state return ( <div className="menu-normal-form-edit-box" style={resetStyle(card.style)} onClick={this.clickComponent} id={card.uuid}> @@ -767,7 +764,7 @@ {group ? <div className="form-area"> <PlusOutlined className="plus" title="娣诲姞琛ㄥ崟" onClick={this.addForm}/> <FieldsComponent config={group} type="form" plusFields={this.plusFields} /> - <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> + <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(1)}>1鍒�</Button> : null} {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(2)}>2鍒�</Button> : null} {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(3)}>3鍒�</Button> : null} @@ -777,7 +774,6 @@ list={group.fields} setting={group.setting} showField={this.state.showField} - placeholder={dict['header.form.modal.placeholder']} handleList={this.handleList} handleForm={this.handleForm} closeForm={this.closeForm} @@ -806,7 +802,7 @@ </div> </div> <Modal - title={this.state.dict['model.edit']} + title="缂栬緫" visible={this.state.visible} width={950} maskClosable={false} @@ -816,7 +812,6 @@ destroyOnClose > <ModalForm - dict={this.state.dict} card={this.state.editform} formlist={this.state.formlist} inputSubmit={this.handleSubmit} diff --git a/src/menu/components/form/tab-form/index.jsx b/src/menu/components/form/tab-form/index.jsx index 92c06fc..bcc0621 100644 --- a/src/menu/components/form/tab-form/index.jsx +++ b/src/menu/components/form/tab-form/index.jsx @@ -13,8 +13,6 @@ import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' import getWrapForm from '../step-form/options' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import './index.scss' const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform')) @@ -39,7 +37,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, appType: sessionStorage.getItem('appType'), card: null, back: false, @@ -761,7 +758,7 @@ } render() { - const { card, dict, group, appType } = this.state + const { card, group, appType } = this.state return ( <div className="menu-normal-form-edit-box" style={resetStyle(card.style)} onClick={this.clickComponent} id={card.uuid}> @@ -795,7 +792,7 @@ <PlusOutlined className="plus" title="娣诲姞琛ㄥ崟" onClick={this.addForm}/> <FieldsComponent config={group} type="form" plusFields={this.plusFields} /> <span style={{color: 'red', marginLeft: '30px', cursor: 'pointer'}} onClick={this.clearGroup}>娓呯┖</span> - <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> + <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(1)}>1鍒�</Button> : null} {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(2)}>2鍒�</Button> : null} {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(3)}>3鍒�</Button> : null} @@ -805,7 +802,6 @@ list={group.fields} setting={group.setting} showField={this.state.showField} - placeholder={dict['header.form.modal.placeholder']} handleList={this.handleList} handleForm={this.handleForm} closeForm={this.closeForm} @@ -834,7 +830,7 @@ </div> </div> <Modal - title={this.state.dict['model.edit']} + title="缂栬緫" visible={this.state.visible} width={950} maskClosable={false} @@ -844,7 +840,6 @@ destroyOnClose > <ModalForm - dict={this.state.dict} card={this.state.editform} formlist={this.state.formlist} inputSubmit={this.handleSubmit} diff --git a/src/menu/components/search/main-search/index.jsx b/src/menu/components/search/main-search/index.jsx index fc79218..d6250e4 100644 --- a/src/menu/components/search/main-search/index.jsx +++ b/src/menu/components/search/main-search/index.jsx @@ -7,8 +7,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getSearchForm } from '@/templates/zshare/formconfig' import { resetStyle } from '@/utils/utils-custom.js' import asyncComponent from '@/utils/asyncComponent' @@ -34,7 +32,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, appType: sessionStorage.getItem('appType'), searchlist: null, // 鎼滅储鏉′欢闆� sqlVerifing: false, // sql楠岃瘉涓� @@ -318,11 +315,10 @@ * @description 鎼滅储鏉′欢鍒犻櫎 */ deleteElement = (cell) => { - const { dict } = this.state let _this = this confirm({ - content: dict['model.confirm'] + dict['model.delete'] + ` - ${cell.label} 锛焋, + content: `纭畾鍒犻櫎 - ${cell.label} 锛焋, onOk() { let _card = fromJS(_this.state.card).toJS() _card.search = _card.search.filter(item => item.uuid !== cell.uuid) @@ -406,13 +402,13 @@ } render() { - const { dict, card, visible, sqlVerifing, showField } = this.state + const { card, visible, sqlVerifing, showField } = this.state let _style = resetStyle(card.style) return ( <div className={`main-search-edit-list ${card.wrap.float} ${showField ? 'show-field' : ''}`} onClick={this.clickComponent} id={card.uuid} style={_style}> <FieldsComponent config={card} type="search" /> - <Switch checkedChildren={dict['model.switch.open']} size="small" unCheckedChildren={dict['model.switch.close']} defaultChecked={showField} onChange={this.onFieldChange} /> + <Switch checkedChildren="寮�" size="small" unCheckedChildren="鍏�" defaultChecked={showField} onChange={this.onFieldChange} /> <DragElement list={card.search} setting={card.wrap} @@ -447,7 +443,6 @@ destroyOnClose > <SearchForm - dict={dict} card={this.state.editcard} formlist={this.state.formlist} inputSubmit={this.handleSubmit} diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index eb99135..e01e193 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -26,7 +26,6 @@ class ActionForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� type: PropTypes.any, // type涓�"card"鏃讹紝鍙彲閫夊崟琛屾垨涓嶉�夎 setting: PropTypes.object, // 椤甸潰璁剧疆 formlist: PropTypes.any, // 琛ㄥ崟淇℃伅 @@ -77,13 +76,13 @@ record = {} UNSAFE_componentWillMount () { - const { type, dict } = this.props + const { type } = this.props let requireOptions = [ - { value: 'notRequired', text: dict['header.form.notRequired'] }, - { value: 'requiredSgl', text: dict['header.form.requiredSgl'] }, - { value: 'required', text: dict['header.form.required'] }, - { value: 'requiredOnce', text: dict['header.form.requiredOnce'] } + { value: 'notRequired', text: '涓嶉�夋嫨琛�' }, + { value: 'requiredSgl', text: '閫夋嫨鍗曡' }, + { value: 'required', text: '閫夋嫨澶氳' }, + { value: 'requiredOnce', text: '澶氳鎷兼帴' } ] if (type === 'card') { @@ -530,20 +529,20 @@ _fieldval.intertype = 'system' _fieldval.Ot = 'notRequired' - _fieldval.label = this.props.dict['model.form.excelIn'] + _fieldval.label = '瀵煎叆Excel' _fieldval.class = 'dgreen' this.record.Ot = 'notRequired' - this.record.label = this.props.dict['model.form.excelIn'] + this.record.label = '瀵煎叆Excel' this.record.class = 'dgreen' } else if (value === 'excelOut') { _fieldval.intertype = 'system' - _fieldval.label = this.props.dict['model.form.excelOut'] + _fieldval.label = '瀵煎嚭Excel' _fieldval.class = 'dgreen' _fieldval.execSuccess = 'never' this.record.Ot = 'notRequired' - this.record.label = this.props.dict['model.form.excelOut'] + this.record.label = '瀵煎嚭Excel' this.record.class = 'dgreen' this.record.execSuccess = 'never' @@ -568,10 +567,10 @@ } if (value === 'excelIn') { - _fieldval.label = this.props.dict['model.form.excelIn'] + _fieldval.label = '瀵煎叆Excel' _fieldval.class = 'dgreen' } else if (value === 'excelOut') { - _fieldval.label = this.props.dict['model.form.excelOut'] + _fieldval.label = '瀵煎嚭Excel' _fieldval.class = 'dgreen' _fieldval.control = '' this.record.control = '' @@ -701,7 +700,6 @@ } getFields() { - const { dict } = this.props const { getFieldDecorator } = this.props.form const fields = [] @@ -724,7 +722,7 @@ } if (item.type === 'text') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] if (item.key === 'innerFunc') { @@ -769,13 +767,13 @@ content = <Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} /> } else if (item.type === 'number') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] content = <InputNumber min={item.min} max={item.max} precision={item.precision} onPressEnter={this.handleSubmit}/> } else if (item.type === 'select') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] if (item.extendName) { @@ -810,7 +808,7 @@ } } else if (item.type === 'radio') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Radio.Group onChange={(e) => {this.optionChange(item.key, e.target.value)}}> @@ -818,7 +816,7 @@ </Radio.Group> } else if (item.type === 'checkbox') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Checkbox.Group> @@ -827,13 +825,13 @@ } else if (item.type === 'cascader') { initVal = item.initVal || [] rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Cascader options={item.options || []} expandTrigger="hover" placeholder=""/> } else if (item.type === 'icon') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <MkEditIcon options={['edit', 'hint', 'direction', 'normal', 'data']} allowClear/> @@ -841,7 +839,7 @@ span = 24 className = 'textarea' rules = [ - { required: item.readonly ? false : item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.readonly ? false : item.required, message: '璇疯緭鍏�' + item.label + '!' } ] content = <TextArea rows={2} readOnly={item.readonly}/> diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index a8f146a..5c1870c 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -1,8 +1,5 @@ -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { btnCustomClasses } from '@/utils/option.js' -const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS /** * @description 鑾峰彇鎸夐挳琛ㄥ崟閰嶇疆淇℃伅 @@ -156,7 +153,7 @@ pageTemps = [ { value: 'linkpage', text: '鍏宠仈鑿滃崟' }, { value: 'billprint', text: '鍗曟嵁鎵撳嵃' }, - { value: 'pay', text: Formdict['model.pay'] }, + { value: 'pay', text: '鏀粯' }, { value: 'custom', text: '閾炬帴' } ] } @@ -225,7 +222,7 @@ { type: 'select', key: 'OpenType', - label: Formdict['header.form.openType'], + label: '鎵撳紑鏂瑰紡', initVal: card.OpenType, required: true, options: opentypes @@ -273,24 +270,24 @@ { type: 'select', key: 'execMode', - label: Formdict['model.form.execMode'], + label: '鎵ц鏂瑰紡', initVal: card.execMode || 'exec', required: true, options: [{ value: 'exec', - text: Formdict['model.form.exec'] + text: '鐩存帴鎵ц' }, { value: 'prompt', - text: Formdict['model.form.prompt'] + text: '鎻愮ず妗�' }, { value: 'pop', - text: Formdict['model.form.popform'] + text: '寮圭獥锛堣〃鍗曪級' }] }, { type: 'radio', key: 'intertype', - label: Formdict['header.form.intertype'], + label: '鎺ュ彛绫诲瀷', initVal: card.intertype || 'system', required: true, options: [] @@ -329,7 +326,7 @@ { type: 'radio', key: 'sqlType', - label: Formdict['header.form.action.type'], + label: '鎿嶄綔绫诲瀷', initVal: card.sqlType || '', required: true, options: [] @@ -344,7 +341,7 @@ { type: 'text', key: 'innerFunc', - label: Formdict['header.form.innerFunc'], + label: '鍐呴儴鍑芥暟', initVal: card.innerFunc || '', tooltip: functip, fields: usefulFields, @@ -362,7 +359,7 @@ { type: 'select', key: 'pageTemplate', - label: Formdict['model.form.newpage.type'], + label: '椤甸潰绫诲瀷', initVal: card.pageTemplate || '', required: true, options: pageTemps @@ -387,28 +384,28 @@ { type: 'textarea', key: 'url', - label: Formdict['model.pageUrl'], + label: '椤甸潰鍦板潃', initVal: card.url || '', required: true }, { type: 'radio', key: 'sysInterface', - label: Formdict['header.form.sysInterface'], + label: '绯荤粺鎺ュ彛', initVal: card.sysInterface || 'false', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'text', key: 'outerFunc', - label: Formdict['header.form.outerFunc'], + label: '澶栭儴鍑芥暟', initVal: card.outerFunc || '', required: false, }, @@ -488,14 +485,14 @@ { type: 'text', key: 'callbackFunc', - label: Formdict['header.form.callbackFunc'], + label: '鍥炶皟鍑芥暟', initVal: card.callbackFunc || '', required: true }, { type: 'select', key: 'Ot', - label: Formdict['header.form.isRequired'], + label: '琛岃缃�', initVal: card.Ot || (card.sqlType === 'insert' ? 'notRequired' : 'requiredSgl'), required: true, options: [] @@ -503,13 +500,13 @@ { type: 'select', key: 'execSuccess', - label: Formdict['model.form.afterSuccess'], + label: '鎴愬姛鍚�', initVal: card.execSuccess || 'grid', tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�', required: true, options: [{ value: 'never', - text: Formdict['header.form.refresh.never'] + text: '涓嶅埛鏂�' }, { value: 'line', text: '鍒锋柊琛�' @@ -526,13 +523,13 @@ { type: 'select', key: 'execError', - label: Formdict['model.form.afterError'], + label: '澶辫触鍚�', initVal: card.execError || 'never', tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍硷紝娉細涓婄骇缁勪欢鍦ㄦ暟鎹簮涓坊鍔犮��', required: true, options: [{ value: 'never', - text: Formdict['header.form.refresh.never'] + text: '涓嶅埛鏂�' }, { value: 'line', text: '鍒锋柊琛�' @@ -548,12 +545,12 @@ { type: 'select', key: 'popClose', - label: Formdict['header.form.popClose'], + label: '鍏抽棴鍚�', initVal: card.popClose || 'never', required: true, options: [{ value: 'never', - text: Formdict['header.form.refresh.never'] + text: '涓嶅埛鏂�' }, { value: 'grid', text: '鍒锋柊褰撳墠缁勪欢' @@ -627,7 +624,7 @@ { type: 'icon', key: 'icon', - label: Formdict['model.icon'], + label: '鍥炬爣', initVal: card.icon, required: false, forbid: type === 'datacard' && appType === 'mob', // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽彧鏄剧ず鏂囧瓧 @@ -636,7 +633,7 @@ { type: 'select', key: 'class', - label: Formdict['model.form.color'], + label: '棰滆壊', initVal: card.class, tooltip: '姝ら鑹蹭负鎸夐挳鍒濆鍖栭鑹诧紝鍙湪鏍峰紡璋冩暣涓慨鏀广��', required: false, @@ -646,7 +643,7 @@ { type: 'radio', key: 'color', - label: Formdict['model.form.color'], + label: '棰滆壊', initVal: card.color || 'primary', required: false, forbid: (type !== 'datacard' || appType !== 'mob'), // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽彧鍙缃浐瀹氶鑹� @@ -670,21 +667,21 @@ { type: 'radio', key: 'joint', - label: Formdict['model.form.paramJoint'], + label: '鎷兼帴鍙傛暟', initVal: card.joint || 'true', required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'text', key: 'sheet', - label: Formdict['model.form.tablename'], + label: '琛ㄥ悕', initVal: card.sheet || setting.tableName || '', required: true }, @@ -696,10 +693,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -954,7 +951,7 @@ { type: 'text', key: 'field', - label: Formdict['model.form.field'], + label: '瀛楁', initVal: card.field || '', required: true, readonly: false diff --git a/src/menu/components/share/actioncomponent/index.jsx b/src/menu/components/share/actioncomponent/index.jsx index d7b3e7d..cbddcc2 100644 --- a/src/menu/components/share/actioncomponent/index.jsx +++ b/src/menu/components/share/actioncomponent/index.jsx @@ -4,8 +4,6 @@ import { Modal, notification, Button } from 'antd' import Utils, { FuncUtils } from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getActionForm } from './formconfig' import asyncSpinComponent from '@/utils/asyncSpinComponent' @@ -31,7 +29,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, appType: sessionStorage.getItem('appType'), card: null, // 缂栬緫涓厓绱� formlist: null, // 琛ㄥ崟淇℃伅 @@ -163,8 +160,9 @@ } let ableField = usefulFields.join(', ') + let msg = `鍑芥暟鍚嶇О闇�浠�${ableField}绛夊瓧绗﹀紑濮�;` let functip = <div> - <p style={{marginBottom: '5px'}}>{this.state.dict['model.tooltip.func.innerface'].replace('@ableField', ableField)}</p> + <p style={{marginBottom: '5px'}}>{msg}</p> </div> if (!ableField) { // 鏃犲瓧娈甸檺鍒� @@ -272,11 +270,11 @@ */ deleteElement = (card) => { const { config } = this.props - const { dict, appType } = this.state + const { appType } = this.state let _this = this confirm({ - content: dict['model.confirm'] + dict['model.delete'] + ` - ${card.label} 锛焋, + content: `纭畾鍒犻櫎 - ${card.label} 锛焋, onOk() { let _actionlist = fromJS(_this.state.actionlist).toJS() @@ -448,14 +446,12 @@ getVerify = (card) => { const { config } = this.props - const { dict } = this.state if (!card) return null if (['pop', 'prompt', 'exec'].includes(card.OpenType)) { return <VerifyCard card={card} - dict={dict} config={config} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} @@ -463,28 +459,24 @@ } else if (card.OpenType === 'excelIn') { return <VerifyExcelIn card={card} - dict={dict} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } else if (card.OpenType === 'excelOut') { return <VerifyExcelOut card={card} - dict={dict} config={config} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } else if (card.OpenType === 'funcbutton' && card.funcType === 'print') { return <VerifyPrint card={card} - dict={dict} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } else if (card.OpenType === 'funcbutton' && card.funcType === 'megvii') { return <VerifyMegvii card={card} - dict={dict} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> @@ -493,7 +485,7 @@ render() { const { config } = this.props - const { actionlist, visible, appType, card, dict, profVisible, record } = this.state + const { actionlist, visible, appType, card, profVisible, record } = this.state return ( <div className={'model-menu-action-list length' + actionlist.length}> @@ -516,14 +508,13 @@ maskClosable={false} onCancel={this.editModalCancel} footer={[ - record && record.intertype === 'inner' ? <CreateFunc key="create" dict={dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null, - <Button key="cancel" onClick={this.editModalCancel}>{dict['model.cancel']}</Button>, - <Button key="confirm" type="primary" onClick={this.handleSubmit}>{dict['model.confirm']}</Button> + record && record.intertype === 'inner' ? <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={dict} card={card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} @@ -538,7 +529,7 @@ visible={profVisible} width={'90vw'} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { if (this.verifyRef.handleCancel) { diff --git a/src/menu/components/share/markcomponent/index.jsx b/src/menu/components/share/markcomponent/index.jsx index 7945663..84c2b73 100644 --- a/src/menu/components/share/markcomponent/index.jsx +++ b/src/menu/components/share/markcomponent/index.jsx @@ -9,8 +9,6 @@ import MarkForm from './markform' import MkIcon from '@/components/mk-icon' import { minkeIconSystem } from '@/utils/option.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import '@/assets/css/table.scss' import './index.scss' @@ -26,7 +24,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, marks: null, columns: null, visible: false, @@ -326,7 +323,7 @@ } render() { - const { marks, markColumns, visible, options, signs, dict } = this.state + const { marks, markColumns, visible, options, signs } = this.state return ( <div style={{display: 'inline-block'}}> @@ -337,12 +334,12 @@ visible={visible} width={'75vw'} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.markSubmit} onCancel={() => { this.setState({ visible: false }) }} destroyOnClose > - <MarkForm field={this.props.field} dict={dict} signs={signs} columns={options} markChange={this.markChange}/> + <MarkForm field={this.props.field} signs={signs} columns={options} markChange={this.markChange}/> <Col style={{fontSize: '12px', color: '#757575', paddingLeft: '10px'}} span={24}>娉細浠庝笂鍒颁笅锛屽尮閰嶇涓�涓鍚堟潯浠剁殑鏍囪銆�</Col> <EditTable actions={['edit', 'move', 'del']} data={marks} columns={markColumns} onChange={(marks) => this.setState({marks})}/> </Modal> diff --git a/src/menu/components/share/markcomponent/markform/index.jsx b/src/menu/components/share/markcomponent/markform/index.jsx index 2809114..f4adc4d 100644 --- a/src/menu/components/share/markcomponent/markform/index.jsx +++ b/src/menu/components/share/markcomponent/markform/index.jsx @@ -8,7 +8,6 @@ class UniqueForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� field: PropTypes.any, columns: PropTypes.array, // 鍒楀悕闆嗗悎 signs: PropTypes.array, // 鏍囪绫诲瀷 @@ -53,7 +52,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '瀵规瘮瀛楁!' + message: '璇烽�夋嫨瀵规瘮瀛楁!' } ] })( @@ -68,7 +67,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '瀵规瘮鏂瑰紡!' + message: '璇烽�夋嫨瀵规瘮鏂瑰紡!' } ] })( @@ -100,7 +99,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '棰滆壊!' + message: '璇烽�夋嫨棰滆壊!' } ] })( @@ -115,7 +114,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鏍囪鏂瑰紡!' + message: '璇烽�夋嫨鏍囪鏂瑰紡!' } ] })( diff --git a/src/menu/components/share/normalform/index.jsx b/src/menu/components/share/normalform/index.jsx index f08205e..c8244d9 100644 --- a/src/menu/components/share/normalform/index.jsx +++ b/src/menu/components/share/normalform/index.jsx @@ -11,7 +11,6 @@ class SettingForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� formlist: PropTypes.array, // 琛ㄥ崟 inputSubmit: PropTypes.func // 鍥炶溅浜嬩欢 } diff --git a/src/menu/components/share/searchcomponent/index.jsx b/src/menu/components/share/searchcomponent/index.jsx index e03d2e9..3136358 100644 --- a/src/menu/components/share/searchcomponent/index.jsx +++ b/src/menu/components/share/searchcomponent/index.jsx @@ -7,8 +7,6 @@ import MKEmitter from '@/utils/events.js' import Api from '@/api' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getSearchForm } from '@/templates/zshare/formconfig' import SearchForm from '@/templates/sharecomponent/searchcomponent/searchform' @@ -24,7 +22,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, searchlist: null, // 鎼滅储鏉′欢闆� sqlVerifing: false, // sql楠岃瘉涓� visible: false, // 妯℃�佹鎺у埗 @@ -286,7 +283,7 @@ } render() { - const { dict, searchlist, visible, sqlVerifing } = this.state + const { searchlist, visible, sqlVerifing } = this.state return ( <div className={'model-custom-header-search-list search-length' + (searchlist.length)}> @@ -308,7 +305,6 @@ destroyOnClose > <SearchForm - dict={dict} card={this.state.card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} diff --git a/src/menu/components/share/usercomponent/index.jsx b/src/menu/components/share/usercomponent/index.jsx index 429e0a8..07c968b 100644 --- a/src/menu/components/share/usercomponent/index.jsx +++ b/src/menu/components/share/usercomponent/index.jsx @@ -8,8 +8,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' import options from '@/store/options.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import UserForm from './settingform' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -20,7 +18,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, visible: false, loading: false, name: '', @@ -208,7 +205,7 @@ } render () { - const { visible, dict, loading, name } = this.state + const { visible, loading, name } = this.state return ( <div className="user-component-wrap"> @@ -223,7 +220,7 @@ onCancel={this.cancel} destroyOnClose > - <UserForm dict={dict} name={name} inputSubmit={this.submit} wrappedComponentRef={(inst) => this.verifyRef = inst}/> + <UserForm name={name} inputSubmit={this.submit} wrappedComponentRef={(inst) => this.verifyRef = inst}/> </Modal> </div> ) diff --git a/src/menu/components/share/usercomponent/settingform/index.jsx b/src/menu/components/share/usercomponent/settingform/index.jsx index d918739..cd66103 100644 --- a/src/menu/components/share/usercomponent/settingform/index.jsx +++ b/src/menu/components/share/usercomponent/settingform/index.jsx @@ -7,7 +7,6 @@ class SettingForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� name: PropTypes.string, // 缁勪欢鍚嶇О inputSubmit: PropTypes.func // 鍥炶溅浜嬩欢 } @@ -68,7 +67,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '缁勪欢鍚嶇О!' + message: '璇疯緭鍏ョ粍浠跺悕绉�!' }, { max: 15, diff --git a/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx index 547c1c6..7630d36 100644 --- a/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx @@ -1,8 +1,3 @@ -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' - -const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS - /** * @description 鑾峰彇鏄剧ず鍒楄〃鍗曢厤缃俊鎭� * @param {object} card // 鎼滅储鏉′欢瀵硅薄 @@ -40,19 +35,19 @@ let options = [{ value: 'text', - text: Formdict['model.form.text'] + text: '鏂囨湰' }, { value: 'number', - text: Formdict['model.form.number'] + text: '鏁板瓧' }, { value: 'picture', - text: Formdict['model.form.picture'] + text: '鍥剧墖' }, { value: 'link', - text: Formdict['model.form.href'] + text: '閾炬帴' }, { value: 'textarea', - text: Formdict['model.form.textarea'] + text: '澶氳鏂囨湰' }, { value: 'custom', text: '鑷畾涔夊垪' @@ -89,7 +84,7 @@ { type: 'select', key: 'type', - label: Formdict['model.form.type'], + label: '绫诲瀷', initVal: card.type, required: true, options: options @@ -97,7 +92,7 @@ { type: 'select', key: 'field', - label: Formdict['model.form.field'], + label: '瀛楁', initVal: card.field, required: true, options: fields @@ -105,7 +100,7 @@ { type: 'select', key: 'nameField', - label: Formdict['model.name'] + Formdict['model.form.field'], + label: '鍚嶇О瀛楁', initVal: card.nameField || '', required: false, options: [{uuid: 'empty', field: '', label: '绌�'}, ...fields] @@ -116,67 +111,67 @@ min: 20, max: 1000, decimal: 0, - label: Formdict['model.form.columnWidth'], + label: '鍒楀', initVal: card.Width || 120, required: true }, { type: 'radio', key: 'joint', - label: Formdict['model.form.paramJoint'], + label: '鎷兼帴鍙傛暟', initVal: card.joint || 'true', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'Hide', - label: Formdict['model.hidden'], + label: '闅愯棌', initVal: card.Hide || 'false', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'IsSort', - label: Formdict['model.sort'], + label: '鎺掑簭', initVal: card.IsSort || (card.isSub ? 'false' : 'true'), required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'Align', - label: Formdict['model.form.align'], + label: '瀵归綈鏂瑰紡', initVal: card.Align || 'left', required: true, options: [{ value: 'left', - text: Formdict['model.form.alignLeft'] + text: '宸﹀榻�' }, { value: 'center', - text: Formdict['model.form.alignCenter'] + text: '灞呬腑' }, { value: 'right', - text: Formdict['model.form.alignRight'] + text: '鍙冲榻�' }] }, { @@ -188,10 +183,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -203,10 +198,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -215,14 +210,14 @@ min: 0, max: 18, decimal: 0, - label: Formdict['header.form.decimal'], + label: '灏忔暟浣�', initVal: card.decimal || 0, required: true }, { type: 'select', key: 'format', - label: Formdict['header.form.format'], + label: '鏍煎紡鍖�', initVal: card.format || 'none', options: [{ value: 'none', @@ -242,7 +237,7 @@ { type: 'select', key: 'textFormat', - label: Formdict['header.form.format'], + label: '鏍煎紡鍖�', initVal: card.textFormat || 'none', options: [{ value: 'none', @@ -262,7 +257,7 @@ { type: 'text', key: 'prefix', - label: Formdict['header.form.prefix'], + label: '鍓嶇紑', initVal: card.prefix || '', required: false, readonly: false @@ -270,7 +265,7 @@ { type: 'text', key: 'postfix', - label: Formdict['header.form.postfix'], + label: '鍚庣紑', initVal: card.postfix || '', required: false, readonly: false @@ -319,10 +314,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -345,7 +340,7 @@ { type: appType === 'pc' ? 'select' : 'cascader', key: 'linkmenu', - label: Formdict['model.menu'], + label: '鑿滃崟', initVal: card.linkmenu || (appType === 'pc' ? '' : []), required: true, options: menulist, @@ -404,7 +399,7 @@ { type: 'multiselect', key: 'blacklist', - label: Formdict['header.form.blacklist'], + label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, options: roleList, diff --git a/src/menu/components/table/base-table/columns/editColumn/index.jsx b/src/menu/components/table/base-table/columns/editColumn/index.jsx index 907ebb2..cbb8ac4 100644 --- a/src/menu/components/table/base-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/base-table/columns/editColumn/index.jsx @@ -24,7 +24,6 @@ class NormalTableColumn extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� visible: PropTypes.bool, column: PropTypes.object, fields: PropTypes.array, @@ -188,7 +187,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' }, ...rules ] @@ -210,7 +209,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(item.unlimit ? <InputNumber onPressEnter={this.handleSubmit}/> : @@ -227,7 +226,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -261,7 +260,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -307,7 +306,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -334,7 +333,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<TextArea rows={2} disabled={item.readonly} placeholder={item.placeholder || ''}/>)} diff --git a/src/menu/components/table/base-table/columns/index.jsx b/src/menu/components/table/base-table/columns/index.jsx index 9705724..a928fa8 100644 --- a/src/menu/components/table/base-table/columns/index.jsx +++ b/src/menu/components/table/base-table/columns/index.jsx @@ -8,8 +8,6 @@ import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -194,7 +192,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, appType: sessionStorage.getItem('appType'), tableId: '', data: [{uuid: Utils.getuuid()}], @@ -512,7 +509,7 @@ render() { const { config } = this.props - const { fields, card, lineMarks, dict, tableId, appType } = this.state + const { fields, card, lineMarks, tableId, appType } = this.state const components = { header: { cell: DragableHeaderCol @@ -551,7 +548,7 @@ /> {appType === 'mob' && config.setting.laypage !== 'fasle' ? <MobPagination /> : null} </DndProvider> - <EditColumn column={card} dict={dict} fields={fields} submitCol={this.submitCol} cancelCol={this.cancelCol}/> + <EditColumn column={card} fields={fields} submitCol={this.submitCol} cancelCol={this.cancelCol}/> </div> ) } diff --git a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx index c830e47..bd69d85 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx @@ -1,8 +1,3 @@ -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' - -const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS - /** * @description 鑾峰彇鏄剧ず鍒楄〃鍗曢厤缃俊鎭� * @param {object} card // 鎼滅储鏉′欢瀵硅薄 @@ -80,7 +75,7 @@ { type: 'select', key: 'type', - label: Formdict['model.form.type'], + label: '绫诲瀷', initVal: card.type, required: true, options: options @@ -88,7 +83,7 @@ { type: 'select', key: 'field', - label: Formdict['model.form.field'], + label: '瀛楁', initVal: card.field, required: true, options: fields @@ -99,53 +94,53 @@ min: 20, max: 1000, precision: 0, - label: Formdict['model.form.columnWidth'], + label: '鍒楀', initVal: card.Width || 120, required: true }, { type: 'radio', key: 'Hide', - label: Formdict['model.hidden'], + label: '闅愯棌', initVal: card.Hide || 'false', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'IsSort', - label: Formdict['model.sort'], + label: '鎺掑簭', initVal: card.IsSort || 'false', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'Align', - label: Formdict['model.form.align'], + label: '瀵归綈鏂瑰紡', initVal: card.Align || 'left', required: true, options: [{ value: 'left', - text: Formdict['model.form.alignLeft'] + text: '宸﹀榻�' }, { value: 'center', - text: Formdict['model.form.alignCenter'] + text: '灞呬腑' }, { value: 'right', - text: Formdict['model.form.alignRight'] + text: '鍙冲榻�' }] }, { @@ -157,10 +152,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -296,10 +291,10 @@ initVal: card.orderType || 'asc', options: [{ value: 'asc', - text: Formdict['header.form.asc'] + text: '姝e簭' }, { value: 'desc', - text: Formdict['header.form.desc'] + text: '鍊掑簭' }] }, { @@ -382,7 +377,7 @@ min: 0, max: 18, precision: 0, - label: Formdict['header.form.decimal'], + label: '灏忔暟浣�', initVal: card.decimal || 0, required: false }, @@ -405,7 +400,7 @@ { type: 'select', key: 'format', - label: Formdict['header.form.format'], + label: '鏍煎紡鍖�', initVal: card.format || 'none', options: [{ value: 'none', @@ -425,7 +420,7 @@ { type: 'select', key: 'textFormat', - label: Formdict['header.form.format'], + label: '鏍煎紡鍖�', initVal: card.textFormat || 'none', options: [{ value: 'none', @@ -445,14 +440,14 @@ { type: 'text', key: 'prefix', - label: Formdict['header.form.prefix'], + label: '鍓嶇紑', initVal: card.prefix || '', required: false, }, { type: 'text', key: 'postfix', - label: Formdict['header.form.postfix'], + label: '鍚庣紑', initVal: card.postfix || '', required: false, }, @@ -488,7 +483,7 @@ { type: 'multiselect', key: 'blacklist', - label: Formdict['header.form.blacklist'], + label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, options: roleList diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx index 3997baa..102006c 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx @@ -24,7 +24,6 @@ class EdiTableColumn extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� visible: PropTypes.bool, column: PropTypes.object, columns: PropTypes.array, @@ -227,7 +226,6 @@ } getFields() { - const { dict } = this.props const { getFieldDecorator } = this.props.form const { formlist, transfield } = this.state const fields = [] @@ -246,7 +244,7 @@ if (item.type === 'text') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' }, + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' }, { max: formRule.input.max, message: formRule.input.message @@ -256,7 +254,7 @@ content = <Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} /> } else if (item.type === 'number') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] initVal = item.initVal @@ -267,7 +265,7 @@ } } else if (item.type === 'select') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Select showSearch @@ -284,7 +282,7 @@ </Select> } else if (item.type === 'radio') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] initVal = item.initVal @@ -306,13 +304,13 @@ span = 24 className = 'text-area' rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] content = <TextArea rows={item.rows || 2}/> } else if (item.type === 'codemirror') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] span = 24 className = 'text-area' diff --git a/src/menu/components/table/edit-table/columns/index.jsx b/src/menu/components/table/edit-table/columns/index.jsx index a13f19a..09ab9f2 100644 --- a/src/menu/components/table/edit-table/columns/index.jsx +++ b/src/menu/components/table/edit-table/columns/index.jsx @@ -8,8 +8,6 @@ import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -184,7 +182,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, appType: sessionStorage.getItem('appType'), tableId: '', data: [{uuid: Utils.getuuid()}], @@ -546,7 +543,7 @@ render() { const { config } = this.props - const { fields, card, lineMarks, dict, tableId, visible } = this.state + const { fields, card, lineMarks, tableId, visible } = this.state const components = { header: { cell: DragableHeaderCol @@ -632,7 +629,7 @@ }} /> </DndProvider> - <EditColumn column={card} dict={dict} columns={this.state.columns} fields={fields} submitCol={this.submitCol} cancelCol={this.cancelCol}/> + <EditColumn column={card} columns={this.state.columns} fields={fields} submitCol={this.submitCol} cancelCol={this.cancelCol}/> <Modal wrapClassName="model-table-action-verify-modal" title={'缂栬緫'} @@ -646,7 +643,6 @@ <TableVerify card={config.submit} setting={config.setting} - dict={dict} cols={config.cols} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} diff --git a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx index 0d6e3ec..4835267 100644 --- a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx +++ b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx @@ -11,7 +11,6 @@ class CustomForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� btn: PropTypes.object, // 鎸夐挳淇℃伅 scripts: PropTypes.array, // 鑷畾涔夎剼鏈垪琛� usefulfields: PropTypes.any, // 鍙敤瀛楁 @@ -334,7 +333,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + 'sql!' + message: '璇疯緭鍏ql!' } ] })(<CodeMirror />)} diff --git a/src/menu/components/table/edit-table/columns/tableIn/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/index.jsx index 69d1200..144df97 100644 --- a/src/menu/components/table/edit-table/columns/tableIn/index.jsx +++ b/src/menu/components/table/edit-table/columns/tableIn/index.jsx @@ -21,7 +21,6 @@ class VerifyTableCard extends Component { static propTpyes = { columns: PropTypes.array, // 鏄剧ず鍒� - dict: PropTypes.object, // 瀛楀吀椤� card: PropTypes.object, } @@ -154,10 +153,10 @@ <span className="operation-btn" onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span> <span className="operation-btn" onClick={() => this.handleUpDown(record, 'scripts', 'up')} style={{color: '#1890ff'}}><ArrowUpOutlined /></span> <span className="operation-btn" onClick={() => this.handleUpDown(record, 'scripts', 'down')} style={{color: '#ff4d4f'}}><ArrowDownOutlined /></span> - <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> + <span className="operation-btn" title="鐘舵�佸垏鎹�" onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.handleDelete(record, 'scripts') }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> @@ -547,7 +546,7 @@ <Form {...formItemLayout}> <Row gutter={24}> <Col span={8}> - <Form.Item required label={this.props.dict['model.form.tablename']}> + <Form.Item required label="琛ㄥ悕"> <Input value={verify.sheet} placeholder="" autoComplete="off" onChange={(e) => this.onOptionChange(e.target.value, 'sheet')}/> </Form.Item> </Col> @@ -607,7 +606,7 @@ {verify.uniques.length ? <span className="count-tip">{verify.uniques.length}</span> : null} </span> } key="unique"> - <UniqueForm fields={fields} dict={this.props.dict} uniqueChange={this.uniqueChange}/> + <UniqueForm fields={fields} uniqueChange={this.uniqueChange}/> <EditTable actions={['edit', 'move', 'del']} data={verify.uniques} columns={uniqueColumns} onChange={this.changeUniques}/> </TabPane> <TabPane disabled={verify.intertype !== 'system'} tab={ @@ -617,7 +616,6 @@ </span> } key="scripts"> <CustomScript - dict={this.props.dict} btn={verify} usefulfields={fields} scripts={verify.scripts} diff --git a/src/menu/components/table/edit-table/columns/tableIn/uniqueform/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/uniqueform/index.jsx index d9f8038..a83668d 100644 --- a/src/menu/components/table/edit-table/columns/tableIn/uniqueform/index.jsx +++ b/src/menu/components/table/edit-table/columns/tableIn/uniqueform/index.jsx @@ -6,7 +6,6 @@ class UniqueForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� fields: PropTypes.array, // 琛ㄥ崟瀛楁 uniqueChange: PropTypes.func // 淇敼鍑芥暟 } @@ -56,13 +55,13 @@ <Form {...formItemLayout} className="verify-form" id="verifycard1"> <Row gutter={24}> <Col span={7}> - <Form.Item label={'鍒楀悕'}> + <Form.Item label="鍒楀悕"> {getFieldDecorator('field', { initialValue: [], rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鍒楀悕!' + message: '璇烽�夋嫨鍒楀悕!' } ] })( @@ -78,13 +77,13 @@ </Form.Item> </Col> <Col span={7}> - <Form.Item label={'鎶ラ敊缂栫爜'}> + <Form.Item label="鎶ラ敊缂栫爜"> {getFieldDecorator('errorCode', { initialValue: 'E', rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鎶ラ敊缂栫爜!' + message: '璇烽�夋嫨鎶ラ敊缂栫爜!' } ] })( @@ -98,13 +97,13 @@ </Form.Item> </Col> <Col span={7}> - <Form.Item label={'楠岃瘉绫诲瀷'}> + <Form.Item label="楠岃瘉绫诲瀷"> {getFieldDecorator('verifyType', { initialValue: 'physical', rules: [ { required: true, - message: this.props.dict['form.required.select'] + '楠岃瘉绫诲瀷!' + message: '璇烽�夋嫨楠岃瘉绫诲瀷!' } ] })( diff --git a/src/menu/components/table/edit-table/index.jsx b/src/menu/components/table/edit-table/index.jsx index fcddc30..029fcd2 100644 --- a/src/menu/components/table/edit-table/index.jsx +++ b/src/menu/components/table/edit-table/index.jsx @@ -10,8 +10,6 @@ import MKEmitter from '@/utils/events.js' import getWrapForm from './options' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import './index.scss' @@ -33,7 +31,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, appType: sessionStorage.getItem('appType'), card: null, back: false diff --git a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx index 1c53e2e..e004eb9 100644 --- a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx @@ -1,8 +1,3 @@ -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' - -const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS - /** * @description 鑾峰彇鏄剧ず鍒楄〃鍗曢厤缃俊鎭� * @param {object} card // 鎼滅储鏉′欢瀵硅薄 @@ -89,7 +84,7 @@ { type: 'select', key: 'type', - label: Formdict['model.form.type'], + label: '绫诲瀷', initVal: card.type, required: true, options: options @@ -97,7 +92,7 @@ { type: 'select', key: 'field', - label: Formdict['model.form.field'], + label: '瀛楁', initVal: card.field, required: true, options: fields @@ -105,7 +100,7 @@ { type: 'select', key: 'nameField', - label: Formdict['model.name'] + Formdict['model.form.field'], + label: '鍚嶇О瀛楁', initVal: card.nameField || '', required: false, options: [{uuid: 'empty', field: '', label: '绌�'}, ...fields] @@ -116,67 +111,67 @@ min: 20, max: 1000, decimal: 0, - label: Formdict['model.form.columnWidth'], + label: '鍒楀', initVal: card.Width || 120, required: true }, { type: 'radio', key: 'joint', - label: Formdict['model.form.paramJoint'], + label: '鎷兼帴鍙傛暟', initVal: card.joint || 'true', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'Hide', - label: Formdict['model.hidden'], + label: '闅愯棌', initVal: card.Hide || 'false', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'IsSort', - label: Formdict['model.sort'], + label: '鎺掑簭', initVal: card.IsSort || (card.isSub ? 'false' : 'true'), required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'Align', - label: Formdict['model.form.align'], + label: '瀵归綈鏂瑰紡', initVal: card.Align || 'left', required: true, options: [{ value: 'left', - text: Formdict['model.form.alignLeft'] + text: '宸﹀榻�' }, { value: 'center', - text: Formdict['model.form.alignCenter'] + text: '灞呬腑' }, { value: 'right', - text: Formdict['model.form.alignRight'] + text: '鍙冲榻�' }] }, { @@ -188,10 +183,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -203,10 +198,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -215,14 +210,14 @@ min: 0, max: 18, decimal: 0, - label: Formdict['header.form.decimal'], + label: '灏忔暟浣�', initVal: card.decimal || 0, required: false }, { type: 'select', key: 'format', - label: Formdict['header.form.format'], + label: '鏍煎紡鍖�', initVal: card.format || 'none', options: [{ value: 'none', @@ -242,7 +237,7 @@ { type: 'select', key: 'textFormat', - label: Formdict['header.form.format'], + label: '鏍煎紡鍖�', initVal: card.textFormat || 'none', options: [{ value: 'none', @@ -262,7 +257,7 @@ { type: 'text', key: 'prefix', - label: Formdict['header.form.prefix'], + label: '鍓嶇紑', initVal: card.prefix || '', required: false, readonly: false @@ -270,7 +265,7 @@ { type: 'text', key: 'postfix', - label: Formdict['header.form.postfix'], + label: '鍚庣紑', initVal: card.postfix || '', required: false, readonly: false @@ -319,10 +314,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -345,7 +340,7 @@ { type: appType === 'pc' ? 'select' : 'cascader', key: 'linkmenu', - label: Formdict['model.menu'], + label: '鑿滃崟', initVal: card.linkmenu || (appType === 'pc' ? '' : []), required: true, options: menulist, @@ -404,7 +399,7 @@ { type: 'multiselect', key: 'blacklist', - label: Formdict['header.form.blacklist'], + label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, options: roleList, diff --git a/src/menu/components/table/normal-table/columns/editColumn/index.jsx b/src/menu/components/table/normal-table/columns/editColumn/index.jsx index 907ebb2..cbb8ac4 100644 --- a/src/menu/components/table/normal-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/normal-table/columns/editColumn/index.jsx @@ -24,7 +24,6 @@ class NormalTableColumn extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� visible: PropTypes.bool, column: PropTypes.object, fields: PropTypes.array, @@ -188,7 +187,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' }, ...rules ] @@ -210,7 +209,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(item.unlimit ? <InputNumber onPressEnter={this.handleSubmit}/> : @@ -227,7 +226,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -261,7 +260,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -307,7 +306,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -334,7 +333,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<TextArea rows={2} disabled={item.readonly} placeholder={item.placeholder || ''}/>)} diff --git a/src/menu/components/table/normal-table/columns/index.jsx b/src/menu/components/table/normal-table/columns/index.jsx index aa68104..f2ef11f 100644 --- a/src/menu/components/table/normal-table/columns/index.jsx +++ b/src/menu/components/table/normal-table/columns/index.jsx @@ -8,8 +8,6 @@ import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -200,7 +198,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, appType: sessionStorage.getItem('appType'), tableId: '', data: [{uuid: Utils.getuuid()}], @@ -588,7 +585,7 @@ render() { const { config } = this.props - const { fields, card, lineMarks, dict, tableId, appType } = this.state + const { fields, card, lineMarks, tableId, appType } = this.state const components = { header: { cell: DragableHeaderCol @@ -629,7 +626,7 @@ /> {appType === 'mob' && config.setting.laypage !== 'fasle' ? <MobPagination /> : null} </DndProvider> - <EditColumn column={card} dict={dict} fields={fields} submitCol={this.submitCol} cancelCol={this.cancelCol}/> + <EditColumn column={card} fields={fields} submitCol={this.submitCol} cancelCol={this.cancelCol}/> </div> ) } diff --git a/src/menu/components/tabs/paste/index.jsx b/src/menu/components/tabs/paste/index.jsx index ea3581c..0f6fb9a 100644 --- a/src/menu/components/tabs/paste/index.jsx +++ b/src/menu/components/tabs/paste/index.jsx @@ -31,7 +31,7 @@ if (item.type === 'tabs') { uuids[item.uuid] = MenuUtils.getuuid() item.uuid = uuids[item.uuid] - item.setting.name = item.setting.name + MenuUtils.getdataName().toUpperCase().substr(-4) + item.setting.name = item.setting.name + MenuUtils.getSignName() item.name = item.setting.name item.subtabs.forEach(tab => { @@ -51,7 +51,7 @@ } else if (item.type === 'group') { uuids[item.uuid] = MenuUtils.getuuid() item.uuid = uuids[item.uuid] - item.setting.name = item.setting.name + MenuUtils.getdataName().toUpperCase().substr(-4) + item.setting.name = item.setting.name + MenuUtils.getSignName() item.name = item.setting.name item.components = item.components.map(cell => { diff --git a/src/menu/datasource/index.jsx b/src/menu/datasource/index.jsx index e71780a..e0bb557 100644 --- a/src/menu/datasource/index.jsx +++ b/src/menu/datasource/index.jsx @@ -4,8 +4,6 @@ import { Modal } from 'antd' import { SettingOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import VerifyCard from './verifycard' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -17,7 +15,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, appType: sessionStorage.getItem('appType'), sourcelist: [], mainSearch: [], @@ -205,7 +202,7 @@ render () { const { config } = this.props - const { visible, dict, loading, mainSearch } = this.state + const { visible, loading, mainSearch } = this.state return ( <div className="model-datasource"> @@ -216,14 +213,13 @@ visible={visible} width={'75vw'} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} confirmLoading={loading} onCancel={() => { MKEmitter.emit('modalStatus', false);this.setState({ visible: false }) }} destroyOnClose > <VerifyCard - dict={dict} mainSearch={mainSearch} config={config} wrappedComponentRef={(inst) => this.verifyRef = inst} diff --git a/src/menu/datasource/verifycard/columnform/index.jsx b/src/menu/datasource/verifycard/columnform/index.jsx index b8c3ba5..f977564 100644 --- a/src/menu/datasource/verifycard/columnform/index.jsx +++ b/src/menu/datasource/verifycard/columnform/index.jsx @@ -6,7 +6,6 @@ class UniqueForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� columnChange: PropTypes.func // 淇敼鍑芥暟 } @@ -27,7 +26,6 @@ } render() { - const { dict } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -44,26 +42,26 @@ <Form {...formItemLayout} className="verify-form" id="verifycard1"> <Row gutter={24}> <Col span={6}> - <Form.Item label={'鍚嶇О'}> + <Form.Item label="鍚嶇О"> {getFieldDecorator('label', { initialValue: '', rules: [ { required: true, - message: dict['form.required.input'] + '鍚嶇О!' + message: '璇疯緭鍏ュ悕绉�!' } ] })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleConfirm}/>)} </Form.Item> </Col> <Col span={6}> - <Form.Item label={'瀛楁'}> + <Form.Item label="瀛楁"> {getFieldDecorator('field', { initialValue: '', rules: [ { required: true, - message: dict['form.required.input'] + '瀛楁!' + message: '璇疯緭鍏ュ瓧娈�!' }, { pattern: /^[\u4E00-\u9FA50-9a-zA-Z_]*$/ig, @@ -74,13 +72,13 @@ </Form.Item> </Col> <Col span={6}> - <Form.Item label={'鏁版嵁绫诲瀷'}> + <Form.Item label="鏁版嵁绫诲瀷"> {getFieldDecorator('datatype', { initialValue: '', rules: [ { required: true, - message: dict['form.required.select'] + '鏁版嵁绫诲瀷!' + message: '璇烽�夋嫨鏁版嵁绫诲瀷!' } ] })( @@ -122,7 +120,7 @@ </Col> <Col span={3} className="add"> <Button onClick={this.handleConfirm} type="primary" className="mk-green"> - {dict['model.add']} + 娣诲姞 </Button> </Col> </Row> diff --git a/src/menu/datasource/verifycard/customscript/index.jsx b/src/menu/datasource/verifycard/customscript/index.jsx index ac493e7..9bd1aaa 100644 --- a/src/menu/datasource/verifycard/customscript/index.jsx +++ b/src/menu/datasource/verifycard/customscript/index.jsx @@ -10,7 +10,6 @@ class CustomForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� defaultsql: PropTypes.string, // 榛樿sql setting: PropTypes.object, // 璁剧疆 searches: PropTypes.array, // 鎼滅储鏉′欢 @@ -256,13 +255,13 @@ </Button> </Col> <Col span={24} className="sql"> - <Form.Item label={'sql'}> + <Form.Item label="sql"> {getFieldDecorator('sql', { initialValue: '', rules: [ { required: true, - message: this.props.dict['form.required.input'] + 'sql!' + message: '璇疯緭鍏ql!' } ] })(<CodeMirror />)} diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx index 8cbd450..66a6a93 100644 --- a/src/menu/datasource/verifycard/index.jsx +++ b/src/menu/datasource/verifycard/index.jsx @@ -26,7 +26,6 @@ class VerifyCard extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 } @@ -149,11 +148,11 @@ dataIndex: 'operation', render: (text, record) => (<div style={{textAlign: 'center'}}> - <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span> - <span className="operation-btn" title={this.props.dict['model.status.change']} onClick={() => this.handleStatus(record)} style={{color: '#8E44AD'}}><SwapOutlined /></span> + <span className="operation-btn" title="缂栬緫" onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span> + <span className="operation-btn" title="鐘舵�佸垏鎹�" onClick={() => this.handleStatus(record)} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.deleteScript(record) }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> @@ -828,7 +827,6 @@ </span> } key="setting"> {!reload ? <SettingForm - dict={this.props.dict} config={config} columns={columns} setting={setting} @@ -843,7 +841,7 @@ <CopyOutlined title="浠ラ�楀彿鎷兼帴褰㈠紡澶嶅埗瀛楁" className="mk-copy-fields" onClick={this.copyColumns}/> </span> } key="columns"> - <ColForm dict={this.props.dict} columnChange={this.columnChange}/> + <ColForm columnChange={this.columnChange}/> <FieldsComponent config={{...config, columns}} type="fields" @@ -873,7 +871,6 @@ searches={searches} defaultsql={defaultsql} initsql={this.state.initsql} - dict={this.props.dict} customScripts={scripts} systemScripts={this.state.systemScripts} scriptsChange={this.scriptsChange} @@ -920,7 +917,7 @@ <span className="operation-btn" onClick={() => this.handleStatus(item)} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.deleteScript(item) }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx index 27fe3ef..2630176 100644 --- a/src/menu/datasource/verifycard/settingform/index.jsx +++ b/src/menu/datasource/verifycard/settingform/index.jsx @@ -14,7 +14,6 @@ class SettingForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, // 缁勪欢閰嶇疆 setting: PropTypes.object, // 鏁版嵁婧愰厤缃� modules: PropTypes.array, // 鍙粦瀹氱殑涓婄骇缁勪欢 @@ -180,7 +179,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鏁版嵁婧愬悕绉�!' + message: '璇疯緭鍏ユ暟鎹簮鍚嶇О!' } ] })(<Input placeholder={''} autoComplete="off" />)} @@ -193,7 +192,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '琛ㄥ悕!' + message: '璇疯緭鍏ヨ〃鍚�!' }, { max: 50, @@ -214,7 +213,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鎺ュ彛绫诲瀷!' + message: '璇烽�夋嫨鎺ュ彛绫诲瀷!' }, ] })( @@ -254,7 +253,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鍐呴儴鍑芥暟!' + message: '璇疯緭鍏ュ唴閮ㄥ嚱鏁�!' }, ...innerRules ] @@ -268,7 +267,7 @@ rules: [ { required: setting.sysInterface !== 'true' ? true : false, - message: this.props.dict['form.required.input'] + '鎺ュ彛鍦板潃!' + message: '璇疯緭鍏ユ帴鍙e湴鍧�!' } ] })(<TextArea rows={2} readOnly={setting.sysInterface === 'true'}/>)} @@ -304,7 +303,7 @@ rules: [ { required: setting.execute !== 'false' ? true : false, - message: this.props.dict['form.required.input'] + '鏁版嵁婧�!' + message: '璇疯緭鍏ユ暟鎹簮!' } ] })(<CodeMirror />)} @@ -349,7 +348,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '榛樿鎺掑簭!' + message: '璇疯緭鍏ラ粯璁ゆ帓搴�!' } ] })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" />)} @@ -378,7 +377,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '涓婄骇缁勪欢!' + message: '璇烽�夋嫨涓婄骇缁勪欢!' } ] })( @@ -410,7 +409,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '姣忛〉鏁伴噺!' + message: '璇疯緭鍏ユ瘡椤垫暟閲�!' } ] })(<InputNumber min={1} max={500} precision={0} />)} diff --git a/src/menu/modalconfig/index.jsx b/src/menu/modalconfig/index.jsx index abc8389..6b1c9ae 100644 --- a/src/menu/modalconfig/index.jsx +++ b/src/menu/modalconfig/index.jsx @@ -9,8 +9,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getModalForm } from '@/templates/zshare/formconfig' import SourceElement from '@/templates/modalconfig/dragelement/source' @@ -22,7 +20,6 @@ const { Panel } = Collapse const { confirm } = Modal -const CommonDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform')) const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent')) const DragElement = asyncComponent(() => import('@/templates/modalconfig/dragelement')) @@ -36,7 +33,6 @@ } state = { - dict: CommonDict, // 瀛楀吀 config: null, // 椤甸潰閰嶇疆锛屽寘鎷ā鏉跨被鍨嬨�佹ā鎬佹璁剧疆銆佹坊鍔犺〃鍚嶃�佽〃鍗曞垪琛� visible: false, // 琛ㄥ崟缂栬緫妯℃�佹锛屾樉绀烘帶鍒� formlist: null, // 琛ㄥ崟缂栬緫妯℃�佹锛屽彲缂栬緫瀛楁 @@ -479,14 +475,14 @@ } render () { - const { config, dict, saving } = this.state + const { config, saving } = this.state return ( <div className="modal-form-board"> <DndProvider backend={HTML5Backend}> <div className="tools"> <Collapse accordion defaultActiveKey="1" bordered={false}> - <Panel header={dict['header.menu.form']} key="1"> + <Panel header="琛ㄥ崟" key="1"> <div className="search-element"> {SearchItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) @@ -500,7 +496,7 @@ <Card title="琛ㄥ崟閰嶇疆" bordered={false} extra={ <div> <Button type="danger" onClick={this.clearConfig}>娓呯┖</Button> - <EditComponent dict={dict} options={['form']} config={this.state.config} plusFields={this.plusFields}/> + <EditComponent options={['form']} config={this.state.config} plusFields={this.plusFields}/> <Button type="primary" id="save-modal-config" loading={saving} onClick={this.submitConfig}>淇濆瓨</Button> <Button onClick={this.cancelConfig}>杩斿洖</Button> </div> @@ -513,7 +509,7 @@ <Button className="mk-cols-change" onClick={() => this.changecols(2)}>2鍒�</Button> <Button className="mk-cols-change" onClick={() => this.changecols(3)}>3鍒�</Button> <Button className="mk-cols-change" onClick={() => this.changecols(4)}>4鍒�</Button> - <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> + <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> </div> <div className="ant-modal-body"> <div className="modal-form"> @@ -521,7 +517,6 @@ list={config.fields} setting={config.setting} showField={this.state.showField} - placeholder={this.state.dict['header.form.modal.placeholder']} handleList={this.handleList} handleForm={this.handleForm} closeForm={this.closeForm} @@ -531,10 +526,10 @@ <div className="ant-modal-footer"> <div> <button type="button" className="ant-btn"> - <span>{this.state.dict['model.cancel']}</span> + <span>鍙栨秷</span> </button> <button type="button" className="ant-btn ant-btn-primary"> - <span>{this.state.dict['model.confirm']}</span> + <span>纭畾</span> </button> </div> <div className="action-mask"></div> @@ -544,7 +539,7 @@ </div> </DndProvider> <Modal - title={this.state.dict['model.edit']} + title="缂栬緫" visible={this.state.visible} width={950} maskClosable={false} @@ -554,7 +549,6 @@ destroyOnClose > <ModalForm - dict={this.state.dict} card={this.state.card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} @@ -563,7 +557,7 @@ /> </Modal> <Modal - title={this.state.dict['model.edit']} + title="缂栬緫" visible={this.state.settingVisible} width={850} maskClosable={false} @@ -573,7 +567,6 @@ > <SettingForm config={config} - dict={this.state.dict} isSubTab={!!this.props.editTab} inputSubmit={this.settingSave} wrappedComponentRef={(inst) => this.settingRef = inst} diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx index 074d4f1..9d11f70 100644 --- a/src/menu/pastecontroller/index.jsx +++ b/src/menu/pastecontroller/index.jsx @@ -25,7 +25,7 @@ if (item.type === 'tabs') { uuids[item.uuid] = MenuUtils.getuuid() item.uuid = uuids[item.uuid] - item.setting.name = item.setting.name + MenuUtils.getdataName().toUpperCase().substr(-4) + item.setting.name = item.setting.name + MenuUtils.getSignName() item.name = item.setting.name item.subtabs.forEach(tab => { @@ -48,7 +48,7 @@ } else if (item.type === 'group') { uuids[item.uuid] = MenuUtils.getuuid() item.uuid = uuids[item.uuid] - item.setting.name = item.setting.name + MenuUtils.getdataName().toUpperCase().substr(-4) + item.setting.name = item.setting.name + MenuUtils.getSignName() item.name = item.setting.name item.components = item.components.map(cell => { diff --git a/src/mob/components/official/index.jsx b/src/mob/components/official/index.jsx index 65e1ebd..dc25062 100644 --- a/src/mob/components/official/index.jsx +++ b/src/mob/components/official/index.jsx @@ -4,8 +4,6 @@ import { Popover } from 'antd' import { ToolOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { resetStyle } from '@/utils/utils-custom.js' import asyncIconComponent from '@/utils/asyncIconComponent' import getWrapForm from './options' @@ -22,10 +20,7 @@ deletecomponent: PropTypes.func } - state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, - visible: false, // 妯℃�佹鎺у埗 - } + state = {} /** * @description 鎼滅储鏉′欢鍒濆鍖� diff --git a/src/mob/components/search/single-search/index.jsx b/src/mob/components/search/single-search/index.jsx index 11a0f10..95feec1 100644 --- a/src/mob/components/search/single-search/index.jsx +++ b/src/mob/components/search/single-search/index.jsx @@ -4,8 +4,6 @@ import { Popover, Input, Button } from 'antd' import { ToolOutlined, ScanOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined, SearchOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { resetStyle } from '@/utils/utils-custom.js' import asyncIconComponent from '@/utils/asyncIconComponent' import getWrapForm from './options' @@ -21,13 +19,7 @@ deletecomponent: PropTypes.func } - state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, - sqlVerifing: false, // sql楠岃瘉涓� - visible: false, // 妯℃�佹鎺у埗 - showField: false, - editcard: null // 缂栬緫涓厓绱� - } + state = {} /** * @description 鎼滅储鏉′欢鍒濆鍖� diff --git a/src/mob/modalconfig/index.jsx b/src/mob/modalconfig/index.jsx index 2476590..ca395cc 100644 --- a/src/mob/modalconfig/index.jsx +++ b/src/mob/modalconfig/index.jsx @@ -9,8 +9,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getModalForm } from '@/templates/zshare/formconfig' import SourceElement from '@/templates/modalconfig/dragelement/source' @@ -22,7 +20,6 @@ const { Panel } = Collapse const { confirm } = Modal -const CommonDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS const PasteComponent = asyncComponent(() => import('./pastecomponent')) const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform')) const DragElement = asyncComponent(() => import('@/mob/components/formdragelement')) @@ -36,7 +33,6 @@ } state = { - dict: CommonDict, // 瀛楀吀 config: null, // 椤甸潰閰嶇疆锛屽寘鎷ā鏉跨被鍨嬨�佹ā鎬佹璁剧疆銆佹坊鍔犺〃鍚嶃�佽〃鍗曞垪琛� visible: false, // 琛ㄥ崟缂栬緫妯℃�佹锛屾樉绀烘帶鍒� formlist: null, // 琛ㄥ崟缂栬緫妯℃�佹锛屽彲缂栬緫瀛楁 @@ -443,14 +439,14 @@ render () { const { btn } = this.props - const { config, dict, saving } = this.state + const { config, saving } = this.state return ( <div className="mob-form-board"> <DndProvider backend={HTML5Backend}> <div className="tools"> <Collapse accordion defaultActiveKey="1" bordered={false}> - <Panel header={dict['header.menu.form']} key="1"> + <Panel header="琛ㄥ崟" key="1"> <div className="search-element"> {SearchItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) @@ -466,7 +462,7 @@ <Button onClick={this.cancelConfig}>杩斿洖</Button> <PasteComponent config={config} updateConfig={this.insert} /> <Button type="danger" onClick={this.clearConfig}>娓呯┖</Button> - <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> + <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> </div> <div className="setting"> <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}> @@ -480,7 +476,6 @@ list={config.fields} setting={config.setting} showField={this.state.showField} - placeholder={this.state.dict['header.form.modal.placeholder']} handleList={this.handleList} handleForm={this.handleForm} closeForm={this.closeForm} @@ -492,7 +487,7 @@ </div> </DndProvider> <Modal - title={this.state.dict['model.edit']} + title="缂栬緫" visible={this.state.visible} width={950} maskClosable={false} @@ -502,7 +497,6 @@ destroyOnClose > <ModalForm - dict={this.state.dict} card={this.state.card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} @@ -511,7 +505,7 @@ /> </Modal> <Modal - title={this.state.dict['model.edit']} + title="缂栬緫" visible={this.state.settingVisible} width={900} maskClosable={false} @@ -521,7 +515,6 @@ > <SettingForm config={config} - dict={this.state.dict} isSubTab={!!this.props.editTab} inputSubmit={this.settingSave} wrappedComponentRef={(inst) => this.settingRef = inst} diff --git a/src/mob/modalconfig/source.jsx b/src/mob/modalconfig/source.jsx index 5a1a31a..04ed6a4 100644 --- a/src/mob/modalconfig/source.jsx +++ b/src/mob/modalconfig/source.jsx @@ -1,18 +1,13 @@ -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' - -const CommonDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS - export const SearchItems = [ { type: 'form', - label: CommonDict['model.form.text'], + label: '鏂囨湰', subType: 'text', url: '' }, { type: 'form', - label: CommonDict['model.form.number'], + label: '鏁板瓧', subType: 'number', url: '' }, @@ -24,7 +19,7 @@ }, { type: 'form', - label: CommonDict['model.form.link'], + label: '鑱斿姩鑿滃崟', subType: 'link', url: '' }, @@ -66,13 +61,13 @@ }, { type: 'form', - label: CommonDict['model.form.datemonth'], + label: '鏃ユ湡锛堟湀锛�', subType: 'datemonth', url: '' }, { type: 'form', - label: CommonDict['model.form.textarea'], + label: '澶氳鏂囨湰', subType: 'textarea', url: '' }, @@ -89,7 +84,7 @@ }, { type: 'form', - label: CommonDict['header.form.funcvar'], + label: '鍑芥暟鍙橀噺', subType: 'funcvar', url: '' }, diff --git a/src/mob/searchconfig/index.jsx b/src/mob/searchconfig/index.jsx index ff9ea70..ac35cb7 100644 --- a/src/mob/searchconfig/index.jsx +++ b/src/mob/searchconfig/index.jsx @@ -9,8 +9,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getSearchForm } from '@/templates/zshare/formconfig' import SourceElement from '@/templates/modalconfig/dragelement/source' import SettingForm from './settingform' @@ -35,7 +33,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, // 瀛楀吀 config: null, // 椤甸潰閰嶇疆锛屽寘鎷ā鏉跨被鍨嬨�佹ā鎬佹璁剧疆銆佹坊鍔犺〃鍚嶃�佽〃鍗曞垪琛� visible: false, // 琛ㄥ崟缂栬緫妯℃�佹锛屾樉绀烘帶鍒� formlist: null, // 琛ㄥ崟缂栬緫妯℃�佹锛屽彲缂栬緫瀛楁 @@ -485,14 +482,14 @@ } render () { - const { dict, group, editGroup, saving } = this.state + const { group, editGroup, saving } = this.state return ( <div className="mob-search-board"> <DndProvider backend={HTML5Backend}> <div className="tools"> <Collapse accordion defaultActiveKey="1" bordered={false}> - <Panel header={dict['header.menu.form']} key="1"> + <Panel header="鎼滅储鏉′欢" key="1"> <div className="search-element"> {SearchItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) @@ -506,7 +503,7 @@ <Button onClick={this.cancelConfig}>鍏抽棴</Button> {!group.floor ? <Button onClick={this.returnUp}>杩斿洖涓婄骇</Button> : null} <PasteComponent insert={this.insert} /> - <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> + <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> </div> <div className="setting"> <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}> @@ -546,7 +543,7 @@ </div> </DndProvider> <Modal - title={this.state.dict['model.edit']} + title="缂栬緫" visible={this.state.visible} width={850} onCancel={this.editModalCancel} @@ -555,7 +552,6 @@ destroyOnClose > <SearchForm - dict={this.state.dict} card={this.state.card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} @@ -563,7 +559,7 @@ /> </Modal> <Modal - title={this.state.dict['model.edit']} + title="缂栬緫" visible={this.state.settingVisible} width={850} maskClosable={false} @@ -578,7 +574,7 @@ /> </Modal> <Modal - title={this.state.dict['model.edit']} + title="缂栬緫" visible={this.state.gVisible} width={600} maskClosable={false} diff --git a/src/pc/components/navbar/normal-navbar/linksetting/index.jsx b/src/pc/components/navbar/normal-navbar/linksetting/index.jsx index fa5449b..666593f 100644 --- a/src/pc/components/navbar/normal-navbar/linksetting/index.jsx +++ b/src/pc/components/navbar/normal-navbar/linksetting/index.jsx @@ -4,8 +4,6 @@ import { Modal } from 'antd' import { LinkOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import LinkTable from './linktable' import './index.scss' @@ -16,7 +14,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, visible: false } @@ -33,7 +30,7 @@ render () { const { config } = this.props - const { visible, dict } = this.state + const { visible } = this.state return ( <div className="model-link-setting-wrap"> @@ -44,7 +41,7 @@ visible={visible} width={950} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { this.setState({ visible: false }) }} destroyOnClose diff --git a/src/pc/components/navbar/normal-navbar/menusetting/index.jsx b/src/pc/components/navbar/normal-navbar/menusetting/index.jsx index f965b23..5bf9bd1 100644 --- a/src/pc/components/navbar/normal-navbar/menusetting/index.jsx +++ b/src/pc/components/navbar/normal-navbar/menusetting/index.jsx @@ -4,8 +4,6 @@ import { Modal } from 'antd' import { MenuOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import MenuTable from './menutable' import './index.scss' @@ -16,7 +14,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, visible: false } @@ -34,7 +31,7 @@ render () { const { config } = this.props - const { visible, dict } = this.state + const { visible } = this.state return ( <div className="model-menu-setting-wrap"> @@ -45,7 +42,7 @@ visible={visible} width={950} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { this.setState({ visible: false }) }} destroyOnClose diff --git a/src/pc/createview/index.jsx b/src/pc/createview/index.jsx index 45f3a0f..44c6198 100644 --- a/src/pc/createview/index.jsx +++ b/src/pc/createview/index.jsx @@ -4,8 +4,6 @@ import { Button, Modal, notification } from 'antd' import moment from 'moment' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import Utils from '@/utils/utils.js' import MenuUtils from '@/utils/utils-custom.js' import SettingForm from './settingform' @@ -18,7 +16,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, visible: false, loading: false } @@ -206,7 +203,7 @@ render () { const { config } = this.props - const { visible, dict, loading } = this.state + const { visible, loading } = this.state return ( <div className="create-view"> @@ -216,14 +213,13 @@ visible={visible} width={600} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { this.setState({ visible: false }) }} confirmLoading={loading} destroyOnClose > <SettingForm - dict={dict} config={config} wrappedComponentRef={(inst) => this.verifyRef = inst} /> diff --git a/src/pc/createview/settingform/index.jsx b/src/pc/createview/settingform/index.jsx index eb82755..0405709 100644 --- a/src/pc/createview/settingform/index.jsx +++ b/src/pc/createview/settingform/index.jsx @@ -1,15 +1,10 @@ import React, {Component} from 'react' -import PropTypes from 'prop-types' import { Form, Row, Col, Select, Input, Tooltip, Radio } from 'antd' import { QuestionCircleOutlined } from '@ant-design/icons' import './index.scss' class SettingForm extends Component { - static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� - } - state = { appMenus: [], copymenuId: '' @@ -76,7 +71,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鑿滃崟鍚嶇О!' + message: '璇疯緭鍏ヨ彍鍗曞悕绉�!' } ] })(<Input placeholder="" autoComplete="off" />)} @@ -89,7 +84,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鑿滃崟鍙傛暟!' + message: '璇疯緭鍏ヨ彍鍗曞弬鏁�!' } ] })(<Input placeholder="" autoComplete="off" />)} diff --git a/src/pc/quotecomponent/index.jsx b/src/pc/quotecomponent/index.jsx index 7c35ea5..11a7a0e 100644 --- a/src/pc/quotecomponent/index.jsx +++ b/src/pc/quotecomponent/index.jsx @@ -3,8 +3,6 @@ import { is, fromJS } from 'immutable' import { Button, Modal, notification } from 'antd' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import SettingForm from './settingform' import Api from '@/api' import './index.scss' @@ -16,7 +14,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, visible: false, } @@ -100,7 +97,7 @@ render () { const { config } = this.props - const { visible, dict } = this.state + const { visible } = this.state return ( <div className="quote-wrap"> @@ -110,13 +107,12 @@ visible={visible} width={500} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { this.setState({ visible: false }) }} destroyOnClose > <SettingForm - dict={dict} config={config} wrappedComponentRef={(inst) => this.verifyRef = inst} /> diff --git a/src/pc/quotecomponent/settingform/index.jsx b/src/pc/quotecomponent/settingform/index.jsx index 4f7b578..14f2f3e 100644 --- a/src/pc/quotecomponent/settingform/index.jsx +++ b/src/pc/quotecomponent/settingform/index.jsx @@ -1,12 +1,7 @@ import React, {Component} from 'react' -import PropTypes from 'prop-types' import { Form, Row, Col, Select } from 'antd' class SettingForm extends Component { - static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� - } - state = { appMenus: [] } diff --git a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx index 01f08c0..af7f8d7 100644 --- a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx +++ b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx @@ -197,6 +197,13 @@ sessionStorage.setItem('organization', res.organization || '') sessionStorage.setItem('mk_user_type', res.mk_user_type || '') sessionStorage.setItem('localRole_id', res.role_id || '') + + if (res.paas_externalDatabase) { + sessionStorage.setItem('externalDatabase', res.paas_externalDatabase) + window.GLOB.externalDatabase = `[${res.paas_externalDatabase}]..` + } else { + sessionStorage.removeItem('externalDatabase') + } sessionStorage.removeItem('CloudAvatar') sessionStorage.removeItem('cloudDataM') diff --git a/src/tabviews/zshare/settingcomponent/editTable/index.jsx b/src/tabviews/zshare/settingcomponent/editTable/index.jsx index 818744c..4596721 100644 --- a/src/tabviews/zshare/settingcomponent/editTable/index.jsx +++ b/src/tabviews/zshare/settingcomponent/editTable/index.jsx @@ -3,11 +3,8 @@ import { Table, Form, Select, Cascader } from 'antd' import { EditOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import './index.scss' -let eTDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS const EditableContext = React.createContext() const shortkeycode = { 65: 'A', 66: 'B', 67: 'C', 68: 'D', 69: 'E', 70: 'F', 71: 'G', 72: 'H', 73: 'I', 74: 'J', 75: 'K', 76: 'L', 77: 'M', @@ -103,11 +100,11 @@ <EditableContext.Consumer> {form => ( <span onClick={() => this.save(form, record.uuid)} style={{ marginRight: 8 , color: '#1890ff', cursor: 'pointer'}}> - {eTDict['model.save']} + 淇濆瓨 </span> )} </EditableContext.Consumer> - <span style={{ color: '#1890ff', cursor: 'pointer'}} onClick={() => this.cancel(record.uuid)}>{eTDict['model.cancel']}</span> + <span style={{ color: '#1890ff', cursor: 'pointer'}} onClick={() => this.cancel(record.uuid)}>鍙栨秷</span> </div> ) : ( <div className={'edit-operation-btn' + (editingKey !== '' ? ' disabled' : '')} style={{minWidth: '110px'}}> @@ -141,11 +138,11 @@ <EditableContext.Consumer> {form => ( <span onClick={() => this.save(form, record.uuid, record.parentId)} style={{ marginRight: 8 , color: '#1890ff', cursor: 'pointer'}}> - {eTDict['model.save']} + 淇濆瓨 </span> )} </EditableContext.Consumer> - <span style={{ color: '#1890ff', cursor: 'pointer'}} onClick={() => this.cancel(record.uuid)}>{eTDict['model.cancel']}</span> + <span style={{ color: '#1890ff', cursor: 'pointer'}} onClick={() => this.cancel(record.uuid)}>鍙栨秷</span> </div> ) : ( <div className={'edit-operation-btn' + (editingKey !== '' ? ' disabled' : '')} style={{minWidth: '110px'}}> diff --git a/src/templates/calendarconfig/calcomponent/calendarform/index.jsx b/src/templates/calendarconfig/calcomponent/calendarform/index.jsx index 6ee2fa0..2d1f32a 100644 --- a/src/templates/calendarconfig/calcomponent/calendarform/index.jsx +++ b/src/templates/calendarconfig/calcomponent/calendarform/index.jsx @@ -7,7 +7,6 @@ class MainTab extends Component { static propTpyes = { config: PropTypes.object, // 椤甸潰閰嶇疆 - dict: PropTypes.object, // 瀛楀吀椤� calendar: PropTypes.any // 鏃ュ巻閰嶇疆淇℃伅 } @@ -41,13 +40,13 @@ <Form {...formItemLayout}> <Row gutter={24}> <Col span={24}> - <Form.Item label={'寮�濮嬫椂闂�'}> + <Form.Item label="寮�濮嬫椂闂�"> {getFieldDecorator('startfield', { initialValue: calendar.startfield, rules: [ { required: true, - message: this.props.dict['form.required.select'] + '寮�濮嬫椂闂�!' + message: '璇烽�夋嫨寮�濮嬫椂闂�!' } ] })( @@ -60,13 +59,13 @@ </Form.Item> </Col> <Col span={24}> - <Form.Item label={'缁撴潫鏃堕棿'}> + <Form.Item label="缁撴潫鏃堕棿"> {getFieldDecorator('endfield', { initialValue: calendar.endfield, rules: [ { required: true, - message: this.props.dict['form.required.select'] + '缁撴潫鏃堕棿!' + message: '璇烽�夋嫨缁撴潫鏃堕棿!' } ] })( @@ -79,13 +78,13 @@ </Form.Item> </Col> <Col span={24}> - <Form.Item label={'淇℃伅瀛楁'}> + <Form.Item label="淇℃伅瀛楁"> {getFieldDecorator('remarkfield', { initialValue: calendar.remarkfield, rules: [ { required: true, - message: this.props.dict['form.required.select'] + '淇℃伅瀛楁!' + message: '璇烽�夋嫨淇℃伅瀛楁!' } ] })( @@ -98,13 +97,13 @@ </Form.Item> </Col> <Col span={24}> - <Form.Item label={'棰滆壊瀛楁'}> + <Form.Item label="棰滆壊瀛楁"> {getFieldDecorator('colorfield', { initialValue: calendar.colorfield, rules: [ { required: false, - message: this.props.dict['form.required.select'] + '棰滆壊瀛楁!' + message: '璇烽�夋嫨棰滆壊瀛楁!' } ] })( @@ -117,13 +116,13 @@ </Form.Item> </Col> <Col span={24}> - <Form.Item label={'鏃ュ巻绛夌骇'}> + <Form.Item label="鏃ュ巻绛夌骇"> {getFieldDecorator('levels', { initialValue: calendar.levels, rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鏃ュ巻绛夌骇!' + message: '璇烽�夋嫨鏃ュ巻绛夌骇!' } ] })( diff --git a/src/templates/calendarconfig/calcomponent/index.jsx b/src/templates/calendarconfig/calcomponent/index.jsx index fd2343c..4a475c3 100644 --- a/src/templates/calendarconfig/calcomponent/index.jsx +++ b/src/templates/calendarconfig/calcomponent/index.jsx @@ -4,8 +4,6 @@ import { Modal } from 'antd' import { EditOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import CalendarForm from './calendarform' import './index.scss' @@ -17,7 +15,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, calendar: null, // 鏃ュ巻璁剧疆 visible: false, // 妯℃�佹鎺у埗 } @@ -66,7 +63,7 @@ render() { const { config } = this.props - const { dict, visible, calendar } = this.state + const { visible, calendar } = this.state return ( <div className="model-calendar-setting"> @@ -83,7 +80,6 @@ destroyOnClose > <CalendarForm - dict={dict} config={config} calendar={calendar} wrappedComponentRef={(inst) => this.calendarRef = inst} diff --git a/src/templates/calendarconfig/index.jsx b/src/templates/calendarconfig/index.jsx index 272e505..72e72cb 100644 --- a/src/templates/calendarconfig/index.jsx +++ b/src/templates/calendarconfig/index.jsx @@ -8,8 +8,6 @@ import moment from 'moment' import Api from '@/api' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' @@ -41,7 +39,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, // 瀛楀吀 config: null, // 椤甸潰閰嶇疆 visible: false, // 鎼滅储鏉′欢銆佹寜閽�佹樉绀哄垪锛屾ā鎬佹鏄剧ず鎺у埗 fields: null, // 鎼滅储鏉′欢鍙婃樉绀哄垪锛屽彲閫夊瓧娈� @@ -310,7 +307,7 @@ if (!_config.fstMenuId || !_config.ParentId || !_config.MenuName || !_config.MenuNo) { notification.warning({ top: 92, - message: this.state.dict['model.menu.basemsg'], + message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒', duration: 5 }) this.setState({activeKey: '0'}) @@ -568,7 +565,7 @@ if (config.isAdd) { // 鏂板缓鑿滃崟锛屾彁绀鸿彍鍗曞皻鏈繚瀛� notification.warning({ top: 92, - message: this.state.dict['header.menu.config.notsave'], + message: '鑿滃崟灏氭湭淇濆瓨锛岃鍏堜繚瀛樿彍鍗曢厤缃紒', duration: 5 }) } else { @@ -576,7 +573,7 @@ if (!config.fstMenuId || !config.ParentId || !config.MenuName || !config.MenuNo) { notification.warning({ top: 92, - message: this.state.dict['model.menu.basemsg'], + message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒', duration: 5 }) this.setState({activeKey: '0'}) @@ -586,7 +583,7 @@ if (!is(fromJS(originMenu), fromJS(config))) { // 鑿滃崟淇℃伅鍙樺寲鏃讹紝鎻愮ず淇濆瓨 notification.warning({ top: 92, - message: this.state.dict['header.menu.config.update'], + message: '鑿滃崟閰嶇疆宸蹭慨鏀癸紝璇蜂繚瀛橈紒', duration: 5 }) return @@ -774,12 +771,11 @@ <div className="tools"> <Collapse accordion activeKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}> {/* 鍩烘湰淇℃伅 */} - <Panel forceRender={true} header={'鏍囩鍩烘湰淇℃伅'} key="0" id="subtable-basedata"> + <Panel forceRender={true} header="鍩烘湰淇℃伅" key="0" id="subtable-basedata"> {/* 鑿滃崟淇℃伅 */} <MenuForm menu={menu} config={config} - dict={this.state.dict} updatemenu={this.updateconfig} /> {config ? <UrlFieldComponent @@ -794,7 +790,7 @@ /> </Panel> {/* 鎼滅储鏉′欢娣诲姞 */} - <Panel header={this.state.dict['header.menu.search']} key="1"> + <Panel header="鎼滅储" key="1"> <div className="search-element"> {Source.searchItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) @@ -812,9 +808,9 @@ </div> } bordered={false} extra={ <div> - <EditComponent dict={this.state.dict} type="table" options={['search', 'form']} config={this.state.config}/> + <EditComponent type="table" options={['search', 'form']} config={this.state.config}/> <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={this.state.config.enabled} onChange={this.onEnabledChange} /> - <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button> + <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>淇濆瓨</Button> <Button onClick={this.cancelConfig}>鍏抽棴</Button> </div> } style={{ width: '100%' }}> @@ -845,13 +841,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> {this.state.loading && <Spin size="large" />} </div> diff --git a/src/templates/calendarconfig/source.jsx b/src/templates/calendarconfig/source.jsx index 0cec963..8e500d9 100644 --- a/src/templates/calendarconfig/source.jsx +++ b/src/templates/calendarconfig/source.jsx @@ -1,8 +1,4 @@ import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' - -const CommonDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS class CalendarBaseData { baseConfig = { @@ -76,25 +72,25 @@ searchItems = [ { type: 'search', - label: CommonDict['model.form.text'], + label: '鏂囨湰', subType: 'text', url: '' }, { type: 'search', - label: CommonDict['model.form.select'], + label: '涓嬫媺閫夋嫨', subType: 'select', url: '' }, { type: 'search', - label: CommonDict['model.form.multiselect'], + label: '涓嬫媺澶氶��', subType: 'multiselect', url: '' }, { type: 'search', - label: CommonDict['model.form.link'], + label: '鑱斿姩鑿滃崟', subType: 'link', url: '' }, @@ -118,19 +114,19 @@ }, { type: 'search', - label: CommonDict['model.form.datemonth'], + label: '鏃ユ湡锛堟湀锛�', subType: 'datemonth', url: '' }, { type: 'search', - label: CommonDict['model.form.daterange'], + label: '鏃ユ湡锛堝尯闂达級', subType: 'daterange', url: '' }, { type: 'search', - label: CommonDict['model.form.dategroup'], + label: '鏃ユ湡锛堢粍鍚堬級', subType: 'group', url: '' } diff --git a/src/templates/calendarconfig/tabcomponent/index.jsx b/src/templates/calendarconfig/tabcomponent/index.jsx index 42ad0cf..f85bba9 100644 --- a/src/templates/calendarconfig/tabcomponent/index.jsx +++ b/src/templates/calendarconfig/tabcomponent/index.jsx @@ -4,8 +4,6 @@ import { Modal } from 'antd' import { EditOutlined, CloseOutlined, PlusOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getTabForm } from '@/templates/zshare/formconfig' import TabForm from './tabform' import './index.scss' @@ -21,7 +19,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, menu: null, // 鑿滃崟淇℃伅 formlist: null, // 琛ㄥ崟淇℃伅 visible: false // 妯℃�佹鎺у埗 @@ -83,7 +80,7 @@ render() { const { tabviews, config } = this.props - const { dict, visible } = this.state + const { visible } = this.state return ( <div className="model-calendar-tab"> @@ -95,7 +92,7 @@ {/* 璁剧疆鍏ㄥ眬閰嶇疆鍙婂垪琛ㄦ暟鎹簮 */} <Modal wrapClassName="model-calendar-tab-modal" - title={dict['model.edit']} + title="缂栬緫" visible={visible} width={700} maskClosable={false} @@ -105,7 +102,6 @@ > <TabForm tabs={tabviews} - dict={dict} inputSubmit={this.tabSave} formlist={this.state.formlist} wrappedComponentRef={(inst) => this.tabRef = inst} diff --git a/src/templates/calendarconfig/tabcomponent/tabform/index.jsx b/src/templates/calendarconfig/tabcomponent/tabform/index.jsx index b91c74c..0584c22 100644 --- a/src/templates/calendarconfig/tabcomponent/tabform/index.jsx +++ b/src/templates/calendarconfig/tabcomponent/tabform/index.jsx @@ -10,7 +10,6 @@ class MainTab extends Component { static propTpyes = { tabs: PropTypes.array, // 鍙叧鑱旀爣绛鹃泦 - dict: PropTypes.object, // 瀛楀吀椤� formlist: PropTypes.any, // 琛ㄥ崟 inputSubmit: PropTypes.any // 鍥炶溅鎻愪氦浜嬩欢 } @@ -113,7 +112,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' }, { max: formRule.input.max, @@ -134,7 +133,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -167,7 +166,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index f536dba..6717638 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -11,8 +11,6 @@ import Utils from '@/utils/utils.js' import MKEmitter from '@/utils/events.js' import { updateCommonTable } from '@/utils/utils-update.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import asyncComponent from '@/utils/asyncComponent' import SearchComponent from '@/templates/sharecomponent/searchcomponent' @@ -48,7 +46,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, config: null, // 椤甸潰閰嶇疆 formlist: null, // 鎼滅储鏉′欢銆佹寜閽�佹樉绀哄垪琛ㄥ崟瀛楁 menuloading: false, // 鑿滃崟淇濆瓨涓� @@ -299,7 +296,7 @@ if (!_config.fstMenuId || !_config.ParentId || !_config.MenuName || !_config.MenuNo) { notification.warning({ top: 92, - message: this.state.dict['model.menu.basemsg'], + message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒', duration: 5 }) this.setState({activeKey: '0'}) @@ -779,14 +776,14 @@ if (config.isAdd) { // 鏂板缓鑿滃崟锛屾彁绀鸿彍鍗曞皻鏈繚瀛� notification.warning({ top: 92, - message: this.state.dict['header.menu.config.notsave'], + message: '鑿滃崟灏氭湭淇濆瓨锛岃鍏堜繚瀛樿彍鍗曢厤缃紒', duration: 5 }) } else { if (!is(fromJS(originMenu), fromJS(config))) { // 鑿滃崟淇℃伅鍙樺寲鏃讹紝鎻愮ず淇濆瓨 notification.warning({ top: 92, - message: this.state.dict['header.menu.config.update'], + message: '鑿滃崟閰嶇疆宸蹭慨鏀癸紝璇蜂繚瀛橈紒', duration: 5 }) return @@ -1165,12 +1162,11 @@ <div className="tools"> <Collapse accordion activeKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}> {/* 鍩烘湰淇℃伅 */} - <Panel forceRender={true} header={this.state.dict['header.menu.basedata']} key="0" id="main-basedata"> + <Panel forceRender={true} header="鍩烘湰淇℃伅" key="0" id="main-basedata"> {/* 鑿滃崟淇℃伅 */} <MenuForm menu={menu} config={config} - dict={this.state.dict} updatemenu={this.updateconfig} /> {config ? <UrlFieldComponent @@ -1185,14 +1181,14 @@ /> </Panel> {/* 鎼滅储鏉′欢娣诲姞 */} - <Panel header={this.state.dict['header.menu.search']} key="1"> + <Panel header="鎼滅储" key="1"> <div className="search-element"> {Source.searchItems.map((item, index) => (<SourceElement key={index} content={item}/>))} </div> <FieldsComponent config={config} type="search" /> </Panel> {/* 鎸夐挳娣诲姞 */} - <Panel header={this.state.dict['header.menu.action']} key="2"> + <Panel header="鎸夐挳" key="2"> <div className="search-element"> {Source.actionItems.map((item, index) => (<SourceElement key={index} content={item}/>))} </div> @@ -1220,14 +1216,14 @@ })} </Panel> {/* 娣诲姞鏄剧ず鍒� */} - <Panel header={this.state.dict['header.menu.column']} key="3"> + <Panel header="鏄剧ず鍒�" key="3"> <div className="search-element"> {Source.columnItems.map((item, index) => (<SourceElement key={index} content={item}/>))} </div> <FieldsComponent config={config} type="columns"/> </Panel> {/* 娣诲姞鏍囩 */} - <Panel header={this.state.dict['header.menu.tab']} key="4"> + <Panel header="鏍囩椤�" key="4"> <div className="search-element"> {Source.tabItems.map((item, index) => (<SourceElement key={index} content={item}/>))} </div> @@ -1265,9 +1261,9 @@ <Unattended config={config} updateConfig={this.updateconfig}/> <Versions MenuId={menu.MenuID} open_edition={openEdition} updateConfig={this.refreshConfig}/> <ReplaceField type="table" config={config} updateConfig={this.updateconfig}/> - <EditComponent dict={this.state.dict} type="table" options={['search', 'form', 'action', 'columns']} config={this.state.config} MenuID={this.props.menu.MenuID} thawButtons={this.state.thawButtons} refresh={this.editConfig}/> - <Switch className="big" checkedChildren={this.state.dict['model.enable']} unCheckedChildren={this.state.dict['model.disable']} checked={this.state.config.enabled} onChange={this.onEnabledChange} /> - <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button> + <EditComponent type="table" options={['search', 'form', 'action', 'columns']} config={this.state.config} MenuID={this.props.menu.MenuID} thawButtons={this.state.thawButtons} refresh={this.editConfig}/> + <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={this.state.config.enabled} onChange={this.onEnabledChange} /> + <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>淇濆瓨</Button> <Button onClick={this.cancelConfig}>鍏抽棴</Button> </div> } style={{ width: '100%' }}> @@ -1363,13 +1359,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="notsave" className="mk-btn mk-yellow" onClick={this.notsave}>{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="notsave" className="mk-btn mk-yellow" onClick={this.notsave}>涓嶄繚瀛�</Button>, + <Button key="cancel" onClick={() => { this.setState({closeVisible: false}) }}>鍙栨秷</Button> ]} destroyOnClose > - {this.state.dict['header.menu.config.placeholder']} + 閰嶇疆宸蹭慨鏀癸紝鏄惁淇濆瓨閰嶇疆淇℃伅锛� </Modal> {this.state.loading && <Spin size="large" />} </div> diff --git a/src/templates/comtableconfig/menuform/index.jsx b/src/templates/comtableconfig/menuform/index.jsx index cbf66a2..eaa5f4d 100644 --- a/src/templates/comtableconfig/menuform/index.jsx +++ b/src/templates/comtableconfig/menuform/index.jsx @@ -9,7 +9,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� menu: PropTypes.object, config: PropTypes.object, updatemenu: PropTypes.func @@ -95,7 +94,7 @@ } render() { - const { dict, menu, config } = this.props + const { menu, config } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -112,13 +111,13 @@ <Form {...formItemLayout} className="comtable-menu-form" id="subqazxcvbn"> <Row gutter={24}> <Col span={24}> - <Form.Item label={dict['model.menu.level1']}> + <Form.Item label="涓�绾ц彍鍗�"> {getFieldDecorator('fstMenuId', { initialValue: menu.fstMenuId, rules: [ { required: true, - message: dict['form.required.select'] + dict['model.menu.level1'] + '!' + message: '璇烽�夋嫨涓�绾ц彍鍗�!' } ] })( @@ -133,13 +132,13 @@ </Form.Item> </Col> <Col span={24}> - <Form.Item label={dict['model.menu.level2']}> + <Form.Item label="浜岀骇鑿滃崟"> {getFieldDecorator('ParentId', { initialValue: menu.ParentId, rules: [ { required: true, - message: dict['form.required.select'] + dict['model.menu.level2'] + '!' + message: '璇烽�夋嫨浜岀骇鑿滃崟!' } ] })( @@ -154,13 +153,13 @@ </Form.Item> </Col> <Col span={24}> - <Form.Item label={dict['model.menu'] + dict['model.name']}> + <Form.Item label="鑿滃崟鍚嶇О"> {getFieldDecorator('MenuName', { initialValue: menu.MenuName, rules: [ { required: true, - message: dict['form.required.input'] + dict['model.menu'] + dict['model.name'] + '!' + message: '璇疯緭鍏ヨ彍鍗曞悕绉�!' }, { max: formRule.input.max, @@ -171,13 +170,13 @@ </Form.Item> </Col> <Col span={24}> - <Form.Item label={dict['model.menu'] + dict['model.param']}> + <Form.Item label="鑿滃崟鍙傛暟"> {getFieldDecorator('MenuNo', { initialValue: menu.MenuNo, rules: [ { required: true, - message: dict['form.required.input'] + dict['model.menu'] + dict['model.param'] + '!' + message: '璇疯緭鍏ヨ彍鍗曞弬鏁�!' }, { max: formRule.input.max, @@ -188,20 +187,19 @@ </Form.Item> </Col> <Col span={24}> - <Form.Item label={dict['model.openway']}> + <Form.Item label="鎵撳紑鏂瑰紡"> {getFieldDecorator('opentype', { initialValue: menu.PageParam ? menu.PageParam.OpenType : 'newtab', rules: [ { required: true, - message: dict['form.required.select'] + dict['model.openway'] + '!' + message: '璇烽�夋嫨鎵撳紑鏂瑰紡!' } ] })( <Select onChange={(value) => {this.selectChange('opentype', value)}}> - <Select.Option value="newtab">{dict['model.form.tab']}</Select.Option> - <Select.Option value="newpage">{dict['model.form.newpage']}</Select.Option> - {/* <Select.Option value="currenttab">{dict['model.form.currenttab']}</Select.Option> */} + <Select.Option value="newtab">鏍囩椤�</Select.Option> + <Select.Option value="newpage">鏂伴〉闈�</Select.Option> </Select> )} </Form.Item> diff --git a/src/templates/formtabconfig/actionform/index.jsx b/src/templates/formtabconfig/actionform/index.jsx index 2c3ae5b..d275498 100644 --- a/src/templates/formtabconfig/actionform/index.jsx +++ b/src/templates/formtabconfig/actionform/index.jsx @@ -11,7 +11,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� formlist: PropTypes.any, // 琛ㄥ崟淇℃伅 card: PropTypes.any, // 鎸夐挳淇℃伅 tabs: PropTypes.array, // 鎵�鏈夋爣绛鹃〉 @@ -24,37 +23,37 @@ interType: null, // 鎺ュ彛绫诲瀷锛氬唴閮ㄣ�佸閮� insertUpdateOptions: [{ value: 'insert', - text: this.props.dict['header.form.action.insert'] + text: '娣诲姞' }, { value: 'update', - text: this.props.dict['header.form.action.update'] + text: '淇敼' }, { value: 'insertOrUpdate', text: '娣诲姞鎴栦慨鏀�' }], returnoptions: [{ // 杩斿洖鍚�-涓嶅埛鏂般�佸埛鏂伴〉闈€�佸埛鏂拌〃鏍� value: 'never', - text: this.props.dict['header.form.refresh.never'] + text: '涓嶅埛鏂�' }, { value: 'grid', - text: this.props.dict['header.form.refresh'] + text: '鍒锋柊' }], currentoptions: [{ // 涓嶈繑鍥炴椂-涓嶅埛鏂般�佸埛鏂� value: 'never', - text: this.props.dict['header.form.refresh.never'] + text: '涓嶅埛鏂�' }, { value: 'refresh', - text: this.props.dict['header.form.refresh'] + text: '鍒锋柊' }], interTypeOptions: [{ value: 'system', - text: this.props.dict['model.interface.system'] + text: '绯荤粺' }, { value: 'inner', - text: this.props.dict['model.interface.inner'] + text: '鍐呴儴' }, { value: 'outer', - text: this.props.dict['model.interface.outer'] + text: '澶栭儴' }, { value: 'custom', text: '鑷畾涔�' @@ -92,10 +91,10 @@ item.options = [ { value: 'prompt', - text: this.props.dict['model.form.prompt'] + text: '鎻愮ず妗�' }, { value: 'exec', - text: this.props.dict['model.form.exec'] + text: '鐩存帴鎵ц' } ] if (card.btnType === 'cancel') { @@ -282,7 +281,7 @@ rules: [ { required: item.readonly ? false : !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' }, ..._rules ] @@ -319,7 +318,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -351,7 +350,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -377,7 +376,7 @@ rules: [ { required: item.readonly ? false : !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<TextArea rows={4} readOnly={item.readonly}/>)} diff --git a/src/templates/formtabconfig/groupform/index.jsx b/src/templates/formtabconfig/groupform/index.jsx index 8668b3a..ed21eb8 100644 --- a/src/templates/formtabconfig/groupform/index.jsx +++ b/src/templates/formtabconfig/groupform/index.jsx @@ -8,7 +8,6 @@ class GroupForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� group: PropTypes.object, // 褰撳墠鍒嗙粍 groups: PropTypes.array, // 鎵�鏈夊垎缁� inputSubmit: PropTypes.any // 鍥炶溅鎻愪氦浜嬩欢 @@ -101,7 +100,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鍒嗙粍鍚嶇О!' + message: '璇疯緭鍏ュ垎缁勫悕绉�!' }, { max: formRule.input.max, diff --git a/src/templates/formtabconfig/index.jsx b/src/templates/formtabconfig/index.jsx index 3717e24..e32a9bf 100644 --- a/src/templates/formtabconfig/index.jsx +++ b/src/templates/formtabconfig/index.jsx @@ -8,8 +8,6 @@ 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' @@ -43,7 +41,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, // 瀛楀吀 config: null, // 椤甸潰閰嶇疆 modaltype: '', // 妯℃�佹绫诲瀷锛屾帶鍒舵ā鎬佹鏄剧ず tableColumns: [], // 琛ㄦ牸鏄剧ず鍒� @@ -142,7 +139,7 @@ { type: 'text', key: 'menuName', - label: this.state.dict['model.menu'] + this.state.dict['model.name'], + label: '鑿滃崟鍚嶇О', initVal: menu.MenuName, readonly: true }, @@ -1062,7 +1059,7 @@ }, () => { notification.warning({ top: 92, - message: this.state.dict['model.menu.basemsg'], + message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒', duration: 5 }) }) @@ -1530,16 +1527,15 @@ <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} /> </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}/>) @@ -1547,7 +1543,7 @@ </div> </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}/>) @@ -1555,7 +1551,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}/>) @@ -1593,8 +1589,8 @@ } 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} /> @@ -1617,7 +1613,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} @@ -1665,7 +1661,6 @@ destroyOnClose > <ModalForm - dict={this.state.dict} card={this.state.card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} @@ -1674,21 +1669,20 @@ </Modal> {/* 缂栬緫鎸夐挳锛氬鍒躲�佺紪杈� */} <Modal - title={this.state.dict['model.action'] + '-' + this.state.dict['model.edit']} + title="鎸夐挳缂栬緫" visible={modaltype === 'actionEdit'} 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} @@ -1702,7 +1696,7 @@ visible={this.state.profileVisible} width={'90vw'} maskClosable={false} - okText={this.state.dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { if (this.verifyRef.handleCancel) { @@ -1721,12 +1715,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} @@ -1736,14 +1729,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} @@ -1757,13 +1749,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="鍒嗙粍绠$悊" @@ -1776,7 +1768,6 @@ > <GroupForm groups={config.groups} - dict={this.state.dict} group={this.state.editgroup} inputSubmit={this.handleGroupSave} wrappedComponentRef={(inst) => this.groupRef = inst} @@ -1784,7 +1775,7 @@ </Modal> {/* 鎸夐挳閰嶇疆淇℃伅绮樿创澶嶅埗 */} <Modal - title={this.state.dict['header.form.paste']} + title="绮樿创" visible={this.state.pasteVisible} width={600} maskClosable={false} @@ -1793,7 +1784,6 @@ destroyOnClose > <PasteForm - dict={this.state.dict} wrappedComponentRef={(inst) => this.pasteFormRef = inst} inputSubmit={this.pasteSubmit} /> diff --git a/src/templates/formtabconfig/settingform/index.jsx b/src/templates/formtabconfig/settingform/index.jsx index 3d916d5..bc10e56 100644 --- a/src/templates/formtabconfig/settingform/index.jsx +++ b/src/templates/formtabconfig/settingform/index.jsx @@ -11,7 +11,6 @@ class SettingForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� menu: PropTypes.object, config: PropTypes.object, inputSubmit: PropTypes.any // 鍥炶溅鎻愪氦浜嬩欢 @@ -168,7 +167,7 @@ } render() { - const { dict, menu } = this.props + const { menu } = this.props const { getFieldDecorator } = this.props.form const { interType, setting, datatype, usefulFields } = this.state @@ -196,7 +195,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + '琛ㄥ悕!' + message: '璇疯緭鍏ヨ〃鍚�!' }, { max: 50, @@ -221,13 +220,13 @@ </Form.Item> </Col> <Col span={12}> - <Form.Item label={dict['header.menu.datasource']}> + <Form.Item label="鏁版嵁鏉ユ簮"> {getFieldDecorator('datatype', { initialValue: setting.datatype || 'query' })( <Radio.Group onChange={this.sourceChange}> - <Radio value="maintable">{dict['header.menu.maintable']}</Radio> - <Radio value="query">{dict['header.menu.query']}</Radio> + <Radio value="maintable">涓昏〃</Radio> + <Radio value="query">鏌ヨ</Radio> </Radio.Group> )} </Form.Item> @@ -240,37 +239,37 @@ </Form.Item> </Col> {datatype === 'query' ? <Col span={12}> - <Form.Item label={dict['header.form.intertype']}> + <Form.Item label="鎺ュ彛绫诲瀷"> {getFieldDecorator('interType', { initialValue: interType })( <Radio.Group onChange={this.onChange}> - <Radio value="inner">{dict['model.interface.inner']}</Radio> - <Radio value="outer">{dict['model.interface.outer']}</Radio> + <Radio value="inner">鍐呴儴</Radio> + <Radio value="outer">澶栭儴</Radio> </Radio.Group> )} </Form.Item> </Col> : null} {datatype === 'query' && interType === 'outer' ? <Col span={12}> - <Form.Item label={dict['header.form.sysInterface']}> + <Form.Item label="绯荤粺鎺ュ彛"> {getFieldDecorator('sysInterface', { initialValue: setting.sysInterface || 'false' })( <Radio.Group onChange={this.onSysChange}> - <Radio value="true">{dict['model.true']}</Radio> - <Radio value="false">{dict['model.false']}</Radio> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> </Radio.Group> )} </Form.Item> </Col> : null} {datatype === 'query' && interType === 'outer' ? <Col span={12}> - <Form.Item label={dict['header.form.interface']}> + <Form.Item label="鎺ュ彛鍦板潃"> {getFieldDecorator('interface', { initialValue: setting.sysInterface === 'true' ? (window.GLOB.mainSystemApi || '') : (setting.interface || ''), rules: [ { required: true, - message: dict['form.required.input'] + dict['header.form.interface'] + '!' + message: '璇疯緭鍏ユ帴鍙e湴鍧�!' }, { max: formRule.input.max, @@ -284,7 +283,7 @@ <Form.Item label={ <Tooltip placement="topLeft" overlayClassName="middle" title={`鍙嚜瀹氫箟鏁版嵁澶勭悊鍑芥暟锛屽嚱鏁板悕绉伴渶浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬶紱鏈缃椂浼氳皟鐢ㄧ郴缁熷嚱鏁帮紝浣跨敤绯荤粺鍑芥暟闇�瀹屽杽鏁版嵁婧愩�俙}> <QuestionCircleOutlined className="mk-form-tip" /> - {dict['header.form.innerFunc']} + 鍐呴儴鍑芥暟 </Tooltip> }> {getFieldDecorator('innerFunc', { @@ -305,7 +304,7 @@ <Form.Item help={'鏁版嵁ID锛�' + menu.MenuID} label={ <Tooltip placement="topLeft" title="浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愶紝鑷畾涔夊嚱鏁版椂锛屽彲蹇界暐銆�"> <QuestionCircleOutlined className="mk-form-tip" /> - {'鏁版嵁婧�'} + 鏁版嵁婧� </Tooltip> } className="textarea"> {getFieldDecorator('dataresource', { @@ -314,7 +313,7 @@ </Form.Item> </Col> : null} {datatype === 'query' && interType === 'outer' ? <Col span={12}> - <Form.Item label={dict['header.form.outerFunc']}> + <Form.Item label="澶栭儴鍑芥暟"> {getFieldDecorator('outerFunc', { initialValue: setting.outerFunc || '', rules: [ diff --git a/src/templates/formtabconfig/source.jsx b/src/templates/formtabconfig/source.jsx index e5ddf6c..57eeafd 100644 --- a/src/templates/formtabconfig/source.jsx +++ b/src/templates/formtabconfig/source.jsx @@ -1,8 +1,4 @@ import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' - -const CommonDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS class CommonTableBaseData { baseConfig = { @@ -164,13 +160,13 @@ actionItems = [ { type: 'action', - label: CommonDict['model.form.prompt'], + label: '鎻愮ず妗�', subType: 'prompt', url: '' }, { type: 'action', - label: CommonDict['model.form.exec'], + label: '鐩存帴鎵ц', subType: 'exec', url: '' } @@ -179,7 +175,7 @@ tabItems = [ { type: 'tabs', - label: CommonDict['model.menu.tab.subtable'], + label: '瀛愯〃', subType: 'SubTable', } ] diff --git a/src/templates/modalconfig/dragelement/index.jsx b/src/templates/modalconfig/dragelement/index.jsx index 996ca14..fcfb770 100644 --- a/src/templates/modalconfig/dragelement/index.jsx +++ b/src/templates/modalconfig/dragelement/index.jsx @@ -7,7 +7,7 @@ import Card from './card' import './index.scss' -const Container = ({list, setting, placeholder, handleList, handleForm, closeForm, showField }) => { +const Container = ({list, setting, handleList, handleForm, closeForm, showField }) => { const [cards, setCards] = useState(list) const moveCard = (id, atIndex) => { const { card, index } = findCard(id) @@ -148,7 +148,7 @@ })} {cards.length === 0 && <div className="modal-drawarea-placeholder"> - {placeholder} + 璇锋坊鍔犺〃鍗� </div> } </div> diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx index f21d14e..97c1bdd 100644 --- a/src/templates/modalconfig/index.jsx +++ b/src/templates/modalconfig/index.jsx @@ -9,8 +9,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getModalForm } from '@/templates/zshare/formconfig' import SourceElement from './dragelement/source' @@ -24,7 +22,6 @@ const { Panel } = Collapse const { confirm } = Modal -const CommonDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS const Versions = asyncComponent(() => import('@/menu/versions')) const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) @@ -51,7 +48,6 @@ state = { menu: null, // 涓婄骇鑿滃崟锛屼笁绾ц彍鍗曟垨鏍囩 - dict: CommonDict, // 瀛楀吀 config: null, // 椤甸潰閰嶇疆锛屽寘鎷ā鏉跨被鍨嬨�佹ā鎬佹璁剧疆銆佹坊鍔犺〃鍚嶃�佽〃鍗曞垪琛� visible: false, // 琛ㄥ崟缂栬緫妯℃�佹锛屾樉绀烘帶鍒� modalformlist: null, // 鍩烘湰淇℃伅琛ㄥ崟瀛楁 @@ -112,7 +108,7 @@ { type: 'text', key: 'supMenu', - label: this.state.dict['model.super'] + this.state.dict['model.menu'], + label: '涓婄骇鑿滃崟', initVal: _menu.MenuName, required: true, readonly: true @@ -751,7 +747,7 @@ render () { const { editAction } = this.props - const { config, dict, openEdition } = this.state + const { config, openEdition } = this.state if (!config) return null @@ -760,11 +756,8 @@ <DndProvider backend={HTML5Backend}> <div className="tools"> <Collapse accordion defaultActiveKey="1" bordered={false}> - <Panel forceRender={true} header={dict['header.menu.basedata']} key="0" id="modal-basedata"> - <MenuForm - dict={dict} - formlist={this.state.modalformlist} - /> + <Panel forceRender={true} header="鍩烘湰淇℃伅" key="0" id="modal-basedata"> + <MenuForm formlist={this.state.modalformlist}/> {/* 琛ㄥ悕娣诲姞 */} <TableComponent config={config} @@ -772,7 +765,7 @@ updatetable={this.updateconfig} /> </Panel> - <Panel header={dict['header.menu.form']} key="1"> + <Panel header="琛ㄥ崟" key="1"> <div className="search-element"> {SearchItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) @@ -788,9 +781,9 @@ <Button type="danger" onClick={this.clearConfig}>娓呯┖</Button> <Versions MenuId={editAction.uuid} open_edition={openEdition} updateConfig={this.refreshConfig}/> <ReplaceField type="form" config={config} updateConfig={this.updateconfig}/> - <EditComponent dict={dict} options={['form']} config={this.state.config} plusFields={this.plusFields}/> - <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>{dict['model.save']}</Button> - <Button onClick={this.cancelConfig}>{dict['model.back']}</Button> + <EditComponent options={['form']} config={this.state.config} plusFields={this.plusFields}/> + <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>淇濆瓨</Button> + <Button onClick={this.cancelConfig}>杩斿洖</Button> </div> } style={{ width: '100%' }}> <SettingOutlined onClick={this.changeSetting} /> @@ -801,7 +794,7 @@ <Button className="mk-cols-change" onClick={() => this.changecols(2)}>2鍒�</Button> <Button className="mk-cols-change" onClick={() => this.changecols(3)}>3鍒�</Button> <Button className="mk-cols-change" onClick={() => this.changecols(4)}>4鍒�</Button> - <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> + <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> </div> <div className="ant-modal-body"> <div className="modal-form"> @@ -809,7 +802,6 @@ list={config.fields} setting={config.setting} showField={this.state.showField} - placeholder={dict['header.form.modal.placeholder']} handleList={this.handleList} handleForm={this.handleForm} closeForm={this.closeForm} @@ -819,10 +811,10 @@ <div className="ant-modal-footer"> <div> <button type="button" className="ant-btn"> - <span>{dict['model.cancel']}</span> + <span>鍙栨秷</span> </button> <button type="button" className="ant-btn ant-btn-primary"> - <span>{dict['model.confirm']}</span> + <span>纭畾</span> </button> </div> <div className="action-mask"></div> @@ -832,7 +824,7 @@ </div> </DndProvider> <Modal - title={dict['model.edit']} + title="缂栬緫" visible={this.state.visible} width={950} maskClosable={false} @@ -842,7 +834,6 @@ destroyOnClose > <ModalForm - dict={dict} card={this.state.card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} @@ -851,7 +842,7 @@ /> </Modal> <Modal - title={dict['model.edit']} + title="缂栬緫" visible={this.state.settingVisible} width={900} maskClosable={false} @@ -873,13 +864,13 @@ visible={this.state.closeVisible} onCancel={() => { this.setState({closeVisible: false}) }} footer={[ - <Button key="save" className="mk-btn mk-green" loading={this.state.closeloading} onClick={this.submitConfig}>{dict['model.save']}</Button>, - <Button key="confirm" className="mk-btn mk-yellow" onClick={this.handleViewBack}>{dict['model.notsave']}</Button>, - <Button key="cancel" onClick={() => { this.setState({closeVisible: false}) }}>{dict['model.cancel']}</Button> + <Button key="save" className="mk-btn mk-green" loading={this.state.closeloading} 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 > - {dict['header.menu.config.placeholder']} + 閰嶇疆宸蹭慨鏀癸紝鏄惁淇濆瓨閰嶇疆淇℃伅锛� </Modal> <StyleController /> </div> diff --git a/src/templates/modalconfig/menuform/index.jsx b/src/templates/modalconfig/menuform/index.jsx index aa1b4bd..fd92a98 100644 --- a/src/templates/modalconfig/menuform/index.jsx +++ b/src/templates/modalconfig/menuform/index.jsx @@ -5,7 +5,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� formlist: PropTypes.array } @@ -22,7 +21,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<Input placeholder="" autoComplete="off" disabled={item.readonly} />)} @@ -38,7 +37,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( diff --git a/src/templates/modalconfig/source.jsx b/src/templates/modalconfig/source.jsx index c437d38..7c81e6e 100644 --- a/src/templates/modalconfig/source.jsx +++ b/src/templates/modalconfig/source.jsx @@ -1,8 +1,4 @@ import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' - -const CommonDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS export const BaseConfig = { type: 'Modal', @@ -76,17 +72,17 @@ export const SearchItems = [ { type: 'form', - label: CommonDict['model.form.text'], + label: '鏂囨湰', subType: 'text', }, { type: 'form', - label: CommonDict['model.form.number'], + label: '鏁板瓧', subType: 'number', }, { type: 'form', - label: CommonDict['model.form.select'], + label: '涓嬫媺閫夋嫨', subType: 'select', }, { @@ -96,12 +92,12 @@ }, { type: 'form', - label: CommonDict['model.form.multiselect'], + label: '涓嬫媺澶氶��', subType: 'multiselect', }, { type: 'form', - label: CommonDict['model.form.link'], + label: '鑱斿姩鑿滃崟', subType: 'link', }, { @@ -136,7 +132,7 @@ }, { type: 'form', - label: CommonDict['model.form.datemonth'], + label: '鏃ユ湡锛堟湀锛�', subType: 'datemonth', }, { @@ -151,7 +147,7 @@ }, { type: 'form', - label: CommonDict['model.form.color'], + label: '棰滆壊', subType: 'color', }, { @@ -161,7 +157,7 @@ }, { type: 'form', - label: CommonDict['header.form.funcvar'], + label: '鍑芥暟鍙橀噺', subType: 'funcvar', }, { diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx index 39fb5c9..74a83fb 100644 --- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx @@ -27,7 +27,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� setting: PropTypes.object, // 椤甸潰璁剧疆 formlist: PropTypes.any, // 琛ㄥ崟淇℃伅 card: PropTypes.any, // 鎸夐挳淇℃伅 @@ -39,26 +38,26 @@ formlist: null, // 琛ㄥ崟淇℃伅 requireOptions: [{ value: 'notRequired', - text: this.props.dict['header.form.notRequired'] + text: '涓嶉�夋嫨琛�' }, { value: 'requiredSgl', - text: this.props.dict['header.form.requiredSgl'] + text: '閫夋嫨鍗曡' }, { value: 'required', - text: this.props.dict['header.form.required'] + text: '閫夋嫨澶氳' }, { value: 'requiredOnce', - text: this.props.dict['header.form.requiredOnce'] + text: '澶氳鎷兼帴' }], insertUpdateOptions: [{ value: 'insert', - text: this.props.dict['header.form.action.insert'] + text: '娣诲姞' }, { value: 'update', - text: this.props.dict['header.form.action.update'] + text: '淇敼' }, { value: 'audit', - text: this.props.dict['header.form.action.audit'] + text: '瀹℃牳' }], deleteOptions: [{ value: 'LogicDelete', @@ -68,17 +67,17 @@ text: '鐗╃悊鍒犻櫎' }, { value: 'custom', - text: this.props.dict['header.form.custom'] + text: '鑷畾涔�' }], interTypeOptions: [{ value: 'system', - text: this.props.dict['model.interface.system'] + text: '绯荤粺' }, { value: 'inner', - text: this.props.dict['model.interface.inner'] + text: '鍐呴儴' }, { value: 'outer', - text: this.props.dict['model.interface.outer'] + text: '澶栭儴' }, { value: 'custom', text: '鑷畾涔�' @@ -376,18 +375,18 @@ _fieldval.intertype = 'system' _fieldval.Ot = 'notRequired' - _fieldval.label = this.props.dict['model.form.excelIn'] + _fieldval.label = '瀵煎叆Excel' _fieldval.class = 'dgreen' this.record.Ot = 'notRequired' - this.record.label = this.props.dict['model.form.excelIn'] + this.record.label = '瀵煎叆Excel' this.record.class = 'dgreen' } else if (value === 'excelOut') { _fieldval.intertype = 'system' - _fieldval.label = this.props.dict['model.form.excelOut'] + _fieldval.label = '瀵煎嚭Excel' _fieldval.class = 'dgreen' _fieldval.execSuccess = 'never' this.record.Ot = 'notRequired' - this.record.label = this.props.dict['model.form.excelOut'] + this.record.label = '瀵煎嚭Excel' this.record.class = 'dgreen' this.record.execSuccess = 'never' @@ -410,10 +409,10 @@ } if (value === 'excelIn') { - _fieldval.label = this.props.dict['model.form.excelIn'] + _fieldval.label = '瀵煎叆Excel' _fieldval.class = 'border-dgreen' } else if (value === 'excelOut') { - _fieldval.label = this.props.dict['model.form.excelOut'] + _fieldval.label = '瀵煎嚭Excel' _fieldval.class = 'dgreen' _fieldval.control = '' this.record.control = '' @@ -530,7 +529,6 @@ } getFields() { - const { dict } = this.props const { getFieldDecorator } = this.props.form const fields = [] @@ -545,7 +543,7 @@ if (item.type === 'text') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] if (item.key === 'innerFunc') { @@ -590,13 +588,13 @@ content = <Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} /> } else if (item.type === 'number') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] content = <InputNumber min={item.min} max={item.max} precision={item.precision} onPressEnter={this.handleSubmit}/> } else if (item.type === 'select') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Select @@ -614,7 +612,7 @@ </Select> } else if (item.type === 'radio') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Radio.Group onChange={(e) => {this.optionChange(item.key, e.target.value)}}> @@ -623,13 +621,13 @@ } else if (item.type === 'cascader') { initVal = item.initVal || [] rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Cascader options={item.options || []} expandTrigger="hover" placeholder=""/> } else if (item.type === 'icon') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <MkEditIcon options={['edit', 'hint', 'direction', 'normal', 'data']} allowClear/> @@ -637,7 +635,7 @@ span = 24 className = 'textarea' rules = [ - { required: item.readonly ? false : item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.readonly ? false : item.required, message: '璇疯緭鍏�' + item.label + '!' } ] content = <TextArea rows={2} readOnly={item.readonly}/> diff --git a/src/templates/sharecomponent/actioncomponent/index.jsx b/src/templates/sharecomponent/actioncomponent/index.jsx index 1f5c38c..4253f4d 100644 --- a/src/templates/sharecomponent/actioncomponent/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/index.jsx @@ -6,8 +6,6 @@ import Api from '@/api' import Utils, { FuncUtils } from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getActionForm } from '@/templates/zshare/formconfig' import asyncSpinComponent from '@/utils/asyncSpinComponent' @@ -37,7 +35,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, // 缂栬緫涓厓绱� formlist: null, // 琛ㄥ崟淇℃伅 actionlist: null, // 鎸夐挳缁� @@ -626,11 +623,10 @@ */ deleteElement = (card) => { const { config } = this.props - const { dict } = this.state let _this = this confirm({ - content: dict['model.confirm'] + dict['model.delete'] + ` - ${card.label} 锛焋, + content: `纭畾鍒犻櫎 - ${card.label} 锛焋, onOk() { let _actionlist = fromJS(_this.state.actionlist).toJS() @@ -865,14 +861,12 @@ getVerify = (card) => { const { config } = this.props - const { dict } = this.state if (!card) return null if (['pop', 'prompt', 'exec'].includes(card.OpenType)) { return <VerifyCard card={card} - dict={dict} config={config} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} @@ -880,28 +874,24 @@ } else if (card.OpenType === 'excelIn') { return <VerifyExcelIn card={card} - dict={dict} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } else if (card.OpenType === 'excelOut') { return <VerifyExcelOut card={card} - dict={dict} config={config} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } else if (card.OpenType === 'funcbutton' && card.funcType === 'print') { return <VerifyPrint card={card} - dict={dict} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } else if (card.OpenType === 'funcbutton' && card.funcType === 'megvii') { return <VerifyMegvii card={card} - dict={dict} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> @@ -910,7 +900,7 @@ render() { const { config } = this.props - const { actionlist, visible, card, dict, copying, profVisible, record } = this.state + const { actionlist, visible, card, copying, profVisible, record } = this.state return ( <div className="model-table-action-list" style={config.charts && config.charts.length > 1 ? {paddingTop: 25} : null}> @@ -925,22 +915,21 @@ /> {/* 缂栬緫鎸夐挳锛氬鍒躲�佺紪杈� */} <Modal - title={dict['model.action'] + '-' + (card && card.copyType === 'action' ? dict['model.copy'] : dict['model.edit'])} + title={'鎸夐挳-' + (card && card.copyType === 'action' ? '澶嶅埗' : '缂栬緫')} wrapClassName="model-table-action-edit-modal" visible={visible} width={920} maskClosable={false} onCancel={this.editModalCancel} footer={[ - record && ['pop', 'exec', 'prompt'].includes(record.OpenType) && record.intertype === 'system' ? <CreateInterface key="interface" dict={dict} ref="btnCreatInterface" trigger={this.btnCreatInterface}/> : null, - record && record.intertype === 'inner' ? <CreateFunc key="create" dict={dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null, - <Button key="cancel" onClick={this.editModalCancel}>{dict['model.cancel']}</Button>, - <Button key="confirm" type="primary" loading={copying} onClick={this.handleSubmit}>{dict['model.confirm']}</Button> + record && ['pop', 'exec', 'prompt'].includes(record.OpenType) && record.intertype === 'system' ? <CreateInterface key="interface" ref="btnCreatInterface" trigger={this.btnCreatInterface}/> : null, + record && record.intertype === 'inner' ? <CreateFunc key="create" ref="btnCreatFunc" trigger={this.creatFunc}/> : null, + <Button key="cancel" onClick={this.editModalCancel}>鍙栨秷</Button>, + <Button key="confirm" type="primary" loading={copying} onClick={this.handleSubmit}>纭畾</Button> ]} destroyOnClose > <ActionForm - dict={dict} card={card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} @@ -955,7 +944,7 @@ visible={profVisible} width={'90vw'} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { if (this.verifyRef.handleCancel) { diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/columnform/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/columnform/index.jsx index 4ae7e6a..a83f4a9 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/columnform/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/columnform/index.jsx @@ -5,7 +5,6 @@ class ExcelInColumn extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� columnChange: PropTypes.func // 淇敼鍑芥暟 } @@ -63,7 +62,6 @@ } render() { - const { dict } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -80,33 +78,33 @@ <Form {...formItemLayout} className="verify-form"> <Row gutter={24}> <Col span={6}> - <Form.Item label={dict['model.form.field']}> + <Form.Item label="瀛楁"> {getFieldDecorator('Column', { initialValue: '', rules: [ { required: true, - message: dict['form.required.input'] + dict['model.form.field'] + '!' + message: '璇疯緭鍏ュ瓧娈�!' } ] })(<Input placeholder="" autoComplete="off" />)} </Form.Item> </Col> <Col span={6}> - <Form.Item label={dict['model.name']}> + <Form.Item label="鍚嶇О"> {getFieldDecorator('Text', { initialValue: '', rules: [ { required: true, - message: this.props.dict['form.required.input'] + dict['model.name'] + '!' + message: '璇疯緭鍏ュ悕绉�!' } ] })(<Input placeholder="" autoComplete="off" />)} </Form.Item> </Col> <Col span={6}> - <Form.Item label={dict['model.form.type']}> + <Form.Item label="绫诲瀷"> {getFieldDecorator('type', { initialValue: 'Nvarchar(50)' })( @@ -131,25 +129,25 @@ </Form.Item> </Col> <Col span={6}> - <Form.Item label={dict['model.required']}> + <Form.Item label="蹇呭~"> {getFieldDecorator('required', { initialValue: 'true' })( <Radio.Group disabled={this.state.locked}> - <Radio value="true">{dict['model.true']}</Radio> - <Radio value="false">{dict['model.false']}</Radio> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> </Radio.Group> )} </Form.Item> </Col> <Col span={6}> - <Form.Item style={{marginBottom: 0}} label={dict['model.import']}> + <Form.Item style={{marginBottom: 0}} label="瀵煎叆"> {getFieldDecorator('import', { initialValue: 'true' })( <Radio.Group> - <Radio value="true">{dict['model.true']}</Radio> - <Radio value="false">{dict['model.false']}</Radio> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> </Radio.Group> )} </Form.Item> @@ -171,7 +169,7 @@ <Col span={6}> <Form.Item style={{marginBottom: 0}} label={' '} colon={false}> <Button onClick={this.handleConfirm} type="primary" className="mk-green"> - {dict['model.add']} + 娣诲姞 </Button> </Form.Item> </Col> diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx index 1361104..bf2bcc7 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx @@ -23,7 +23,6 @@ class VerifyCard extends Component { static propTpyes = { columns: PropTypes.array, // 鏄剧ず鍒� - dict: PropTypes.object, // 瀛楀吀椤� card: PropTypes.object, } @@ -33,7 +32,7 @@ activeKey: 'basemsg', excelColumns: [ { - title: this.props.dict['model.form.field'], + title: '瀛楁', dataIndex: 'Column', width: '14%', inputType: 'input', @@ -41,14 +40,14 @@ editable: true }, { - title: this.props.dict['model.name'], + title: '鍚嶇О', dataIndex: 'Text', width: '14%', inputType: 'input', editable: true }, { - title: this.props.dict['model.form.type'], + title: '绫诲瀷', dataIndex: 'type', width: '15%', editable: true, @@ -72,20 +71,20 @@ ] }, { - title: this.props.dict['model.required'], + title: '蹇呭~', dataIndex: 'required', width: '10%', editable: true, inputType: 'switch', - render: (text, record) => record.required === 'true' ? this.props.dict['model.true'] : this.props.dict['model.false'] + render: (text, record) => record.required === 'true' ? '鏄�' : '鍚�' }, { - title: this.props.dict['model.import'], + title: '瀵煎叆', dataIndex: 'import', width: '10%', editable: true, inputType: 'switch', - render: (text, record) => record.import !== 'false' ? this.props.dict['model.true'] : this.props.dict['model.false'] + render: (text, record) => record.import !== 'false' ? '鏄�' : '鍚�' }, { title: '鏈�灏忓��', @@ -224,11 +223,11 @@ dataIndex: 'operation', render: (text, record) => (<div style={{textAlign: 'center'}}> - <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span> - <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> + <span className="operation-btn" title="缂栬緫" onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span> + <span className="operation-btn" title="鐘舵�佸垏鎹�" onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.handleDelete(record, 'scripts') }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> @@ -758,13 +757,13 @@ <Form {...formItemLayout}> <Row gutter={24}> <Col span={8}> - <Form.Item label={this.props.dict['model.form.tablename']}> + <Form.Item label="琛ㄥ悕"> {getFieldDecorator('sheet', { initialValue: verify.sheet || '', rules: [ { required: true, - message: this.props.dict['form.required.input'] + this.props.dict['model.form.tablename'] + '!' + message: '璇疯緭鍏ヨ〃鍚�!' } ] })(<Input placeholder="" autoComplete="off" />)} @@ -799,7 +798,7 @@ {verify.columns.length ? <span className="count-tip">{verify.columns.length}</span> : null} </span> } key="excelcolumn"> - <ColumnForm dict={this.props.dict} columnChange={this.columnChange}/> + <ColumnForm columnChange={this.columnChange}/> <Button className="excel-col-add mk-green" title="娣诲姞鏄剧ず鍒楀瓧娈�" onClick={this.columnFieldInput}> 鍚屾鏄剧ず鍒� </Button> @@ -815,7 +814,7 @@ {verify.uniques.length ? <span className="count-tip">{verify.uniques.length}</span> : null} </span> } key="unique"> - <UniqueForm fields={verify.columns} dict={this.props.dict} uniqueChange={this.uniqueChange}/> + <UniqueForm fields={verify.columns} uniqueChange={this.uniqueChange}/> <EditTable actions={['edit', 'move', 'del', 'status']} data={verify.uniques} columns={uniqueColumns} onChange={this.changeUniques}/> </TabPane> : null} {card.intertype === 'system' ? <TabPane tab={ diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/uniqueform/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/uniqueform/index.jsx index bba6819..a6e9bf2 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/uniqueform/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/uniqueform/index.jsx @@ -6,7 +6,6 @@ class UniqueForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� fields: PropTypes.array, // 琛ㄥ崟瀛楁 uniqueChange: PropTypes.func // 淇敼鍑芥暟 } @@ -56,13 +55,13 @@ <Form {...formItemLayout} className="verify-form" id="verifycard1"> <Row gutter={24}> <Col span={7}> - <Form.Item label={'鍒楀悕'}> + <Form.Item label="鍒楀悕"> {getFieldDecorator('field', { initialValue: [], rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鍒楀悕!' + message: '璇烽�夋嫨鍒楀悕!' } ] })( @@ -78,13 +77,13 @@ </Form.Item> </Col> <Col span={7}> - <Form.Item label={'鎶ラ敊缂栫爜'}> + <Form.Item label="鎶ラ敊缂栫爜"> {getFieldDecorator('errorCode', { initialValue: 'E', rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鎶ラ敊缂栫爜!' + message: '璇烽�夋嫨鎶ラ敊缂栫爜!' } ] })( @@ -98,13 +97,13 @@ </Form.Item> </Col> <Col span={7}> - <Form.Item label={'楠岃瘉绫诲瀷'}> + <Form.Item label="楠岃瘉绫诲瀷"> {getFieldDecorator('verifyType', { initialValue: 'physical', rules: [ { required: true, - message: this.props.dict['form.required.select'] + '楠岃瘉绫诲瀷!' + message: '璇烽�夋嫨楠岃瘉绫诲瀷!' } ] })( diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/columnform/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/columnform/index.jsx index 1cae7b2..e3159f8 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/columnform/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/columnform/index.jsx @@ -5,7 +5,6 @@ class ExcelOutColumn extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� columnChange: PropTypes.func // 淇敼鍑芥暟 } @@ -24,7 +23,6 @@ } render() { - const { dict } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -41,39 +39,39 @@ <Form {...formItemLayout} className="verify-form"> <Row gutter={24}> <Col span={5}> - <Form.Item label={dict['model.form.field']}> + <Form.Item label="瀛楁"> {getFieldDecorator('Column', { initialValue: '', rules: [ { required: true, - message: dict['form.required.input'] + dict['model.form.field'] + '!' + message: '璇疯緭鍏ュ瓧娈�!' } ] })(<Input placeholder="" autoComplete="off" />)} </Form.Item> </Col> <Col span={5}> - <Form.Item label={dict['model.name']}> + <Form.Item label="鍚嶇О"> {getFieldDecorator('Text', { initialValue: '', rules: [ { required: true, - message: dict['form.required.input'] + dict['model.name'] + '!' + message: '璇疯緭鍏ュ悕绉�!' } ] })(<Input placeholder="" autoComplete="off" />)} </Form.Item> </Col> <Col span={5}> - <Form.Item label={dict['model.form.columnWidth']}> + <Form.Item label="鍒楀"> {getFieldDecorator('Width', { initialValue: 20, rules: [ { required: true, - message: this.props.dict['form.required.input'] + dict['model.form.columnWidth'] + '!' + message: '璇疯緭鍏ュ垪瀹�!' } ] })(<InputNumber min={5} max={200} precision={0} />)} diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx index 0431f00..936a558 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx @@ -22,7 +22,6 @@ class VerifyCard extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, card: PropTypes.object, } @@ -34,7 +33,7 @@ defaultscript: '', // 鑷畾涔夎剼鏈� excelColumns: [ { - title: this.props.dict['model.form.field'], + title: '瀛楁', dataIndex: 'Column', inputType: 'input', editable: true, @@ -42,7 +41,7 @@ width: '17%' }, { - title: this.props.dict['model.name'], + title: '鍚嶇О', dataIndex: 'Text', inputType: 'input', editable: true, @@ -50,7 +49,7 @@ width: '17%' }, { - title: this.props.dict['model.form.columnWidth'], + title: '鍒楀', dataIndex: 'Width', inputType: 'number', min: 5, @@ -187,11 +186,11 @@ dataIndex: 'operation', render: (text, record) => (<div style={{textAlign: 'center'}}> - <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span> - <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> + <span className="operation-btn" title="缂栬緫" onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span> + <span className="operation-btn" title="鐘舵�佸垏鎹�" onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.handleDelete(record, 'scripts') }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> @@ -975,7 +974,7 @@ {verify.columns.length ? <span className="count-tip">{verify.columns.length}</span> : null} </span> } key="columns"> - <ColumnForm dict={this.props.dict} columnChange={this.columnChange}/> + <ColumnForm columnChange={this.columnChange}/> <Button className="excel-col-add mk-green" title="娣诲姞鏄剧ず鍒楀瓧娈�" onClick={this.columnFieldInput}> 鍚屾鏄剧ず鍒� </Button> @@ -1026,7 +1025,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + 'sql!' + message: '璇疯緭鍏ql!' } ] })(<CodeMirror />)} diff --git a/src/templates/sharecomponent/actioncomponent/verifymegvii/index.jsx b/src/templates/sharecomponent/actioncomponent/verifymegvii/index.jsx index 4e65b0c..bc04f46 100644 --- a/src/templates/sharecomponent/actioncomponent/verifymegvii/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifymegvii/index.jsx @@ -10,7 +10,6 @@ class MegviiCard extends Component { static propTpyes = { columns: PropTypes.array, // 鏄剧ず鍒� - dict: PropTypes.object, // 瀛楀吀椤� card: PropTypes.object, } diff --git a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx index 9a08c00..591bbc8 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx @@ -18,7 +18,6 @@ floor: PropTypes.any, // 鏄惁涓哄瓙琛� btnTab: PropTypes.any, // 琛ㄥ崟鏍囩椤碉紙鎸夐挳锛夊弬鏁� config: PropTypes.any, // 琛ㄥ崟鏍囩椤靛弬鏁� - dict: PropTypes.object, // 瀛楀吀椤� card: PropTypes.object, columns: PropTypes.array } @@ -286,7 +285,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '閾炬帴鍦板潃!' + message: '璇疯緭鍏ラ摼鎺ュ湴鍧�!' } ] })(<Input placeholder="" autoComplete="off" disabled={linkType === 'system'} />)} @@ -299,7 +298,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '澶勭悊鍑芥暟!' + message: '璇疯緭鍏ュ鐞嗗嚱鏁�!' } ] })( @@ -308,13 +307,13 @@ </Form.Item> </Col> : null} {printMode === 'normal' ? <Col span={8}> - <Form.Item label={'鎵撳嵃妯℃澘'}> + <Form.Item label="鎵撳嵃妯℃澘"> {getFieldDecorator('Template', { initialValue: verify.Template || '', rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鎵撳嵃妯℃澘!' + message: '璇烽�夋嫨鎵撳嵃妯℃澘!' } ] })( diff --git a/src/templates/sharecomponent/cardcomponent/carddetailform/index.jsx b/src/templates/sharecomponent/cardcomponent/carddetailform/index.jsx index 0a141c1..1e7f40c 100644 --- a/src/templates/sharecomponent/cardcomponent/carddetailform/index.jsx +++ b/src/templates/sharecomponent/cardcomponent/carddetailform/index.jsx @@ -8,7 +8,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� formlist: PropTypes.any, card: PropTypes.any, inputSubmit: PropTypes.any // 鍥炶溅鎻愪氦浜嬩欢 @@ -126,7 +125,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' }, { max: formRule.input.max, @@ -151,7 +150,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<InputNumber min={item.min} max={item.max} precision={item.precision || 0} />)} @@ -167,7 +166,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -196,7 +195,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( diff --git a/src/templates/sharecomponent/cardcomponent/index.jsx b/src/templates/sharecomponent/cardcomponent/index.jsx index 00e2f78..9bf8922 100644 --- a/src/templates/sharecomponent/cardcomponent/index.jsx +++ b/src/templates/sharecomponent/cardcomponent/index.jsx @@ -5,8 +5,6 @@ import { EditOutlined, CloseOutlined, PlusOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getCardDetailForm } from '@/templates/zshare/formconfig' import MkIcon from '@/components/mk-icon' import DragDetail from './dragdetail' @@ -24,7 +22,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, modaltype: '', formlist: null, cardwidth: 0, @@ -273,11 +270,10 @@ deletedetail = (cell) => { const { card } = this.props - const { dict } = this.state let _this = this confirm({ - content: dict['model.confirm'] + dict['model.delete'] + ` - ${cell.content} 锛焋, + content: `纭畾鍒犻櫎 - ${cell.content} 锛焋, onOk() { let _details = fromJS(card.details).toJS() @@ -290,11 +286,10 @@ } deleteElem = (type) => { - const { dict } = this.state let _this = this confirm({ - content: dict['model.confirm'] + dict['model.delete'] + '锛�', + content: '纭畾鍒犻櫎锛�', onOk() { let _subelement = fromJS(_this.props.card.subelement).toJS() _subelement = _subelement.filter(_type => _type !== type) @@ -331,7 +326,7 @@ render() { const { card } = this.props - const { dict, modaltype, cardcell, cardwidth, cardheight } = this.state + const { modaltype, cardcell, cardwidth, cardheight } = this.state let _width = '100%' if (card.bottom && card.bottom.actions.length > 0) { _width = Math.floor((100 / card.bottom.actions.length) * 10000) / 10000 + '%' @@ -463,7 +458,6 @@ destroyOnClose > <CardDetailForm - dict={dict} card={cardcell} inputSubmit={this.handleSubmit} formlist={this.state.formlist} diff --git a/src/templates/sharecomponent/chartcomponent/chartcompile/index.jsx b/src/templates/sharecomponent/chartcomponent/chartcompile/index.jsx index 92dcaab..c46a8fc 100644 --- a/src/templates/sharecomponent/chartcomponent/chartcompile/index.jsx +++ b/src/templates/sharecomponent/chartcomponent/chartcompile/index.jsx @@ -10,7 +10,6 @@ class LineChartDrawerForm extends Component { static propTpyes = { - dict: PropTypes.object, plot: PropTypes.object, config: PropTypes.object, plotchange: PropTypes.func @@ -139,7 +138,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<Input placeholder="" autoComplete="off" disabled={item.readonly}/>)} @@ -160,7 +159,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<InputNumber min={item.min} max={item.max} precision={item.decimal} />)} @@ -181,7 +180,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -210,7 +209,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -261,7 +260,7 @@ rules: [ { required: enabled === 'true', - message: this.props.dict['form.required.select'] + '褰㈢姸!' + message: '璇烽�夋嫨褰㈢姸!' } ] })( @@ -281,7 +280,7 @@ rules: [ { required: enabled === 'true', - message: this.props.dict['form.required.select'] + '棰滆壊!' + message: '璇烽�夋嫨棰滆壊!' } ] })( diff --git a/src/templates/sharecomponent/chartcomponent/index.jsx b/src/templates/sharecomponent/chartcomponent/index.jsx index 8c356fb..f2a0771 100644 --- a/src/templates/sharecomponent/chartcomponent/index.jsx +++ b/src/templates/sharecomponent/chartcomponent/index.jsx @@ -4,8 +4,6 @@ import { Chart } from '@antv/g2' import DataSet from '@antv/data-set' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import ChartCompileForm from './chartcompile' import './index.scss' @@ -17,7 +15,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, visible: true } @@ -618,7 +615,6 @@ plot={plot} type={plot.chartType} config={this.props.config} - dict={this.state.dict} plotchange={this.plotChange} /> </div> diff --git a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx index 0c9ffd3..59cdc1c 100644 --- a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx +++ b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx @@ -159,7 +159,6 @@ class ChartForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� MenuID: PropTypes.any, formlist: PropTypes.any, card: PropTypes.any, @@ -308,7 +307,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' }, { max: formRule.input.max, @@ -333,7 +332,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<InputNumber min={item.min} max={item.max} precision={item.decimal} />)} @@ -354,7 +353,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -389,7 +388,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( diff --git a/src/templates/sharecomponent/chartgroupcomponent/index.jsx b/src/templates/sharecomponent/chartgroupcomponent/index.jsx index 5f7ca72..dcb8f2d 100644 --- a/src/templates/sharecomponent/chartgroupcomponent/index.jsx +++ b/src/templates/sharecomponent/chartgroupcomponent/index.jsx @@ -5,8 +5,6 @@ import { DownOutlined, UpOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getChartViewForm } from '@/templates/zshare/formconfig' import ChartForm from './chartform' @@ -22,7 +20,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, chartlist: null, // 鍥捐〃闆� card: null, // 缂栬緫涓厓绱� formlist: null, // 琛ㄥ崟淇℃伅 @@ -206,11 +203,10 @@ */ deletechart = (plot) => { const { config } = this.props - const { dict } = this.state let _this = this confirm({ - content: dict['model.confirm'] + dict['model.delete'] + ` ${plot.title} 锛焋, + content: `纭畾鍒犻櫎 ${plot.title} 锛焋, onOk() { let _chartlist = fromJS(_this.state.chartlist).toJS() let _chartview = _this.state.chartview @@ -257,7 +253,7 @@ // 宸插純鐢紝涓嶅湪寮�鏀炬坊鍔犻�氶亾 render() { const { config } = this.props - const { dict, chartlist, modaltype, card, chartview } = this.state + const { chartlist, modaltype, card, chartview } = this.state return ( <div className="model-table-chartview-list"> @@ -283,7 +279,6 @@ destroyOnClose > <ChartForm - dict={dict} card={card} formlist={this.state.formlist} inputSubmit={this.submitChart} diff --git a/src/templates/sharecomponent/columncomponent/colspanform/index.jsx b/src/templates/sharecomponent/columncomponent/colspanform/index.jsx index 0c9be7e..788acdd 100644 --- a/src/templates/sharecomponent/columncomponent/colspanform/index.jsx +++ b/src/templates/sharecomponent/columncomponent/colspanform/index.jsx @@ -9,7 +9,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� columns: PropTypes.array, card: PropTypes.any, inputSubmit: PropTypes.any // 鍥炶溅鎻愪氦浜嬩欢 @@ -80,13 +79,13 @@ <Form {...formItemLayout} style={{minHeight: '190px'}} id="columncolspan"> <Row gutter={24}> <Col span={12}> - <Form.Item label={this.props.dict['model.name']}> + <Form.Item label="鍚嶇О"> {getFieldDecorator('label', { initialValue: card.label, rules: [ { required: true, - message: this.props.dict['form.required.input'] + this.props.dict['model.name'] + '!' + message: '璇疯緭鍏ュ悕绉�!' }, { max: formRule.input.max, @@ -97,47 +96,41 @@ </Form.Item> </Col> <Col span={12}> - <Form.Item label={this.props.dict['model.form.type']}> + <Form.Item label="绫诲瀷"> {getFieldDecorator('type', { - initialValue: this.props.dict['model.form.colspan'], - rules: [ - { - required: true, - message: this.props.dict['form.required.input'] + this.props.dict['model.form.type'] + '!' - } - ] + initialValue: '鍚堝苟鍒�' })(<Input placeholder="" autoComplete="off" disabled={true}/>)} </Form.Item> </Col> <Col span={12}> - <Form.Item label={this.props.dict['model.form.align']}> + <Form.Item label="瀵归綈鏂瑰紡"> {getFieldDecorator('Align', { initialValue: card.Align, rules: [ { required: true, - message: this.props.dict['form.required.select'] + this.props.dict['model.form.align'] + '!' + message: '璇烽�夋嫨瀵归綈鏂瑰紡!' } ] })( <Select getPopupContainer={() => document.getElementById('columncolspan')} > - <Select.Option value="left">{this.props.dict['model.form.alignLeft']}</Select.Option> - <Select.Option value="right">{this.props.dict['model.form.alignRight']}</Select.Option> - <Select.Option value="center">{this.props.dict['model.form.alignCenter']}</Select.Option> + <Select.Option value="left">宸﹀榻�</Select.Option> + <Select.Option value="right">鍙冲榻�</Select.Option> + <Select.Option value="center">灞呬腑</Select.Option> </Select> )} </Form.Item> </Col> <Col span={12}> - <Form.Item label={this.props.dict['model.form.columnWidth']}> + <Form.Item label="鍒楀"> {getFieldDecorator('Width', { initialValue: card.Width, rules: [ { required: true, - message: this.props.dict['form.required.input'] + this.props.dict['model.form.columnWidth'] + '!' + message: '璇疯緭鍏ュ垪瀹�!' } ] })(<InputNumber min={1} max={1000} precision={0} onPressEnter={this.handleSubmit} />)} @@ -154,26 +147,20 @@ initialValue: card.unfold || 'false' })( <Radio.Group> - <Radio value="true">{this.props.dict['model.true']}</Radio> - <Radio value="false">{this.props.dict['model.false']}</Radio> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> </Radio.Group> )} </Form.Item> </Col> <Col span={12}> - <Form.Item label={this.props.dict['model.hidden']}> + <Form.Item label="闅愯棌"> {getFieldDecorator('Hide', { - initialValue: card.Hide || 'false', - rules: [ - { - required: true, - message: this.props.dict['form.required.select'] + this.props.dict['model.hidden'] + '!' - } - ] + initialValue: card.Hide || 'false' })( <Radio.Group> - <Radio value="true">{this.props.dict['model.true']}</Radio> - <Radio value="false">{this.props.dict['model.false']}</Radio> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> </Radio.Group> )} </Form.Item> @@ -185,7 +172,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鎺掑垪!' + message: '璇烽�夋嫨鎺掑垪鏂瑰紡!' } ] })( diff --git a/src/templates/sharecomponent/columncomponent/columnform/index.jsx b/src/templates/sharecomponent/columncomponent/columnform/index.jsx index ec356a5..2c04d33 100644 --- a/src/templates/sharecomponent/columncomponent/columnform/index.jsx +++ b/src/templates/sharecomponent/columncomponent/columnform/index.jsx @@ -19,7 +19,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� MenuID: PropTypes.any, formlist: PropTypes.any, card: PropTypes.any, @@ -171,7 +170,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' }, ...rules ] @@ -193,7 +192,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<TextArea rows={2} disabled={item.readonly} onPressEnter={this.handleSubmit} />)} @@ -214,7 +213,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(item.unlimit ? <InputNumber onPressEnter={this.handleSubmit}/> : @@ -231,7 +230,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -265,7 +264,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -311,7 +310,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( diff --git a/src/templates/sharecomponent/columncomponent/gridbtnform/index.jsx b/src/templates/sharecomponent/columncomponent/gridbtnform/index.jsx index 9fa3613..3891b24 100644 --- a/src/templates/sharecomponent/columncomponent/gridbtnform/index.jsx +++ b/src/templates/sharecomponent/columncomponent/gridbtnform/index.jsx @@ -6,7 +6,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� card: PropTypes.any, inputSubmit: PropTypes.any // 鍥炶溅鎻愪氦浜嬩欢 } @@ -16,32 +15,32 @@ { type: 'text', key: 'label', - label: this.props.dict['model.name'], + label: '鍚嶇О', initVal: this.props.card.label, required: true }, { type: 'radio', key: 'Align', - label: this.props.dict['model.form.align'], + label: '瀵归綈鏂瑰紡', initVal: this.props.card.Align, required: true, options: [{ MenuID: 'left', - text: this.props.dict['model.form.alignLeft'] + text: '宸﹀榻�' }, { MenuID: 'right', - text: this.props.dict['model.form.alignRight'] + text: '鍙冲榻�' }, { MenuID: 'center', - text: this.props.dict['model.form.alignCenter'] + text: '灞呬腑' }] }, { type: 'number', key: 'Width', decimal: 0, - label: this.props.dict['model.form.columnWidth'], + label: '鍒楀', initVal: this.props.card.Width, required: true }, @@ -83,7 +82,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' }, { max: formRule.input.max, @@ -103,7 +102,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<InputNumber min={1} max={1000} precision={item.decimal} />)} @@ -119,7 +118,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -147,7 +146,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( diff --git a/src/templates/sharecomponent/columncomponent/index.jsx b/src/templates/sharecomponent/columncomponent/index.jsx index 52a345f..71179be 100644 --- a/src/templates/sharecomponent/columncomponent/index.jsx +++ b/src/templates/sharecomponent/columncomponent/index.jsx @@ -4,8 +4,6 @@ import { Modal, notification, Switch, message } from 'antd' import { CopyOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getColumnForm } from '@/templates/zshare/formconfig' import ColumnForm from './columnform' @@ -26,7 +24,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, columnlist: null, // 鏄剧ず鍒� showField: true, // 鏄剧ず鍒楀瓧娈� modaltype: '', // 妯℃�佹鎺у埗 @@ -283,11 +280,10 @@ */ deleteElement = (card) => { const { config } = this.props - const { dict } = this.state let _this = this confirm({ - content: dict['model.confirm'] + dict['model.delete'] + ` - ${card.label} 锛焋, + content: `纭畾鍒犻櫎 - ${card.label} 锛焋, onOk() { let _columnlist = fromJS(_this.state.columnlist).toJS() @@ -502,12 +498,12 @@ render() { const { config } = this.props - const { modaltype, columnlist, dict, card } = this.state + const { modaltype, columnlist, card } = this.state return ( <div className="model-table-column-list"> {columnlist && columnlist.length > 0 ? <CopyOutlined className="column-copy" title="copy" onClick={this.copycolumn} /> : null} - <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={this.onFieldChange} /> + <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={this.onFieldChange} /> <DragElement list={columnlist} setting={config.setting} @@ -530,7 +526,6 @@ destroyOnClose > <ColumnForm - dict={dict} card={card} MenuID={this.props.menu.MenuID} inputSubmit={this.handleSubmit} @@ -540,7 +535,7 @@ </Modal> {/* 鍚堝苟鍒楃紪杈� */} <Modal - title={dict['model.form.colspan'] + '-' + dict['model.edit']} + title="鍚堝苟鍒�-缂栬緫" visible={modaltype === 'colspan'} width={850} maskClosable={false} @@ -549,7 +544,6 @@ destroyOnClose > <ColspanForm - dict={dict} card={card} inputSubmit={this.handleSubmit} columns={columnlist} @@ -567,7 +561,6 @@ destroyOnClose > <GridBtnForm - dict={dict} inputSubmit={this.handleSubmit} card={config.gridBtn} wrappedComponentRef={(inst) => this.gridBtnFormRef = inst} @@ -580,7 +573,7 @@ visible={modaltype === 'mark'} width={'75vw'} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.markSubmit} onCancel={() => { this.setState({ modaltype: '' }) }} destroyOnClose @@ -588,7 +581,6 @@ <MarkColumn ref="markRef" card={card} - dict={dict} columns={columnlist} /> </Modal> diff --git a/src/templates/sharecomponent/columncomponent/markcolumn/index.jsx b/src/templates/sharecomponent/columncomponent/markcolumn/index.jsx index a7ab159..d6c58f2 100644 --- a/src/templates/sharecomponent/columncomponent/markcolumn/index.jsx +++ b/src/templates/sharecomponent/columncomponent/markcolumn/index.jsx @@ -13,7 +13,6 @@ class MarkColumn extends Component { static propTpyes = { columns: PropTypes.array, // 鏄剧ず鍒� - dict: PropTypes.object, // 瀛楀吀椤� card: PropTypes.object, } @@ -219,7 +218,6 @@ return ( <div id="mark-column-box-modal" className=""> <MarkForm - dict={this.props.dict} card={card} columns={columns} markChange={this.markChange} diff --git a/src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx b/src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx index e98fb1e..94683e2 100644 --- a/src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx +++ b/src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx @@ -8,7 +8,6 @@ class UniqueForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� card: PropTypes.object, // 瀛楁淇℃伅 columns: PropTypes.array, // 鍒楀悕闆嗗悎 markChange: PropTypes.func // 淇敼鍑芥暟 @@ -194,7 +193,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '瀛楁!' + message: '璇烽�夋嫨瀛楁!' } ] })( @@ -229,7 +228,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '瀵规瘮鏂瑰紡!' + message: '璇烽�夋嫨瀵规瘮鏂瑰紡!' } ] })( @@ -257,7 +256,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '瀵规瘮瀛楁!' + message: '璇烽�夋嫨瀵规瘮瀛楁!' } ] })( @@ -279,7 +278,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鏍囪鏂瑰紡!' + message: '璇烽�夋嫨鏍囪鏂瑰紡!' } ] })( @@ -321,13 +320,13 @@ </Form.Item> </Col> : null} {signType === 'icon' ? <Col span={6}> - <Form.Item label={'鍥炬爣'}> + <Form.Item label="鍥炬爣"> {getFieldDecorator('icon', { initialValue: '', rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鍥炬爣!' + message: '璇烽�夋嫨鍥炬爣!' } ] })( @@ -344,7 +343,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '棰滆壊!' + message: '璇烽�夋嫨棰滆壊!' } ] })( diff --git a/src/templates/sharecomponent/fieldscomponent/index.jsx b/src/templates/sharecomponent/fieldscomponent/index.jsx index 26c4cf0..53642ec 100644 --- a/src/templates/sharecomponent/fieldscomponent/index.jsx +++ b/src/templates/sharecomponent/fieldscomponent/index.jsx @@ -4,8 +4,6 @@ import { Button, Modal, Empty, notification } from 'antd' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import EditCard from './editcard' import MKEmitter from '@/utils/events.js' @@ -19,7 +17,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, appType: sessionStorage.getItem('appType'), fields: [], // 瀛楁闆� visible: false, // 妯℃�佹鎺у埗 @@ -262,19 +259,19 @@ render() { const { type } = this.props - const { dict, fields } = this.state + const { fields } = this.state return ( <div className="quickly-add"> - <Button type="primary" block onClick={this.queryField}>{dict['model.batchAdd']}</Button> + <Button type="primary" block onClick={this.queryField}>鎵归噺娣诲姞</Button> {/* 鏍规嵁瀛楁鍚嶆坊鍔犳樉绀哄垪鍙婃悳绱㈡潯浠� */} <Modal wrapClassName="model-table-fieldmanage-modal" - title={dict['model.edit']} + title="缂栬緫" visible={this.state.visible} width={'65vw'} maskClosable={false} - cancelText={dict['model.close']} + cancelText="鍏抽棴" onOk={this.addFieldSubmit} onCancel={() => this.setState({ visible: false })} destroyOnClose diff --git a/src/templates/sharecomponent/searchcomponent/index.jsx b/src/templates/sharecomponent/searchcomponent/index.jsx index 5f5132c..01a9c35 100644 --- a/src/templates/sharecomponent/searchcomponent/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/index.jsx @@ -6,8 +6,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getSearchForm } from '@/templates/zshare/formconfig' import asyncComponent from '@/utils/asyncComponent' import MKEmitter from '@/utils/events.js' @@ -27,7 +25,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, searchlist: null, sqlVerifing: false, visible: false, @@ -273,11 +270,10 @@ */ deleteElement = (card) => { const { config } = this.props - const { dict } = this.state let _this = this confirm({ - content: dict['model.confirm'] + dict['model.delete'] + ` - ${card.label} 锛焋, + content: `纭畾鍒犻櫎 - ${card.label} 锛焋, onOk() { let _searchlist = fromJS(_this.state.searchlist).toJS() @@ -350,12 +346,12 @@ render() { const { config } = this.props - const { dict, searchlist, visible, sqlVerifing, card, showField, setVisible } = this.state + const { searchlist, visible, sqlVerifing, card, showField, setVisible } = this.state return ( <div className={'model-table-search-list length' + searchlist.length + (showField ? ' show-field' : '')}> <FieldsComponent config={{uuid: config.uuid, search: searchlist}} type="search" /> - <Switch className="switch-field-show" checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={showField} onChange={this.onFieldChange} /> + <Switch className="switch-field-show" checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={showField} onChange={this.onFieldChange} /> <DragElement list={searchlist} setting={config.wrap || config.setting} @@ -376,7 +372,6 @@ destroyOnClose > <SearchForm - dict={dict} card={this.state.card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx index 06d7186..c4365b3 100644 --- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx @@ -109,7 +109,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� formlist: PropTypes.any, // 琛ㄥ崟 card: PropTypes.object, // 鎼滅储鏉′欢淇℃伅 inputSubmit: PropTypes.any // 鍥炶溅鎻愪氦浜嬩欢 @@ -267,7 +266,6 @@ } optionChange = (key, value) => { - let oriType = this.record.type this.record[key] = value let _fieldval = {} @@ -292,9 +290,6 @@ if (value === 'checkcard') { this.record.multiple = 'false' _fieldval.multiple = 'false' - _fieldval.ratio = 24 - } else if (oriType === 'checkcard') { - _fieldval.ratio = 6 } if (this.record.options.length > 0) { @@ -437,7 +432,6 @@ getFields() { const { getFieldDecorator } = this.props.form - const { dict } = this.props const { formlist } = this.state const fields = [] @@ -454,7 +448,7 @@ if (item.type === 'text') { let type = this.record.type rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] if (item.key === 'field' || item.key === 'datefield') { rules.push({ @@ -487,7 +481,7 @@ } } else if (item.type === 'number') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] initVal = item.initVal @@ -498,7 +492,7 @@ } } else if (item.type === 'select') { // 涓嬫媺鎼滅储 rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Select @@ -516,7 +510,7 @@ </Select> } else if (item.type === 'radio') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.optionChange(item.key, e.target.value)}}> @@ -528,7 +522,7 @@ </Radio.Group> } else if (item.type === 'codemirror') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] span = 24 className = 'text-area' @@ -550,7 +544,7 @@ if (this.record.linkField) { type = 'link' } - content = <DataTable dict={dict} type={type} display={this.record.display} linkSubFields={[]} transfield={{}} fields={this.record.fields || []} onChange={this.changeOptions}/> + content = <DataTable type={type} display={this.record.display} linkSubFields={[]} transfield={{}} fields={this.record.fields || []} onChange={this.changeOptions}/> } } else if (item.type === 'fields') { span = 24 @@ -560,10 +554,10 @@ { required: item.required, message: '璇锋坊鍔�' + item.label + '!' } ] - content = <FieldsTable dict={dict} onChange={this.changeField}/> + content = <FieldsTable onChange={this.changeField}/> } else if (item.type === 'checkbox') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Checkbox.Group style={{width: '105%'}} options={item.options} onChange={(values) => this.optionChange(item.key, values)}/> @@ -582,7 +576,7 @@ } else if (item.type === 'color') { className = 'color-form-item' rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <ColorSketch allowClear={true}/> diff --git a/src/templates/sharecomponent/settingcalcomponent/index.jsx b/src/templates/sharecomponent/settingcalcomponent/index.jsx index 1d9addf..646acee 100644 --- a/src/templates/sharecomponent/settingcalcomponent/index.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/index.jsx @@ -4,8 +4,6 @@ import { Modal } from 'antd' import { SettingOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import VerifyCard from './verifycard' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -18,7 +16,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, sourcelist: [], visible: false, loading: false, @@ -77,7 +74,7 @@ render () { const { config } = this.props - const { visible, dict, loading } = this.state + const { visible, loading } = this.state return ( <div className="model-datasource"> @@ -87,14 +84,13 @@ visible={visible} width={'75vw'} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} confirmLoading={loading} onCancel={() => { MKEmitter.emit('modalStatus', false); this.setState({ visible: false }) }} destroyOnClose > <VerifyCard - dict={dict} config={config} menuId={this.props.config.uuid} searches={config.search} diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/columnform/index.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/columnform/index.jsx index c8ef7bb..2539ee3 100644 --- a/src/templates/sharecomponent/settingcalcomponent/verifycard/columnform/index.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/columnform/index.jsx @@ -6,7 +6,6 @@ class UniqueForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� columnChange: PropTypes.func // 淇敼鍑芥暟 } @@ -69,7 +68,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鍚嶇О!' + message: '璇疯緭鍏ュ悕绉�!' } ] })(<Input placeholder="" autoComplete="off" />)} @@ -82,20 +81,20 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '瀛楁!' + message: '璇疯緭鍏ュ瓧娈�!' } ] })(<Input placeholder="" autoComplete="off" />)} </Form.Item> </Col> <Col span={7}> - <Form.Item label={'鏁版嵁绫诲瀷'}> + <Form.Item label="鏁版嵁绫诲瀷"> {getFieldDecorator('datatype', { initialValue: '', rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鏁版嵁绫诲瀷!' + message: '璇烽�夋嫨鏁版嵁绫诲瀷!' } ] })( diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx index 6ff6f95..66977c5 100644 --- a/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx @@ -21,7 +21,6 @@ class VerifyCard extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, // 鏁版嵁婧愪俊鎭� menuId: PropTypes.string, // 鑿滃崟Id searches: PropTypes.array, // 鎼滅储鏉′欢 @@ -56,10 +55,10 @@ dataIndex: 'operation', render: (text, record) => (<div> - <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span> + <span className="operation-btn" title="缂栬緫" onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.deleteColumn(record) }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> @@ -391,7 +390,6 @@ <TabPane tab="鏁版嵁婧�" key="setting"> <SettingForm menuId={this.props.menuId} - dict={this.props.dict} columns={columns} setting={setting} scripts={scripts} @@ -400,7 +398,6 @@ </TabPane> <TabPane tab="瀛楁闆�" key="columns"> <ColForm - dict={this.props.dict} columnChange={this.columnChange} wrappedComponentRef={(inst) => this.contrastForm = inst} /> @@ -425,7 +422,6 @@ </span> } key="scripts" id="mk-setting-scripts"> <CustomScript - dict={this.props.dict} setting={setting} scripts={scripts} urlFields={config.urlFields} diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx index aa58249..1a6de21 100644 --- a/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx @@ -14,7 +14,6 @@ class SettingForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� menuId: PropTypes.string, // 鑿滃崟Id setting: PropTypes.object, // 鏁版嵁婧愰厤缃� columns: PropTypes.array, // 鍒楄缃� @@ -168,7 +167,7 @@ rules.push({ required: true, - message: this.props.dict['form.required.input'] + '鍐呴儴鍑芥暟!' + message: '璇疯緭鍏ュ唴閮ㄥ嚱鏁�!' }, { pattern: _patten, message: formRule.func.innerMessage @@ -185,7 +184,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '琛ㄥ悕!' + message: '璇疯緭鍏ヨ〃鍚�!' }, { max: 50, @@ -202,7 +201,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鎺ュ彛绫诲瀷!' + message: '璇烽�夋嫨鎺ュ彛绫诲瀷!' }, ] })( @@ -243,7 +242,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鎺ュ彛鍦板潃!' + message: '璇疯緭鍏ユ帴鍙e湴鍧�!' }, ] })(<TextArea rows={2}/>)} diff --git a/src/templates/sharecomponent/settingcomponent/index.jsx b/src/templates/sharecomponent/settingcomponent/index.jsx index 72b3c79..85be0a7 100644 --- a/src/templates/sharecomponent/settingcomponent/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/index.jsx @@ -5,8 +5,6 @@ import { SettingOutlined } from '@ant-design/icons' import Utils, { FuncUtils } from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import MKEmitter from '@/utils/events.js' import SettingForm from './settingform' import CreateFunc from '@/templates/zshare/createfunc' @@ -23,7 +21,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, menu: null, // 鑿滃崟淇℃伅 search: null, // 鎼滅储鏉′欢锛屽寘鎷富琛ㄦ悳绱� formlist: null, // 琛ㄥ崟淇℃伅 @@ -177,7 +174,7 @@ render() { const { config } = this.props - const { dict, visible, search, menu, record } = this.state + const { visible, search, menu, record } = this.state return ( <> @@ -190,15 +187,14 @@ maskClosable={false} onCancel={() => { MKEmitter.emit('modalStatus', false); this.setState({ visible: false, loading: false })}} footer={[ - record && record.interType === 'system' ? <CreateInterface key="interface" loading={this.state.interloading} dict={dict} ref="tableCreatInterface" trigger={this.tableCreatInterface}/> : null, - record && record.interType === 'inner' ? <CreateFunc key="create" dict={dict} ref="funcCreatComponent" trigger={this.tableCreatFunc}/> : null, - <Button key="cancel" onClick={() => { MKEmitter.emit('modalStatus', false); this.setState({ visible: false, loading: false }) }}>{this.state.dict['model.cancel']}</Button>, - <Button key="confirm" type="primary" loading={this.state.loading} onClick={this.settingSave}>{this.state.dict['model.confirm']}</Button> + record && record.interType === 'system' ? <CreateInterface key="interface" loading={this.state.interloading} ref="tableCreatInterface" trigger={this.tableCreatInterface}/> : null, + record && record.interType === 'inner' ? <CreateFunc key="create" ref="funcCreatComponent" trigger={this.tableCreatFunc}/> : null, + <Button key="cancel" onClick={() => { MKEmitter.emit('modalStatus', false); this.setState({ visible: false, loading: false }) }}>鍙栨秷</Button>, + <Button key="confirm" type="primary" loading={this.state.loading} onClick={this.settingSave}>纭畾</Button> ]} destroyOnClose > <SettingForm - dict={dict} menu={menu} config={config} search={search} diff --git a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx index 5286d15..18ba64c 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx @@ -17,7 +17,6 @@ class SettingForm extends Component { static propTpyes = { config: PropTypes.object, // 椤甸潰閰嶇疆 - dict: PropTypes.object, // 瀛楀吀椤� menu: PropTypes.object, // 鑿滃崟淇℃伅 setting: PropTypes.object, // 鏁版嵁婧愰厤缃� columns: PropTypes.array, // 鍒楄缃� @@ -190,7 +189,7 @@ } render() { - const { setting, dict, menu, config, columns } = this.props + const { setting, menu, config, columns } = this.props const { getFieldDecorator } = this.props.form const { interType, funcRules, funcTooltip, tableType, controlField, sysInterface } = this.state @@ -215,7 +214,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + '琛ㄥ悕!' + message: '璇疯緭鍏ヨ〃鍚�!' }, { max: 50, @@ -230,13 +229,13 @@ </Form.Item> </Col> <Col span={8}> - <Form.Item label={dict['header.form.intertype']}> + <Form.Item label="鎺ュ彛绫诲瀷"> {getFieldDecorator('interType', { initialValue: interType, rules: [ { required: true, - message: dict['form.required.select'] + dict['header.form.intertype'] + '!' + message: '璇烽�夋嫨鎺ュ彛绫诲瀷!' }, ] })( @@ -261,19 +260,19 @@ </Form.Item> </Col> {interType === 'outer' ? <Col span={8}> - <Form.Item label={dict['header.form.sysInterface']}> + <Form.Item label="绯荤粺鎺ュ彛"> {getFieldDecorator('sysInterface', { initialValue: sysInterface, rules: [ { required: true, - message: dict['form.required.select'] + dict['header.form.sysInterface'] + '!' + message: '璇烽�夋嫨绯荤粺鎺ュ彛!' }, ] })( <Radio.Group onChange={(e) => {this.onRadioChange(e, 'sysInterface')}}> - <Radio value="true">{dict['model.true']}</Radio> - <Radio value="false">{dict['model.false']}</Radio> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> </Radio.Group>)} </Form.Item> </Col> : null} @@ -284,7 +283,7 @@ rules: [ { required: interType === 'outer' && sysInterface === 'true' ? false : true, - message: dict['form.required.input'] + '鎺ュ彛鍦板潃!' + message: '璇疯緭鍏ユ帴鍙e湴鍧�!' }, ] })(<TextArea rows={2} readOnly={interType === 'outer' && sysInterface === 'true'}/>)} @@ -314,7 +313,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + '鍐呴儴鍑芥暟!' + message: '璇疯緭鍏ュ唴閮ㄥ嚱鏁�!' }, { max: formRule.func.max, @@ -403,7 +402,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + '榛樿鎺掑簭!' + message: '璇疯緭鍏ラ粯璁ゆ帓搴�!' }, { max: formRule.input.max, @@ -419,8 +418,8 @@ initialValue: setting.laypage || 'true' })( <Radio.Group> - <Radio value="true">{dict['model.true']}</Radio> - <Radio value="false">{dict['model.false']}</Radio> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> </Radio.Group>)} </Form.Item> </Col> @@ -441,8 +440,8 @@ initialValue: setting.actionfixed === 'true' || setting.actionfixed === true ? 'true' : 'false' })( <Radio.Group> - <Radio value="true">{dict['model.true']}</Radio> - <Radio value="false">{dict['model.false']}</Radio> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> </Radio.Group>)} </Form.Item> </Col> : null} @@ -457,8 +456,8 @@ initialValue: setting.columnfixed === 'true' || setting.columnfixed === true ? 'true' : 'false' })( <Radio.Group> - <Radio value="true">{dict['model.true']}</Radio> - <Radio value="false">{dict['model.false']}</Radio> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> </Radio.Group>)} </Form.Item> </Col> : null} */} diff --git a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx index 3ae2a2c..86caaea 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx @@ -20,7 +20,6 @@ class SettingForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� menu: PropTypes.object, // 鑿滃崟淇℃伅 config: PropTypes.object, // 椤甸潰閰嶇疆淇℃伅 search: PropTypes.array, // 鎼滅储鏉′欢 @@ -496,7 +495,7 @@ } render() { - const { config, menu, dict } = this.props + const { config, menu } = this.props const { loading, activeKey, setting, defaultSql, columns, scripts, status, visible, script, scriptValue } = this.state return ( @@ -506,7 +505,6 @@ <TabPane tab="鏁版嵁婧�" key="setting"> <DataSource menu={menu} - dict={dict} config={config} columns={columns} setting={setting} @@ -533,7 +531,6 @@ this.setState({visible: true, script: null, scriptValue: ''}) }}/> : null} <CustomScript - dict={dict} setting={setting} scripts={scripts} defaultSql={defaultSql} @@ -582,7 +579,7 @@ <span className="operation-btn" onClick={() => this.handleStatus(item)} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.handleDelete(item) }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> diff --git a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx index 8cdffeb..6305eb8 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx @@ -17,7 +17,6 @@ class CustomForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� setting: PropTypes.object, // 璁剧疆 scripts: PropTypes.array, // 鑷畾涔夎剼鏈垪琛� searches: PropTypes.array, // 鎼滅储鏉′欢 @@ -89,11 +88,11 @@ dataIndex: 'operation', render: (text, record) => (<div style={{textAlign: 'center'}}> - <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span> - <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record)} style={{color: '#8E44AD'}}><SwapOutlined /></span> + <span className="operation-btn" title="缂栬緫" onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span> + <span className="operation-btn" title="鐘舵�佸垏鎹�" onClick={() => this.handleStatus(record)} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.handleDelete(record) }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> diff --git a/src/templates/sharecomponent/tabscomponent/index.jsx b/src/templates/sharecomponent/tabscomponent/index.jsx index 43e9a29..1f0b602 100644 --- a/src/templates/sharecomponent/tabscomponent/index.jsx +++ b/src/templates/sharecomponent/tabscomponent/index.jsx @@ -5,8 +5,6 @@ import { QuestionCircleOutlined, ArrowDownOutlined, ArrowUpOutlined, PlusOutlined, DeleteOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getTabForm } from '@/templates/zshare/formconfig' import TabForm from './tabform' @@ -24,7 +22,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, tabgroups: [], // 鏍囩缁� card: [], // 缂栬緫鏍囩 group: [], // 缂栬緫缁� @@ -385,7 +382,7 @@ } render() { - const { tabgroups, visible, dict } = this.state + const { tabgroups, visible } = this.state return ( <div className="model-table-tab-list"> @@ -407,7 +404,6 @@ handleMenu={(card) => this.handleTab(card, group)} deleteMenu={(card) => this.deleteElement(card, group)} doubleClickCard={this.props.setSubConfig} - placeholder={dict['form.required.add'] + dict['model.form.tab']} /> </div>) })} @@ -422,7 +418,6 @@ destroyOnClose > <TabForm - dict={dict} card={this.state.card} tabs={this.props.tabs} levels={this.state.levels} diff --git a/src/templates/sharecomponent/tabscomponent/tabdragelement/index.jsx b/src/templates/sharecomponent/tabscomponent/tabdragelement/index.jsx index 9d819d5..ac0269f 100644 --- a/src/templates/sharecomponent/tabscomponent/tabdragelement/index.jsx +++ b/src/templates/sharecomponent/tabscomponent/tabdragelement/index.jsx @@ -9,7 +9,7 @@ const { TabPane } = Tabs -const Container = ({list, placeholder, handleList, handleMenu, deleteMenu, doubleClickCard }) => { +const Container = ({list, handleList, handleMenu, deleteMenu, doubleClickCard }) => { const [cards, setCards] = useState(list) const moveCard = (id, atIndex) => { const { card, index } = findCard(id) @@ -102,7 +102,7 @@ </Tabs> {cards.length === 0 ? <div className="commontab-drawarea-placeholder"> - {placeholder} + 璇锋坊鍔犳爣绛� </div> : null } </div> diff --git a/src/templates/sharecomponent/tabscomponent/tabform/index.jsx b/src/templates/sharecomponent/tabscomponent/tabform/index.jsx index efd6bec..a7e0ec3 100644 --- a/src/templates/sharecomponent/tabscomponent/tabform/index.jsx +++ b/src/templates/sharecomponent/tabscomponent/tabform/index.jsx @@ -13,7 +13,6 @@ class MainTab extends Component { static propTpyes = { tabs: PropTypes.array, // 鍙叧鑱旀爣绛鹃泦 - dict: PropTypes.object, // 瀛楀吀椤� formlist: PropTypes.any, // 琛ㄥ崟 levels: PropTypes.any, // 鏍囩鏄剧ず绾у埆 card: PropTypes.object, // 鏍囩椤典俊鎭� @@ -138,7 +137,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' }, { max: formRule.input.max, @@ -165,7 +164,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<InputNumber min={item.min} max={item.max} precision={0} />)} @@ -181,7 +180,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -214,7 +213,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -263,7 +262,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( diff --git a/src/templates/sharecomponent/treesettingcomponent/index.jsx b/src/templates/sharecomponent/treesettingcomponent/index.jsx index 74fb02f..867f295 100644 --- a/src/templates/sharecomponent/treesettingcomponent/index.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/index.jsx @@ -3,8 +3,6 @@ import { Modal } from 'antd' import { SettingOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import SettingForm from './settingform' import MKEmitter from '@/utils/events.js' @@ -18,7 +16,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, menu: null, // 鑿滃崟淇℃伅 visible: false, // 妯℃�佹鎺у埗 loading: false // 璁剧疆淇℃伅楠岃瘉淇濆瓨涓� @@ -92,7 +89,7 @@ render() { const { config } = this.props - const { dict, visible, loading } = this.state + const { visible, loading } = this.state return ( <div className="model-tree-menu-setting"> @@ -109,7 +106,6 @@ destroyOnClose > <SettingForm - dict={dict} config={config} menu={this.state.menu} inputSubmit={this.settingSave} diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx index 48382e0..075f17b 100644 --- a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx @@ -14,7 +14,6 @@ class SettingForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� menu: PropTypes.object, // 鑿滃崟淇℃伅 setting: PropTypes.object, // 鏁版嵁婧愰厤缃� inputSubmit: PropTypes.func // 瑙﹀彂鎻愪氦 @@ -175,7 +174,7 @@ } render() { - const { setting, dict, menu } = this.props + const { setting, menu } = this.props const { getFieldDecorator } = this.props.form const { interType, funcRules, funcTooltip } = this.state @@ -200,7 +199,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + '琛ㄥ悕!' + message: '璇疯緭鍏ヨ〃鍚�!' }, { max: 50, @@ -217,7 +216,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + '鏍囬!' + message: '璇疯緭鍏ユ爣棰�!' }, { max: formRule.input.max, @@ -228,13 +227,13 @@ </Form.Item> </Col> <Col span={8}> - <Form.Item label={dict['header.form.intertype']}> + <Form.Item label="鎺ュ彛绫诲瀷"> {getFieldDecorator('interType', { initialValue: interType, rules: [ { required: true, - message: dict['form.required.select'] + dict['header.form.intertype'] + '!' + message: '璇烽�夋嫨鎺ュ彛绫诲瀷!' } ] })( @@ -246,19 +245,19 @@ </Form.Item> </Col> {interType === 'outer' ? <Col span={8}> - <Form.Item label={dict['header.form.sysInterface']}> + <Form.Item label="绯荤粺鎺ュ彛"> {getFieldDecorator('sysInterface', { initialValue: setting.sysInterface || 'false', rules: [ { required: true, - message: dict['form.required.select'] + dict['header.form.sysInterface'] + '!' + message: '璇烽�夋嫨绯荤粺鎺ュ彛!' }, ] })( <Radio.Group onChange={(e) => {this.onRadioChange(e, 'sysInterface')}}> - <Radio value="true">{dict['model.true']}</Radio> - <Radio value="false">{dict['model.false']}</Radio> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> </Radio.Group>)} </Form.Item> </Col> : null} @@ -274,7 +273,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + '鍐呴儴鍑芥暟!' + message: '璇疯緭鍏ュ唴閮ㄥ嚱鏁�!' }, { max: formRule.func.max, @@ -292,7 +291,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + '鎺ュ彛鍦板潃!' + message: '璇疯緭鍏ユ帴鍙e湴鍧�!' } ] })(<TextArea rows={2}/>)} @@ -328,7 +327,7 @@ </Col> : null} <Col span={8}> <Form.Item label={ - <Tooltip placement="topLeft" title={'鏁版嵁鍊煎瓧娈点��'}> + <Tooltip placement="topLeft" title="鏁版嵁鍊煎瓧娈点��"> <QuestionCircleOutlined className="mk-form-tip" /> Value </Tooltip> @@ -338,7 +337,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + 'Value!' + message: '璇疯緭鍏alue!' }, { pattern: formRule.field.pattern, @@ -363,7 +362,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + 'Label!' + message: '璇疯緭鍏abel!' }, { pattern: formRule.field.pattern, @@ -378,7 +377,7 @@ </Col> <Col span={8}> <Form.Item label={ - <Tooltip placement="topLeft" title={'鐖剁骇瀛楁銆�'}> + <Tooltip placement="topLeft" title="鐖剁骇瀛楁銆�"> <QuestionCircleOutlined className="mk-form-tip" /> Parent </Tooltip> @@ -388,7 +387,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + 'Label!' + message: '璇疯緭鍏abel!' }, { pattern: formRule.field.pattern, @@ -408,7 +407,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + '鎺掑簭!' + message: '璇疯緭鍏ユ帓搴�!' }, { max: formRule.input.max, @@ -448,7 +447,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + '瀹藉害!' + message: '璇疯緭鍏ュ搴�!' } ] })(<InputNumber min={2} max={12} precision={0} />)} diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx index 8f182b8..664ef5b 100644 --- a/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx @@ -16,7 +16,6 @@ class SettingForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� menu: PropTypes.object, // 鑿滃崟淇℃伅 config: PropTypes.object, // 椤甸潰閰嶇疆淇℃伅 inputSubmit: PropTypes.any // 鍥炶溅鎻愪氦浜嬩欢 @@ -255,7 +254,6 @@ <TabPane tab="鏁版嵁婧�" key="setting"> <DataSource menu={menu} - dict={this.props.dict} setting={setting} inputSubmit={this.props.inputSubmit} wrappedComponentRef={(inst) => this.settingForm = inst} @@ -268,7 +266,6 @@ </span> } key="scripts" id="mk-setting-scripts"> <CustomScript - dict={this.props.dict} setting={setting} scripts={scripts} defaultSql={this.state.defaultsql} diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx index 4612793..c3d4de1 100644 --- a/src/templates/subtableconfig/index.jsx +++ b/src/templates/subtableconfig/index.jsx @@ -8,8 +8,6 @@ import moment from 'moment' import Api from '@/api' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import Utils from '@/utils/utils.js' import MKEmitter from '@/utils/events.js' import { updateSubTable } from '@/utils/utils-update.js' @@ -50,7 +48,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, // 瀛楀吀 config: null, // 椤甸潰閰嶇疆 visible: false, // 鎼滅储鏉′欢銆佹寜閽�佹樉绀哄垪锛屾ā鎬佹鏄剧ず鎺у埗 menuloading: false, // 鑿滃崟淇濆瓨涓� @@ -290,7 +287,7 @@ if (!_config.tabName || !_config.tabNo) { notification.warning({ top: 92, - message: this.state.dict['model.menu.basemsg'], + message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒', duration: 5 }) this.setState({activeKey: '0'}) @@ -1037,7 +1034,6 @@ <Panel forceRender={true} header={'鏍囩鍩烘湰淇℃伅'} key="0" id="subtable-basedata"> {/* 鑿滃崟淇℃伅 */} <MenuForm - dict={this.state.dict} config={config} updatemenu={this.updateconfig} /> @@ -1049,7 +1045,7 @@ /> </Panel> {/* 鎼滅储鏉′欢娣诲姞 */} - <Panel header={this.state.dict['header.menu.search']} key="1"> + <Panel header="鎼滅储" key="1"> <div className="search-element"> {Source.searchItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) @@ -1058,7 +1054,7 @@ <FieldsComponent config={config} type="search" /> </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}/>) @@ -1088,7 +1084,7 @@ })} </Panel> {/* 娣诲姞鏄剧ず鍒� */} - <Panel header={this.state.dict['header.menu.column']} key="3"> + <Panel header="鏄剧ず鍒�" key="3"> <div className="search-element"> {Source.columnItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) @@ -1108,10 +1104,10 @@ <div> <Versions MenuId={config.uuid} open_edition={openEdition} updateConfig={this.refreshConfig}/> <ReplaceField type="table" config={config} updateConfig={this.updateconfig}/> - <EditComponent dict={this.state.dict} type="table" options={['search', 'form', 'action', 'columns']} config={config} MenuID={config.uuid} thawButtons={this.state.thawButtons} refresh={this.updateConfig}/> + <EditComponent type="table" options={['search', 'form', 'action', 'columns']} config={config} MenuID={config.uuid} thawButtons={this.state.thawButtons} refresh={this.updateConfig}/> <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={config.enabled} onChange={this.onEnabledChange} /> - <Button type="primary" id="save-config" 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" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>淇濆瓨</Button> + <Button onClick={this.cancelConfig}>杩斿洖</Button> </div> } style={{ width: '100%' }}> <SettingComponent @@ -1199,13 +1195,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> {this.state.loading && <Spin size="large" />} </div> diff --git a/src/templates/subtableconfig/menuform/index.jsx b/src/templates/subtableconfig/menuform/index.jsx index 72f493f..999aa2b 100644 --- a/src/templates/subtableconfig/menuform/index.jsx +++ b/src/templates/subtableconfig/menuform/index.jsx @@ -9,7 +9,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, updatemenu: PropTypes.func } @@ -44,7 +43,7 @@ } render() { - const { dict, config } = this.props + const { config } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -67,7 +66,7 @@ rules: [ { required: true, - message: dict['form.required.input'] + '椤甸潰鍚嶇О!' + message: '璇疯緭鍏ラ〉闈㈠悕绉�!' }, { max: formRule.input.max, @@ -78,13 +77,13 @@ </Form.Item> </Col> <Col span={24}> - <Form.Item label={dict['model.menu'] + dict['model.param']}> + <Form.Item label="鑿滃崟鍙傛暟"> {getFieldDecorator('tabNo', { initialValue: config.tabNo, rules: [ { required: true, - message: dict['form.required.input'] + dict['model.menu'] + dict['model.param'] + '!' + message: '璇疯緭鍏ヨ彍鍗曞弬鏁�!' }, { max: formRule.input.max, @@ -95,7 +94,7 @@ </Form.Item> </Col> <Col span={24}> - <Form.Item label={dict['header.menu.Remark']}> + <Form.Item label="澶囨敞"> {getFieldDecorator('Remark', { initialValue: config.Remark, rules: [ diff --git a/src/templates/subtableconfig/source.jsx b/src/templates/subtableconfig/source.jsx index 1571053..ef337b5 100644 --- a/src/templates/subtableconfig/source.jsx +++ b/src/templates/subtableconfig/source.jsx @@ -1,8 +1,4 @@ import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' - -const CommonDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS class SubTableBaseData { baseConfig = { @@ -173,25 +169,25 @@ searchItems = [ { type: 'search', - label: CommonDict['model.form.text'], + label: '鏂囨湰', subType: 'text', url: '' }, { type: 'search', - label: CommonDict['model.form.select'], + label: '涓嬫媺閫夋嫨', subType: 'select', url: '' }, { type: 'search', - label: CommonDict['model.form.multiselect'], + label: '涓嬫媺澶氶��', subType: 'multiselect', url: '' }, { type: 'search', - label: CommonDict['model.form.link'], + label: '鑱斿姩鑿滃崟', subType: 'link', url: '' }, @@ -215,19 +211,19 @@ }, { type: 'search', - label: CommonDict['model.form.datemonth'], + label: '鏃ユ湡锛堟湀锛�', subType: 'datemonth', url: '' }, { type: 'search', - label: CommonDict['model.form.daterange'], + label: '鏃ユ湡锛堝尯闂达級', subType: 'daterange', url: '' }, { type: 'search', - label: CommonDict['model.form.dategroup'], + label: '鏃ユ湡锛堢粍鍚堬級', subType: 'group', url: '' } @@ -236,55 +232,55 @@ actionItems = [ { type: 'action', - label: CommonDict['model.form.popform'], + label: '寮圭獥锛堣〃鍗曪級', subType: 'pop', url: '' }, { type: 'action', - label: CommonDict['model.form.prompt'], + label: '鎻愮ず妗�', subType: 'prompt', url: '' }, { type: 'action', - label: CommonDict['model.form.exec'], + label: '鐩存帴鎵ц', subType: 'exec', url: '' }, { type: 'action', - label: CommonDict['model.form.excelIn'], + label: '瀵煎叆Excel', subType: 'excelIn', url: '' }, { type: 'action', - label: CommonDict['model.form.excelOut'], + label: '瀵煎嚭Excel', subType: 'excelOut', url: '' }, { type: 'action', - label: CommonDict['model.form.popview'], + label: '寮圭獥锛堟爣绛撅級', subType: 'popview', url: '' }, { type: 'action', - label: CommonDict['model.form.tab'], + label: '鏍囩椤�', subType: 'tab', url: '' }, { type: 'action', - label: CommonDict['model.form.newpage'], + label: '鏂伴〉闈�', subType: 'innerpage', url: '' }, { type: 'action', - label: CommonDict['model.form.funcbutton'], + label: '鍔熻兘鎸夐挳', subType: 'funcbutton', url: '' } @@ -293,37 +289,37 @@ columnItems = [ { type: 'columns', - label: CommonDict['model.form.text'], + label: '鏂囨湰', subType: 'text', url: '' }, { type: 'columns', - label: CommonDict['model.form.picture'], + label: '鍥剧墖', subType: 'picture', url: '' }, { type: 'columns', - label: CommonDict['model.form.number'], + label: '鏁板瓧', subType: 'number', url: '' }, { type: 'columns', - label: CommonDict['model.form.href'], + label: '閾炬帴', subType: 'link', url: '' }, { type: 'columns', - label: CommonDict['model.form.textarea'], + label: '澶氳鏂囨湰', subType: 'textarea', url: '' }, { type: 'columns', - label: CommonDict['model.form.colspan'], + label: '鍚堝苟鍒�', subType: 'colspan', url: '' }, diff --git a/src/templates/treepageconfig/index.jsx b/src/templates/treepageconfig/index.jsx index c5da906..a030308 100644 --- a/src/templates/treepageconfig/index.jsx +++ b/src/templates/treepageconfig/index.jsx @@ -9,8 +9,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import MKEmitter from '@/utils/events.js' import asyncComponent from '@/utils/asyncComponent' @@ -33,7 +31,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, config: null, // 椤甸潰閰嶇疆 formlist: null, // 鎼滅储鏉′欢銆佹寜閽�佹樉绀哄垪琛ㄥ崟瀛楁 menuloading: false, // 鑿滃崟淇濆瓨涓� @@ -220,7 +217,7 @@ if (!_config.fstMenuId || !_config.ParentId || !_config.MenuName || !_config.MenuNo) { notification.warning({ top: 92, - message: this.state.dict['model.menu.basemsg'], + message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒', duration: 5 }) this.setState({activeKey: '0'}) @@ -518,7 +515,7 @@ if (config.isAdd) { // menuID涓嶅瓨鍦ㄦ椂锛屼负鏂板缓鑿滃崟锛屾彁绀鸿彍鍗曞皻鏈繚瀛� notification.warning({ top: 92, - message: this.state.dict['header.menu.config.notsave'], + message: '鑿滃崟灏氭湭淇濆瓨锛岃鍏堜繚瀛樿彍鍗曢厤缃紒', duration: 5 }) } else { @@ -526,7 +523,7 @@ if (!config.fstMenuId || !config.ParentId || !config.MenuName || !config.MenuNo) { notification.warning({ top: 92, - message: this.state.dict['model.menu.basemsg'], + message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒', duration: 5 }) this.setState({activeKey: '0'}) @@ -537,7 +534,7 @@ if (!is(fromJS(originMenu), fromJS(config))) { notification.warning({ top: 92, - message: this.state.dict['header.menu.config.update'], + message: '鑿滃崟閰嶇疆宸蹭慨鏀癸紝璇蜂繚瀛橈紒', duration: 5 }) return @@ -705,17 +702,16 @@ <div className="tools"> <Collapse accordion activeKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}> {/* 鍩烘湰淇℃伅 */} - <Panel forceRender={true} header={this.state.dict['header.menu.basedata']} key="0" id="main-basedata"> + <Panel forceRender={true} header="鍩烘湰淇℃伅" key="0" id="main-basedata"> {/* 鑿滃崟淇℃伅 */} <MenuForm menu={menu} config={config} - dict={this.state.dict} updatemenu={this.updateconfig} /> </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}/>) @@ -753,7 +749,7 @@ } bordered={false} extra={ <div> <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={this.state.config.enabled} onChange={this.onEnabledChange} /> - <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button> + <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>淇濆瓨</Button> <Button onClick={this.cancelConfig}>鍏抽棴</Button> </div> } style={{ width: '100%' }}> @@ -814,13 +810,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="notsave" className="mk-btn mk-yellow" onClick={this.notsave}>{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="notsave" className="mk-btn mk-yellow" onClick={this.notsave}>涓嶄繚瀛�</Button>, + <Button key="cancel" onClick={() => { this.setState({closeVisible: false}) }}>鍙栨秷</Button> ]} destroyOnClose > - {this.state.dict['header.menu.config.placeholder']} + 閰嶇疆宸蹭慨鏀癸紝鏄惁淇濆瓨閰嶇疆淇℃伅锛� </Modal> {this.state.loading && <Spin size="large" />} </div> diff --git a/src/templates/treepageconfig/source.jsx b/src/templates/treepageconfig/source.jsx index 9cd261f..ac4a106 100644 --- a/src/templates/treepageconfig/source.jsx +++ b/src/templates/treepageconfig/source.jsx @@ -1,8 +1,4 @@ import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' - -const CommonDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS class CommonTableBaseData { baseConfig = { @@ -48,7 +44,7 @@ tabItems = [ { type: 'tabs', - label: CommonDict['model.menu.tab.subtable'], + label: '瀛愯〃', subType: 'SubTable', } ] diff --git a/src/templates/zshare/createfunc/index.jsx b/src/templates/zshare/createfunc/index.jsx index b37c619..daa034f 100644 --- a/src/templates/zshare/createfunc/index.jsx +++ b/src/templates/zshare/createfunc/index.jsx @@ -9,7 +9,6 @@ class CreateFunc extends Component { static propTypes = { - dict: PropTypes.object, // 瀛楀吀椤� trigger: PropTypes.func } diff --git a/src/templates/zshare/createinterface/index.jsx b/src/templates/zshare/createinterface/index.jsx index e9f01cf..e8a565b 100644 --- a/src/templates/zshare/createinterface/index.jsx +++ b/src/templates/zshare/createinterface/index.jsx @@ -13,7 +13,6 @@ class CreateInterface extends Component { static propTypes = { - dict: PropTypes.object, // 瀛楀吀椤� trigger: PropTypes.func } @@ -171,10 +170,10 @@ required: true, options: [{ value: 'Y', - text: this.props.dict['model.true'] + text: '鏄�' }, { value: 'N', - text: this.props.dict['model.false'] + text: '鍚�' }] }, { type: 'radio', @@ -184,10 +183,10 @@ required: true, options: [{ value: 'Y', - text: this.props.dict['model.true'] + text: '鏄�' }, { value: 'N', - text: this.props.dict['model.false'] + text: '鍚�' }] }] }) @@ -1125,7 +1124,6 @@ destroyOnClose > <MutilForm - dict={this.props.dict} formlist={this.state.formlist} wrappedComponentRef={(inst) => this.FormRef = inst} /> diff --git a/src/templates/zshare/createinterface/mutilform/index.jsx b/src/templates/zshare/createinterface/mutilform/index.jsx index 918e31e..78db75e 100644 --- a/src/templates/zshare/createinterface/mutilform/index.jsx +++ b/src/templates/zshare/createinterface/mutilform/index.jsx @@ -8,7 +8,6 @@ class MainSearch extends Component { static propTpyes = { formlist: PropTypes.array, // 鎸夐挳淇℃伅銆佽〃鍗曞垪琛� - dict: PropTypes.object // 瀛楀吀椤� } state = { @@ -45,7 +44,7 @@ rules: [ { required: item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' } ] })(<Input placeholder="" autoComplete="off"/>)} @@ -61,7 +60,7 @@ rules: [ { required: item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( @@ -91,7 +90,7 @@ rules: [ { required: item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( diff --git a/src/templates/zshare/customscript/index.jsx b/src/templates/zshare/customscript/index.jsx index c5d3eb8..bd962d5 100644 --- a/src/templates/zshare/customscript/index.jsx +++ b/src/templates/zshare/customscript/index.jsx @@ -17,7 +17,6 @@ class CustomForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� setting: PropTypes.object, // 璁剧疆 scripts: PropTypes.array, // 鑷畾涔夎剼鏈垪琛� searches: PropTypes.array, // 鎼滅储鏉′欢 @@ -76,11 +75,11 @@ dataIndex: 'operation', render: (text, record) => (<div style={{textAlign: 'center'}}> - <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span> - <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record)} style={{color: '#8E44AD'}}><SwapOutlined /></span> + <span className="operation-btn" title="缂栬緫" onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span> + <span className="operation-btn" title="鐘舵�佸垏鎹�" onClick={() => this.handleStatus(record)} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.handleDelete(record) }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> diff --git a/src/templates/zshare/editcard/index.jsx b/src/templates/zshare/editcard/index.jsx index b18e19d..4266f80 100644 --- a/src/templates/zshare/editcard/index.jsx +++ b/src/templates/zshare/editcard/index.jsx @@ -54,8 +54,8 @@ <div className={'ant-card ant-card-bordered ' + (card.selected ? 'selected' : '')} > <div className="base" onClick={this.changeSelect}> <CheckOutlined /> - <p title={card.field}>{this.props.dict['model.form.field']}锛� <span>{card.field}</span></p> - <p title={card.label}>{this.props.dict['model.name']}锛� <span>{card.label}</span></p> + <p title={card.field}>瀛楁锛� <span>{card.field}</span></p> + <p title={card.label}>鍚嶇О锛� <span>{card.label}</span></p> </div> {type === 'search' ? <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected}> @@ -123,18 +123,17 @@ } render() { - const { dict } = this.props const { dataSource, type, loading } = this.state return ( <div className="common-modal-edit-card"> <Row className="search-row"> <Col span={8}> - {!loading ? <Search placeholder={dict['form.required.input'] + dict['model.form.field']} onSearch={value => {this.setState({searchKey: value})}} enterButton /> : null} + {!loading ? <Search placeholder="璇疯緭鍏ュ瓧娈�" onSearch={value => {this.setState({searchKey: value})}} enterButton /> : null} </Col> <Col span={8}> <Button onClick={this.reset}> - {this.props.dict['header.reset']} + 閲嶇疆 </Button> </Col> </Row> @@ -143,7 +142,7 @@ if (item.field.toLowerCase().indexOf(this.state.searchKey.toLowerCase()) >= 0) { return ( <Col key={index} span={8}> - <EditCardCell ref={'cellCard' + index} type={type} card={item} dict={this.props.dict} changeCard={this.changeCard} /> + <EditCardCell ref={'cellCard' + index} type={type} card={item} changeCard={this.changeCard} /> </Col> ) } else { diff --git a/src/templates/zshare/editcomponent/index.jsx b/src/templates/zshare/editcomponent/index.jsx index 3029835..59ef92f 100644 --- a/src/templates/zshare/editcomponent/index.jsx +++ b/src/templates/zshare/editcomponent/index.jsx @@ -8,8 +8,6 @@ import Utils from '@/utils/utils.js' import PasteForm from '@/templates/zshare/pasteform' import TransferForm from '@/templates/zshare/basetransferform' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -23,7 +21,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, thawVisible: false, thawbtnlist: null, pasteVisible: false, @@ -88,13 +85,13 @@ */ thawBtnSubmit = () => { const { thawButtons } = this.props - const { thawbtnlist, dict, targetKeys } = this.state + const { thawbtnlist, targetKeys } = this.state let config = fromJS(this.props.config).toJS() if (targetKeys.length === 0) { notification.warning({ top: 92, - message: dict['form.required.select'] + '瑙e喕鎸夐挳', + message: '璇烽�夋嫨瑙e喕鎸夐挳', duration: 5 }) } else { @@ -200,12 +197,11 @@ render() { const { MenuID } = this.props - const { dict } = this.state return ( <div style={{display: 'inline-block'}}> {MenuID ? <Button className="mk-border-green" onClick={this.handleThaw}><UnlockOutlined /> 瑙e喕鎸夐挳</Button> : null} - <Button style={{borderColor: '#40a9ff', color: '#40a9ff'}} onClick={() => this.setState({pasteVisible: true})}><SnippetsOutlined /> {dict['header.form.paste']}</Button> + <Button style={{borderColor: '#40a9ff', color: '#40a9ff'}} onClick={() => this.setState({pasteVisible: true})}><SnippetsOutlined /> 绮樿创</Button> {/* 瑙e喕鎸夐挳妯℃�佹 */} <Modal title="瑙e喕鎸夐挳" @@ -219,7 +215,7 @@ </Modal> {/* 鎸夐挳閰嶇疆淇℃伅绮樿创澶嶅埗 */} <Modal - title={dict['header.form.paste']} + title="绮樿创" visible={this.state.pasteVisible} width={600} maskClosable={false} diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 2ae0b68..d380c82 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -1,8 +1,4 @@ -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { formRule, btnClasses } from '@/utils/option.js' - -const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS /** * @description 鑾峰彇鏍戝舰椤甸潰璁剧疆琛ㄥ崟閰嶇疆淇℃伅 @@ -57,31 +53,31 @@ { type: 'radio', key: 'interType', - label: Formdict['header.form.intertype'], + label: '鎺ュ彛绫诲瀷', initVal: setting.interType || 'inner', required: false, readonly: false, options: [ - { value: 'inner', text: Formdict['model.interface.inner'] }, - { value: 'outer', text: Formdict['model.interface.outer'] } + { value: 'inner', text: '鍐呴儴' }, + { value: 'outer', text: '澶栭儴' } ] }, { type: 'radio', key: 'sysInterface', - label: Formdict['header.form.sysInterface'], + label: '绯荤粺鎺ュ彛', initVal: setting.sysInterface || 'false', required: false, readonly: false, options: [ - { value: 'true', text: Formdict['model.true'] }, - { value: 'false', text: Formdict['model.false'] } + { value: 'true', text: '鏄�' }, + { value: 'false', text: '鍚�' } ] }, { type: 'text', key: 'interface', - label: Formdict['header.form.interface'], + label: '鎺ュ彛鍦板潃', initVal: setting.sysInterface === 'true' ? (window.GLOB.mainSystemApi || '') : (setting.interface || ''), required: true, readonly: setting.sysInterface === 'true', @@ -95,7 +91,7 @@ { type: 'text', key: 'outerFunc', - label: Formdict['header.form.outerFunc'], + label: '澶栭儴鍑芥暟', initVal: setting.outerFunc || '', required: false, readonly: false, @@ -112,7 +108,7 @@ { type: 'text', key: 'innerFunc', - label: Formdict['header.form.innerFunc'], + label: '鍐呴儴鍑芥暟', initVal: setting.innerFunc || '', tooltip: usefulFields.length ? '寮�澶村彲鐢ㄥ瓧绗︼細' + usefulFields.join(', ') : '', placement: 'bottomLeft', @@ -265,8 +261,8 @@ required: false, readonly: false, options: [ - { value: 'true', text: Formdict['model.true'] }, - { value: 'false', text: Formdict['model.false'] } + { value: 'true', text: '鏄�' }, + { value: 'false', text: '鍚�' } ] }, { @@ -277,8 +273,8 @@ required: false, readonly: false, options: [ - { value: 'true', text: Formdict['model.true'] }, - { value: 'false', text: Formdict['model.false'] } + { value: 'true', text: '鏄�' }, + { value: 'false', text: '鍚�' } ] } ] @@ -324,10 +320,7 @@ text: '鏃ユ湡锛堝ぉ锛�' }, { value: 'datemonth', - text: Formdict['model.form.datemonth'] - // }, { - // value: 'daterange', - // text: Formdict['model.form.daterange'] + text: '鏃ユ湡锛堟湀锛�' }] } else { @@ -390,14 +383,14 @@ { type: 'text', key: 'label', - label: Formdict['model.name'], + label: '鍚嶇О', initVal: card.label || '', required: true }, { type: 'text', key: 'field', - label: Formdict['model.form.field'], + label: '瀛楁', initVal: card.field || '', required: true, options: columns @@ -405,7 +398,7 @@ { type: 'select', key: 'type', - label: Formdict['model.form.type'], + label: '绫诲瀷', initVal: card.type, required: true, options: typeOptions @@ -420,7 +413,7 @@ { type: 'text', key: 'initval', - label: Formdict['header.form.initval'], + label: '鍒濆鍊�', tooltip: '绫诲瀷涓轰笅鎷夎彍鍗曟椂锛屽垵濮嬪�煎簲涓烘暟鎹殑Value鍊硷紙浣跨敤鏁版嵁婧愭椂锛屽簲涓恒�婂�悸峰瓧娈点�嬬殑鍊硷級;绫诲瀷涓烘暟鍊硷紙鍖洪棿锛夋椂锛屽垵濮嬪�间娇鐢ㄩ�楀彿鎷兼帴锛屼緥濡� 3,10', initVal: card.initval, required: false @@ -433,10 +426,10 @@ required: true, options: [{ value: '0', - text: Formdict['header.form.custom'] + text: '鑷畾涔�' }, { value: '1', - text: Formdict['header.form.datasource'] + text: '鏁版嵁婧�' }] }, // { @@ -446,10 +439,10 @@ // initVal: card.setAll || 'true', // options: [{ // value: 'true', - // text: Formdict['model.true'] + // text: '鏄�' // }, { // value: 'false', - // text: Formdict['model.false'] + // text: '鍚�' // }] // }, { @@ -524,7 +517,7 @@ { type: 'codemirror', key: 'dataSource', - label: Formdict['header.form.datasource'], + label: '鏁版嵁婧�', initVal: card.dataSource || '', required: true }, @@ -612,16 +605,16 @@ initVal: card.orderType || 'asc', options: [{ value: 'asc', - text: Formdict['header.form.asc'] + text: '姝e簭' }, { value: 'desc', - text: Formdict['header.form.desc'] + text: '鍊掑簭' }] }, { type: 'select', key: 'match', - label: Formdict['header.form.match'], + label: '鍖归厤妯″紡', initVal: card.match || 'like', required: true, options: [] @@ -644,7 +637,7 @@ key: 'ratio', min: 1, max: 24, - label: Formdict['header.form.ratio'], + label: '姣斾緥', tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', initVal: card.ratio || 6, forbid: appType === 'mob', @@ -684,27 +677,27 @@ { type: 'radio', key: 'required', - label: Formdict['model.required'], + label: '蹇呭~', initVal: card.required || 'false', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'Hide', - label: Formdict['model.hidden'], + label: '闅愯棌', initVal: card.Hide || 'false', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -729,10 +722,10 @@ // tooltip: '鏁版嵁鏌ヨ鏃讹紝绫诲瀷瀛楁鏄惁浣滀负鍙傛暟浼犻�掞紝绫诲瀷瀛楁瀵瑰簲鍊间负 {"鏃�": "day", "鍛�": "week", "鏈�": "month", "瀛�": "quarter", "骞�": "year", "鑷畾涔�": "customized"}銆�', // options: [{ // value: 'true', - // text: Formdict['model.true'] + // text: '鏄�' // }, { // value: 'false', - // text: Formdict['model.false'] + // text: '鍚�' // }] // }, { @@ -782,10 +775,10 @@ forbid: appType === 'mob' || position === 'header', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -845,7 +838,7 @@ { type: 'multiselect', key: 'blacklist', - label: Formdict['header.form.blacklist'], + label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, options: roleList || [], @@ -867,31 +860,31 @@ let opentypes = [ { value: 'pop', - text: Formdict['model.form.popform'] + text: '寮圭獥锛堣〃鍗曪級' }, { value: 'prompt', - text: Formdict['model.form.prompt'] + text: '鎻愮ず妗�' }, { value: 'exec', - text: Formdict['model.form.exec'] + text: '鐩存帴鎵ц' }, { value: 'excelIn', - text: Formdict['model.form.excelIn'] + text: '瀵煎叆Excel' }, { value: 'excelOut', - text: Formdict['model.form.excelOut'] + text: '瀵煎嚭Excel' }, { value: 'popview', - text: Formdict['model.form.popview'] + text: '寮圭獥锛堟爣绛撅級' }, { value: 'tab', - text: Formdict['model.form.tab'] + text: '鏍囩椤�' }, { value: 'innerpage', - text: Formdict['model.form.newpage'] + text: '鏂伴〉闈�' }, { value: 'funcbutton', - text: Formdict['model.form.funcbutton'] + text: '鍔熻兘鎸夐挳' } ] @@ -942,7 +935,7 @@ { type: 'select', key: 'OpenType', - label: Formdict['header.form.openType'], + label: '鎵撳紑鏂瑰紡', initVal: card.OpenType, required: true, options: opentypes @@ -994,24 +987,24 @@ { type: 'select', key: 'execMode', - label: Formdict['model.form.execMode'], + label: '鎵ц鏂瑰紡', initVal: card.execMode || 'exec', required: true, options: [{ value: 'exec', - text: Formdict['model.form.exec'] + text: '鐩存帴鎵ц' }, { value: 'prompt', - text: Formdict['model.form.prompt'] + text: '鎻愮ず妗�' }, { value: 'pop', - text: Formdict['model.form.popform'] + text: '寮圭獥锛堣〃鍗曪級' }] }, { type: 'radio', key: 'intertype', - label: Formdict['header.form.intertype'], + label: '鎺ュ彛绫诲瀷', initVal: card.intertype || 'system', required: true, options: [] @@ -1037,7 +1030,7 @@ { type: 'radio', key: 'sqlType', - label: Formdict['header.form.action.type'], + label: '鎿嶄綔绫诲瀷', initVal: card.sqlType || '', required: true, options: [] @@ -1045,14 +1038,14 @@ { type: 'text', key: 'sql', - label: Formdict['model.form.tablename'], + label: '琛ㄥ悕', initVal: card.sql || config.setting.tableName || '', required: true }, { type: 'text', key: 'innerFunc', - label: Formdict['header.form.innerFunc'], + label: '鍐呴儴鍑芥暟', initVal: card.innerFunc || '', tooltip: usefulFields.length ? `鍑芥暟鍚嶇О闇�浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬨�俙 : '', fields: usefulFields, @@ -1085,7 +1078,7 @@ { type: 'select', key: 'pageTemplate', - label: Formdict['model.form.newpage.type'], + label: '椤甸潰绫诲瀷', initVal: card.pageTemplate || '', required: true, options: [{ @@ -1099,10 +1092,10 @@ text: '鍗曟嵁鎵撳嵃' }, { value: 'pay', - text: Formdict['model.pay'] + text: '鏀粯' }, { value: 'custom', - text: Formdict['header.form.custom'] + text: '鑷畾涔�' }] }, { @@ -1116,28 +1109,28 @@ { type: 'text', key: 'url', - label: Formdict['model.pageUrl'], + label: '椤甸潰鍦板潃', initVal: card.url || '', required: true }, { type: 'radio', key: 'sysInterface', - label: Formdict['header.form.sysInterface'], + label: '绯荤粺鎺ュ彛', initVal: card.sysInterface || 'false', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'text', key: 'outerFunc', - label: Formdict['header.form.outerFunc'], + label: '澶栭儴鍑芥暟', initVal: card.outerFunc || '', required: false, readonly: false @@ -1218,7 +1211,7 @@ { type: 'text', key: 'callbackFunc', - label: Formdict['header.form.callbackFunc'], + label: '鍥炶皟鍑芥暟', initVal: card.callbackFunc || '', required: true, readonly: false @@ -1231,16 +1224,16 @@ required: true, options: [{ value: 'toolbar', - text: Formdict['header.form.toolbar'] + text: '宸ュ叿鏍�' }, { value: 'grid', - text: Formdict['header.form.grid'] + text: '琛ㄦ牸' }] }, { type: 'select', key: 'Ot', - label: Formdict['header.form.isRequired'], + label: '琛岃缃�', initVal: card.Ot || 'requiredSgl', required: true, options: [] @@ -1248,7 +1241,7 @@ { type: 'cascader', key: 'linkmenu', - label: Formdict['model.form.linkmenu'], + label: '鍏宠仈鑿滃崟', initVal: card.linkmenu || [], required: true, options: menulist @@ -1264,7 +1257,7 @@ { type: refresh.length === 0 ? 'radio' : 'select', key: 'execSuccess', - label: Formdict['model.form.afterSuccess'], + label: '鎴愬姛鍚�', initVal: card.execSuccess || 'grid', tooltip: '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺��', required: true, @@ -1283,7 +1276,7 @@ { type: refresh.length === 0 ? 'radio' : 'select', key: 'execError', - label: Formdict['model.form.afterError'], + label: '澶辫触鍚�', initVal: card.execError || 'never', tooltip: '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺��', required: true, @@ -1302,7 +1295,7 @@ { type: refresh.length === 0 ? 'radio' : 'select', key: 'popClose', - label: Formdict['header.form.popClose'], + label: '鍏抽棴鍚�', initVal: card.popClose || 'never', required: true, options: [{ @@ -1331,14 +1324,14 @@ { type: 'icon', key: 'icon', - label: Formdict['model.icon'], + label: '鍥炬爣', initVal: card.icon, required: false }, { type: 'select', key: 'class', - label: Formdict['model.form.color'], + label: '棰滆壊', initVal: card.class, required: false, options: btnClasses @@ -1371,21 +1364,21 @@ { type: 'radio', key: 'joint', - label: Formdict['model.form.paramJoint'], + label: '鎷兼帴鍙傛暟', initVal: card.joint || 'true', required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'text', key: 'sheet', - label: Formdict['model.form.tablename'], + label: '琛ㄥ悕', initVal: card.sheet || config.setting.tableName || '', required: true }, @@ -1397,10 +1390,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -1584,14 +1577,14 @@ { type: 'text', key: 'label', - label: Formdict['model.name'], + label: '鍚嶇О', initVal: card.label, required: true }, { type: 'text', key: 'field', - label: Formdict['model.form.field'], + label: '瀛楁', initVal: card.field, required: true, readonly: false @@ -1599,27 +1592,27 @@ { type: 'select', key: 'type', - label: Formdict['model.form.type'], + label: '绫诲瀷', initVal: card.type, required: true, options: [{ value: 'text', - text: Formdict['model.form.text'] + text: '鏂囨湰' }, { value: 'number', - text: Formdict['model.form.number'] + text: '鏁板瓧' }, { value: 'picture', - text: Formdict['model.form.picture'] + text: '鍥剧墖' }, { value: 'video', text: '瑙嗛' }, { value: 'link', - text: Formdict['model.form.href'] + text: '閾炬帴' }, { value: 'textarea', - text: Formdict['model.form.textarea'] + text: '澶氳鏂囨湰' }, { value: 'index', text: '搴忓彿' @@ -1628,7 +1621,7 @@ { type: 'text', key: 'nameField', - label: Formdict['model.name'] + Formdict['model.form.field'], + label: '鍚嶇О瀛楁', initVal: card.nameField, required: false, readonly: false @@ -1639,67 +1632,67 @@ min: 1, max: 1000, decimal: 0, - label: Formdict['model.form.columnWidth'], + label: '鍒楀', initVal: card.Width, required: true }, { type: 'radio', key: 'joint', - label: Formdict['model.form.paramJoint'], + label: '鎷兼帴鍙傛暟', initVal: card.joint || 'true', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'Hide', - label: Formdict['model.hidden'], + label: '闅愯棌', initVal: card.Hide || 'false', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'IsSort', - label: Formdict['model.sort'], + label: '鎺掑簭', initVal: card.IsSort || 'true', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'Align', - label: Formdict['model.form.align'], + label: '瀵归綈鏂瑰紡', initVal: card.Align || 'left', required: true, options: [{ value: 'left', - text: Formdict['model.form.alignLeft'] + text: '宸﹀榻�' }, { value: 'center', - text: Formdict['model.form.alignCenter'] + text: '灞呬腑' }, { value: 'right', - text: Formdict['model.form.alignRight'] + text: '鍙冲榻�' }] }, { @@ -1731,10 +1724,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -1746,10 +1739,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -1758,21 +1751,21 @@ min: 0, max: 18, decimal: 0, - label: Formdict['header.form.decimal'], + label: '灏忔暟浣�', initVal: card.decimal || 0, required: true }, { type: 'number', key: 'fieldlength', - label: Formdict['model.form.field'] + Formdict['model.length'], + label: '瀛楁闀垮害', initVal: card.fieldlength || (card.type === 'text' ? 50 : 512), required: true }, { type: 'select', key: 'format', - label: Formdict['header.form.format'], + label: '鏍煎紡鍖�', initVal: card.format || 'none', options: [{ value: 'none', @@ -1792,7 +1785,7 @@ { type: 'select', key: 'textFormat', - label: Formdict['header.form.format'], + label: '鏍煎紡鍖�', initVal: card.textFormat || 'none', options: [{ value: 'none', @@ -1812,7 +1805,7 @@ { type: 'text', key: 'prefix', - label: Formdict['header.form.prefix'], + label: '鍓嶇紑', initVal: card.prefix || '', required: false, readonly: false @@ -1820,7 +1813,7 @@ { type: 'text', key: 'postfix', - label: Formdict['header.form.postfix'], + label: '鍚庣紑', initVal: card.postfix || '', tooltipClass: 'middle', required: false, @@ -1870,10 +1863,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -1895,7 +1888,7 @@ { type: 'cascader', key: 'linkmenu', - label: Formdict['model.menu'], + label: '鑿滃崟', initVal: card.linkmenu || [], required: true, options: menulist @@ -1918,7 +1911,7 @@ { type: 'multiselect', key: 'blacklist', - label: Formdict['header.form.blacklist'], + label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, options: roleList @@ -1970,7 +1963,7 @@ { type: 'text', key: 'title', - label: Formdict['header.form.title'], + label: '鏍囬', initVal: card.title, required: false }, @@ -1996,15 +1989,15 @@ { type: 'radio', key: 'Hide', - label: Formdict['model.hidden'], + label: '闅愯棌', initVal: card.Hide, required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -2082,7 +2075,7 @@ { type: 'multiselect', key: 'blacklist', - label: Formdict['header.form.blacklist'], + label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, options: roleList @@ -2272,10 +2265,10 @@ forbid: !['line', 'bar'].includes(card.chartType), options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -2574,7 +2567,7 @@ { type: 'text', key: 'label', - label: Formdict['model.name'], + label: '鍚嶇О', initVal: card.label, required: true, readonly: false @@ -2582,7 +2575,7 @@ { type: 'text', key: 'field', - label: Formdict['model.form.field'], + label: '瀛楁', initVal: card.field || '', required: true, readonly: false @@ -2590,7 +2583,7 @@ { type: 'select', key: 'type', - label: Formdict['model.form.type'], + label: '绫诲瀷', initVal: card.type, required: true, options: _openType @@ -2598,7 +2591,7 @@ { type: 'text', key: 'initval', - label: Formdict['header.form.initval'], + label: '鍒濆鍊�', initVal: initval, required: false }, @@ -2723,10 +2716,10 @@ // initVal: card.setAll || 'false', // options: [{ // value: 'true', - // text: Formdict['model.true'] + // text: '鏄�' // }, { // value: 'false', - // text: Formdict['model.false'] + // text: '鍚�' // }] // }, { @@ -2748,7 +2741,7 @@ { type: 'codemirror', key: 'dataSource', - label: Formdict['header.form.datasource'], + label: '鏁版嵁婧�', initVal: card.dataSource || '', required: true, readonly: false @@ -2816,10 +2809,10 @@ initVal: card.orderType || 'asc', options: [{ value: 'asc', - text: Formdict['header.form.asc'] + text: '姝e簭' }, { value: 'desc', - text: Formdict['header.form.desc'] + text: '鍊掑簭' }] }, { @@ -3007,7 +3000,7 @@ min: 0, max: 18, precision: 0, - label: Formdict['header.form.decimal'], + label: '灏忔暟浣�', initVal: card.decimal || 0, required: true }, @@ -3017,7 +3010,7 @@ min: 1, max: 100000, precision: 0, - label: Formdict['model.form.field'] + Formdict['model.length'], + label: '瀛楁闀垮害', // tooltip: '鏂囨湰銆佷笅鎷夋銆佹棩鏈熺瓑瀛楁榛樿闀垮害涓�50锛屽琛屾枃鏈笌鏂囦欢涓婁紶瀛楁榛樿闀垮害涓�512', initVal: card.fieldlength || _fieldlength, required: true @@ -3098,10 +3091,10 @@ initVal: card.hidden || 'false', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3111,10 +3104,10 @@ initVal: card.readonly || 'false', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3124,10 +3117,10 @@ initVal: card.required || 'true', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3199,10 +3192,10 @@ initVal: card.writein || 'true', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3264,10 +3257,10 @@ initVal: card.hidelabel || 'false', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3348,10 +3341,10 @@ tooltip: '鎻愪氦鏃讹紝鏄惁鎴彇棣栧熬鐨勭┖鐧藉瓧绗︺��', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3787,7 +3780,7 @@ { type: 'multiselect', key: 'blacklist', - label: Formdict['header.form.blacklist'], + label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, options: roleList, @@ -3810,14 +3803,14 @@ { type: 'text', key: 'label', - label: Formdict['header.menu.tabName'], + label: '鏍囩鍚嶇О', initVal: card.label || '', required: true }, { type: 'select', key: 'linkTab', - label: Formdict['header.form.linkTab'], + label: '鍏宠仈鏍囩', initVal: card.linkTab || '', required: false, options: [] @@ -3825,7 +3818,7 @@ { type: 'icon', key: 'icon', - label: Formdict['model.icon'], + label: '鍥炬爣', initVal: card.icon || '', required: false, forbid: type === 'CalendarPage' @@ -3833,7 +3826,7 @@ { type: 'select', key: 'supMenu', - label: Formdict['header.form.supTab'], + label: '涓婄骇鏍囩', initVal: supMenu, required: false, options: menus, @@ -3842,7 +3835,7 @@ { type: 'mutilselect', key: 'equalTab', - label: Formdict['header.form.equalTab'], + label: '鍚岀骇鏍囩', tooltip: '濡傛灉瀛愭爣绛句腑鍚湁鍒锋柊鍚岀骇鏍囩鐨勬寜閽紝鍦ㄦ澶勬坊鍔犻渶瑕佸埛鏂扮殑鏍囩銆�', initVal: equalTab, required: false, diff --git a/src/templates/zshare/menuform/index.jsx b/src/templates/zshare/menuform/index.jsx index d6bd07f..b3ce1f3 100644 --- a/src/templates/zshare/menuform/index.jsx +++ b/src/templates/zshare/menuform/index.jsx @@ -6,7 +6,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� formlist: PropTypes.array } @@ -53,7 +52,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.input'] + item.label + '!' + message: '璇疯緭鍏�' + item.label + '!' }, { max: formRule.input.max, @@ -73,7 +72,7 @@ rules: [ { required: !!item.required, - message: this.props.dict['form.required.select'] + item.label + '!' + message: '璇烽�夋嫨' + item.label + '!' } ] })( diff --git a/src/templates/zshare/modalform/datatable/index.jsx b/src/templates/zshare/modalform/datatable/index.jsx index 31e23ed..7492418 100644 --- a/src/templates/zshare/modalform/datatable/index.jsx +++ b/src/templates/zshare/modalform/datatable/index.jsx @@ -146,7 +146,6 @@ class EdiDataTable extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� transfield: PropTypes.object, // 瀛楁鍚嶇О type: PropTypes.string, // 鏄惁涓哄叧鑱旇〃鍗� display: PropTypes.string, // 鏁版嵁绫诲瀷锛屾枃鏈�佸浘鐗� @@ -264,7 +263,7 @@ <span className="hide-control" title="鏄剧ず/闅愯棌" onClick={() => {editingKey === '' && this.handleHide(record.key)}}><SwapOutlined /></span> {editingKey === '' ? <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.handleDelete(record.key) }> <span className="danger"><DeleteOutlined /></span> diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx index 9be8093..74ed039 100644 --- a/src/templates/zshare/modalform/index.jsx +++ b/src/templates/zshare/modalform/index.jsx @@ -46,7 +46,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� formlist: PropTypes.any, standardform: PropTypes.any, card: PropTypes.object, @@ -565,7 +564,6 @@ getFields() { const { getFieldDecorator } = this.props.form - const { dict } = this.props const { transfield } = this.state const fields = [] @@ -581,7 +579,7 @@ if (item.type === 'text') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' }, + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' }, { pattern: /^[^']*$/ig, message: '涓嶅彲浣跨敤鑻辨枃鐘舵�佺殑鍗曞紩鍙凤紒' @@ -610,7 +608,7 @@ content = <Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} /> } else if (item.type === 'number') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] initVal = item.initVal @@ -621,7 +619,7 @@ } } else if (item.type === 'select') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Select showSearch @@ -649,7 +647,7 @@ </Select> } else if (item.type === 'radio') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] initVal = item.initVal @@ -662,7 +660,7 @@ </Radio.Group> } else if (item.type === 'checkbox') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] initVal = item.initVal @@ -671,7 +669,7 @@ </Checkbox.Group> } else if (item.type === 'codemirror') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] span = 24 className = 'text-area' @@ -685,7 +683,7 @@ span = 24 className = 'text-msg' rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] content = <TextArea rows={item.rows || 4}/> @@ -716,7 +714,7 @@ if (this.record.linkField) { type = 'link' } - content = <DataTable dict={this.props.dict} type={type} display={this.record.display} linkSubFields={linkSubFields} transfield={transfield} fields={this.record.fields || []} onChange={this.changeOptions}/> + content = <DataTable type={type} display={this.record.display} linkSubFields={linkSubFields} transfield={transfield} fields={this.record.fields || []} onChange={this.changeOptions}/> } } else if (item.type === 'fields') { span = 24 @@ -729,13 +727,13 @@ } else if (item.type === 'color') { className = 'color-form-item' rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <ColorSketch allowClear={true}/> } else if (item.type === 'icon') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <MkEditIcon allowClear /> diff --git a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx index ce8b2f5..e702c44 100644 --- a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx +++ b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx @@ -11,7 +11,6 @@ class CustomForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� btn: PropTypes.object, // 鎸夐挳淇℃伅 initsql: PropTypes.string, // 鍒濆鍖栬剼鏈� usefulfields: PropTypes.string, // 鍙敤瀛楁 @@ -293,7 +292,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + 'sql!' + message: '璇疯緭鍏ql!' } ] })(<CodeMirror />)} diff --git a/src/templates/zshare/verifycard/contrastform/index.jsx b/src/templates/zshare/verifycard/contrastform/index.jsx index 50cdead..19f4de9 100644 --- a/src/templates/zshare/verifycard/contrastform/index.jsx +++ b/src/templates/zshare/verifycard/contrastform/index.jsx @@ -5,7 +5,6 @@ class UniqueForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� contrastChange: PropTypes.func // 淇敼鍑芥暟 } @@ -40,26 +39,26 @@ <Form {...formItemLayout} className="verify-form" id="verifycard1"> <Row gutter={24}> <Col span={7}> - <Form.Item label={'鍐呭1'}> + <Form.Item label="鍐呭1"> {getFieldDecorator('frontfield', { initialValue: '', rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鍐呭1!' + message: '璇疯緭鍏ュ唴瀹�1!' } ] })(<Input placeholder="" autoComplete="off" />)} </Form.Item> </Col> <Col span={7}> - <Form.Item label={'杩愮畻绗�'}> + <Form.Item label="杩愮畻绗�"> {getFieldDecorator('operator', { initialValue: '=', rules: [ { required: true, - message: this.props.dict['form.required.select'] + '杩愮畻绗�!' + message: '璇烽�夋嫨杩愮畻绗�!' } ] })( @@ -77,13 +76,13 @@ </Form.Item> </Col> <Col span={7}> - <Form.Item label={'鍐呭2'}> + <Form.Item label="鍐呭2"> {getFieldDecorator('backfield', { initialValue: '', rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鍐呭2!' + message: '璇疯緭鍏ュ唴瀹�2!' } ] })(<Input placeholder="" autoComplete="off" />)} @@ -91,17 +90,17 @@ </Col> <Col span={3} className="add"> <Button onClick={this.handleConfirm} type="primary" className="mk-green"> - {this.props.dict['model.add']} + 娣诲姞 </Button> </Col> <Col span={7}> - <Form.Item label={'鎻愮ず淇℃伅'}> + <Form.Item label="鎻愮ず淇℃伅"> {getFieldDecorator('errmsg', { initialValue: '', rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鎻愮ず淇℃伅!' + message: '璇疯緭鍏ユ彁绀轰俊鎭�!' }, { pattern: /^[^']*$/ig, @@ -118,7 +117,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鎶ラ敊缂栫爜!' + message: '璇烽�夋嫨鎶ラ敊缂栫爜!' } ] })( diff --git a/src/templates/zshare/verifycard/customform/index.jsx b/src/templates/zshare/verifycard/customform/index.jsx index 1b96426..8938b1c 100644 --- a/src/templates/zshare/verifycard/customform/index.jsx +++ b/src/templates/zshare/verifycard/customform/index.jsx @@ -10,7 +10,6 @@ class CustomForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� btn: PropTypes.object, // 鎸夐挳 usefulfields: PropTypes.string, // 鍙敤瀛楁 initsql: PropTypes.string, // 鍙敤瀛楁 @@ -175,13 +174,13 @@ </Form.Item> </Col> <Col span={21} className="sql"> - <Form.Item label={'sql'}> + <Form.Item label="sql"> {getFieldDecorator('sql', { initialValue: '', rules: [ { required: true, - message: this.props.dict['form.required.input'] + 'sql!' + message: '璇疯緭鍏ql!' } ] })(<CodeMirror />)} @@ -206,7 +205,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '缁撴灉澶勭悊!' + message: '璇烽�夋嫨缁撴灉澶勭悊!' } ] })( @@ -218,13 +217,13 @@ </Form.Item> </Col> <Col span={7}> - <Form.Item label={'鎻愮ず淇℃伅'}> + <Form.Item label="鎻愮ず淇℃伅"> {getFieldDecorator('errmsg', { initialValue: '', rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鎻愮ず淇℃伅!' + message: '璇疯緭鍏ユ彁绀轰俊鎭�!' }, { pattern: /^[^']*$/ig, @@ -241,7 +240,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鎶ラ敊缂栫爜!' + message: '璇烽�夋嫨鎶ラ敊缂栫爜!' } ] })( diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx index e5542bd..6535615 100644 --- a/src/templates/zshare/verifycard/customscript/index.jsx +++ b/src/templates/zshare/verifycard/customscript/index.jsx @@ -12,7 +12,6 @@ class CustomForm extends Component { static propTpyes = { type: PropTypes.any, - dict: PropTypes.object, // 瀛楀吀椤� btn: PropTypes.object, // 鎸夐挳淇℃伅 usefulfields: PropTypes.string, // 鍙敤瀛楁 initsql: PropTypes.string, // sql鍓嶇紑 @@ -335,7 +334,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + 'sql!' + message: '璇疯緭鍏ql!' } ] })(<CodeMirror />)} diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index 13e1b46..86ece6e 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -33,7 +33,6 @@ static propTpyes = { btnTab: PropTypes.any, // 琛ㄥ崟鏍囩椤碉紙鎸夐挳锛夊弬鏁� config: PropTypes.any, // 琛ㄥ崟鏍囩椤靛弬鏁� - dict: PropTypes.object, // 瀛楀吀椤� card: PropTypes.object, // 鎸夐挳淇℃伅 columns: PropTypes.array } @@ -288,11 +287,11 @@ dataIndex: 'operation', render: (text, record) => (<div style={{textAlign: 'center'}}> - <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record, 'customverify')} style={{color: '#1890ff'}}><EditOutlined /></span> - <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record, 'customverify')} style={{color: '#8E44AD'}}><SwapOutlined /></span> + <span className="operation-btn" title="缂栬緫" onClick={() => this.handleEdit(record, 'customverify')} style={{color: '#1890ff'}}><EditOutlined /></span> + <span className="operation-btn" title="鐘舵�佸垏鎹�" onClick={() => this.handleStatus(record, 'customverify')} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.handleDelete(record, 'customverify') }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> @@ -357,11 +356,11 @@ dataIndex: 'operation', render: (text, record) => (<div style={{textAlign: 'center'}}> - <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span> - <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> + <span className="operation-btn" title="缂栬緫" onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span> + <span className="operation-btn" title="鐘舵�佸垏鎹�" onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.handleDelete(record, 'scripts') }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> @@ -424,11 +423,11 @@ dataIndex: 'operation', render: (text, record) => (<div style={{textAlign: 'center'}}> - <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record, 'cbscripts')} style={{color: '#1890ff'}}><EditOutlined /></span> - <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record, 'cbscripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> + <span className="operation-btn" title="缂栬緫" onClick={() => this.handleEdit(record, 'cbscripts')} style={{color: '#1890ff'}}><EditOutlined /></span> + <span className="operation-btn" title="鐘舵�佸垏鎹�" onClick={() => this.handleStatus(record, 'cbscripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.handleDelete(record, 'cbscripts') }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> @@ -438,7 +437,7 @@ ], orderColumns: [ { - title: this.props.dict['header.form.funcvar'], + title: '鍑芥暟鍙橀噺', dataIndex: 'fieldName', width: '12%', render: (text, record) => (`${record.fieldName || ''}(${record.field})`) @@ -525,11 +524,11 @@ dataIndex: 'operation', render: (text, record) => (<div style={{textAlign: 'center'}}> - <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record, 'ordercode')} style={{color: '#1890ff'}}><EditOutlined /></span> - <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record, 'ordercode')} style={{color: '#8E44AD'}}><SwapOutlined /></span> + <span className="operation-btn" title="缂栬緫" onClick={() => this.handleEdit(record, 'ordercode')} style={{color: '#1890ff'}}><EditOutlined /></span> + <span className="operation-btn" title="鐘舵�佸垏鎹�" onClick={() => this.handleStatus(record, 'ordercode')} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.handleDelete(record, 'ordercode') }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> @@ -1532,7 +1531,7 @@ {verify.contrasts.length ? <span className="count-tip">{verify.contrasts.length}</span> : null} </span> } key="contrasts"> - <ContrastForm dict={this.props.dict} contrastChange={this.contrastChange}/> + <ContrastForm contrastChange={this.contrastChange}/> <EditTable actions={['edit', 'move', 'copy', 'del', 'status']} type="contrastverify" data={verify.contrasts} columns={contrastColumns} onChange={(contrasts) => this.setState({verify: {...verify, contrasts}})}/> </TabPane> : null} {verifyInter === 'system' ? <TabPane tab={ @@ -1542,7 +1541,6 @@ </span> } key="customverifys" id="mk-custom-script"> <CustomForm - dict={this.props.dict} btn={this.props.card} initsql={this.state.initsql} usefulfields={this.state.usefulfields} @@ -1578,7 +1576,6 @@ <UniqueForm btn={card} fields={card.Ot !== 'requiredOnce' ? uniqueFields : columnsFields} - dict={this.props.dict} uniqueChange={this.uniqueChange} /> <EditTable actions={['edit', 'move', 'del', 'status']} data={verify.uniques} columns={card.Ot !== 'requiredOnce' ? uniqueColumns : onceUniqueColumns} onChange={this.changeUniques}/> @@ -1590,7 +1587,6 @@ </span> } key="voucher"> <VoucherForm - dict={this.props.dict} voucher={voucher} columns={this.props.columns} voucherobj={verify.voucher} @@ -1618,7 +1614,6 @@ }}/> <CustomScript btn={this.props.card} - dict={this.props.dict} initsql={this.state.initsql} customScripts={verify.scripts} defaultsql={this.state.defaultsql} @@ -1637,7 +1632,6 @@ } key="cbScripts" id="mk-callback-script"> <CallBackCustomScript btn={this.props.card} - dict={this.props.dict} initsql={this.state.initsql} customScripts={verify.cbScripts} usefulfields={this.state.usefulfields} @@ -1782,7 +1776,7 @@ <span className="operation-btn" onClick={() => this.handleStatus(item, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" - title={this.props.dict['model.query.delete']} + title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.handleDelete(item, 'scripts') }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> @@ -1795,7 +1789,6 @@ <CustomScript type="fullscreen" btn={this.props.card} - dict={this.props.dict} initsql={this.state.initsql} customScripts={verify.scripts} defaultsql={this.state.defaultsql} diff --git a/src/templates/zshare/verifycard/uniqueform/index.jsx b/src/templates/zshare/verifycard/uniqueform/index.jsx index 8566289..556e2d4 100644 --- a/src/templates/zshare/verifycard/uniqueform/index.jsx +++ b/src/templates/zshare/verifycard/uniqueform/index.jsx @@ -5,8 +5,7 @@ class UniqueForm extends Component { static propTpyes = { - btn: PropTypes.object, // 瀛楀吀椤� - dict: PropTypes.object, // 瀛楀吀椤� + btn: PropTypes.object, fields: PropTypes.array, // 琛ㄥ崟瀛楁 uniqueChange: PropTypes.func // 淇敼鍑芥暟 } @@ -55,13 +54,13 @@ <Form {...formItemLayout} className="verify-form" id="verifycard1"> <Row gutter={24}> <Col span={7}> - <Form.Item label={'瀛楁鍚�'}> + <Form.Item label="瀛楁鍚�"> {getFieldDecorator('field', { initialValue: [], rules: [ { required: true, - message: this.props.dict['form.required.select'] + '瀛楁鍚�!' + message: '璇烽�夋嫨瀛楁鍚�!' } ] })( @@ -76,13 +75,13 @@ </Form.Item> </Col> {btn.Ot !== 'requiredOnce' ? <Col span={7}> - <Form.Item label={'鎶ラ敊缂栫爜'}> + <Form.Item label="鎶ラ敊缂栫爜"> {getFieldDecorator('errorCode', { initialValue: 'E', rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鎶ラ敊缂栫爜!' + message: '璇烽�夋嫨鎶ラ敊缂栫爜!' } ] })( @@ -96,13 +95,13 @@ </Form.Item> </Col> : null} {btn.Ot !== 'requiredOnce' ? <Col span={7}> - <Form.Item label={'楠岃瘉绫诲瀷'}> + <Form.Item label="楠岃瘉绫诲瀷"> {getFieldDecorator('verifyType', { initialValue: 'physical', rules: [ { required: true, - message: this.props.dict['form.required.select'] + '楠岃瘉绫诲瀷!' + message: '璇烽�夋嫨楠岃瘉绫诲瀷!' } ] })( @@ -115,7 +114,7 @@ </Col> : null} <Col span={3} className="add"> <Button onClick={this.handleConfirm} className="mk-green"> - {this.props.dict['model.add']} + 娣诲姞 </Button> </Col> </Row> diff --git a/src/templates/zshare/verifycard/voucherform/index.jsx b/src/templates/zshare/verifycard/voucherform/index.jsx index 6341055..7dd3ba2 100644 --- a/src/templates/zshare/verifycard/voucherform/index.jsx +++ b/src/templates/zshare/verifycard/voucherform/index.jsx @@ -6,7 +6,6 @@ class UniqueForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� voucherobj: PropTypes.object, // 鍑瘉淇℃伅 voucher: PropTypes.array, // 琛ㄥ崟 columns: PropTypes.array, // 琛ㄥ崟 @@ -167,7 +166,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '涓荤被鍨�!' + message: '璇烽�夋嫨涓荤被鍨�!' } ] })( @@ -181,13 +180,13 @@ </Form.Item> </Col> <Col span={11}> - <Form.Item label={'鍑瘉绫诲瀷'}> + <Form.Item label="鍑瘉绫诲瀷"> {getFieldDecorator('VoucherType', { initialValue: voucherobj.VoucherType || (this.state.voucher[0] && this.state.voucher[0].ID) || '', rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鍑瘉绫诲瀷!' + message: '璇烽�夋嫨鍑瘉绫诲瀷!' } ] })( @@ -206,13 +205,13 @@ </Form.Item> </Col> <Col span={11}> - <Form.Item label={'鍑瘉鏍囪瘑'}> + <Form.Item label="鍑瘉鏍囪瘑"> {getFieldDecorator('VoucherTypeOne', { initialValue: voucherobj.VoucherTypeOne || (this.state.voucherDetail[0] && this.state.voucherDetail[0].ModularDetailCode) || '', rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鍑瘉鏍囪瘑!' + message: '璇烽�夋嫨鍑瘉鏍囪瘑!' } ] })( @@ -231,13 +230,13 @@ </Form.Item> </Col> <Col span={11}> - <Form.Item label={'鍏宠仈瀛楁'}> + <Form.Item label="鍏宠仈瀛楁"> {getFieldDecorator('linkField', { initialValue: voucherobj.linkField || (columns[0] && columns[0].field) || '', rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鍏宠仈瀛楁!' + message: '璇烽�夋嫨鍏宠仈瀛楁!' } ] })( diff --git a/src/utils/option.js b/src/utils/option.js index 2183750..fac69e0 100644 --- a/src/utils/option.js +++ b/src/utils/option.js @@ -1,5 +1,3 @@ -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import nortable from '@/assets/img/normaltable.jpg' // import mainsubtable from '@/assets/img/mainsubtable.jpg' import treepage from '@/assets/img/treepage.jpg' @@ -7,8 +5,6 @@ import customImg from '@/assets/img/custom.jpg' import newpage from '@/assets/img/newpage.jpg' import rolemanage from '@/assets/img/rolemanage.jpg' - -const _dict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS // 琛ㄥ崟鏍¢獙瑙勫垯 export const formRule = { @@ -113,7 +109,7 @@ // 鏃ユ湡榛樿鍊奸�夋嫨鑼冨洿 export const dateOptions = { date: [ - {value: '', text: _dict['model.empty']}, + {value: '', text: '绌�'}, {value: '0', text: '浠婂ぉ'}, {value: 1, text: '鏄ㄥぉ'}, {value: 2, text: '鍓嶅ぉ'}, @@ -136,7 +132,7 @@ {value: -7300, text: '鍚�20骞�'}, ], dateweek: [ - {value: '', text: _dict['model.empty']}, + {value: '', text: '绌�'}, {value: '0', text: '鏈懆'}, {value: 1, text: '涓婂懆'}, {value: 3, text: '鍓嶄笁鍛�'}, @@ -144,7 +140,7 @@ {value: -1, text: '涓嬪懆'} ], datemonth: [ - {value: '', text: _dict['model.empty']}, + {value: '', text: '绌�'}, {value: '0', text: '鏈湀'}, {value: 1, text: '涓婃湀'}, {value: 3, text: '鍓嶄笁鏈�'}, @@ -152,7 +148,7 @@ {value: -1, text: '涓嬫湀'} ], daterange: [ - {value: '', text: _dict['model.empty']}, + {value: '', text: '绌�'}, {value: '[0, 0]', text: '浠婂ぉ'}, {value: '[1, 1]', text: '鏄ㄥぉ'}, {value: '[3, 0]', text: '杩戜笁澶�'}, @@ -167,7 +163,7 @@ {value: 'month', text: '鏈湀'}, ], datetime: [ - {value: '', text: _dict['model.empty']}, + {value: '', text: '绌�'}, {value: '0', text: '褰撳墠'}, {value: 1, text: '鏄ㄥぉ'}, {value: 3, text: '鍓嶄笁澶�'}, diff --git a/src/views/imdesign/index.jsx b/src/views/imdesign/index.jsx index 3092a93..2d6eeab 100644 --- a/src/views/imdesign/index.jsx +++ b/src/views/imdesign/index.jsx @@ -7,8 +7,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/mob.js' -import enUS from '@/locales/en-US/mob.js' import antdEnUS from 'antd/es/locale/en_US' import antdZhCN from 'antd/es/locale/zh_CN' // import MKEmitter from '@/utils/events.js' @@ -36,7 +34,6 @@ class ImDesign extends Component { state = { localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS, - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, loading: true, MenuId: '', MenuName: '', @@ -66,7 +63,6 @@ this.setState({ localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS, - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS }) this.getAppMessage(param.MenuID) } else if (param.type === 'view') { @@ -469,7 +465,7 @@ } render () { - const { localedict, loading, settingshow, controlshow, dict, MenuId, config, menuloading } = this.state + const { localedict, loading, settingshow, controlshow, MenuId, config, menuloading } = this.state return ( <ConfigProvider locale={localedict}> @@ -487,13 +483,12 @@ <Panel header="鍩烘湰淇℃伅" forceRender key="basedata"> {/* 鑿滃崟淇℃伅 */} {config ? <MenuForm - dict={dict} config={config} MenuId={MenuId} updateConfig={this.updateConfig} /> : null} </Panel> - <Panel header={'椤甸潰鏍峰紡'} key="background"> + <Panel header="椤甸潰鏍峰紡" key="background"> {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null} </Panel> </Collapse> @@ -505,7 +500,7 @@ {!controlshow ? <DoubleLeftOutlined onClick={() => {this.setState({controlshow: true})}}/> : null} </div> <div className="wrap"> - <Button type="primary" onClick={this.submitConfig} id="save-config" loading={menuloading}>{dict['mob.save']}</Button> + <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> diff --git a/src/views/imdesign/menuform/index.jsx b/src/views/imdesign/menuform/index.jsx index 0fb6e84..58c2ece 100644 --- a/src/views/imdesign/menuform/index.jsx +++ b/src/views/imdesign/menuform/index.jsx @@ -6,7 +6,6 @@ class CustomMenuForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, MenuId: PropTypes.string, adapters: PropTypes.array, @@ -26,7 +25,7 @@ } render() { - const { dict, config } = this.props + const { config } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -43,26 +42,26 @@ <Form {...formItemLayout} className="custom-menu-form"> <Row> <Col span={24}> - <Form.Item label={dict['mob.menu'] + dict['mob.name']}> + <Form.Item label="鑿滃崟鍚嶇О"> {getFieldDecorator('MenuName', { initialValue: config.MenuName, rules: [ { required: true, - message: dict['mob.required.input'] + dict['mob.menu'] + dict['mob.name'] + '!' + message: '璇疯緭鍏ヨ彍鍗曞悕绉�!' } ] })(<Input placeholder="" autoComplete="off" onChange={this.changeName}/>)} </Form.Item> </Col> <Col span={24}> - <Form.Item label={dict['mob.menu'] + dict['mob.param']}> + <Form.Item label="鑿滃崟鍙傛暟"> {getFieldDecorator('MenuNo', { initialValue: config.MenuNo, rules: [ { required: true, - message: dict['mob.required.input'] + dict['mob.menu'] + dict['mob.param'] + '!' + message: '璇疯緭鍏ヨ彍鍗曞弬鏁�!' } ] })(<Input placeholder="" autoComplete="off" onChange={this.changeNo}/>)} diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index 9803a5f..8aa1af1 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -88,6 +88,11 @@ sessionStorage.setItem('mk_user_type', res.mk_user_type || '') sessionStorage.setItem('localRole_id', res.role_id || '') + if (res.paas_externalDatabase) { + sessionStorage.setItem('externalDatabase', res.paas_externalDatabase) + window.GLOB.externalDatabase = `[${res.paas_externalDatabase}]..` + } + localStorage.setItem(_href + 'lang', param.lang || 'zh-CN') sessionStorage.setItem('lang', param.lang || 'zh-CN') @@ -183,6 +188,11 @@ sessionStorage.setItem('organization', res.organization || '') sessionStorage.setItem('mk_user_type', res.mk_user_type || '') sessionStorage.setItem('localRole_id', res.role_id || '') + + if (res.paas_externalDatabase) { + sessionStorage.setItem('externalDatabase', res.paas_externalDatabase) + window.GLOB.externalDatabase = `[${res.paas_externalDatabase}]..` + } localStorage.setItem(_href + 'lang', param.lang || 'zh-CN') sessionStorage.setItem('lang', param.lang || 'zh-CN') @@ -229,6 +239,11 @@ sessionStorage.setItem('organization', res.organization || '') sessionStorage.setItem('mk_user_type', res.mk_user_type || '') sessionStorage.setItem('localRole_id', res.role_id || '') + + if (res.paas_externalDatabase) { + sessionStorage.setItem('externalDatabase', res.paas_externalDatabase) + window.GLOB.externalDatabase = `[${res.paas_externalDatabase}]..` + } sessionStorage.removeItem('visitorUserID') sessionStorage.removeItem('visitorLoginUID') diff --git a/src/views/menudesign/homeform/index.jsx b/src/views/menudesign/homeform/index.jsx index db119a5..f865639 100644 --- a/src/views/menudesign/homeform/index.jsx +++ b/src/views/menudesign/homeform/index.jsx @@ -9,7 +9,6 @@ class CustomMenuForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, updateConfig: PropTypes.func } @@ -112,7 +111,7 @@ } render() { - const { dict, config } = this.props + const { config } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -164,7 +163,7 @@ rules: [ { required: true, - message: dict['mob.required.input'] + '鏃堕暱!' + message: '璇疯緭鍏ユ椂闀�!' } ] })( diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index 357f02f..7e761fe 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -12,8 +12,6 @@ import Api from '@/api' import options from '@/store/options.js' import Utils, { setGLOBFuncs } from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/mob.js' -import enUS from '@/locales/en-US/mob.js' // import antdEnUS from 'antd/es/locale/en_US' import antdZhCN from 'antd/es/locale/zh_CN' import MKEmitter from '@/utils/events.js' @@ -55,7 +53,6 @@ class MenuDesign extends Component { state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, MenuType: '', MenuId: '', ParentId: '', @@ -1081,7 +1078,7 @@ } render () { - const { activeKey, comloading, MenuType, dict, MenuId, config, settingshow, ParentId, menuloading, customComponents, eyeopen } = this.state + const { activeKey, comloading, MenuType, MenuId, config, settingshow, ParentId, menuloading, customComponents, eyeopen } = this.state return ( <ConfigProvider locale={_locale}> @@ -1098,7 +1095,6 @@ <Panel header="鍩烘湰淇℃伅" key="basedata"> {/* 鑿滃崟淇℃伅 */} {config && MenuType === 'custom' ? <MenuForm - dict={dict} config={config} MenuId={MenuId} parentId={ParentId} @@ -1107,12 +1103,10 @@ updateConfig={this.updateConfig} /> : null} {config && MenuType === 'home' ? <HomeForm - dict={dict} config={config} updateConfig={this.updateConfig} /> : null} {config && MenuType === 'billPrint' ? <PrintMenuForm - dict={dict} config={config} updateConfig={this.updateConfig} /> : null} @@ -1150,8 +1144,8 @@ <PictureController/> <StyleCombControlButton menu={config} /> <PasteController insert={this.insert} /> - <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config && config.enabled} onChange={this.onEnabledChange} /> - <Button type="primary" id="save-config" onClick={this.submitConfig} loading={menuloading}>{dict['mob.save']}</Button> + <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={config && config.enabled} onChange={this.onEnabledChange} /> + <Button type="primary" id="save-config" onClick={this.submitConfig} loading={menuloading}>淇濆瓨</Button> <Button type="default" onClick={this.closeView}>鍏抽棴</Button> </div> } style={{ width: '100%' }}> diff --git a/src/views/menudesign/menuform/index.jsx b/src/views/menudesign/menuform/index.jsx index 05349bb..5f217c5 100644 --- a/src/views/menudesign/menuform/index.jsx +++ b/src/views/menudesign/menuform/index.jsx @@ -11,7 +11,6 @@ class CustomMenuForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, MenuId: PropTypes.string, MenuName: PropTypes.string, @@ -185,7 +184,7 @@ } render() { - const { dict, MenuName, MenuNo, config } = this.props + const { MenuName, MenuNo, config } = this.props const { menulist, smenulist } = this.state const { getFieldDecorator } = this.props.form const formItemLayout = { @@ -203,13 +202,13 @@ <Form {...formItemLayout} className="custom-menu-form"> <Row> <Col span={24}> - <Form.Item label={dict['mob.menu.first'] + dict['mob.menu']}> + <Form.Item label="涓�绾ц彍鍗�"> {getFieldDecorator('fstMenuId', { initialValue: '', rules: [ { required: true, - message: dict['mob.required.select'] + dict['mob.menu.first'] + dict['mob.menu'] + '!' + message: '璇烽�夋嫨涓�绾ц彍鍗�!' } ] })( @@ -224,13 +223,13 @@ </Form.Item> </Col> <Col span={24}> - <Form.Item label={dict['mob.menu.second'] + dict['mob.menu']}> + <Form.Item label="浜岀骇鑿滃崟"> {getFieldDecorator('parentId', { initialValue: '', rules: [ { required: true, - message: dict['mob.required.select'] + dict['mob.menu.second'] + dict['mob.menu'] + '!' + message: '璇烽�夋嫨浜岀骇鑿滃崟!' } ] })( @@ -245,26 +244,26 @@ </Form.Item> </Col> <Col span={24}> - <Form.Item label={dict['mob.menu'] + dict['mob.name']}> + <Form.Item label="鑿滃崟鍚嶇О"> {getFieldDecorator('MenuName', { initialValue: MenuName, rules: [ { required: true, - message: dict['mob.required.input'] + dict['mob.menu'] + dict['mob.name'] + '!' + message: '璇疯緭鍏ヨ彍鍗曞悕绉�!' } ] })(<Input placeholder="" autoComplete="off" onChange={this.changeName}/>)} </Form.Item> </Col> <Col span={24}> - <Form.Item label={dict['mob.menu'] + dict['mob.param']}> + <Form.Item label="鑿滃崟鍙傛暟"> {getFieldDecorator('MenuNo', { initialValue: MenuNo, rules: [ { required: true, - message: dict['mob.required.input'] + dict['mob.menu'] + dict['mob.param'] + '!' + message: '璇疯緭鍏ヨ彍鍗曞弬鏁�!' } ] })(<Input placeholder="" autoComplete="off" onChange={this.changeNo}/>)} @@ -277,7 +276,7 @@ rules: [ { required: true, - message: dict['form.required.select'] + dict['model.openway'] + '!' + message: '璇烽�夋嫨鎵撳紑鏂瑰紡!' } ] })( @@ -341,7 +340,7 @@ rules: [ { required: true, - message: dict['mob.required.input'] + '鏃堕暱!' + message: '璇疯緭鍏ユ椂闀�!' } ] })( @@ -350,14 +349,14 @@ </Form.Item> </Col> : null} <Col span={24}> - <Form.Item label={dict['mob.menu.easycode']}> + <Form.Item label="鍔╄鐮�"> {getFieldDecorator('easyCode', { initialValue: config.easyCode })(<Input placeholder="" autoComplete="off" onChange={this.changeEasyCode}/>)} </Form.Item> </Col> <Col span={24}> - <Form.Item label={'闅愯棌鑿滃崟'}> + <Form.Item label="闅愯棌鑿滃崟"> <Switch checkedChildren={'鏄�'} checked={config.hidden === 'true'} unCheckedChildren={'鍚�'} onChange={(value) => { this.selectChange('hidden', value + '') }} /> diff --git a/src/views/menudesign/printmenuform/index.jsx b/src/views/menudesign/printmenuform/index.jsx index 3831b6a..181163f 100644 --- a/src/views/menudesign/printmenuform/index.jsx +++ b/src/views/menudesign/printmenuform/index.jsx @@ -7,7 +7,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, updateConfig: PropTypes.func } @@ -117,7 +116,7 @@ } render() { - const { dict, config } = this.props + const { config } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -140,7 +139,7 @@ rules: [ { required: true, - message: dict['mob.required.input'] + '鎵撳嵃灏哄!' + message: '璇烽�夋嫨鎵撳嵃灏哄!' } ] })( @@ -159,7 +158,7 @@ rules: [ { required: true, - message: dict['mob.required.select'] + '鎵撳嵃甯冨眬!' + message: '璇烽�夋嫨鎵撳嵃甯冨眬!' } ] })( @@ -177,7 +176,7 @@ rules: [ { required: true, - message: dict['mob.required.select'] + '鎵撳嵃杈硅窛!' + message: '璇烽�夋嫨鎵撳嵃杈硅窛!' } ] })( @@ -207,7 +206,7 @@ rules: [ { required: true, - message: dict['mob.required.input'] + '棣栭〉鏁�!' + message: '璇疯緭鍏ラ椤垫暟!' } ] })(<InputNumber min={1} max={1000} precision={1} onChange={this.changeFirstCount}/>)} @@ -220,7 +219,7 @@ rules: [ { required: true, - message: dict['mob.required.input'] + '姣忛〉鏁�!' + message: '璇疯緭鍏ユ瘡椤垫暟!' } ] })(<InputNumber min={1} max={1000} precision={1} onChange={this.changeCount}/>)} diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index 6725d55..384ca4e 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -10,8 +10,6 @@ import Api from '@/api' import Utils, { setGLOBFuncs } from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/mob.js' -import enUS from '@/locales/en-US/mob.js' import antdZhCN from 'antd/es/locale/zh_CN' import MKEmitter from '@/utils/events.js' import MenuUtils from '@/utils/utils-custom.js' @@ -62,7 +60,6 @@ class MobDesign extends Component { state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, loading: true, MenuId: '', MenuName: '', @@ -98,9 +95,6 @@ sessionStorage.setItem('userbind', param.userbind || '') sessionStorage.setItem('instantMessage', param.instantMessage || '') - this.setState({ - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS - }) this.getAppMessage(param.MenuID) } else if (param.type === 'view') { window.GLOB.winWidth = 420 @@ -1974,7 +1968,7 @@ render () { - const { viewType, comloading, loading, settingshow, controlshow, activeKey, dict, MenuId, config, menuloading, customComponents, adapters, eyeopen } = this.state + const { viewType, comloading, loading, settingshow, controlshow, activeKey, MenuId, config, menuloading, customComponents, adapters, eyeopen } = this.state return ( <ConfigProvider locale={antdZhCN}> @@ -1993,7 +1987,6 @@ <Panel header="鍩烘湰淇℃伅" forceRender className="basedata" key="basedata"> {/* 鑿滃崟淇℃伅 */} {config ? <MenuForm - dict={dict} config={config} MenuId={MenuId} adapters={adapters} @@ -2005,7 +1998,7 @@ {config ? <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>鑿滃崟ID</Paragraph> : null} </Panel> {/* 缁勪欢娣诲姞 */} - <Panel header={dict['mob.component']} className="component" key="component"> + <Panel header="缁勪欢" className="component" key="component"> <SourceWrap /> </Panel> <Panel header="鍏冪礌" key="element"> @@ -2026,8 +2019,8 @@ {!controlshow ? <DoubleLeftOutlined onClick={() => {this.setState({controlshow: true})}}/> : null} </div> <div className="wrap"> - <Button type="primary" onClick={this.submitConfig} id="save-config" loading={menuloading}>{dict['mob.save']}</Button> - <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config && config.enabled} onChange={this.onEnabledChange} /> + <Button type="primary" onClick={this.submitConfig} id="save-config" loading={menuloading}>淇濆瓨</Button> + <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={config && config.enabled} onChange={this.onEnabledChange} /> <ArrowLeftOutlined title="鍚庨��" className="back-view" onClick={this.backView}/> <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 缁勪欢鍚�</Button> <CreateView resetmenu={this.getAppMenus} /> diff --git a/src/views/mobdesign/menuform/index.jsx b/src/views/mobdesign/menuform/index.jsx index 60d0442..14fae1f 100644 --- a/src/views/mobdesign/menuform/index.jsx +++ b/src/views/mobdesign/menuform/index.jsx @@ -12,7 +12,6 @@ class CustomMenuForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, MenuId: PropTypes.string, adapters: PropTypes.array, @@ -54,7 +53,7 @@ } render() { - const { dict, config, adapters } = this.props + const { config, adapters } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -71,26 +70,26 @@ <Form {...formItemLayout} className="custom-menu-form"> <Row> <Col span={24}> - <Form.Item label={dict['mob.menu'] + dict['mob.name']}> + <Form.Item label="鑿滃崟鍚嶇О"> {getFieldDecorator('MenuName', { initialValue: config.MenuName, rules: [ { required: true, - message: dict['mob.required.input'] + dict['mob.menu'] + dict['mob.name'] + '!' + message: '璇疯緭鍏ヨ彍鍗曞悕绉�!' } ] })(<Input placeholder="" autoComplete="off" onChange={this.changeName}/>)} </Form.Item> </Col> <Col span={24}> - <Form.Item label={dict['mob.menu'] + dict['mob.param']}> + <Form.Item label="鑿滃崟鍙傛暟"> {getFieldDecorator('MenuNo', { initialValue: config.MenuNo, rules: [ { required: true, - message: dict['mob.required.input'] + dict['mob.menu'] + dict['mob.param'] + '!' + message: '璇疯緭鍏ヨ彍鍗曞弬鏁�!' } ] })(<Input placeholder="" autoComplete="off" onChange={this.changeNo}/>)} @@ -166,7 +165,7 @@ rules: [ { required: true, - message: dict['mob.required.input'] + '鏃堕暱!' + message: '璇疯緭鍏ユ椂闀�!' } ] })( @@ -239,7 +238,7 @@ rules: [ { required: true, - message: dict['mob.required.input'] + '鍋滅暀鏃堕棿!' + message: '璇疯緭鍏ュ仠鐣欐椂闂�!' } ] })( diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index 87c59d9..06059cb 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -10,8 +10,6 @@ import Api from '@/api' import Utils, { setGLOBFuncs } from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/mob.js' -import enUS from '@/locales/en-US/mob.js' // import antdEnUS from 'antd/es/locale/en_US' import antdZhCN from 'antd/es/locale/zh_CN' import MKEmitter from '@/utils/events.js' @@ -57,7 +55,6 @@ class MenuDesign extends Component { state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, loading: true, MenuId: '', MenuName: '', @@ -97,9 +94,6 @@ sessionStorage.setItem('kei_no', param.kei_no || '') sessionStorage.setItem('sysBgColor', param.sysBgColor || '#ffffff') - this.setState({ - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS - }) this.getAppMessage(param.MenuID) } else if (param.type === 'view') { this.setState({ @@ -1883,7 +1877,7 @@ } render () { - const { loading, comloading, activeKey, settingshow, controlshow, dict, MenuId, config, menuloading, customComponents, eyeopen } = this.state + const { loading, comloading, activeKey, settingshow, controlshow, MenuId, config, menuloading, customComponents, eyeopen } = this.state return ( <ConfigProvider locale={antdZhCN}> @@ -1901,7 +1895,6 @@ <Panel header="鍩烘湰淇℃伅" key="basedata"> {/* 鑿滃崟淇℃伅 */} {config ? <MenuForm - dict={dict} config={config} MenuId={MenuId} updateConfig={this.updateConfig} @@ -1912,7 +1905,7 @@ {config ? <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>鑿滃崟ID</Paragraph> : null} </Panel> {/* 缁勪欢娣诲姞 */} - <Panel header={dict['mob.component']} key="component"> + <Panel header="缁勪欢" key="component"> <SourceWrap /> </Panel> <Panel header="鍏冪礌" key="element"> @@ -1933,8 +1926,8 @@ {!controlshow ? <DoubleLeftOutlined onClick={() => {sessionStorage.setItem('controlshow', 'true'); this.setState({controlshow: true})}}/> : null} </div> <div className="wrap"> - <Button type="primary" id="save-config" onClick={this.submitConfig} loading={menuloading}>{dict['mob.save']}</Button> - <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config && config.enabled} onChange={this.onEnabledChange} /> + <Button type="primary" id="save-config" onClick={this.submitConfig} loading={menuloading}>淇濆瓨</Button> + <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={config && config.enabled} onChange={this.onEnabledChange} /> <ArrowLeftOutlined title="鍚庨��" className="back-view" onClick={this.backView}/> <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 缁勪欢鍚�</Button> <CreateView resetmenu={this.getAppMenus} /> diff --git a/src/views/pcdesign/menuform/index.jsx b/src/views/pcdesign/menuform/index.jsx index 8b16673..8dd5777 100644 --- a/src/views/pcdesign/menuform/index.jsx +++ b/src/views/pcdesign/menuform/index.jsx @@ -9,7 +9,6 @@ class CustomMenuForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, MenuId: PropTypes.string, updateConfig: PropTypes.func @@ -52,7 +51,7 @@ } render() { - const { dict, config } = this.props + const { config } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -69,26 +68,26 @@ <Form {...formItemLayout} className="custom-menu-form"> <Row> <Col span={24}> - <Form.Item label={dict['mob.menu'] + dict['mob.name']}> + <Form.Item label="鑿滃崟鍚嶇О"> {getFieldDecorator('MenuName', { initialValue: config.MenuName, rules: [ { required: true, - message: dict['mob.required.input'] + dict['mob.menu'] + dict['mob.name'] + '!' + message: '璇疯緭鍏ヨ彍鍗曞悕绉�!' } ] })(<Input placeholder="" autoComplete="off" onChange={this.changeName}/>)} </Form.Item> </Col> <Col span={24}> - <Form.Item label={dict['mob.menu'] + dict['mob.param']}> + <Form.Item label="鑿滃崟鍙傛暟"> {getFieldDecorator('MenuNo', { initialValue: config.MenuNo, rules: [ { required: true, - message: dict['mob.required.input'] + dict['mob.menu'] + dict['mob.param'] + '!' + message: '璇疯緭鍏ヨ彍鍗曞弬鏁�!' } ] })(<Input placeholder="" autoComplete="off" onChange={this.changeNo}/>)} @@ -164,7 +163,7 @@ rules: [ { required: true, - message: dict['mob.required.input'] + '鏃堕暱!' + message: '璇疯緭鍏ユ椂闀�!' } ] })( -- Gitblit v1.8.0