import request from '../../../utils/request'

//职业危害名称
export function getIdentifying(params) {
	params.IgnoreDataRule = true;
	params.SelectField = [
		"NAME",
		"ID",
	]
	return new Promise((resolve, reject) => {
		request.post("/HM/Identifying/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//危险源记录驳回
export function getRiskRecordRefus(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMHazardRecord/GetRejectContent", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//区域列表
export function getAreaLists(params) {
	return new Promise((resolve, reject) => {
		request.post("/HM/HMRiskTask/OrderPagedArea", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
// 作业任务库
export function getOperationLinkFullOrderPaged(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMOperationLink/FullOrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

// 作业任务库查看
export function getOperationLinkGetEdit(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMOperationLink/GetEdit", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//作业任务识别查看
export function getIdentifyGet(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMJobtaskIdentify/GetEdit", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//作业任务识别保存
export function saveIdentifyRecord(params) {
	return new Promise((resolve, reject) => {
		request.post("/HM/HMJobtaskIdentify/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//作业任务识别岗位
export function getDetailPostLists(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/FM/UserPost/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//作业任务分析查看
export function getAnalyzeGet(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMOperationTaskDistinguishAnalyze/GetEdit", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//作业任务分析保存
export function saveAnalyzeRecord(params) {
	return new Promise((resolve, reject) => {
		request.post("/HM/HMOperationTaskDistinguishAnalyze/AllUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}


//一般作业分析查看
export function getOrdinaryGet(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMOrdinaryTaskAnalysis/GetEdit", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//一般作业分析保存
export function saveOrdinaryRecord(params) {
	return new Promise((resolve, reject) => {
		request.post("/HM/HMOrdinaryTaskAnalysis/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//关键作业分析查看
export function getCrucialGet(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMCrucialTaskAnalysis/GetEdit", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//关键作业分析保存
export function saveCrucialRecord(params) {
	return new Promise((resolve, reject) => {
		request.post("/HM/HMCrucialTaskAnalysis/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}


//许可作业分析查看
export function getLicenseGet(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMLicenseAnalysis/GetEdit", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
export function getFilePublishGet(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMFilePublish/GetEdit", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//许可作业分析保存
export function saveLicenseRecord(params) {
	return new Promise((resolve, reject) => {
		request.post("/HM/HMLicenseAnalysis/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
export function saveFilePublishRecord(params) {
	return new Promise((resolve, reject) => {
		request.post("/HM/HMFilePublish/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//作业任务识别确认
export function getIdentitySign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMJobtaskIdentify/IdentityUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//作业任务分析确认
export function getAnalyzeSign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMOperationTaskDistinguishAnalyze/IdentityUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//一般作业分析确认
export function getOrdinarySign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMOrdinaryTaskAnalysis/IdentityUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//关键作业分析确认
export function getCrucialSign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMCrucialTaskAnalysis/IdentityUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//许可作业分析确认
export function getLicenseSign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMLicenseAnalysis/IdentityUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//文件发布已阅
export function getFilePublishSign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/HMFilePublish/ChangeStatus", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//任务识别获取作业名称
export function getOperationStep(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/HM/OperationStep/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//获取伤害
export function getAnalyzeHLists(params) {
	return new Promise((resolve, reject) => {
		request.post("/HM/OperationTaskDistinguishAnalyzeH/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//获取损失
export function getAnalyzeLLists(params) {
	return new Promise((resolve, reject) => {
		request.post("/HM/OperationTaskDistinguishAnalyzeL/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//获取环境污染
export function getAnalyzeELists(params) {
	return new Promise((resolve, reject) => {
		request.post("/HM/OperationTaskDistinguishAnalyzeE/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//获取概率
export function getAnalyzePLists(params) {
	return new Promise((resolve, reject) => {
		request.post("/HM/OperationTaskDistinguishAnalyzeP/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//获取重复发生率
export function getAnalyzeRLists(params) {
	return new Promise((resolve, reject) => {
		request.post("/HM/OperationTaskDistinguishAnalyzeR/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//获取许可类别
export function getWorkPermitTypeLists(params) {
	return new Promise((resolve, reject) => {
		request.post("/HM/WorkPermitType/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}