| | |
| | | "rc-drawer": "2.0.9", |
| | | "rc-dropdown": "2.4.1", |
| | | "rc-editor-mention": "1.1.13", |
| | | "rc-form": "2.4.8", |
| | | "rc-form": "2.4.11", |
| | | "rc-input-number": "4.5.0", |
| | | "rc-mentions": "0.4.0", |
| | | "rc-menu": "7.4.28", |
| | |
| | | } |
| | | }, |
| | | "rc-form": { |
| | | "version": "2.4.8", |
| | | "resolved": "https://registry.npmjs.org/rc-form/-/rc-form-2.4.8.tgz", |
| | | "integrity": "sha512-hlHajcYg51pFQf+B6neAbhy2ZA+8DmxnDxiOYZRAXCLhPN788ZnrtZq5/iADDWcZqjHFnXiThoZE/Fu8syciDQ==", |
| | | "version": "2.4.11", |
| | | "resolved": "https://registry.npmjs.org/rc-form/-/rc-form-2.4.11.tgz", |
| | | "integrity": "sha512-8BL+FNlFLTOY/A5X6tU35GQJLSIpsmqpwn/tFAYQTczXc4dMJ33ggtH248Cum8+LS0jLTsJKG2L4Qp+1CkY+sA==", |
| | | "requires": { |
| | | "async-validator": "1.11.5", |
| | | "babel-runtime": "6.26.0", |
| | |
| | | "dom-scroll-into-view": "1.2.1", |
| | | "hoist-non-react-statics": "3.3.0", |
| | | "lodash": "4.17.15", |
| | | "rc-util": "4.21.1", |
| | | "warning": "4.0.3" |
| | | }, |
| | | "dependencies": { |
| | | "rc-util": { |
| | | "version": "4.21.1", |
| | | "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-4.21.1.tgz", |
| | | "integrity": "sha512-Z+vlkSQVc1l8O2UjR3WQ+XdWlhj5q9BMQNLk2iOBch75CqPfrJyGtcWMcnhRlNuDu0Ndtt4kLVO8JI8BrABobg==", |
| | | "requires": { |
| | | "add-dom-event-listener": "1.1.0", |
| | | "prop-types": "15.7.2", |
| | | "react-is": "16.13.1", |
| | | "react-lifecycles-compat": "3.0.4", |
| | | "shallowequal": "1.1.0" |
| | | } |
| | | }, |
| | | "react-is": { |
| | | "version": "16.13.1", |
| | | "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", |
| | | "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" |
| | | } |
| | | } |
| | | }, |
| | | "rc-gesture": { |
| | |
| | | "postcss-preset-env": "6.7.0", |
| | | "postcss-safe-parser": "4.0.1", |
| | | "prop-types": "^15.7.2", |
| | | "rc-form": "^2.4.11", |
| | | "react": "^16.9.0", |
| | | "react-app-polyfill": "^1.0.2", |
| | | "react-codemirror2": "^7.1.0", |
| | |
| | | {this.props.editLevel === 'level4' ? <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} |
| | | {/* 头像、用户名 */} |
| | |
| | | import React, {Component} from 'react' |
| | | // import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | // import { Flex, WhiteSpace, Tabs } from 'antd-mobile' |
| | | // import { is, fromJS } from 'immutable' |
| | | import { InputItem, Icon, Checkbox, Picker, List, Button } from 'antd-mobile' |
| | | import { createForm } from 'rc-form' |
| | | |
| | | import zhCN from '@/locales/zh-CN/mob.js' |
| | | import enUS from '@/locales/en-US/mob.js' |
| | | import mklogo from '@/assets/mobimg/mklogo.png' |
| | | import './index.scss' |
| | | |
| | | const CheckboxItem = Checkbox.CheckboxItem |
| | | const langs = [ |
| | | { |
| | | label: 'zh-CN', |
| | | value: '中文简体', |
| | | }, |
| | | { |
| | | label: 'en-US', |
| | | value: 'English', |
| | | } |
| | | ] |
| | | |
| | | class MobLogin extends Component { |
| | | // static propTpyes = { |
| | |
| | | // } |
| | | state = { |
| | | dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | lang: ['zh-CN'], |
| | | rember: true, |
| | | param: { |
| | | background: {color: '#000000', image: ''}, |
| | | logo: {width: ''} |
| | | } |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | onChange = () => { |
| | | const { rember } = this.state |
| | | |
| | | this.setState({ |
| | | rember: !rember |
| | | }) |
| | | } |
| | | |
| | | onChangeLang = (value) => { |
| | | this.setState({ |
| | | lang: value |
| | | }) |
| | | } |
| | | |
| | | render () { |
| | | const { getFieldProps } = this.props.form |
| | | const { lang, rember } = this.state |
| | | |
| | | return ( |
| | | <div className="mob-login"> |
| | | |
| | | <div className="logo" style={{marginTop: `calc(17vh - 10px)`}}> |
| | | <img src={mklogo} alt=""/> |
| | | </div> |
| | | <div className="plat-name">明科商业智能开放平台</div> |
| | | <InputItem |
| | | placeholder="UserName" |
| | | prefixListCls="mk-login-item am-list" |
| | | {...getFieldProps('userName', { |
| | | initialValue: '8888', |
| | | })} |
| | | > |
| | | <Icon type="check-circle-o" /> |
| | | </InputItem> |
| | | <InputItem |
| | | placeholder="Password" |
| | | prefixListCls="mk-login-item am-list" |
| | | {...getFieldProps('password', { |
| | | initialValue: '8888', |
| | | })} |
| | | type={'password'} |
| | | > |
| | | <Icon type="check-circle-o" /> |
| | | </InputItem> |
| | | <div className="other-setting"> |
| | | <CheckboxItem checked={rember} onChange={this.onChange}> |
| | | <span onClick={this.onChange}>记住密码</span> |
| | | </CheckboxItem> |
| | | <Picker data={langs} value={lang} cols={1} onChange={this.onChangeLang} className="forss"> |
| | | <List.Item>{lang}</List.Item> |
| | | </Picker> |
| | | <div className="clear-both"></div> |
| | | </div> |
| | | <Button type="primary">登录</Button> |
| | | <div className="company-msg"> |
| | | <p>Copyright©2017 所有相关版权归 北京明科普华信息技术有限公司</p> |
| | | </div> |
| | | </div> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default MobLogin |
| | | export default createForm()(MobLogin) |
| | |
| | | .mob-login { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | background: linear-gradient(#378DBE, #46C29E, #48A9D6); |
| | | |
| | | .logo { |
| | | max-width: 280px; |
| | | margin: 0 auto; |
| | | margin-top: calc(15vh); |
| | | text-align: center; |
| | | |
| | | img { |
| | | max-width: 100%; |
| | | } |
| | | } |
| | | .plat-name { |
| | | max-width: 280px; |
| | | margin: 0 auto; |
| | | margin-top: 15px; |
| | | margin-bottom: 30px; |
| | | text-align: center; |
| | | font-size: 20px; |
| | | color: #ffffff; |
| | | font-weight: bold; |
| | | } |
| | | .mk-login-item.am-list-item { |
| | | width: 245px; |
| | | max-width: 270px; |
| | | margin: 0 auto; |
| | | margin-bottom: 10px; |
| | | border-radius: 30px; |
| | | background-color: rgba(255, 255, 255, 0.3); |
| | | .am-input-label { |
| | | width: 30px; |
| | | color: #ffffff; |
| | | padding-top: 10px; |
| | | } |
| | | input { |
| | | color: #fafafa; |
| | | } |
| | | input::-webkit-input-placeholder { |
| | | color: #ffffff; |
| | | } |
| | | input:-moz-placeholder { |
| | | color: #ffffff; |
| | | } |
| | | input::-moz-placeholder { |
| | | color: #ffffff; |
| | | } |
| | | input:-ms-input-placeholder { |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | .am-list-item:not(:last-child) .am-list-line { |
| | | border: none; |
| | | } |
| | | .other-setting { |
| | | width: 245px; |
| | | max-width: 270px; |
| | | margin: 0 auto; |
| | | margin-bottom: 10px; |
| | | .am-list-item { |
| | | float: left; |
| | | background: transparent; |
| | | width: 50%; |
| | | padding: 0; |
| | | .am-list-thumb:first-child { |
| | | margin-right: 5px; |
| | | |
| | | .am-checkbox-inner { |
| | | width: 18px; |
| | | height: 18px; |
| | | } |
| | | .am-checkbox-inner:after { |
| | | width: 5px; |
| | | height: 9px; |
| | | } |
| | | } |
| | | .am-list-line .am-list-content { |
| | | font-size: 14px; |
| | | color: #fafafa; |
| | | } |
| | | .am-list-extra { |
| | | display: none; |
| | | } |
| | | } |
| | | > div:not(.am-list-item) { |
| | | float: right; |
| | | background: transparent; |
| | | padding: 0; |
| | | .am-list-item { |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | | >.am-button { |
| | | width: 245px; |
| | | max-width: 270px; |
| | | margin: 0 auto; |
| | | border-radius: 30px; |
| | | } |
| | | .company-msg { |
| | | position: absolute; |
| | | width: 100%; |
| | | bottom: 20px; |
| | | padding: 0 20px; |
| | | font-size: 12px; |
| | | color: #fafafa; |
| | | text-align: center; |
| | | } |
| | | } |
| | | .am-picker-popup-wrap { |
| | | left: calc(50vw - 305px); |
| | | right: calc(50vw - 45px); |
| | | bottom: 54px; |
| | | overflow: hidden; |
| | | } |
| | | .clear-both { |
| | | float: none!important; |
| | | clear: both; |
| | | } |
| | |
| | | import { sysTemps } from '@/utils/option.js' |
| | | import zhCN from '@/locales/zh-CN/header.js' |
| | | import enUS from '@/locales/en-US/header.js' |
| | | import nortable from '@/assets/img/normaltable.jpg' |
| | | import mainsubtable from '@/assets/img/mainsubtable.jpg' |
| | | import treepage from '@/assets/img/treepage.jpg' |
| | | |
| | | import Preview from './preview' |
| | | import MenuForm from './menuform' |
| | |
| | | const { Search } = Input |
| | | |
| | | const illust = { // 模板图片,用于已使用模板 |
| | | CommonTable: nortable |
| | | CommonTable: mainsubtable, |
| | | TreePage: treepage |
| | | } |
| | | |
| | | class EditMenu extends Component { |
| | |
| | | } |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | /** |
| | | * @description 组件销毁,清除state更新 |
| | | */ |
| | |
| | | cardcell: null // 卡片元素 |
| | | } |
| | | |
| | | componentDidMount () { |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | |
| | | this.props.plotchange({...config, charts: _charts}) |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | render() { |
| | | const { plot } = this.props |
| | | |
| | | console.log(plot) |
| | | return ( |
| | | <div className="line-chart-edit-box" style={{minHeight: plot.height ? plot.height + 50 : 450}}> |
| | | {plot.title ? <p className="chart-title">{plot.title}</p> : null} |
| | |
| | | this.props.updatechartgroup(config, id) |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | /** |
| | | * @description 组件销毁,清除state更新 |
| | | */ |
| | |
| | | }) |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | /** |
| | | * @description 组件销毁,清除state更新 |
| | | */ |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, Empty, notification } from 'antd' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | } |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | /** |
| | | * @description 组件销毁,清除state更新 |
| | | */ |
| | |
| | | } |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | render() { |
| | | const { dict, searchlist, visible, sqlVerifing, card } = this.state |
| | | |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Modal, Button, notification } from 'antd' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | }) |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | /** |
| | | * @description 组件销毁,清除state更新 |
| | | */ |
| | |
| | | reject() |
| | | return |
| | | } else if (values.interType === 'inner' && !values.innerFunc && values.default !== 'false' && values.dataresource) { |
| | | let _quot = values.dataresource.match(/'{1}/g) |
| | | let _lparen = values.dataresource.match(/\({1}/g) |
| | | let _rparen = values.dataresource.match(/\){1}/g) |
| | | |
| | | _quot = _quot ? _quot.length : 0 |
| | | _lparen = _lparen ? _lparen.length : 0 |
| | | _rparen = _rparen ? _rparen.length : 0 |
| | | |
| | | if (_quot % 2 !== 0) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '数据源中\'必须成对出现', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (_lparen !== _rparen) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '数据源中()必须成对出现', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (/--/ig.test(values.dataresource)) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '数据源中,不可出现字符 -- ,注释请用 /*内容*/', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | let error = Utils.verifySql(values.dataresource) |
| | | |
| | | if (error) { |
| | |
| | | } |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | /** |
| | | * @description 组件销毁,清除state更新 |
| | | */ |
| | |
| | | |
| | | const Header = asyncComponent(() => import('@/mob/header')) |
| | | const Home = asyncComponent(() => import('@/mob/home')) |
| | | // const Login = asyncComponent(() => import('@/mob/login')) |
| | | const Login = asyncComponent(() => import('@/mob/login')) |
| | | |
| | | class Mobile extends Component { |
| | | state = { |
| | | dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | view: null |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | this.setState({ |
| | | view: {uuid: 'login', type: 'login', parentId: null, parentType: null} |
| | | }) |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { view } = this.state |
| | | |
| | | return ( |
| | | <div className="mobile-view"> |
| | | <Header /> |
| | | <div className="mob-body"> |
| | | <div className="mob-tool"> |
| | | <div className="mob-tool-item"><Icon type="plus-circle" />添 加 内 容</div> |
| | | <div className="mob-tool-content"> |
| | | <div className="plus-content"> |
| | | <Icon type="plus-circle" />添 加 内 容 |
| | | </div> |
| | | <div className="useable-component"></div> |
| | | </div> |
| | | <div className="mob-tool-other"></div> |
| | | </div> |
| | | <div className="mob-shell"> |
| | | <div className="mob-shell-inner"> |
| | | <Home /> |
| | | </div> |
| | | {view ? <div className="mob-shell-inner"> |
| | | {view.type === 'login' ? <Login /> : null} |
| | | {view.type === 'home' ? <Home /> : null} |
| | | </div> : null} |
| | | </div> |
| | | <div className="mob-setting"> |
| | | </div> |
| | |
| | | width: 40px; |
| | | background: #262626; |
| | | box-shadow: 2px 0px 2px #000; |
| | | .mob-tool-item { |
| | | .mob-tool-content { |
| | | width: 100%; |
| | | .plus-content { |
| | | position: relative; |
| | | color: #ffffff; |
| | | width: 100%; |
| | | display: flex; |
| | |
| | | padding: 16px 0; |
| | | border-bottom: 1px solid #000; |
| | | cursor: pointer; |
| | | z-index: 10; |
| | | background: #262626; |
| | | i { |
| | | margin-bottom: 5px; |
| | | margin-left: 2px; |
| | | } |
| | | } |
| | | |
| | | .useable-component { |
| | | position: absolute; |
| | | width: 300px; |
| | | top: 0; |
| | | bottom: 0; |
| | | left: -340px; |
| | | background: #fff; |
| | | opacity: 0; |
| | | transition: left 0.3s, opacity 0.3s; |
| | | } |
| | | } |
| | | .mob-tool-content:hover { |
| | | .useable-component { |
| | | opacity: 1; |
| | | left: 40px; |
| | | } |
| | | } |
| | | .mob-tool-other { |
| | | position: relative; |
| | | z-index: 10; |
| | | height: 1000px; |
| | | background: #262626; |
| | | } |
| | | } |
| | | |
| | | .mob-setting { |