king
2021-09-01 31ec63f0419895876cbaba99637a884a32d33d0d
src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -27,7 +27,8 @@
    config: null,              // 图表配置信息
    loading: false,            // 数据加载状态
    sync: false,               // 是否统一请求数据
    data: {}                   // 数据
    data: {},                  // 数据
    BData: null
  }
  UNSAFE_componentWillMount () {
@@ -165,12 +166,12 @@
    }
  }
  resetParentParam = (MenuID, id) => {
  resetParentParam = (MenuID, id, data) => {
    const { config } = this.state
    if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return
    if (id !== this.state.BID) {
      this.setState({ BID: id }, () => {
      this.setState({ BID: id, BData: data }, () => {
        this.loadData()
      })
    }
@@ -186,16 +187,16 @@
  async loadData () {
    const { mainSearch, menuType } = this.props
    const { config, arr_field, BID } = this.state
    const { config, arr_field, BID, BData } = this.state
    if (config.wrap.datatype === 'static') {
      this.setState({
        data: {$$BID: BID || ''}
        data: {$$BID: BID || '', $$BData: BData}
      })
      return
    } else if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
        data: {$$BID: BID || ''}
        data: {$$BID: BID || '', $$BData: BData}
      })
      return
    }
@@ -218,6 +219,7 @@
    if (result.status) {
      let _data = result.data && result.data[0] ? result.data[0] : {}
      _data.$$BID = BID || ''
      _data.$$BData = BData || ''
      this.setState({
        data: _data,
@@ -293,7 +295,7 @@
          _param.User_Name = sessionStorage.getItem('User_Name')
          _param.param = { BID: item.setting.primaryId }
          src = _url + window.btoa(window.encodeURIComponent(JSON.stringify(_param)))
        } catch {
        } catch (e) {
          console.warn('菜单参数解析错误!')
        }
      } else if (item.setting.joint === 'true') {