| | |
| | | {this.props.editLevel === 'HS' ? <Button className="level4-close" type="primary" onClick={this.exitManage}>退出</Button> : null} |
| | | {/* 进入编辑按钮 */} |
| | | {this.props.editState && !this.props.editLevel ? <Icon onClick={this.enterEdit} className="edit-check" type="edit" /> : null} |
| | | {this.props.editState && !this.props.editLevel ? <a href="#/mobile" target="_blank" className="mobile" type="edit"> 移动端 <Icon type="arrow-right" /></a> : null} |
| | | {/* {this.props.editState && !this.props.editLevel ? <a href="#/mobile" target="_blank" className="mobile" type="edit"> 移动端 <Icon type="arrow-right" /></a> : null} */} |
| | | {/* 编辑菜单 */} |
| | | {this.props.editLevel === 'level1' ? <EditMenu menulist={this.state.menulist} reload={this.reload} exitEdit={this.exitEdit}/> : null} |
| | | {/* 头像、用户名 */} |
| | |
| | | return |
| | | } |
| | | |
| | | if (!config.version || config.version < '1.0') { |
| | | // 兼容标签 |
| | | if (!config.tabgroups) { |
| | | config.tabgroups = [{ uuid: 'tabs', sublist: [] }] |
| | |
| | | } |
| | | |
| | | // 兼容图表 |
| | | let chartId = '' |
| | | if (!config.charts) { |
| | | config.expand = true |
| | | config.charts = [{ uuid: Utils.getuuid(), label: '', title: '', chartType: 'table', icon: 'table', Hide: 'false', blacklist: [] }] |
| | | } else if (config.charts.length === 1) { |
| | | config.expand = true |
| | | } else { |
| | | config.charts.forEach(card => { |
| | | if (card.chartType === 'card') { |
| | | card.details = card.details.map(_cell => { |
| | | _cell.fontSize = _cell.fontSize || 14 |
| | | if (!_cell.width) { |
| | | _cell.width = 100 |
| | | } else if (_cell.width === 'helf') { |
| | | _cell.width = 50 |
| | | } else if (_cell.width === 'third') { |
| | | _cell.width = 33 |
| | | } |
| | | chartId = config.charts[0].uuid |
| | | if (!_cell.fontWeight && _cell.bold === 'true') { |
| | | _cell.fontWeight = 'normal' |
| | | } |
| | | _cell.height = _cell.height || 1 |
| | | |
| | | return _cell |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // 权限过滤 |
| | | if (this.props.menuType !== 'HS') { |
| | |
| | | if (config.charts.length <= 1) { |
| | | config.expand = true |
| | | } |
| | | let chartId = config.charts[0] ? config.charts[0].uuid : '' |
| | | |
| | | // 字段权限黑名单 |
| | | config.search = config.search.filter(item => { |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | if (this.props.menuType === 'HS') { // 云端数据验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | let defer = new Promise(resolve => { |
| | | Api.getSystemCacheConfig(param, isSSO).then(res => { |
| | | res.search = item |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = Utils.formatOptions(DateCount) |
| | | |
| | | if (this.props.menuType === 'HS') { // 云端数据验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | return param |
| | | } |
| | | |
| | |
| | | > |
| | | <MutilForm |
| | | dict={this.props.dict} |
| | | menuType="HS" |
| | | action={execAction} |
| | | inputSubmit={this.handleOk} |
| | | configMap={this.state.configMap} |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS' && param.timestamp) { // 云端验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | Api.genericInterface(param).then((res) => { |
| | | if (res.status) { |
| | | this.execSuccess(btn, res, _primaryId, formdata) |
| | |
| | | let cols = 2 |
| | | if (this.props.setting && this.props.setting.cols) { |
| | | cols = parseInt(this.props.setting.cols) |
| | | if (cols > 3 || cols < 1) { |
| | | if (cols > 4 || cols < 1) { |
| | | cols = 2 |
| | | } |
| | | } |
| | |
| | | let _labelcol = cols !== 3 ? 8 / cols : 3 |
| | | let _wrapcol = cols !== 3 ? 16 + (cols - 1) * 4 : 21 |
| | | let _style = {} |
| | | if (cols === 2) { |
| | | if (cols === 2 || cols === 4) { |
| | | _style.paddingLeft = '7px' |
| | | } |
| | | fields.push( |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | if (this.props.menuType === 'HS') { // 云端数据验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | let defer = new Promise(resolve => { |
| | | Api.getSystemCacheConfig(param, isSSO).then(res => { |
| | | res.search = item |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = '' |
| | | |
| | | if (this.props.menuType !== 'HS') { // 云端数据验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | return param |
| | | } |
| | | |
| | |
| | | .ant-collapse-content-box { |
| | | padding: 16px 30px; |
| | | > .ant-row { |
| | | // .page-card { |
| | | // position: relative; |
| | | // background: #ffffff; |
| | | // border-radius: 2px; |
| | | // padding-top: 15px; |
| | | // .ant-form-item { |
| | | // cursor: move; |
| | | // display: flex; |
| | | // margin-bottom: 0px; |
| | | // .ant-form-item-label { |
| | | // label { |
| | | // width: 100%; |
| | | // cursor: move; |
| | | // overflow: hidden; |
| | | // display: inline-block; |
| | | // text-overflow: ellipsis; |
| | | // white-space: nowrap; |
| | | // } |
| | | // } |
| | | // .ant-form-item-label.ant-col-cuslabel { |
| | | // width: 11%; |
| | | // } |
| | | // .ant-form-item-control-wrapper.ant-col-cuswrap { |
| | | // width: 89%; |
| | | // } |
| | | // .ant-form-item-control-wrapper { |
| | | // .ant-input-number { |
| | | // width: 100%; |
| | | // margin-top: 4px; |
| | | // } |
| | | // .ant-select { |
| | | // width: 100%; |
| | | // margin-top: 4px; |
| | | // } |
| | | // .ant-calendar-picker { |
| | | // margin-top: 4px; |
| | | // } |
| | | // .ant-btn { |
| | | // margin-top: 4px; |
| | | // } |
| | | // .data-range .ant-calendar-picker-input { |
| | | // padding: 4px 20px 4px 5px; |
| | | // font-size: 13px; |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | .ant-calendar-picker { |
| | | min-width: 100px!important; |
| | | width: 100%; |
| | |
| | | destroyOnClose |
| | | > |
| | | <MutilForm |
| | | menuType="HS" |
| | | dict={this.props.dict} |
| | | action={execAction} |
| | | inputSubmit={this.handleOk} |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = Utils.formatOptions(DateCount) |
| | | |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) // 云端数据验证 |
| | | |
| | | return param |
| | | } |
| | |
| | | let _hideCol = [] // 隐藏及合并列中字段的uuid集 |
| | | let colMap = new Map() |
| | | |
| | | // 旧版本兼容 |
| | | if (!config.version || config.version < '1.0') { |
| | | // 兼容图表 |
| | | let chartId = '' |
| | | if (!config.charts) { |
| | | config.expand = true |
| | | config.charts = [{ |
| | | uuid: Utils.getuuid(), |
| | | label: '', |
| | | title: '', |
| | | chartType: 'table', |
| | | icon: 'table', |
| | | Hide: 'false', |
| | | blacklist: [] |
| | | }] |
| | | } else if (config.charts.length === 1) { |
| | | config.expand = true |
| | | config.charts = [{ uuid: Utils.getuuid(), label: '', title: '', chartType: 'table', icon: 'table', Hide: 'false', blacklist: [] }] |
| | | } else { |
| | | config.charts.forEach(card => { |
| | | if (card.chartType === 'card') { |
| | | card.details = card.details.map(_cell => { |
| | | _cell.fontSize = _cell.fontSize || 14 |
| | | if (!_cell.width) { |
| | | _cell.width = 100 |
| | | } else if (_cell.width === 'helf') { |
| | | _cell.width = 50 |
| | | } else if (_cell.width === 'third') { |
| | | _cell.width = 33 |
| | | } |
| | | chartId = config.charts[0].uuid |
| | | if (!_cell.fontWeight && _cell.bold === 'true') { |
| | | _cell.fontWeight = 'normal' |
| | | } |
| | | _cell.height = _cell.height || 1 |
| | | |
| | | return _cell |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // 权限过滤 |
| | | if (this.props.menuType !== 'HS') { |
| | |
| | | if (config.charts.length <= 1) { |
| | | config.expand = true |
| | | } |
| | | |
| | | let chartId = config.charts[0] ? config.charts[0].uuid : '' |
| | | |
| | | if (userConfig) { |
| | | config.setting.tableType = userConfig.setting.tableType |
| | |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | if (this.props.menuType === 'HS') { // 云端数据验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | let defer = new Promise(resolve => { |
| | | Api.getSystemCacheConfig(param, isSSO).then(res => { |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = Utils.formatOptions(DateCount) |
| | | |
| | | if (this.props.menuType === 'HS') { // 云端数据验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | return param |
| | | } |
| | | |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | if (this.props.menuType === 'HS') { // 云端数据验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | let defer = new Promise(resolve => { |
| | | Api.getSystemCacheConfig(param, isSSO).then(res => { |
| | | res.search = item |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = Utils.formatOptions(DateCount) |
| | | |
| | | if (this.props.menuType === 'HS') { // 云端数据验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | return param |
| | | } |
| | | |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = '' |
| | | |
| | | if (this.props.menuType === 'HS') { // 云端数据验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | return param |
| | | } |
| | | |
| | |
| | | .tree-card { |
| | | min-height: calc(100vh - 125px); |
| | | box-shadow: 0px 0px 2px #dddddd; |
| | | // cursor: url(http://gtms02.alicdn.com/tps/i2/T1_PMSFLBaXXcu5FDa-20-20.png) 10 10,pointer!important; |
| | | |
| | | .ant-card-head { |
| | | padding: 0 10px; |
| | | .ant-card-head-title { |
| | | padding: 13px 0 7px; |
| | | font-size: 14px; |
| | | .tree-title { |
| | | display: inline-block; |
| | | width: 100%; |
| | |
| | | } |
| | | } |
| | | |
| | | if (param.timestamp) { // 云端验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | Api.genericInterface(param).then((res) => { |
| | | if (res.status) { |
| | | this.execSuccess(btn, res) |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | } |
| | | } |
| | | |
| | | if (param.timestamp) { // 云端验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | return param |
| | |
| | | _localParam = {..._outParam, ...response} |
| | | |
| | | response.rduri = window.GLOB.mainSystemApi |
| | | |
| | | if (_localParam.LTextOut) { |
| | | _localParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | _localParam.secretkey = Utils.encrypt(_localParam.LTextOut, _localParam.timestamp) |
| | | _localParam.open_key = Utils.encrypt(_localParam.secretkey, _localParam.timestamp, true) |
| | | } |
| | | } |
| | | delete response.UpType |
| | | |
| | | |
| | | let _callbackparam = {..._outParam, ...response} |
| | | if (_callbackparam.LTextOut) { |
| | | _callbackparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | _callbackparam.secretkey = Utils.encrypt(_callbackparam.LTextOut, _callbackparam.timestamp) |
| | | _callbackparam.open_key = Utils.encrypt(_callbackparam.secretkey, _callbackparam.timestamp, true) |
| | | } |
| | | |
| | | return Api.getLocalConfig(_callbackparam) |
| | | } else { |
| | | if (response.status) { |
| | |
| | | destroyOnClose |
| | | > |
| | | <MutilForm |
| | | menuType="HS" |
| | | dict={this.props.dict} |
| | | action={execAction} |
| | | inputSubmit={this.handleOk} |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = Utils.formatOptions(DateCount) |
| | | |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) // 云端数据验证 |
| | | |
| | | return param |
| | | } |
| | | |
| | |
| | | </span> |
| | | } key={`${index}`}> |
| | | <SubTable |
| | | menuType="HS" |
| | | Tab={_tab} |
| | | MenuID={_tab.linkTab} |
| | | SupMenuID={this.props.MenuID} |
| | |
| | | |
| | | class VerupSubTabViewTable extends Component { |
| | | static propTpyes = { |
| | | menuType: PropTypes.any, // 菜单类型,普通菜单或HS |
| | | Tab: PropTypes.object, // 标签信息 |
| | | BID: PropTypes.string, // 上级数据ID |
| | | BData: PropTypes.any, // 上级数据 |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = Utils.formatOptions(DateCount) |
| | | |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) // 云端数据验证 |
| | | |
| | | return param |
| | | } |
| | | |
| | |
| | | this.setState({component}) |
| | | } |
| | | |
| | | // <Button className="loading-skeleton" disabled={true}></Button> // 骨架按钮 |
| | | render() { |
| | | const C = this.state.component |
| | | const btn = this.props.btn || {} |
| | | |
| | | return C ? |
| | | <C {...this.props} /> : |
| | | <Button className="loading-skeleton" disabled={true}></Button> |
| | | <Button className={'mk-btn mk-' + btn.class} icon={btn.icon} disabled={true} >{btn.label}</Button> |
| | | } |
| | | } |
| | | } |
| | |
| | | static propTpyes = { |
| | | btn: PropTypes.object, // 按钮信息 |
| | | MenuID: PropTypes.string, // 菜单ID |
| | | returndata: PropTypes.func // 获取返回数据 |
| | | returndata: PropTypes.func, // 获取返回数据 |
| | | triggerExcelIn: PropTypes.func // 修改上传状态 |
| | | } |
| | | |
| | | state = { |
| | |
| | | const { files } = file.target |
| | | const fileReader = new FileReader() |
| | | |
| | | this.props.triggerExcelIn() |
| | | fileReader.onload = event => { |
| | | try { |
| | | const { result } = event.target |
| | |
| | | render() { |
| | | return ( |
| | | <span> |
| | | {this.state.excelId ? <input className="excel-in-input" id={this.state.excelId + this.props.MenuID} type='file' accept='.xlsx, .xls' onChange={this.onImportExcel} /> : null} |
| | | {this.state.excelId ? <input className="excel-in-input" id={this.state.excelId + this.props.MenuID} type='file' accept='.xlsx, .xls' onAbort={this.onImportExcel} onChange={this.onImportExcel} /> : null} |
| | | </span> |
| | | ) |
| | | } |
| | |
| | | this.setState({ |
| | | primaryId: primaryId |
| | | }, () => { |
| | | this.updateStatus('start') |
| | | this.refs.excelIn.exceltrigger() |
| | | }) |
| | | } else { |
| | |
| | | if (btn.intertype === 'inner' && !btn.innerFunc) { // 系统存储过程 |
| | | param.func = 'sPC_TableData_InUpDe' |
| | | |
| | | if (this.props.menuType === 'HS' && param.timestamp) { // 云端验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | Api.genericInterface(param).then((res) => { |
| | | if (res.status) { |
| | | this.execSuccess(res) |
| | |
| | | onClick={() => {this.actionTrigger()}} |
| | | loading={loading} |
| | | >{btn.label}</Button> |
| | | <ExcelIn MenuID={this.props.MenuID} btn={btn} returndata={this.getexceldata} ref="excelIn" /> |
| | | <ExcelIn MenuID={this.props.MenuID} btn={btn} triggerExcelIn={() => this.updateStatus('start')} returndata={this.getexceldata} ref="excelIn" /> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = '' |
| | | |
| | | if (this.props.menuType === 'HS') { // 云端数据验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | return param |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS' && param.timestamp) { // 云端验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | Api.genericInterface(param).then((res) => { |
| | | if (res.status) { |
| | | this.execSuccess(res) |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | } |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS' && param.timestamp) { // 云端验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | return param |
| | |
| | | */ |
| | | execError = (res) => { |
| | | const { btn } = this.props |
| | | const { btnconfig } = this.state |
| | | |
| | | if (res.ErrCode === 'E') { |
| | | Modal.error({ |
| | |
| | | } |
| | | |
| | | let _unclose = false |
| | | if (btn.OpenType === 'pop') { |
| | | if (btn.OpenType === 'pop' && btnconfig && btnconfig.setting.display !== 'prompt') { |
| | | _unclose = true |
| | | } else { |
| | | this.setState({ |
| | |
| | | destroyOnClose |
| | | > |
| | | <MutilForm |
| | | dict={this.state.dict} |
| | | BID={BID} |
| | | dict={this.state.dict} |
| | | menuType={this.props.menuType} |
| | | action={btnconfig} |
| | | inputSubmit={this.handleOk} |
| | | data={this.state.tabledata[0]} |
| | |
| | | destroyOnClose |
| | | > |
| | | <MutilForm |
| | | dict={this.state.dict} |
| | | BID={BID} |
| | | dict={this.state.dict} |
| | | menuType={this.props.menuType} |
| | | action={btnconfig} |
| | | inputSubmit={this.handleOk} |
| | | data={this.state.tabledata[0]} |
| | |
| | | import { Icon, Card, Spin, Empty, Tabs } from 'antd' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import '@/assets/css/table.scss' |
| | | import './index.scss' |
| | | |
| | | const NormalButton = asyncComponent(() => import('@/tabviews/zshare/actionList/normalbutton')) |
| | |
| | | |
| | | if (mark.match === '=' && originVal === contrastVal) { |
| | | className = mark.color[1] |
| | | } else if (mark.match === '!=' && originVal !== contrastVal) { |
| | | className = mark.color[1] |
| | | } else if (mark.match === 'like' && originVal.indexOf(contrastVal) > -1) { |
| | | className = mark.color[1] |
| | | } else if (mark.match === '>' && originVal > contrastVal) { |
| | |
| | | extra={extra} |
| | | actions={actions} |
| | | > |
| | | <div className={'ant-card-meta' + (card.switch ? ' switch' : '')} onClick={this.switchCard}> |
| | | <div className={'ant-card-meta' + (card.switch ? ' switch' : '')} style={card.flex ? {display: 'flex'} : null} onClick={this.switchCard}> |
| | | {card.avatar ? |
| | | <div className="ant-card-meta-avatar"> |
| | | <span className="ant-avatar ant-avatar-circle ant-avatar-image" style={card.avatar.class}> |
| | | <div className="ant-card-meta-avatar" style={card.avatar.class}> |
| | | <span className="ant-avatar ant-avatar-image" style={card.avatar.radius ? {borderRadius: '50%'} : null}> |
| | | {this.getAvatar()} |
| | | </span> |
| | | </div> : null |
| | | } |
| | | <div className="ant-card-meta-detail" style={card.marginLeft || null}> |
| | | <div className="ant-card-meta-detail" style={card.flex ? {flex: 1} : null}> |
| | | {card.details.map((detail, i) => { |
| | | return ( |
| | | <div className={detail.class} key={i}> |
| | | <div className={detail.class} style={detail.style} key={i}> |
| | | {detail.column ? this.getContent(detail.column) : detail.content} |
| | | </div> |
| | | ) |
| | |
| | | card.avatar = null |
| | | } else { |
| | | card.avatar.marks = _marks |
| | | card.avatar.outWidth = plot.avatar.size + 16 |
| | | card.avatar.class = {width: plot.avatar.size, fontSize: plot.avatar.size + 'px'} |
| | | card.avatar.width = plot.avatar.size |
| | | card.avatar.class = {width: plot.avatar.size, paddingTop: plot.avatar.size, fontSize: plot.avatar.size + 'px'} |
| | | } |
| | | } else if (card.avatar.type === 'picture' && colMap.get(plot.avatar.field)) { |
| | | card.avatar.field = plot.avatar.field |
| | | card.avatar.outWidth = plot.avatar.width + 16 |
| | | card.avatar.width = plot.avatar.width |
| | | card.avatar.widthType = plot.avatar.widthType |
| | | card.avatar.radius = plot.avatar.radius !== 'false' |
| | | |
| | | card.avatar.class = {width: plot.avatar.width} |
| | | } |
| | | let _width = card.avatar.width |
| | | if (plot.avatar.widthType === 'ratio') { |
| | | _width = _width + '%' |
| | | } |
| | | |
| | | if (card.avatar) { |
| | | card.marginLeft = {marginLeft: card.avatar.outWidth} |
| | | card.avatar.class = {width: _width, paddingTop: _width} |
| | | } |
| | | } |
| | | |
| | | card.details = [] |
| | | if (plot.details.length > 0) { |
| | | card.details = plot.details.map(item => { |
| | | card.details = plot.details.map(_item => { |
| | | let item = fromJS(_item).toJS() |
| | | |
| | | if (item.datatype === 'dynamic' && colMap.get(item.field)) { |
| | | item.column = colMap.get(item.field) |
| | | } else { |
| | | item.datatype = 'static' |
| | | } |
| | | |
| | | let _class = '' |
| | | if (item.bold === 'true') { |
| | | _class = ' ant-card-meta-title' |
| | | } else { |
| | | _class = ' ant-card-meta-description' |
| | | } |
| | | item.fontSize = item.fontSize || 14 |
| | | item.height = item.height || 1 |
| | | item.fontWeight = item.fontWeight || 'normal' |
| | | item.width = item.width + '%' |
| | | |
| | | if (item.width) { |
| | | _class += ' ' + item.width |
| | | } |
| | | let _style = {} |
| | | _style.fontWeight = item.fontWeight |
| | | _style.width = item.width |
| | | _style.fontSize = item.fontSize + 'px' |
| | | _style.height = item.height * item.fontSize * 1.5 |
| | | |
| | | item.style = _style |
| | | |
| | | let _class = 'mk-card-detail-item ' |
| | | if (item.align) { |
| | | _class += ' ' + item.align |
| | | _class += item.align + ' ' |
| | | } |
| | | |
| | | _class += 'line' + item.height |
| | | item.class = _class |
| | | |
| | | return item |
| | |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | componentDidMount () { |
| | | const { plot } = this.props |
| | | const { card } = this.state |
| | | |
| | | let _flex = false |
| | | if (card.avatar) { |
| | | let _cardWidth = 300 |
| | | if (plot.widthType === 'absolute') { |
| | | _cardWidth = plot.cardWidth |
| | | } else { |
| | | let _outWidth = document.body.offsetWidth - 260 |
| | | if (this.cardRef.offsetWidth) { |
| | | _outWidth = this.cardRef.offsetWidth |
| | | } |
| | | _cardWidth = Math.floor(_outWidth * plot.cardWidth / 24 - 20) |
| | | } |
| | | |
| | | if (card.avatar.widthType === 'ratio') { |
| | | if (card.avatar.width < 90) { |
| | | _flex = true |
| | | } |
| | | } else if (card.avatar.width < _cardWidth * 0.9) { |
| | | _flex = true |
| | | } |
| | | |
| | | this.setState({ |
| | | card: {...this.state.card, flex: _flex} |
| | | }) |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 卡片切换 |
| | | */ |
| | |
| | | const { card, colMap, selectKey } = this.state |
| | | |
| | | return ( |
| | | <div className="card-row-box mingke-table" style={!plot.title ? {paddingTop: '15px'} : null}> |
| | | <div className="card-row-box mingke-table" ref={(ref) => this.cardRef = ref} style={!plot.title ? {paddingTop: '15px'} : null}> |
| | | {loading ? |
| | | <div className="loading-mask"> |
| | | <div className="ant-spin-blur"></div> |
| | |
| | | .anticon { |
| | | margin-right: 0px; |
| | | } |
| | | } |
| | | > .chart-card-box { |
| | | margin-bottom: 20px; |
| | | } |
| | | .ant-btn { |
| | | padding: 0; |
| | | color: rgba(0,0,0,.45); |
| | | > .anticon + span { |
| | | margin-left: 4px; |
| | | } |
| | | } |
| | | } |
| | | > .chart-card-box { |
| | | margin-bottom: 20px; |
| | | .ant-btn:hover, .ant-btn.active, .ant-btn:focus { |
| | | color: #40a9ff; |
| | | } |
| | | |
| | | .chart-card-box:hover { |
| | |
| | | white-space: normal; |
| | | |
| | | .ant-card-meta-avatar { |
| | | position: relative; |
| | | padding-top: 0px; |
| | | padding-left: 0px; |
| | | float: unset; |
| | | overflow: hidden; |
| | | margin: 0 10px 15px 0px; |
| | | } |
| | | |
| | | .ant-avatar-image { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | box-sizing: border-box; |
| | | margin: 0; |
| | | padding: 0; |
| | | font-variant: tabular-nums; |
| | | line-height: 1.5; |
| | | list-style: none; |
| | | font-feature-settings: 'tnum'; |
| | | position: relative; |
| | | display: inline-block; |
| | | overflow: hidden; |
| | | color: #fff; |
| | | white-space: nowrap; |
| | | text-align: center; |
| | | vertical-align: middle; |
| | | border-radius: 50%; |
| | | |
| | | img { |
| | | width: 100%; |
| | |
| | | background: transparent; |
| | | } |
| | | } |
| | | .ant-card-meta-title { |
| | | .ant-card-meta-title, .ant-card-meta-description { |
| | | font-size: 14px; |
| | | div { |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | word-break: break-all; |
| | | } |
| | | .ant-card-meta-detail > div { |
| | | height: 23px; |
| | | } |
| | | .ant-card-meta-detail { |
| | | .mk-card-detail-item { |
| | | line-height: 1.5; |
| | | vertical-align: top; |
| | | display: inline-block; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | } |
| | | .line1 { |
| | | overflow: hidden; |
| | | word-break: break-word; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | .mk-card-detail-item:not(.line1) { |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | overflow: hidden; |
| | | } |
| | | .line2 { |
| | | -webkit-line-clamp: 2; |
| | | } |
| | | .line3 { |
| | | -webkit-line-clamp: 3; |
| | | } |
| | | } |
| | | .ant-card-meta-detail > div:not(:last-child) { |
| | | margin-bottom: 2px; |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Form, Row, Col, Input, InputNumber, Select, DatePicker, notification } from 'antd' |
| | | import moment from 'moment' |
| | | |
| | |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | menuType: PropTypes.object, // 菜单类型,是否为HS |
| | | action: PropTypes.object, // 按钮信息、表单列表 |
| | | dict: PropTypes.object, // 字典项 |
| | | data: PropTypes.any, // 表格数据 |
| | |
| | | let cols = 2 |
| | | if (this.props.action.setting && this.props.action.setting.cols) { |
| | | cols = parseInt(this.props.action.setting.cols) |
| | | if (cols > 3 || cols < 1) { |
| | | if (cols > 4 || cols < 1) { |
| | | cols = 2 |
| | | } |
| | | } |
| | |
| | | |
| | | componentDidMount () { |
| | | const { data, BData } = this.props |
| | | let action = JSON.parse(JSON.stringify(this.props.action)) |
| | | let action = fromJS(this.props.action).toJS() |
| | | |
| | | let datatype = {} |
| | | let readtype = {} |
| | |
| | | } |
| | | |
| | | // 用于受控值的表单,隐藏时传默认值(未使用?) |
| | | item.initVal = typeof(item.initval) === 'object' ? JSON.parse(JSON.stringify(item.initval)) : item.initval |
| | | item.initVal = typeof(item.initval) === 'object' ? fromJS(item.initval).toJS() : item.initval |
| | | |
| | | let _fieldlen = item.fieldlength || 50 |
| | | if (item.type === 'textarea' || item.type === 'fileupload' || item.type === 'multiselect') { |
| | |
| | | } |
| | | |
| | | // 保存初始列表,用于关联菜单控制 |
| | | item.oriOptions = JSON.parse(JSON.stringify(item.options)) |
| | | item.oriOptions = fromJS(item.options).toJS() |
| | | |
| | | // 下级表单控制-字段写入 |
| | | if (item.linkSubField && item.linkSubField.length > 0) { |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | if (this.props.menuType === 'HS') { // 云端数据验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | deffers.push( |
| | | new Promise(resolve => { |
| | | Api.getSystemCacheConfig(param, item.database === 'sso').then(res => { |
| | |
| | | } else { |
| | | item.options = item.oriOptions |
| | | } |
| | | } else if (item.type === 'select' || item.type === 'multiselect') { |
| | | item.options = item.oriOptions |
| | | } |
| | | return item |
| | | }) |
| | |
| | | supfields.forEach(supfield => { |
| | | formlist = formlist.map(item => { |
| | | if (item.type === 'link' && item.linkField === supfield.field) { |
| | | |
| | | item.options = item.oriOptions.filter(option => option.parentId === supfield.initval) |
| | | item.initval = item.options[0] ? item.options[0].Value : '' |
| | | |
| | | if (this.props.form.getFieldValue(item.field) !== undefined) { |
| | | fieldsvalue[item.field] = item.initval |
| | | } |
| | | |
| | | subfields.push(item) |
| | | } |
| | |
| | | |
| | | selectChange = (_field, value, option) => { |
| | | const { record } = this.state |
| | | let formlist = JSON.parse(JSON.stringify(this.state.formlist)) |
| | | let formlist = fromJS(this.state.formlist).toJS() |
| | | |
| | | let subfields = [] |
| | | let fieldsvalue = {} |
| | |
| | | item.options = item.oriOptions.filter(option => option.parentId === value) |
| | | item.initval = item.options[0] ? item.options[0].Value : '' |
| | | |
| | | if (this.props.form.getFieldValue(item.field) !== undefined) { |
| | | fieldsvalue[item.field] = item.initval |
| | | } |
| | | |
| | | subfields.push(item) |
| | | } |
| | |
| | | let _labelcol = cols !== 3 ? 8 / cols : 3 |
| | | let _wrapcol = cols !== 3 ? 16 + (cols - 1) * 4 : 21 |
| | | let _style = {} |
| | | if (cols === 2) { |
| | | if (cols === 2 || cols === 4) { |
| | | _style.paddingLeft = '7px' |
| | | } |
| | | fields.push( |
| | |
| | | |
| | | handleConfirm = () => { |
| | | const { record, intercepts } = this.state |
| | | let _encrypts = JSON.parse(JSON.stringify(this.state.encrypts)) |
| | | let _encrypts = fromJS(this.state.encrypts).toJS() |
| | | let _format = { |
| | | date: 'YYYY-MM-DD', |
| | | datemonth: 'YYYY-MM', |
| | |
| | | }) |
| | | |
| | | Object.keys(values).forEach(key => { |
| | | if (values[key] === undefined) { // 表单异常??? |
| | | if (search.filter(s => s.key === key).length === 0) { |
| | | search.push({ |
| | | type: this.state.datatype[key], |
| | | readonly: this.state.readtype[key], |
| | | readin: this.state.readin[key], |
| | | fieldlen: this.state.fieldlen[key], |
| | | key: key, |
| | | value: '' |
| | | }) |
| | | } |
| | | return |
| | | } |
| | | |
| | | let _value = '' |
| | | if (this.state.datatype[key] === 'datetime') { |
| | | _value = values[key] ? moment(values[key]).format('YYYY-MM-DD HH:mm:ss') : '' |
| | |
| | | import { Table, message, Affix, Button, Typography, Modal, Icon } from 'antd' |
| | | |
| | | import { modifyTabview } from '@/store/action' |
| | | import './index.scss' |
| | | import '@/assets/css/table.scss' |
| | | import './index.scss' |
| | | |
| | | const { Paragraph } = Typography |
| | | |
| | |
| | | if (originVal === '' || contrastVal === '') return false |
| | | |
| | | if (mark.match === '=' && originVal === contrastVal) { |
| | | className = mark.color[1] |
| | | } else if (mark.match === '!=' && originVal !== contrastVal) { |
| | | className = mark.color[1] |
| | | } else if (mark.match === 'like' && originVal.indexOf(contrastVal) > -1) { |
| | | className = mark.color[1] |
| | |
| | | |
| | | if (mark.match === '=' && originVal === contrastVal) { |
| | | className = 'background ' + mark.color[1] |
| | | } else if (mark.match === '!=' && originVal !== contrastVal) { |
| | | className = 'background ' + mark.color[1] |
| | | } else if (mark.match === 'like' && originVal.indexOf(contrastVal) > -1) { |
| | | className = 'background ' + mark.color[1] |
| | | } else if (mark.match === '>' && originVal > contrastVal) { |
| | |
| | | }) |
| | | } |
| | | |
| | | if (!_config.version || _config.version < '1.0') { |
| | | // 配置默认值,兼容 |
| | | // _config.version = '1.0' |
| | | _config.Template = 'CommonTable' |
| | | _config.easyCode = _config.easyCode || '' |
| | | |
| | |
| | | Hide: 'false', |
| | | blacklist: [] |
| | | }] |
| | | } else { |
| | | _config.charts.forEach(card => { |
| | | if (card.chartType === 'card') { |
| | | card.details = card.details.map(_cell => { |
| | | if (!_cell.fontSize) { |
| | | _cell.fontSize = 14 |
| | | } |
| | | if (!_cell.width) { |
| | | _cell.width = 100 |
| | | } else if (_cell.width === 'helf') { |
| | | _cell.width = 50 |
| | | } else if (_cell.width === 'third') { |
| | | _cell.width = 33 |
| | | } |
| | | |
| | | if (_cell.bold === 'true') { |
| | | _cell.fontWeight = 'normal' |
| | | } |
| | | |
| | | if (!_cell.height) { |
| | | _cell.height = 1 |
| | | } |
| | | |
| | | return _cell |
| | | }) |
| | | |
| | | if (card.widthType === 'ratio' && card.avatar && card.avatar.widthType !== 'ratio') { |
| | | card.avatar.widthType = 'ratio' |
| | | card.avatar.width = 32 |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | let _oriActions = [] |
| | |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 三级菜单切换模板(弃用) |
| | | */ |
| | | changeTemplate = () => { |
| | | this.props.handleView({tabview: 'template'}) |
| | | } |
| | | |
| | | getFuncNames = (data, funcNames, tableNames) => { |
| | |
| | | <div> |
| | | <EditComponent dict={this.state.dict} type="maintable" 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" onClick={this.changeTemplate}>{this.state.dict['header.menu.template.change']}</Button> */} |
| | | <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['header.save']}</Button> |
| | | <Button onClick={this.cancelConfig}>{this.state.dict['header.return']}</Button> |
| | | </div> |
| | |
| | | |
| | | class CommonTableBaseData { |
| | | baseConfig = { |
| | | // version: '1.0', |
| | | type: 'system', |
| | | Template: 'CommonTable', |
| | | enabled: false, |
| | |
| | | let wrapCol = 'ant-col-sm-16' |
| | | if (card.type === 'textarea') { |
| | | if (cols === '2') { |
| | | labelCol = 'ant-col-sm-4' |
| | | wrapCol = 'ant-col-sm-20' |
| | | labelCol = 'textarea-line ant-col-sm-4' |
| | | wrapCol = 'textarea-line ant-col-sm-20' |
| | | } else if (cols === '3') { |
| | | labelCol = 'ant-col-cuslabel' |
| | | wrapCol = 'ant-col-cuswrap' |
| | | labelCol = 'textarea-line ant-col-cuslabel' |
| | | wrapCol = 'textarea-line ant-col-cuswrap' |
| | | } else if (cols === '4') { |
| | | labelCol = 'textarea-line ant-col-sm-2' |
| | | wrapCol = 'textarea-line ant-col-sm-22' |
| | | } |
| | | } |
| | | |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(param).then(res => { |
| | | if (res.status) { |
| | | this.setState({ |
| | |
| | | </div> |
| | | } style={{ width: '100%' }}> |
| | | <Icon type="setting" onClick={this.changeSetting} /> |
| | | {/* <Icon type="snippets" title={this.state.dict['header.form.paste']} onClick={() => {this.setState({pasteVisible: true})}} /> */} |
| | | <Tooltip placement="bottomLeft" overlayClassName="middle" title="在左侧工具栏《搜索》中,选择对应搜索框拖至此处添加;或点击按钮《添加搜索条件》批量添加,选择批量添加时,需提前选择使用表。"> |
| | | <Icon type="question-circle" /> |
| | | </Tooltip> |
| | |
| | | min-width: 100px!important; |
| | | width: 100%; |
| | | } |
| | | |
| | | .ant-col-6 .page-card { |
| | | .edit { |
| | | right: 60px; |
| | | } |
| | | .edit.close { |
| | | right: 20px; |
| | | } |
| | | .edit.copy { |
| | | right: 40px; |
| | | } |
| | | } |
| | | // 多行文本 |
| | | .ant-col-24 .textarea-line.ant-col-sm-2 { |
| | | .edit { |
| | | right: 60px; |
| | | } |
| | | .edit.close { |
| | | right: 20px; |
| | | } |
| | | .edit.copy { |
| | | right: 40px; |
| | | } |
| | | } |
| | | } |
| | | .anticon-snippets { |
| | | position: absolute; |
| | |
| | | <Select.Option value="1">1列</Select.Option> |
| | | <Select.Option value="2">2列</Select.Option> |
| | | <Select.Option value="3">3列</Select.Option> |
| | | <Select.Option value="4">4列</Select.Option> |
| | | </Select> |
| | | )} |
| | | </Form.Item> |
| | |
| | | } else if (cols === '3') { |
| | | labelCol = 'ant-col-cuslabel' |
| | | wrapCol = 'ant-col-cuswrap' |
| | | } else if (cols === '4') { |
| | | labelCol = 'ant-col-sm-2' |
| | | wrapCol = 'ant-col-sm-22' |
| | | } |
| | | } |
| | | |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(param).then(res => { |
| | | if (res.status) { |
| | | this.setState({ |
| | |
| | | .ant-row.ant-form-item .ant-col { |
| | | padding: 0; |
| | | } |
| | | .textarea2, .textarea4 { |
| | | padding-left: 7px; |
| | | } |
| | | .page-card { |
| | | position: relative; |
| | | background: #ffffff; |
| | |
| | | <Select.Option value="1">1列</Select.Option> |
| | | <Select.Option value="2">2列</Select.Option> |
| | | <Select.Option value="3">3列</Select.Option> |
| | | <Select.Option value="4">4列</Select.Option> |
| | | </Select> |
| | | )} |
| | | </Form.Item> |
| | |
| | | } |
| | | |
| | | return ( |
| | | <div className="model-table-action-list"> |
| | | <div className="model-table-action-list" style={config.charts.length > 1 ? {paddingTop: 15} : null}> |
| | | <Tooltip placement="bottomLeft" overlayClassName="middle" title={dict['model.tooltip.action.guide']}> |
| | | <Icon type="question-circle" /> |
| | | </Tooltip> |
| | |
| | | |
| | | _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) |
| | | |
| | | _sParam.open_key = Utils.encrypt(_sParam.secretkey, _sParam.timestamp, true) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(_sParam).then(res => { |
| | | if (res.status) { |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(param).then(res => { |
| | | if (res.status) { |
| | | let temps = res.data.map(temp => { |
| | |
| | | item.hidden = false |
| | | } else if (item.key === 'width' && card.elemType === 'avatar' && card.type === 'picture') { |
| | | item.hidden = false |
| | | } else if (item.key === 'radius' && card.elemType === 'avatar' && card.type === 'picture') { |
| | | item.hidden = false |
| | | } |
| | | return item |
| | | }) |
| | |
| | | item.max = card.widthType === 'ratio' ? 100 : 500 |
| | | } else if (item.key === 'size') { |
| | | item.hidden = value !== 'icon' |
| | | } else if (item.key === 'radius') { |
| | | item.hidden = value !== 'picture' |
| | | } |
| | | |
| | | return item |
| | |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | } |
| | | ] |
| | | })(<InputNumber min={item.min} max={item.max} precision={0} />)} |
| | | })(<InputNumber min={item.min} max={item.max} precision={item.precision || 0} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <Radio.Group onChange={(e) => {this.typeChange(item.key, e.target.value)}}> |
| | | <Radio.Group disabled={item.readonly} onChange={(e) => {this.typeChange(item.key, e.target.value)}}> |
| | | { |
| | | item.options.map(option => { |
| | | return ( |
| | |
| | | let column = columns.filter(col => col.value === values.field)[0] |
| | | values.icon = column.icon |
| | | values.color = column.color |
| | | |
| | | values.avatarWidth = values.size |
| | | } else if (values.widthType === 'absolute') { |
| | | values.avatarWidth = values.width |
| | | } else { |
| | | values.avatarWidth = values.width + '%' |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | |
| | | let _class = '' |
| | | if (card.bold === 'true') { |
| | | _class = 'ant-card-meta-title' |
| | | } else { |
| | | _class = 'ant-card-meta-description' |
| | | } |
| | | |
| | | if (card.width) { |
| | | _class += ' ' + card.width |
| | | } |
| | | if (card.align) { |
| | | _class += ' ' + card.align |
| | | } |
| | | |
| | | return ( |
| | | <div ref={node => drag(drop(node))} className={_class} style={{ opacity: opacity}}> |
| | | <div className="content" title={card.content}>{card.content}</div> |
| | | <div ref={node => drag(drop(node))} className={'mk-card-meta-item ' + card.align} style={{opacity: opacity, width: card.width + '%'}}> |
| | | <div className={'content line' + card.height} style={{fontWeight: card.fontWeight, fontSize: card.fontSize + 'px', height: card.height * card.fontSize * 1.5}} title={card.content}>{card.content}</div> |
| | | <Icon className="edit" title="编辑" type="edit" onClick={() => editCard(card)} /> |
| | | <Icon className="edit close" title="删除" type="close" onClick={() => delCard(card)} /> |
| | | </div> |
| | |
| | | accept: 'detail' |
| | | }) |
| | | |
| | | let marginLeft = 0 |
| | | if (cardObj.subelement.includes('avatar')) { |
| | | marginLeft = cardObj.avatar.width || cardObj.avatar.size || 32 |
| | | marginLeft += 16 |
| | | } |
| | | |
| | | return ( |
| | | <div ref={drop} className="ant-card-meta-detail" style={{marginLeft: marginLeft}}> |
| | | <div ref={drop}> |
| | | {cards.map(card => ( |
| | | <Card |
| | | key={card.uuid} |
| | |
| | | .line-card-edit-box .ant-card-meta-detail { |
| | | overflow: visible; |
| | | .ant-card-meta-title, .ant-card-meta-description { |
| | | .mk-card-meta-item { |
| | | position: relative; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | overflow: visible; |
| | | display: inline-block; |
| | | width: 100%; |
| | | vertical-align: top; |
| | | font-size: 14px; |
| | | margin-bottom: 2px; |
| | | |
| | | .content { |
| | | max-width: 100%; |
| | | display: inline-block; |
| | | |
| | | .content.line1 { |
| | | overflow: hidden; |
| | | word-break: break-word; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | .content:not(.line1) { |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | overflow: hidden; |
| | | } |
| | | .content.line2 { |
| | | -webkit-line-clamp: 2; |
| | | } |
| | | .content.line3 { |
| | | -webkit-line-clamp: 3; |
| | | } |
| | | } |
| | | |
| | | .helf { |
| | | width: 50%; |
| | | } |
| | | .third { |
| | | width: 33.3%; |
| | | } |
| | | .align-center { |
| | | text-align: center; |
| | | } |
| | | .align-right { |
| | | text-align: right; |
| | | } |
| | | .ant-card-meta-title:not(:last-child), .ant-card-meta-description:not(:last-child) { |
| | | margin-bottom: 0px; |
| | | } |
| | | |
| | | .edit { |
| | |
| | | color: #ff4d4f; |
| | | } |
| | | |
| | | .ant-card-meta-title:hover .edit, .ant-card-meta-description:hover .edit { |
| | | .mk-card-meta-item:hover .edit { |
| | | display: inline-block; |
| | | } |
| | | } |
| | |
| | | dict: (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS, |
| | | modaltype: '', |
| | | formlist: null, |
| | | cardwidth: 0, |
| | | cardheight: 0, |
| | | cardcell: null // 卡片元素 |
| | | } |
| | | |
| | |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | | if (!is(fromJS(this.props.card), fromJS(nextProps.card))) { |
| | | |
| | | setTimeout(() => { |
| | | if (nextProps.card.insert === 'true' && this.cardRef) { |
| | | if (this.cardRef.offsetWidth !== this.state.cardwidth || this.cardRef.offsetHeight !== this.state.cardheight) { |
| | | this.setState({ |
| | | cardwidth: this.cardRef.offsetWidth, |
| | | cardheight: this.cardRef.offsetHeight |
| | | }) |
| | | } |
| | | } |
| | | |
| | | }, 200) |
| | | } |
| | | } |
| | | |
| | | plotChange = (values) => { |
| | | const { card, config } = this.props |
| | |
| | | if (!_cell) { |
| | | _cell = { |
| | | datatype: 'dynamic', |
| | | elemType: 'detail' |
| | | elemType: 'detail', |
| | | width: 100, |
| | | fontWeight: 'normal', |
| | | fontSize: 14 |
| | | } |
| | | } |
| | | |
| | |
| | | this.setState({ |
| | | cardcell: _cell, |
| | | modaltype: 'avatar', |
| | | formlist: getCardDetailForm(_cell, _columns, 'avatar') |
| | | formlist: getCardDetailForm(_cell, _columns, 'avatar', [], card.widthType === 'ratio') |
| | | }) |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | componentDidMount() { |
| | | const { card } = this.props |
| | | |
| | | if (card.insert === 'true' && this.cardRef) { |
| | | this.setState({ |
| | | cardwidth: this.cardRef.offsetWidth, |
| | | cardheight: this.cardRef.offsetHeight |
| | | }) |
| | | } |
| | | } |
| | | |
| | | componentDidUpdate() { |
| | | const { card } = this.props |
| | | |
| | | if (card.insert === 'true' && this.cardRef) { |
| | | if (this.cardRef.offsetWidth !== this.state.cardwidth || this.cardRef.offsetHeight !== this.state.cardheight) { |
| | | this.setState({ |
| | | cardwidth: this.cardRef.offsetWidth, |
| | | cardheight: this.cardRef.offsetHeight |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { card } = this.props |
| | | const { dict, modaltype, cardcell } = this.state |
| | | const { dict, 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 + '%' |
| | |
| | | outclass += ' ant-card-bordered' |
| | | } |
| | | |
| | | let metastyle = {} |
| | | if (card.subelement.includes('avatar')) { |
| | | let _cardWidth = card.cardWidth |
| | | |
| | | // 计算卡片宽度 |
| | | if (card.widthType === 'ratio' && card.over !== 'roll') { |
| | | let _outWidth = document.body.offsetWidth - 260 |
| | | _cardWidth = Math.floor(_outWidth * card.cardWidth / 24 - 20) |
| | | } |
| | | |
| | | if (card.avatar.type === 'picture') { |
| | | if (card.avatar.widthType === 'ratio') { |
| | | if (card.avatar.width < 90) { |
| | | metastyle.display = 'flex' |
| | | } |
| | | } else { |
| | | if (card.avatar.width < _cardWidth * 0.9) { |
| | | metastyle.display = 'flex' |
| | | } |
| | | } |
| | | } else { |
| | | if (card.avatar.size < _cardWidth * 0.9) { |
| | | metastyle.display = 'flex' |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <div className="line-card-edit-box mingke-table"> |
| | | {card.title ? <p className="chart-title">{card.title}</p> : null} |
| | | <div |
| | | ref={(ref) => this.cardRef = ref} |
| | | className={'ant-card chart-card ' + outclass} |
| | | style={card.widthType === 'absolute' ? { width: card.cardWidth } : null} |
| | | > |
| | |
| | | </div> : null |
| | | } |
| | | <div className="ant-card-body"> |
| | | <div className="ant-card-meta"> |
| | | <div className="ant-card-meta" style={metastyle}> |
| | | <Icon type="plus" onClick={() => this.editdetail()} /> |
| | | {card.subelement.includes('avatar') ? |
| | | <div className="ant-card-meta-avatar"> |
| | | <div className="ant-card-meta-avatar" style={{width: card.avatar.avatarWidth || 32, paddingTop: card.avatar.avatarWidth || 32}}> |
| | | <Icon className="edit" title="Edit" type="edit" onClick={this.editAvatar} /> |
| | | <Icon className="edit close" title="close" type="close" onClick={() => this.deleteElem('avatar')} /> |
| | | <span className="ant-avatar ant-avatar-circle ant-avatar-image" style={{width: card.avatar.width || card.avatar.size || 32}}> |
| | | <span className="ant-avatar ant-avatar-circle ant-avatar-image" style={{borderRadius: card.avatar.radius === 'true' ? '50%' : 0}}> |
| | | {card.avatar.type === 'picture' ? <img src={avatar} alt=""/> : null} |
| | | {card.avatar.type === 'icon' ? <Icon className={'font ' + card.avatar.color} style={{fontSize: card.avatar.size + 'px'}} type={card.avatar.icon} /> : null} |
| | | </span> |
| | | </div> : null |
| | | } |
| | | <div className="ant-card-meta-detail" style={metastyle.display ? {flex: 1} : null}> |
| | | <DragDetail |
| | | cardObj={card} |
| | | handleList={this.handleList} |
| | | handleMenu={this.editdetail} |
| | | deleteMenu={this.deletedetail} |
| | | /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | {card.subelement.includes('bottom') ? |
| | |
| | | </ul> : null |
| | | } |
| | | </div> |
| | | {card.insert === 'true' ? |
| | | <div className={'ant-card chart-card chart-card-insert' + outclass} style={{ width: cardwidth, height: cardheight }} > |
| | | <Icon type="plus" style={cardwidth > cardheight ? {fontSize: cardheight / 2 + 'px', lineHeight: cardheight + 'px'} : {fontSize: cardwidth / 2 + 'px', lineHeight: cardheight + 'px'}} /> |
| | | </div> : null |
| | | } |
| | | {/* 显示列编辑 */} |
| | | <Modal |
| | | title="编辑" |
| | |
| | | |
| | | .ant-card.chart-card { |
| | | min-height: 100px; |
| | | display: inline-block; |
| | | vertical-align: top; |
| | | margin-right: 15px; |
| | | |
| | | .ant-card-head { |
| | | min-height: 40px; |
| | |
| | | height: 48px; |
| | | } |
| | | } |
| | | .chart-card-insert { |
| | | text-align: center; |
| | | i { |
| | | color: #26C281; |
| | | } |
| | | } |
| | | |
| | | .ant-card.chart-card.without-border { |
| | | .ant-card-head { |
| | |
| | | .ant-card.chart-card .ant-card-body { |
| | | padding: 20px; |
| | | zoom: 1; |
| | | overflow: hidden; |
| | | |
| | | .ant-card-meta { |
| | | width: 100%; |
| | | position: relative; |
| | | |
| | | >.anticon-plus { |
| | | color: #26C281; |
| | | position: absolute; |
| | | right: -15px; |
| | | right: -20px; |
| | | top: -15px; |
| | | padding: 5px; |
| | | } |
| | | |
| | | .ant-card-meta-avatar { |
| | | position: absolute; |
| | | top: -15px; |
| | | left: -15px; |
| | | padding-top: 15px; |
| | | padding-left: 15px; |
| | | } |
| | | padding: 0; |
| | | box-sizing: content-box; |
| | | margin-right: 10px; |
| | | margin-bottom: 15px; |
| | | |
| | | .ant-avatar-image { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | box-sizing: border-box; |
| | | margin: 0; |
| | | padding: 0; |
| | | font-variant: tabular-nums; |
| | | line-height: 1.5; |
| | | list-style: none; |
| | | font-feature-settings: 'tnum'; |
| | | position: relative; |
| | | display: inline-block; |
| | | overflow: hidden; |
| | | color: #fff; |
| | | white-space: nowrap; |
| | | text-align: center; |
| | | vertical-align: middle; |
| | | border-radius: 50%; |
| | | |
| | | img { |
| | | width: 100%; |
| | | } |
| | | .font { |
| | | background: transparent; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | .ant-card.chart-card { |
| | | .ant-card-head { |
| | | padding: 0 12px; |
| | | .edit { |
| | | position: absolute; |
| | | left: 0; |
| | |
| | | position: relative; |
| | | .edit { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 3px; |
| | | left: -15px; |
| | | top: -13px; |
| | | font-size: 13px; |
| | | color: #1890ff; |
| | | cursor: pointer; |
| | |
| | | z-index: 1; |
| | | } |
| | | .edit.close { |
| | | left: 20px; |
| | | left: 5px; |
| | | color: #ff4d4f; |
| | | } |
| | | } |
| | | .ant-card-meta-avatar:hover { |
| | | .ant-card-body:hover .ant-card-meta-avatar { |
| | | .edit { |
| | | display: inline-block; |
| | | } |
| | |
| | | } |
| | | .ant-card.chart-card.background { |
| | | .ant-card-meta-title { |
| | | color: unset; |
| | | } |
| | | .ant-card-meta-description { |
| | | color: unset; |
| | | } |
| | | .ant-card-head { |
| | |
| | | item.hidden = false |
| | | } else if (item.key === 'switch' && _type === 'card') { |
| | | item.hidden = false |
| | | } else if (item.key === 'insert') { |
| | | item.hidden = _type !== 'card' |
| | | } else if (item.key === 'bgfield') { |
| | | item.hidden = _type !== 'card' |
| | | } |
| | |
| | | item.hidden = false |
| | | } else if (item.key === 'switch' && value === 'card') { |
| | | item.hidden = false |
| | | } else if (item.key === 'insert') { |
| | | item.hidden = value !== 'card' |
| | | } else if (item.key === 'bgfield') { |
| | | item.hidden = value !== 'card' |
| | | } |
| | |
| | | getFields() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const fields = [] |
| | | |
| | | this.state.formlist.forEach((item, index) => { |
| | | if (item.hidden) return |
| | | |
| | |
| | | result.subelement = selectlegend.subelement |
| | | } |
| | | |
| | | if (result.widthType === 'ratio' && result.avatar && result.avatar.widthType !== 'ratio') { |
| | | result.avatar.widthType = 'ratio' |
| | | result.avatar.width = 32 |
| | | } |
| | | |
| | | if (!result.details) { |
| | | result.details = [ |
| | | {elemType: 'detail', bold: 'true', uuid: 'cardtitle', content: 'Card title', datatype: 'static', align: 'left'}, |
| | | {elemType: 'detail',bold: 'false', uuid: 'carddescription', content: 'Card content', datatype: 'static', align: 'left'} |
| | | {elemType: 'detail', fontWeight: 'normal', fontSize: 14, width: 100, height: 1, uuid: 'cardtitle', content: 'Card content', datatype: 'static', align: 'left'}, |
| | | {elemType: 'detail', fontWeight: 'normal', fontSize: 14, width: 100, height: 1, uuid: 'carddescription', content: 'Card content', datatype: 'static', align: 'left'} |
| | | ] |
| | | result.bottom = { |
| | | elemType: 'bottom', |
| | |
| | | type: 'picture', |
| | | field: '', |
| | | size: 14, |
| | | widthType: 'absolute', |
| | | width: 32 |
| | | widthType: 'ratio', |
| | | width: 32, |
| | | avatarWidth: 32, |
| | | radius: 'true' |
| | | } |
| | | } |
| | | |
| | |
| | | })( |
| | | <Select> |
| | | <Select.Option value="="> = </Select.Option> |
| | | <Select.Option value="!="> != </Select.Option> |
| | | {originField.type === 'number' ? <Select.Option value=">"> > </Select.Option> : null} |
| | | {originField.type === 'number' ? <Select.Option value="<"> < </Select.Option> : null} |
| | | {originField.type === 'text' ? <Select.Option value="like"> like </Select.Option> : null} |
| | |
| | | |
| | | _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) |
| | | |
| | | _sParam.open_key = Utils.encrypt(_sParam.secretkey, _sParam.timestamp, true) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(_sParam).then(res => { |
| | | if (res.status) { |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(param).then(res => { |
| | | if (res.status) { |
| | | this.setState({ |
| | |
| | | |
| | | _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) |
| | | |
| | | _sParam.open_key = Utils.encrypt(_sParam.secretkey, _sParam.timestamp, true) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(_sParam).then(res => { |
| | | if (res.status) { |
| | |
| | | |
| | | let _activeKey = editSubTab ? editSubTab.activeKey : editTab.activeKey |
| | | |
| | | if (!_config.version || _config.version < '1.0') { |
| | | // 配置默认值,兼容 |
| | | // _config.version = '1.0' |
| | | |
| | | // 兼容图表 |
| | | if (!_config.charts) { |
| | | _config.expand = false |
| | |
| | | Hide: 'false', |
| | | blacklist: [] |
| | | }] |
| | | } else { |
| | | _config.charts.forEach(card => { |
| | | if (card.chartType === 'card') { |
| | | card.details = card.details.map(_cell => { |
| | | if (!_cell.fontSize) { |
| | | _cell.fontSize = 14 |
| | | } |
| | | if (!_cell.width) { |
| | | _cell.width = 100 |
| | | } else if (_cell.width === 'helf') { |
| | | _cell.width = 50 |
| | | } else if (_cell.width === 'third') { |
| | | _cell.width = 33 |
| | | } |
| | | |
| | | if (_cell.bold === 'true') { |
| | | _cell.fontWeight = 'normal' |
| | | } |
| | | |
| | | if (!_cell.height) { |
| | | _cell.height = 1 |
| | | } |
| | | |
| | | return _cell |
| | | }) |
| | | |
| | | if (card.widthType === 'ratio' && card.avatar && card.avatar.widthType !== 'ratio') { |
| | | card.avatar.widthType = 'ratio' |
| | | card.avatar.width = 32 |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | |
| | | class SubTableBaseData { |
| | | baseConfig = { |
| | | // version: '1.0', |
| | | type: 'system', |
| | | Template: 'SubTable', |
| | | enabled: false, |
| | |
| | | |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) |
| | | _param.open_key = Utils.encrypt(_param.secretkey, _param.timestamp, true) |
| | | |
| | | return Api.getLocalConfig(_param) |
| | | }).then(res => { |
| | |
| | | } |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) |
| | | _param.open_key = Utils.encrypt(_param.secretkey, _param.timestamp, true) |
| | | |
| | | return Api.getLocalConfig(_param) |
| | | }).then(res => { |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'insert', |
| | | label: '添加卡片', |
| | | initVal: card.insert || 'false', |
| | | tooltip: '选择显示添加卡片,且存在操作类型为添加的按钮时,卡片尾部会增加添加功能卡片(只显示第一个添加按钮)', |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: '显示' |
| | | }, { |
| | | value: 'false', |
| | | text: '隐藏' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | key: 'blacklist', |
| | | label: Formdict['header.form.blacklist'], |
| | |
| | | * @description 获取卡片详情表单配置信息 |
| | | * @param {object} card // 标签配置信息 |
| | | */ |
| | | export function getCardDetailForm (card, _columns, _type, _actions = []) { |
| | | export function getCardDetailForm (card, _columns, _type, _actions = [], isRatioCard) { |
| | | let actions = '' |
| | | if (_type === 'bottom') { |
| | | actions = card.actions ? card.actions.map(cell => cell.value) : [] |
| | | } else { |
| | | } else if (_type === 'header') { |
| | | _actions.unshift({ |
| | | value: '', |
| | | text: '空' |
| | |
| | | options: _columns |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'bold', |
| | | label: '加粗', |
| | | initVal: card.bold || 'false', |
| | | type: 'number', |
| | | key: 'fontSize', |
| | | min: 12, |
| | | max: 50, |
| | | label: '字体大小', |
| | | initVal: card.fontSize || 14, |
| | | required: true, |
| | | forbid: !['detail'].includes(_type) |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'fontWeight', |
| | | label: '字体粗细', |
| | | initVal: card.fontWeight || 'normal', |
| | | required: true, |
| | | forbid: !['detail'].includes(_type), |
| | | options: [{ |
| | | value: 'true', |
| | | text: '是' |
| | | value: 'normal', |
| | | text: '正常' |
| | | }, { |
| | | value: 'false', |
| | | text: '否' |
| | | value: 'bold', |
| | | text: 'bold' |
| | | }, { |
| | | value: 'bolder', |
| | | text: 'bolder' |
| | | }, { |
| | | value: 'lighter', |
| | | text: 'lighter' |
| | | }, { |
| | | value: '100', |
| | | text: '100' |
| | | }, { |
| | | value: '200', |
| | | text: '200' |
| | | }, { |
| | | value: '300', |
| | | text: '300' |
| | | }, { |
| | | value: '400', |
| | | text: '400' |
| | | }, { |
| | | value: '500', |
| | | text: '500' |
| | | }, { |
| | | value: '600', |
| | | text: '600' |
| | | }, { |
| | | value: '700', |
| | | text: '700' |
| | | }, { |
| | | value: '800', |
| | | text: '800' |
| | | }, { |
| | | value: '900', |
| | | text: '900' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | type: 'number', |
| | | key: 'width', |
| | | label: '宽度', |
| | | initVal: card.width || '', |
| | | required: false, |
| | | forbid: !['detail'].includes(_type), |
| | | options: [{ |
| | | value: '', |
| | | text: '100%' |
| | | }, { |
| | | value: 'helf', |
| | | text: '50%' |
| | | }, { |
| | | value: 'third', |
| | | text: '33.3%' |
| | | }] |
| | | min: 10, |
| | | max: 100, |
| | | precision: 1, |
| | | label: '宽度(%)', |
| | | initVal: card.width || 100, |
| | | required: true, |
| | | forbid: !['detail'].includes(_type) |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'height', |
| | | min: 1, |
| | | max: 10, |
| | | label: '高度(行)', |
| | | initVal: card.height || 1, |
| | | required: true, |
| | | forbid: !['detail'].includes(_type) |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'widthType', |
| | | label: '宽度设置', |
| | | initVal: card.widthType || 'absolute', |
| | | initVal: card.widthType || 'ratio', |
| | | required: false, |
| | | forbid: !['avatar'].includes(_type), |
| | | hidden: true, |
| | | readonly: !!isRatioCard, |
| | | options: [{ |
| | | value: 'ratio', |
| | | text: '比例' |
| | |
| | | forbid: !['avatar'].includes(_type) |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'radius', |
| | | label: '圆角', |
| | | initVal: card.radius || 'true', |
| | | required: false, |
| | | forbid: !['avatar'].includes(_type), |
| | | options: [{ |
| | | value: 'true', |
| | | text: '有' |
| | | }, { |
| | | value: 'false', |
| | | text: '无' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'size', |
| | | label: '字体大小', |
| | |
| | | orderParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | orderParam.secretkey = Utils.encrypt(orderParam.LText, orderParam.timestamp) |
| | | |
| | | orderParam.open_key = Utils.encrypt(orderParam.secretkey, orderParam.timestamp, true) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(orderParam).then(res => { |
| | | if (res.status) { |
| | | resolve(res) |
| | |
| | | |
| | | orderDetailParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | orderDetailParam.secretkey = Utils.encrypt(orderDetailParam.LText, orderDetailParam.timestamp) |
| | | |
| | | orderDetailParam.open_key = Utils.encrypt(orderDetailParam.secretkey, orderDetailParam.timestamp, true) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(orderDetailParam).then(res => { |
| | | if (res.status) { |
| | |
| | | voucherParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | voucherParam.secretkey = Utils.encrypt(voucherParam.LText, voucherParam.timestamp) |
| | | |
| | | voucherParam.open_key = Utils.encrypt(voucherParam.secretkey, voucherParam.timestamp, true) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(voucherParam).then(res => { |
| | | if (res.status) { |
| | | resolve(res) |
| | |
| | | |
| | | voucherDetailParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | voucherDetailParam.secretkey = Utils.encrypt(voucherDetailParam.LText, voucherDetailParam.timestamp) |
| | | |
| | | voucherDetailParam.open_key = Utils.encrypt(voucherDetailParam.secretkey, voucherDetailParam.timestamp, true) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(voucherDetailParam).then(res => { |
| | | if (res.status) { |
| | |
| | | _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) |
| | | |
| | | _sParam.open_key = Utils.encrypt(_sParam.secretkey, _sParam.timestamp, true) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(_sParam).then(res => { |
| | | if (res.status) { |
| | | let _scripts = [] |
| | |
| | | * @description md5加密 |
| | | * @return {String} str 加密串 |
| | | * @return {String} timestamp 时间戳 |
| | | * @return {Boolean} isopenkey 是否为云端密钥 |
| | | */ |
| | | static encrypt (str, timestamp) { |
| | | let salt = 'mingke' // 盐值 |
| | | let _str = str + salt + timestamp |
| | | static encrypt (str, timestamp, isopenkey) { |
| | | let salt1 = 'mingke' // sql语法盐值 |
| | | let salt2 = 'open_key' // 云端数据操作盐值 |
| | | let _str = '' |
| | | |
| | | if (isopenkey) { |
| | | _str = salt2 + timestamp + str |
| | | } else { |
| | | _str = str + salt1 + timestamp |
| | | } |
| | | |
| | | if (_str.length > 8000) { |
| | | _str = _str.slice(_str.length - 8000) |
| | | } |
| | |
| | | Appkey: window.GLOB.appkey || '' |
| | | } |
| | | |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | _param.secretkey = Utils.encrypt(_param.LTextOut, _param.timestamp) |
| | | _param.open_key = Utils.encrypt(_param.secretkey, _param.timestamp, true) |
| | | |
| | | Api.dostarInterface(_param).then(response => { |
| | | if (response.status) { |
| | | message.success('应用创建成功。') |
| | |
| | | .ant-form-item { |
| | | font-size: 16px; |
| | | margin-bottom: 3vh; |
| | | height: 40px; |
| | | } |
| | | .btn-login { |
| | | margin-bottom: 3vh; |
| | |
| | | import {connect} from 'react-redux' |
| | | import { Icon } from 'antd' |
| | | |
| | | // import Api from '@/api' |
| | | import zhCN from '@/locales/zh-CN/login.js' |
| | | import enUS from '@/locales/en-US/login.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | this.setState({ |
| | | view: {uuid: 'login', type: 'login', parentId: null, parentType: null} |
| | | view: {uuid: 'login', type: 'home', parentId: null, parentType: null} |
| | | }) |
| | | } |
| | | |
| | |
| | | width: 375px; |
| | | height: calc(100vh - 70px); |
| | | margin: 0 auto; |
| | | background: #ffffff url('../../assets/mobimg/mobile.png'); |
| | | background: #ffffff; |
| | | background-size: 100% 100%; |
| | | padding: 5vh 13px 6vh; |
| | | border-radius: 30px; |