/**
 * 隐患专题
 */
import request from '@/utils/request'
import { getSignTimeStamp } from '@/utils/mathUtils'
import Vue from 'vue'

// 水保隐患
export function getThreat(type) {
  const baseConfig = Vue.prototype.baseConfig
  const { sign, username, timestamp } = getSignTimeStamp()
  return request({
    url: baseConfig.biUrl + '/factdata/index/getData',
    method: 'post',
    data: {
      'showField': 'WD63_04,WD63_05,WD63_06,WD63_07,WD63_08,WD63_09,WD63_10,WD63_11,WD63_12,WD63_13,WD63_14,WD63_15,WD63_16',
      'dimId': '5CD7C73A7BC24A7F9A7EF8F60F1275CA',
      'distinct': true,
      'type': 1,
      'conditionList': [
        [
          {
            'condition': '3',
            'key': 'WD63_04',
            'indexDimValues': type
          }
        ],
        [
          {
            'condition': '2',
            'key': 'WD63_05',
            'indexDimValues': '完工'
          }
        ]
      ],
      'pageNo': null,
      'pageSize': null,
      'sign': sign,
      'name': username,
      'time': timestamp
    }
  })
}
