import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/safeStorage/` + url, ...arg)
const requestDEl = (url, ...arg) => baseRequest(`/orgInfo/info/` + url, ...arg)
const requestACC = (url, ...arg) => baseRequest(`/device/` + url, ...arg)
const requestUUL = (url, ...arg) => baseRequest(`/statistical/` + url, ...arg)
const requestDQ = (url, ...arg) => baseRequest(`/biz/` + url, ...arg)

// //
export default {
	XJGLlist(data) {
		return request('sspatrolreport/page', data, 'get')
	},
	//add
	XJGLadd(data) {
		return request('sspatrolreport/add', data, 'post')
	},
	getAllList(data) {
		return requestDEl('getAllList', data, 'get')
	},
	//view
	XJGLview(data) {
		return request('sspatrolreport/detail', data, 'get')
	},
	//edit
	XJGLedit(data) {
		return request('sspatrolreport/edit', data, 'post')
	},
	//del
	XJGLdel(data) {
		return request('sspatrolreport/delete', data, 'post')
	},
	//巡检管理-巡查点管理表分页
	XCDlist(data) {
		return request('sspatrolpoint/page', data, 'get')
	},
	//add
	XCDadd(data) {
		return request('sspatrolpoint/add', data, 'post')
	},
	//view
	XCDview(data) {
		return request('sspatrolpoint/detail', data, 'get')
	},
	//edit
	XCDedit(data) {
		return request('sspatrolpoint/edit', data, 'post')
	},
	// del
	XCDdel(data) {
		return request('sspatrolpoint/delete', data, 'post')
	},
	// 安全风险事故管理表分页
	AQSGGLlist(data) {
		return request('ssriskaccident/page', data, 'get')
	},
	//add
	AQSGGLadd(data) {
		return request('ssriskaccident/add', data, 'post')
	},
	//del
	AQSGGLdel(data) {
		return request('ssriskaccident/delete', data, 'post')
	},
	// view
	AQSGGLview(data) {
		return request('ssriskaccident/detail', data, 'get')
	},
	// edit
	AQSGGLedit(data) {
		return request('ssriskaccident/edit', data, 'post')
	},
	//维保报告分页
	WBBAlist(data) {
		return requestACC('repair/page', data, 'get')
	},
	WBBAlnumber(data) {
		return requestACC('repair/number', data, 'get')
	},
	WBBAloadDataById(data) {
		return requestACC('repair/loadDataById', data, 'get')
	},
	WBBAlupdateById(data) {
		return requestACC('repair/updateById', data, 'post')
	},
	// *获取安全仓储-消防水源管理表分页
	XFSYGLedit(data) {
		return request('ssfirewatersource/page', data, 'get')
	},
	//消防水源阈值设置表分页
	YZSZedit(data) {
		return request('ssfirewatersourcethreshold/page', data, 'get')
	},
	// add
	YZSZadd(data) {
		return request('ssfirewatersourcethreshold/add', data, 'post')
	},
	// detail
	YZSZdetail(data) {
		return request('ssfirewatersourcethreshold/detail', data, 'get')
	},
	// edit
	YZSZDELedit(data) {
		return request('ssfirewatersourcethreshold/edit', data, 'post')
	},
	YZSZDELdelete(data) {
		return request('ssfirewatersourcethreshold/delete', data, 'post')
	},
	// 统计分析
	TJFXpage(data) {
		return requestUUL('analysis/page', data, 'get')
	},
	TJFXviewPage(data) {
		return requestUUL('analysis/detailsPage', data, 'get')
	},
	TJFXviewgetByMasterId(data) {
		return requestUUL('analysis/getByMasterId', data, 'get')
	},
	//地区
	TJFXDQ(data) {
		return requestDQ('dict/getByParentId', data, 'get')
	}
}
