king
2024-10-17 044a4ec4ebe85f8c00e889fe3914de17a6ea1f28
src/components/querylog/index.jsx
@@ -48,51 +48,42 @@
    })
    let userid = sessionStorage.getItem('UserID') || ''
    let LText = [...logMap.values()].map(item => `select '${item.menuId}','${item.times}','${item.name}','${window.GLOB.appkey}','${userid}'`)
    let LText = [...logMap.values()].map(item => `select '${item.menuId}','${item.times}','${item.name || ''}','${window.GLOB.appkey}','${userid}'`)
    Api.genericInterface({func: 's_get_local_users_operation_log'}).then(res => {
      if (!res.status) {
    if (LText.length === 0) {
      setTimeout(() => {
        this.sendLog()
      }, 600000)
      return
    }
    // {func: 's_get_local_users_operation_log'} 本地接口 返回 long_param 传入 sso 的 s_get_users_operation_log
    let param = {
      func: 's_get_users_operation_log',
      exec_type: window.GLOB.execType || 'y',
      LText: LText.join(' union all '),
      long_param: ''
    }
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt('', param.timestamp)
    param.LText = Utils.formatOptions(param.LText, param.exec_type)
    Api.getSystemConfig(param).then(result => {
      if (!result.status) {
        notification.warning({
          top: 92,
          message: res.message,
          message: result.message,
          duration: 3
        })
        return
      }
      if (LText.length === 0 && !res.long_param) {
        setTimeout(() => {
          this.sendLog()
        }, 600000)
        return
      }
      let param = {
        func: 's_get_users_operation_log',
        exec_type: 'y',
        LText: LText.join(' union all '),
        long_param: res.long_param
      }
      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
      param.secretkey = Utils.encrypt('', param.timestamp)
      param.LText = Utils.formatOptions(param.LText)
      Api.getSystemConfig(param).then(result => {
        if (!result.status) {
          notification.warning({
            top: 92,
            message: result.message,
            duration: 3
          })
          return
        }
        setTimeout(() => {
          this.sendLog()
        }, 600000)
        this.setState({logs: []})
      })
      setTimeout(() => {
        this.sendLog()
      }, 600000)
      this.setState({logs: []})
    })
  }