| | |
| | | const { confirm } = Modal |
| | | |
| | | const MenuForm = asyncComponent(() => import('./menuform')) |
| | | const Header = asyncComponent(() => import('@/menu/header')) |
| | | const SourceWrap = asyncComponent(() => import('@/menu/modulesource')) |
| | | const MenuShell = asyncComponent(() => import('@/menu/menushell')) |
| | | const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) |
| | |
| | | const { activeKey, MenuType, dict, config, menuloading, customComponents } = this.state |
| | | |
| | | return ( |
| | | <div className="pc-poper-view"> |
| | | <Header /> |
| | | <DndProvider backend={HTML5Backend}> |
| | | <div className="menu-body"> |
| | | <div className="menu-setting"> |
| | |
| | | </div> |
| | | </div> |
| | | </DndProvider> |
| | | </div> |
| | | ) |
| | | } |
| | | } |
| | |
| | | .pc-poper-view { |
| | | background: #000; |
| | | min-height: 100vh; |
| | | >.menu-body { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | overflow-x: hidden; |
| | | position: relative; |
| | | background: #ffffff; |
| | | padding: 50px 0px 0px 0px; |
| | | |
| | | .menu-setting { |
| | | position: fixed; |
| | | left: 0; |
| | | top: 48px; |
| | | z-index: 10; |
| | | height: calc(100vh - 48px); |
| | | width: 300px; |
| | | background: #ffffff; |
| | | box-shadow: 0px 2px 5px #bcbcbc; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | |
| | | > .ant-collapse { |
| | | background-color: #ffffff; |
| | | .ant-collapse-item.ant-collapse-item-active { |
| | | border-bottom: 1px solid #d9d9d9; |
| | | } |
| | | .ant-collapse-header { |
| | | padding: 11px 16px 10px 40px; |
| | | border-bottom: 1px solid #d9d9d9; |
| | | background: #1890ff; |
| | | color: #ffffff; |
| | | } |
| | | .ant-collapse-content-box { |
| | | .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | .model-table-tablemanage-view { |
| | | >.ant-list { |
| | | margin-top: 20px; |
| | | .ant-list-item { |
| | | display: -webkit-box; |
| | | padding-right: 20px; |
| | | position: relative; |
| | | padding-left: 5px; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | min-height: 55px; |
| | | width: 100%; |
| | | .anticon { |
| | | position: absolute; |
| | | top: 0px; |
| | | right: 0px; |
| | | padding: 3px 3px 10px 10px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | } |
| | | >.tables { |
| | | width: 66.66666667%!important; |
| | | } |
| | | >.ant-form-item-label { |
| | | width: 33.33333333%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | >.ant-tabs { |
| | | >.ant-tabs-bar { |
| | | border-bottom: 1px solid #181F29; |
| | | margin-bottom: 0px; |
| | | min-height: 48px; |
| | | .ant-tabs-tab { |
| | | padding: 14px 16px; |
| | | color: rgba(255, 255, 255, 0.85); |
| | | } |
| | | .ant-tabs-tab-active.ant-tabs-tab { |
| | | color: #1890ff; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .menu-setting::-webkit-scrollbar { |
| | | width: 4px; |
| | | } |
| | | .menu-setting::-webkit-scrollbar-thumb { |
| | | border-radius: 5px; |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.08); |
| | | background: rgba(0, 0, 0, 0.08); |
| | | } |
| | | .menu-setting::-webkit-scrollbar-track { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); |
| | | border-radius: 3px; |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | } |
| | | |
| | | .menu-view { |
| | | position: relative; |
| | | width: calc(100vw - 300px); |
| | | margin-left: 300px; |
| | | height: calc(100vh - 50px); |
| | | overflow-y: auto; |
| | | |
| | | > .ant-card { |
| | | >.ant-card-head { |
| | | margin-bottom: 0px; |
| | | position: relative; |
| | | .ant-card-head-title { |
| | | color: #1890ff; |
| | | padding: 5px 0; |
| | | } |
| | | .ant-card-extra { |
| | | padding: 5px 0; |
| | | button { |
| | | margin-left: 20px; |
| | | } |
| | | .ant-switch.big { |
| | | min-width: 60px; |
| | | height: 28px; |
| | | line-height: 28px; |
| | | margin-top: -2px; |
| | | .ant-switch-inner { |
| | | font-size: 14px; |
| | | } |
| | | } |
| | | .ant-switch.big:after { |
| | | width: 24px; |
| | | height: 24px; |
| | | } |
| | | } |
| | | } |
| | | >.ant-card-body { |
| | | padding: 0px; |
| | | } |
| | | } |
| | | } |
| | | .menu-view.saving { |
| | | .anticon-tool { |
| | | display: none; |
| | | } |
| | | } |
| | | .menu-view::-webkit-scrollbar { |
| | | width: 7px; |
| | | } |
| | | .menu-view::-webkit-scrollbar-thumb { |
| | | border-radius: 5px; |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.08); |
| | | background: rgba(0, 0, 0, 0.08); |
| | | } |
| | | .menu-view::-webkit-scrollbar-track { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); |
| | | border-radius: 3px; |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | } |
| | | } |
| | | } |
| | |
| | | moveprops.moveRow = this.moveRow |
| | | } |
| | | |
| | | const columns = this.state.columns.map(col => { |
| | | let columns = this.state.columns.map(col => { |
| | | if (col.copy) { |
| | | col.render = (text) => (<Paragraph copyable>{text}</Paragraph>) |
| | | } |
| | |
| | | } |
| | | }) |
| | | |
| | | columns.unshift({ |
| | | title: '序号', |
| | | dataIndex: '$index', |
| | | className: 'mk-index', |
| | | width: '60px', |
| | | }) |
| | | |
| | | const data = this.state.data.map((item, index) => { |
| | | item.$index = index + 1 |
| | | |
| | | return item |
| | | }) |
| | | |
| | | return ( |
| | | <EditableContext.Provider value={this.props.form}> |
| | | <div className="modal-edit-table"> |
| | |
| | | bordered |
| | | rowKey="uuid" |
| | | components={components} |
| | | dataSource={this.state.data} |
| | | dataSource={data} |
| | | columns={columns} |
| | | rowClassName="editable-row" |
| | | pagination={false} |
| | |
| | | padding: 0px; |
| | | } |
| | | } |
| | | .mk-index { |
| | | text-align: center; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | thead tr th:last-child { |
| | | text-align: center; |
| | |
| | | |
| | | // 控制台打印数据 |
| | | let conLtext = [] |
| | | let cols = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] |
| | | for (let i = 0; i < 26; i++) { |
| | | cols.push('A' + cols[i]) |
| | | } |
| | | |
| | | let _Ltext = data.map((item, lindex) => { |
| | | let vals = [] |
| | | let convals = [] |
| | |
| | | if (col.import === 'false') return |
| | | |
| | | let val = item[col.Column] !== undefined ? item[col.Column] : '' |
| | | let _position = (_topline + lindex + 1) + dict['main.excel.line'] + ' ' + (cindex + 1) + dict['main.excel.column'] + ' ' |
| | | let _colindex = cols[cindex] || (cindex + 1) |
| | | let _position = (_topline + lindex + 1) + dict['main.excel.line'] + ' ' + _colindex + dict['main.excel.column'] + ' ' |
| | | |
| | | if (/^Nvarchar/ig.test(col.type)) { |
| | | if (typeof(val) === 'number') { |
| | |
| | | sublist = sublist.filter(item => item.ID !== record.ID) |
| | | |
| | | // param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | |
| | |
| | | |
| | | if (visible === 'edit') { |
| | | // param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}'`) |
| | | param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}'`) |
| | | param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | |
| | | } |
| | | |
| | | // param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | |
| | |
| | | </Col> |
| | | <Col span={12}> |
| | | <div className="app-item"> |
| | | <div className="label">登录:</div> |
| | | <div className="content">{item.login_types === 'false' ? '不需要' : '需要'}</div> |
| | | {/* <div className="label">登录:</div> |
| | | <div className="content">{item.login_types === 'false' ? '不需要' : '需要'}</div> */} |
| | | </div> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | {/* <Col span={12}> |
| | | <Form.Item label="登录"> |
| | | {getFieldDecorator('login_types', { |
| | | initialValue: card ? card.login_types || 'true' : 'true' |
| | |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | </Col> */} |
| | | <Col span={12}> |
| | | <Form.Item label="权限管理"> |
| | | {getFieldDecorator('role_type', { |
| | |
| | | .pc-menu-view { |
| | | background: #000; |
| | | min-height: 100vh; |
| | | .menu-body { |
| | | >.menu-body { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | overflow-x: hidden; |
| | |
| | | sessionStorage.setItem('lang', param.lang || 'zh-CN') |
| | | sessionStorage.setItem('kei_no', param.kei_no || '') |
| | | sessionStorage.setItem('role_type', param.role_type || 'true') |
| | | sessionStorage.setItem('login_types', param.login_types || 'true') |
| | | sessionStorage.setItem('login_types', param.login_types || 'false') |
| | | sessionStorage.setItem('typename', param.typename || 'mob') |
| | | |
| | | this.setState({ |
| | |
| | | |
| | | const MenuForm = asyncComponent(() => import('./menuform')) |
| | | const Transfer = asyncComponent(() => import('@/pc/transfer')) |
| | | // const PopviewController = asyncComponent(() => import('@/menu/popview')) |
| | | const PopviewController = asyncComponent(() => import('@/menu/popview')) |
| | | const MenuShell = asyncComponent(() => import('@/pc/menushell')) |
| | | const SourceWrap = asyncComponent(() => import('@/pc/modulesource')) |
| | | const CreateView = asyncComponent(() => import('@/pc/createview')) |
| | |
| | | sessionStorage.setItem('lang', param.lang || 'zh-CN') |
| | | sessionStorage.setItem('kei_no', param.kei_no || '') |
| | | sessionStorage.setItem('role_type', param.role_type || 'true') |
| | | sessionStorage.setItem('login_types', param.login_types || 'true') |
| | | sessionStorage.setItem('login_types', param.login_types || 'false') |
| | | |
| | | this.setState({ |
| | | localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS, |
| | |
| | | {config && !comloading ? <MenuShell menu={config} handleList={this.updateConfig} /> : null} |
| | | </div> |
| | | </DndProvider> : null} |
| | | {/* {popBtn && visible ? <PopviewController btn={popBtn} handleBack={this.handleBack}/> : null} */} |
| | | {popBtn && visible ? <PopviewController btn={popBtn} handleBack={this.handleBack}/> : null} |
| | | <StyleController /> |
| | | <StyleCombController /> |
| | | <ModalController /> |