king
2021-08-15 7d96fb168edf4e5b0540726a4b11ad434465f488
2021-08-15
20个文件已修改
180 ■■■■■ 已修改文件
src/components/breadview/index.jsx 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/elementform/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/options.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardsimplecomponent/options.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/prop-card/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/columnform/index.jsx 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/colorsketch/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/menubar/normal-menubar/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/menubar/normal-menubar/menucomponent/index.jsx 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/menubar/normal-menubar/menucomponent/options.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/tree/antd-tree/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/main/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.scss 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.scss 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/breadview/index.jsx
@@ -7,10 +7,11 @@
import asyncComponent from '@/utils/asyncLoadComponent'
import NotFount from '@/components/404'
import options from '@/store/options.js'
import mzhCN from '@/locales/zh-CN/main.js'
import menUS from '@/locales/en-US/main.js'
import MKEmitter from '@/utils/events.js'
import Api from '@/api'
import './index.scss'
const Home = asyncComponent(() => import('@/tabviews/home'))
@@ -41,7 +42,15 @@
    const { tabview } = this.state
    window.GLOB.CacheMap = new Map()
    MKEmitter.emit('reloadMenuView', tabview.MenuID)
    if (options.sysType === 'local' && window.GLOB.systemType !== 'production') {
      Api.getAppVersion().then(() => {
        MKEmitter.emit('reloadMenuView', tabview.MenuID)
      }, () => {
        MKEmitter.emit('reloadMenuView', tabview.MenuID)
      })
    } else {
      MKEmitter.emit('reloadMenuView', tabview.MenuID)
    }
  }
  selectcomponent = (view) => {
src/components/header/index.jsx
@@ -49,7 +49,7 @@
    oriVersion: '',
    newVersion: '',
    debug: sessionStorage.getItem('debug') === 'true',
    navBar: ['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar) ? 'topmenu' : '',
    navBar: ['linkage_navigation', 'linkage', 'menu_board', 'menu_board_navigation'].includes(window.GLOB.navBar) ? 'topmenu' : '',
    menuType: window.GLOB.navBar
  }
@@ -673,7 +673,7 @@
      } else if (menu.OpenType === 'blank') {
        menu.selected = true
        this.props.modifyTabview([menu])
      } else if (this.state.navBar === 'topmenu') {
      } else if (this.state.navBar === 'topmenu' && this.state.menuType !== 'menu_board_navigation') {
        menu.selected = true
        this.props.modifyTabview([menu])
      } else {
@@ -742,7 +742,7 @@
            })}
          </ul> : null
        }
        {navBar === 'topmenu' && menuType !== 'menu_board' && menulist ?
        {navBar === 'topmenu' && menuType !== 'menu_board' && menuType !== 'menu_board_navigation' && menulist ?
          <ul className="header-menu vertical-menu">{
            menulist.map(item => {
              if (item.children && item.children.length > 0) {
@@ -785,7 +785,7 @@
            })}
          </ul> : null
        }
        {navBar === 'topmenu' && menuType === 'menu_board' && menulist ?
        {navBar === 'topmenu' && (menuType === 'menu_board' || menuType === 'menu_board_navigation') && menulist ?
          <ul className="header-menu vertical-menu">{
            menulist.map(item => {
              if (item.children && item.children.length > 0) {
@@ -807,22 +807,6 @@
                        )
                      })}
                    </div>
                    // <Menu mode="horizontal">
                    //   {item.children.map(cell => {
                    //     return (
                    //       <Menu.Item key={cell.MenuID}>
                    //         <div>{cell.MenuName}</div>
                    //         <div>
                    //           {cell.children && cell.children.map(m => (
                    //             <Menu.Item key={m.MenuID} onClick={() => {this.changeVerMenu(m)}}>
                    //               {m.MenuName}
                    //             </Menu.Item>
                    //           ))}
                    //         </div>
                    //       </Menu.Item>
                    //     )
                    //   })}
                    // </Menu>
                  }>
                    <li>
                      <span>{item.MenuName}</span>
src/components/tabview/index.jsx
@@ -9,11 +9,11 @@
import { modifyTabview, toggleIsiframe } from '@/store/action'
import asyncComponent from '@/utils/asyncLoadComponent'
import NotFount from '@/components/404'
// import options from '@/store/options.js'
import options from '@/store/options.js'
import mzhCN from '@/locales/zh-CN/main.js'
import menUS from '@/locales/en-US/main.js'
import MKEmitter from '@/utils/events.js'
import Api from '@/api'
import './index.scss'
const Home = asyncComponent(() => import('@/tabviews/home'))
@@ -75,7 +75,15 @@
    e.stopPropagation()
    window.GLOB.CacheMap = new Map()
    MKEmitter.emit('reloadMenuView', menu.MenuID)
    if (options.sysType === 'local' && window.GLOB.systemType !== 'production') {
      Api.getAppVersion().then(() => {
        MKEmitter.emit('reloadMenuView', menu.MenuID)
      }, () => {
        MKEmitter.emit('reloadMenuView', menu.MenuID)
      })
    } else {
      MKEmitter.emit('reloadMenuView', menu.MenuID)
    }
  }
  changeTab = (e, menu) => {
src/components/tabview/index.scss
@@ -115,6 +115,9 @@
    font-style: italic;
  }
}
.header-container + .mk-tabview-wrap {
  max-width: 100%;
}
.mk-tabview-wrap.collapsed {
  max-width: calc(100% - 80px);
}
src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -57,12 +57,12 @@
        if (item.key === 'field' || item.key === 'linkurl') {
          item.options = []
          config.columns.forEach(col => {
            if (!/^Nvarchar/ig.test(col.datatype) && (card.eleType === 'number' || card.eleType === 'slider')) {
            if (/^(Int|Decimal)/ig.test(col.datatype) && (card.eleType === 'number' || card.eleType === 'slider')) {
              item.options.push({
                value: col.field,
                text: col.label
              })
            } else if (/^Nvarchar/ig.test(col.datatype) && card.eleType !== 'number' && card.eleType !== 'slider') {
            } else if (/^(Nvarchar|date)/ig.test(col.datatype) && card.eleType !== 'number' && card.eleType !== 'slider') {
              item.options.push({
                value: col.field,
                text: col.label
@@ -143,12 +143,12 @@
        if (item.key === 'field') {
          item.options = []
          config.columns.forEach(col => {
            if (!/^Nvarchar/ig.test(col.datatype) && (value === 'number' || value === 'slider')) {
            if (/^(Int|Decimal)/ig.test(col.datatype) && (value === 'number' || value === 'slider')) {
              item.options.push({
                value: col.field,
                text: col.label
              })
            } else if (/^Nvarchar/ig.test(col.datatype) && value !== 'number' && value !== 'slider') {
            } else if (/^(Nvarchar|date)/ig.test(col.datatype) && value !== 'number' && value !== 'slider') {
              item.options.push({
                value: col.field,
                text: col.label
src/menu/components/card/cardcomponent/options.jsx
@@ -82,7 +82,7 @@
      field: 'primaryId',
      label: '主键值',
      initval: setting.primaryId || '',
      tooltip: '卡片点击时,向其他组件传递的ID值。',
      tooltip: '设置一个属性卡静态ID,向其他组件传递的指定静态ID值',
      required: false,
      forbid: !hasPrimaryKey
    },
src/menu/components/card/cardsimplecomponent/options.jsx
@@ -95,7 +95,7 @@
      field: 'primaryId',
      label: '主键值',
      initval: setting.primaryId || '',
      tooltip: '卡片点击时,向其他组件传递的ID值。',
      tooltip: '设置一个属性卡静态ID,向其他组件传递的指定静态ID值',
      required: false,
      forbid: !hasPrimaryKey
    },
src/menu/components/card/prop-card/index.jsx
@@ -440,8 +440,7 @@
  getWrapForms = () => {
    const { card } = this.state
    return getWrapForm(card.wrap, card.subtype)
    return getWrapForm(card.wrap, card.subtype, card.columns)
  }
  updateWrap = (res) => {
src/menu/datasource/verifycard/columnform/index.jsx
@@ -80,6 +80,8 @@
                ]
              })(
                <Select>
                  <Select.Option value="Nvarchar(10)"> Nvarchar(10) </Select.Option>
                  <Select.Option value="Nvarchar(20)"> Nvarchar(20) </Select.Option>
                  <Select.Option value="Nvarchar(50)"> Nvarchar(50) </Select.Option>
                  <Select.Option value="Nvarchar(100)"> Nvarchar(100) </Select.Option>
                  <Select.Option value="Nvarchar(512)"> Nvarchar(512) </Select.Option>
@@ -106,7 +108,8 @@
                  <Select.Option value="Decimal(18,16)"> Decimal(18,16) </Select.Option>
                  <Select.Option value="Decimal(18,17)"> Decimal(18,17) </Select.Option>
                  <Select.Option value="Decimal(18,18)"> Decimal(18,18) </Select.Option>
                  {/* <Select.Option value="date"> date </Select.Option> */}
                  <Select.Option value="date"> date </Select.Option>
                  <Select.Option value="datetime"> datetime </Select.Option>
                </Select>
              )}
            </Form.Item>
src/menu/datasource/verifycard/index.jsx
@@ -58,6 +58,8 @@
        dataIndex: 'datatype',
        inputType: 'select',
        options: [
          { value: 'Nvarchar(10)', text: 'Nvarchar(10)' },
          { value: 'Nvarchar(20)', text: 'Nvarchar(20)' },
          { value: 'Nvarchar(50)', text: 'Nvarchar(50)' },
          { value: 'Nvarchar(100)', text: 'Nvarchar(100)' },
          { value: 'Nvarchar(512)', text: 'Nvarchar(512)' },
@@ -84,6 +86,8 @@
          { value: 'Decimal(18,16)', text: 'Decimal(18,16)' },
          { value: 'Decimal(18,17)', text: 'Decimal(18,17)' },
          { value: 'Decimal(18,18)', text: 'Decimal(18,18)' },
          { value: 'date', text: 'date' },
          { value: 'datetime', text: 'datetime' },
        ],
        editable: true,
        width: '25%',
src/mob/colorsketch/index.jsx
@@ -9,7 +9,7 @@
const presetColors = [
  '#f5222d', '#fa541c', '#fa8c16', '#faad14', '#fadb14', '#a0d911', '#52c41a', '#13c2c2', '#1890ff', '#2f54eb', '#722ed1',
  '#eb2f96', '#595959', '#ffa39e', '#ffbb96', '#ffd591', '#ffe58f', '#fffb8f', '#eaff8f', '#b7eb8f', '#87e8de', '#91d5ff',
  '#adc6ff', '#d3adf7', '#ffadd2', '#d9d9d9', '#434343', '#000000', '#ffffff', 'transparent'
  '#adc6ff', '#d3adf7', '#EBE9E9', '#d9d9d9', '#434343', '#000000', '#ffffff', 'transparent'
]
class ColorSketch extends Component {
src/mob/components/menubar/normal-menubar/index.jsx
@@ -186,14 +186,12 @@
      setting: { type: 'menu', width: 6, sign: 'icon', icon: 'user', name: '客户', url: '', color: '#ffffff', iconFont: 20, padding: 12, background: '#1890ff', imgWidth: '' },
      style: {
        paddingTop: '15px', paddingBottom: '15px'
      },
      isnew: true
      }
    }
    if (card.subMenus.length > 0) {
      newcard = fromJS(card.subMenus.slice(-1)[0]).toJS()
      newcard.uuid = Utils.getuuid()
      newcard.isnew = true
    }
    card.subMenus.push(newcard)
src/mob/components/menubar/normal-menubar/menucomponent/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Modal, Popover, Icon, Col } from 'antd'
import { Popover, Icon, Col } from 'antd'
import asyncIconComponent from '@/utils/asyncIconComponent'
import Utils from '@/utils/utils.js'
@@ -10,7 +10,6 @@
import MKEmitter from '@/utils/events.js'
import './index.scss'
const { confirm } = Modal
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
@@ -80,47 +79,23 @@
    MKEmitter.emit('changeStyle', [cards.uuid, card.uuid], options, _style)
  }
  cancel = () => {
    const { card } = this.state
    if (card.isnew) {
      let _card = fromJS(card).toJS()
      delete _card.isnew
      this.setState({ card: _card })
      this.props.updateElement(_card)
    }
  }
  getSettingForms = () => {
    const { card } = this.state
    return getSettingForm(card.setting)
  }
  updateSetting = (res, resolve) => {
  updateSetting = (res) => {
    const { card } = this.state
    let _card = {...card, setting: res}
    if (!card.isnew && card.setting.type === 'menu' && _card.setting.type !== 'menu') {
      const _this = this
      confirm({
        content: '菜单将被重置,确定修改吗?',
        onOk() {
          _card.oriuuid = _card.uuid
          _card.uuid = Utils.getuuid()
          _this.setState({ card: _card })
          _this.props.updateElement(_card)
          resolve()
        },
        onCancel() {}
      })
    } else {
      delete _card.isnew
      this.setState({ card: _card })
      this.props.updateElement(_card)
      resolve()
    if (card.setting.type === 'menu' && _card.setting.type !== 'menu') {
      _card.oriuuid = _card.uuid
      _card.uuid = Utils.getuuid()
    }
    this.setState({ card: _card })
    this.props.updateElement(_card)
  }
  changeMenu = () => {
@@ -150,7 +125,7 @@
      <Col span={card.setting.width || 6} offset={offset || 0}>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <NormalForm title="菜单编辑" width={900} check update={this.updateSetting} getForms={this.getSettingForms} cancel={this.cancel}>
            <NormalForm title="菜单编辑" width={900} update={this.updateSetting} getForms={this.getSettingForms}>
              <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="menucell" card={card}/>
src/mob/components/menubar/normal-menubar/menucomponent/options.jsx
@@ -91,7 +91,8 @@
      field: 'linkurl',
      label: '链接',
      initval: setting.linkurl || '',
      required: true
      required: true,
      span: 24
    },
    {
      type: 'radio',
src/tabviews/custom/components/tree/antd-tree/index.scss
@@ -4,7 +4,7 @@
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 100px;
  min-height: 180px;
  .tree-header {
    position: relative;
src/tabviews/custom/index.jsx
@@ -599,7 +599,7 @@
          card.elements = card.elements.filter(cell => {
            if (cell.eleType === 'button') {
              cell.logLabel = item.$menuname + '-' + cell.label
              cell.Ot = 'requiredSgl'
              cell.Ot = cell.Ot || 'requiredSgl'
              cell.ContainerId = this.state.ContainerId
              cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
              cell.$menuId = item.uuid
@@ -622,7 +622,7 @@
          card.backElements = card.backElements.filter(cell => {
            if (cell.eleType === 'button') {
              cell.logLabel = item.$menuname + '-' + cell.label
              cell.Ot = 'requiredSgl'
              cell.Ot = cell.Ot || 'requiredSgl'
              cell.ContainerId = this.state.ContainerId
              cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
              cell.$menuId = item.uuid
@@ -671,7 +671,7 @@
          card.elements = card.elements.filter(cell => {
            if (cell.eleType === 'button') {
              cell.logLabel = item.$menuname + '-' + cell.label
              cell.Ot = 'requiredSgl'
              cell.Ot = cell.Ot || 'requiredSgl'
              cell.ContainerId = this.state.ContainerId
              cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
              cell.$menuId = item.uuid
@@ -697,7 +697,7 @@
          if (col.type !== 'action') return true
          col.elements = col.elements.filter(cell => {
            cell.logLabel = item.$menuname + '-' + cell.label
            cell.Ot = 'requiredSgl'
            cell.Ot = cell.Ot || 'requiredSgl'
            cell.ContainerId = this.state.ContainerId
            cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
            cell.$menuId = item.uuid
src/utils/utils.js
@@ -1188,6 +1188,10 @@
      if (!_initvars.includes(_key)) {
        let _val = datavars.hasOwnProperty(_key) ? datavars[_key] : ''
        if (col.datatype && /^date/ig.test(col.datatype) && !_val) {
          _val = '1900-01-01'
        }
        _initvars.push(_key)
        _initColfields.push(`@${_key}='${_val}'`)
      }
src/views/main/index.jsx
@@ -28,7 +28,7 @@
      <div className="mk-main-view">
        <ConfigProvider locale={_locale}>
          <Header key="header"/>
          {isSideMenu ? <Sidemenu key="sidemenu"/> : null}
          {isSideMenu && navBar !== 'menu_board_navigation' ? <Sidemenu key="sidemenu"/> : null}
          {isSideMenu ? <Tabview key="tabview"/> : null}
          {!isSideMenu ? <Breadview key="breadview"/> : null}
          <QueryLog />
src/views/mobdesign/index.scss
@@ -37,6 +37,7 @@
      background: #ffffff;
      overflow-y: auto;
      overflow-x: hidden;
      padding-bottom: 50px;
      > .ant-collapse {
        background-color: #ffffff;
@@ -149,11 +150,12 @@
    position: fixed;
    right: 0;
    top: 48px;
    height: 100vh;
    height: calc(100vh - 48px);
    padding: 20px 10px;
    background: #ffffff;
    z-index: 10;
    transition: right 0.3s;
    overflow-y: auto;
    .draw {
      position: absolute;
@@ -188,6 +190,20 @@
      height: 22px;
    }
  }
  .menu-control::-webkit-scrollbar {
    width: 2px;
  }
  .menu-control::-webkit-scrollbar-thumb {
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.08);
  }
  .menu-control::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: rgba(0, 0, 0, 0);
  }
  .menu-control.hidden {
    right: -130px;
  }
src/views/pcdesign/index.scss
@@ -39,6 +39,7 @@
      box-shadow: 0px 2px 5px #bcbcbc;
      overflow-y: auto;
      overflow-x: hidden;
      padding-bottom: 50px;
      > .ant-collapse {
        background-color: #ffffff;
@@ -132,6 +133,7 @@
    z-index: 10;
    transition: right 0.3s;
    box-shadow: 0px 0px 5px #bcbcbc;
    overflow-y: auto;
    .draw {
      position: absolute;
@@ -165,6 +167,20 @@
      height: 22px;
    }
  }
  .menu-control::-webkit-scrollbar {
    width: 2px;
  }
  .menu-control::-webkit-scrollbar-thumb {
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.08);
  }
  .menu-control::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: rgba(0, 0, 0, 0);
  }
  .menu-control.hidden {
    right: -130px;
  }