king
2020-02-01 b786fa52322e1192652ff44a41c39bfed9738006
2020-02-01
14个文件已修改
144 ■■■■■ 已修改文件
public/options.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/editthdmenu/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/en-US/comtable.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/comtable.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/options.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/actionList/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.js
@@ -1,7 +1,8 @@
window.GLOB = {
  service: 'mkwms',
  appId: '201912040924165801464FF1788654BC5AC73',
  appkey: '20191106103859640976D6E924E464D029CF0',
  mainSystemApi: 'http://qingqiumarket.cn/mkwms/webapi/dostar',
  mainSystemApi: 'http://cloud.mk9h.cn/webapi/dostar',
  title: '',
  platName: '',
  logo: '',
src/api/index.js
@@ -26,10 +26,10 @@
})
const setCurrentUrl = () => {
  if (!!(window.history && window.history.pushState)) {
    window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login')
    window.location.reload()
  }
  // if (!!(window.history && window.history.pushState)) {
  //   window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login')
  //   window.location.reload()
  // }
}
let GlobMap = new Map()
@@ -104,6 +104,8 @@
    if (isCloud && options.cloudLoginApi) {
      param.rduri = options.cloudLoginApi
    } else if (window.GLOB.mainSystemApi) {
      param.rduri = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon')
    }
    return axios({
src/components/header/index.jsx
@@ -151,7 +151,12 @@
  async loadmenu () {
    // 获取主菜单
    let result = await Api.getSystemConfig({func: 'sPC_Get_MainMenu'})
    let _param = {func: 'sPC_Get_MainMenu'}
    if (sessionStorage.getItem('isEditState') === 'true') { // 编辑状态时,获取一级菜单,增加参数debug
      _param.debug = 'Y'
    }
    let result = await Api.getSystemConfig(_param)
    if (result.status) {
      if (result.debug === 'true') { // 是否为debug模式,即可复制菜单参数
        this.props.resetDebug()
@@ -194,7 +199,7 @@
  }
  async getRolesMenu () {
    // 获取主菜单
    // 获取角色权限
    let result = await Api.getSystemConfig({func: 'sPC_Get_RolesMenu'})
    if (result.status) {
      let _permAction = {}
src/components/sidemenu/editthdmenu/index.jsx
@@ -58,6 +58,7 @@
    editMenu: null,         // 编辑菜单
    editAction: null,       // 编辑按钮
    editTab: null,          // 编辑标签
    editSubTab: null,       // 编辑子标签(标签中的标签)
    subConfig: null         // 子配置信息
  }
@@ -671,6 +672,7 @@
          <SubTable
            menu={this.state.editMenu}
            editTab={this.state.editTab}
            editSubTab={this.state.editSubTab}
            config={this.state.subConfig}
            handleView={this.handleView}
          />
src/components/sidemenu/index.jsx
@@ -46,7 +46,13 @@
      return
    }
    let result = await Api.getSystemConfig({func: 'sPC_Get_FunMenu', ParentID: menu.MenuID})
    let _param = {func: 'sPC_Get_FunMenu', ParentID: menu.MenuID}
    if (sessionStorage.getItem('isEditState') === 'true') { // 编辑状态时,获取菜单,增加参数debug
      _param.debug = 'Y'
    }
    let result = await Api.getSystemConfig(_param)
    if (result.status) {
      if (result.data.length === 0) { // 查询菜单为空
        this.setState({
@@ -225,7 +231,7 @@
    e.stopPropagation()
    this.props.resetEditLevel('level2')
    // 获取一级菜单列表
    Api.getSystemConfig({func: 'sPC_Get_MainMenu'}).then(res => {
    Api.getSystemConfig({func: 'sPC_Get_MainMenu', debug: 'Y'}).then(res => {
      this.setState({
        mainMenuList: res.data.map(item => {
          return {
src/locales/en-US/comtable.js
@@ -116,7 +116,7 @@
  'header.form.openType': '打开方式',
  'header.form.pop': '弹窗',
  'header.form.popform': '弹窗(表单)',
  'header.form.popview': '弹窗(页面)',
  'header.form.popview': '弹窗(标签)',
  'header.form.tab': '标签页',
  'header.form.linkTab': '关联标签',
  'header.form.subTab': '下级标签',
src/locales/zh-CN/comtable.js
@@ -116,7 +116,7 @@
  'header.form.openType': '打开方式',
  'header.form.pop': '弹窗',
  'header.form.popform': '弹窗(表单)',
  'header.form.popview': '弹窗(页面)',
  'header.form.popview': '弹窗(标签)',
  'header.form.tab': '标签页',
  'header.form.linkTab': '关联标签',
  'header.form.subTab': '下级标签',
src/store/options.js
@@ -1,10 +1,11 @@
// 系统配置
export default {
  systemType: 'Cloud', // Cloud 、 SSO 、 local, 云端使用系统配置appId
  AppId: '201912040924165801464FF1788654BC5AC73',
  cloudServiceApi: 'http://qingqiumarket.cn/mkwms/webapi/dostar',
  cloudLoginApi: 'http://qingqiumarket.cn/mkwms/webapi/dologon',
  // cloudServiceApi: 'http://cloud.mk9h.cn/webapi/dostar',
  // cloudLoginApi: 'http://cloud.mk9h.cn/webapi/dologon',
  // cloudServiceApi: 'http://qingqiumarket.cn/mkwms/webapi/dostar',
  // cloudLoginApi: 'http://qingqiumarket.cn/mkwms/webapi/dologon',
  cloudServiceApi: 'http://cloud.mk9h.cn/webapi/dostar',
  cloudLoginApi: 'http://cloud.mk9h.cn/webapi/dologon',
  cloudDatabase: 'sqlserver',
  localDatabase: 'mysql'
}
src/tabviews/tableshare/actionList/index.jsx
@@ -584,6 +584,7 @@
    } else if (res && res.ErrCode === '-1') { // 完成后不提示
    } else if (res.Relogin === 'true') { // 切换用户功能
      sessionStorage.setItem('avatar', res.icon || '')
      sessionStorage.setItem('UserID', res.UserID)
      sessionStorage.setItem('SessionUid', Utils.getuuid())
      sessionStorage.setItem('LoginUID', res.LoginUID)
src/templates/comtableconfig/index.jsx
@@ -2012,7 +2012,7 @@
          })
          return
        }
        console.log(item)
        // 菜单信息验证通过后,跳转子配置页面
        let _view = ''
        let uuid = item.uuid
src/templates/modalconfig/index.jsx
@@ -663,26 +663,26 @@
      return
    }
    if (config.setting.display === 'prompt') {
      let _fields = []
      if (config.groups.length > 0) {
        config.groups.forEach(group => {
          _fields = [..._fields, ...group.sublist]
        })
      } else {
        _fields = config.fields
      }
    // if (config.setting.display === 'prompt') { // 有需要置空的场景
    //   let _fields = []
    //   if (config.groups.length > 0) {
    //     config.groups.forEach(group => {
    //       _fields = [..._fields, ...group.sublist]
    //     })
    //   } else {
    //     _fields = config.fields
    //   }
  
      let readfields = _fields.filter(item => item.initval || item.initval === 0)
      if (readfields.length < _fields.length) {
        notification.warning({
          top: 92,
          message: '以《是否框》显示的弹框,所有表单必须含有默认值!',
          duration: 10
        })
        return
      }
    }
    //   let readfields = _fields.filter(item => item.initval || item.initval === 0)
    //   if (readfields.length < _fields.length) {
    //     notification.warning({
    //       top: 92,
    //       message: '以《是否框》显示的弹框,所有表单必须含有默认值!',
    //       duration: 10
    //     })
    //     return
    //   }
    // }
    let _LongParam = ''
    let _config = {...config, tables: this.state.selectedTables}
src/templates/subtableconfig/index.jsx
@@ -36,9 +36,9 @@
  static propTpyes = {
    menu: PropTypes.any,
    editTab: PropTypes.any,
    editSubTab: PropTypes.any,
    config: PropTypes.any,
    handleSubConfig: PropTypes.func,
    supMenuList: PropTypes.array
    handleView: PropTypes.func
  }
  state = {
@@ -1684,19 +1684,10 @@
   * @description 设置可配置按钮
   */
  setSubConfig = (btn) => {
    const { menu } = this.props
    const { config, originConfig } = this.state
    let isAdd = false
    if (
      (config.search[0] && config.search[0].origin) ||
      (config.action[0] && config.action[0].origin) ||
      (config.columns[0] && config.columns[0].origin)
    ) {
      isAdd = true
    }
    if (isAdd) {
    if (originConfig.isAdd) {
      notification.warning({
        top: 92,
        message: '菜单尚未保存,请保存菜单配置!',
@@ -1716,6 +1707,25 @@
          this.setState({
            loading: true
          })
          // 子菜单信息验证通过后,跳转子按钮配置页面
          let _view = ''
          if (btn.OpenType === 'pop') {
            _view = 'Modal'             // 表单页面
          } else if (btn.OpenType === 'popview') {
            _view = btn.tabType        // 新弹窗标签模板
          }
          let param = {
            editMenu: menu,
            editTab: originConfig,
            editSubTab: '',
            editAction: btn,
            subConfig: '',
            tabview: _view
          }
          Api.getSystemConfig({
            func: 'sPC_Get_LongParam',
            MenuID: btn.OpenType === 'popview' ? btn.linkTab : btn.uuid
@@ -1734,7 +1744,13 @@
                }
              }
              this.props.handleSubConfig(btn, config, _LongParam, 'tabButton')
              if (_LongParam && param.tabview === 'Modal' && _LongParam.type === 'Modal') {
                param.subConfig = _LongParam
              } else if (_LongParam && param.tabview === 'SubTable' && _LongParam.Template === 'SubTable') {
                param.subConfig = _LongParam
              }
              this.props.handleView(param)
            } else {
              this.setState({
                loading: false
src/utils/utils.js
@@ -913,7 +913,7 @@
      ROLLBACK TRAN
      
    END`
    console.log(Ltext)
    Ltext = Ltext.replace(/\n\s{4}/ig, 'mchr13k')
    return Ltext
src/views/login/index.jsx
@@ -99,8 +99,14 @@
  componentDidMount () {
    let timeStamp = new Date().getTime()
    let str = md5('MK19' + options.AppId + timeStamp)
    Api.systemauth(options.AppId, timeStamp).then(res => {
    let _appId = window.GLOB.appId
    if (options.systemType === 'Cloud') { // 云端使用系统配置appid
      _appId = options.AppId
    }
    let str = md5('MK19' + _appId + timeStamp)
    Api.systemauth(_appId, timeStamp).then(res => {
      if (res.status && res.EPC === str) {
        let box = []
        for (let i = 0; i < 15; i++) {