king
2025-04-24 92664ef80a97a63fde223b14097ccda3ae6ff183
src/views/menudesign/index.jsx
@@ -35,9 +35,12 @@
const PasteController = asyncComponent(() => import('@/menu/pastecontroller'))
const StyleController = asyncComponent(() => import('@/menu/stylecontroller'))
const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
const DelExtraDb = asyncComponent(() => import('@/menu/delExtraDb'))
const LowerField = asyncComponent(() => import('@/menu/lowerField'))
const LowerText = asyncComponent(() => import('@/menu/lowerText'))
const Debug = asyncComponent(() => import('@/menu/debug'))
const NormalCss = asyncComponent(() => import('@/menu/normalCss'))
const NormalCopy = asyncComponent(() => import('@/menu/normalCopy'))
const Versions = asyncComponent(() => import('@/menu/versions'))
const TableNodes = asyncComponent(() => import('@/menu/tablenodes'))
const SysInterface = asyncComponent(() => import('@/menu/sysinterface'))
@@ -827,13 +830,7 @@
        }
        long_data = []
        // let oriIds = {}
        // if (config.allSqls) {
        //   config.allSqls.forEach(item => {
        //     if (!item.md5) return
        //     oriIds[item.uuid + item.md5] = item.v_id
        //   })
        // }
        let perm = true
        if (config.permission === 'false' || config.sqlperm === 'false') {
          perm = false
@@ -842,10 +839,6 @@
        config.allSqls = sqls.map(item => {
          let v_id = _t + getguid()
          // if (oriIds[item.uuid + item.md5]) {
          //   v_id = oriIds[item.uuid + item.md5]
          // }
          long_data.push(`${md5(window.GLOB.appkey + v_id)},${item.uuid},${v_id},${window.btoa(window.encodeURIComponent(item.LText))},${perm ? item.roleId || '' : ''}`)
          
          return {
@@ -853,7 +846,6 @@
            v_id: v_id,
            type: item.type,
            reps: item.reps,
            // md5: item.md5 || '',
            luser: item.luser === true
          }
        })
@@ -909,7 +901,7 @@
      let urlFields = config.urlFields ? config.urlFields.join(',') : ''
      let langSql = getLangTrans(config)
      let pds = 'false'
      if (config.interfaces) {
      if (config.interfaces && config.enabled) {
        config.interfaces.forEach(item => {
          if (item.status !== 'true') return
          pds = 'true'
@@ -926,7 +918,7 @@
        EasyCode: config.easyCode || '',
        Template: 'CustomPage',
        MenuName: config.MenuName || '',
        PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', menuColor: config.menuColor || '', interfaces, msg, pds, backend: 'level1', urlFields}),
        PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', menuColor: config.menuColor || '', interfaces, msg, pds, backend: 'level1', enabled: config.enabled, urlFields}),
        open_edition: config.open_edition,
        long_data: long_data,
        debug_md5: key,
@@ -1067,18 +1059,11 @@
    }, 300 + (+sessionStorage.getItem('mkDelay')))
  }
  netError = (error) => {
  netError = () => {
    this.setState({
      menuloading: false
    })
    if (!error) {
      notification.warning({
        top: 92,
        message: '保存失败,请检查网络是否正常。',
        duration: 5
      })
    }
    MKEmitter.emit('completeSave')
  }
@@ -1354,9 +1339,10 @@
                      />
                      {/* 表名添加 */}
                      <TableComponent config={config} updatetable={this.updateConfig}/>
                      <Paragraph style={{padding: '15px 0px 0px 37px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph>
                      <Paragraph style={{padding: '0px 0px 0px 18px'}}>菜单组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph>
                      <Paragraph style={{padding: '15px 0px 0px 32px'}} copyable={{ text: MenuId }}>菜单ID:</Paragraph>
                      <NormalCss config={config} updateConfig={this.updateConfig}/>
                      <Paragraph style={{padding: '0px 0px 0px 18px'}}>复制菜单下所有组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph>
                      <NormalCopy />
                    </> : null}
                  </Panel>
                  {/* 组件添加 */}
@@ -1383,7 +1369,10 @@
                  {config ? <Dropdown placement="bottomCenter" overlay={<div className="mk-opeartion-dropdown-wrap">
                    <ReplaceField config={config} updateConfig={this.resetConfig}/>
                    <LowerField config={config} updateConfig={this.resetConfig}/>
                    <DelExtraDb config={config} updateConfig={this.resetConfig}/>
                    <LowerText />
                    <PictureController/>
                    <Button onClick={() => window.open('#/ai')}>DeepSeek</Button>
                  </div>} trigger={['hover']}>
                    <div className="mk-button-more">更多<DownOutlined/></div>
                  </Dropdown> : null}