king
2020-06-23 c83a50317baeba1a4771e4d802eee029ed2b7e31
2020-06-23
25个文件已修改
340 ■■■■■ 已修改文件
src/components/sidemenu/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/index.scss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/en-US/model.js 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/model.js 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/cardcomponent/index.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/normalTable/index.jsx 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/source.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/dragaction/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/uniqueform/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/cardcomponent/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/colspanform/index.jsx 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/columnform/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/gridbtnform/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/fieldscomponent/editcard/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/searchform/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/source.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/editcard/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/index.jsx
@@ -287,7 +287,7 @@
    const editShow = (this.props.editState && !this.props.editLevel) || false
    return (
      <aside className={"side-menu ant-menu-dark" + (this.props.collapse ? ' side-menu-collapsed' : '') + (this.props.isiframe ? ' iframe' : '')}>
      <aside className={"side-menu ant-menu-dark" + (this.props.collapse ? ' side-menu-collapsed' : '') + (this.props.isiframe ? ' iframe' : '') + (this.props.editState ? ' edit' : '')}>
        {!(this.props.editLevel === 'level2' || this.props.editLevel === 'level3') &&
          <Menu openKeys={this.state.openKeys} onOpenChange={this.onOpenChange} mode="inline" theme="dark" inlineCollapsed={this.props.collapse}>
          {editShow && <li className="sup-menu"><Icon onClick={this.enterSubEdit} className="edit-check" type="edit" /></li>}
src/components/sidemenu/index.scss
@@ -88,6 +88,16 @@
    left: 187px;
  }
}
.side-menu.edit { // 编辑时控制菜单底色
  .ant-menu-sub.ant-menu-inline {
    > .ant-menu-item.ant-menu-item-selected {
      background: unset;
    }
    > .ant-menu-item.ant-menu-item-active {
      background: unset;
    }
  }
}
.side-menu.iframe { // tab页中为iframe时
  max-height: 100vh;
  overflow-y: scroll;
src/locales/en-US/model.js
@@ -13,6 +13,10 @@
  'header.reset': 'Reset',
  'model.enable': 'Enable',
  'model.disable': 'Disable',
  'model.required': 'Required',
  'model.hidden': 'Hidden',
  'model.length': 'Length',
  'model.sort': 'Sort',
  'model.switch.open': 'Open',
  'model.switch.close': 'Close',
  'model.menu.level1': 'Level 1 menu',
@@ -70,10 +74,9 @@
  'header.form.column.itemUnit': 'Item',
  'header.form.column.itemsUnit': 'Items',
  'model.form.column.action': 'Action',
  'header.form.name': 'Name',
  'model.form.name': 'Name',
  'header.form.title': 'Title',
  'header.form.field': 'Field',
  'header.form.field.placeholder': 'Please enter a field name',
  'model.form.field': 'Field',
  'header.form.innerFunc': 'Internal func',
  'header.form.outerFunc': 'External function',
  'header.form.callbackFunc': 'Callback function',
@@ -150,14 +153,12 @@
  'header.form.blank': '当前页跳转',
  'model.form.prompt': 'Prompt',
  'model.form.exec': 'Direct execution',
  'header.form.icon': '图标',
  'header.form.class': '颜色',
  'header.form.align': '对齐方式',
  'header.form.alignLeft': '左对齐',
  'header.form.alignRight': '右对齐',
  'header.form.alignCenter': '居中',
  'header.form.Hide': '是否隐藏',
  'header.form.IsSort': '是否排序',
  'model.form.paramJoint': 'Joint param',
  'model.form.icon': 'Icon',
  'model.form.align': 'Alignment',
  'model.form.alignLeft': 'The left',
  'model.form.alignRight': 'The Right',
  'model.form.alignCenter': 'The center',
  'header.form.columnWidth': '列宽',
  'header.form.true': '是',
  'header.form.false': '否',
@@ -188,7 +189,7 @@
  'header.form.dropdown': '下拉菜单',
  'header.form.button': '按钮',
  'header.form.style': '风格',
  'header.form.color': '颜色',
  'model.form.color': 'Color',
  'header.form.order': '排列',
  'header.form.horizontal': '横向',
  'header.form.vertical': '纵向',
@@ -198,15 +199,12 @@
  'model.form.selectItem.error': '下拉选项设置错误!',
  'header.form.request.method': '请求方式',
  'header.form.readonly': '是否只读',
  'header.form.field.required': '是否必填',
  'header.form.field.ishidden': '是否隐藏',
  'header.form.queryType': '查询类型',
  'header.form.query': '查询',
  'header.form.statistics': '统计',
  'header.form.database': '数据库',
  'header.form.database.local': '本地',
  'header.form.database.sso': '系统',
  'header.form.field.length': '字段长度',
  'header.form.linkMain': '关联主表',
  'header.form.query.delete': '确定删除吗?',
  'header.form.up': '上移',
src/locales/zh-CN/model.js
@@ -13,6 +13,10 @@
  'header.reset': '重置',
  'model.enable': '启',
  'model.disable': '停',
  'model.required': '必填',
  'model.hidden': '隐藏',
  'model.length': '长度',
  'model.sort': '排序',
  'model.switch.open': '开',
  'model.switch.close': '关',
  'model.menu.level1': '一级菜单',
@@ -70,10 +74,9 @@
  'header.form.column.itemUnit': '项',
  'header.form.column.itemsUnit': '项',
  'model.form.column.action': '操作',
  'header.form.name': '名称',
  'model.form.name': '名称',
  'header.form.title': '标题',
  'header.form.field': '字段',
  'header.form.field.placeholder': '请输入字段名',
  'model.form.field': '字段',
  'header.form.innerFunc': '内部函数',
  'header.form.outerFunc': '外部函数',
  'header.form.callbackFunc': '回调函数',
@@ -150,14 +153,12 @@
  'header.form.blank': '当前页跳转',
  'model.form.prompt': '提示框',
  'model.form.exec': '直接执行',
  'header.form.icon': '图标',
  'header.form.class': '颜色',
  'header.form.align': '对齐方式',
  'header.form.alignLeft': '左对齐',
  'header.form.alignRight': '右对齐',
  'header.form.alignCenter': '居中',
  'header.form.Hide': '是否隐藏',
  'header.form.IsSort': '是否排序',
  'model.form.paramJoint': '拼接参数',
  'model.form.icon': '图标',
  'model.form.align': '对齐方式',
  'model.form.alignLeft': '左对齐',
  'model.form.alignRight': '右对齐',
  'model.form.alignCenter': '居中',
  'header.form.columnWidth': '列宽',
  'header.form.true': '是',
  'header.form.false': '否',
@@ -188,7 +189,7 @@
  'header.form.dropdown': '下拉菜单',
  'header.form.button': '按钮',
  'header.form.style': '风格',
  'header.form.color': '颜色',
  'model.form.color': '颜色',
  'header.form.order': '排列',
  'header.form.horizontal': '横向',
  'header.form.vertical': '纵向',
@@ -198,15 +199,12 @@
  'model.form.selectItem.error': '下拉选项设置错误!',
  'header.form.request.method': '请求方式',
  'header.form.readonly': '是否只读',
  'header.form.field.required': '是否必填',
  'header.form.field.ishidden': '是否隐藏',
  'header.form.queryType': '查询类型',
  'header.form.query': '查询',
  'header.form.statistics': '统计',
  'header.form.database': '数据库',
  'header.form.database.local': '本地',
  'header.form.database.sso': '系统',
  'header.form.field.length': '字段长度',
  'header.form.linkMain': '关联主表',
  'header.form.query.delete': '确定删除吗?',
  'header.form.up': '上移',
src/tabviews/commontable/index.jsx
@@ -310,6 +310,8 @@
        if (col.field) {
          _arrField.push(col.field)
          _logcolumns.push(col)
          col.nameField && _arrField.push(col.nameField) // 链接名字段
        }
        if (col.type === 'colspan' && col.sublist) { // 筛选隐藏列
          _hideCol = _hideCol.concat(col.sublist)
src/tabviews/subtable/index.jsx
@@ -61,7 +61,7 @@
    pageIndex: 1,         // 页码
    pageSize: 10,         // 每页数据条数
    orderBy: '',          // 排序
    search: '',           // 搜索条件数组,使用时需分场景处理
    search: [],           // 搜索条件数组,使用时需分场景处理
    pickup: false,        // 子表数据隐藏显示切换
    triggerBtn: null,     // 按钮触发
    chartId: ''           // 展开图表ID
@@ -77,7 +77,9 @@
        selectedData: [],
        resetTable: !this.state.resetTable,
      }, () => {
        this.loadmaindata(nextProps.BID, 'refresh')
        if (this.state.setting) {
          this.loadmaindata(nextProps.BID, 'refresh')
        }
      })
    } else if (this.state.config && nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) {
      this.reloadtable()
@@ -90,9 +92,11 @@
        triggerBtn: trigger
      })
    } else if (!this.props.Tab.supMenu && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
      this.setState({}, () => {
        this.loadmaindata()
      })
      if (this.state.setting) {
        this.setState({}, () => {
          this.loadmaindata()
        })
      }
    }
  }
@@ -263,8 +267,9 @@
      config.columns.forEach(col => {
        if (col.field) {
          _arrField.push(col.field)
          _logcolumns.push(col)
          col.nameField && _arrField.push(col.nameField) // 链接名字段
        }
        if (col.type === 'colspan' && col.sublist) { // 筛选隐藏列
          _hideCol = _hideCol.concat(col.sublist)
@@ -778,7 +783,7 @@
  reloadview = () => {
    this.setState({ loadingview: true, viewlost: false, lostmsg: '', config: null, searchlist: null, actions: null,
      columns: null, arr_field: '', setting: null, data: null, total: 0, loading: false, pageIndex: 1, pageSize: 10,
      orderBy: '', search: '', triggerBtn: null
      orderBy: '', search: [], triggerBtn: null
    }, () => {
      this.loadconfig()
    })
src/tabviews/subtabtable/index.jsx
@@ -200,8 +200,9 @@
      config.columns.forEach(col => {
        if (col.field) {
          _arrField.push(col.field)
          _logcolumns.push(col)
          col.nameField && _arrField.push(col.nameField) // 链接名字段
        }
        if (col.type === 'colspan' && col.sublist) { // 筛选隐藏列
          _hideCol = _hideCol.concat(col.sublist)
src/tabviews/zshare/cardcomponent/index.jsx
@@ -383,6 +383,26 @@
          {content}
        </span>
      )
    } else if (col.type === 'link') {
      let content = col.nameField ? data[col.nameField] : ''
      let _href = data[col.field] || ''
      if (!content && _href) {
        content = _href
      } else if (!_href) {
        content = ''
      }
      if (col.joint === 'true' && _href) {
        let _param = window.btoa('id=' + data[this.props.setting.primaryKey] + '&userid=' + sessionStorage.getItem('UserID') + '&loginuid=' + sessionStorage.getItem('LoginUID'))
        _href += '?' + _param
      }
      return (
        <span>
          {_href ? <a href={_href} target="_blank" rel="noopener noreferrer">{content}</a> : null}
        </span>
      )
    }
  }
src/tabviews/zshare/normalTable/index.jsx
@@ -438,9 +438,38 @@
      return (
        <div>
          <div className="baseboard"></div>
          <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}>
            {content ? <Paragraph copyable ellipsis={{ rows: 3, expandable: true }}>{content}</Paragraph> : null }
          </div>
        </div>
      )
    } else if (item.type === 'link') {
      let content = ''
      let _href = record[item.field] || ''
      if (item.nameField && record.hasOwnProperty(item.nameField)) {
        content = record[item.nameField]
      }
      if (!content && _href) {
        content = _href
      } else if (!_href) {
        content = ''
      }
      if (item.joint === 'true' && _href) {
        let _param = window.btoa('id=' + record[this.props.setting.primaryKey] + '&userid=' + sessionStorage.getItem('UserID') + '&loginuid=' + sessionStorage.getItem('LoginUID'))
        _href += '?' + _param
      }
      if (item.blur) {
        content = md5(content)
      }
      return (
        <div>
          <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}>
            {content ? <a href={_href} target="_blank" rel="noopener noreferrer">{content}</a> : null }
          </div>
        </div>
      )
@@ -478,7 +507,7 @@
          }
    
          if (content !== '') {
            if (item.format === 'percent') {
            if (col.format === 'percent') {
              content = content * 100
            }
            
@@ -547,6 +576,28 @@
          }
          contents.push(content)
        } else if (col.type === 'link') {
          let content = col.nameField ? record[col.nameField] : ''
          let _href = record[col.field] || ''
          if (!content && _href) {
            content = _href
          } else if (!_href) {
            content = ''
          }
          if (col.joint === 'true' && _href) {
            let _param = window.btoa('id=' + record[this.props.setting.primaryKey] + '&userid=' + sessionStorage.getItem('UserID') + '&loginuid=' + sessionStorage.getItem('LoginUID'))
            _href += '?' + _param
          }
          if (item.blur) {
            content = md5(content)
          }
          content = _href ? <a href={_href} target="_blank" rel="noopener noreferrer">{content}</a> : null
          contents.push(content)
        } else {
          let content = record[col.field]
src/templates/comtableconfig/source.jsx
@@ -338,14 +338,14 @@
    },
    {
      type: 'columns',
      label: CommonDict['model.form.textarea'],
      subType: 'textarea',
      label: CommonDict['model.form.href'],
      subType: 'link',
      url: ''
    },
    {
      type: 'columns',
      label: CommonDict['model.form.href'],
      subType: 'link',
      label: CommonDict['model.form.textarea'],
      subType: 'textarea',
      url: ''
    },
    {
src/templates/sharecomponent/actioncomponent/dragaction/index.jsx
@@ -124,6 +124,7 @@
      if (item.subType === 'excelIn') {
        // 导入和导出excel,按钮名称直接为导入、导出
        newcard.label = item.label
        newcard.class = 'border-dgreen'
      } else if (item.subType === 'excelOut') {
        newcard.label = item.label
        newcard.intertype = setting.interType
@@ -131,6 +132,7 @@
        newcard.sysInterface = setting.sysInterface
        newcard.outerFunc = setting.outerFunc
        newcard.interface = setting.interface
        newcard.class = 'dgreen'
      }
      
      let targetId = cards.length > 0 ? cards[cards.length - 1].uuid : 0
src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
@@ -177,7 +177,7 @@
        fields = fields + ','
      }
      _value = `Insert into ${btn.sheet} (${fields}createuserid,createuser,createstaff,bid)\nSelect ${fields}@userid,@username,@fullname,@BID From @${btn.sheet}`
      _value = `Insert into ${btn.sheet} (${fields}createuserid,createuser,createstaff,bid)\nSelect ${fields}@userid@,@username,@fullname,@BID@ From @${btn.sheet}`
    } else {
      _value = value
    }
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -155,7 +155,17 @@
        title: '执行位置',
        dataIndex: 'position',
        width: '10%',
        render: (text, record) => record.position !== 'front' ? 'sql后' : 'sql前'
        render: (text, record) => {
          let _text = ''
          if (record.position === 'front') {
            _text = 'sql前'
          } else if (record.position === 'init') {
            _text = '初始化'
          } else {
            _text = 'sql后'
          }
          return _text
        }
      },
      {
        title: '状态',
src/templates/sharecomponent/actioncomponent/verifyexcelin/uniqueform/index.jsx
@@ -90,6 +90,7 @@
                <Select
                  mode="multiple"
                >
                  <Select.Option key="bid" value="BID">BID</Select.Option>
                  {fields.map(item => (
                    <Select.Option key={item.uuid} value={item.Column}>{item.Text}</Select.Option>
                  ))}
src/templates/sharecomponent/cardcomponent/index.jsx
@@ -81,7 +81,7 @@
      }
    }
    let _columns = config.columns.filter(col => ['text', 'number'].includes(col.type))
    let _columns = config.columns.filter(col => ['text', 'number', 'link'].includes(col.type))
    _columns = _columns.map(col => {
      return {
        uuid: col.uuid,
src/templates/sharecomponent/columncomponent/colspanform/index.jsx
@@ -77,13 +77,13 @@
      <Form {...formItemLayout} className="commontable-cospan-column-form" id="columncolspan">
        <Row gutter={24}>
          <Col span={12}>
            <Form.Item label={this.props.dict['header.form.name']}>
            <Form.Item label={this.props.dict['model.form.name']}>
              {getFieldDecorator('label', {
                initialValue: this.props.card.label,
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + this.props.dict['header.form.name'] + '!'
                    message: this.props.dict['form.required.input'] + this.props.dict['model.form.name'] + '!'
                  },
                  {
                    max: formRule.input.max,
@@ -107,22 +107,22 @@
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label={this.props.dict['header.form.align']}>
            <Form.Item label={this.props.dict['model.form.align']}>
              {getFieldDecorator('Align', {
                initialValue: this.props.card.Align,
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.select'] + this.props.dict['header.form.align'] + '!'
                    message: this.props.dict['form.required.select'] + this.props.dict['model.form.align'] + '!'
                  }
                ]
              })(
                <Select
                  getPopupContainer={() => document.getElementById('columncolspan')}
                >
                  <Select.Option value="left">{this.props.dict['header.form.alignLeft']}</Select.Option>
                  <Select.Option value="right">{this.props.dict['header.form.alignRight']}</Select.Option>
                  <Select.Option value="center">{this.props.dict['header.form.alignCenter']}</Select.Option>
                  <Select.Option value="left">{this.props.dict['model.form.alignLeft']}</Select.Option>
                  <Select.Option value="right">{this.props.dict['model.form.alignRight']}</Select.Option>
                  <Select.Option value="center">{this.props.dict['model.form.alignCenter']}</Select.Option>
                </Select>
              )}
            </Form.Item>
@@ -141,13 +141,13 @@
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label={this.props.dict['header.form.Hide']}>
            <Form.Item label={this.props.dict['model.hidden']}>
              {getFieldDecorator('Hide', {
                initialValue: this.props.card.Hide,
                initialValue: this.props.card.Hide || 'false',
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.select'] + this.props.dict['header.form.Hide'] + '!'
                    message: this.props.dict['form.required.select'] + this.props.dict['model.hidden'] + '!'
                  }
                ]
              })(
src/templates/sharecomponent/columncomponent/columnform/index.jsx
@@ -8,9 +8,10 @@
import './index.scss'
const columnTypeOptions = {
  text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'color', 'fieldlength', 'blacklist', 'linkmenu'],
  number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'color', 'blacklist', 'linkmenu'],
  textarea: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'color', 'fieldlength', 'blacklist'],
  text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'fieldlength', 'blacklist', 'linkmenu'],
  number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'linkmenu'],
  link: ['label', 'field', 'type', 'nameField', 'Align', 'Hide', 'IsSort', 'joint', 'Width', 'fieldlength', 'blacklist'],
  textarea: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'fieldlength', 'blacklist'],
  picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'scale', 'maxHeight']
}
@@ -101,7 +102,7 @@
      if (item.type === 'text') { // 文本搜索
        let rules = []
        if (item.key === 'field' || item.key === 'contrastField') {
        if (item.key === 'field' || item.key === 'nameField') {
          rules = [{
            pattern: formRule.field.pattern,
            message: formRule.field.message
src/templates/sharecomponent/columncomponent/gridbtnform/index.jsx
@@ -16,25 +16,25 @@
      {
        type: 'text',
        key: 'label',
        label: this.props.dict['header.form.name'],
        label: this.props.dict['model.form.name'],
        initVal: this.props.card.label,
        required: true
      },
      {
        type: 'select',
        key: 'Align',
        label: this.props.dict['header.form.align'],
        label: this.props.dict['model.form.align'],
        initVal: this.props.card.Align,
        required: true,
        options: [{
          MenuID: 'left',
          text: this.props.dict['header.form.alignLeft']
          text: this.props.dict['model.form.alignLeft']
        }, {
          MenuID: 'right',
          text: this.props.dict['header.form.alignRight']
          text: this.props.dict['model.form.alignRight']
        }, {
          MenuID: 'center',
          text: this.props.dict['header.form.alignCenter']
          text: this.props.dict['model.form.alignCenter']
        }]
      },
      {
src/templates/sharecomponent/fieldscomponent/editcard/index.jsx
@@ -53,8 +53,8 @@
      <div className={'ant-card ant-card-bordered ' + (card.selected ? 'selected' : '')} >
        <div className="base" onClick={this.changeSelect}>
          <Icon type="check" />
          <p title={card.field}>{this.props.dict['header.form.field']}: <span>{card.field}</span></p>
          <p title={card.label}>{this.props.dict['header.form.name']}: <span>{card.label}</span></p>
          <p title={card.field}>{this.props.dict['model.form.field']}: <span>{card.field}</span></p>
          <p title={card.label}>{this.props.dict['model.form.name']}: <span>{card.label}</span></p>
        </div>
        {type === 'search' ?
          <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected}>
@@ -122,13 +122,14 @@
  }
  render() {
    const { dict } = this.props
    const { dataSource, type, loading } = this.state
    return (
      <div className="common-modal-edit-card">
        <Row className="search-row">
          <Col span={8}>
            {!loading ? <Search placeholder={this.props.dict['header.form.field.placeholder']} onSearch={value => {this.setState({searchKey: value})}} enterButton /> : null}
            {!loading ? <Search placeholder={dict['form.required.input'] + dict['header.form.field']} onSearch={value => {this.setState({searchKey: value})}} enterButton /> : null}
          </Col>
          <Col span={8}>
            <Button onClick={this.reset}>
src/templates/sharecomponent/searchcomponent/searchform/index.jsx
@@ -162,7 +162,7 @@
        } else if (form.key === 'field' && type === 'text') {
          form.tooltip = this.state.textTooltip
        } else if (form.key === 'field' && type === 'group') {
          form.label = dict['header.form.type'] + dict['header.form.field']
          form.label = dict['header.form.type'] + dict['model.form.field']
        }
        form.hidden = !_options.includes(form.key)
        return form
@@ -243,11 +243,11 @@
            matchs = form.options
          } else if (form.key === 'field') {
            form.tooltip = ''
            form.label = dict['header.form.field']
            form.label = dict['model.form.field']
            if (value === 'text') {
              form.tooltip = this.state.textTooltip
            } else if (value === 'group') {
              form.label = dict['header.form.type'] + dict['header.form.field']
              form.label = dict['header.form.type'] + dict['model.form.field']
            }
          }
src/templates/subtableconfig/source.jsx
@@ -305,14 +305,14 @@
    },
    {
      type: 'columns',
      label: CommonDict['model.form.textarea'],
      subType: 'textarea',
      label: CommonDict['model.form.href'],
      subType: 'link',
      url: ''
    },
    {
      type: 'columns',
      label: CommonDict['model.form.href'],
      subType: 'link',
      label: CommonDict['model.form.textarea'],
      subType: 'textarea',
      url: ''
    },
    {
src/templates/zshare/editcard/index.jsx
@@ -53,8 +53,8 @@
      <div className={'ant-card ant-card-bordered ' + (card.selected ? 'selected' : '')} >
        <div className="base" onClick={this.changeSelect}>
          <Icon type="check" />
          <p title={card.field}>{this.props.dict['header.form.field']}: <span>{card.field}</span></p>
          <p title={card.label}>{this.props.dict['header.form.name']}: <span>{card.label}</span></p>
          <p title={card.field}>{this.props.dict['model.form.field']}: <span>{card.field}</span></p>
          <p title={card.label}>{this.props.dict['model.form.name']}: <span>{card.label}</span></p>
        </div>
        {type === 'search' ?
          <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected}>
@@ -122,13 +122,14 @@
  }
  render() {
    const { dict } = this.props
    const { dataSource, type, loading } = this.state
    return (
      <div className="common-modal-edit-card">
        <Row className="search-row">
          <Col span={8}>
            {!loading ? <Search placeholder={this.props.dict['header.form.field.placeholder']} onSearch={value => {this.setState({searchKey: value})}} enterButton /> : null}
            {!loading ? <Search placeholder={dict['form.required.input'] + dict['header.form.field']} onSearch={value => {this.setState({searchKey: value})}} enterButton /> : null}
          </Col>
          <Col span={8}>
            <Button onClick={this.reset}>
src/templates/zshare/formconfig.jsx
@@ -628,7 +628,7 @@
    {
      type: 'text',
      key: 'label',
      label: Formdict['header.form.name'],
      label: Formdict['model.form.name'],
      initVal: card.label || '',
      required: true,
      readonly: false
@@ -636,7 +636,7 @@
    {
      type: 'text',
      key: 'field',
      label: Formdict['header.form.field'],
      label: Formdict['model.form.field'],
      initVal: card.field || '',
      tooltipClass: 'middle',
      required: true,
@@ -860,7 +860,7 @@
    {
      type: 'radio',
      key: 'required',
      label: Formdict['header.form.field.required'],
      label: Formdict['model.required'],
      initVal: card.required || 'false',
      options: [{
        value: 'true',
@@ -1261,7 +1261,7 @@
    {
      type: 'select',
      key: 'icon',
      label: Formdict['header.form.icon'],
      label: Formdict['model.form.icon'],
      initVal: card.icon,
      required: false,
      options: []
@@ -1269,7 +1269,7 @@
    {
      type: 'select',
      key: 'class',
      label: Formdict['header.form.class'],
      label: Formdict['model.form.color'],
      initVal: card.class,
      required: false,
      options: []
@@ -1323,14 +1323,14 @@
    {
      type: 'text',
      key: 'label',
      label: Formdict['header.form.name'],
      label: Formdict['model.form.name'],
      initVal: card.label,
      required: true
    },
    {
      type: 'text',
      key: 'field',
      label: Formdict['header.form.field'],
      label: Formdict['model.form.field'],
      initVal: card.field,
      required: true,
      readonly: false
@@ -1351,9 +1351,20 @@
        value: 'picture',
        text: Formdict['model.form.picture']
      }, {
        value: 'link',
        text: Formdict['model.form.href']
      }, {
        value: 'textarea',
        text: Formdict['model.form.textarea']
      }]
    },
    {
      type: 'text',
      key: 'nameField',
      label: Formdict['model.form.name'] + Formdict['model.form.field'],
      initVal: card.nameField,
      required: false,
      readonly: false
    },
    {
      type: 'number',
@@ -1367,8 +1378,22 @@
    },
    {
      type: 'radio',
      key: 'joint',
      label: Formdict['model.form.paramJoint'],
      initVal: card.joint || 'true',
      required: true,
      options: [{
        value: 'true',
        text: Formdict['header.form.true']
      }, {
        value: 'false',
        text: Formdict['header.form.false']
      }]
    },
    {
      type: 'radio',
      key: 'Hide',
      label: Formdict['header.form.Hide'],
      label: Formdict['model.hidden'],
      initVal: card.Hide || 'false',
      required: true,
      options: [{
@@ -1382,7 +1407,7 @@
    {
      type: 'radio',
      key: 'IsSort',
      label: Formdict['header.form.IsSort'],
      label: Formdict['model.sort'],
      initVal: card.IsSort || 'true',
      required: true,
      options: [{
@@ -1396,18 +1421,18 @@
    {
      type: 'radio',
      key: 'Align',
      label: Formdict['header.form.align'],
      label: Formdict['model.form.align'],
      initVal: card.Align || 'left',
      required: true,
      options: [{
        value: 'left',
        text: Formdict['header.form.alignLeft']
        text: Formdict['model.form.alignLeft']
      }, {
        value: 'center',
        text: Formdict['header.form.alignCenter']
        text: Formdict['model.form.alignCenter']
      }, {
        value: 'right',
        text: Formdict['header.form.alignRight']
        text: Formdict['model.form.alignRight']
      }]
    },
    {
@@ -1440,7 +1465,7 @@
    {
      type: 'number',
      key: 'fieldlength',
      label: Formdict['header.form.field.length'],
      label: Formdict['model.form.field'] + Formdict['model.length'],
      initVal: card.fieldlength || (card.type === 'text' ? 50 : 512),
      required: true
    },
@@ -1564,7 +1589,7 @@
    {
      type: 'radio',
      key: 'Hide',
      label: Formdict['header.form.Hide'],
      label: Formdict['model.hidden'],
      initVal: card.Hide,
      required: true,
      options: [{
@@ -2002,7 +2027,7 @@
    {
      type: 'text',
      key: 'label',
      label: Formdict['header.form.name'],
      label: Formdict['model.form.name'],
      initVal: card.label,
      required: true,
      readonly: false
@@ -2010,7 +2035,7 @@
    {
      type: 'text',
      key: 'field',
      label: Formdict['header.form.field'],
      label: Formdict['model.form.field'],
      initVal: card.field || '',
      required: true,
      readonly: false
@@ -2177,7 +2202,7 @@
    {
      type: 'number',
      key: 'fieldlength',
      label: Formdict['header.form.field.length'],
      label: Formdict['model.form.field'] + Formdict['model.length'],
      tooltip: '文本、下拉框、日期等字段默认长度为50,多行文本与文件上传字段默认长度为512',
      initVal: card.fieldlength || _fieldlength,
      required: false
@@ -2281,7 +2306,7 @@
    {
      type: 'radio',
      key: 'required',
      label: Formdict['header.form.field.required'],
      label: Formdict['model.required'],
      initVal: card.required || 'true',
      options: [{
        value: 'true',
@@ -2294,7 +2319,7 @@
    {
      type: 'radio',
      key: 'hidden',
      label: Formdict['header.form.field.ishidden'],
      label: Formdict['model.required'],
      initVal: card.hidden || 'false',
      options: [{
        value: 'true',
src/templates/zshare/verifycard/index.jsx
@@ -518,7 +518,7 @@
        }
      })
      if (columns && columns.length > 0 && this.props.btnTab.Ot !== 'notRequired') {
      if (columns && columns.length > 0 && this.props.btnTab.Ot !== 'notRequired' && this.props.btnTab.Ot !== 'requiredOnce') {
        columns.forEach(_f => {
          if (!_f.field || fieldArr.includes(_f.field.toLowerCase())) return
@@ -757,7 +757,7 @@
            })
          }
          if (columns && columns.length > 0 && this.props.card.Ot !== 'notRequired') {
          if (columns && columns.length > 0 && this.props.card.Ot !== 'notRequired' && this.props.card.Ot !== 'requiredOnce') {
            columns.forEach(_f => {
              if (!_f.field || fieldArr.includes(_f.field.toLowerCase())) return
@@ -901,7 +901,7 @@
      let _select = ['@UserName=\'\'', '@FullName=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\'']
      let fieldArr = _usefulfields.map(_f => _f.toLowerCase())
      if (columns && columns.length > 0 && this.props.card.Ot !== 'notRequired') {
      if (columns && columns.length > 0 && this.props.card.Ot !== 'notRequired' && this.props.card.Ot !== 'requiredOnce') {
        columns.forEach(_f => {
          if (!_f.field || fieldArr.includes(_f.field.toLowerCase())) return
@@ -949,7 +949,7 @@
        _defaultsql = `update ${this.props.card.sql} set deleted=1,modifydate=getdate(),modifyuserid=@userid@ where ${config.setting.primaryKey}=@ID@;`
      } else if (this.props.card.sqlType === 'delete') {
        let _msg = ''
        if (columns && columns.length > 0 && this.props.card.Ot !== 'notRequired') {
        if (columns && columns.length > 0 && this.props.card.Ot !== 'notRequired' && this.props.card.Ot !== 'requiredOnce') {
          let _index = 0
          columns.forEach(col => {
            if (col.field && col.Hide !== 'true' && _index < 4) {
src/utils/utils.js
@@ -1162,16 +1162,16 @@
      let datasource = setting.dataresource
      if (/\s/.test(datasource)) { // 拼接别名
        datasource = '(' + datasource + ') tb'
      } else {
        datasource = datasource + ' tb'
      }
      verify.uniques.forEach(item => {
        let _primaryKey = item.field.split(',').includes(primaryKey) ? '' : ',' + primaryKey
        _sql += `
        /* 同类数据验证 */
        Set @tbid=''
        Select top 1 @tbid='X' from (select ${item.field}${_primaryKey},1 as n from ${datasource} ) tb  inner join (select ID from  dbo.SplitComma(@ID@)) sp on tb.${primaryKey}=sp.ID group by ${item.field} having sum(n)>1
        Select top 1 @tbid='X' from (select distinct ${item.field},1 as n from ${datasource} inner join (select ID from  dbo.SplitComma(@ID@)) sp on tb.${primaryKey}=sp.ID ) a group by ${item.field} having sum(n)>1
        
        If @tbid!=''
        Begin