king
2020-02-28 282fd00654a0e777cdbca700fe6488d04fec6be8
2020-02-28
12个文件已修改
142 ■■■■■ 已修改文件
src/tabviews/formtab/formgroup/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/formgroup/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/index.jsx 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/dragelement/card.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.scss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/settingform/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/searchform/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/ushare/modalform/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/formgroup/index.jsx
@@ -269,7 +269,7 @@
                initialValue: _initval,
                rules: [
                  {
                    required: item.required === 'true',
                    required: true,
                    message: this.props.dict['form.required.input'] + item.label + '!'
                  }
                ]
@@ -603,7 +603,7 @@
    let keys = groups.map(group => group.uuid)
    
    return (
      <Form {...formItemLayout}>
      <Form {...formItemLayout} className="form-tab-form-field">
        <Collapse
          defaultActiveKey={keys}
          expandIconPosition='right'
src/tabviews/formtab/formgroup/index.scss
@@ -1,6 +1,6 @@
.ant-advanced-search-form.main-form-field {
.form-tab-form-field {
  position: relative;
  padding: 0px 24px 20px;
  padding: 0px;
  .ant-form-item {
    display: flex;
  }
src/tabviews/formtab/index.jsx
@@ -94,9 +94,6 @@
      let _arrField = [config.setting.primaryKey]     // 字段集 , 默认添加主键
      // if (this.props.param && this.props.param.arr_field) { // 使用显示列字段查询
      //   _arrField = this.props.param.arr_field
      // } else {
      config.groups.forEach(group => {
        group.sublist.forEach(item => {
          if (!item.field) return
@@ -105,7 +102,6 @@
        })
      })
      _arrField = _arrField.join(',')
      // }
      // 权限过滤
      if (this.props.menuType !== 'HS') {
@@ -122,16 +118,30 @@
        actions: config.action,
        arr_field: _arrField,
        primaryId: this.props.param.primaryId || '',
        data: config.setting.datatype === 'query' ? null : this.props.param.data,
        data: this.props.param.data || null,
        BIDs: {
          mainTable: this.props.param.primaryId || '',
          mainTabledata: config.setting.datatype === 'query' ? '' : this.props.param.data
          mainTable: config.setting.onload === 'true' ? (this.props.param.primaryId || '') : '',
          mainTabledata: config.setting.onload === 'true' ? (config.setting.datatype === 'query' ? '' : this.props.param.data) : ''
        }
      }, () => {
        this.improveSelectOption(config.groups)
        if (config.setting.datatype === 'query' && this.props.param.primaryId) {
          this.loadmaindata()
        if (config.setting.datatype === 'query' && config.setting.onload === 'true') {
          if (!this.props.param.primaryId) {
            notification.warning({
              top: 92,
              message: '未获取到主键ID!',
              duration: 10
            })
          } else {
            this.loadmaindata()
          }
        } else if (config.setting.datatype !== 'query' && (!this.props.param.primaryId || !this.props.param.data)) {
          notification.warning({
            top: 92,
            message: '未获取到主表数据!',
            duration: 10
          })
        }
      })
    } else {
@@ -262,7 +272,7 @@
   * @description 主表数据加载
   */ 
  async loadmaindata () {
    const { setting, BIDs } = this.state
    const { setting, BIDs, config } = this.state
    if (setting.datatype !== 'query') {
      notification.warning({
@@ -290,6 +300,12 @@
      if (_data) {
        _primaryId = _data[setting.primaryKey] || ''
      } else {
        notification.warning({
          top: 92,
          message: '未查询到数据信息!',
          duration: 10
        })
      }
      this.setState({
@@ -301,6 +317,31 @@
          mainTabledata: _data
        }
      })
      if (_data && (setting.interType !== 'inner' || (setting.interType === 'inner' && setting.innerFunc))) {
        let keys = Object.keys(_data)
        let emptys = []
        if (!keys.includes(config.setting.primaryKey)) {
          emptys.push(config.setting.primaryKey)
        }
        config.groups.forEach(group => {
          group.sublist.forEach(item => {
            if (!keys.includes(item.field)) {
              emptys.push(item.field + '(' + item.label + ')')
            }
          })
        })
        if (emptys.length > 0) {
          notification.warning({
            top: 92,
            message: '未查询到' + emptys.join(', ') + '字段信息!',
            duration: 10
          })
        }
      }
    } else {
      notification.error({
        top: 92,
src/templates/comtableconfig/index.jsx
@@ -101,8 +101,8 @@
          item.resourceType === '0' &&
          item.options && item.options.length > 0
        ) {
          optionLibs.set(item.uuid, {
            uuid: item.uuid,
          optionLibs.set(menu.MenuID + item.uuid, {
            uuid: menu.MenuID + item.uuid,
            label: item.label,
            parname: menu.MenuName,
            type: 'search',
@@ -549,8 +549,8 @@
          res.resourceType === '0' &&
          res.options && res.options.length > 0
        ) {
          optionLibs.set(res.uuid, {
            uuid: res.uuid,
          optionLibs.set(menu.MenuID + res.uuid, {
            uuid: menu.MenuID + res.uuid,
            label: res.label,
            parname: menu.MenuName,
            type: 'search',
src/templates/formtabconfig/dragelement/card.jsx
@@ -90,6 +90,8 @@
          <div className="ant-row ant-form-item">
            <div className={'ant-col ant-form-item-label ant-col-xs-24 ' + labelCol}>
              <label title={card.label}>{card.label}</label>
              <Icon className="edit" title="编辑" type="edit" onClick={edit} />
              <Icon className="edit close" title="删除" type="close" onClick={del} />
            </div>
            <div className={'ant-col ant-form-item-control-wrapper ant-col-xs-24 ' + wrapCol}>
              {card.type === 'text' ?
@@ -135,11 +137,11 @@
          </Button> : null
        }
      </div>
      <Icon className="edit" title="编辑" type="edit" onClick={edit} />
      {type === 'action' ? <Icon className="edit" title="编辑" type="edit" onClick={edit} /> : null}
      {type === 'action' && card.btnType === 'confirm' && card.intertype === 'inner' && !card.innerFunc ?
        <Icon className="edit profile" title="校验规则" type="profile" onClick={profile} /> : null
      }
      {card.btnType !== 'confirm' && card.btnType !== 'cancel' && <Icon className="edit close" title="删除" type="close" onClick={del} />}
      {type === 'action' && card.btnType !== 'confirm' && card.btnType !== 'cancel' && <Icon className="edit close" title="删除" type="close" onClick={del} />}
    </div>
  )
}
src/templates/formtabconfig/index.jsx
@@ -107,8 +107,8 @@
            item.resourceType === '0' &&
            item.options && item.options.length > 0
          ) {
            optionLibs.set(item.uuid, {
              uuid: item.uuid,
            optionLibs.set(btnTab.uuid + item.uuid, {
              uuid: btnTab.uuid + item.uuid,
              label: item.label,
              parname: btnTab.label,
              type: 'Modal',
@@ -575,8 +575,8 @@
          res.resourceType === '0' &&
          res.options && res.options.length > 0
        ) {
          optionLibs.set(res.uuid, {
            uuid: res.uuid,
          optionLibs.set(btnTab.uuid + res.uuid, {
            uuid: btnTab.uuid + res.uuid,
            label: res.label,
            parname: btnTab.label,
            type: 'Modal',
@@ -1424,7 +1424,7 @@
        let btnParam = { // 添加菜单按钮
          func: 'sPC_Button_AddUpt',
          Type: 60,      // 添加按钮表单页下的按钮
          ParentID: menu.MenuID,
          ParentID: btnTab.uuid,
          MenuNo: menu.MenuNo,
          Template: menu.PageParam.Template || '',
          PageParam: '',
@@ -2260,7 +2260,7 @@
                      setting={config.setting}
                      handleMenu={this.handleSearch}
                      deleteMenu={this.deleteElement}
                      placeholder={this.state.dict['header.form.search.placeholder']}
                      placeholder={this.state.dict['header.form.modal.placeholder']}
                    />
                  </Panel>
                ))}
src/templates/formtabconfig/index.scss
@@ -207,6 +207,7 @@
                display: flex;
                margin-bottom: 0px;
                .ant-form-item-label {
                  overflow: visible;
                  label {
                    width: 100%;
                    cursor: move;
@@ -254,14 +255,16 @@
              }
              .edit {
                position: absolute;
                left: calc(34% - 100px);
                top: 5px;
                // left: calc(34% - 100px);
                right: 100px;
                top: -5px;
                color: #1890ff;
                cursor: pointer;
                display: none;
              }
              .edit.close {
                left: calc(34% - 80px);
                // left: calc(34% - 80px);
                right: 80px;
                color: #ff4d4f;
              }
            }
src/templates/formtabconfig/settingform/index.jsx
@@ -300,6 +300,18 @@
              })(<InputNumber min={10} max={100} precision={0} />)}
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label="初始化">
              {getFieldDecorator('onload', {
                initialValue: setting.onload || 'false'
              })(
                <Select>
                  <Select.Option value="true">加载数据</Select.Option>
                  <Select.Option value="false">不加载数据</Select.Option>
                </Select>
              )}
            </Form.Item>
          </Col>
        </Row>
      </Form>
    )
src/templates/modalconfig/index.jsx
@@ -99,8 +99,8 @@
              item.resourceType === '0' &&
              item.options && item.options.length > 0
            ) {
              optionLibs.set(item.uuid, {
                uuid: item.uuid,
              optionLibs.set(editAction.uuid + item.uuid, {
                uuid: editAction.uuid + item.uuid,
                label: item.label,
                parname: editAction.label,
                type: 'Modal',
@@ -116,8 +116,8 @@
            item.resourceType === '0' &&
            item.options && item.options.length > 0
          ) {
            optionLibs.set(item.uuid, {
              uuid: item.uuid,
            optionLibs.set(editAction.uuid + item.uuid, {
              uuid: editAction.uuid + item.uuid,
              label: item.label,
              parname: editAction.label,
              type: 'Modal',
@@ -481,8 +481,8 @@
        res.resourceType === '0' &&
        res.options && res.options.length > 0
      ) {
        optionLibs.set(res.uuid, {
          uuid: res.uuid,
        optionLibs.set(editAction.uuid + res.uuid, {
          uuid: editAction.uuid + res.uuid,
          label: res.label,
          parname: editAction.label,
          type: 'Modal',
src/templates/subtableconfig/index.jsx
@@ -104,8 +104,8 @@
          item.resourceType === '0' &&
          item.options && item.options.length > 0
        ) {
          optionLibs.set(item.uuid, {
            uuid: item.uuid,
          optionLibs.set(_config.uuid + item.uuid, {
            uuid: _config.uuid + item.uuid,
            label: item.label,
            parname: _config.tabName,
            type: 'search',
@@ -419,8 +419,8 @@
          res.resourceType === '0' &&
          res.options && res.options.length > 0
        ) {
          optionLibs.set(res.uuid, {
            uuid: res.uuid,
          optionLibs.set(config.uuid + res.uuid, {
            uuid: config.uuid + res.uuid,
            label: res.label,
            parname: config.tabName,
            type: 'search',
src/templates/tableshare/searchform/index.jsx
@@ -70,8 +70,7 @@
            form.options = matchReg.daterange
          }
        } else if (form.key === 'quick') {
          form.options = [...optionLibs.values()].filter(cell => cell.uuid !== this.props.card.uuid)
          form.options = form.options.map(cell => {
          form.options = [...optionLibs.values()].map(cell => {
            return {
              value: cell.uuid,
              text: cell.label + '(' + cell.parname + ')'
src/templates/ushare/modalform/index.jsx
@@ -90,8 +90,7 @@
          form.initVal = form.initVal || 0
          form.required = true
        } else if (form.key === 'quick') {
          form.options = [...optionLibs.values()].filter(cell => cell.uuid !== this.props.card.uuid)
          form.options = form.options.map(cell => {
          form.options = [...optionLibs.values()].map(cell => {
            return {
              value: cell.uuid,
              text: cell.label + '(' + cell.parname + ')'