king
2024-07-10 7538bd155f6557db06c9ed9422dad6216a696287
Merge branch 'develop'
3个文件已修改
93 ■■■■ 已修改文件
src/views/mobdesign/index.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/rolemanage/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx
@@ -74,7 +74,9 @@
    viewType: 'menu',
    view: '',
    eyeopen: false,
    needUpdate: false
    needUpdate: false,
    appLoginId: '',
    appHomeId: ''
  }
  UNSAFE_componentWillMount() {
@@ -139,10 +141,29 @@
          adapters = []
        }
        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({
          adapters,
          MenuId: param.MenuID,
          viewType: /^userbind/.test(param.MenuID) ? 'userbind' : 'menu'
          viewType: /^userbind/.test(param.MenuID) ? 'userbind' : 'menu',
          appLoginId: appLoginId,
          appHomeId: appHomeId
        }, () => {
          this.getMenuParam(param)
        })
@@ -1942,6 +1963,8 @@
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt('', param.timestamp)
    const that = this
    confirm({
      title: '确定设置本页面为首页吗?',
      content: '',
@@ -1955,6 +1978,10 @@
            })
          } else {
            sessionStorage.setItem('appViewList', JSON.stringify(appViewList))
            that.setState({
              appHomeId: config.MenuID
            })
          }
        })
      },
@@ -2002,6 +2029,7 @@
    param.secretkey = Utils.encrypt('', param.timestamp)
    let hasLogin = config.components.findIndex(item => item.type === 'login') > -1
    const that = this
    confirm({
      title: '确定设置本页面为登录页吗?',
@@ -2016,6 +2044,10 @@
            })
          } else {
            sessionStorage.setItem('appViewList', JSON.stringify(appViewList))
            that.setState({
              appLoginId: config.MenuID
            })
          }
        })
      },
@@ -2080,7 +2112,7 @@
  render () {
    const { view, viewType, comloading, loading, settingshow, controlshow, activeKey, MenuId, config, menuloading, adapters, eyeopen, needUpdate } = this.state
    const { view, viewType, comloading, loading, settingshow, controlshow, activeKey, MenuId, config, menuloading, adapters, eyeopen, needUpdate, appLoginId, appHomeId } = this.state
    return (
      <div className={'mk-mob-view ' + viewType} id="mk-mob-design-view">
@@ -2148,8 +2180,8 @@
              <PictureController/>
              <Quotecomponent config={config} updateConfig={this.updateConfig}/>
              <StyleCombControlButton menu={config} />
              <Button className="mk-border-green set-home" onClick={this.setHomeView}><HomeOutlined /> 设为首页</Button>
              <Button className="mk-border-purple set-login" onClick={this.setLoginView}><LoginOutlined /> 设为登录页</Button>
              <Button className="mk-border-green set-home" disabled={MenuId === appHomeId} onClick={this.setHomeView}><HomeOutlined /> 设为首页</Button>
              <Button className="mk-border-purple set-login" disabled={MenuId === appLoginId} onClick={this.setLoginView}><LoginOutlined /> 设为登录页</Button>
              <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
              <Transfer MenuID={MenuId} />
              {config ? <Versions MenuId={MenuId} Template="webPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null}
src/views/pcdesign/index.jsx
@@ -68,7 +68,9 @@
    eyeopen: false,
    view: '',
    popConfig: null,
    needUpdate: false
    needUpdate: false,
    appLoginId: '',
    appHomeId: ''
  }
  UNSAFE_componentWillMount() {
@@ -121,8 +123,27 @@
        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)
        })
@@ -1625,6 +1646,8 @@
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt('', param.timestamp)
    const that = this
    confirm({
      title: '确定设置本页面为首页吗?',
      content: '',
@@ -1638,6 +1661,10 @@
            })
          } else {
            sessionStorage.setItem('appViewList', JSON.stringify(appViewList))
            that.setState({
              appHomeId: config.MenuID
            })
          }
        })
      },
@@ -1685,6 +1712,7 @@
    param.secretkey = Utils.encrypt('', param.timestamp)
    let hasLogin = config.components.findIndex(item => item.type === 'login') > -1
    const that = this
    confirm({
      title: '确定设置本页面为登录页吗?',
@@ -1699,6 +1727,10 @@
            })
          } else {
            sessionStorage.setItem('appViewList', JSON.stringify(appViewList))
            that.setState({
              appLoginId: config.MenuID
            })
          }
        })
      },
@@ -1727,7 +1759,7 @@
  }
  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 (
      <>
@@ -1788,8 +1820,8 @@
                <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} />
                {config ? <Versions MenuId={MenuId} Template="webPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null}
src/views/rolemanage/index.jsx
@@ -26,7 +26,7 @@
    columns: [
      {
        title: '菜单名称', dataIndex: 'MenuName', key: 'MenuName', align: 'center', render: (text, record) => {
          if (record.extra) {
          if (record.extra || this.state.appKeys.includes(record.MenuID)) {
            return <span style={{color: '#1890ff'}}>{text}</span>
          } else if (record.interfaces === 'true') {
            return <span><ApiOutlined style={{color: 'orange', marginRight: '5px'}} title="菜单中使用了外部接口" />{text}</span>
@@ -74,7 +74,8 @@
    trees: null,
    expandedKeys: [],
    searchkey: '',
    appViewList: []
    appViewList: [],
    appKeys: []
  }
  oriTrees = null
@@ -118,7 +119,9 @@
        })
        return
      }
      this.setState({appViewList: result.data || []})
      let data = result.data || []
      this.setState({appViewList: data, appKeys: data.map(item => item.keys_id)})
    })
  }