| | |
| | | .side-menu { |
| | | flex: 0 0 235px; |
| | | width: 235px; |
| | | padding: 48px 0 20px; |
| | | padding: 48px 0 40px; |
| | | transition: width 0.2s, flex 0.2s; |
| | | .ant-menu-item { |
| | | padding-left: 0!important; |
| | |
| | | let _data = [] |
| | | let _valfield = 'value' |
| | | let _typefield = 'key' |
| | | let ispercent = false |
| | | |
| | | if (plot.datatype === 'statistics') { |
| | | _valfield = plot.InfoValue |
| | | _typefield = plot.InfoType |
| | | |
| | | if (percentFields.length > 0) { |
| | | ispercent = true |
| | | } |
| | | |
| | | _data = this.getStaticData() |
| | | } else { |
| | |
| | | }) |
| | | } |
| | | chart.scale(_valfield, { |
| | | nice: true |
| | | nice: true, |
| | | range: [0, 0.93] |
| | | }) |
| | | |
| | | // 坐标轴格式化 |
| | |
| | | .tooltip(`${plot.Xaxis}*${_valfield}*${_typefield}`, (name, value, type) => { |
| | | return { |
| | | name: type, |
| | | value: percentFields.includes(type) ? value + '%' : value |
| | | value: percentFields.includes(type) || ispercent ? value + '%' : value |
| | | } |
| | | }) |
| | | |
| | |
| | | let _data = [] |
| | | let _valfield = 'value' |
| | | let _typefield = 'key' |
| | | let ispercent = false |
| | | |
| | | if (plot.datatype === 'statistics') { |
| | | _valfield = plot.InfoValue |
| | | _typefield = plot.InfoType |
| | | |
| | | if (percentFields.length > 0) { |
| | | ispercent = true |
| | | } |
| | | |
| | | _data = this.getStaticData() |
| | | } else { |
| | |
| | | chart.data(_data) |
| | | |
| | | chart.scale(_valfield, { |
| | | nice: true |
| | | nice: true, |
| | | range: [0, 0.93] |
| | | }) |
| | | |
| | | // 坐标轴格式化 |
| | |
| | | .tooltip(`${plot.Xaxis}*${_valfield}*${_typefield}`, (name, value, type) => { |
| | | return { |
| | | name: type, |
| | | value: percentFields.includes(type) ? value + '%' : value |
| | | value: percentFields.includes(type) || ispercent ? value + '%' : value |
| | | } |
| | | }) |
| | | |
| | |
| | | .tooltip(`${plot.Xaxis}*${_valfield}*${_typefield}`, (name, value, type) => { |
| | | return { |
| | | name: type, |
| | | value: percentFields.includes(type) ? value + '%' : value |
| | | value: percentFields.includes(type) || ispercent ? value + '%' : value |
| | | } |
| | | }) |
| | | |
| | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | let timeStamp = new Date().getTime() |
| | | const timeStamp = new Date().getTime() |
| | | const _authUrl = window.location.href.split('#')[0] + 'AuthCode' |
| | | let _appId = window.GLOB.appId |
| | | |
| | | if (options.sysType === 'cloud') { // 云端使用系统配置appid |
| | |
| | | func: 'sEmpowerCloud_Get_LinkUrl', |
| | | AppID: _appId, |
| | | TimeStamp: timeStamp, |
| | | appkey: window.GLOB.appkey, |
| | | userid: 'bh0bapabtd45epsgra79segbch6c1ibk', |
| | | LoginUID: 'bh0bapabtd45epsgra79segbch6c1ibk' |
| | | } |
| | |
| | | box.push(md5(s)) |
| | | } |
| | | box = box.join(',') |
| | | localStorage.setItem('AuthCode', box) |
| | | localStorage.setItem(_authUrl, box) |
| | | |
| | | this.setState({ |
| | | auth: true |
| | | }) |
| | | } else { |
| | | localStorage.removeItem('AuthCode') |
| | | localStorage.removeItem(_authUrl) |
| | | this.setState({ |
| | | auth: false |
| | | }) |
| | | } |
| | | } else if (res.ErrCode === 'N') { |
| | | localStorage.removeItem('AuthCode') |
| | | localStorage.removeItem(_authUrl) |
| | | this.setState({ |
| | | auth: false |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | let authCode = localStorage.getItem('AuthCode') |
| | | let authCode = localStorage.getItem(_authUrl) |
| | | let _s = md5('mksoft' + moment().format('YYYYMMDD')) |
| | | if (authCode && authCode.includes(_s)) { |
| | | this.setState({ |