AuditModel.js 1.93 KB
Newer Older
DarkForst's avatar
DarkForst committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
import { autoCreateEffects } from '@/utils/handleModels';

import {
  // device_service_control_audit_post,//query list
  // device_service_control_audit_patch,//审计
  // device_service_control_audit_id_get,//by id
  // device_service_operation_log_post,
  device_service_system_info_log_push_gatewayId_get
} 
from '@/sdk/api/device';

import { account_service_operationLog_post } from '@/sdk/api/account';

export default {
  namespace: 'auditModel',
  state: {
    operationLogList: [],
    controlAuditList: [], //设备操作列表
    auditDetail: {},
    systemLogList: [], //系统登录日志
    systemList:{}
  },
  effects: {
    ...autoCreateEffects([
      {
        type: 'device_service_system_info_log_push_gatewayId_get',
        api: device_service_system_info_log_push_gatewayId_get,
        handle: 'content',//系统日志
        key:'systemList'
      },
      // {
      //   type: 'device_service_operation_log_post',
      //   api: device_service_operation_log_post,
      //   handle: 'content',//查设备操作日志
      //   key:'operationLogList'
      // },
      // {
      //   type: 'device_service_control_audit_post',
      //   api: device_service_control_audit_post,
      //   handle: 'content',//查操作日志
      //   key:'controlAuditList'
      // },
      // {
      //   type: 'device_service_control_audit_patch',
      //   api: device_service_control_audit_patch
      // },
      // {
      //   type: 'device_service_control_audit_id_get',
      //   api: device_service_control_audit_id_get,
      //   handle: 'item',//审计detail
      //   key:'auditDetail'
      // },
      {
        type: 'account_service_operationLog_post',
        api: account_service_operationLog_post,
        handle: 'content',//系统登录日志
        key:'systemLogList'
      }
    ]),
  },
  reducers: {
    setModelsState(state, action) {
      return {
        ...state,
        ...action.payload,
      };
    },
  },
};