king
2020-03-17 5c8860f3cd8921e7eb0da7749628e9dc669b3203
2020-03-17
26个文件已修改
876 ■■■■ 已修改文件
src/assets/css/main.scss 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/editthdmenu/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/en-US/comtable.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/comtable.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.scss 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/index.jsx 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/actionList/index.jsx 109 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/verifycard/actionform/index.jsx 188 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/verifycard/index.jsx 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/verifycard/index.scss 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/columnform/index.jsx 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/dragelement/card.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/formconfig.js 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/searchform/index.jsx 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/ushare/modalform/index.jsx 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/printTemplate/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/printTemplate/mutilform/index.jsx 93 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/printTemplate/option.js 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/main.scss
@@ -202,4 +202,23 @@
}
.ant-tooltip.middle {
  max-width: 320px!important;
}
}
// 关联选择
.ant-cascader-menus {
  z-index: 1090!important;
  .ant-cascader-menu::-webkit-scrollbar {
    width: 7px;
  }
  .ant-cascader-menu::-webkit-scrollbar-thumb {
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
    background: rgba(0, 0, 0, 0.13);
  }
  .ant-cascader-menu::-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);
  }
}
src/components/sidemenu/editthdmenu/index.jsx
@@ -690,6 +690,7 @@
          this.setState({
            roleList: res.Roles.map(role => {
              return {
                uuid: Utils.getuuid(),
                value: role.RoleID,
                text: role.RoleName
              }
src/locales/en-US/comtable.js
@@ -225,6 +225,7 @@
  'header.form.maxRows': '最大行数',
  'header.form.paste': '粘贴',
  'header.form.ratio': '比例',
  'header.form.blacklist': '黑名单',
  'header.modal.form.edit': '表单-编辑',
  'header.modal.search.edit': '搜索条件-编辑',
  'header.modal.action.edit': '按钮-编辑',
src/locales/zh-CN/comtable.js
@@ -225,6 +225,7 @@
  'header.form.maxRows': '最大行数',
  'header.form.paste': '粘贴',
  'header.form.ratio': '比例',
  'header.form.blacklist': '黑名单',
  'header.modal.form.edit': '表单-编辑',
  'header.modal.search.edit': '搜索条件-编辑',
  'header.modal.action.edit': '按钮-编辑',
src/tabviews/commontable/index.jsx
@@ -9,17 +9,18 @@
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
import Utils from '@/utils/utils.js'
import asyncComponent from '@/utils/asyncComponent'
// import asyncComponent from '@/utils/asyncComponent'
import asyncLoadComponent from '@/utils/asyncLoadComponent'
import {refreshTabView, modifyTabview} from '@/store/action'
import MainTable from './mainTable'
import MainAction from '@/tabviews/tableshare/actionList'
import VerifyCard from '@/tabviews/tableshare/verifycard'
import MainSearch from '@/tabviews/tableshare/topSearch'
import NotFount from '@/components/404'
import './index.scss'
const MainAction = asyncComponent(() => import('@/tabviews/tableshare/actionList'))
// const MainAction = asyncComponent(() => import('@/tabviews/tableshare/actionList'))
const SubTable = asyncLoadComponent(() => import('@/tabviews/subtable'))
const SubTabTable = asyncLoadComponent(() => import('@/tabviews/subtabtable'))
const FormTab = asyncLoadComponent(() => import('@/tabviews/formtab'))
@@ -80,6 +81,7 @@
      MenuID: this.props.MenuID
    }
    let result = await Api.getSystemCacheConfig(param)
    if (result.status) {
      let config = ''
      let userConfig = ''
@@ -127,6 +129,35 @@
        config[group] = config[group].filter(tab => permAction[tab.linkTab])
      })
      // 字段权限黑名单
      config.search = config.search.filter(item => {
        if (!item.blacklist || item.blacklist.length === 0) return true
        let _black = item.blacklist.filter(v => {
          return this.props.permRoles.indexOf(v) !== -1
        })
        if (_black.length > 0) {
          return false
        } else {
          return true
        }
      })
      config.columns = config.columns.filter(col => {
        if (!col.field || !col.blacklist || col.blacklist.length === 0) return true
        let _black = col.blacklist.filter(v => {
          return this.props.permRoles.indexOf(v) !== -1
        })
        if (_black.length > 0) {
          return false
        } else {
          return true
        }
      })
      if (userConfig) {
        config.setting = {...config.setting, ...userConfig.setting}
        let _actions = {}
@@ -149,8 +180,8 @@
      let _hideCol = []      // 隐藏及合并列中字段的uuid集
      let colMap = new Map() // 用于字段过滤
      let _actions = []     // 工具栏按钮
      let _operations = []  // 操作列按钮(存在时)
      let _actions = []      // 工具栏按钮
      let _operations = []   // 操作列按钮(存在时)
      config.action.forEach(item => {
        if (item.execMode) {
@@ -176,10 +207,6 @@
      config.columns.forEach(col => {
        if (col.field) {
          _arrField.push(col.field)
          // if () { // 权限黑名单
          //   col.Hide = 'true'
          // }
          _logcolumns.push(col)
        }
@@ -262,11 +289,12 @@
      
      let istrigger = false
      actions.forEach(item => {
        if (!item.shortcut || istrigger) return
        if (!item.shortcut || typeof(item.shortcut) !== 'object' || istrigger) return
        if (preKey === item.shortcut && keyCode === item.shortcutkey) {
        if (preKey === item.shortcut[0] && keyCode === item.shortcut[1]) {
          e.preventDefault()
          istrigger = true
          this.refs.mainButton.actionTrigger(item)
        }
      })
@@ -897,6 +925,9 @@
        this.setState({
          settingVisible: false,
          confirmLoading: false
        }, () => {
          window.GLOB.CacheMap = new Map()
          this.reloadview()
        })
      })
    })
@@ -946,7 +977,7 @@
            /> : null
          }
          {actions && setting.onload !== 'false' ?
            <div style={{minHeight: '45px'}}>
            <div style={{minHeight: '25px'}}>
              <MainAction
                ref="mainButton"
                BID=""
@@ -956,6 +987,7 @@
                actions={actions}
                dict={this.state.dict}
                MenuID={this.props.MenuID}
                permRoles={this.props.permRoles}
                logcolumns={this.state.logcolumns}
                ContainerId={this.state.ContainerId}
                refreshdata={this.refreshbyaction}
@@ -1101,7 +1133,8 @@
  return {
    tabviews: state.tabviews,
    refreshTab: state.refreshTab,
    permAction: state.permAction
    permAction: state.permAction,
    permRoles: state.permRoles
  }
}
src/tabviews/commontable/index.scss
@@ -52,7 +52,7 @@
    position: relative;
    .main-pickup {
      position: absolute;
      right: 20px;
      right: 55px;
      top: -22px;
      z-index: 1;
    }
@@ -60,8 +60,8 @@
      position: absolute;
      z-index: 1;
      right: 20px;
      top: -50px;
      font-size: 16px;
      top: -23px;
      font-size: 18px;
      padding: 3px;
      cursor: pointer;
    }
@@ -86,7 +86,7 @@
  }
}
.commontable.pick-control {
  >.button-list {
  .button-list {
    padding-right: 140px;
  }
}
src/tabviews/formtab/index.jsx
@@ -90,17 +90,6 @@
        return
      }
      let _arrField = [config.setting.primaryKey]     // 字段集 , 默认添加主键
      config.groups.forEach(group => {
        group.sublist.forEach(item => {
          if (!item.field) return
          _arrField.push(item.field)
        })
      })
      _arrField = _arrField.join(',')
      // 权限过滤
      if (this.props.param.menuType !== 'HS') {
        config.action = config.action.filter(item => permAction[item.uuid])
@@ -110,6 +99,29 @@
          config[group] = config[group].filter(tab => permAction[tab.linkTab])
        })
      }
      let _arrField = [config.setting.primaryKey]     // 字段集 , 默认添加主键
      config.groups.forEach(group => {
        group.sublist = group.sublist.filter(item => {
          if (!item.blacklist || item.blacklist.length === 0) {
            _arrField.push(item.field)
            return true
          }
          let _black = item.blacklist.filter(v => {
            return this.props.permRoles.indexOf(v) !== -1
          })
          if (_black.length > 0) {
            return false
          } else {
            _arrField.push(item.field)
            return true
          }
        })
      })
      _arrField = _arrField.join(',')
      this.setState({
        config: config,
@@ -694,7 +706,8 @@
  return {
    tabviews: state.tabviews,
    refreshTab: state.refreshTab,
    permAction: state.permAction
    permAction: state.permAction,
    permRoles: state.permRoles
  }
}
src/tabviews/subtable/index.jsx
@@ -4,20 +4,24 @@
import { is, fromJS } from 'immutable'
import { notification, Spin, Modal, Button, Switch} from 'antd'
import moment from 'moment'
import Api from '@/api'
import SubTable from './subTable'
import SubSearch from '@/tabviews/tableshare/topSearch'
import asyncLoadComponent from '@/utils/asyncLoadComponent'
import asyncComponent from '@/utils/asyncComponent'
import NotFount from '@/components/404'
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
import Utils from '@/utils/utils.js'
import options from '@/store/options.js'
import SubTable from './subTable'
import SubAction from '@/tabviews/tableshare/actionList'
import SubSearch from '@/tabviews/tableshare/topSearch'
import asyncLoadComponent from '@/utils/asyncLoadComponent'
// import asyncComponent from '@/utils/asyncComponent'
import NotFount from '@/components/404'
import './index.scss'
const SubTabTable = asyncLoadComponent(() => import('@/tabviews/subtabtable'))
const SubAction = asyncComponent(() => import('@/tabviews/tableshare/actionList'))
// const SubAction = asyncComponent(() => import('@/tabviews/tableshare/actionList'))
class SubTabViewTable extends Component {
  static propTpyes = {
@@ -120,6 +124,35 @@
      // 权限过滤
      if (this.props.menuType !== 'HS') {
        config.action = config.action.filter(item => permAction[item.uuid])
        // 字段权限黑名单
        config.search = config.search.filter(item => {
          if (!item.blacklist || item.blacklist.length === 0) return true
          let _black = item.blacklist.filter(v => {
            return this.props.permRoles.indexOf(v) !== -1
          })
          if (_black.length > 0) {
            return false
          } else {
            return true
          }
        })
        config.columns = config.columns.filter(col => {
          if (!col.field || !col.blacklist || col.blacklist.length === 0) return true
          let _black = col.blacklist.filter(v => {
            return this.props.permRoles.indexOf(v) !== -1
          })
          if (_black.length > 0) {
            return false
          } else {
            return true
          }
        })
      }
      // 1、筛选字段集,2、过滤隐藏列及合并列中的字段uuid
@@ -664,7 +697,7 @@
          /> : null
        }
        {actions ?
          <div style={{minHeight: '45px'}}>
          <div style={{minHeight: '25px'}}>
            <SubAction
              ref="subButton"
              type="sub"
@@ -676,9 +709,10 @@
              BData={this.props.BData}
              dict={this.state.dict}
              MenuID={this.props.SupMenuID}
              permRoles={this.props.permRoles}
              logcolumns={this.state.logcolumns}
              ContainerId={this.props.ContainerId}
              refreshdata={this.refreshbyaction}
              ContainerId={this.props.ContainerId}
              triggerPopview={this.triggerPopview}
              getexceloutparam={this.getexceloutparam}
              gettableselected={this.gettableselected}
@@ -737,7 +771,8 @@
const mapStateToProps = (state) => {
  return {
    permAction: state.permAction
    permAction: state.permAction,
    permRoles: state.permRoles
  }
}
src/tabviews/subtabtable/index.jsx
@@ -4,18 +4,22 @@
import { is, fromJS } from 'immutable'
import { notification, Spin} from 'antd'
import moment from 'moment'
import Api from '@/api'
import asyncComponent from '@/utils/asyncComponent'
import SubTable from '@/tabviews/subtable/subTable'
import SubSearch from '@/tabviews/tableshare/topSearch'
import NotFount from '@/components/404'
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
import Utils from '@/utils/utils.js'
import options from '@/store/options.js'
// import asyncComponent from '@/utils/asyncComponent'
import SubTable from '@/tabviews/subtable/subTable'
import SubAction from '@/tabviews/tableshare/actionList'
import SubSearch from '@/tabviews/tableshare/topSearch'
import NotFount from '@/components/404'
import './index.scss'
const SubAction = asyncComponent(() => import('@/tabviews/tableshare/actionList'))
// const SubAction = asyncComponent(() => import('@/tabviews/tableshare/actionList'))
class SubTabModalTable extends Component {
  static propTpyes = {
@@ -100,6 +104,35 @@
      // 权限过滤
      if (this.props.menuType !== 'HS') {
        config.action = config.action.filter(item => permAction[item.uuid])
        // 字段权限黑名单
        config.search = config.search.filter(item => {
          if (!item.blacklist || item.blacklist.length === 0) return true
          let _black = item.blacklist.filter(v => {
            return this.props.permRoles.indexOf(v) !== -1
          })
          if (_black.length > 0) {
            return false
          } else {
            return true
          }
        })
        config.columns = config.columns.filter(col => {
          if (!col.field || !col.blacklist || col.blacklist.length === 0) return true
          let _black = col.blacklist.filter(v => {
            return this.props.permRoles.indexOf(v) !== -1
          })
          if (_black.length > 0) {
            return false
          } else {
            return true
          }
        })
      }
      // 1、筛选字段集,2、过滤隐藏列及合并列中的字段uuid
@@ -615,7 +648,7 @@
          /> : null
        }
        {actions ?
          <div style={{minHeight: '45px'}}>
          <div style={{minHeight: '25px'}}>
            <SubAction
              ref="subtabButton"
              type="subtab"
@@ -623,11 +656,12 @@
              setting={setting}
              actions={actions}
              BID={this.props.BID}
              BData={this.props.BData}
              dict={this.state.dict}
              BData={this.props.BData}
              MenuID={this.props.SupMenuID}
              ContainerId={this.props.ContainerId}
              permRoles={this.props.permRoles}
              refreshdata={this.refreshbyaction}
              ContainerId={this.props.ContainerId}
              gettableselected={this.gettableselected}
            />
          </div> : null
@@ -656,7 +690,8 @@
const mapStateToProps = (state) => {
  return {
    permAction: state.permAction
    permAction: state.permAction,
    permRoles: state.permRoles
  }
}
src/tabviews/tableshare/actionList/index.jsx
@@ -28,8 +28,9 @@
    ContainerId: PropTypes.any,       // tab页面ID,用于弹窗控制
    refreshdata: PropTypes.func,      // 执行完成后数据刷新
    triggerPopview: PropTypes.func,   // 弹窗标签页触发
    getexceloutparam: PropTypes.func,  // 获取excel导出数据
    gettableselected: PropTypes.func  // 获取表格中数据
    getexceloutparam: PropTypes.func, // 获取excel导出数据
    gettableselected: PropTypes.func, // 获取表格中数据
    permRoles: PropTypes.any          // 用户权限列表
  }
  state = {
@@ -234,36 +235,56 @@
    }
    let printlist = []
    let templates = []
    let templates = [btn.verify.Template]
    this.setState({loadingUuid: btn.uuid})
    new Promise(resolve => {
      if (btn.intertype === 'inner' && !btn.innerFunc) {
        formdata.TemplateID = btn.verify.Template
        templates.push(btn.verify.Template)
        if (btn.Ot === 'notRequired') {
          printlist.push(formdata)
          if (formdata.printCount && typeof(formdata.printCount) === 'number' && formdata.printCount > 1) {
            for (let i = 0; i < formdata.printCount; i++) {
              printlist.push(JSON.parse(JSON.stringify(formdata)))
            }
          } else {
            printlist.push(formdata)
          }
        } else {
          printlist = data.map(cell => {
          data.forEach(cell => {
            let _cell = {...cell, ...formdata}
            return _cell
            if (formdata.printCount && typeof(formdata.printCount) === 'number' && formdata.printCount > 1) {
              for (let i = 0; i < formdata.printCount; i++) {
                printlist.push(JSON.parse(JSON.stringify(_cell)))
              }
            } else {
              printlist.push(_cell)
            }
          })
        }
        resolve('getTemp')
      } else {
        this.getprintdata(btn, data, formdata, formlist).then(result => {
          printlist = result.list.map(item => {
            if (item.TemplateID) {
              templates.push(item.TemplateID)
            } else {
              item.TemplateID = btn.verify.Template
            }
            return item
          })
          result.list.forEach(item => {
            let _cell = item.data
            if (_cell.TemplateID) {
              templates.push(_cell.TemplateID)
            } else {
              _cell.TemplateID = btn.verify.Template
            }
            if (item.count && typeof(item.count) === 'number' && item.count > 1) {
              for (let i = 0; i < item.count; i++) {
                printlist.push(JSON.parse(JSON.stringify(_cell)))
              }
            } else {
              printlist.push(_cell)
            }
          })
          resolve(result.next)
        })
      }
@@ -280,8 +301,8 @@
            ID: tempId
          }
    
          if (options.cloudServiceApi) {
            param.rduri = options.cloudServiceApi.replace('dostars', 'dostar')
          if (window.GLOB.mainSystemApi) { // 从单点登录服务器取打印配置信息
            param.rduri = window.GLOB.mainSystemApi
          }
    
          Api.getLocalConfig(param).then(result => {
@@ -389,7 +410,9 @@
            let errorMsg = ''
            result.forEach(res => {
              if (res.status) {
                _list.push(res.data)
                res.data.forEach(_item => {
                  _list.push({data: _item, count: res.printCount})
                })
              } else {
                errorMsg = res
              }
@@ -471,8 +494,12 @@
      return Api.genericInterface(res)
    }).then(response => {
      if (!response) return
      // 回调请求
      if (response.status) {
        response.data.forEach(_item => {
          _list.push({data: _item, count: response.printCount})
        })
        // 一次请求成功,进行下一项请求
        if (params.length === 0) {
          _resolve({next: 'getTemp', list: _list})
@@ -494,7 +521,9 @@
    Api.genericInterface(param).then(res => {
      if (res.status) {
        _list.push(res.data)
        res.data.forEach(_item => {
          _list.push({data: _item, count: res.printCount})
        })
        if (params.length === 0) {
          _resolve({next: 'getTemp', list: _list})
@@ -526,11 +555,17 @@
        error = '打印模板解析错误!'
      } else {
        let control = configParam.elements.map(element => {
          let _field = element.field
          if (_field === 'other_field') {
            _field = element.cusfield || ''
          }
          let item = {
            Name: element.name || '',
            Type: element.type,
            Value: element.value || '',
            Field: element.field || '',
            Field: _field,
            Left: element.left,
            Top: element.top,
            Width: element.width,
@@ -1333,6 +1368,38 @@
            btnloading: false
          })
        } else {
          if (_LongParam.groups.length > 0) {
            _LongParam.groups.forEach(group => {
              group.sublist = group.sublist.filter(cell => {
                if (!cell.blacklist || cell.blacklist.length === 0) return true
                let _black = cell.blacklist.filter(v => {
                  return this.props.permRoles.indexOf(v) !== -1
                })
                if (_black.length > 0) {
                  return false
                } else {
                  return true
                }
              })
            })
          } else {
            _LongParam.fields = _LongParam.fields.filter(cell => {
              if (!cell.blacklist || cell.blacklist.length === 0) return true
              let _black = cell.blacklist.filter(v => {
                return this.props.permRoles.indexOf(v) !== -1
              })
              if (_black.length > 0) {
                return false
              } else {
                return true
              }
            })
          }
          this.setState({
            configMap: {...configMap, [action.uuid]: _LongParam},
            execAction: {..._LongParam, ...execAction}
src/tabviews/tableshare/verifycard/actionform/index.jsx
@@ -1,8 +1,36 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Select, Button, Input } from 'antd'
import { Form, Row, Col, Select, Button, Input, Cascader } from 'antd'
import './index.scss'
const shortkeycode = {
  65: 'A',
  66: 'B',
  67: 'C',
  68: 'D',
  69: 'E',
  70: 'F',
  71: 'G',
  72: 'H',
  73: 'I',
  74: 'J',
  75: 'K',
  76: 'L',
  77: 'M',
  78: 'N',
  79: 'O',
  80: 'P',
  81: 'Q',
  82: 'R',
  83: 'S',
  84: 'T',
  85: 'U',
  86: 'V',
  87: 'W',
  88: 'X',
  89: 'Y',
  90: 'Z'
}
class UniqueForm extends Component {
  static propTpyes = {
@@ -12,22 +40,52 @@
  state = {
    editItem: null, // 编辑元素
    shortcut: ''
    shortcutOptions: null
  }
  UNSAFE_componentWillMount () {
    let keys = ['shift', 'ctrl', 'alt']
    let _options = []
    keys.forEach(item => {
      let _op = {
        value: item,
        label: item,
        children: []
      }
      Object.keys(shortkeycode).forEach(key => {
        if (item === 'ctrl' && (key === '67' || key === '86')) return
        if (item === 'alt' && key === '65') return
        _op.children.push({
          value: +key,
          label: shortkeycode[key]
        })
      })
      _options.push(_op)
    })
    this.setState({
      shortcutOptions: _options
    })
  }
  edit = (record) => {
    this.setState({
      editItem: record,
      shortcut: record.shortcut || ''
      editItem: record
    }, () => {
      let item = {
        label: record.label,
        shortcut: record.shortcut
      let _shortcut = record.shortcut || []
      if (typeof(record.shortcut) !== 'object') {
        _shortcut = []
      }
      if (record.shortcut) {
        item.shortcutkey = record.shortcutkey
      let item = {
        label: record.label,
        shortcut: _shortcut
      }
      if (record.OpenType === 'funcbutton' && record.funcType === 'print') {
        item.printer = record.printer || ''
      }
@@ -44,28 +102,14 @@
        values.uuid = this.state.editItem ? this.state.editItem.uuid : ''
        this.props.actionChange(values)
        this.setState({
          editItem: null,
          shortcut: ''
          editItem: null
        }, () => {
          this.props.form.setFieldsValue({
            shortcut: '',
            shortcut: [],
            label: ''
          })
        })
      }
    })
  }
  shortcutChange = (value) => {
    this.setState({
      shortcut: value
    }, () => {
      let shortkey = this.props.form.getFieldValue('shortcutkey')
      if (shortkey && ((value === 'alt' && shortkey === 65) || (value === 'ctrl' && (shortkey === 67 || shortkey === 86))) ) {
        this.props.form.setFieldsValue({
          shortcutkey: ''
        })
      }
    })
@@ -90,15 +134,34 @@
    return (
      <Form {...formItemLayout} className="verify-form" id="verifycard1">
        <Row gutter={24}>
          <Col span={7}>
          <Col span={10}>
            <Form.Item label={'名称'}>
              {getFieldDecorator('label', {
                initialValue: '',
              })(<Input placeholder="" autoComplete="off" disabled />)}
            </Form.Item>
          </Col>
          <Col span={10}>
            <Form.Item label={'快捷键'}>
              {getFieldDecorator('shortcut', {
                initialValue: []
              })(
                <Cascader
                  displayRender={label => label.join(' + ')}
                  options={this.state.shortcutOptions}
                />
              )}
            </Form.Item>
          </Col>
          <Col span={4} className="add">
            <Form.Item label=" " colon={false} >
              <Button onClick={this.handleConfirm} type="primary" className="add-row">
                确定
              </Button>
            </Form.Item>
          </Col>
          {hasprint ? 
            <Col span={7}>
            <Col span={10}>
              <Form.Item label={'打印机'}>
                {getFieldDecorator('printer', {
                  initialValue: '',
@@ -118,75 +181,6 @@
              </Form.Item>
            </Col> : null
          }
          <Col span={7}>
            <Form.Item label={'快捷键'}>
              {getFieldDecorator('shortcut', {
                initialValue: ''
              })(
                <Select onChange={(value) => {this.shortcutChange(value)}}>
                  <Select.Option value=""> 空 </Select.Option>
                  <Select.Option value="shift"> shift </Select.Option>
                  <Select.Option value="ctrl"> ctrl </Select.Option>
                  <Select.Option value="alt"> alt </Select.Option>
                </Select>
              )}
            </Form.Item>
          </Col>
          {hasprint ? <Col span={3} className="add">
            <Button onClick={this.handleConfirm} type="primary" className="add-row">
              确定
            </Button>
          </Col> : null}
          {this.state.shortcut ?
            <Col span={7}>
              <Form.Item label={'组合键'}>
                {getFieldDecorator('shortcutkey', {
                  initialValue: '',
                  rules: [
                    {
                      required: true,
                      message: '请选择组合键!'
                    }
                  ]
                })(
                  <Select>
                    <Select.Option value=""> 空 </Select.Option>
                    {this.state.shortcut !== 'alt' ? <Select.Option value={65}> A </Select.Option> : null}
                    <Select.Option value={66}> B </Select.Option>
                    {this.state.shortcut !== 'ctrl' ? <Select.Option value={67}> C </Select.Option> : null}
                    <Select.Option value={68}> D </Select.Option>
                    <Select.Option value={69}> E </Select.Option>
                    <Select.Option value={70}> F </Select.Option>
                    <Select.Option value={71}> G </Select.Option>
                    <Select.Option value={72}> H </Select.Option>
                    <Select.Option value={73}> I </Select.Option>
                    <Select.Option value={74}> J </Select.Option>
                    <Select.Option value={75}> K </Select.Option>
                    <Select.Option value={76}> L </Select.Option>
                    <Select.Option value={77}> M </Select.Option>
                    <Select.Option value={78}> N </Select.Option>
                    <Select.Option value={79}> O </Select.Option>
                    <Select.Option value={80}> P </Select.Option>
                    <Select.Option value={81}> Q </Select.Option>
                    <Select.Option value={82}> R </Select.Option>
                    <Select.Option value={83}> S </Select.Option>
                    <Select.Option value={84}> T </Select.Option>
                    <Select.Option value={85}> U </Select.Option>
                    {this.state.shortcut !== 'ctrl' ? <Select.Option value={86}> V </Select.Option> : null}
                    <Select.Option value={87}> W </Select.Option>
                    <Select.Option value={88}> X </Select.Option>
                    <Select.Option value={89}> Y </Select.Option>
                    <Select.Option value={90}> Z </Select.Option>
                  </Select>
                )}
              </Form.Item>
            </Col> : null
          }
          {!hasprint ? <Col span={3} className="add">
            <Button onClick={this.handleConfirm} type="primary" className="add-row">
              确定
            </Button>
          </Col> : null}
        </Row>
      </Form>
    )
src/tabviews/tableshare/verifycard/index.jsx
@@ -67,23 +67,23 @@
      {
        title: '名称',
        dataIndex: 'label',
        width: '20%'
        width: '25%'
      },
      {
        title: '快捷键',
        dataIndex: 'shortcut',
        width: '20%'
      },
      {
        title: '组合键',
        dataIndex: 'shortcutkey',
        width: '20%',
        render: (text, record) => keycode[text] || ''
        width: '25%',
        render: (text, record) => {
          if (!record.shortcut || typeof(record.shortcut) !== 'object') return ''
          let _text = keycode[record.shortcut[1]]
          return record.shortcut[0] + ' + ' + _text
        }
      },
      {
        title: '打印机',
        dataIndex: 'printer',
        width: '20%'
        width: '30%'
      },
      {
        title: '操作',
@@ -100,7 +100,7 @@
  UNSAFE_componentWillMount() {
    const { config } = this.props
    this.setState({
      config: JSON.parse(JSON.stringify(config))
    })
@@ -144,6 +144,7 @@
            _config.action = _config.action.map(cell => {
              if (item.uuid === cell.uuid) {
                cell.printer = cell.printer || data.defaultPrinter
                cell.printers = printers.map(print => {
                  return {
src/tabviews/tableshare/verifycard/index.scss
@@ -34,7 +34,11 @@
      }
    }
    .add {
      padding-top: 4px;
      padding-top: 0px;
    }
    .ant-input-disabled {
      color: rgba(0, 0, 0, 0.75);
      cursor: default;
    }
  }
  .custom-table .ant-empty {
src/templates/comtableconfig/index.jsx
@@ -385,10 +385,12 @@
   * @description 搜索条件编辑,获取搜索条件表单信息
   */
  handleSearch = (card) => {
    const { menu } = this.props
    this.setState({
      modaltype: 'search',
      card: card,
      formlist: getSearchForm(card)
      formlist: getSearchForm(card, menu.roleList)
    })
  }
@@ -413,11 +415,13 @@
   * @description 显示列与合并列编辑,获取表单信息
   */
  handleColumn = (card) => {
    const { menu } = this.props
    if (card.type !== 'colspan') {
      this.setState({
        modaltype: 'columns',
        card: card,
        formlist: getColumnForm(card)
        formlist: getColumnForm(card, menu.roleList)
      })
    } else {
      this.setState({
src/templates/formtabconfig/index.jsx
@@ -426,10 +426,21 @@
      })
    }
    let roleList = []
    if (menu.roleList && menu.roleList.length > 0) {
      roleList = menu.roleList.map(role => {
        return {
          uuid: role.uuid,
          field: role.value,
          label: role.text
        }
      })
    }
    this.setState({
      modaltype: 'search',
      card: card,
      formlist: getModalForm(card, _inputfields, _linkableFields, _linksupFields)
      formlist: getModalForm(card, _inputfields, _linkableFields, _linksupFields, false, roleList)
    })
  }
src/templates/modalconfig/index.jsx
@@ -464,11 +464,22 @@
      card.linkSubField = card.linkSubField.filter(item => fields.includes(item))
    }
    let roleList = []
    if (menu.roleList && menu.roleList.length > 0) {
      roleList = menu.roleList.map(role => {
        return {
          uuid: role.uuid,
          field: role.value,
          label: role.text
        }
      })
    }
    this.setState({
      visible: true,
      modalType: type,
      card: card,
      formlist: getModalForm(card, _inputfields, _linkableFields, _linksupFields, !!this.props.editTab)
      formlist: getModalForm(card, _inputfields, _linkableFields, _linksupFields, !!this.props.editTab, roleList)
    })
  }
src/templates/subtableconfig/index.jsx
@@ -380,10 +380,12 @@
   * @description 搜索条件编辑,获取搜索条件表单信息
   */
  handleSearch = (card) => {
    const { menu } = this.props
    this.setState({
      modaltype: 'search',
      card: card,
      formlist: getSearchForm(card)
      formlist: getSearchForm(card, menu.roleList)
    })
  }
@@ -408,11 +410,13 @@
   * @description 显示列与合并列编辑,获取表单信息
   */
  handleColumn = (card) => {
    const { menu } = this.props
    if (card.type !== 'colspan') {
      this.setState({
        modaltype: 'columns',
        card: card,
        formlist: getColumnForm(card)
        formlist: getColumnForm(card, menu.roleList)
      })
    } else {
      this.setState({
src/templates/tableshare/columnform/index.jsx
@@ -18,14 +18,14 @@
  UNSAFE_componentWillMount () {
    let _type = this.props.formlist.filter(form => form.key === 'type')[0].initVal
    let _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength']
    let _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist']
    if (_type === 'text') {
      _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'matchVal', 'color', 'fieldlength']
      _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'matchVal', 'color', 'fieldlength', 'blacklist']
    } else if (_type === 'number') {
      _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'match', 'matchVal', 'color']
      _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'match', 'matchVal', 'color', 'blacklist']
    } else if (_type === 'textarea') {
      _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'matchVal', 'color', 'fieldlength']
      _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'matchVal', 'color', 'fieldlength', 'blacklist']
    }
    this.setState({
@@ -56,14 +56,14 @@
  typeChange = (key, value) => {
    if (key === 'type') {
      let _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength']
      let _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist']
      if (value === 'text') {
        _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'matchVal', 'color', 'fieldlength']
        _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'matchVal', 'color', 'fieldlength', 'blacklist']
      } else if (value === 'number') {
        _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'match', 'matchVal', 'color']
        _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'match', 'matchVal', 'color', 'blacklist']
      } else if (value === 'textarea') {
        _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'matchVal', 'color', 'fieldlength']
        _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'matchVal', 'color', 'fieldlength', 'blacklist']
      }
      this.setState({
@@ -222,6 +222,26 @@
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'multiselect') { // 多选
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.label}>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal || []
              })(
                <Select
                  showSearch
                  mode="multiple"
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                >
                  {item.options.map((option, i) =>
                    <Select.Option id={i} key={i} value={option.value}>{option.text}</Select.Option>
                  )}
                </Select>
              )}
            </Form.Item>
          </Col>
        )
      }
    })
    return fields
src/templates/tableshare/dragelement/card.jsx
@@ -81,6 +81,8 @@
      hasProfile = true
    } else if (card.OpenType === 'excelIn' || card.OpenType === 'excelOut') {
      hasProfile = true
    } else if (card.funcType === 'print') {
      hasProfile = true
    }
  }
src/templates/tableshare/formconfig.js
@@ -7,7 +7,7 @@
 * @description 获取搜索条件表单配置信息
 * @param {*} card 
 */
export function getSearchForm (card) {
export function getSearchForm (card, roleList = []) {
  return [
    {
      type: 'text',
@@ -221,6 +221,14 @@
      initVal: '',
      required: false,
      options: []
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
      initVal: card.blacklist || [],
      required: false,
      options: roleList
    }
  ]
}
@@ -587,7 +595,7 @@
 * @description 获取显示列表单配置信息
 * @param {*} card
 */
export function getColumnForm (card) {
export function getColumnForm (card, roleList = []) {
  return [
    {
      type: 'text',
@@ -789,6 +797,14 @@
      label: Formdict['header.form.field.length'],
      initVal: card.fieldlength || (card.type === 'text' ? 50 : 512),
      required: false
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
      initVal: card.blacklist || [],
      required: false,
      options: roleList
    }
  ]
}
@@ -798,7 +814,7 @@
 * @param {*} card 
 * @param {*} inputfields 
 */
export function getModalForm (card, inputfields, linkableFields, linksupFields, subtable = false) {
export function getModalForm (card, inputfields, linkableFields, linksupFields, subtable = false, roleList = []) {
  let _openType = []
  let _fieldlength = 50
@@ -1122,6 +1138,14 @@
      label: Formdict['header.form.linkForm'],
      initVal: card.linkSubField || [],
      options: inputfields
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
      initVal: card.blacklist || [],
      required: false,
      options: roleList
    }
  ]
}
src/templates/tableshare/searchform/index.jsx
@@ -32,7 +32,7 @@
    let type = formlist.filter(cell => cell.key === 'type')[0].initVal
    let resourceType = formlist.filter(cell => cell.key === 'resourceType')[0].initVal
    let _options = ['label', 'field', 'initval', 'type', 'match', 'ratio']                // 默认显示项
    let _options = ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist']                // 默认显示项
    if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '0') {        // 下拉选择类型、选项为自定义资源
      _options = [..._options, 'resourceType', 'options', 'display', 'quick']
@@ -104,7 +104,7 @@
    const { resourceType } = this.state
    if (key === 'type') {
      let _options = ['label', 'field', 'initval', 'type', 'match', 'ratio']
      let _options = ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist']
      if ((value === 'multiselect' || value === 'select' || value === 'link') && resourceType === '0') {        // 下拉选择类型、选项为自定义资源
        _options = [..._options, 'resourceType', 'options', 'display', 'quick']
@@ -189,7 +189,7 @@
    let value = e.target.value
    if (key === 'resourceType') {
      let _options = ['label', 'field', 'initval', 'type', 'match', 'resourceType', 'display', 'ratio']
      let _options = ['label', 'field', 'initval', 'type', 'match', 'resourceType', 'display', 'ratio', 'blacklist']
      if (value === '0') {
        _options = [..._options, 'options', 'quick']
@@ -365,6 +365,26 @@
            <EditTable data={item.initVal} type={this.state.openType} ref="editTable"/>
          </Col>
        )
      } else if (item.type === 'multiselect') { // 多选
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.label}>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal || []
              })(
                <Select
                  showSearch
                  mode="multiple"
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                >
                  {item.options.map((option, i) =>
                    <Select.Option id={i} key={i} value={option.value}>{option.text}</Select.Option>
                  )}
                </Select>
              )}
            </Form.Item>
          </Col>
        )
      }
    })
src/templates/ushare/modalform/index.jsx
@@ -54,16 +54,16 @@
      }
    })
    
    let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required', 'hidden', 'readin'] // 默认显示项
    let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required', 'hidden', 'readin', 'blacklist'] // 默认显示项
    if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '0') { // 选择类型、自定义资源
      _options = [..._options, 'resourceType', 'options', 'quick']
    } else if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '1') { // 选择类型、数据源
      _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
    } else if (type === 'number') {
      _options = ['label', 'field', 'initval', 'type', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin']
      _options = ['label', 'field', 'initval', 'type', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'blacklist']
    } else if (type === 'fileupload') {
      _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength']
      _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength', 'blacklist']
    } else if (type === 'textarea') {
      _options = [..._options, 'fieldlength', 'maxRows']
    } else if (type === 'text') {
@@ -77,9 +77,9 @@
    } else if (type === 'link') {          // 关联类型、增加关联字段
      _options = [..._options, 'setAll', 'linkField']
    } else if (type === 'funcvar') {       // 设置为函数变量时,不需要其他信息
      _options = ['label', 'field', 'type']
      _options = ['label', 'field', 'type', 'blacklist']
    } else if (type === 'linkMain') {
      _options = ['label', 'field', 'type', 'readonly', 'required', 'hidden', 'fieldlength']
      _options = ['label', 'field', 'type', 'readonly', 'required', 'hidden', 'fieldlength', 'blacklist']
    }
    if (type !== 'funcvar' && type !== 'linkMain') {
@@ -134,16 +134,16 @@
  openTypeChange = (key, value) => {
    if (key === 'type') {
      let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required', 'hidden', 'readin']
      let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required', 'hidden', 'readin', 'blacklist']
      if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '0') { // 选择类型、自定义资源
        _options = [..._options, 'resourceType', 'options', 'quick']
      } else if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '1') { // 选择类型、数据源
        _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
      } else if (value === 'number') {
        _options = ['label', 'field', 'initval', 'type', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin']
        _options = ['label', 'field', 'initval', 'type', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'blacklist']
      } else if (value === 'fileupload') {
        _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength']
        _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength', 'blacklist']
      } else if (value === 'textarea') {
        _options = [..._options, 'fieldlength', 'maxRows']
      } else if (value === 'text') {
@@ -157,9 +157,9 @@
      } else if (value === 'link') {
        _options = [..._options, 'setAll', 'linkField']
      } else if (value === 'funcvar') {
        _options = ['label', 'field', 'type']
        _options = ['label', 'field', 'type', 'blacklist']
      } else if (value === 'linkMain') {
        _options = ['label', 'field', 'type', 'readonly', 'required', 'hidden', 'fieldlength']
        _options = ['label', 'field', 'type', 'readonly', 'required', 'hidden', 'fieldlength', 'blacklist']
      }
      if (value !== 'funcvar' && value !== 'linkMain') {
@@ -267,7 +267,7 @@
    const { openType } = this.state
    let value = e.target.value
    if (key === 'resourceType') {
      let _options = ['label', 'field', 'initval', 'type', 'resourceType', 'readonly', 'required', 'hidden', 'readin']
      let _options = ['label', 'field', 'initval', 'type', 'resourceType', 'readonly', 'required', 'hidden', 'readin', 'blacklist']
      if (value === '0') {
        _options = [..._options, 'options', 'quick']
      } else if (value === '1') {
src/views/login/index.jsx
@@ -13,7 +13,7 @@
import './index.scss'
const LoginForm = asyncComponent(() => import('./loginform'))
const Action = asyncComponent(() => import('@/tabviews/tableshare/actionList'))
// const Action = asyncComponent(() => import('@/tabviews/tableshare/actionList'))
const iszhCN = !localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN'
class Login extends Component {
@@ -57,9 +57,6 @@
  async loginsubmit (param) {
    // 登录提交
    // let password = this.md5Password(param.password)
    // let result = await Api.loginsystem(param.username, param.password)
    // if (!result.IsError) {
    let res = await Api.getusermsg(param.username, param.password)
    if (res.status) {
      sessionStorage.setItem('UserID', res.UserID)
@@ -90,12 +87,6 @@
        isDisabled: false
      })
    }
    // } else {
    //   message.warning(result.Message)
    //   this.setState({
    //     isDisabled: false
    //   })
    // }
  }
  componentDidMount () {
@@ -164,7 +155,7 @@
          }
          <p dangerouslySetInnerHTML={{ __html: this.state.ICP.replace(/\s/ig, '&nbsp;') }}></p>
        </div>
        {this.state.loaded ? <div style={{position: 'fixed', bottom: '-1000px'}}><Action setting={{}} actions={[]} /></div> : null }
        {/* {this.state.loaded ? <div style={{position: 'fixed', bottom: '-1000px'}}><Action setting={{}} actions={[]} /></div> : null } */}
      </div>
    )
  }
src/views/printTemplate/index.jsx
@@ -430,12 +430,18 @@
          _fields.push({
            value: item.FieldName,
            text: item.FieldDec,
            text: item.FieldDec + '(' + item.FieldName + ')',
            type: item.FieldType
          })
        }
      })
      _fields.push({
        value: 'other_field',
        text: '其他',
        type: ''
      })
      this.setState({
        fields: _fields
      })
src/views/printTemplate/mutilform/index.jsx
@@ -16,16 +16,53 @@
    formlist: PropTypes.array     // input回车提交
  }
  state = {
    formlist: null,
    type: 'box'
  }
  UNSAFE_componentWillMount () {
    this.setState({
      formlist: this.props.formlist
    })
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (!is(fromJS(this.props.editItem), fromJS(nextProps.editItem))) {
      this.setState({}, () => {
        let fieldsvalue = {}
        let isCusField = false
        let type = 'box'
        nextProps.formlist.forEach(item => {
          if (item.type === 'title') {
            type = item.class
          }
          if (!item.key) return
          if (item.key === 'field' && item.initval === 'other_field') {
            isCusField = true
          }
          fieldsvalue[item.key] = item.initval
        })
        this.props.form.setFieldsValue(fieldsvalue)
        this.setState({
          type: type,
          formlist: nextProps.formlist.map(item => {
            if (item.key === 'cusfield' && isCusField) {
              item.hidden = false
            }
            return item
          })
        }, () => {
          if (!isCusField) {
            delete fieldsvalue.cusfield
          }
          this.props.form.setFieldsValue(fieldsvalue)
        })
      })
    }
  }
@@ -38,6 +75,28 @@
        width: option.width,
        height: option.height
      })
    } else if (item.key === 'field') {
      if (value === 'other_field') {
        this.setState({
          formlist: this.state.formlist.map(item => {
            if (item.key === 'cusfield') {
              item.hidden = false
            }
            return item
          })
        })
      } else {
        this.setState({
          formlist: this.state.formlist.map(item => {
            if (item.key === 'cusfield') {
              item.hidden = true
            }
            return item
          })
        })
      }
    }
    this.handleSubmit()
  }
@@ -48,14 +107,20 @@
    delete _param.uuid
    delete _param.url
    if (_param.field !== 'other_field') {
      delete _param.cusfield
    }
    this.props.form.setFieldsValue(_param)
  }
  getFields() {
    const { getFieldDecorator } = this.props.form
    const { type, formlist } = this.state
    const fields = []
    this.props.formlist.forEach((item, index) => {
    formlist.forEach((item, index) => {
      if (item.hidden) return
      
      if (item.type === 'title') {
        fields.push(
@@ -67,23 +132,11 @@
        )
      } else if (item.type === 'text') {
        let _rules = []
        if (item.regular) {
          if (item.regular === 'number') {
            _rules = [{
              pattern: /^[0-9]*$/ig,
              message: formRule.input.numbermsg
            }]
          } else if (item.regular === 'letter') {
            _rules = [{
              pattern: /^[a-zA-Z]*$/ig,
              message: formRule.input.lettermsg
            }]
          } else if (item.regular === 'letter&number') {
            _rules = [{
              pattern: /^[a-zA-Z0-9]*$/ig,
              message: formRule.input.letternummsg
            }]
          }
        if (item.key === 'value' && type === 'barcode') {
          _rules = [{
            pattern: /^[a-zA-Z0-9]*$/ig,
            message: '条码值必须为数字或字母!'
          }]
        }
        fields.push(
          <Col span={24} key={index}>
@@ -93,7 +146,7 @@
                rules: [
                  {
                    required: !!item.required,
                    message: '请输入' + item.label + '!'
                    message: '请输入' + item.label + '字段!'
                  },
                  {
                    max: 512,
src/views/printTemplate/option.js
@@ -288,6 +288,7 @@
    item.align = 'left'
    item.vertialAlign = 'top'
  } else if (type === 'barcode') {
    item.value = ''
    item.url = url
    item.barcodeType = 'code128'
    item.barcodeWidth = Math.floor(width * 0.6)
@@ -295,6 +296,7 @@
    item.barcodeLabel = 'true'
    item.fontSize = Math.floor(12 * (boxwidth / 210))
  } else if (type === 'qrcode') {
    item.value = ''
    item.url = url
    item.qrcodeType = 'qrcode'
    item.qrcodeWidth = Math.floor(height * 0.6)
@@ -313,6 +315,7 @@
      type: 'title',
      label: '类型',
      initval: '文本',
      class: 'text',
      required: false
    },
    {
@@ -336,6 +339,14 @@
      initval: item.field || '',
      required: false,
      options: fields
    },
    {
      type: 'text',
      key: 'cusfield',
      label: '自定义',
      initval: item.cusfield || '',
      required: true,
      hidden: true
    },
    {
      type: 'number',
@@ -466,6 +477,7 @@
      type: 'title',
      label: '类型',
      initval: '条形码',
      class: 'barcode',
      required: false
    },
    {
@@ -476,12 +488,27 @@
      required: false
    },
    {
      type: 'text',
      key: 'value',
      label: '内容',
      initval: item.value || '',
      required: false
    },
    {
      type: 'select',
      key: 'field',
      label: '关联字段',
      initval: item.field,
      required: true,
      required: false,
      options: fields
    },
    {
      type: 'text',
      key: 'cusfield',
      label: '自定义',
      initval: item.cusfield || '',
      required: true,
      hidden: true
    },
    {
      type: 'number',
@@ -612,6 +639,7 @@
      type: 'title',
      label: '类型',
      initval: '二维码',
      class: 'qrcode',
      required: false
    },
    {
@@ -622,12 +650,27 @@
      required: false
    },
    {
      type: 'text',
      key: 'value',
      label: '内容',
      initval: item.value || '',
      required: false
    },
    {
      type: 'select',
      key: 'field',
      label: '关联字段',
      initval: item.field,
      required: true,
      required: false,
      options: fields
    },
    {
      type: 'text',
      key: 'cusfield',
      label: '自定义',
      initval: item.cusfield || '',
      required: true,
      hidden: true
    },
    {
      type: 'number',
@@ -734,6 +777,7 @@
      type: 'title',
      label: '类型',
      initval: '图片',
      class: 'image',
      required: false
    },
    {