king
2023-09-07 4b467effbc0e3a9199146573c0ceedf404bd07c5
2023-09-07
7个文件已修改
165 ■■■■■ 已修改文件
src/menu/components/card/prop-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/tablenodes/index.jsx 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/rolemanage/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/prop-card/index.jsx
@@ -399,7 +399,7 @@
        <div className={`${card.wrap.layout || 'grid'}-layout float-${card.wrap.cardFloat || 'left'} select-${card.wrap.selStyle || ''}`}>
          {card.subcards.map(subcard => (<CardComponent key={subcard.uuid} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))}
        </div>
        {card.wrap.display === 'hidden' ? <HeatMapOutlined className="prop-hidden"/> : null}
        {card.wrap.display === 'hidden' ? <HeatMapOutlined title="组件隐藏" className="prop-hidden"/> : null}
        <div className="component-name">
          <div className="center">
            <div className="title" onDoubleClick={() => {
src/menu/tablenodes/index.jsx
@@ -153,6 +153,42 @@
            direction: 'left'
          })
        }
        if (cell.exInterface) {
          let url = ''
          try {
            url = JSON.parse(cell.exInterface).url
          } catch(e) {
            url = ''
          }
          if (url) {
            tbs.push({
              label: url + ' (' + cell.label + ')',
              color: 'orange',
              id: Utils.getuuid(),
              direction: 'left'
            })
          }
        }
        if (cell.exProInterface) {
          let url = ''
          try {
            url = JSON.parse(cell.exProInterface).url
          } catch(e) {
            url = ''
          }
          if (url) {
            tbs.push({
              label: url + ' (' + cell.label + ')',
              color: 'orange',
              id: Utils.getuuid(),
              direction: 'left'
            })
          }
        }
        if (cell.callbackFunc) {
          tbs.push({
            label: cell.callbackFunc + ' (' + cell.label + ')',
@@ -197,6 +233,42 @@
            id: Utils.getuuid(),
            direction: 'left'
          })
        }
        if (item.setting.exInterface) {
          let url = ''
          try {
            url = JSON.parse(item.setting.exInterface).url
          } catch(e) {
            url = ''
          }
          if (url) {
            tbs.push({
              label: url + ' (数据源)',
              color: 'orange',
              id: Utils.getuuid(),
              direction: 'left'
            })
          }
        }
        if (item.setting.exProInterface) {
          let url = ''
          try {
            url = JSON.parse(item.setting.exProInterface).url
          } catch(e) {
            url = ''
          }
          if (url) {
            tbs.push({
              label: url + ' (数据源)',
              color: 'orange',
              id: Utils.getuuid(),
              direction: 'left'
            })
          }
        }
      }
    }
@@ -749,7 +821,7 @@
          </div>
          <div className="footer">
            <Button key="cancel" onClick={() => { this.setState({ visible: false })}}>关闭</Button>
            <span className="tip">注:点击表名可展开/收起菜单</span>
            <span className="tip">注:点击表名(右侧)可展开/收起菜单,左侧橙色标注为接口或函数名。</span>
          </div>
        </Modal>
      </div>
src/utils/utils-custom.js
@@ -1227,50 +1227,16 @@
 * @description 获取接口及函数
 */
export function getFuncsAndInters (config) {
  let inters = []
  // let funcs = []
  let inters = 'false'
  let filterBtn = (cell) => {
    if (cell.intertype === 'inner') {
      // funcs.push(cell.innerFunc)
    } else if (cell.intertype === 'outer' || cell.intertype === 'custom') {
      // if (cell.innerFunc) {
      //   funcs.push(cell.innerFunc)
      // }
      // if (cell.outerFunc) {
      //   funcs.push(cell.outerFunc)
      // }
      if (cell.interface && cell.sysInterface !== 'true') {
        inters.push(cell.interface)
      }
      if (cell.proInterface) {
        inters.push(cell.proInterface)
      }
      // if (cell.callbackFunc) {
      //   funcs.push(cell.callbackFunc)
      // }
    }
  }
  let filterSetting = (item) => {
    if (!item.setting) return
    if (item.setting.interType === 'inner') {
      // funcs.push(item.setting.innerFunc)
    } else if (item.setting.interType === 'outer') {
      // if (item.setting.outerFunc) {
      //   funcs.push(item.setting.outerFunc)
      // }
      if (item.setting.interface && item.setting.sysInterface !== 'true') {
        inters.push(item.setting.interface)
      }
      if (item.setting.proInterface) {
        inters.push(item.setting.proInterface)
      }
    if ((cell.intertype === 'outer' && cell.sysInterface !== 'true') || cell.intertype === 'custom') {
      inters = 'true'
    }
  }
  let traversal = (components) => {
    if (!components) return
    if (!components || inters === 'true') return
    components.forEach(item => {
      if (item.type === 'tabs') {
@@ -1280,7 +1246,9 @@
      } else if (item.type === 'group') {
        traversal(item.components)
      } else {
        filterSetting(item)
        if (item.setting && item.setting.interType === 'outer' && item.setting.sysInterface !== 'true') {
          inters = 'true'
        }
        if (item.action) {
          item.action.forEach(cell => {
@@ -1363,15 +1331,15 @@
  if (config.interfaces) {
    config.interfaces.forEach(item => {
      filterSetting(item)
      if (item.setting && item.setting.interType === 'outer' && item.setting.sysInterface !== 'true') {
        inters = 'true'
      }
    })
  }
  traversal(config.components)
  // inters = Array.from(new Set(inters))
  return inters.length > 0 ? 'true' : 'false'
  return inters
}
/**
src/views/login/index.jsx
@@ -536,20 +536,20 @@
    Api.getTouristMsg().then(result => {
      if (result.status) {
        if (result.website && process.env.NODE_ENV === 'production') {
          let website = result.website.replace(/http(s)?:\/\/|\/$/ig, '').toLowerCase()
          let current = window.GLOB.baseurl.replace(/http(s)?:\/\/|\/$/ig, '').toLowerCase()
        // if (result.website && process.env.NODE_ENV === 'production') {
        //   let website = result.website.replace(/http(s)?:\/\/|\/$/ig, '').toLowerCase()
        //   let current = window.GLOB.baseurl.replace(/http(s)?:\/\/|\/$/ig, '').toLowerCase()
          if (website !== current) {
            try {
              window.history.replaceState(null, null, result.website.replace(/\/$/ig, '') + '/admin/index.html#/login')
              window.location.reload()
            } catch(e) {
              window.location.href = result.website.replace(/\/$/ig, '') + '/admin/index.html#/login'
            }
            return
          }
        }
        //   if (website !== current) {
        //     try {
        //       window.history.replaceState(null, null, result.website.replace(/\/$/ig, '') + '/admin/index.html#/login')
        //       window.location.reload()
        //     } catch(e) {
        //       window.location.href = result.website.replace(/\/$/ig, '') + '/admin/index.html#/login'
        //     }
        //     return
        //   }
        // }
        
        sessionStorage.setItem('visitorUserID', result.UserID || '')
        sessionStorage.setItem('visitorLoginUID', result.LoginUID || '')
src/views/mobdesign/index.jsx
@@ -1504,6 +1504,7 @@
      menus_used_list = window.btoa(window.encodeURIComponent(menus_used_list || 'del'))
      let interfaces = getFuncsAndInters(config)
      roleParam.interfaces = interfaces
      let param = {
        func: 'sPC_TrdMenu_AddUpt',
src/views/pcdesign/index.jsx
@@ -1204,6 +1204,7 @@
      }
      let interfaces = getFuncsAndInters(config)
      roleParam.interfaces = interfaces
      let param = {
        func: 'sPC_TrdMenu_AddUpt',
src/views/rolemanage/index.jsx
@@ -137,16 +137,11 @@
        let menus = result.menus.map(item => {
          item.nodes = ''
          item.type = 'view'
          if (item.PageParam) {
            try {
              let PageParam = JSON.parse(item.PageParam)
              item.interfaces = PageParam.interfaces || 'false'
            } catch (e) {}
          }
          if (item.menus_rolelist) {
            try {
              let pageParam = JSON.parse(window.decodeURIComponent(window.atob(item.menus_rolelist)))
              item.nodes = pageParam
              item.interfaces = pageParam.interfaces || 'false'
              
              if (pageParam.type) {
                item.type = pageParam.type