king
2024-08-20 58826d6f4eab9f8c9acf9fa8696f60039c645cfe
src/views/pcdesign/index.jsx
@@ -3,15 +3,14 @@
import { withRouter } from 'react-router'
import { is, fromJS } from 'immutable'
import HTML5Backend from 'react-dnd-html5-backend'
import { ConfigProvider, notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd'
import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, RedoOutlined, ArrowLeftOutlined, EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons'
import { notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd'
import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, ArrowLeftOutlined, EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons'
import moment from 'moment'
import md5 from 'md5'
import Api from '@/api'
import Utils, { setGLOBFuncs } from '@/utils/utils.js'
import { getTables } from '@/utils/utils-custom.js'
import antdZhCN from 'antd/es/locale/zh_CN'
import Utils from '@/utils/utils.js'
import { getTables, getFuncsAndInters, getLangTrans } from '@/utils/utils-custom.js'
import MKEmitter from '@/utils/events.js'
import MenuUtils from '@/utils/utils-custom.js'
import asyncComponent from '@/utils/asyncComponent'
@@ -24,6 +23,7 @@
const { Paragraph } = Typography
const MenuForm = asyncComponent(() => import('./menuform'))
const Debug = asyncComponent(() => import('@/menu/debug'))
const Header = asyncComponent(() => import('@/menu/header'))
const PopView = asyncComponent(() => import('@/views/menudesign/popview'))
const Transfer = asyncComponent(() => import('@/pc/transfer'))
@@ -48,13 +48,9 @@
const StyleCombControlButton = asyncComponent(() => import('@/menu/stylecombcontrolbutton'))
const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent'))
sessionStorage.setItem('isEditState', 'true')
sessionStorage.setItem('appType', 'pc')        // 应用类型
sessionStorage.setItem('typename', 'pc')
document.body.className = ''
const memberLevel = Utils.getMemberLevel()
class MenuDesign extends Component {
  state = {
@@ -72,18 +68,26 @@
    eyeopen: false,
    view: '',
    popConfig: null,
    needUpdate: false
    needUpdate: false,
    appLoginId: '',
    appHomeId: ''
  }
  UNSAFE_componentWillMount() {
    if (sessionStorage.getItem('devError') === 'true') {
      sessionStorage.clear()
      window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login')
      window.location.reload()
      return
    }
    if (!sessionStorage.getItem('UserID')) {
      sessionStorage.removeItem('isEditState')
      sessionStorage.removeItem('appType')
      this.props.history.replace('/login')
      return
    }
    
    if (memberLevel < 30) return
    if (window.GLOB.memberLevel < 30) return
    sessionStorage.setItem('editMenuType', 'menu') // 编辑菜单类型
@@ -92,21 +96,54 @@
    window.GLOB.CacheIndependent = new Map()
    window.GLOB.urlFields = []               // url变量
    window.GLOB.customMenu = null            // 保存菜单信息
    window.GLOB.developing = true
    try {
      let param = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param)))
      if (param.lang) {
        sessionStorage.setItem('lang', param.lang)
      }
      if (param.type === 'app') {
        sessionStorage.setItem('appId', param.ID || '')
        sessionStorage.setItem('appName', param.remark || '')
        sessionStorage.setItem('lang', param.lang || 'zh-CN')
        sessionStorage.setItem('kei_no', param.kei_no || '')
        sessionStorage.setItem('sysBgColor', param.sysBgColor || '#ffffff')
        if (param.applangList) {
          sessionStorage.setItem('applangList', param.applangList)
        } else {
          sessionStorage.removeItem('applangList')
        }
        if (param.wxAppId) {
          sessionStorage.setItem('wxAppId', param.wxAppId)
        }
        this.getAppMessage(param.MenuID)
      } else if (param.type === 'view') {
        let appLoginId = ''
        let appHomeId = ''
        if (sessionStorage.getItem('appViewList')) {
          try {
            let appMenus = JSON.parse(sessionStorage.getItem('appViewList'))
            appMenus.forEach(item => {
              if (item.keys_type === 'login') {
                appLoginId = item.keys_id
              } else if (item.keys_type === 'index') {
                appHomeId = item.keys_id
              }
            })
          } catch (e) {
          }
        }
        this.setState({
          MenuId: param.MenuID
          MenuId: param.MenuID,
          appLoginId: appLoginId,
          appHomeId: appHomeId
        }, () => {
          this.getMenuParam(param)
        })
@@ -132,7 +169,7 @@
  componentDidMount () {
    if (!sessionStorage.getItem('UserID')) return
    if (memberLevel < 30) {
    if (window.GLOB.memberLevel < 30) {
      document.getElementById('mk-pc-design-view').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh; height: 100vh; background: #fff;">本应用没有PC端页面的编辑权限,请联系管理员!</div>'
      return
    }
@@ -140,10 +177,13 @@
    MKEmitter.addListener('changeEditMenu', this.changeEditMenu)
    MKEmitter.addListener('triggerMenuSave', this.triggerMenuSave)
    if (sessionStorage.getItem('wxAppId')) {
      window.GLOB.WXAppID = sessionStorage.getItem('wxAppId')
    }
    setTimeout(() => {
      this.getAppPictures()
      this.getRoleFields()
      setGLOBFuncs()
      // setGLOBFuncs()
    }, 1000)
    document.onkeydown = (event) => {
@@ -237,7 +277,8 @@
      MenuID: menu.MenuID,
      copyMenuId: menu.copyMenuId || '',
      clearMenu: menu.clearMenu !== 'false',
      type: 'view'
      type: 'view',
      lang: sessionStorage.getItem('lang')
    }
    // param.MenuNo = menu.MenuNo || ''
@@ -254,7 +295,7 @@
  }
  getAppMessage = (MenuID) => {
    Api.getSystemConfig({
    Api.getCloudConfig({
      func: 's_get_keyids',
      bid: sessionStorage.getItem('appId')
    }).then(res => {
@@ -284,7 +325,7 @@
        let param = {
          func: 's_kei_link_keyids_addupt',
          BID: sessionStorage.getItem('appId'),
          exec_type: 'y',
          exec_type: 'x',
          LText: ''
        }
@@ -299,12 +340,12 @@
        param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`)
        param.LText = param.LText.join(' union all ')
        param.LText = Utils.formatOptions(param.LText)
        param.LText = Utils.formatOptions(param.LText, 'x')
  
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.secretkey = Utils.encrypt('', param.timestamp)
        Api.getSystemConfig(param).then(result => {
        Api.getCloudConfig(param).then(result => {
          if (!result.status) {
            notification.warning({
              top: 92,
@@ -313,50 +354,13 @@
            })
          } else {
            sessionStorage.setItem('appViewList', JSON.stringify(appViewList))
            this.props.history.replace('/pcdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({MenuID: homeId, type: 'view'}))))
            this.props.history.replace('/pcdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({MenuID: homeId, type: 'view', lang: sessionStorage.getItem('lang')}))))
          }
        })
      } else {
        sessionStorage.setItem('appViewList', JSON.stringify(appViewList))
        this.props.history.replace('/pcdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({MenuID: MenuID || homeId, type: 'view'}))))
        this.props.history.replace('/pcdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({MenuID: MenuID || homeId, type: 'view', lang: sessionStorage.getItem('lang')}))))
      }
    })
  }
  getAppPictures = () => {
    if (sessionStorage.getItem('app_pictures')) return
    let deffers = []
    let param = {
      func: 's_url_db_adduptdel',
      PageIndex: 0,  // 0 代表全部
      PageSize: 0,   // 0 代表全部
      type: 'search'
    }
    deffers = [new Promise(resolve => {
      setTimeout(() => {
        Api.getSystemConfig({...param, typecharone: 'image'}).then(res => {
          resolve(res.data)
        })
      }, 500)
    }), new Promise(resolve => {
      setTimeout(() => {
        Api.getSystemConfig({...param, typecharone: 'video'}).then(res => {
          resolve(res.data)
        })
      }, 1000)
    }), new Promise(resolve => {
      setTimeout(() => {
        Api.getSystemConfig({...param, typecharone: 'color'}).then(res => {
          resolve(res.data)
        })
      }, 1500)
    })]
    Promise.all(deffers).then(response => {
      sessionStorage.setItem('app_pictures', JSON.stringify(response[0] || []))
      sessionStorage.setItem('app_videos', JSON.stringify(response[1] || []))
      sessionStorage.setItem('app_colors', JSON.stringify(response[2] || []))
    })
  }
@@ -524,7 +528,7 @@
      MenuID: MenuId
    }
    Api.getSystemConfig(param).then(result => {
    Api.getCloudConfig(param).then(result => {
      if (!result.status) {
        notification.warning({
          top: 92,
@@ -565,6 +569,7 @@
        config.uuid = MenuId
        config.MenuID = MenuId
        config.Template = 'webPage'
        config.open_edition = result.open_edition || ''
        window.GLOB.urlFields = config.urlFields || []
@@ -671,7 +676,7 @@
    _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)
    Api.getSystemConfig(_param).then(res => {
    Api.getCloudConfig(_param).then(res => {
      if (!res.status) {
        notification.warning({
          top: 92,
@@ -710,7 +715,7 @@
      MenuID: urlParam.copyMenuId
    }
    Api.getSystemConfig(param).then(result => {
    Api.getCloudConfig(param).then(result => {
      if (!result.status) {
        notification.warning({
          top: 92,
@@ -771,6 +776,7 @@
      
      config.uuid = MenuId
      config.MenuID = MenuId
      config.Template = 'webPage'
      config.open_edition = ''
      config.MenuName = urlParam.MenuName || ''
      config.MenuNo = ''
@@ -796,7 +802,7 @@
  }
  jointComponents = (config, navItem) => {
    Api.getSystemConfig({
    Api.getCloudConfig({
      func: 'sPC_Get_LongParam',
      TypeCharOne: sessionStorage.getItem('kei_no'),
      typename: 'pc',
@@ -909,7 +915,7 @@
          return
        } else if (item.type === 'card' || item.type === 'carousel' || item.type === 'timeline') {
          item.action && item.action.forEach(btn => {
            if (btn.hidden === 'true') return
            if (btn.hidden === 'true' || btn.permission === 'false') return
            m.children.push({
              key: btn.uuid,
@@ -918,7 +924,7 @@
          })
          item.subcards.forEach(card => {
            card.elements && card.elements.forEach(cell => {
              if (cell.eleType !== 'button' || cell.hidden === 'true') return
              if (cell.eleType !== 'button' || cell.hidden === 'true' || cell.permission === 'false') return
              m.children.push({
                key: cell.uuid,
@@ -927,7 +933,7 @@
            })
            card.backElements && card.backElements.forEach(cell => {
              if (cell.eleType !== 'button' || cell.hidden === 'true') return
              if (cell.eleType !== 'button' || cell.hidden === 'true' || cell.permission === 'false') return
              m.children.push({
                key: cell.uuid,
@@ -937,7 +943,7 @@
          })
        } else if (item.type === 'balcony') {
          item.elements && item.elements.forEach(cell => {
            if (cell.eleType !== 'button' || cell.hidden === 'true') return
            if (cell.eleType !== 'button' || cell.hidden === 'true' || cell.permission === 'false') return
            m.children.push({
              key: cell.uuid,
@@ -955,7 +961,7 @@
          }
        } else if (item.type === 'table') {
          item.action.forEach(btn => {
            if (btn.hidden === 'true') return
            if (btn.hidden === 'true' || btn.permission === 'false') return
            m.children.push({
              key: btn.uuid,
@@ -968,7 +974,7 @@
                loopCol(col.subcols)
              } else if (col.type === 'custom') {
                col.elements.forEach(cell => {
                  if (cell.eleType !== 'button' || cell.hidden === 'true') return
                  if (cell.eleType !== 'button' || cell.hidden === 'true' || cell.permission === 'false') return
                  m.children.push({
                    key: cell.uuid,
                    title: cell.label,
@@ -1172,13 +1178,23 @@
    if (!this.checkBase()) {
      return
    } else if (this.checklog()) {
      if (sessionStorage.getItem('applangList') && !config.trans) {
      } else {
        notification.success({
          top: 92,
          message: '当前配置未修改,无需保存。',
          duration: 5
        })
        MKEmitter.emit('completeSave')
        return
      }
    }
    this.setState({
      menuloading: true
    })
    window.GLOB.saving = true
    setTimeout(() => {
      let _pass = this.verifyConfig(config)
@@ -1240,6 +1256,10 @@
        config.tbkey = key
      }
      let interfaces = getFuncsAndInters(config)
      roleParam.interfaces = interfaces
      let langSql = getLangTrans(config)
      let param = {
        func: 'sPC_TrdMenu_AddUpt',
        FstID: 'mk_app',
@@ -1252,15 +1272,19 @@
        TypeCharOne: sessionStorage.getItem('kei_no'),
        Typename: 'pc',
        MenuName: config.MenuName || '',
        PageParam: JSON.stringify({Template: 'webPage'}),
        PageParam: JSON.stringify({Template: 'webPage', interfaces}),
        menus_rolelist: window.btoa(window.encodeURIComponent(JSON.stringify(roleParam))),
        open_edition: config.open_edition,
        LText: '',
        LTexttb: '',
        // LText: '',
        // LTexttb: '',
        menus_used_list,
        debug_md5: key,
        debug_url: url,
        debug_list: window.btoa(tbs)
      }
      if (langSql) {
        param.lang_translation = window.btoa(window.encodeURIComponent(langSql))
      }
      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
@@ -1341,15 +1365,15 @@
              PageParam: JSON.stringify({Template: NavBar.type}),
              menus_rolelist: window.btoa(window.encodeURIComponent(JSON.stringify(roles))),
              open_edition: NavBar.open_edition,
              LText: '',
              LTexttb: ''
              // LText: '',
              // LTexttb: ''
            }
            _param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(NavBar)))
            _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
            _param.secretkey = Utils.encrypt('', _param.timestamp)
            Api.getSystemConfig(_param).then(res => {
            Api.getCloudConfig(_param).then(res => {
              if (res.status) {
                NavBar.open_edition = res.open_edition || ''
                window.GLOB.CacheIndependent.set(NavBar.uuid, fromJS(NavBar).toJS())
@@ -1383,18 +1407,18 @@
                  let kparam = {
                    func: 's_kei_link_keyids_addupt',
                    BID: sessionStorage.getItem('appId'),
                    exec_type: 'y',
                    exec_type: 'x',
                    LText: ''
                  }
        
                  kparam.LText = _appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`)
                  kparam.LText = kparam.LText.join(' union all ')
                  kparam.LText = Utils.formatOptions(kparam.LText)
                  kparam.LText = Utils.formatOptions(kparam.LText, 'x')
            
                  kparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
                  kparam.secretkey = Utils.encrypt('', kparam.timestamp)
        
                  Api.getSystemConfig(kparam).then(result => {
                  Api.getCloudConfig(kparam).then(result => {
                    if (result.status) {
                      sessionStorage.setItem('appViewList', viewList)
                    }
@@ -1413,13 +1437,11 @@
      }).then(res => { // 页面保存
        if (!res || !res.status) return res
        return Api.getSystemConfig(param)
        return Api.getCloudConfig(param)
      }).then(res => {
        this.setState({
          menuloading: false
        })
        window.GLOB.saving = false
        if (!res) return
@@ -1439,14 +1461,14 @@
            message: '保存成功',
            duration: 2
          })
          MKEmitter.emit('completeSave')
        } else {
          notification.warning({
            top: 92,
            message: res.message,
            duration: 5
          Modal.warning({
            width: 400,
            title: res.message,
            okText: '知道了'
          })
        }
        MKEmitter.emit('completeSave')
      }, this.netError)
    }, 300 + (+sessionStorage.getItem('mkDelay')))
  }
@@ -1456,8 +1478,6 @@
      menuloading: false
    })
    window.GLOB.saving = false
    if (!error) {
      notification.warning({
        top: 92,
@@ -1465,11 +1485,12 @@
        duration: 5
      })
    }
    MKEmitter.emit('completeSave')
  }
  getRoleFields = () => {
    if (sessionStorage.getItem('sysRoles') || sessionStorage.getItem('permFuncField')) return
    Api.getSystemConfig({func: 'sPC_Get_Roles_sModular'}).then(res => {
    Api.getCloudConfig({func: 'sPC_Get_Roles_sModular'}).then(res => {
      if (res.status) {
        let _permFuncField = []
        let _sysRoles = []
@@ -1584,30 +1605,6 @@
    this.setState({config})
    window.GLOB.customMenu = config
    notification.success({
      top: 92,
      message: '粘贴成功!',
      duration: 2
    })
  }
  refreshView = () => {
    if (!is(fromJS(this.state.oriConfig || {}), fromJS(this.state.config || {}))) {
      notification.warning({
        top: 92,
        message: '配置信息未保存!',
        duration: 5
      })
      return
    }
    sessionStorage.removeItem('sysRoles')
    sessionStorage.removeItem('permFuncField')
    sessionStorage.removeItem('app_videos')
    sessionStorage.removeItem('app_pictures')
    window.location.reload()
  }
  setHomeView = () => {
@@ -1625,7 +1622,7 @@
    let param = {
      func: 's_kei_link_keyids_addupt',
      BID: sessionStorage.getItem('appId'),
      exec_type: 'y',
      exec_type: 'x',
      LText: ''
    }
@@ -1644,16 +1641,18 @@
    param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`)
    param.LText = param.LText.join(' union all ')
    param.LText = Utils.formatOptions(param.LText)
    param.LText = Utils.formatOptions(param.LText, 'x')
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt('', param.timestamp)
    const that = this
    confirm({
      title: '确定设置本页面为首页吗?',
      content: '',
      onOk() {
        Api.getSystemConfig(param).then(result => {
        Api.getCloudConfig(param).then(result => {
          if (!result.status) {
            notification.warning({
              top: 92,
@@ -1662,6 +1661,10 @@
            })
          } else {
            sessionStorage.setItem('appViewList', JSON.stringify(appViewList))
            that.setState({
              appHomeId: config.MenuID
            })
          }
        })
      },
@@ -1684,7 +1687,7 @@
    let param = {
      func: 's_kei_link_keyids_addupt',
      BID: sessionStorage.getItem('appId'),
      exec_type: 'y',
      exec_type: 'x',
      LText: ''
    }
@@ -1703,18 +1706,19 @@
    param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`)
    param.LText = param.LText.join(' union all ')
    param.LText = Utils.formatOptions(param.LText)
    param.LText = Utils.formatOptions(param.LText, 'x')
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt('', param.timestamp)
    let hasLogin = config.components.findIndex(item => item.type === 'login') > -1
    const that = this
    confirm({
      title: '确定设置本页面为登录页吗?',
      content: hasLogin ? '' : '当前页面尚未添加登录组件。',
      onOk() {
        Api.getSystemConfig(param).then(result => {
        Api.getCloudConfig(param).then(result => {
          if (!result.status) {
            notification.warning({
              top: 92,
@@ -1723,6 +1727,10 @@
            })
          } else {
            sessionStorage.setItem('appViewList', JSON.stringify(appViewList))
            that.setState({
              appLoginId: config.MenuID
            })
          }
        })
      },
@@ -1730,11 +1738,31 @@
    })
  }
  checklog = () => {
    const { oriConfig, config } = this.state
    return is(fromJS(oriConfig), fromJS(config))
  }
  updateLogConfig = (config) => {
    config.open_edition = this.state.config.open_edition || ''
    this.setState({
      config: null
    }, () => {
      this.setState({
        config: config
      })
    })
    window.GLOB.customMenu = config
  }
  render () {
    const { view, loading, comloading, activeKey, settingshow, controlshow, MenuId, config, menuloading, eyeopen, needUpdate } = this.state
    const { view, loading, comloading, activeKey, settingshow, controlshow, MenuId, config, menuloading, eyeopen, needUpdate, appLoginId, appHomeId } = this.state
    return (
      <ConfigProvider locale={antdZhCN}>
      <>
        <DndProvider backend={HTML5Backend}>
          {view !== 'popview' ? <div className={'mk-pc-view '} id="mk-pc-design-view">
            {loading ? <Spin className="view-spin" size="large" /> : null}
@@ -1747,17 +1775,18 @@
                <Collapse accordion activeKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}>
                  {/* 基本信息 */}
                  <Panel header="基本信息" key="basedata">
                    {/* 菜单信息 */}
                    {config ? <MenuForm
                      config={config}
                      MenuId={MenuId}
                      updateConfig={this.updateConfig}
                    /> : null}
                    {config ? <UrlFieldComponent config={config} updateConfig={this.updateConfig}/> : null}
                    {/* 表名添加 */}
                    {config ? <TableComponent config={config} updatetable={this.updateConfig}/> : null}
                    {config ? <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> : null}
                    {config ? <NormalCss config={config} updateConfig={this.updateConfig}/> : null}
                    {config ? <>
                      <MenuForm
                        config={config}
                        MenuId={MenuId}
                        updateConfig={this.updateConfig}
                      />
                      <UrlFieldComponent config={config} updateConfig={this.updateConfig}/>
                      {/* 表名添加 */}
                      <TableComponent config={config} updatetable={this.updateConfig}/>
                      <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph>
                      <NormalCss config={config} updateConfig={this.updateConfig}/>
                    </> : null}
                  </Panel>
                  {/* 组件添加 */}
                  <Panel header="组件" key="component">
@@ -1781,6 +1810,7 @@
                <Button type="primary" className={needUpdate ? 'update-tip' : ''} id="save-config" onClick={this.submitConfig} loading={menuloading}>保存</Button>
                {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null}
                <ArrowLeftOutlined title="后退" className="back-view" onClick={this.backView}/>
                {config ? <Debug config={config}/> : null}
                <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button>
                <CreateView resetmenu={this.getAppMenus} />
                <PasteController insert={this.insert} />
@@ -1790,12 +1820,11 @@
                <PictureController/>
                <Quotecomponent config={config} updateConfig={this.updateConfig}/>
                <StyleCombControlButton menu={config} />
                <Button className="mk-border-green" onClick={this.setHomeView}><HomeOutlined /> 设为首页</Button>
                <Button className="mk-border-purple" onClick={this.setLoginView}><LoginOutlined/> 设为登录页</Button>
                <Button className="mk-border-green" disabled={MenuId === appHomeId} onClick={this.setHomeView}><HomeOutlined /> 设为首页</Button>
                <Button className="mk-border-purple" disabled={MenuId === appLoginId} onClick={this.setLoginView}><LoginOutlined/> 设为登录页</Button>
                <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
                <Transfer MenuID={MenuId} />
                <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/>
                <Button className="mk-border-danger" onClick={this.refreshView}><RedoOutlined /> 强制刷新</Button>
                {config ? <Versions MenuId={MenuId} Template="webPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null}
                <Button type="default" onClick={this.closeView}>关闭</Button>
              </div>
            </div>
@@ -1810,7 +1839,7 @@
        <StyleController />
        <StyleCombController />
        <ModalController />
      </ConfigProvider>
      </>
    )
  }
}