428 lines
		
	
	
		
			13 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			428 lines
		
	
	
		
			13 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
<template>
 | 
						||
	<view class="todo-page">
 | 
						||
		<uni-card margin="0" :is-shadow="true">
 | 
						||
			<u--form labelPosition="left" labelWidth="auto" labelAlign="center" :model="model">
 | 
						||
				<u-form-item label="添加时间:" prop="model.CREATE_TIME" borderBottom>
 | 
						||
					<u--input v-model="model.CREATE_TIME" border="none" slot="right" inputAlign="right" disabled
 | 
						||
						disabledColor="#fff"></u--input>
 | 
						||
				</u-form-item>
 | 
						||
				<u-form-item label="风险名称:" prop="model.NAME" borderBottom>
 | 
						||
					<u--input v-model="model.NAME" border="none" inputAlign="right" disabled
 | 
						||
						disabledColor="#fff"></u--input>
 | 
						||
				</u-form-item>
 | 
						||
				<u-form-item label="辨识区域:" prop="Nav_Area.NAME" borderBottom>
 | 
						||
					<u--input v-model="model.Nav_Area.NAME" border="none" slot="right" inputAlign="right" disabled
 | 
						||
						disabledColor="#fff"></u--input>
 | 
						||
				</u-form-item>
 | 
						||
				<u-form-item label="岗位:" prop="Posts" borderBottom>
 | 
						||
				</u-form-item>
 | 
						||
				<u--textarea v-model="model.Posts" border="none" inputAlign="right" disabled></u--textarea>
 | 
						||
				<!-- <u-form-item label="作业环节:" prop="Nav_OperationStep.NAME" borderBottom>
 | 
						||
					<u--input v-model="model.Nav_OperationStep.NAME" border="none" slot="right" inputAlign="right"
 | 
						||
						disabled disabledColor="#fff"></u--input>
 | 
						||
				</u-form-item> -->
 | 
						||
 | 
						||
				<u-form-item label="辨识对象:" prop="Nav_Identifying.NAME" borderBottom>
 | 
						||
					<u--input v-model="model.Nav_Identifying.NAME" border="none" slot="right" inputAlign="right"
 | 
						||
						disabled disabledColor="#fff"></u--input>
 | 
						||
				</u-form-item>
 | 
						||
				<u-form-item label="风险类别:" prop="Nav_Type.NAME" borderBottom>
 | 
						||
					<u--input autoHeight v-model="model.Nav_Type.NAME" border="none" inputAlign="right" disabled
 | 
						||
						disabledColor="#fff"></u--input>
 | 
						||
				</u-form-item>
 | 
						||
				<u-form-item label="风险地点:" prop="RISK_PLACE" borderBottom>
 | 
						||
					<u--input autoHeight v-model="model.RISK_PLACE" border="none" inputAlign="right" disabled
 | 
						||
						disabledColor="#fff"></u--input>
 | 
						||
				</u-form-item>
 | 
						||
				<u-form-item label="相关设备:" prop="Equs" borderBottom>
 | 
						||
				</u-form-item>
 | 
						||
				<u--textarea v-model="model.Equs" border="none" inputAlign="right" disabled></u--textarea>
 | 
						||
				<u-form-item label="风险评价L:" prop="EVALUATE_L" borderBottom>
 | 
						||
					<u--input v-model="model.EVALUATE_L" border="none" slot="right" inputAlign="right" disabled
 | 
						||
						disabledColor="#fff"></u--input>
 | 
						||
				</u-form-item>
 | 
						||
				<u-form-item label="风险评价E:" prop="EVALUATE_E" borderBottom>
 | 
						||
					<u--input v-model="model.EVALUATE_E" border="none" slot="right" inputAlign="right" disabled
 | 
						||
						disabledColor="#fff"></u--input>
 | 
						||
				</u-form-item>
 | 
						||
				<u-form-item label="风险评价C:" prop="EVALUATE_C" borderBottom>
 | 
						||
					<u--input v-model="model.EVALUATE_C" border="none" slot="right" inputAlign="right" disabled
 | 
						||
						disabledColor="#fff"></u--input>
 | 
						||
				</u-form-item>
 | 
						||
				<u-form-item label="分值D:" prop="EVALUATE_SCORE" borderBottom>
 | 
						||
					<u--input v-model="model.EVALUATE_SCORE" border="none" slot="right" inputAlign="right" disabled
 | 
						||
						disabledColor="#fff"></u--input>
 | 
						||
				</u-form-item>
 | 
						||
				<u-form-item label="风险等级:" prop="EVALUATE_LEVEL" borderBottom>
 | 
						||
					<u--input v-model="model.EVALUATE_LEVEL" border="none" slot="right" inputAlign="right" disabled
 | 
						||
						disabledColor="#fff"></u--input>
 | 
						||
				</u-form-item>
 | 
						||
				<u-form-item label="个体防护措施:" prop="Measure1" borderBottom>
 | 
						||
				</u-form-item>
 | 
						||
				<u--textarea v-model="model.Measure1" border="none" inputAlign="right" disabled></u--textarea>
 | 
						||
				<u-form-item label="工程控制措施:" prop="Measure2" borderBottom>
 | 
						||
				</u-form-item>
 | 
						||
				<u--textarea v-model="model.Measure2" border="none" inputAlign="right" disabled></u--textarea>
 | 
						||
				<u-form-item label="管理控制措施:" prop="Measure3" borderBottom>
 | 
						||
				</u-form-item>
 | 
						||
				<u--textarea v-model="model.Measure3" border="none" inputAlign="right" disabled></u--textarea>
 | 
						||
				<u-form-item label="教育培训措施:" prop="Measure4" borderBottom>
 | 
						||
				</u-form-item>
 | 
						||
				<u--textarea v-model="model.Measure4" border="none" inputAlign="right" disabled></u--textarea>
 | 
						||
				<u-form-item label="应急处置措施:" prop="Measure5" borderBottom>
 | 
						||
				</u-form-item>
 | 
						||
				<u--textarea v-model="model.Measure5" border="none" inputAlign="right" disabled></u--textarea>
 | 
						||
			<u-form-item label="责任单位:" prop="Nav_DepartmentLiable.NAME" borderBottom>
 | 
						||
				<u--input v-model="model.Nav_DepartmentLiable.NAME" border="none" slot="right" inputAlign="right" disabled
 | 
						||
					disabledColor="#fff"></u--input>
 | 
						||
			</u-form-item>
 | 
						||
			<u-form-item label="责任岗位:" prop="Nav_PostLiable.NAME" borderBottom>
 | 
						||
				<u--input v-model="model.Nav_PostLiable.NAME" border="none" slot="right" inputAlign="right" disabled
 | 
						||
					disabledColor="#fff"></u--input>
 | 
						||
			</u-form-item>
 | 
						||
			<u-form-item label="管控层级:" prop="LEVEL" borderBottom>
 | 
						||
				<u--input v-model="model.LEVEL" border="none" slot="right" inputAlign="right" disabled
 | 
						||
					disabledColor="#fff"></u--input>
 | 
						||
			</u-form-item>
 | 
						||
			</u--form>
 | 
						||
		</uni-card>
 | 
						||
	</view>
 | 
						||
</template>
 | 
						||
 | 
						||
<script>
 | 
						||
	import {
 | 
						||
		initFilter,
 | 
						||
		extendRule,
 | 
						||
		extendInclude
 | 
						||
	} from '../../../../utils/common'
 | 
						||
 | 
						||
	import {
 | 
						||
		getRequest,
 | 
						||
	} from '../../../../services/apply/FOServices/FOServices'
 | 
						||
 | 
						||
	import '../../../../utils/showMsg.js'
 | 
						||
	import color from '../../../../uni_modules/uview-ui/libs/config/color'
 | 
						||
	import config from '../../../../config/common'
 | 
						||
 | 
						||
	export default {
 | 
						||
		data() {
 | 
						||
			return {
 | 
						||
				model: {
 | 
						||
					Nav_Area: "",
 | 
						||
					Nav_OperationStep: {
 | 
						||
						NAME:""
 | 
						||
					},
 | 
						||
					Nav_DepartmentLiable: {
 | 
						||
						NAME:""
 | 
						||
					},
 | 
						||
					Nav_PostLiable: {
 | 
						||
						NAME:""
 | 
						||
					},
 | 
						||
					
 | 
						||
					Nav_Identifying: "",
 | 
						||
					Nav_Type: "",
 | 
						||
					Posts: "",
 | 
						||
					Equs: "",
 | 
						||
					Measure1: "",
 | 
						||
					Measure2: "",
 | 
						||
					Measure3: "",
 | 
						||
					Measure4: "",
 | 
						||
					Measure5: "",
 | 
						||
				},
 | 
						||
			}
 | 
						||
		},
 | 
						||
		onLoad(option) {
 | 
						||
			this.model.ID = option.ID;
 | 
						||
			this.loadData()
 | 
						||
		},
 | 
						||
		methods: {
 | 
						||
			loadData() {
 | 
						||
				const orgId = uni.getStorageSync('orgId')
 | 
						||
				const json = initFilter(orgId, "", "CODE", 1)
 | 
						||
				extendRule(json, 'ID', 1, this.model.ID);
 | 
						||
				extendInclude(json, 'Nav_Area');
 | 
						||
				extendInclude(json, 'Nav_OperationStep');
 | 
						||
				extendInclude(json, 'Nav_Identifying');
 | 
						||
				extendInclude(json, 'Nav_Type');
 | 
						||
				extendInclude(json, 'Nav_EvaluateRiskWorkduty.Nav_Post');
 | 
						||
				extendInclude(json, 'Nav_EvaluateRiskEquipment.Nav_Equipment');
 | 
						||
				extendInclude(json, 'Nav_EvaluateRiskFacilities.Nav_Facilities');
 | 
						||
				extendInclude(json, 'Nav_EvaluateRiskIndividualMeasures.Nav_IndividualMeasures');
 | 
						||
				extendInclude(json, 'Nav_EvaluateRiskEngineeringMeasures.Nav_EngineeringMeasures');
 | 
						||
				extendInclude(json, 'Nav_EvaluateRiskManagementMeasures.Nav_ManagementMeasures');
 | 
						||
				extendInclude(json, 'Nav_EvaluateRiskEducationMeasures.Nav_EducationMeasures');
 | 
						||
				extendInclude(json, 'Nav_EvaluateRiskEmergencyMeasures.Nav_EmergencyMeasures');
 | 
						||
				extendInclude(json, 'Nav_DepartmentLiable');
 | 
						||
				extendInclude(json, 'Nav_PostLiable');
 | 
						||
				getRequest(json,"/HM/EvaluateRisk/Get").then(res => {
 | 
						||
					this.model = res
 | 
						||
					//数据组装
 | 
						||
					let strPosts = '';
 | 
						||
					let strEqus = '';
 | 
						||
					if (res.Nav_EvaluateRiskWorkduty && res.Nav_EvaluateRiskWorkduty.length > 0) {
 | 
						||
						for (let i = 0; i < res.Nav_EvaluateRiskWorkduty.length; i++) {
 | 
						||
							strPosts += (strPosts.length > 0 ? " " : "") + res.Nav_EvaluateRiskWorkduty[
 | 
						||
								i].Nav_Post.NAME;
 | 
						||
						}
 | 
						||
					}
 | 
						||
					if (res.Nav_EvaluateRiskEquipment && res.Nav_EvaluateRiskEquipment.length > 0) {
 | 
						||
						for (let i = 0; i < res.Nav_EvaluateRiskEquipment.length; i++) {
 | 
						||
							strEqus += (strEqus.length > 0 ? " " : "") + res.Nav_EvaluateRiskEquipment[
 | 
						||
								i].Nav_Equipment.NAME;
 | 
						||
						}
 | 
						||
					}
 | 
						||
					if(this.model.OPERATION_STEP_ID==null){
 | 
						||
						this.model.Nav_OperationStep= {NAME:""}
 | 
						||
					}
 | 
						||
					this.model.Equs = strEqus;
 | 
						||
					this.model.EVALUATE_LEVEL = this.transRiskLevel(this.model.EVALUATE_LEVEL);
 | 
						||
					this.model.LEVEL = this.transLevel(this.model.LEVEL);
 | 
						||
					this.model.Posts = strPosts;
 | 
						||
					this.model.Measure1 = res.Nav_EvaluateRiskIndividualMeasures.length > 0 ? res
 | 
						||
						.Nav_EvaluateRiskIndividualMeasures[0].Nav_IndividualMeasures.NAME : "";
 | 
						||
					this.model.Measure2 = res.Nav_EvaluateRiskEngineeringMeasures.length > 0 ? res
 | 
						||
						.Nav_EvaluateRiskEngineeringMeasures[0].Nav_EngineeringMeasures.NAME : "";
 | 
						||
					this.model.Measure3 = res.Nav_EvaluateRiskManagementMeasures.length > 0 ? res
 | 
						||
						.Nav_EvaluateRiskManagementMeasures[0].Nav_ManagementMeasures.NAME : "";
 | 
						||
					this.model.Measure4 = res.Nav_EvaluateRiskEducationMeasures.length > 0 ? res
 | 
						||
						.Nav_EvaluateRiskEducationMeasures[0].Nav_EducationMeasures.NAME : "";
 | 
						||
					this.model.Measure5 = res.Nav_EvaluateRiskEmergencyMeasures.length > 0 ? res
 | 
						||
						.Nav_EvaluateRiskEmergencyMeasures[0].Nav_EmergencyMeasures.NAME : "";
 | 
						||
				})
 | 
						||
			},
 | 
						||
			transRiskLevel(level) {
 | 
						||
				if (level == 10) {
 | 
						||
					return '重大风险';
 | 
						||
				}
 | 
						||
				if (level == 20) {
 | 
						||
					return '较大风险';
 | 
						||
				}
 | 
						||
				if (level == 30) {
 | 
						||
					return '一般风险';
 | 
						||
				}
 | 
						||
				if (level == 40) {
 | 
						||
					return '低风险';
 | 
						||
				}
 | 
						||
			},
 | 
						||
			transLevel(level) {
 | 
						||
				if (level == 0) {
 | 
						||
					return '部门';
 | 
						||
				}
 | 
						||
				if (level == 1) {
 | 
						||
					return '车间';
 | 
						||
				}
 | 
						||
				if (level == 2) {
 | 
						||
					return '班组';
 | 
						||
				}
 | 
						||
				if (level == 3) {
 | 
						||
					return '公司';
 | 
						||
				}
 | 
						||
			},
 | 
						||
		},
 | 
						||
	}
 | 
						||
</script>
 | 
						||
 | 
						||
<style>
 | 
						||
	.todo-page {
 | 
						||
		padding: 16px;
 | 
						||
	}
 | 
						||
 | 
						||
	.todo-page .status-bar {
 | 
						||
		height: 120px;
 | 
						||
		background-image: linear-gradient(to right, #CFECFF, #6EB6FF);
 | 
						||
		position: absolute;
 | 
						||
		top: 0;
 | 
						||
		left: 0;
 | 
						||
		z-index: -10;
 | 
						||
	}
 | 
						||
 | 
						||
	.todo-page .main {
 | 
						||
		padding: 62px 8px;
 | 
						||
		position: relative;
 | 
						||
		z-index: 10;
 | 
						||
		background-size: 100% 120px;
 | 
						||
		background-repeat: no-repeat;
 | 
						||
	}
 | 
						||
 | 
						||
	.todo-page .swiper-wrap {
 | 
						||
		margin-bottom: 16px;
 | 
						||
	}
 | 
						||
 | 
						||
	.tabs-bar {
 | 
						||
		display: flex;
 | 
						||
		flex-direction: row;
 | 
						||
	}
 | 
						||
 | 
						||
	.tabs-bar .tab {
 | 
						||
		display: flex;
 | 
						||
		align-items: center;
 | 
						||
		position: relative;
 | 
						||
		margin-right: 20px;
 | 
						||
		padding-bottom: 6px;
 | 
						||
	}
 | 
						||
 | 
						||
	.tabs-bar .tab .t {
 | 
						||
		position: relative
 | 
						||
	}
 | 
						||
 | 
						||
	.tabs-bar .tab .t .name {
 | 
						||
		font-size: 18px;
 | 
						||
		line-height: 22px;
 | 
						||
		color: #999;
 | 
						||
	}
 | 
						||
 | 
						||
	.tabs-bar .tab .bottom-widget {
 | 
						||
		width: 20px;
 | 
						||
		height: 3px;
 | 
						||
		background-color: #004F9D;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list {
 | 
						||
		padding: 10px 0;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card {
 | 
						||
		border-radius: 8px;
 | 
						||
		margin-bottom: 12px;
 | 
						||
		font-size: 14px;
 | 
						||
		overflow: hidden;
 | 
						||
		/*display: flex;*/
 | 
						||
		/*flex-direction: row;*/
 | 
						||
		padding: 14px;
 | 
						||
		/*box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.1);*/
 | 
						||
		/*box-sizing: border-box;*/
 | 
						||
		/* #ifndef APP-NVUE */
 | 
						||
		box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.1);
 | 
						||
		/* #endif */
 | 
						||
		/*#ifdef APP-NVUE */
 | 
						||
		border: 1px solid rgba(0, 0, 0, 0.1);
 | 
						||
		/*#endif */
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body {
 | 
						||
		display: flex;
 | 
						||
		flex-direction: row;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .left {
 | 
						||
		margin-right: 4px;
 | 
						||
		width: 20px;
 | 
						||
		padding-top: 4px;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .left .todo-icon {
 | 
						||
		width: 16px;
 | 
						||
		height: 16px;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .contain {
 | 
						||
		flex: 1;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .content {
 | 
						||
		margin-bottom: 6px;
 | 
						||
		display: flex;
 | 
						||
		flex-direction: row;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .content-text {
 | 
						||
		color: #333333;
 | 
						||
		line-height: 24px;
 | 
						||
		font-weight: bold;
 | 
						||
		font-size: 16px;
 | 
						||
		flex: 1;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .content-bottom {
 | 
						||
		display: flex;
 | 
						||
		flex-direction: row;
 | 
						||
		align-items: flex-end;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .date-time {
 | 
						||
		flex: 1
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .content-status {
 | 
						||
		width: 56px;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .status {
 | 
						||
		background: rgba(255, 87, 51, 0.2);
 | 
						||
		color: rgba(255, 87, 51, 1);
 | 
						||
		text-align: center;
 | 
						||
		font-size: 12px;
 | 
						||
		width: 56px;
 | 
						||
		height: 18px;
 | 
						||
		line-height: 18px;
 | 
						||
		border-radius: 2px;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .status.normal {
 | 
						||
		background: rgba(0, 161, 64, 0.2);
 | 
						||
		color: rgba(0, 161, 64, 1);
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .status.warn {
 | 
						||
		background: rgba(202, 158, 3, 0.2);
 | 
						||
		color: rgba(202, 158, 3, 1);
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .time {
 | 
						||
		font-weight: 400;
 | 
						||
		line-height: 18px;
 | 
						||
		color: #333333;
 | 
						||
		display: flex;
 | 
						||
		flex-direction: row;
 | 
						||
		margin-top: 4px;
 | 
						||
		align-items: center;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .time .point {
 | 
						||
		width: 8px;
 | 
						||
		height: 8px;
 | 
						||
		border-radius: 50%;
 | 
						||
		margin-right: 4px;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .time .point.green {
 | 
						||
		background: #00A140;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .time .point.red {
 | 
						||
		background: #EE0A24;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .label {
 | 
						||
		color: #666666;
 | 
						||
		font-size: 12px;
 | 
						||
	}
 | 
						||
 | 
						||
	.content-list .card .card-body .value {
 | 
						||
		font-size: 12px;
 | 
						||
	}
 | 
						||
 | 
						||
	.bottom {
 | 
						||
		position: fixed;
 | 
						||
		bottom: 0;
 | 
						||
		display: block;
 | 
						||
		margin-left: auto;
 | 
						||
		margin-right: auto;
 | 
						||
		padding-left: 14px;
 | 
						||
		padding-right: 14px;
 | 
						||
		box-sizing: border-box;
 | 
						||
		font-size: 18px;
 | 
						||
		text-align: center;
 | 
						||
		text-decoration: none;
 | 
						||
		line-height: 2.55555556;
 | 
						||
		border-radius: 5px;
 | 
						||
		-webkit-tap-highlight-color: transparent;
 | 
						||
		overflow: hidden;
 | 
						||
		color: #000;
 | 
						||
		background-color: #f8f8f8;
 | 
						||
		cursor: pointer;
 | 
						||
		color: #fff;
 | 
						||
		background-color: #007aff;
 | 
						||
		width: 92%;
 | 
						||
	}
 | 
						||
</style> |