king
2019-12-23 d38dc481492878c04ddf2d6bc2e9bf7d44c57fd7
src/templates/comtableconfig/index.jsx
@@ -69,7 +69,7 @@
    delActions: [],          // 删除按钮列表
    funcLoading: false,      // 存储过程创建中
    showColumnName: false,   // 显示列字段名控制
    tabviews: false          // 所有标签页
    tabviews: []             // 所有标签页
  }
  /**
@@ -261,30 +261,21 @@
      })
    })
    // let param = {
    //   func: 'sPC_Get_SelectedList',
    //   LText: 'select TbName ,Remark from sDataDictionary where IsKey!=\'\' and Deleted =0',
    //   obj_name: 'data',
    //   arr_field: 'TbName,Remark'
    // }
    // param.LText = Utils.formatOptions(param.LText)
    // param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
    // param.secretkey = Utils.encrypt(param.LText, param.timestamp)
    // Api.getSystemConfig(param).then(res => {
    //   if (res.status) {
    //     this.setState({
    //       tables: res.data
    //     })
    //   } else {
    //     notification.warning({
    //       top: 92,
    //       message: res.message,
    //       duration: 10
    //     })
    //   }
    // })
    Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => {
      if (res.status) {
        this.setState({
          tabviews: res.UserTemp.map(temp => {
            return {
              uuid: temp.MenuID,
              value: temp.MenuID,
              text: temp.MenuName,
              type: temp.Template,
              MenuNo: temp.MenuNo
            }
          })
        })
      }
    })
  }
  handleList = (type, list, card) => {
@@ -986,19 +977,7 @@
          label: '关联标签',
          initVal: card.linkTab || '',
          required: false,
          options: [{
            value: '',
            text: '新建'
          }, {
            value: 'jadisfjiasodjIjjaidfoasdf',
            text: '子表1'
          }, {
            value: 'dasjfsioafjiaga',
            text: '子表2'
          }, {
            value: 'jadsifjasgfisag',
            text: '子表3'
          }]
          options: []
        },
        {
          type: 'select',
@@ -2465,47 +2444,46 @@
            }
          })
        } else if (type === 'tab') {
          if (btn.linkTab) {
          } else {
            let _tab = {
              uuid: btn.linkId,
              create: true
            }
            this.props.handleSubConfig(btn, originMenu, _tab, type)
          }
          this.setState({
            loading: true
          })
          // Api.getSystemConfig({
          //   func: 'sPC_Get_LongParam',
          //   MenuID: btn.linkId
          // }).then(res => {
          //   if (res.status) {
          //     this.setState({
          //       loading: false
          //     })
          //     let _LongParam = ''
          //     if (res.LongParam) {
          //       _LongParam = window.decodeURIComponent(window.atob(res.LongParam))
          //       try {
          //         _LongParam = JSON.parse(_LongParam)
          //       } catch (e) {
          //         _LongParam = ''
          //       }
          //     }
          //     console.log(_LongParam)
          //   } else {
          //     this.setState({
          //       loading: false
          //     })
          //     notification.warning({
          //       top: 92,
          //       message: res.message,
          //       duration: 10
          //     })
          //   }
          // })
          Api.getSystemConfig({
            func: 'sPC_Get_LongParam',
            MenuID: btn.linkTab
          }).then(res => {
            if (res.status) {
              this.setState({
                loading: false
              })
              let _LongParam = ''
              if (res.LongParam) {
                _LongParam = window.decodeURIComponent(window.atob(res.LongParam))
                try {
                  _LongParam = JSON.parse(_LongParam)
                } catch (e) {
                  _LongParam = ''
                }
              }
              if (!_LongParam) {
                _LongParam = {
                  ...btn,
                  uuid: btn.linkTab,
                  create: true
                }
              }
              this.props.handleSubConfig(btn, originMenu, _LongParam, type)
            } else {
              this.setState({
                loading: false
              })
              notification.warning({
                top: 92,
                message: res.message,
                duration: 10
              })
            }
          })
        }
      }, () => {
        notification.warning({
@@ -2801,6 +2779,7 @@
          {this.state.formtemp === 'tabs' ?
            <TabForm
              type="tabs"
              tabs={this.state.tabviews}
              dict={this.state.dict}
              card={this.state.card}
              formlist={this.state.formlist}