import request from '../../../../utils/request'
import '@/utils/showMsg.js'

export function orderPage(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/SafeCheck/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//BS034
export function GetCheckInfo034ShowPrint(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheck/GetCheckInfo034ShowPrint", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

// safeCheckShow
export function GetCheckAllInfo034View(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheck/GetCheckAllInfo034View", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//检查登记
export function GetUserCheckInfoBS057(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheck/GetUserCheckInfoBS057", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//检查登记 确认
export function FullCheckUpdateBS057(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheck/FullCheckUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//检查确认 获取数据
export function GetUserCheckInfoBS034(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheck/GetUserCheckInfoBS034", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//检查确认 确认
export function FullCheckUpdateBS034(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheck/FullCheckUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}



//检查记录  登记 隐患原因
export function orderPagedRiskReason(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/RiskReason/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//检查记录  登记 检查问题描述
export function GetCheckDetailDESCREPTION(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSCheckQuestion/GetCheckDetailDESCREPTION", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//检查记录确认退回
export function GetDetailRejectModel(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheckDetailReject/GetDetailRejectModel", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}


// 检查记录确认退回  问题描述 选择
export function GetRejectCheckDetailDESCREPTION(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSCheckQuestion/GetRejectCheckDetailDESCREPTION", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

// 检查记录确认退回  提交
export function RejectUpdate(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheckDetailReject/RejectUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//检查任务制定
export function GetInfo(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheck/GetInfo", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//检查任务制定提交
export function FullUpdateBS032(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheck/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}


//获取检查类型
export function CheckTypeOrderPaged(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSCheckType/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}
//获取检查类型下的检查层级
export function CheckTypeLevelOrderPaged(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSCheckTypeLevel/OrderPagedLevel", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//获取检查区域
export function OrderPagedAreaMineType(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheck/OrderPagedAreaMineType", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//获取检查项目
export function CheckProjectOrderPaged(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSCheckProject/OrderPagedSTATUS", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//获取检查项目分类
export function OrderPagedProjectCategory(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheck/OrderPagedProjectCategory", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//检查任务制定 获取检查明细
export function OrderPagedSafeCheckDetail(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheck/OrderPagedSafeCheckDetail", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//检查任务制定 获取检查内容
export function OrderPagedSuitAll(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSCheckContents/OrderPagedSuitAll", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//检查任务制定 获取检查依据
export function LawOrderPaged(params) {
	return new Promise((resolve, reject) => {
		request.post("/SC/StandardCreate/OrderPaged", params).then((result) => {///LR/Law/OrderPaged
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}