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

export function getRequest(params,url) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post(url, params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
export function getRequestOrderPage(params,url) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post(url, params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//安全生产方针征集表已阅
export function getPolicyCollectSign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/PT/PTSafetyPolicySurvey/IdentityUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//安全生产方针与目标
export function getformulationDepartmentSign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/PT/PTIndicatorFormulationDepartment/IdentityUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//安全生产方针与目标
export function saveformulationDepartment(params) {
	return new Promise((resolve, reject) => {
		request.post("/PT/PTIndicatorFormulationDepartment/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//考核方案审核
export function savePlanAudit(params) {
	return new Promise((resolve, reject) => {
		request.post("/PT/PTAssessmentPlanAudit/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//考核方案审核
export function getPlanAuditSign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/PT/PTAssessmentPlanAudit/IdentityUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//监测与考核记录
export function getmonitorAssessmentSign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/PT/PTMonitorAssessment/IdentityUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//监测与考核记录
export function saveMonitorAssessment(params) {
	return new Promise((resolve, reject) => {
		request.post("/PT/PTMonitorAssessment/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//变化识别评估表
export function saveChangeIdentify(params) {
	return new Promise((resolve, reject) => {
		request.post("/PR/PRChangeIdentifyEvaluation/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
export function savePolicyInvest(params) {
	return new Promise((resolve, reject) => {
		request.post("/PT/PTSafetyPolicySurvey/SingleUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//变化类型
export function getChangeTypeLists(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/PR/ChangeType/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
export function getCollectRequirements(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/PT/CollectRequirements/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
export function getGuids(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/PT/IntentionalGuidelines/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
export function getTaskLists(params) {
  return new Promise((resolve, reject) => {
    request.post("/PR/PerformTaskSet/OrderPaged", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
//变化识别落实表
export function saveChangeImplement(params) {
	return new Promise((resolve, reject) => {
		request.post("/PR/PRChangeTaskImplement/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//变化识别验收表
export function saveChangeAcceptance(params) {
	return new Promise((resolve, reject) => {
		request.post("/PR/PRChangeAcceptance/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}