king
2021-03-26 b816a38598a2b96f244ba1aacec05f7071b1a803
2021-03-26
27个文件已修改
231 ■■■■ 已修改文件
src/assets/mobimg/form.png 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/header/index.jsx 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/header/index.scss 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/index.scss 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/calendar/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/data-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/prop-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-pie/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/normal-form/index.jsx 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/scriptmanage/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/verupmanage/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/verupmanage/subtabtable/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/normalTable/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/sidemenu/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/mobimg/form.png

src/components/header/index.jsx
@@ -571,7 +571,7 @@
          return tab.MenuID !== menu.MenuID
        })
  
        if (this.props.tabviews.length !== tabs.length) {
        if (this.props.tabviews.length > tabs.length) {
          this.props.modifyTabview(fromJS(tabs).toJS())
        }
  
src/components/sidemenu/index.jsx
@@ -64,7 +64,7 @@
        return tab.MenuID !== menu.MenuID
      })
      if (this.props.tabviews.length !== tabs.length) {
      if (this.props.tabviews.length > tabs.length) {
        this.props.modifyTabview(fromJS(tabs).toJS())
      }
src/menu/components/form/formaction/index.jsx
@@ -133,6 +133,7 @@
    this.actionFormRef.handleConfirm().then(res => {
      res.type = card.type
      res.style = card.style || null
      if (card.verify) {
        res.verify = card.verify
      }
src/mob/header/index.jsx
@@ -1,100 +1,28 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import {Dropdown, Menu, Icon, Modal, Tooltip, Button } from 'antd'
import { logout } from '@/store/action'
import zhCN from '@/locales/zh-CN/mob.js'
import enUS from '@/locales/en-US/mob.js'
import avatar from '@/assets/img/avatar.jpg'
import MainLogo from '@/assets/img/main-logo.png'
import './index.scss'
const { confirm } = Modal
class MobHeader extends Component {
  static propTpyes = {
    view: PropTypes.string,
    saveIng: PropTypes.any,
    triggerSave: PropTypes.func,
  }
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    avatar: sessionStorage.getItem('CloudAvatar') || avatar,
    userName: sessionStorage.getItem('CloudUserName')
  }
  logout = () => {
    // 退出登录
    let _this = this
    confirm({
      title: this.state.dict['mob.logout.hint'],
      content: '',
      onOk() {
        sessionStorage.clear()
        _this.props.logout()
        _this.props.history.replace('/login')
      },
      onCancel() {}
    })
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
  render () {
    const { view } = this.props
    return (
      <header className="mob-header-container">
        <div className="header-logo"><img src={MainLogo} alt=""/></div>
        {view === 'manage' ?
          <div className="mob-manage-title">
            应用管理
          </div> :null
        }
        {view === 'design' ?
          <Menu
            mode="inline"
            theme="dark"
            inlineCollapsed={this.state.collapsed}
          >
            <Menu.Item key="2">
              <Tooltip placement="bottom" title="保存">
                <Button icon="save" loading={this.props.saveIng} onClick={this.props.triggerSave}></Button>
              </Tooltip>
            </Menu.Item>
          </Menu> : null
        }
        <Dropdown className="header-setting" overlay={
          <Menu>
            <Menu.Item key="2" onClick={this.logout}>{this.state.dict['mob.logout']}</Menu.Item>
          </Menu>
        }>
          <div>
            <img src={this.state.avatar} alt=""/>
            <span>
              <span className="username">{this.state.userName}</span> <Icon type="down" />
            </span>
          </div>
        </Dropdown>
        <div className="header-user">
          <img src={this.state.avatar} alt=""/>
          <span>
            <span className="username">{this.state.userName}</span>
          </span>
        </div>
      </header>
    )
  }
}
const mapStateToProps = () => {
  return {}
}
const mapDispatchToProps = (dispatch) => {
  return {
    logout: () => dispatch(logout())
  }
}
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(MobHeader))
export default MobHeader
src/mob/header/index.scss
@@ -1,7 +1,6 @@
.mob-header-container {
  width: 100%;
  height: 48px;
  padding-right: 320px;
  color: rgba(255, 255, 255, 0.65);
  position: fixed;
  top: 0px;
@@ -23,7 +22,7 @@
      max-height: 40px;
    }
  }
  .header-setting {
  .header-user {
    float: right;
    line-height: 48px;
    margin-right: 10px;
@@ -44,51 +43,6 @@
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }
  .mob-manage-title {
    position: absolute;
    left: calc(50vw - 45px);
    color: #ffffff;
    font-size: 16px;
    line-height: 48px;
    letter-spacing: 2px;
  }
  >.ant-menu {
    float: left;
    width: unset!important;
    .ant-menu-item {
      margin-bottom: 0!important;
      float: left;
      width: unset!important;
      cursor: default;
      .anticon-arrow-left {
        height: 24px;
        cursor: pointer;
      }
      .ant-btn {
        color: #fff;
        width: unset;
        cursor: pointer;
        height: 37px;
        background: transparent;
        border: 0;
        .anticon-save {
          margin-right: 0;
        }
      }
      .ant-btn[ant-click-animating-without-extra-node="true"]::after {
        display: none!important;
      }
      .ant-btn::before {
        display: none!important;
      }
    }
    .ant-menu-item.ant-menu-item-selected {
      background-color: transparent;
    }
    .ant-menu-item:not(:last-child) {
      border-right: 1px solid #353535;
    }
  }
}
src/pc/components/navbar/normal-navbar/index.scss
@@ -9,7 +9,7 @@
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 50px;
  z-index: 2;
  z-index: 3;
  
  .navbar-wrap {
    margin: 0 auto;
@@ -133,7 +133,6 @@
  clear: both;
}
.normal-navbar-edit-box:hover {
  z-index: 1;
  box-shadow: 0px 0px 4px #1890ff;
}
.top-menu-popover {
src/tabviews/calendar/index.jsx
@@ -127,8 +127,6 @@
        if (['text', 'select', 'link'].includes(item.type) && param) {
          if (param.searchkey === item.field) {
            item.initval = param.searchval
          } else if (param.BID && item.field.toLowerCase() === 'bid') {
            item.initval = param.BID
          } else if (param.data && param.data[item.field]) {
            item.initval = param.data[item.field]
          }
src/tabviews/commontable/index.jsx
@@ -182,8 +182,6 @@
        if (['text', 'select', 'link'].includes(item.type) && param) {
          if (param.searchkey === item.field) {
            item.initval = param.searchval
          } else if (param.BID && item.field.toLowerCase() === 'bid') {
            item.initval = param.BID
          } else if (param.data && param.data[item.field]) {
            item.initval = param.data[item.field]
          }
@@ -994,7 +992,7 @@
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
     if (!is(fromJS(this.props.tabviews), fromJS(nextProps.tabviews))) {
    if (!is(fromJS(this.props.tabviews), fromJS(nextProps.tabviews))) {
      let selectTab = nextProps.tabviews.filter(tab => tab.selected)[0]
      if (selectTab && selectTab.MenuID === this.props.MenuID) {
        this.setShortcut()
src/tabviews/custom/components/card/data-card/index.jsx
@@ -474,7 +474,7 @@
          return tab.MenuID !== newtab.MenuID
        })
        if (this.props.tabviews.length !== tabs.length) {
        if (this.props.tabviews.length > tabs.length) {
          this.props.modifyTabview(fromJS(tabs).toJS())
        }
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -373,7 +373,7 @@
          return tab.MenuID !== newtab.MenuID
        })
        if (this.props.tabviews.length !== tabs.length) {
        if (this.props.tabviews.length > tabs.length) {
          this.props.modifyTabview(fromJS(tabs).toJS())
        }
src/tabviews/custom/components/carousel/data-card/index.jsx
@@ -272,7 +272,7 @@
          return tab.MenuID !== newtab.MenuID
        })
        if (this.props.tabviews.length !== tabs.length) {
        if (this.props.tabviews.length > tabs.length) {
          this.props.modifyTabview(fromJS(tabs).toJS())
        }
src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -278,7 +278,7 @@
          return tab.MenuID !== newtab.MenuID
        })
        if (this.props.tabviews.length !== tabs.length) {
        if (this.props.tabviews.length > tabs.length) {
          this.props.modifyTabview(fromJS(tabs).toJS())
        }
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -1360,7 +1360,7 @@
            return tab.MenuID !== newtab.MenuID
          })
  
          if (this.props.tabviews.length !== tabs.length) {
          if (this.props.tabviews.length > tabs.length) {
            this.props.modifyTabview(fromJS(tabs).toJS())
          }
  
src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -612,7 +612,7 @@
            return tab.MenuID !== newtab.MenuID
          })
  
          if (this.props.tabviews.length !== tabs.length) {
          if (this.props.tabviews.length > tabs.length) {
            this.props.modifyTabview(fromJS(tabs).toJS())
          }
  
src/tabviews/custom/components/form/normal-form/index.jsx
@@ -6,7 +6,7 @@
// import moment from 'moment'
import Api from '@/api'
// import Utils from '@/utils/utils.js'
import Utils from '@/utils/utils.js'
import UtilsDM from '@/utils/utils-datamanage.js'
import asyncComponent from '@/utils/asyncComponent'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
@@ -46,7 +46,7 @@
    let _data = null
    let _sync = false
    
    if (config.setting && config.wrap.datatype !== 'static') {
    if (config.wrap.datatype !== 'static') {
      _sync = config.setting.sync === 'true'
      if (_sync && data && data[config.dataName]) {
@@ -60,6 +60,8 @@
      _data = {}
    }
    let roleId = sessionStorage.getItem('role_id') || ''
    config.subcards = config.subcards.map(group => {
      group.subButton.uuid = group.uuid
      group.subButton.$menuId = group.uuid
@@ -68,6 +70,25 @@
      group.subButton.OpenType = 'formSubmit'
      group.subButton.execError = 'never'
      group.fields = group.fields.map(cell => {
        // 数据源sql语句,预处理,权限黑名单字段设置为隐藏表单
        if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(cell.type) && cell.resourceType === '1') {
          let _option = Utils.getSelectQueryOptions(cell)
          cell.data_sql = Utils.formatOptions(_option.sql)
          cell.base_sql = window.btoa(window.encodeURIComponent(_option.sql))
          cell.arr_field = _option.field
        }
        // 字段权限黑名单
        if (!cell.blacklist || !roleId || cell.blacklist.length === 0) return cell
        if (cell.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0) {
          cell.hidden = 'true'
        }
        return cell
      })
      return group
    })
src/tabviews/custom/index.jsx
@@ -140,8 +140,6 @@
          if (['text', 'select', 'link'].includes(item.type) && param) {
            if (param.searchkey === item.field) {
              item.initval = param.searchval
            } else if (param.BID && item.field.toLowerCase() === 'bid') {
              item.initval = param.BID
            } else if (param.data && param.data[item.field]) {
              item.initval = param.data[item.field]
            }
@@ -714,6 +712,12 @@
        _customScript = _customScript.replace(/@\$|\$@/ig, '')
      }
      // 外联数据库替换
      if (window.GLOB.externalDatabase !== null) {
        component.setting.dataresource = component.setting.dataresource.replace(/@db@/ig, window.GLOB.externalDatabase)
        _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase)
      }
      component.setting.customScript = _customScript // 整理后自定义脚本
      // floor    组件的层级
src/tabviews/scriptmanage/index.jsx
@@ -120,6 +120,7 @@
   * @description 主表数据加载
   */ 
  async loadmaindata () {
    const { setting } = this.state
    let param = this.getDefaultParam()
    this.setState({
@@ -136,6 +137,7 @@
        data: result.data.map((item, index) => {
          // item.LongParam = this.UnformatOptions(item.LongParam)
          item.key = index
          item.$$uuid = item[setting.primaryKey] || ''
          return item
        }),
        total: result.total,
src/tabviews/subtable/index.jsx
@@ -11,7 +11,6 @@
import options from '@/store/options.js'
import UtilsDM from '@/utils/utils-datamanage.js'
import { updateSubTable } from '@/utils/utils-update.js'
import { modifyTabview } from '@/store/action'
import asyncComponent from '@/utils/asyncComponent'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import NotFount from '@/components/404'
@@ -1031,17 +1030,14 @@
const mapStateToProps = (state) => {
  return {
    tabviews: state.tabviews,
    menuType: state.editLevel,
    permAction: state.permAction,
    permMenus: state.permMenus,
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(SubTabViewTable)
src/tabviews/verupmanage/index.jsx
@@ -152,6 +152,7 @@
      this.setState({
        data: result.data.map((item, index) => {
          item.key = index
          item.$$uuid = item[setting.primaryKey] || ''
          return item
        }),
        total: result.total,
src/tabviews/verupmanage/subtabtable/index.jsx
@@ -183,6 +183,7 @@
      this.setState({
        data: result.data.map((item, index) => {
          item.key = index
          item.$$uuid = item[setting.primaryKey] || ''
          item.$$BID = _BID || ''
          return item
        }),
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -73,14 +73,10 @@
    if (btn.uuid !== res.menuId) return
    this.setState({
      confirmLoading: true
      loading: true
    })
    this.execSubmit(this.state.tabledata, () => {
      this.setState({
        confirmLoading: false
      })
    }, res.form)
    this.execSubmit(this.state.tabledata, () => {}, res.form)
  }
  /**
src/tabviews/zshare/mutilform/index.jsx
@@ -45,7 +45,7 @@
  componentDidMount () {
    const { data, BData, action } = this.props
    let datatype = {}
    let readtype = {}
    let readin = {}
src/tabviews/zshare/normalTable/index.jsx
@@ -221,7 +221,7 @@
      tabmenu.param = {
        searchkey: item.field,
        searchval: record[item.field] || '',
        BID: record[setting.primaryKey]
        BID: record.$$uuid
      }
  
      tabmenu.selected = true
src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx
@@ -235,7 +235,7 @@
                <Select>
                  <Select.Option value="="> = </Select.Option>
                  <Select.Option value="!="> != </Select.Option>
                  <Select.Option value=">"> > </Select.Option>
                  <Select.Option value=">"> &gt; </Select.Option>
                  <Select.Option value="<"> &lt; </Select.Option>
                  <Select.Option value="like"> like </Select.Option>
                </Select>
src/views/design/sidemenu/index.jsx
@@ -88,7 +88,7 @@
      return tab.MenuID !== menu.MenuID
    })
    if (this.props.tabviews.length !== tabs.length) {
    if (this.props.tabviews.length > tabs.length) {
      this.props.modifyTabview(fromJS(tabs).toJS())
    }
src/views/mobdesign/index.jsx
@@ -34,7 +34,6 @@
    oriConfig: null,
    parentId: '',
    openEdition: '',
    saveIng: false,
    config: null,
    pageIndex: 0,
    editElem: null
@@ -55,10 +54,6 @@
  triggerSave = () => {
    const { config, openEdition, parentId } = this.state
    this.setState({
      saveIng: true
    })
    let param = {
      func: 'sPC_TrdMenu_AddUpt',
@@ -94,7 +89,6 @@
        this.setState({
          oriConfig: fromJS(config).toJS(),
          openEdition: response.open_edition || '',
          saveIng: false
        })
      } else {
        notification.warning({
@@ -212,11 +206,11 @@
  }
  render () {
    const { saveIng, appType, config, editElem } = this.state
    const { appType, config, editElem } = this.state
    return (
      <div className="mobile-view">
        <Header view="design" jumpToManage={this.jumpToManage} triggerSave={this.triggerSave} saveIng={saveIng} />
        <Header />
        <DndProvider backend={HTML5Backend}>
          <div className="mob-body">
            <div className="mob-tool">