| | |
| | | editingKey: '', |
| | | visible: false, |
| | | columns: [{ |
| | | title: '名称', |
| | | title: window.GLOB.dict['name'] || '名称', |
| | | dataIndex: 'label', |
| | | width: '25%' |
| | | }, { |
| | | title: '快捷键', |
| | | title: window.GLOB.dict['shortcut'] || '快捷键', |
| | | dataIndex: 'shortcut', |
| | | inputType: 'cascader', |
| | | editable: true, |
| | |
| | | return text[0] + '+' + shortkeycode[text[1]] |
| | | } |
| | | }, { |
| | | title: '打印机', |
| | | title: window.GLOB.dict['printer'] || '打印机', |
| | | dataIndex: 'printer', |
| | | inputType: 'select', |
| | | editable: true, |
| | | options: [], |
| | | width: '25%' |
| | | }, { |
| | | title: '操作', |
| | | title: window.GLOB.dict['operation'] || '操作', |
| | | dataIndex: 'operation', |
| | | width: '140px', |
| | | render: (text, record) => { |
| | |
| | | width: '26.1%' |
| | | }, |
| | | { |
| | | title: '打印机', |
| | | title: window.GLOB.dict['printer'] || '打印机', |
| | | dataIndex: 'printer', |
| | | inputType: 'select', |
| | | editable: true, |
| | | options: [], |
| | | }, |
| | | { |
| | | title: '操作', |
| | | title: window.GLOB.dict['operation'] || '操作', |
| | | dataIndex: 'operation', |
| | | width: '153px', |
| | | render: (text, record) => { |
| | |
| | | components: null, // 组件集合 |
| | | revertLoading: false, // 恢复默认设置 |
| | | confirmLoading: false, // 自定义设置模态框加载中 |
| | | dict: window.GLOB.dict, |
| | | lang: sessionStorage.getItem('lang') |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { components, visible } = this.state |
| | | const { components, visible, dict, lang } = this.state |
| | | |
| | | if (window.GLOB.mkHS || window.GLOB.sysType !== 'local') return null |
| | | |
| | | return ( |
| | | <div className="tool-wrap"> |
| | | <Tooltip placement="left" title="自定义设置"> |
| | | <Tooltip placement="left" title={dict['custom_settings'] || '自定义设置'}> |
| | | <Button icon="setting" shape="circle" onClick={this.trigger}/> |
| | | </Tooltip> |
| | | <Modal |
| | | wrapClassName="custom-setting-modal" |
| | | title="自定义设置" |
| | | title={dict['custom_settings'] || '自定义设置'} |
| | | maskClosable={false} |
| | | width={950} |
| | | visible={visible} |
| | | onCancel={() => { this.setState({ visible: false }) }} |
| | | footer={[ |
| | | <Button key="revert" type="danger" loading={this.state.revertLoading} onClick={this.settingRevert}>恢复默认设置</Button>, |
| | | <Button key="cancel" onClick={() => { this.setState({ visible: false }) }}>取消</Button>, |
| | | <Button key="confirm" type="primary" loading={this.state.confirmLoading} onClick={this.settingSubmit}>提交</Button> |
| | | <Button key="revert" type="danger" loading={this.state.revertLoading} onClick={this.settingRevert}>{dict['restore_default'] || '恢复默认设置'}</Button>, |
| | | <Button key="cancel" onClick={() => { this.setState({ visible: false }) }}>{dict['cancel'] || '取消'}</Button>, |
| | | <Button key="confirm" type="primary" loading={this.state.confirmLoading} onClick={this.settingSubmit}>{dict['submit'] || '提交'}</Button> |
| | | ]} |
| | | destroyOnClose |
| | | > |
| | | <div className="tip">注:行级按钮快捷键设置无效。</div> |
| | | {lang !== 'en-US' ? <div className="tip">注:行级按钮快捷键设置无效。</div> : null} |
| | | {components && components.length > 0 ? components.map(item => ( |
| | | <div key={item.uuid}> |
| | | <p className="component-title">{item.title}</p> |
| | |
| | | } else if (item.type === 'group') { |
| | | traversal(item.components) |
| | | } else { |
| | | if (item.wrap && item.wrap.title) { |
| | | sql.push(item.wrap.title) |
| | | } |
| | | |
| | | if (item.setting && (!item.wrap || !item.wrap.datatype || item.wrap.datatype === 'dynamic')) { |
| | | if (item.setting.interType === 'system') { |
| | | filterSql(item.setting.dataresource) |
| | |
| | | } else if (item.type === 'group') { |
| | | traversal(item.components) |
| | | } else { |
| | | if (item.wrap && item.wrap.title) { |
| | | if (titDict[item.wrap.title]) { |
| | | item.wrap.title = titDict[item.wrap.title] |
| | | } |
| | | } |
| | | if (item.wrap && (item.wrap.click === 'menu' || item.wrap.click === 'menus')) { |
| | | if (item.wrap.click === 'menu') { |
| | | resetMenu(item.wrap) |