import request from '@/utils/request'

/**
 * 脱敏策略 - 列表查询
 * @param {*} query 
 * @returns 
 */
export function getTableList(data) {
  return request({
    url: '/core/desensitizationStrategy/loadDesensitizationStrategy',
    method: 'post',
    data: data
  })
}

export function queryAll(query) {
  return request({
    url: '/console/role/queryAll',
    method: 'get',
    params: query
  })
}


export function desensitizationruleQuery(query) {
  return request({
    url: '/core/desensitizationrule/query?dataarea=',
    method: 'get',
    params: query
  })
}
export function queryversion(data) {
  return request({
    url: '/core/fieldscopedata/queryversion',
    method: 'post',
    data: data
  })
}
export function queryTask(data) {
  return request({
    url: '/core/fieldscopedata/queryTask',
    method: 'post',
    data: data
  })
}


export function queryProVersion(data) {
  return request({
    url: '/core/fieldscopedata/queryProVersion',
    method: 'post',
    data: data
  })
}
export function queryTaskVersion(query) {
  return request({
    url: '/core/fieldscopedata/queryTaskVersion',
    method: 'get',
    params: query
  })
}

export function tdatasourceQuery(data) {
  return request({
    url: '/core/tdatasource/query',
    method: 'post',
    data: data
  })
}
export function queryShemas(data) {
  return request({
    url: '/core/modifysubsettask/queryShemas',
    method: 'post',
    data: data
  })
}

export function rowsensitivelevel(tableName,data) {
  return request({
    url: '/core/rowsensitivelevel/' + tableName,
    method: 'post',
    data: data
  })
}

export function queryDesensitizationTables(data) {
  return request({
    url: '/core/rowsensitivelevel/queryDesensitizationTables',
    method: 'post',
    data: data
  })
}

export function queryOriginalList(data) {
  return request({
    url: '/core/encryptionconfig/queryOriginalList',
    method: 'post',
    data: data
  })
}

export function desensitizationStrategyDetails(data) {
  return request({
    url: '/core/desensitizationStrategy/desensitizationStrategyDetails',
    method: 'post',
    data: data
  })
}
export function save(data) {
  return request({
    url: '/core/desensitizationStrategy/save',
    method: 'post',
    data: data
  })
}
export function remove(data) {
  return request({
    url: '/core/desensitizationStrategy/remove',
    method: 'post',
    data: data
  })
}

export function disableOrEnable(data) {
  return request({
    url: '/core/desensitizationStrategy/disableOrEnable',
    method: 'post',
    data: data
  })
}
