king
2020-07-06 3193df5faaacb0fe903ce993b16319276528524f
src/tabviews/zshare/actionList/tabbutton/index.jsx
@@ -74,17 +74,41 @@
      primaryId = data[0][setting.primaryKey] || ''
    }
    let newtab = {
      MenuNo: '',
      MenuID: btn.uuid,
      MenuName: btn.label,
      type: btn.tabTemplate,
      selected: true,
      param: {
        parentId: this.props.MenuID,
        btn: btn,
        data: data[0] || null,
        primaryId: primaryId
    let newtab = {}
    if (btn.tabTemplate === 'FormTab') {
      newtab = {
        MenuNo: '',
        MenuID: btn.uuid,
        MenuName: btn.label,
        type: btn.tabTemplate,
        selected: true,
        param: {
          parentId: this.props.MenuID,
          btn: btn,
          data: data[0] || null,
          primaryId: primaryId
        }
      }
    } else if (btn.tabTemplate === 'ThdMenu') {
      let _type = 'CommonTable'
      if (btn.linkThdMenu && btn.linkThdMenu.PageParam) {
        try {
          _type = JSON.parse(btn.linkThdMenu.PageParam).Template
        } catch {
          _type = 'CommonTable'
        }
      }
      newtab = {
        MenuNo: btn.linkThdMenu.MenuNo,
        MenuID: btn.linkThdMenu.MenuID,
        MenuName: btn.linkThdMenu.MenuName,
        type: _type,
        selected: true,
        param: {
          BID: primaryId
        }
      }
    }