king
2021-09-01 31ec63f0419895876cbaba99637a884a32d33d0d
src/tabviews/tabmanage/index.jsx
@@ -8,9 +8,10 @@
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
import Utils from '@/utils/utils.js'
import TransferForm from '@/components/transferform'
import subtableurl from '@/assets/img/subtable.jpg'
import MKEmitter from '@/utils/events.js'
import TransferForm from './transferform'
import MutilForm from './mutilform'
import subtableurl from '@/assets/img/subtable.jpg'
import './index.scss'
@@ -48,9 +49,9 @@
            return {
              uuid: temp.MenuID,
              value: temp.MenuID,
              MenuName: temp.MenuName,
              MenuName: temp.MenuName || '',
              type: temp.Template,
              MenuNo: temp.MenuNo,
              MenuNo: temp.MenuNo || '',
              Remark: temp.Remark
            }
          })
@@ -83,6 +84,7 @@
  componentDidMount () {
    this.getTabs()
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -96,6 +98,25 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
  }
  reloadMenuView = (menuId) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    this.setState({
      searchKey: '',
      tabviews: null,
      loading: true,
      modaltype: '',
      editTab: null,
      submitloading: false,
      thawVisible: false,
      thawmenulist: null
    })
    this.getTabs()
  }
  handleTab = (tab, type) => {
@@ -257,11 +278,11 @@
  
              btnParam.LText = btnParam.LText.join(' union all ')
              btnParam.LText = Utils.formatOptions(btnParam.LText)
              btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
              btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
              btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
  
              _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_LongParam)))
            } catch {
            } catch (e) {
              console.warn('Stringify Failure')
              _LongParam = ''
            }
@@ -483,7 +504,7 @@
    let _tabviews = []
    if (tabviews) {
      _tabviews = tabviews.filter(tab => tab.MenuName.toLowerCase().indexOf(searchKey.toLowerCase()) >= 0)
      _tabviews = tabviews.filter(tab => tab.MenuName.toLowerCase().indexOf(searchKey.toLowerCase()) >= 0 || tab.MenuNo.toLowerCase().indexOf(searchKey.toLowerCase()) >= 0)
    }
    return (
@@ -538,9 +559,8 @@
        {/* 解冻标签模态框 */}
        <Modal
          title="标签解除冻结"
          okText={this.state.dict['main.confirm']}
          cancelText={this.state.dict['main.cancel']}
          visible={this.state.thawVisible}
          width={600}
          onOk={this.thawMenuSubmit}
          confirmLoading={this.state.submitloading}
          onCancel={() => {this.setState({thawVisible: false, thawmenulist: null})}}