king
2019-12-03 70c47c170ae1cc154e68c1af407e4f6ebf04669e
2019-12-03
16个文件已修改
1个文件已添加
117 ■■■■■ 已修改文件
public/index.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/main.scss 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/img/loginbg-origin.jpg 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/img/loginbg.jpg 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/en-US/comtable.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/comtable.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/source.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/loginform.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/index.html
@@ -9,7 +9,7 @@
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo.png" />
    <script src="%PUBLIC_URL%/options.js"></script>
    <title>MinkeSoft</title>
    <title></title>
  </head>
  <body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
public/options.js
@@ -1,5 +1,13 @@
window.GLOB = {
  service: 'mkwms',
  appkey: '20191106103859640976D6E924E464D029CF0',
  mainSystemApi: ''
  mainSystemApi: '',
  title: '',
  logo: '',
  bgImage: '',
  platName: '',
  copyright: '',
  ICP: '',
  bgColor: '',
  lineColor: ''
}
src/api/index.js
@@ -1,5 +1,6 @@
import axios from 'axios'
import qs from 'qs'
import {notification } from 'antd'
// axios.defaults.baseURL = 'http://qingqiumarket.cn'
axios.defaults.crossDomain = true
@@ -35,14 +36,21 @@
    return Promise.resolve(response.data)
  }
}, (error) => {
  // console.log(error.response.status)
  notification.error({
    className: 'notification-custom-error',
    bottom: 0,
    message: '状态码-' + error.response.status + ',请联系管理员',
    placement: 'bottomRight',
    duration: 15
  })
  return Promise.reject(error)
})
class Api {
  constructor() {
    let service = window.GLOB.service ? (/\/$/.test(window.GLOB.service) ? window.GLOB.service : window.GLOB.service + '/') : ''
    if (process.env.NODE_ENV === 'production') {
      axios.defaults.baseURL = document.location.origin + (window.GLOB.service ? '/' + window.GLOB.service : '')
      axios.defaults.baseURL = document.location.origin + '/' + service
    } else {
      // axios.defaults.baseURL = 'http://127.0.0.1:8888'
    }
src/assets/css/main.scss
@@ -143,4 +143,17 @@
.ant-popover {
  z-index: 1090!important;
}
.ant-notification-notice.notification-custom-error {
  background: #f5222d;
  .anticon.ant-notification-notice-icon-error {
    color: #ffffff;
  }
  .ant-notification-notice-message {
    color: #ffffff;
  }
  .ant-notification-close-icon {
    color: #ffffff;
  }
}
src/assets/img/loginbg-origin.jpg
src/assets/img/loginbg.jpg

src/components/header/index.jsx
@@ -177,6 +177,12 @@
          return item
        })
      })
    } else {
      notification.error({
        top: 92,
        message: result.message,
        duration: 15
      })
    }
  }
src/components/tabview/index.jsx
@@ -16,6 +16,7 @@
let Comps = {}
let service = window.GLOB.service ? (/\/$/.test(window.GLOB.service) ? window.GLOB.service : window.GLOB.service + '/') : ''
class Header extends Component {
  static propTpyes = {
@@ -71,7 +72,7 @@
    } else if (view.type === 'TabForm') {
      return (<Comps.TabForm MenuNo={view.MenuNo} MenuID={view.MenuID} key={view.MenuID} param={view.param}/>)
    } else if (view.type === 'iframe') {
      return (<Comps.Iframe key={view.MenuID} title={view.MenuName} url={'http://qingqiumarket.cn/MKWMS/zh-CN/' + view.LinkUrl}/>)
      return (<Comps.Iframe key={view.MenuID} title={view.MenuName} url={'http://qingqiumarket.cn/' + service + 'zh-CN/' + view.LinkUrl}/>)
    } else {
      return (<NotFount key={view.MenuID} />)
    }
src/index.js
@@ -21,6 +21,8 @@
  )
}
document.title = window.GLOB.title || 'MinkeSoft'
render(Route)
serviceWorker.unregister()
src/locales/en-US/comtable.js
@@ -50,6 +50,7 @@
  'header.form.type': 'Type',
  'header.form.text': 'Text',
  'header.form.picture': '图片',
  'header.form.number': '数字',
  'header.form.colspan': '合并列',
  'header.form.select': 'Select',
  'header.form.link': '关联菜单',
src/locales/zh-CN/comtable.js
@@ -50,6 +50,7 @@
  'header.form.type': '类型',
  'header.form.text': '文本',
  'header.form.picture': '图片',
  'header.form.number': '数字',
  'header.form.colspan': '合并列',
  'header.form.select': '选择',
  'header.form.link': '关联菜单',
src/tabviews/commontable/index.jsx
@@ -318,24 +318,6 @@
  UNSAFE_componentWillMount () {
    // 组件加载时,获取菜单数据
    this.loadconfig()
    // this.loadmaindata()
    // this.setState({
    //   data: [1,2,3,4,5,6,7,8,9,10].map((item, index) => {
    //     return {
    //       key: index,
    //       ID: item + 'mainkey',
    //       ExRateName: '$',
    //       SupplierName: '天猫' + item + '店',
    //       SupShortName: '天猫',
    //       SupplierCode: '201922' + item,
    //       OrgName: '阿里巴巴',
    //       OrgCode: '302999',
    //       PlanDate: '2019-11-' + (item < 10 ? '0' + item : item)
    //     }
    //   }),
    //   total: 329
    // })
  }
  shouldComponentUpdate (nextProps, nextState) {
src/templates/comtableconfig/source.jsx
@@ -328,6 +328,12 @@
    },
    {
      type: 'columns',
      label: CommonDict['header.form.number'],
      subType: 'number',
      url: ''
    },
    {
      type: 'columns',
      label: CommonDict['header.form.colspan'],
      subType: 'colspan',
      url: ''
src/utils/utils.js
@@ -1,5 +1,7 @@
import moment from 'moment'
const service = window.GLOB.service ? (/\/$/.test(window.GLOB.service) ? window.GLOB.service : window.GLOB.service + '/') : ''
export default class Utils {
  /**
   * @description 生成32位uuid string + 时间
@@ -262,9 +264,9 @@
    if (!url) return ''
    let baseurl = ''
    if (process.env.NODE_ENV === 'production') {
      baseurl = document.location.origin + '/'
      baseurl = document.location.origin + '/' + service
    } else {
      baseurl = 'http://qingqiumarket.cn/MKWMS/'
      baseurl = 'http://qingqiumarket.cn/' + service
    }
    let realurl = url.match(/^http/) || url.match(/^\/\//) ? url : baseurl + url
    return realurl
src/views/login/index.jsx
@@ -20,7 +20,14 @@
    selectedlang: iszhCN ? 'zh-CN' : 'en-US',
    dict: iszhCN ? zhCN : enUS,
    isDisabled: false,
    auth: false
    auth: false,
    logo: window.GLOB.logo || logourl,
    bgImage: window.GLOB.bgImage || loginbg,
    platName: window.GLOB.platName || '明科商业智能开放平台',
    copyright: window.GLOB.copyright || 'Copyright©2017    所有相关版权归    北京明科普华信息技术有限公司',
    ICP: window.GLOB.ICP || 'ICP备案: 京ICP备12007830号',
    bgColor: window.GLOB.bgColor || '#000000',
    lineColor: window.GLOB.lineColor || '#06b4f7'
  }
  changelang (item) {
@@ -119,12 +126,13 @@
  render () {
    return (
      <div className="login-container">
        <div className="logo">
          <img src={logourl} alt=""/>
      <div className="login-container" style={{backgroundImage: 'url(' + this.state.bgImage + ')', backgroundColor: this.state.bgColor}}>
        <div className="logo" style={{borderColor: this.state.lineColor}}>
          <img src={this.state.logo} alt=""/>
        </div>
        <div className="login-middle" style={{background: 'url(' + loginbg + ')'}}>
        <div className="login-middle" style={{borderColor: this.state.lineColor}}>
          <LoginForm
            platName={this.state.platName}
            dict={this.state.dict}
            auth={this.state.auth}
            lang={this.state.selectedlang}
@@ -135,15 +143,8 @@
          />
        </div>
        <div className="login-bottom">
          <p>
            <span className="split">Copyright©2017</span>
            <span className="split">{this.state.dict['login.copyright']}</span>
            <span>北京明科普华信息技术有限公司</span>
          </p>
          <p>
            <span>ICP备案:</span>
            <span>京ICP备12007830号</span>
          </p>
          <p dangerouslySetInnerHTML={{ __html: this.state.copyright.replace(/\s/ig, '&nbsp;') }}></p>
          <p dangerouslySetInnerHTML={{ __html: this.state.ICP.replace(/\s/ig, '&nbsp;') }}></p>
        </div>
      </div>
    )
src/views/login/index.scss
@@ -1,7 +1,9 @@
.login-container {
  height: 100vh;
  min-height: 600px;
  background: #000000;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  .logo {
    height: 100px;
    padding-top: 30px;
@@ -13,7 +15,6 @@
  .login-middle {
    height: calc(100vh - 194px);
    min-height: 420px;
    // background: url('../../assets/img/loginbg.jpg');
    background-size: cover;
    background-position: center center;
    border-bottom: 2px solid #06b4f7;
src/views/login/loginform.jsx
@@ -13,6 +13,7 @@
    dict: PropTypes.object,
    auth: PropTypes.bool,
    lang: PropTypes.string,
    platName: PropTypes.string
  }
  state = {}
@@ -62,7 +63,7 @@
    return (
      <Form onSubmit={this.handleSubmit} className="login-form" id="login-form">
        <h4>明科商业智能开放平台</h4>
        <h4>{this.props.platName}</h4>
        <Form.Item>
          {getFieldDecorator('username', {
            rules: [{ required: true, message: this.props.dict['login.username.empty'] }],