king
2019-12-23 d38dc481492878c04ddf2d6bc2e9bf7d44c57fd7
2019-12-23
21个文件已修改
1个文件已添加
683 ■■■■■ 已修改文件
public/options.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/viewstyle.scss 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/editthdmenu/index.jsx 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/editthdmenu/index.scss 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.scss 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/subAction/index.jsx 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/subSearch/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 131 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/settingform/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/source.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/tabdragelement/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/tabform/index.jsx 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/option.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.js
@@ -11,5 +11,6 @@
  icp: '',
  bgColor: '',
  lineColor: '',
  website: ''
  website: '',
  style: '' // 默认为黑色,可选为white
}
src/assets/css/viewstyle.scss
New file
@@ -0,0 +1,80 @@
.mk-white {
  > .flex-container {
    > .header-container {
      background: #ffffff;
      color: #000000;
      box-shadow: 0 2px 8px #f0f1f2;
      > .header-collapse i {
        color: #000000;
      }
      > .header-menu {
        li {
          span {
            color: #000000;
          }
          &:hover {
            span {
              color: #06B4F7;
              border-bottom: 4px solid #06B4F7;
            }
          }
          &.active {
            span {
              color: #1890ff;
              border-bottom: 4px solid #1890ff;
            }
          }
        }
      }
      > .header-setting span {
        color: #000000;
      }
      > .header-edit-box .dragdashboard {
        background: #ffffff;
      }
    }
    > .side-menu {
      border-right: 1px solid #d9d9d9;
      background: #ffffff;
      > .ant-menu {
        background: #ffffff;
        > .ant-menu-submenu {
          color: #000000;
          background: #ffffff;
          > .ant-menu-submenu-title {
            background: #ffffff;
            &:hover {
              color: #1890ff;
            }
            > .ant-menu-submenu-arrow:before {
              background: #000000;
            }
            > .ant-menu-submenu-arrow:after {
              background: #000000;
            }
          }
          > .ant-menu-sub {
            background: #ffffff;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25) inset;
            .ant-menu-item {
              border-bottom: 1px solid #d9d9d9;
              // background-color: #c4ebfd;
              a {
                color: #000000;
              }
            }
          }
        }
        > .ant-menu-submenu.ant-menu-submenu-open {
          color: #1890ff;
        }
      }
      // .ant-menu-inline.ant-menu-sub {
      //   background: #ffffff;
      //   color: #000000;
      // }
    }
  }
}
src/components/header/index.jsx
@@ -41,7 +41,7 @@
    visible: false, // 修改密码模态框
    dict: (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS,
    confirmLoading: false,
    userName: localStorage.getItem('username'),
    userName: sessionStorage.getItem('User_Name'),
    logourl: window.GLOB.mainlogo || logourl
  }
src/components/sidemenu/editthdmenu/index.jsx
@@ -10,6 +10,7 @@
import Utils from '@/utils/utils.js'
import DragElement from '../menuelement'
import asyncLoadComponent from '@/utils/asyncLoadComponent'
import { sysTemps } from '@/utils/option.js'
import Api from '@/api'
import zhCN from '@/locales/zh-CN/header.js'
import enUS from '@/locales/en-US/header.js'
@@ -23,56 +24,56 @@
const { confirm } = Modal
const { TabPane } = Tabs
const { Search } = Input
const illust = {
const illust = { // 模板图片,用于已使用模板
  CommonTable: nortable
}
let previewList = null
let previewList = null // 初始菜单列表
class EditMenu extends Component {
  static propTpyes = {
    menulist: PropTypes.any,
    supMenuList: PropTypes.array,
    supMenu: PropTypes.object,
    reload: PropTypes.func,
    exitEdit: PropTypes.func
    reload: PropTypes.func,      // 菜单修改后刷新
    menulist: PropTypes.any,     // 三级菜单列表
    exitEdit: PropTypes.func,    // 退出编辑状态
    supMenu: PropTypes.object,   // 对应的上级菜单
    supMenuList: PropTypes.array // 上级菜单列表,用于三级菜单切换上级菜单
  }
  state = {
    dict: (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS,
    show: true,
    thawmenulist: null, // 已冻结的二级菜单
    visible: null,
    title: '',
    type: '',
    tabview: '',           // 选择模板窗口(template)、基础表格配置(CommonTable)
    formlist: null,
    show: true,            // 控制菜单刷新
    thawmenulist: null,    // 已冻结的二级菜单
    type: '',              // 操作类型,新建或编辑菜单
    tabview: '',           // 选择模板窗口(template)、基础表格配置(CommonTable)、表单(Modal)、子表(SubTable)
    editMenu: null,        // 编辑菜单
    editAction: null,      // 编辑按钮
    editTab: null,         // 编辑标签
    thawMvisible: false,   // 解除冻结模态框
    confirmLoading: false, // 提交中。。。
    selectTemp: '',        // 选择模板
    usedTemplates: null,
    menuConfig: '',
    tempSearchKey: '',
    loading: false,
    preview: null,
    pretemplate: null,
    baseTemplates: [{
      title: '基础表格',
      type: 'CommonTable',
      url: illust['CommonTable'],
      baseconfig: ''
    }]
    usedTemplates: null,   // 已使用模板列表
    tempSearchKey: '',     // 菜单名称过滤值
    loading: false,        // 编辑菜单或使用已使用模板时,获取配置信息
    preview: null,         // 图片预览url
    pretemplate: null,     // 预览模板
    sysTemplates: sysTemps // 系统模板
  }
  /**
   * @description 菜单顺序改变时,保存中间状态
   */
  handlePreviewList = (List) => {
    // 菜单顺序改变时,保存中间状态
    previewList = List
  }
  /**
   * @description 菜单编辑:修改、删除
   * 1、菜单修改或删除时,先查看菜单顺序是否改变
   * 2、菜单删除
   * 3、菜单编辑,查询菜单配置信息,信息正确,进入对应编辑页面
   */
  handleMenu = (menu) => {
    // 菜单编辑:修改、删除
    const _this = this
    if (previewList && !is(fromJS(previewList), fromJS(this.state.subMenulist))) {
      notification.warning({
@@ -122,25 +123,23 @@
          try {
            _LongParam = JSON.parse(_LongParam)
          } catch (e) {
            _LongParam = {
              type: 'system',
              setting: {},
              search: [],
              action: [],
              columns: []
            }
            _LongParam = ''
          }
          _menu.LongParam = _LongParam
          _menu.ParentID = this.props.supMenu.MenuID
          // 检测模板是否存在
          let _Template = this.state.baseTemplates.filter(temp => temp.type === _menu.PageParam.Template)
          let _Template = this.state.sysTemplates.filter(temp => temp.type === _menu.PageParam.Template)
          this.setState({
            type: 'edit',
            editMenu: _menu,
            loading: false,
            tabview: _Template.length > 0 ? _menu.PageParam.Template : 'template'
          })
          // 模板不存在时错误提示
          if (_Template.length === 0) {
            notification.warning({
              top: 92,
@@ -320,57 +319,104 @@
    })
  }
  useTemplate = (template) => {
  useTemplate = (template, useType) => {
    const { type, editMenu } = this.state
    // 选择模板:添加菜单时
    if (type === 'add') {
      this.setState({
        tabview: template.type,
        editMenu: {
          MenuID: Utils.getuuid(),
          MenuName: '',
          MenuNo: '',
          id: this.props.menulist.length,
          src: '',
          text: '',
          type: template.type,
          PageParam: {OpenType: 'newtab', Template: template.type},
          LongParam: template.baseconfig,
          ParentID: this.props.supMenu.MenuID
    new Promise(resolve => {
      if (useType === 'sys') {
        resolve(true)
      } else {
        let param = {
          func: 'sPC_Get_LongParam',
          MenuID: template.uuid
        }
      })
    } else {
      let _PageParam = {OpenType: editMenu.PageParam.OpenType || 'newtab', Template: template.type}
        this.setState({
          loading: true
        })
      this.setState({
        tabview: template.type,
        editMenu: {...editMenu, LongParam: template.baseconfig, PageParam: _PageParam, type: template.type}
      })
    }
    document.getElementById('root').style.overflowY = 'hidden'
        Api.getSystemConfig(param).then(result => {
          if (!result.status) {
            notification.warning({
              top: 92,
              message: result.message,
              duration: 10
            })
            resolve(false)
          } else {
            let _config = ''
            if (result.LongParam) {
              try {
                _config = window.decodeURIComponent(window.atob(result.LongParam))
                _config = JSON.parse(_config)
                _config.type = 'user'
              } catch (e) {
                _config = ''
              }
            }
            if (_config) {
              template.baseconfig = _config
              resolve(true)
            } else {
              notification.warning({
                top: 92,
                message: '模板信息获取失败!',
                duration: 10
              })
              resolve(false)
            }
          }
        })
      }
    }).then(res => {
      if (!res) {
        this.setState({
          loading: false
        })
        return
      }
      // 选择模板:添加菜单时
      if (type === 'add') {
        this.setState({
          tabview: template.type,
          loading: false,
          editMenu: {
            MenuID: Utils.getuuid(),
            MenuName: '',
            MenuNo: '',
            id: this.props.menulist.length,
            src: '',
            text: '',
            type: template.type,
            PageParam: {OpenType: 'newtab', Template: template.type},
            LongParam: template.baseconfig,
            ParentID: this.props.supMenu.MenuID
          }
        })
      } else {
        let _PageParam = {OpenType: editMenu.PageParam.OpenType || 'newtab', Template: template.type}
        this.setState({
          loading: false,
          tabview: template.type,
          editMenu: {...editMenu, LongParam: template.baseconfig, PageParam: _PageParam, type: template.type}
        })
      }
      document.getElementById('root').style.overflowY = 'hidden'
    })
  }
  getUsedTemplate = () => {
    Api.getSystemConfig({func: 'sPC_Get_UserTemp'}).then(res => {
    Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'menu'}).then(res => {
      this.setState({
        usedTemplates: res.UserTemp.map(temp => {
          let _config = ''
          if (temp.LongParam) {
            _config = window.decodeURIComponent(window.atob(temp.LongParam))
            try {
              _config = JSON.parse(_config)
              _config.type = 'user'
            } catch (e) {
              _config = ''
            }
          }
          return {
            uuid: temp.MenuID,
            title: temp.MenuName,
            type: temp.Template,
            url: illust[temp.Template],
            baseconfig: _config
            url: illust[temp.Template]
          }
        })
      })
@@ -401,7 +447,6 @@
        })
      }
    } else if (type === 'tab') {
      console.log(item)
      if (item.type === 'SubTable') {
        this.setState({
          editMenu: originMenu,
@@ -478,14 +523,14 @@
            {this.state.tabview === 'template' && <Tabs defaultActiveKey="1">
              <TabPane tab="系统模板" key="1">
                <Row>
                  {this.state.baseTemplates.map(template => {
                  {this.state.sysTemplates.map(template => {
                    return (
                      <Col key={template.type} span={8}>
                        <Card
                          title={template.title}>
                          <img onClick={() => {this.previewPicture(template)}} src={template.url} alt=""/>
                          <div className="card-operation">
                            <Button type="primary" onClick={() => {this.useTemplate(template)}}>使用模板</Button>
                            <Button type="primary" onClick={() => {this.useTemplate(template, 'sys')}}>使用模板</Button>
                          </div>
                        </Card>
                      </Col>
@@ -508,7 +553,7 @@
                            title={template.title}>
                            <img onClick={() => {this.previewPicture(template)}} src={template.url} alt=""/>
                            <div className="card-operation">
                              <Button type="primary" onClick={() => {this.useTemplate(template)}}>使用模板</Button>
                              <Button type="primary" onClick={() => {this.useTemplate(template, 'user')}}>使用模板</Button>
                            </div>
                          </Card>
                        </Col>
@@ -561,7 +606,7 @@
          {!this.state.thawmenulist && <Spin style={{marginLeft: 'calc(50% - 22px)', marginTop: '70px', marginBottom: '70px'}} size="large" />}
          {this.state.thawmenulist && <TransferForm ref="trawmenu" dict={this.state.dict} menulist={this.state.thawmenulist}/>}
        </Modal>
        {this.state.loading && <Spin style={{position: 'fixed', left: 'calc(50vw - 22px)', top: 'calc(50vh - 70px)'}} size="large" />}
        {this.state.loading && <Spin className="loading-thdmenu" size="large" />}
      </div>
    )
  }
src/components/sidemenu/editthdmenu/index.scss
@@ -163,4 +163,10 @@
      }
    }
  }
  > .loading-thdmenu {
    position: fixed;
    left: calc(50vw - 22px);
    top: calc(50vh - 70px);
    z-index: 1100;
  }
}
src/components/tabview/index.jsx
@@ -174,7 +174,7 @@
                    <Tabs.TabPane
                      className="test"
                      tab={
                        <span>
                        <span className="tab-control">
                          <span className="tab-name" onClick={() => {this.changeTab(view)}}>
                            {view.MenuName}
                          </span>
src/components/tabview/index.scss
@@ -14,7 +14,7 @@
    .ant-tabs-tab {
      padding: 18px 16px 6px;
      cursor: default;
      span i {
      span.tab-control i {
        position: relative;
        left: 7px;
        top: -6px;
src/index.js
@@ -7,6 +7,7 @@
import '@/assets/css/main.scss'
import '@/assets/css/action.scss'
import '@/assets/css/minkeicon.css'
import '@/assets/css/viewstyle.scss'
if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
  window.location.replace(window.location.href.split('build/')[0] + 'index.html')
@@ -21,7 +22,17 @@
  )
}
document.title = window.GLOB.title || 'MinkeSoft'
document.title = (window.GLOB && window.GLOB.title) || 'MinkeSoft'
const option = {
  white: 'mk-white'
}
if (window.GLOB && window.GLOB.style && option[window.GLOB.style]) {
  document.getElementById('root').className = option[window.GLOB.style]
}
render(Route)
src/tabviews/commontable/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { BackTop, notification, Spin, Tabs} from 'antd'
import { BackTop, notification, Spin, Tabs, Icon} from 'antd'
import moment from 'moment'
import Api from '@/api'
import MainSearch from './mainSearch'
@@ -56,7 +56,7 @@
      MenuID: this.props.MenuID
    }
    let result = await Api.getSystemCacheConfig(param)
    if (result.status && result.LongParam) {
    if (result.status) {
      let config = ''
      try { // 配置信息解析
@@ -68,10 +68,9 @@
      // 页面配置解析错误时提示
      if (!config) {
        notification.warning({
          top: 92,
          message: this.state.dict['main.page.settingerror'],
          duration: 10
        this.setState({
          loadingview: false,
          viewlost: true
        })
        return
      }
@@ -147,7 +146,9 @@
        loading: true
      }, () => {
        this.improveSearch()
        this.loadmaindata()
        if (config.setting.onload !== 'false') {
          this.loadmaindata()
        }
      })
    } else {
      this.setState({
@@ -321,16 +322,29 @@
  }
  refreshbysearch = (searches) => {
    const { setting } = this.state
    // 搜索条件变化
    this.refs.mainTable.resetTable()
    this.setState({
      loading: true,
      pageIndex: 1,
      search: searches
    }, () => {
      this.loadmaindata()
    })
    if (setting.onload === 'false') {
      this.setState({
        loading: true,
        pageIndex: 1,
        search: searches,
        setting: {...setting, onload: 'true'}
      }, () => {
        this.loadmaindata()
      })
    } else {
      this.refs.mainTable.resetTable()
      this.setState({
        loading: true,
        pageIndex: 1,
        search: searches
      }, () => {
        this.loadmaindata()
      })
    }
  }
  refreshbytable = (pagination, filters, sorter) => {
@@ -474,7 +488,7 @@
  render() {
    const { setting, searchlist, actions, columns, loadingview, viewlost, tabviews } = this.state
    console.log(setting)
    return (
      <div className="commontable" id={'commontable' + this.props.MenuID}>
        {loadingview && <Spin size="large" />}
@@ -485,7 +499,7 @@
            dict={this.state.dict}
          /> : null
        }
        {actions &&
        {actions && setting.onload !== 'false' &&
          <MainAction
            ref="mainButton"
            MenuID={this.props.MenuID}
@@ -496,7 +510,7 @@
            dict={this.state.dict}
          />
        }
        {columns &&
        {columns && setting.onload !== 'false' &&
          <MainTable
            ref="mainTable"
            dict={this.state.dict}
@@ -510,11 +524,16 @@
            buttonTrigger={this.buttonTrigger}
          />
        }
        {setting && setting.tabshow !== 'vertical' && tabviews && tabviews.length > 0 &&
        {setting && setting.onload !== 'false' && setting.tabshow !== 'vertical' && tabviews && tabviews.length > 0 &&
          <Tabs defaultActiveKey="0" tabPosition="top">
            {tabviews.map((_tab, index) => (
              <TabPane tab={ _tab.label } key={`${index}`}>
                {_tab.type === 'SubTable' ? <SubTable SupMenuID={this.props.MenuID} MenuID={this.props.MenuID} BID={this.state.BID} /> : null}
              <TabPane tab={
                <span>
                  {_tab.icon ? <Icon type={_tab.icon} /> : null}
                  {_tab.label}
                </span>
              } key={`${index}`}>
                {_tab.type === 'SubTable' ? <SubTable SupMenuID={this.props.MenuID} MenuID={_tab.linkTab} BID={this.state.BID} /> : null}
              </TabPane>
            ))}
          </Tabs>
src/tabviews/commontable/index.scss
@@ -26,6 +26,9 @@
  }
  > .ant-tabs {
    padding: 0px 20px;
    .ant-tabs-tab:not(.ant-tabs-tab-active) {
      cursor: pointer;
    }
  }
}
.ant-back-top {
src/tabviews/subtable/index.jsx
@@ -15,9 +15,9 @@
export default class NormalTable extends Component {
  static propTpyes = {
    MenuNo: PropTypes.string,    // 菜单参数
    MenuName: PropTypes.string,  // 菜单参数
    MenuID: PropTypes.string     // 菜单Id
    BID: PropTypes.string,       // 上级数据ID
    MenuID: PropTypes.string,    // 菜单Id
    SupMenuID: PropTypes.string  // 上级菜单Id
  }
  state = {
@@ -51,7 +51,7 @@
      MenuID: this.props.MenuID
    }
    let result = await Api.getSystemCacheConfig(param)
    if (result.status && result.LongParam) {
    if (result.status) {
      let config = ''
      try { // 配置信息解析
@@ -63,10 +63,15 @@
      // 页面配置解析错误时提示
      if (!config) {
        notification.warning({
          top: 92,
          message: this.state.dict['main.page.settingerror'],
          duration: 10
        // notification.warning({
        //   top: 92,
        //   message: this.state.dict['main.page.settingerror'],
        //   duration: 10
        // })
        this.setState({
          loadingview: false,
          viewlost: true
          // lostmsg: this.state.dict['main.page.settingerror']
        })
        return
      }
@@ -483,6 +488,7 @@
          <SubAction
            ref="subButton"
            MenuID={this.props.MenuID}
            BID={this.props.BID}
            setting={setting}
            refreshdata={this.refreshbyaction}
            gettableselected={this.gettableselected}
src/tabviews/subtable/index.scss
@@ -1,6 +1,6 @@
.subtable {
  position: relative;
  min-height: calc(100vh - 94px);
  min-height: 200px;
  padding-top: 16px;
  .box404 {
    padding-top: 30px;
@@ -19,9 +19,9 @@
    }
  }
  > .ant-spin {
    position: fixed;
    left: calc(50vw - 22px);
    top: calc(50vh - 70px);
    position: absolute;
    left: calc(50% - 22px);
    top: 100px;
  }
}
.ant-back-top {
src/tabviews/subtable/subAction/index.jsx
@@ -11,9 +11,10 @@
class MainAction extends Component {
  static propTpyes = {
    BID: PropTypes.string,
    dict: PropTypes.object,   // 字典项
    MenuID: PropTypes.string,
    actions: PropTypes.array, // 搜索条件列表
    dict: PropTypes.object, // 字典项
    setting: PropTypes.any
  }
@@ -120,7 +121,8 @@
        (btn.OpenType === 'pop' && !btn.innerFunc && btn.sql && btn.sqlType === 'insert')
      ) {
        let param = { // 系统存储过程
          func: 'sPC_TableData_InUpDe'
          func: 'sPC_TableData_InUpDe',
          BID: this.props.BID
        }
        if (btn.OpenType === 'prompt' || btn.OpenType === 'exec') { // 是否弹框或直接执行
@@ -135,7 +137,6 @@
          }
          param.ID = ID
          param.BID = ''
          if (btn.innerFunc) {
            param.func = btn.innerFunc
@@ -159,18 +160,13 @@
            if (!param.hasOwnProperty('ID') && setting.primaryKey && data[0] && data[0][setting.primaryKey]) {
              param.ID = data[0][setting.primaryKey]
            }
            if (!param.hasOwnProperty('BID')) {
              param.BID = ''
            }
          } else if (btn.sql && btn.sqlType === 'insert') {
            param.ID = Utils.getguid()
            param.BID = ''
            param.LText = Utils.formatOptions(Utils.getSysDefaultSql(btn, setting, formdata)) // 数据源
            param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
            param.secretkey = Utils.encrypt(param.LText, param.timestamp)
          } else if (btn.sql) {
            param.ID = data[0][setting.primaryKey]
            param.BID = ''
            param.LText = Utils.formatOptions(Utils.getSysDefaultSql(btn, setting, formdata)) // 数据源
            param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
            param.secretkey = Utils.encrypt(param.LText, param.timestamp)
@@ -189,12 +185,12 @@
      } else if (btn.Ot === 'required' || (btn.Ot === 'requiredOnce' && btn.OpenType === 'pop')) {
        let deffers = data.map(cell => {
          let param = {
            func: 'sPC_TableData_InUpDe'
            func: 'sPC_TableData_InUpDe',
            BID: this.props.BID
          }
          if (btn.OpenType === 'prompt' || btn.OpenType === 'exec') { // 是否弹框或直接执行
            param.ID = cell[setting.primaryKey]
            param.BID = ''
            if (btn.innerFunc) {
              param.func = btn.innerFunc
@@ -218,7 +214,6 @@
              }
            } else if (btn.sql) {
              param.ID = cell[setting.primaryKey]
              param.BID = ''
              param.LText = Utils.formatOptions(Utils.getSysDefaultSql(btn, setting, formdata)) // 数据源
              param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
              param.secretkey = Utils.encrypt(param.LText, param.timestamp)
@@ -263,7 +258,7 @@
      /** *********************调用外部接口************************* */
      let param = {
        ID: '',
        BID: ''
        BID: this.props.BID
      }
      if (!btn.interface) { // 接口地址不存在时报错
@@ -359,7 +354,7 @@
          if (btn.innerFunc) {
            let deffers = data.map(cell => {
              let _param = {
                BID: '',
                BID: this.props.BID,
                func: btn.innerFunc
              }
              _param.ID = cell[setting.primaryKey]
@@ -393,7 +388,7 @@
          } else {
            let params = data.map(cell => {
              return {
                BID: '',
                BID: this.props.BID,
                ID: cell[setting.primaryKey]
              }
            })
src/tabviews/subtable/subSearch/index.scss
@@ -1,6 +1,6 @@
.ant-advanced-search-form.subtable-main-search {
  padding: 0px 0px 20px;
  border-bottom: 1px solid #e9e9e9;
  border-bottom: 1px solid #efefef;
  .ant-form-item {
    display: flex;
    margin-bottom: 10px;
src/templates/comtableconfig/index.jsx
@@ -69,7 +69,7 @@
    delActions: [],          // 删除按钮列表
    funcLoading: false,      // 存储过程创建中
    showColumnName: false,   // 显示列字段名控制
    tabviews: false          // 所有标签页
    tabviews: []             // 所有标签页
  }
  /**
@@ -261,30 +261,21 @@
      })
    })
    // let param = {
    //   func: 'sPC_Get_SelectedList',
    //   LText: 'select TbName ,Remark from sDataDictionary where IsKey!=\'\' and Deleted =0',
    //   obj_name: 'data',
    //   arr_field: 'TbName,Remark'
    // }
    // param.LText = Utils.formatOptions(param.LText)
    // param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
    // param.secretkey = Utils.encrypt(param.LText, param.timestamp)
    // Api.getSystemConfig(param).then(res => {
    //   if (res.status) {
    //     this.setState({
    //       tables: res.data
    //     })
    //   } else {
    //     notification.warning({
    //       top: 92,
    //       message: res.message,
    //       duration: 10
    //     })
    //   }
    // })
    Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => {
      if (res.status) {
        this.setState({
          tabviews: res.UserTemp.map(temp => {
            return {
              uuid: temp.MenuID,
              value: temp.MenuID,
              text: temp.MenuName,
              type: temp.Template,
              MenuNo: temp.MenuNo
            }
          })
        })
      }
    })
  }
  handleList = (type, list, card) => {
@@ -986,19 +977,7 @@
          label: '关联标签',
          initVal: card.linkTab || '',
          required: false,
          options: [{
            value: '',
            text: '新建'
          }, {
            value: 'jadisfjiasodjIjjaidfoasdf',
            text: '子表1'
          }, {
            value: 'dasjfsioafjiaga',
            text: '子表2'
          }, {
            value: 'jadsifjasgfisag',
            text: '子表3'
          }]
          options: []
        },
        {
          type: 'select',
@@ -2465,47 +2444,46 @@
            }
          })
        } else if (type === 'tab') {
          if (btn.linkTab) {
          } else {
            let _tab = {
              uuid: btn.linkId,
              create: true
            }
            this.props.handleSubConfig(btn, originMenu, _tab, type)
          }
          this.setState({
            loading: true
          })
          // Api.getSystemConfig({
          //   func: 'sPC_Get_LongParam',
          //   MenuID: btn.linkId
          // }).then(res => {
          //   if (res.status) {
          //     this.setState({
          //       loading: false
          //     })
          //     let _LongParam = ''
          //     if (res.LongParam) {
          //       _LongParam = window.decodeURIComponent(window.atob(res.LongParam))
          //       try {
          //         _LongParam = JSON.parse(_LongParam)
          //       } catch (e) {
          //         _LongParam = ''
          //       }
          //     }
          //     console.log(_LongParam)
          //   } else {
          //     this.setState({
          //       loading: false
          //     })
          //     notification.warning({
          //       top: 92,
          //       message: res.message,
          //       duration: 10
          //     })
          //   }
          // })
          Api.getSystemConfig({
            func: 'sPC_Get_LongParam',
            MenuID: btn.linkTab
          }).then(res => {
            if (res.status) {
              this.setState({
                loading: false
              })
              let _LongParam = ''
              if (res.LongParam) {
                _LongParam = window.decodeURIComponent(window.atob(res.LongParam))
                try {
                  _LongParam = JSON.parse(_LongParam)
                } catch (e) {
                  _LongParam = ''
                }
              }
              if (!_LongParam) {
                _LongParam = {
                  ...btn,
                  uuid: btn.linkTab,
                  create: true
                }
              }
              this.props.handleSubConfig(btn, originMenu, _LongParam, type)
            } else {
              this.setState({
                loading: false
              })
              notification.warning({
                top: 92,
                message: res.message,
                duration: 10
              })
            }
          })
        }
      }, () => {
        notification.warning({
@@ -2801,6 +2779,7 @@
          {this.state.formtemp === 'tabs' ?
            <TabForm
              type="tabs"
              tabs={this.state.tabviews}
              dict={this.state.dict}
              card={this.state.card}
              formlist={this.state.formlist}
src/templates/comtableconfig/settingform/index.jsx
@@ -240,6 +240,18 @@
              )}
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label="初始化">
              {getFieldDecorator('onload', {
                initialValue: data.onload || 'true'
              })(
                <Select>
                  <Select.Option value="true">加载数据</Select.Option>
                  <Select.Option value="false">不加载数据</Select.Option>
                </Select>
              )}
            </Form.Item>
          </Col>
        </Row>
      </Form>
    )
src/templates/comtableconfig/source.jsx
@@ -20,6 +20,7 @@
      innerFunc: '',
      interface: '',
      outerFunc: '',
      onload: 'true',
      tabshow: 'horizontal'
    },
    tables: [],
src/templates/comtableconfig/tabdragelement/index.jsx
@@ -43,8 +43,7 @@
      newcard.label = 'tab'
      newcard.icon = ''
      newcard.type = item.subType
      newcard.linkTab = ''
      newcard.linkId = Utils.getuuid()
      newcard.linkTab = Utils.getuuid()
      newcard.supMenu = ''
      
      let targetId = cards.length > 0 ? cards[cards.length - 1].uuid : 0
src/templates/comtableconfig/tabform/index.jsx
@@ -7,6 +7,7 @@
class MainTab extends Component {
  static propTpyes = {
    tabs: PropTypes.array,   // 类型
    type: PropTypes.string,  // 类型
    dict: PropTypes.object,  // 字典项
    formlist: PropTypes.any, // 表单
@@ -14,7 +15,7 @@
  }
  state = {
    formlist: null           // 表单
    formlist: null // 表单
  }
  /**
@@ -22,11 +23,30 @@
   */
  UNSAFE_componentWillMount () {
    const { formlist } = this.props
    let type = formlist.filter(cell => cell.key === 'type')[0].initVal
    console.log(type)
    let _initval = formlist.filter(cell => cell.key === 'linkTab')[0].initVal
    let _tabs = this.props.tabs.filter(tab => tab.type === type)
    let initTab = _tabs.filter(tab => tab.uuid === _initval)[0]
    console.log(_tabs)
    this.setState({
      formlist: formlist
      formlist: formlist.map(item => {
        if (item.key === 'linkTab') {
          item.options = [
            {
              value: '',
              text: '新建'
            },
            ..._tabs
          ]
          if (!initTab) {
            item.initVal = ''
          }
        }
        return item
      })
    })
  }
@@ -34,22 +54,51 @@
   * @description 标签页类型切换
   */
  openTypeChange = (key, value) => {
    console.log(value)
    // if (key === 'type') {
    //   console.log(value)
    const { formlist } = this.state
    //   this.setState({
    //     formlist: this.state.formlist.map(form => {
    //       return form
    //     })
    //   }, () => {
    //     this.setState({
    //       formlist: this.state.formlist.map(form => {
    //         return form
    //       })
    //     })
    //   })
    // }
    if (key === 'type') {
      let _tabs = this.props.tabs.filter(tab => tab.type === value)
      this.setState({
        formlist: formlist.map(item => {
          if (item.key === 'linkTab') {
            item.options = [
              {
                value: '',
                text: '新建'
              },
              ..._tabs
            ]
            item.initVal = ''
            item.hidden = true
          }
          return item
        })
      }, () => {
        this.setState({
          formlist: this.state.formlist.map(item => {
            if (item.key === 'linkTab') {
              item.hidden = false
            }
            return item
          })
        })
      })
      console.log(value)
      this.setState({
        formlist: this.state.formlist.map(form => {
          return form
        })
      }, () => {
        this.setState({
          formlist: this.state.formlist.map(form => {
            return form
          })
        })
      })
    }
  }
  getFields() {
@@ -94,7 +143,7 @@
                  onChange={(value) => {this.openTypeChange(item.key, value)}}
                >
                  {item.options.map((option, i) =>
                    <Select.Option id={`${i}`} title={option.text} key={`${i}`} value={option.value}>
                    <Select.Option id={'mk' + i} title={option.text} key={'mk' + i} value={option.value}>
                      {item.key === 'icon' && i !== 0 ? <Icon type={option.text} /> : option.text}
                    </Select.Option>
                  )}
@@ -118,7 +167,7 @@
          values.uuid = this.props.card.uuid
          if (!values.linkTab) { // 没有关联标签(新建时),创建新标签Id
            values.linkId = Utils.getuuid()
            values.linkTab = Utils.getuuid()
          }
          resolve({
src/templates/subtableconfig/index.jsx
@@ -80,6 +80,7 @@
      _config = JSON.parse(JSON.stringify(Source.baseConfig))
      if (config.uuid) {
        _config.uuid = config.uuid
        _config.tabName = config.label
      }
    } else {
      _config = JSON.parse(JSON.stringify(config))
src/utils/option.js
@@ -1,8 +1,18 @@
import zhCN from '@/locales/zh-CN/share.js'
import enUS from '@/locales/en-US/share.js'
import nortable from '@/assets/img/normaltable.jpg'
const _dict =  sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
export const sysTemps = [
  {
    title: '基础表格',
    type: 'CommonTable',
    url: nortable,
    baseconfig: ''
  }
]
export const dateOptions = {
  date: [
    {value: '', text: _dict['date.empty']},
src/views/login/index.jsx
@@ -64,8 +64,10 @@
          sessionStorage.setItem('UserID', res.UserID)
          sessionStorage.setItem('SessionUid', Utils.getuuid())
          sessionStorage.setItem('LoginUID', res.LoginUID)
          sessionStorage.setItem('User_Name', res.UserName)
          localStorage.setItem('lang', param.lang)
          let _url = window.location.href.split('#')[0]
          if (param.remember) { // 记住密码时账号密码存入localStorage