king
2021-10-21 1da6506bf58270bacc2a4345002c6b082835580e
src/views/appmanage/index.jsx
@@ -313,8 +313,8 @@
      })
      let kei_no = res.appId.split(',')[1]
      let lang = res.subAppId.split(',')[1]
      let kei_no_detail = res.subAppId.split(',')[2]
      let lang = res.subAppId ? res.subAppId.split(',')[1] : ''
      let kei_no_detail = res.subAppId ? res.subAppId.split(',')[2] : ''
      
      let param = {
        func: 's_sVersionDetail_CloudAdd',
@@ -458,6 +458,20 @@
          item.sublist = item.data_detail || []
          item.sublist = item.sublist.map(cell => {
            cell.ID = cell.d_id
            if (cell.customize_param) {
              let _param = {}
              try {
                _param = JSON.parse(window.decodeURIComponent(window.atob(cell.customize_param)))
              } catch (e) {
                _param = {}
              }
              cell.copyright = _param.copyright || ''
              cell.logo = _param.logo || ''
              cell.apptype = _param.apptype || ''
              cell.delay = _param.delay || 0
            }
            return cell
          })
@@ -471,13 +485,12 @@
        if (!selectApp && applist[0]) {
          selectApp = applist[0]
        }
        this.setState({
          loading: false,
          applist: applist,
          selectApp
        })
      } else {
        this.setState({
          loading: false
@@ -578,6 +591,7 @@
      exec_type: 'y',
      remark: selectApp.remark,
      kei_no: selectApp.kei_no,
      cus_param_type: 'A',
      LText: ''
    }
@@ -588,7 +602,7 @@
    sublist = sublist.filter(item => item.ID !== record.ID)
    // param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}'`)
    param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}'`)
    param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0})))}'`)
    param.LText = param.LText.join(' union all ')
    param.LText = Utils.formatOptions(param.LText)
    
@@ -767,19 +781,35 @@
  }
  
  submitCard = () => {
    const { selectApp, visible } = this.state
    const { selectApp, visible, applist } = this.state
    this.mobcardRef.handleConfirm().then(res => {
      this.setState({
        confirmloading: true
      })
      let ID = ''
      if (visible === 'edit') {
        ID = selectApp.ID
      } else {
        let lowerKei = res.kei_no.toLowerCase()
        if (lowerKei === 'mob') {
          notification.warning({
            top: 92,
            message: '应用编码不允许使用mob!',
            duration: 3
          })
          return
        } else if (applist.filter(app => app.kei_no.toLowerCase() === lowerKei).length > 0) {
          notification.warning({
            top: 92,
            message: '应用编码已存在!',
            duration: 3
          })
          return
        }
        ID = md5(window.GLOB.appkey + res.kei_no)
      }
      this.setState({
        confirmloading: true
      })
      let param = {
        func: 's_kei_addupt',
@@ -787,6 +817,7 @@
        exec_type: 'y',
        remark: res.remark,
        kei_no: res.kei_no,
        cus_param_type: 'A',
        LText: ''
      }
@@ -795,7 +826,7 @@
      if (visible === 'edit') {
        // param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}'`)
        param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}'`)
        param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0})))}'`)
        param.LText = param.LText.join(' union all ')
        param.LText = Utils.formatOptions(param.LText)
      }
@@ -856,6 +887,7 @@
        exec_type: 'y',
        remark: selectApp.remark,
        kei_no: selectApp.kei_no,
        cus_param_type: 'A',
        LText: ''
      }
@@ -880,7 +912,7 @@
      }
      // param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}'`)
      param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}'`)
      param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0})))}'`)
      param.LText = param.LText.join(' union all ')
      param.LText = Utils.formatOptions(param.LText)
@@ -1029,8 +1061,8 @@
                      </Col>
                      <Col span={12}>
                        <div className="app-item">
                          {/* <div className="label">登录:</div>
                          <div className="content">{item.login_types === 'false' ? '不需要' : '需要'}</div> */}
                          {/* <div className="label">皮肤:</div>
                          <div className="content" style={{color: color}}>{css}</div> */}
                        </div>
                      </Col>
                      <Col span={12}>
@@ -1058,10 +1090,22 @@
                      </Col>
                      <Col span={12}>
                        <div className="app-item">
                          <div className="label">网站图标:</div>
                          <div className="label">网站头像:</div>
                          <div className="content">{item.favicon ? <img style={{width: '18px', height: '18px'}} src={item.favicon} alt="" /> : '无'}</div>
                        </div>
                      </Col>
                      <Col span={12}>
                        <div className="app-item">
                          <div className="label">版权:</div>
                          <div className="content">{item.copyright || '无'}</div>
                        </div>
                      </Col>
                      <Col span={12}>
                        <div className="app-item">
                          <div className="label">LOGO:</div>
                          <div className="content">{item.logo ? <img style={{height: '18px'}} src={item.logo} alt="" /> : '无'}</div>
                        </div>
                      </Col>
                    </Row>
                    <div className="action">
                      <Button type="link" onClick={() => this.jumpMenu(item)} style={{color: 'rgba(30, 228, 224, 1)'}}>菜单&权限</Button>