king
2020-03-20 bc4ee6130db80f8f2020bb3bb7248b6e55ae90cc
2020-03-20
17个文件已修改
601 ■■■■ 已修改文件
src/components/sidemenu/editthdmenu/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/actionList/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/index.jsx 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/normalTable/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/index.jsx 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/index.scss 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.jsx 103 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/dragelement/card.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/searchform/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/searchform/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/editthdmenu/index.jsx
@@ -260,7 +260,8 @@
          supMenuList: this.props.supMenuList,
          roleList: this.state.roleList,
          fstMenuId: this.state.fstMenuId,
          fstMenuList: this.state.fstMenuList
          fstMenuList: this.state.fstMenuList,
          menuSort: (this.props.menulist.length + 1) * 10 // 新建菜单设置排序
        }
      }, () => {
        document.getElementById('root').style.overflowY = 'hidden'
src/tabviews/commontable/index.jsx
@@ -143,7 +143,7 @@
      })
      config.columns = config.columns.filter(col => {
        if (!col.field || !col.blacklist || col.blacklist.length === 0) return true
        if (!col.field || !col.blacklist || col.blacklist.length === 0 || config.setting.primaryKey === col.field) return true
        let _black = col.blacklist.filter(v => {
          return this.props.permRoles.indexOf(v) !== -1
@@ -235,6 +235,13 @@
        }
      })
      let valid = true // 搜索条件必填验证
      config.search.forEach(field => {
        if (field.required === 'true' && !field.initval) {
          valid = false
        }
      })
      this.setState({
        loadingview: false,
        config: config,
@@ -247,10 +254,7 @@
        search: Utils.initMainSearch(config.search) // 搜索条件初始化(含有时间格式,需要转化)
      }, () => {
        this.improveSearch()
        if (config.setting.onload !== 'false') { // 初始化可加载
          this.setState({
            loading: true
          })
        if (config.setting.onload !== 'false' && valid) { // 初始化可加载
          this.loadmaindata()
        }
        this.setShortcut()
@@ -389,18 +393,29 @@
   * @description 主表数据加载
   */ 
  async loadmaindata () {
    const { setting, BIDs } = this.state
    const { setting, BIDs, search } = this.state
    let param = ''
    let requireFields = search.filter(item => item.required && !item.value)
    if (requireFields.length > 0) {
      notification.warning({
        top: 92,
        message: this.state.dict['form.required.input'] + requireFields.map(item => item.label).join('、') + ' !',
        duration: 3
      })
      return
    }
    this.setState({
      loading: true
    })
    if (setting.interType !== 'inner' || (setting.interType === 'inner' && setting.innerFunc)) {
      param = this.getCustomParam()
    } else {
      param = this.getDefaultParam()
    }
    this.setState({
      pickup: false
    })
    this.handleTableId('mainTable', '', '')
@@ -417,6 +432,7 @@
        }),
        total: result.total,
        loading: false,
        pickup: false,
        BIDs: {
          ...BIDs,
          mainTable: ''
@@ -547,7 +563,6 @@
    if (setting.onload === 'false') {
      this.setState({
        loading: true,
        pageIndex: 1,
        search: searches,
        setting: {...setting, onload: 'true'}
@@ -558,7 +573,6 @@
      this.refs.mainTable.resetTable()
      this.setState({
        loading: true,
        pageIndex: 1,
        search: searches
      }, () => {
@@ -580,7 +594,6 @@
    }
    this.setState({
      loading: true,
      pageIndex: pagination.current,
      pageSize: pagination.pageSize,
      orderBy: (sorter.field && sorter.order) ? `${sorter.field} ${sorter.order}` : ''
@@ -595,7 +608,6 @@
  reloadtable = () => {
    this.refs.mainTable.resetTable()
    this.setState({
      loading: true,
      pageIndex: 1
    }, () => {
      this.loadmaindata()
@@ -969,6 +981,7 @@
          {loadingview && <Spin size="large" />}
          {searchlist && searchlist.length > 0 ?
            <MainSearch
              ref="mainSearch"
              dict={this.state.dict}
              searchlist={searchlist}
              refreshdata={this.refreshbysearch}
src/tabviews/formtab/actionList/index.jsx
@@ -186,15 +186,15 @@
  
        if (this.props.menuType === 'HS') {
          if (btn.sysInterface === 'true' && options.cloudServiceApi) {
            param.rduri = options.cloudServiceApi
            res.rduri = options.cloudServiceApi
          } else if (btn.sysInterface !== 'true') {
            param.rduri = btn.interface
            res.rduri = btn.interface
          }
        } else {
          if (btn.sysInterface === 'true') {
            param.rduri = window.GLOB.mainSystemApi || window.GLOB.subSystemApi
            res.rduri = window.GLOB.mainSystemApi || window.GLOB.subSystemApi
          } else {
            param.rduri = btn.interface
            res.rduri = btn.interface
          }
        }
src/tabviews/subtable/index.jsx
@@ -139,7 +139,7 @@
        })
  
        config.columns = config.columns.filter(col => {
          if (!col.field || !col.blacklist || col.blacklist.length === 0) return true
          if (!col.field || !col.blacklist || col.blacklist.length === 0 || config.setting.primaryKey === col.field) return true
  
          let _black = col.blacklist.filter(v => {
            return this.props.permRoles.indexOf(v) !== -1
@@ -209,6 +209,13 @@
        })
      }
      let valid = true // 搜索条件必填验证
      config.search.forEach(field => {
        if (field.required === 'true' && !field.initval) {
          valid = false
        }
      })
      this.setState({
        loadingview: false,
        config: config,
@@ -222,10 +229,7 @@
      }, () => {
        this.improveSearch()
        if (config.setting.onload !== 'false' && (!Tab.supMenu || BID)) { // 初始化可加载
          this.setState({
            loading: true
          })
        if (config.setting.onload !== 'false' && (!Tab.supMenu || BID) && valid) { // 初始化可加载
          this.loadmaindata()
        }
      })
@@ -335,9 +339,24 @@
   * @description 子表数据加载
   */
  async loadmaindata (bid, type) {
    const { setting } = this.state
    const { setting, search } = this.state
    let param = ''
    let _BID = this.props.BID
    let requireFields = search.filter(item => item.required && !item.value)
    if (requireFields.length > 0) {
      notification.warning({
        top: 92,
        message: this.state.dict['form.required.input'] + requireFields.map(item => item.label).join('、') + ' !',
        duration: 3
      })
      return
    }
    this.setState({
      loading: true
    })
    
    if (type === 'refresh') {
      _BID = bid
@@ -495,7 +514,6 @@
    this.refs.subTable.resetTable()
    this.setState({
      loading: true,
      pageIndex: 1,
      search: searches
    }, () => {
@@ -516,7 +534,6 @@
    }
    this.setState({
      loading: true,
      pageIndex: pagination.current,
      pageSize: pagination.pageSize,
      orderBy: (sorter.field && sorter.order) ? `${sorter.field} ${sorter.order}` : ''
@@ -531,7 +548,6 @@
  reloadtable = () => {
    this.refs.subTable.resetTable()
    this.setState({
      loading: true,
      pageIndex: 1
    }, () => {
      this.loadmaindata()
src/tabviews/subtabtable/index.jsx
@@ -118,7 +118,7 @@
        })
  
        config.columns = config.columns.filter(col => {
          if (!col.field || !col.blacklist || col.blacklist.length === 0) return true
          if (!col.field || !col.blacklist || col.blacklist.length === 0 || config.setting.primaryKey === col.field) return true
  
          let _black = col.blacklist.filter(v => {
            return this.props.permRoles.indexOf(v) !== -1
@@ -188,6 +188,13 @@
        })
      }
      let valid = true // 搜索条件必填验证
      config.search.forEach(field => {
        if (field.required === 'true' && !field.initval) {
          valid = false
        }
      })
      this.setState({
        loadingview: false,
        config: config,
@@ -197,11 +204,13 @@
        columns: _columns,
        logcolumns: _logcolumns,
        arr_field: _arrField.join(','),
        search: Utils.initMainSearch(config.search), // 搜索条件初始化(含有时间格式,需要转化)
        loading: true
        search: Utils.initMainSearch(config.search) // 搜索条件初始化(含有时间格式,需要转化)
      }, () => {
        this.improveSearch()
        if (config.setting.onload !== 'false' && valid) { // 初始化可加载
        this.loadmaindata()
        }
      })
    } else {
      this.setState({
@@ -302,8 +311,23 @@
   * @description 子表数据加载
   */
  async loadmaindata () {
    const { setting } = this.state
    const { setting, search } = this.state
    let param = ''
    let requireFields = search.filter(item => item.required && !item.value)
    if (requireFields.length > 0) {
      notification.warning({
        top: 92,
        message: this.state.dict['form.required.input'] + requireFields.map(item => item.label).join('、') + ' !',
        duration: 3
      })
      return
    }
    this.setState({
      loading: true
    })
    if (setting.interType !== 'inner' || (setting.interType === 'inner' && setting.innerFunc)) {
      param = this.getCustomParam()
@@ -444,7 +468,6 @@
    this.refs.subTable.resetTable()
    this.setState({
      loading: true,
      pageIndex: 1,
      search: searches
    }, () => {
@@ -465,7 +488,6 @@
    }
    this.setState({
      loading: true,
      pageIndex: pagination.current,
      pageSize: pagination.pageSize,
      orderBy: (sorter.field && sorter.order) ? `${sorter.field} ${sorter.order}` : ''
@@ -480,7 +502,6 @@
  reloadtable = () => {
    this.refs.subTable.resetTable()
    this.setState({
      loading: true,
      pageIndex: 1
    }, () => {
      this.loadmaindata()
src/tabviews/zshare/actionList/index.jsx
@@ -332,7 +332,7 @@
              status: false
            }
          } else {
            _temps[res.tempId] = _temp.config
            _temps[res.tempId] = _temp
          }
        } else if (!errorMsg) {
          errorMsg = res
@@ -567,9 +567,11 @@
  }
  getPrintConfigParam = (res) => {
    let error = ''
    let configParam = ''
    let _configparam = ''
    let error = ''         // 错误信息
    let configParam = ''   // 模板配置信息
    let _configparam = ''  // 打印配置信息
    let fields = []        // 模板中所需字段
    let nonEFields = []    // 非空字段
    if (!res.ConfigParam) {
      error = '未获取到打印模板信息!'
@@ -583,6 +585,7 @@
      if (!configParam) {
        error = '打印模板解析错误!'
      } else {
        let control = configParam.elements.map(element => {
          let _field = element.field
@@ -640,6 +643,15 @@
            item.BarcodeHeight = element.qrcodeWidth
            item.BarcodeLabel = false
          }
          if (item.Field) {
            fields.push(item.Field)
            // 条码二维码字段不可为空
            if (item.Type === 'qrcode' || item.Type === 'barcode') {
              nonEFields.push(item.Field)
            }
          }
          return item
        })
  
@@ -670,25 +682,54 @@
    return {
      error: error,
      config: _configparam
      config: _configparam,
      fields: fields,
      nonEFields: nonEFields
    }
  }
  execPrint = (item, list, template) => {
    let _documents = []
    let _errors = []
    Object.keys(template).forEach(key => {
      let _data = list.filter(cell => cell.TemplateID === key)
      if (_data.length > 0) {
        let _fields = Array.from(new Set(template[key].fields))
        let _nonEFields = Array.from(new Set(template[key].nonEFields))
        let lacks = []
        let emptys = []
        _data.forEach(d => {
          _fields.forEach(f => {
            if (!d.hasOwnProperty(f)) {
              lacks.push(f)
            } else if (_nonEFields.includes(f) && !d[f] && d[f] !== 0) {
              emptys.push(f)
            }
          })
        })
        let _cell = {
          documentID: Utils.getuuid(),
          contents: [
            {
              data: _data,
              templateURL: JSON.stringify(template[key])
              templateURL: JSON.stringify(template[key].config)
            }
          ]
        }
        if (lacks.length > 0 || emptys.length > 0) {
          lacks = Array.from(new Set(lacks))
          emptys = Array.from(new Set(emptys))
          _errors.push({
            title: template[key].config.Title,
            lacks: lacks,
            emptys: emptys
          })
        }
        _documents.push(_cell)
@@ -715,6 +756,34 @@
      })
      this.setState({loadingUuid: ''})
      return
    } else if (_errors.length > 0) {
      let lackerror = []
      let emptyerror = []
      _errors.forEach(err => {
        if (err.lacks.length > 0) {
          lackerror.push(`数据中未获取到模板(${err.title})${err.lacks.join('、')} 字段`)
        }
        if (err.emptys.length > 0) {
          emptyerror.push(`数据中模板(${err.title}) ${err.emptys.join('、')} 字段不可为空`)
        }
      })
      let msg = []
      if (lackerror.length > 0) {
        msg.push(lackerror.join(' ; '))
      }
      if (emptyerror.length > 0) {
        msg.push(emptyerror.join(' ; '))
      }
      notification.warning({
        top: 92,
        message: msg.join(' ; ') + ' !',
        duration: 10
      })
      this.setState({loadingUuid: ''})
      return
    }
    if (!socket || socket.readyState !== 1 || socket.url !== 'ws://' + item.verify.linkUrl) {
src/tabviews/zshare/normalTable/index.jsx
@@ -248,9 +248,7 @@
        <div className="content-fence">
          <div className="content-fence-top">
            {images.map((url, index) => {
              return (<img key={`${index}`} src={url} alt=""/>)
            })}
            {images.map((url, index) => {
              if (!url) return ''
              return (<img key={`${index}`} src={url} alt=""/>)
            })}
          </div>
@@ -266,6 +264,7 @@
        <div className="content-fence">
          <div className="content-fence-left">
            {images.map((url, index) => {
              if (!url) return ''
              return (<img key={`${index}`} src={url} alt=""/>)
            })}
          </div>
src/tabviews/zshare/topSearch/index.jsx
@@ -15,15 +15,19 @@
  state = {
    match: null,            // 搜索条件匹配规则
    style: null,
    searchlist: null,
    formId: Utils.getuuid()
    style: null,            // 搜索条件类型
    label: null,            // 提示文字
    required: null,         // 是否必填
    searchlist: null,       // 搜索项
    formId: Utils.getuuid() // 搜索表单Id
  }
  UNSAFE_componentWillMount () {
    let searchlist = JSON.parse(JSON.stringify(this.props.searchlist))
    let match = {}
    let label = {}
    let style = {}
    let required = {}
    let _list = []
    let fieldMap = new Map()
@@ -34,7 +38,9 @@
      fieldMap.set(item.field, true)
      match[item.field] = item.match
      label[item.field] = item.label
      style[item.field] = item.type
      required[item.field] = item.required === 'true'
      if (item.type === 'select' || item.type === 'link') {
        item.oriOptions = JSON.parse(JSON.stringify(item.options))
@@ -63,7 +69,9 @@
    this.setState({
      match: match,
      label: label,
      style: style,
      required: required,
      searchlist: _list
    })
  }
@@ -174,7 +182,15 @@
        fields.push(
          <Col span={item.ratio || 6} key={index}>
            <Form.Item label={item.label}>
              {getFieldDecorator(item.field, {initialValue: item.initval })(<Input placeholder="" autoComplete="off" />)}
              {getFieldDecorator(item.field, {
                initialValue: item.initval,
                rules: [
                  {
                    required: item.required === 'true',
                    message: this.props.dict['form.required.input'] + item.label + '!'
                  }
                ]
              })(<Input placeholder="" autoComplete="off" />)}
            </Form.Item>
          </Col>
        )
@@ -182,7 +198,15 @@
        fields.push(
          <Col span={item.ratio || 6} key={index}>
            <Form.Item label={item.label}>
              {getFieldDecorator(item.field, {initialValue: item.initval })(
              {getFieldDecorator(item.field, {
                initialValue: item.initval,
                rules: [
                  {
                    required: item.required === 'true',
                    message: this.props.dict['form.required.select'] + item.label + '!'
                  }
                ]
              })(
                <Select
                  showSearch
                  onChange={(value) => {this.selectChange(item, value)}}
@@ -202,11 +226,18 @@
        fields.push(
          <Col span={item.ratio || 6} key={index}>
            <Form.Item label={item.label}>
              {getFieldDecorator(item.field, {initialValue: _initval })(
              {getFieldDecorator(item.field, {
                initialValue: _initval,
                rules: [
                  {
                    required: item.required === 'true',
                    message: this.props.dict['form.required.select'] + item.label + '!'
                  }
                ]
              })(
                <Select
                  showSearch
                  mode="multiple"
                  // onChange={(value) => {this.selectChange(item, value)}}
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  getPopupContainer={() => document.getElementById(this.state.formId)}
                >
@@ -222,7 +253,15 @@
        fields.push(
          <Col span={item.ratio || 6} key={index}>
            <Form.Item label={item.label}>
              {getFieldDecorator(item.field, {initialValue: item.initval ? moment().subtract(item.initval, 'days') : null })(
              {getFieldDecorator(item.field, {
                initialValue: item.initval ? moment().subtract(item.initval, 'days') : null,
                rules: [
                  {
                    required: item.required === 'true',
                    message: this.props.dict['form.required.select'] + item.label + '!'
                  }
                ]
              })(
                <DatePicker onChange={this.searchChange} getCalendarContainer={() => document.getElementById(this.state.formId)} />
              )}
            </Form.Item>
@@ -232,7 +271,15 @@
        fields.push(
          <Col span={item.ratio || 6} key={index}>
            <Form.Item label={item.label}>
              {getFieldDecorator(item.field, {initialValue: item.initval ? moment().subtract(item.initval, 'month') : null })(
              {getFieldDecorator(item.field, {
                initialValue: item.initval ? moment().subtract(item.initval, 'month') : null,
                rules: [
                  {
                    required: item.required === 'true',
                    message: this.props.dict['form.required.select'] + item.label + '!'
                  }
                ]
              })(
                <MonthPicker onChange={this.searchChange} getCalendarContainer={() => document.getElementById(this.state.formId)} />
              )}
            </Form.Item>
@@ -242,7 +289,15 @@
        fields.push(
          <Col span={item.ratio || 6} key={index}>
            <Form.Item label={item.label}>
              {getFieldDecorator(item.field, {initialValue: item.initval ? moment().subtract(item.initval * 7, 'days') : null })(
              {getFieldDecorator(item.field, {
                initialValue: item.initval ? moment().subtract(item.initval * 7, 'days') : null,
                rules: [
                  {
                    required: item.required === 'true',
                    message: this.props.dict['form.required.select'] + item.label + '!'
                  }
                ]
              })(
                <WeekPicker onChange={this.searchChange} getCalendarContainer={() => document.getElementById(this.state.formId)} />
              )}
            </Form.Item>
@@ -265,7 +320,13 @@
            <Form.Item label={item.label}>
              {getFieldDecorator(item.field,
                {
                  initialValue: _defaultValue
                  initialValue: _defaultValue,
                  rules: [
                    {
                      required: item.required === 'true',
                      message: this.props.dict['form.required.select'] + item.label + '!'
                    }
                  ]
                })(
                <RangePicker
                  placeholder={['开始日期', '结束日期']}
@@ -282,7 +343,7 @@
    fields.push(
      <Col span={6} style={{ whiteSpace: 'nowrap' }} key="actions">
        <Form.Item label={' '} colon={false}>
        <Form.Item label={' '} colon={false} style={{ minHeight: '40px' }}>
          <Button type="primary" htmlType="submit">
            {this.props.dict['main.search']}
          </Button>
@@ -327,65 +388,39 @@
    // 获取搜索条件值
    let search = []
    Object.keys(values).forEach(key => {
      if (this.state.style[key] === 'daterange') {
        let _value = ''
      if (this.state.style[key] === 'daterange') {
        if (values[key].length > 0) {
          _value = [moment(values[key][0]).format('YYYY-MM-DD'), moment(values[key][1]).format('YYYY-MM-DD')]
        }
        search.push({
          type: this.state.style[key],
          key: key.replace(/@tail@$/, ''),
          value: _value,
          match: this.state.match[key]
        })
      } else if (this.state.style[key] === 'dateweek') {
        let _value = ''
        if (values[key]) {
          _value = [moment(values[key]).startOf('week').format('YYYY-MM-DD'), moment(values[key]).endOf('week').format('YYYY-MM-DD')]
        }
        search.push({
          type: this.state.style[key],
          key: key.replace(/@tail@$/, ''),
          value: _value,
          match: this.state.match[key]
        })
      } else if (this.state.style[key] === 'date') {
        let _value = ''
        if (values[key]) {
          _value = moment(values[key]).format('YYYY-MM-DD')
        }
        search.push({
          type: this.state.style[key],
          key: key.replace(/@tail@$/, ''),
          value: _value,
          match: this.state.match[key]
        })
      } else if (this.state.style[key] === 'datemonth') {
        let _value = ''
        if (values[key]) {
          _value = moment(values[key]).format('YYYY-MM')
        }
      } else if (this.state.style[key] === 'multiselect') {
        _value = values[key]
      } else {
        _value = values[key].replace(/(^\s*|\s*$)/ig, '')
      }
        search.push({
          type: this.state.style[key],
          key: key.replace(/@tail@$/, ''),
          value: _value,
          match: this.state.match[key]
        label: this.state.label[key],
        match: this.state.match[key],
        required: this.state.required[key]
        })
      } else if (this.state.style[key] === 'multiselect') {
        search.push({
          type: this.state.style[key],
          key: key.replace(/@tail@$/, ''),
          value: values[key],
          match: this.state.match[key]
        })
      } else {
        search.push({
          type: this.state.style[key],
          key: key.replace(/@tail@$/, ''),
          value: values[key].replace(/(^\s*|\s*$)/ig, ''),
          match: this.state.match[key]
        })
      }
    })
    return search
  }
src/tabviews/zshare/topSearch/index.scss
@@ -3,7 +3,11 @@
  border-bottom: 1px solid #efefef;
  .ant-form-item {
    display: flex;
    margin-bottom: 10px;
    margin-bottom: 0px;
    min-height: 60px;
    .ant-form-explain {
      white-space: nowrap;
    }
  }
  .ant-form-item-control-wrapper {
    flex: 1;
src/templates/comtableconfig/index.jsx
@@ -337,6 +337,12 @@
            }
          })
        })
      } else {
        notification.warning({
          top: 92,
          message: res.message,
          duration: 10
        })
      }
    })
  }
@@ -348,6 +354,46 @@
    this.setState = () => {
      return
    }
  }
  /**
   * @description 加载或刷新标签信息
   */
  reloadTab = () => {
    this.setState({
      loading: true,
      tabviews: []
    })
    Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => {
      if (res.status) {
        this.setState({
          loading: false,
          tabviews: res.UserTemp.map(temp => {
            return {
              uuid: temp.MenuID,
              value: temp.MenuID,
              text: temp.MenuName,
              type: temp.Template,
              MenuNo: temp.MenuNo
            }
          })
        })
        notification.success({
          top: 92,
          message: '刷新成功。',
          duration: 2
        })
      } else {
        this.setState({
          loading: false
        })
        notification.warning({
          top: 92,
          message: res.message,
          duration: 10
        })
      }
    })
  }
  /**
@@ -1486,6 +1532,10 @@
          LongParam: _LongParam,
          LText: _vals.func.map(item => `select '${menu.MenuID}' as MenuID,'${item.func}' as ProcName,'${item.label}' as MenuName`),
          LTexttb: _tables.map(item => `select '${menu.MenuID}' as MenuID,'${item}' as tbName`)
        }
        if (menu.menuSort) { // 菜单新建时设置排序
          param.Sort = menu.menuSort
        }
        param.LText = param.LText.join(' union all ')
@@ -2712,7 +2762,12 @@
            </Collapse>
          </div>
          <div className="setting">
            <Card title={this.state.dict['header.menu.page.configurable']} bordered={false} extra={
            <Card title={
              <div>
                {this.state.dict['header.menu.page.configurable']}
                <Icon type="redo" style={{marginLeft: '10px'}} title="刷新标签列表" onClick={this.reloadTab} />
              </div>
            } bordered={false} extra={
              <div>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={this.state.config.enabled} onChange={this.onEnabledChange} />
                <Button type="primary" onClick={this.changeTemplate}>{this.state.dict['header.menu.template.change']}</Button>
src/templates/formtabconfig/index.jsx
@@ -260,6 +260,12 @@
            }
          })
        })
      } else {
        notification.warning({
          top: 92,
          message: res.message,
          duration: 10
        })
      }
    })
  }
@@ -271,6 +277,46 @@
    this.setState = () => {
      return
    }
  }
  /**
   * @description 加载或刷新标签信息
   */
  reloadTab = () => {
    this.setState({
      loading: true,
      tabviews: []
    })
    Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => {
      if (res.status) {
        this.setState({
          loading: false,
          tabviews: res.UserTemp.map(temp => {
            return {
              uuid: temp.MenuID,
              value: temp.MenuID,
              text: temp.MenuName,
              type: temp.Template,
              MenuNo: temp.MenuNo
            }
          })
        })
        notification.success({
          top: 92,
          message: '刷新成功。',
          duration: 2
        })
      } else {
        this.setState({
          loading: false
        })
        notification.warning({
          top: 92,
          message: res.message,
          duration: 10
        })
      }
    })
  }
  // 页面返回
@@ -755,33 +801,10 @@
        return
      }
      new Promise(resolve => {
        // 弹窗(表单)类按钮,先获取按钮配置信息,如果尚未配置按钮则会报错并终止。
        // 获取信息后生成删除和创建存储过程的语句
        if (btn.OpenType === 'pop') {
          Api.getSystemConfig({
            func: 'sPC_Get_LongParam',
            MenuID: btn.uuid
          }).then(res => {
            let _LongParam = ''
            if (res.status && res.LongParam) {
              try {
                _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam)))
              } catch (e) {
                console.warn('Parse Failure')
                _LongParam = ''
              }
            }
            if (_LongParam) {
              let fields = []
              if (_LongParam.groups.length > 0) {
                _LongParam.groups.forEach(group => {
      _config.groups.forEach(group => {
                  fields = [...fields, ...group.sublist]
                })
              } else {
                fields = _LongParam.fields
              }
              let _param = {
                funcName: btn.innerFunc,
@@ -789,31 +812,9 @@
                fields: fields,
                menuNo: menu.MenuNo
              }
              newLText = Utils.formatOptions(Utils.getfunc(_param, btn, menu, _config))
              DelText = Utils.formatOptions(Utils.dropfunc(_param.funcName))
              resolve(true)
            } else {
              notification.warning({
                top: 92,
                message: '弹窗(表单)按钮,请先配置表单信息!',
                duration: 10
              })
              resolve(false)
            }
          })
        } else {
          let _param = {
            funcName: btn.innerFunc,
            name: _config.setting.tableName || '',
            fields: '',
            menuNo: menu.MenuNo
          }
          newLText = Utils.formatOptions(Utils.getfunc(_param, btn, menu, _config))
          DelText = Utils.formatOptions(Utils.dropfunc(_param.funcName))
          resolve(true)
        }
      }).then(res => {
        if (!res) return
        this.refs.btnCreatFunc.exec(btn.innerFunc, newLText, DelText).then(result => {
          if (result !== 'success') return
@@ -834,7 +835,6 @@
          this.setState({
            config: _config
          })
        })
      })
    })
@@ -1965,7 +1965,12 @@
            </Collapse>
          </div>
          <div className="setting">
            <Card title={this.state.dict['header.menu.page.configurable']} bordered={false} extra={
            <Card title={
              <div>
                {this.state.dict['header.menu.page.configurable']}
                <Icon type="redo" style={{marginLeft: '10px'}} title="刷新标签列表" onClick={this.reloadTab} />
              </div>
            } bordered={false} extra={
              <div>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={this.state.config.enabled} onChange={this.onEnabledChange} />
                <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['header.save']}</Button>
src/templates/subtableconfig/index.jsx
@@ -284,6 +284,52 @@
            }
          })
        })
      } else {
        notification.warning({
          top: 92,
          message: res.message,
          duration: 10
        })
      }
    })
  }
  /**
   * @description 加载或刷新标签信息
   */
  reloadTab = () => {
    this.setState({
      loading: true,
      tabviews: []
    })
    Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => {
      if (res.status) {
        this.setState({
          loading: false,
          tabviews: res.UserTemp.map(temp => {
            return {
              uuid: temp.MenuID,
              value: temp.MenuID,
              text: temp.MenuName,
              type: temp.Template,
              MenuNo: temp.MenuNo
            }
          })
        })
        notification.success({
          top: 92,
          message: '刷新成功。',
          duration: 2
        })
      } else {
        this.setState({
          loading: false
        })
        notification.warning({
          top: 92,
          message: res.message,
          duration: 10
        })
      }
    })
  }
@@ -2093,7 +2139,12 @@
            </Collapse>
          </div>
          <div className="setting">
            <Card title={'标签(子表)页面配置'} bordered={false} extra={
            <Card title={
              <div>
                标签(子表)页面配置
                <Icon type="redo" style={{marginLeft: '10px'}} title="刷新标签列表" onClick={this.reloadTab} />
              </div>
            } bordered={false} extra={
              <div>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={this.state.config.enabled} onChange={this.onEnabledChange} />
                <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['header.save']}</Button>
src/templates/zshare/dragelement/card.jsx
@@ -92,30 +92,30 @@
        {type === 'search' ?
          <div className="ant-row ant-form-item">
            <div className="ant-col ant-form-item-label ant-col-xs-24 ant-col-sm-8">
              <label title={card.label}>{card.label}</label>
              <label className={card.required === 'true' ? 'ant-form-item-required' : ''} title={card.label}>{card.label}</label>
            </div>
            <div className="ant-col ant-form-item-control-wrapper ant-col-xs-24 ant-col-sm-16">
              {card.type === 'text' ?
                <Input style={{marginTop: '4px'}} defaultValue={card.initval} /> : null
                <Input style={{marginTop: '4px'}} value={card.initval} /> : null
              }
              {(card.type === 'multiselect' || card.type === 'select' || card.type === 'link') ?
                <Select defaultValue={_defaultValue}></Select> : null
                <Select value={_defaultValue}></Select> : null
              }
              {card.type === 'date' ?
                <DatePicker defaultValue={card.initval ? moment().subtract(card.initval, 'days') : null} /> : null
                <DatePicker value={card.initval ? moment().subtract(card.initval, 'days') : null} /> : null
              }
              {card.type === 'dateweek' ?
                <WeekPicker defaultValue={card.initval ? moment().subtract(card.initval * 7, 'days') : null} /> : null
                <WeekPicker value={card.initval ? moment().subtract(card.initval * 7, 'days') : null} /> : null
              }
              {card.type === 'datemonth' ?
                <MonthPicker defaultValue={card.initval ? moment().subtract(card.initval, 'month') : null} /> : null
                <MonthPicker value={card.initval ? moment().subtract(card.initval, 'month') : null} /> : null
              }
              {card.type === 'daterange' ?
                <RangePicker
                  className="data-range"
                  placeholder={['开始日期', '结束日期']}
                  renderExtraFooter={() => 'extra footer'}
                  defaultValue={_defaultValue}
                  value={_defaultValue}
                /> : null
              }
              <div className="input-mask"></div>
src/templates/zshare/formconfig.js
@@ -205,6 +205,19 @@
      }]
    },
    {
      type: 'radio',
      key: 'required',
      label: Formdict['header.form.field.required'],
      initVal: card.required || 'false',
      options: [{
        value: 'true',
        text: Formdict['header.form.true']
      }, {
        value: 'false',
        text: Formdict['header.form.false']
      }]
    },
    {
      type: 'number',
      key: 'ratio',
      min: 1,
src/templates/zshare/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', 'blacklist']                // 默认显示项
    let _options = ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required']                // 默认显示项
    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', 'blacklist']
      let _options = ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required']
      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', 'blacklist']
      let _options = ['label', 'field', 'initval', 'type', 'match', 'resourceType', 'display', 'ratio', 'blacklist', 'required']
      if (value === '0') {
        _options = [..._options, 'options', 'quick']
src/templates/zshare/searchform/index.scss
@@ -4,6 +4,9 @@
    padding-left: 6px!important;
    padding-bottom: 20px;
  }
  // .ant-form-item {
  //   margin-bottom: 10px;
  // }
  .ant-form-item.text-area {
    margin-bottom: 0px;
    .ant-form-item-control-wrapper {
src/utils/utils.js
@@ -194,7 +194,9 @@
        key: search.field,
        match: search.match,
        type: search.type,
        value: search.initval
        label: search.label,
        value: search.initval,
        required: search.required === 'true'
      }
      if (item.type === 'date') {
        item.value = item.value ? moment().subtract(item.value, 'days').format('YYYY-MM-DD') : ''