<template>
	<view class="todo-page">
		<step-title :stepPage="stepsPage" :stepText="stepsText"></step-title>
		<view class="allview">
			<view class="card" v-if="stepsPageList === 0">
				<u--form labelWidth="auto" :model="dataModel" ref="wForm" class="demo-ruleForm">
					<view style="position: relative;">
						<view style="position: absolute;left: -10px;color: #3d4b70;top: -3px;">*</view>
					</view>

					<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;">基本信息填写</view>
					<u-form-item v-if="dataModel.HIDDEN_DANGER_CONFIRM_ID!=null || dataModel.HIDDEN_DANGER_REPORT_ID!=null" label="检查区域:" @click="handleChangeStep('CheckArea')">
						<u--input v-model="dataModel.Nav_RiskArea.NAME" placeholder="请选择检查区域" disabled disabledColor="#ffffff" inputAlign="right" fontSize="14px" border="none">
						</u--input>
						<u-icon style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
						</u-icon>
					</u-form-item>
					<u-form-item v-if="dataModel.HIDDEN_DANGER_CONFIRM_ID!=null || dataModel.HIDDEN_DANGER_REPORT_ID!=null" label="检查内容:" @click="handleChangeStep('CheckContent')">
						<u--input v-model="dataModel.Nav_Contents.CHECKCONTENT" placeholder="请选择检查内容" disabled disabledColor="#ffffff" inputAlign="right" fontSize="14px" border="none">
						</u--input>
						<u-icon style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
						</u-icon>
					</u-form-item>
					<u-form-item v-if="dataModel.HIDDEN_DANGER_CONFIRM_ID!=null || dataModel.HIDDEN_DANGER_REPORT_ID!=null" label="隐患描述:" @click="handleChangeStep('RiskDes')">
						<u--input v-model="dataModel.Nav_Question.DESCREPTION" placeholder="请选择隐患描述" disabled disabledColor="#ffffff" inputAlign="right" fontSize="14px" border="none">
						</u--input>
						<u-icon style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
						</u-icon>
					</u-form-item>
					<u-form-item v-if="dataModel.HIDDEN_DANGER_CONFIRM_ID!=null || dataModel.HIDDEN_DANGER_REPORT_ID!=null" label="隐患等级:">
						<u--input v-model="dataModel.HIDDEN_LEVEL" placeholder="请选择隐患等级" disabled disabledColor="#ffffff" inputAlign="right" fontSize="14px" border="none">
						</u--input>
					</u-form-item>
					<u-form-item v-if="dataModel.HIDDEN_DANGER_CONFIRM_ID!=null || dataModel.HIDDEN_DANGER_REPORT_ID!=null" label="整改措施:">
					</u-form-item>
					<u--textarea v-if="dataModel.HIDDEN_DANGER_CONFIRM_ID!=null || dataModel.HIDDEN_DANGER_REPORT_ID!=null" v-model="dataModel.RECTIFICATION_MEASURES" disabled autoHeight></u--textarea>
					<view class="upload-title">附件：</view>
					<full-upload v-model="dataModel.Nav_DoubleFiles" :isShowBtn='true' :listProp='listPropUpload' :listPropVal='listPropValUpload'></full-upload>

				</u--form>
			</view>
			<view style="padding: 10px 16px;" v-if="stepsPageList === 0" class="bottom-button">
				<u-button type="primary" :loading="stepLoad" @click="stepAdd" color="#3d4b70">下一步</u-button>
			</view>
			<view class="card" v-if="stepsPageList === 1">
				<u--form labelWidth="auto" :model="dataModel" ref="wForm" class="sub-form">


					<view style="position: relative;">

						<view style="position: absolute;left: -10px;color: #3d4b70;top: -3px;">*</view>
					</view>

					<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;margin-top: 20px;">辨识内容</view>
					<view v-for="(item,index) in dataModel.Nav_DoubleDetails" :key="index" style="border-bottom: #ceccca 1px solid;margin-bottom: 10px;padding-bottom: 10px;">
						<u-form-item prop="Nav_Contents" :label="index+1+'.辨识区域：'" @click="handleChangeStep('Area',[index])">

							<view style="display: flex;flex-direction: row;justify-content: space-between;align-items: center;flex: 1;">
								<!-- <view @click="handleChangeStep(index,'','Area')" style="flex: 1;">
									{{index+1+'.辨识区域：'+item.Nav_Area.NAME}}
								</view> -->
								<u--input v-model="item.Nav_Area.NAME" disabled disabledColor="#ffffff" placeholder="请选择辨识区域" border="none" fontSize="14px">
								</u--input>
								<view class="action" @click.stop style="display: flex;flex-direction: row;align-items: center;justify-content: space-around;">
									<u-icon @click="handleDelRowBefore('Area',[index])" name="trash" color="#ff4d4f" size="21" style="margin-right: 20px;"></u-icon>
									<u-icon name="arrow-up" size="12" v-if="item.showPack" @click="handlePack(index)"></u-icon>
									<u-icon name="arrow-down" size="12" v-if="!item.showPack" @click="handlePack(index)"></u-icon>
								</view>
							</view>

						</u-form-item>
						<view v-if="item.showPack==true">
							<u-form-item label="生产单元：" @click="handleChangeUnit('MinType',[index])" border-bottom>
								<u--input v-model="item.MineType" disabled disabledColor="#ffffff" placeholder="请选择生产单元" border="none" inputAlign="right" fontSize="14px">
								</u--input>
								<u-icon style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
								</u-icon>
							</u-form-item>
							<u-form-item label="风险名称" prop="CHECKSTANDARD" border-bottom>
								<u--input v-model="item.RISK_NAME" placeholder="请填写风险名称" disabledColor="#ffffff" inputAlign="right" fontSize="14px" border="none">
								</u--input>
							</u-form-item>
							<!-- <u-form-item label="风险名称" prop="CHECKSTANDARD" @click="handleChangeStep('RiskName',[index])" border-bottom>
								<u--input v-model="item.Nav_RiskName.NAME" placeholder="请填写风险名称" suffixIcon="arrow-down" suffixIconStyle="font-size: 12px" disabledColor="#ffffff" inputAlign="right" fontSize="14px"
									border="none">
								</u--input>
							</u-form-item> -->
							<u-form-item label="风险描述" prop="HIDDEN_DESCRIPTION">
							</u-form-item>
							<u--textarea v-model="item.RISK_DESCRIPTION" placeholder="请填写风险描述" autoHeight maxlength="-1"></u--textarea>
							<u-form-item label="风险类别" prop="HIDDEN_LEVEL" @click="handleChangeStep('Category',[index])" border-bottom>
								<u--input v-model="item.Nav_Type.NAME" placeholder="请选择风险类别" disabled suffixIcon="arrow-down" suffixIconStyle="font-size: 12px" disabledColor="#ffffff" inputAlign="right" fontSize="14px"
									border="none">
								</u--input>
							</u-form-item>
							<u-form-item label="风险评价L" border-bottom>
								<u-number-box integer v-model="item.EVALUATE_L" :min="-10000" :max="10000" @change="changeCore(index,'L',$event)"></u-number-box>
							</u-form-item>
							<u-form-item label="风险评价E" border-bottom>
								<u-number-box integer v-model="item.EVALUATE_E" :min="-10000" :max="10000" @change="changeCore(index,'E',$event)"></u-number-box>
							</u-form-item>
							<u-form-item label="风险评价C" border-bottom>
								<u-number-box integer v-model="item.EVALUATE_C" :min="-10000" :max="10000" @change="changeCore(index,'C',$event)"></u-number-box>
							</u-form-item>
							<u-form-item label="分值D" border-bottom>
								<u--input v-model="item.EVALUATE_SCORE" placeholder="请输入风险评价" disabled disabledColor="#ffffff" inputAlign="right" fontSize="14px" border="none">
								</u--input>
							</u-form-item>
							<u-form-item label="风险等级" prop="HIDDEN_PLACE" @click="handleChangeUnit('Level',[index])" border-bottom>
								<u--input v-model="item.EVALUATE_LEVEL" placeholder="请选择风险等级" disabled disabledColor="#ffffff" inputAlign="right" fontSize="14px" border="none">
								</u--input>
								<u-icon style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
								</u-icon>
							</u-form-item>
							<u-form-item label="应急处置" prop="EMERGENCY">
							
							</u-form-item>
							<u--textarea v-model="item.EMERGENCY" placeholder="请填写应急处置" autoHeight maxlength="-1"></u--textarea>
							<uni-collapse class="collapse" ref="collapse">
								<uni-collapse-item title="管控措施" name="Docs guide">
									<view v-if="item.Nav_DoubleDetailMeasures.length!==0">
										<view v-for="(item1,index1) in item.Nav_DoubleDetailMeasures" :key="index1" style="margin: 5px 5px;padding: 0px 10px;">
											<u-form-item :label="index1+1+'.顺序'" prop="NUM" borderBottom>
												<u-number-box integer v-model="item1.NUM" :min="-10000" :max="10000"></u-number-box>
												<!-- <u--input disabledColor="#ffffff" v-model="item1.NUM" border="none" inputAlign="right" placeholder="请输入顺序">
												</u--input> -->
												<u-icon @click="handleDelRowBefore('Num',[index,index1])" name="trash" color="#ff4d4f" size="21" style="margin-left: 20px;"></u-icon>
											</u-form-item>
											<u-form-item label="管控措施" prop="MEASURES_NAME">

											</u-form-item>
											<u--textarea v-model="item1.MEASURES_NAME" placeholder="请填写管控措施" autoHeight maxlength="-1"></u--textarea>
											
											<u-form-item label="检查内容" prop="EMERGENCY" @click="ishowCheckCo(index,index1)" border-bottom>
												<u-icon name="arrow-up" size="12" v-if="item1.ishowCheckCo"></u-icon>
												<u-icon name="arrow-down" size="12" v-if="!item1.ishowCheckCo"></u-icon>
											</u-form-item>

											<view v-if="item1.ishowCheckCo">
												<view v-for="(item2,index2) in item1.Nav_DetailMeasureContents" :key="index2">
													<u-form-item borderBottom>
														<view style="display: flex;flex-direction: row;justify-content: space-between;align-items: center;flex: 1;">
															<view @click="handleChangeStep('CheckCoTwo',[index,index1,index2])" style="flex: 1;display: flex;flex-direction: row;align-items: center;">
																<view style="flex: 1;">
																	{{index2+1+'.检查内容 : ' +item2.Nav_Contents.CHECKCONTENT}}
																</view>
																<u-icon style="margin-left: 5px;margin-right: 20px;" name="arrow-down" size="12">
																</u-icon>
															</view>
															<view class="action" style="display: flex;flex-direction: row;align-items: center;justify-content: space-around;">
																<u-icon @click="handleDelRowBefore('CheckCoTwo',[index,index1,index2])" name="trash" color="#ff4d4f" size="21"></u-icon>
															</view>
														</view>
													</u-form-item>
													<!-- <u-form-item borderBottom label="检查依据" prop="HIDDEN_PLACE" @click="handleChangeStep('Inspection',[index,index1,index2])" border-bottom>
														<u-icon style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
														</u-icon>
													</u-form-item>
													<u--textarea v-model="item2.Nav_DetailMeasureContentBasicsName" disabled placeholder="请选择检查依据" maxlength="-1"></u--textarea>
													<u-form-item borderBottom label="判定标准" prop="HIDDEN_PLACE" border-bottom>
														<u--input v-model="item2.CHECK_STANDARD" placeholder="请填写判定标准" disabledColor="#ffffff" inputAlign="right" fontSize="14px" border="none">
														</u--input>
													</u-form-item> -->
													<u-form-item label="检查层级" prop="EMERGENCY" @click="ishowCheckLe(index,index1,index2)" border-bottom>
														<u-icon name="arrow-up" size="12" v-if="item2.ishowCheckLe"></u-icon>
														<u-icon name="arrow-down" size="12" v-if="!item2.ishowCheckLe"></u-icon>
													</u-form-item>
													<view v-if="item2.ishowCheckLe">
														<view v-for="(item3,index3) in item2.Nav_DetailMeasureContentPosts" :key="index3">
															<u-form-item :label="index3+1+'.顺序'" prop="NUM" borderBottom>
																<u-number-box integer v-model="item3.NUM" :min="-10000" :max="10000"></u-number-box>
																<!-- <u--input disabledColor="#ffffff" v-model="item1.NUM" border="none" inputAlign="right" placeholder="请输入顺序">
																</u--input> -->
																<u-icon @click="handleDelRowBefore('CheckNum',[index,index1,index2,index3])" name="trash" color="#ff4d4f" size="21" style="margin-left: 20px;"></u-icon>
															</u-form-item>
															<u-form-item label="检查层级：" @click="handleChangeUnit('CHECK_TYPE',[index,index1,index2,index3])" border-bottom>
																<u--input v-model="item3.CHECK_TYPE" disabled disabledColor="#ffffff" placeholder="请选择生产单元" border="none" inputAlign="right" fontSize="14px">
																</u--input>
																<u-icon style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
																</u-icon>
															</u-form-item>
															<u-form-item borderBottom label="检查部门" prop="HIDDEN_PLACE" @click="handleChangeStep('CheckThreeDep',[index,index1,index2,index3])" border-bottom>
																<u--input v-model="item3.Nav_Department.NAME" placeholder="请选择检查部门" suffixIcon="arrow-down" suffixIconStyle="font-size: 12px" disabled
																	disabledColor="#ffffff" inputAlign="right" fontSize="14px" border="none">
																</u--input>
															</u-form-item>
															<u-form-item borderBottom label="检查类型" prop="HIDDEN_PLACE" @click="handleChangeStep('CheckThreeType',[index,index1,index2,index3])" border-bottom>
																<u--input v-model="item3.Nav_CheckType.NAME" placeholder="请选择检查类型" suffixIcon="arrow-down" suffixIconStyle="font-size: 12px" disabled
																	disabledColor="#ffffff" inputAlign="right" fontSize="14px" border="none">
																</u--input>
															</u-form-item>
															<u-form-item label="检查周期：" @click="handleChangeUnit('CHECK_CYCLE',[index,index1,index2,index3])" border-bottom>
																<u--input v-model="item3.CHECK_CYCLE" disabled disabledColor="#ffffff" placeholder="请选择检查周期" border="none" inputAlign="right" fontSize="14px">
																</u--input>
																<u-icon style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
																</u-icon>
															</u-form-item>
															<u-form-item borderBottom label="检查岗位" prop="HIDDEN_PLACE" @click="handleChangeStep('CheckThreePost',[index,index1,index2,index3])" border-bottom>
																<u-icon style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
																</u-icon>
															</u-form-item>
															<u--textarea v-model="item3.Nav_DetailPostsName" disabled placeholder="请选择检查岗位" maxlength="-1"></u--textarea>

														</view>
														<u-button text="新增检查层级" size="small" type="primary" style="width: 80%;margin-top: 20px;"
															@click="handleNewControlMea('CheckThreeLel',[index,index1,index2])"></u-button>
													</view>
													<u-form-item label="隐患描述" prop="EMERGENCY" @click="ishowRiskDes(index,index1,index2)" border-bottom>
														<u-icon name="arrow-up" size="12" v-if="item2.ishowRiskDes"></u-icon>
														<u-icon name="arrow-down" size="12" v-if="!item2.ishowRiskDes"></u-icon>
													</u-form-item>
													<view v-if="item2.ishowRiskDes">
														<view v-for="(item3,index3) in item2.Nav_DetailMeasureContentHiddens" :key="index3">
															<u-form-item borderBottom :label="index3+1+'.隐患描述'" prop="HIDDEN_PLACE" @click="handleChangeStep('RiskDesThree',[index,index1,index2,index3])" border-bottom>
																<u--input v-model="item3.Nav_Question.DESCREPTION" placeholder="请选择隐患描述" suffixIcon="arrow-down" suffixIconStyle="font-size: 12px" disabled
																	disabledColor="#ffffff" inputAlign="right" fontSize="14px" border="none">
																</u--input>
																<view @click.stop>
																	<u-icon @click="handleDelRowBefore('RiskDesThree',[index,index1,index2,index3])" name="trash" color="#ff4d4f" size="21"
																		style="margin-left: 20px;"></u-icon>
																</view>

															</u-form-item>
															<u-form-item label="隐患等级：" @click="handleChangeUnit('HIDDEN_LEVEL',[index,index1,index2,index3])" border-bottom>
																<u--input v-model="item3.HIDDEN_LEVEL" disabled disabledColor="#ffffff" placeholder="请选择隐患等级" border="none" inputAlign="right" fontSize="14px">
																</u--input>
																<u-icon style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
																</u-icon>
															</u-form-item>
															<u-form-item borderBottom label="整改措施" prop="HIDDEN_PLACE" border-bottom>

															</u-form-item>
															<u--textarea v-model="item3.RECTIFICATION_MEASURES" placeholder="请填写整改措施" maxlength="-1"></u--textarea>

														</view>
														<u-button text="新增隐患描述" size="small" type="primary" style="width: 80%;margin-top: 20px;"
															@click="handleNewControlMea('RiskDesThree',[index,index1,index2])"></u-button>
													</view>
												</view>
												<u-button text="新增检查内容" size="small" type="primary" style="width: 80%;margin-top: 20px;" @click="handleNewControlMea('CheckCo',[index,index1])"></u-button>
											</view>



										</view>
									</view>

									<u-button text="新增管控措施" size="small" type="primary" style="width: 80%;margin-top: 10px;" @click="handleNewControlMea('Mea',index)"></u-button>
									<!-- <text class="u-collapse-content">涵盖uniapp各个方面，给开发者方向指导和设计理念，让您茅塞顿开，一马平川</text> -->
								</uni-collapse-item>
								<uni-collapse-item title="管控层级" name="Variety components">
									<view v-if="item.Nav_DetailPosts.length!==0">
										<view v-for="(item1,index1) in item.Nav_DetailPosts" :key="index1" style="margin: 5px 5px;padding: 0px 10px;">
											<u-form-item borderBottom>
												<view style="display: flex;flex-direction: row;justify-content: space-between;align-items: center;flex: 1;">
													<view @click="handleChangeStep('Dep',[index,index1])" style="flex: 1;display: flex;flex-direction: row;align-items: center;">
														<view style="flex: 1;">
															{{index1+1+'.管控部门 : ' +item1.Nav_Department.NAME}}
														</view>
														<u-icon style="margin-left: 5px;margin-right: 20px;" name="arrow-down" size="12">
														</u-icon>
													</view>
													<view class="action" style="display: flex;flex-direction: row;align-items: center;justify-content: space-around;">
														<u-icon @click="handleDelRowBefore('Dep',[index,index1])" name="trash" color="#ff4d4f" size="21"></u-icon>
													</view>
												</view>
											</u-form-item>
											<u-form-item borderBottom label="管控层级：" prop="Check_Level" @click="handleChangeUnit('ControlLevel',[index,index1])">
												<u--input v-model="item1.DEPARTMENT_TYPE" disabled disabledColor="#ffffff" placeholder="请选择管控层级" border="none" inputAlign="right" fontSize="14px">

												</u--input>
												<u-icon style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
												</u-icon>
											</u-form-item>
											<u-form-item borderBottom label="管控责任人" prop="HIDDEN_PLACE" @click="handleChangeStep('Peo',[index,index1])" border-bottom>
												<u--input v-model="item1.Nav_User.NAME" placeholder="请选择管控责任人" suffixIcon="arrow-down" suffixIconStyle="font-size: 12px" disabled disabledColor="#ffffff" inputAlign="right"
													fontSize="14px" border="none">
												</u--input>
											</u-form-item>
										</view>
									</view>
									<u-button text="新增管控层级" size="small" type="primary" style="width: 80%;margin-top: 20px;" @click="handleNewControlMea('Lel',index)"></u-button>
								</uni-collapse-item>
								<uni-collapse-item title="辨识岗位" name="Numerous tools">
									<view v-if="item.Nav_DetailDeparts.length!==0">
										<view v-for="(item1,index1) in item.Nav_DetailDeparts" :key="index1" style="margin: 5px 5px;padding: 0px 10px;">
											<u-form-item borderBottom>
												<view style="display: flex;flex-direction: row;justify-content: space-between;align-items: center;flex: 1;">
													<view @click="handleChangeStep('RecDep',[index,index1])" style="flex: 1;display: flex;flex-direction: row;align-items: center;">
														<view style="flex: 1;">
															{{index1+1+'.辨识部门 : ' +item1.Nav_Department.NAME}}
														</view>
														<u-icon style="margin-left: 5px;margin-right: 20px;" name="arrow-down" size="12">
														</u-icon>
													</view>
													<view class="action" style="display: flex;flex-direction: row;align-items: center;justify-content: space-around;">
														<u-icon @click="handleDelRowBefore('RecDep',[index,index1])" name="trash" color="#ff4d4f" size="21"></u-icon>
													</view>
												</view>
											</u-form-item>
											<u-form-item label="辨识岗位" prop="HIDDEN_PLACE" @click="handleChangeStep('RecPost',[index,index1])" border-bottom>
												<u-icon style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
												</u-icon>
											</u-form-item>
											<u--textarea v-model="item1.Nav_DepartDetailsName" disabled placeholder="请选择辨识岗位" maxlength="-1"></u--textarea>
										</view>
									</view>
									<u-button text="新增辨识岗位" size="small" type="primary" style="width: 80%;margin-top: 20px;" @click="handleNewControlMea('Post',index)"></u-button>
								</uni-collapse-item>
							</uni-collapse>
						</view>
					</view>
					<u-button text="新增检查区域" type="primary" @click="handleNewCheckContent"></u-button>
				</u--form>
			</view>
			<view style="padding: 10px 16px;display: flex;flex-direction: row;" v-if="stepsPageList === 1" class="bottom-button">
				<u-button type="primary" @click="stepReduce" color="#3d4b70" :plain="true" style="margin-right: 5px;">上一步</u-button>
				<u-button type="primary" @click="submit" color="#3d4b70" style="margin-left: 5px;">提交</u-button>
			</view>
			<u-picker :show="showPopupUnit" :columns="UnitLists" @confirm="confirmUnit" @cancel="cancelUnit" :defaultIndex="UnitDefaultIndex"></u-picker>
			<u-modal :show="showDelModalIndex >= 0" @confirm="confirmDel" @cancel="cacelDel" :showCancelButton="true" title="确认删除？"></u-modal>
			<u-datetime-picker :show="showPopupRecitifyDate" v-model="dateRecitifyTime" mode="date" @confirm="confirmRecitifyDate" @cancel="cancelRecitifyDate"></u-datetime-picker>
			<query-selector :multiple="isMultiple" :show="showPopupStep" :total="curTotalStep" :lists="stepLists" :defaultValue="currentOperateStep.NAME" @close="handleClosePopupStep" @search="handleSearchStep"
				@select="handleSelectedStep" :defaultChecked="defaultChecked" />
		</view>
	</view>
</template>

<script>
	import {
		extendFilterGroup,
		extendGroupRule,
		extendInclude,
		extendOrder,
		extendRule,
		extendIgnoreDataRule,
		guid,
		initFilter,
		initFilterGroup,
		handleOriginalArray,
		extendFilterGroupGroupRules
	} from '../../../../utils/common'
	import {
		FMProductionUnit,
		SKEffective,
		SKMarkEnum,
		SKLevelEnum,
		CheckPeriods,
		CheckLevels,
		MineTypeIndex,
		MineTypeName
	} from '../../../../utils/enums.js'
	import {
		DouPreGet,
		SKDoublePreventFullUpdate,
		getUserLists,
		GetSKRequestInfo,
		GetRiskAreaInfo,
		GetRiskTypeInfo,
		GetDepartmentInfo,
		GetCheckContentsInfo,
		GetHiddenScripList,
		GetUserPostInfo,
		GetCheckInspection,
		CheckTypeNewOrderPaged,
		GetPostOrderPaged,
		GetRiskNameInfo
	} from '../../../../services/apply/subPages/SK/SKServices.js'
	import {
		getRequest,
	} from '../../../../services/apply/FOServices/FOServices';
	import stepTitle from '@/components/custom/step-title.vue'
	import swipeActionItem from '../../../../uni_modules/uview-ui/libs/config/props/swipeActionItem';
	import formItem from '../../../../uni_modules/uview-ui/libs/config/props/formItem';
	export default {
		components: {
			stepTitle,
		},
		data() {
			return {
				showDelModalIndex: undefined,
				newContent: false,
				showPopupDate: false,
				showPopupRecitifyDate: false,
				listPropUpload: ['NOTIFY_ID'],
				listPropValUpload: [],
				ORG_ID: uni.getStorageSync('orgId'),
				currentOperateStep: {},
				showPopupStep: false,
				isMultiple: false,
				stepLists: [],
				curTotalStep: 0,
				showPopupUnit: false,
				stepLoad: true,
				UnitLists: [],
				UnitDefaultIndex: [0],
				LevelLists: [],
				defaultChecked: [],
				dataModel: {
					Nav_RiskArea: {
						NAME: ''
					},
					Nav_Contents: {
						CHECKCONTENT: ''
					},
					Nav_Question: {
						DESCREPTION: ''
					},
					HIDDEN_LEVEL: '',
					RECTIFICATION_MEASURES: '',
					Nav_DoubleFiles: [],
					Nav_DoubleDetails: [{
						showPack: false,
						MineType: '',
						Nav_Area: {
							NAME: ''
						},
						RISK_NAME: '',
						Nav_RiskName: {
							NAME: ''
						},
						RISK_DESCRIPTION: '',
						Nav_Type: {
							NAME: ''
						},
						EVALUATE_L: 0,
						EVALUATE_E: 0,
						EVALUATE_C: 0,
						EVALUATE_SCORE: 0,
						EVALUATE_LEVEL: '',
						Nav_DetailPosts: [],
						Nav_DoubleDetailMeasures: [],
						isShowControl: false,
					}]
				},
				model: {
					Nav_RiskArea: {
						NAME: ''
					},
					Nav_Contents: {
						CHECKCONTENT: ''
					},
					Nav_Question: {
						DESCREPTION: ''
					},
					HIDDEN_LEVEL: '',
					RECTIFICATION_MEASURES: '',
					Nav_DoubleFiles: [],
					Nav_DoubleFiles: [],
					Nav_DoubleDetails: [{
						showPack: false,
						MineType: '',
						Nav_Area: {
							NAME: ''
						},
						RISK_NAME: '',
						Nav_RiskName: {
							NAME: ''
						},
						RISK_DESCRIPTION: '',
						Nav_Type: {
							NAME: ''
						},
						EVALUATE_L: 0,
						EVALUATE_E: 0,
						EVALUATE_C: 0,
						EVALUATE_SCORE: 0,
						EVALUATE_LEVEL: '',
						Nav_DetailPosts: [],
						Nav_DoubleDetailMeasures: [],
						isShowControl: false,
					}]

				},
				dateRecitifyTime: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd'),
				stepsText: ['发起', '审批', '归档'],
				stepsPage: 0,
				stepsPageList: 0,
				TaskID: '',
				nowName: '',
				nowIndex: 0,
				childList: ['管控措施', '管控层级', '辨识岗位'],
				curNow: 0,

			}
		},
		onLoad(option) {
			this.TaskID = option.taskID ? option.taskID : '';
			this.ID = option.ID ? option.ID : '';
			this.loadData()
		},
		methods: {
			loadData() {
				// const json = {}
				const orgId = uni.getStorageSync('orgId')
				const json = initFilter(orgId, "", "")
				extendRule(json, 'ID', 1, this.ID);
				extendInclude(json, 'Nav_ApplyDepartment');
				extendInclude(json, 'Nav_ApplyUser');
				extendInclude(json, 'Nav_RiskArea');
				extendInclude(json, 'Nav_DoubleFiles.Nav_ImgFile');
				extendInclude(json, 'Nav_Contents');
				extendInclude(json, 'Nav_Question');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DoubleDetailMeasures.Nav_DetailMeasureContents.Nav_DetailMeasureContentPosts');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DoubleDetailMeasures.Nav_DetailMeasureContents.Nav_DetailMeasureContentPosts.Nav_Department');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DoubleDetailMeasures.Nav_DetailMeasureContents.Nav_DetailMeasureContentPosts.Nav_CheckType');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DoubleDetailMeasures.Nav_DetailMeasureContents.Nav_DetailMeasureContentPosts.Nav_DetailPosts.Nav_Post');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DoubleDetailMeasures.Nav_DetailMeasureContents.Nav_DetailMeasureContentHiddens');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DoubleDetailMeasures.Nav_DetailMeasureContents.Nav_DetailMeasureContentHiddens.Nav_Question');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DoubleDetailMeasures.Nav_DetailMeasureContents');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DoubleDetailMeasures.Nav_DetailMeasureContents.Nav_DetailMeasureContentBasics.Nav_Law');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DoubleDetailMeasures.Nav_DetailMeasureContents.Nav_Contents');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DoubleDetailMeasures');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DetailPosts');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DetailPosts.Nav_Department');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DetailPosts.Nav_User');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DetailDeparts');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DetailDeparts.Nav_Department');
				extendInclude(json, 'Nav_DoubleDetails.Nav_DetailDeparts.Nav_DepartDetails.Nav_Post');
				extendInclude(json, 'Nav_DoubleDetails');
				extendInclude(json, 'Nav_DoubleDetails.Nav_Area');
				extendInclude(json, 'Nav_DoubleDetails.Nav_Type');
				extendInclude(json, 'Nav_DoubleDetails.Nav_RiskName');
				extendIgnoreDataRule(json)
				// extendRule(json, 'TASK_ID', 1, this.TaskID);
				DouPreGet(json).then(res => {
					this.stepLoad = false
					this.dataModel = res;
					this.dataModel.Nav_RiskArea = res.Nav_RiskArea ? res.Nav_RiskArea : {
							NAME: ''
						},
						this.dataModel.Nav_Contents = res.Nav_Contents ? res.Nav_Contents : {
							CHECKCONTENT: ''
						},
						this.dataModel.Nav_Question = res.Nav_Question ? res.Nav_Question : {
							DESCREPTION: ''
						},
						this.dataModel.HIDDEN_LEVEL = res.HIDDEN_LEVEL == 0 ? '一般' : '重大'
					this.stepsPage = res.STATUS == 0 ? 0 : res.STATUS == 20 ? 1 : 2
					this.dataModel.Nav_DoubleDetails.map(item => {
						item['showPack'] = false
						item['isShowControl'] = false
						item['isShowCheck'] = false
						item['curNow'] = 0
						item.MineType = MineTypeName[item.MineType]
						item.EVALUATE_LEVEL = item.EVALUATE_LEVEL == 10 ? '重大风险' : item.EVALUATE_LEVEL == 20 ? '较大风险' : item.EVALUATE_LEVEL == 30 ? '一般风险' : item.EVALUATE_LEVEL == 40 ? '低风险' : '低风险'
						item.Nav_RiskName = item.Nav_RiskName? item.Nav_RiskName: {
							NAME: ''}
						item.Nav_DetailPosts.map(item1 => {
							item1.DEPARTMENT_TYPE = item1.DEPARTMENT_TYPE == 0 ? '部门' : item1.DEPARTMENT_TYPE == 1 ? '车间' : item1.DEPARTMENT_TYPE == 2 ? '班组' : item1.DEPARTMENT_TYPE == 3 ? '公司' :
								'岗位'
						})
						item.Nav_DetailDeparts.map(item1 => { //辨识岗位
							if (item1.Nav_DepartDetails.length > 0) {
								let areaShow = ''
								item1.Nav_DepartDetails.map(o => {
									areaShow += o.Nav_Post.NAME
								})
								item1['Nav_DepartDetailsName'] = areaShow
							} else {
								item1['Nav_DepartDetailsName'] = ''
							}
						})
						if (item.Nav_DoubleDetailMeasures.length > 0) { //管控措施
							item.Nav_DoubleDetailMeasures.map(item1 => {
								item1['ishowCheckCo'] = false
								if (item1.Nav_DetailMeasureContents.length > 0) { //检查内容
									item1.Nav_DetailMeasureContents.map(item2 => {
										item2['ishowCheckLe'] = false
										item2['ishowRiskDes'] = false
										if (item2.Nav_DetailMeasureContentBasics.length > 0) {
											let areaShow = ''
											item2.Nav_DetailMeasureContentBasics.map(o => {
												if (o.Nav_Law && o.Nav_Law.NAME) {
													areaShow += o.Nav_Law.NAME + ' 、'
												}

											})
											item2['Nav_DetailMeasureContentBasicsName'] = areaShow
										} else {
											item2['Nav_DetailMeasureContentBasicsName'] = ''
										}
										if (item2.Nav_DetailMeasureContentPosts.length > 0) {
											item2.Nav_DetailMeasureContentPosts.map(item3 => {
												item3.CHECK_CYCLE = item3.CHECK_CYCLE == 0 ? '无' : item3.CHECK_CYCLE == 10 ? '每天' : item3.CHECK_CYCLE == 20 ? '每周' : item3
													.CHECK_CYCLE == 30 ? '每月' : item3.CHECK_CYCLE == 40 ? '每季度' : item3.CHECK_CYCLE == 50 ? '每半年' : item3.CHECK_CYCLE == 60 ? '每年' :
													'每班'
												item3.CHECK_TYPE = item3.CHECK_TYPE == 0 ? '部门' : item3.CHECK_TYPE == 1 ? '车间' : item3.CHECK_TYPE == 2 ? '班组' : item3.CHECK_TYPE == 3 ?
													'公司' : '岗位'
												if (item3.Nav_DetailPosts.length > 0) {
													let areaShow = ''
													item3.Nav_DetailPosts.map(o => { //检查岗位
														areaShow += o.Nav_Post.NAME
													})
													item3['Nav_DetailPostsName'] = areaShow
												} else {
													item3['Nav_DetailPostsName'] = ''
												}
											})
										}
										if (item2.Nav_DetailMeasureContentHiddens.length > 0) {
											item2.Nav_DetailMeasureContentHiddens.map(item3 => {
												item3.Nav_Question = item3.Nav_Question ? item3.Nav_Question : {
														DESCREPTION: ''
													},
													item3.HIDDEN_LEVEL = item3.HIDDEN_LEVEL == 0 ? '一般' : '重大'

											})
										}

									})
								}
							})
						}

					})
					

				})
			},
			sectionChange(index, e) {
				this.dataModel.Nav_DoubleDetails[index].curNow = e
				this.dataModel.Nav_DoubleDetails = [...this.dataModel.Nav_DoubleDetails]
			},
			changeControl(index, name) {
				if (name == 'control') {
					this.dataModel.Nav_DoubleDetails[index].isShowControl = this.dataModel.Nav_DoubleDetails[index].isShowControl == false ? true : false
					this.dataModel.Nav_DoubleDetails = [...this.dataModel.Nav_DoubleDetails]
				} else {
					this.dataModel.Nav_DoubleDetails[index].isShowCheck = this.dataModel.Nav_DoubleDetails[index].isShowCheck == false ? true : false
					this.dataModel.Nav_DoubleDetails = [...this.dataModel.Nav_DoubleDetails]
				}

			},
			changeCore(index, name, e) {
				let l = this.dataModel.Nav_DoubleDetails[index].EVALUATE_L
				let o = this.dataModel.Nav_DoubleDetails[index].EVALUATE_E
				let c = this.dataModel.Nav_DoubleDetails[index].EVALUATE_C

				if (name == 'L') {
					this.dataModel.Nav_DoubleDetails[index].EVALUATE_SCORE = e.value * o * c
				} else if (name == 'E') {
					this.dataModel.Nav_DoubleDetails[index].EVALUATE_SCORE = e.value * l * c
				} else {
					this.dataModel.Nav_DoubleDetails[index].EVALUATE_SCORE = e.value * l * o
				}
				let D = this.dataModel.Nav_DoubleDetails[index].EVALUATE_SCORE
				this.dataModel.Nav_DoubleDetails[index].EVALUATE_LEVEL = this.changeLevel(D)
			},
			changeLevel(D) {
				if (D >= 320) {
					return "重大风险";
				} else if (D >= 160 && D < 320) {
					return "较大风险";
				} else if (D >= 70 && D < 160) {
					return "一般风险";
				} else {
					return "低风险";
				}
			},
			handlePack(index) {
				this.dataModel.Nav_DoubleDetails[index].showPack = this.dataModel.Nav_DoubleDetails[index].showPack == false ? true : false
				this.dataModel.Nav_DoubleDetails = [...this.dataModel.Nav_DoubleDetails]

			},
			ishowCheckCo(index, index1) {
				this.dataModel.Nav_DoubleDetails[index].Nav_DoubleDetailMeasures[index1].ishowCheckCo = this.dataModel.Nav_DoubleDetails[index].Nav_DoubleDetailMeasures[index1].ishowCheckCo == false ? true : false
				this.dataModel.Nav_DoubleDetails = [...this.dataModel.Nav_DoubleDetails]
			},
			ishowCheckLe(index, index1, index2) {
				this.dataModel.Nav_DoubleDetails[index].Nav_DoubleDetailMeasures[index1].Nav_DetailMeasureContents[index2].ishowCheckLe = this.dataModel.Nav_DoubleDetails[index].Nav_DoubleDetailMeasures[index1]
					.Nav_DetailMeasureContents[index2].ishowCheckLe == false ? true : false
				this.dataModel.Nav_DoubleDetails = [...this.dataModel.Nav_DoubleDetails]
			},
			ishowRiskDes(index, index1, index2) {
				this.dataModel.Nav_DoubleDetails[index].Nav_DoubleDetailMeasures[index1].Nav_DetailMeasureContents[index2].ishowRiskDes = this.dataModel.Nav_DoubleDetails[index].Nav_DoubleDetailMeasures[index1]
					.Nav_DetailMeasureContents[index2].ishowRiskDes == false ? true : false
				this.dataModel.Nav_DoubleDetails = [...this.dataModel.Nav_DoubleDetails]
			},
			cancelUnit() {
				this.showPopupUnit = false
			},
			handleChangeUnit(name, nowIndex) {
				this.nowIndex = nowIndex
				this.nowName = name
				if (name == 'MinType') {
					this.UnitLists = [FMProductionUnit]
				} else if (name == 'Level') {
					this.UnitLists = [SKLevelEnum]
				} else if (this.nowName == 'ControlLevel') {
					this.UnitLists = [CheckLevels]
				} else if (this.nowName == 'CHECK_TYPE') {
					this.UnitLists = [CheckLevels]
				} else if (this.nowName == 'CHECK_CYCLE') {
					this.UnitLists = [CheckPeriods]
				} else if (this.nowName == 'HIDDEN_LEVEL') {
					this.UnitLists = [
						['一般', '重大']
					]
				}
				this.showPopupUnit = true
			},
			confirmUnit(e) {
				if (this.nowName == 'MinType') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].MineType = e.value[0]
				} else if (this.nowName == 'Level') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].EVALUATE_LEVEL = e.value[0]
				} else if (this.nowName == 'ControlLevel') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DetailPosts[this.nowIndex[1]].DEPARTMENT_TYPE = e.value[0]
				} else if (this.nowName == 'CHECK_TYPE') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentPosts[this.nowIndex[3]].CHECK_TYPE = e
						.value[0]
				} else if (this.nowName == 'CHECK_CYCLE') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentPosts[this.nowIndex[3]].CHECK_CYCLE = e
						.value[0]
				} else if (this.nowName == 'HIDDEN_LEVEL') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentHiddens[this.nowIndex[3]].HIDDEN_LEVEL =
						e.value[0]
				}
				this.showPopupUnit = false
			},
			stepAdd() {
				if (!this.dataModel.Nav_RiskArea.NAME && this.dataModel.RISK_EVALUATE_SUMMARY_ID==null) {
					uni.showToast({
						title: '请选择检查区域',
						icon: 'none'
					})
					return
				}
				if (!this.dataModel.Nav_Contents.CHECKCONTENT && this.dataModel.RISK_EVALUATE_SUMMARY_ID==null) {
					uni.showToast({
						title: '请选择检查内容',
						icon: 'none'
					})
					return
				}
				if (!this.dataModel.Nav_Question.DESCREPTION&& this.dataModel.RISK_EVALUATE_SUMMARY_ID==null) {
					uni.showToast({
						title: '请选择隐患描述',
						icon: 'none'
					})
					return
				}
				this.stepsPageList = this.stepsPageList + 1
			},
			stepReduce() {
				this.stepsPageList = this.stepsPageList - 1
			},
			handleNewCheckContent() {
				this.dataModel.Nav_DoubleDetails.push({
					showPack: false,
					MineType: '',
					Nav_Area: {
						NAME: ''
					},
					RISK_NAME: '',
					RISK_DESCRIPTION: '',
					Nav_Type: {
						NAME: ''
					},
					EVALUATE_L: 0,
					EVALUATE_E: 0,
					EVALUATE_C: 0,
					EVALUATE_SCORE: 0,
					EVALUATE_LEVEL: '低风险',
					Nav_DetailPosts: [],
					Nav_DoubleDetailMeasures: [],
					Nav_DetailDeparts: [],
					isShowControl: false,
				})

				this.dataModel.Nav_DoubleDetails = [...this.dataModel.Nav_DoubleDetails]
			},
			handleNewControlMea(name, index) {
				if (name == 'Mea') {
					this.dataModel.Nav_DoubleDetails[index].Nav_DoubleDetailMeasures.push({
						NUM: 0,
						MEASURES_NAME: '',
						EMERGENCY: '',
						Nav_DetailMeasureContents: []
					})
				} else if (name == 'Lel') {
					this.dataModel.Nav_DoubleDetails[index].Nav_DetailPosts.push({
						DEPARTMENT_TYPE: '',
						Nav_Department: {
							NAME: ''
						},
						Nav_User: {
							NAME: ''
						},
					})
				} else if (name == 'Post') {
					this.dataModel.Nav_DoubleDetails[index].Nav_DetailDeparts.push({
						Nav_Department: {
							NAME: '',
							ID: ''
						},
						Nav_DepartDetails: []
					})
				} else if (name == 'CheckCo') {
					this.dataModel.Nav_DoubleDetails[index[0]].Nav_DoubleDetailMeasures[index[1]].Nav_DetailMeasureContents.push({
						Nav_Contents: {
							CHECKCONTENT: ''
						},
						Nav_DetailMeasureContentBasicsName: '',
						Nav_DetailMeasureContentBasics: [],
						CHECK_STANDARD: '',
						Nav_DetailMeasureContentPosts: [],
						Nav_DetailMeasureContentHiddens: []
					})
				} else if (name == 'CheckThreeLel') {
					this.dataModel.Nav_DoubleDetails[index[0]].Nav_DoubleDetailMeasures[index[1]].Nav_DetailMeasureContents[index[2]].Nav_DetailMeasureContentPosts.push({
						NUM: 0,
						CHECK_TYPE: '',
						Nav_Department: {
							NAME: '',
							ID: ''
						},
						Nav_CheckType: {
							NAME: ''
						},
						CHECK_CYCLE: '',
						Nav_DetailPosts: '',
					})
				} else if (name == 'RiskDesThree') {
					this.dataModel.Nav_DoubleDetails[index[0]].Nav_DoubleDetailMeasures[index[1]].Nav_DetailMeasureContents[index[2]].Nav_DetailMeasureContentHiddens.push({
						Nav_Question: {
							DESCREPTION: ''
						},
						HIDDEN_LEVEL: '一般',
						RECTIFICATION_MEASURES: '',
					})
				}

				// this.$nextTick(() => {
				// 	this.$refs.collapse.resize();
				// });
			},
			handleDelRowBefore(name, nowIndex) {
				this.showDelModalIndex = nowIndex[0]
				this.nowName = name
				this.nowIndex = nowIndex
			},
			confirmDel() {
				if (this.nowName == 'Area') {
					this.dataModel.Nav_DoubleDetails.splice(this.nowIndex[0], 1)
				} else if (this.nowName == 'Num') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures.splice(this.nowIndex[1], 1)
				} else if (this.nowName == 'RecDep') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DetailDeparts.splice(this.nowIndex[1], 1)
				} else if (this.nowName == 'CheckCoTwo') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents.splice(this.nowIndex[2], 1)
				} else if (this.nowName == 'CheckNum') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentPosts.splice(this.nowIndex[3], 1)
				} else if (this.nowName == 'RiskDesThree') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentHiddens.splice(this.nowIndex[3], 1)
				} else {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DetailPosts.splice(this.nowIndex[1], 1)
				}
				this.showDelModalIndex = undefined

			},
			cacelDel() {
				this.showDelModalIndex = undefined
			},
			cancelRecitifyDate() {
				this.showPopupRecitifyDate = false
			},
			handleChangeRecitify(name) {
				this.nowName = name
				this.showPopupRecitifyDate = true
			},
			confirmRecitifyDate(e) {
				if (this.nowName == 'start') {
					this.dataModel.START_DATE = uni.$u.timeFormat(e.value,
						'yyyy-mm-dd')

				} else {
					this.dataModel.END_DATE = uni.$u.timeFormat(e.value,
						'yyyy-mm-dd')
				}
				this.dateRecitifyTime = uni.$u.timeFormat(e.value,
					'yyyy-mm-dd')

				this.showPopupRecitifyDate = false
			},
			handleChangeStep(name, nowIndex) {
				this.currentOperateStep = {}
				this.showPopupStep = true
				this.nowName = name
				this.nowIndex = nowIndex
				this.handleSearchStep('init')
			},
			handleClosePopupStep() {
				this.showPopupStep = false
				this.isMultiple = false
				this.defaultChecked = []
				// this.showPopupCertificate = false
			},
			handleSearchStep(val, pageIndex) {
				const orgId = uni.getStorageSync('orgId')
				const json = initFilter(orgId, "", "",0, pageIndex ?? 1)
				
				json.Limit = 20
				if (pageIndex) {
					json.Start = (pageIndex - 1) * json.Limit;
				}
				this.defaultChecked = []
				
				if (val !== 'init') {
					const tempGroup = initFilterGroup(false);
					if(this.nowName == 'CheckContent' || this.nowName == 'CheckCoTwo')
					{
						extendGroupRule(tempGroup, 'CHECKCONTENT', 9, val)
					}
					else if(this.nowName == 'RecPost' || this.nowName == 'CheckThreePost')
					{
						extendGroupRule(tempGroup, 'DESCREPTION', 9, val)
					}
					else
					{extendGroupRule(tempGroup, 'NAME', 9, val)}
					extendFilterGroup(json, tempGroup);
				}
				let requestInfo = this.nowName == 'CheckArea' || this.nowName == 'Area' ? GetRiskAreaInfo :
					this.nowName == 'CheckContent' || this.nowName == 'CheckCoTwo' ? GetCheckContentsInfo :
					this.nowName == 'RiskDes' || this.nowName == 'RiskDesThree' ? GetHiddenScripList :
					this.nowName == 'demand' ? GetSKRequestInfo :
					this.nowName == 'Category' ? GetRiskTypeInfo :
					this.nowName == 'RecPost' || this.nowName == 'CheckThreePost' ? GetPostOrderPaged :
					this.nowName == 'Inspection' ? GetCheckInspection :
					this.nowName == 'CheckThreeType' ? CheckTypeNewOrderPaged :
					this.nowName == 'Dep' || this.nowName == 'RecDep' || this.nowName == 'CheckThreeDep' ?
					GetDepartmentInfo : this.nowName == 'RiskName' ? GetRiskNameInfo: getUserLists
				if (this.nowName == 'Inspection') {
					this.isMultiple = true
					let p = this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]]
					if (p.Nav_DetailMeasureContentBasics && p.Nav_DetailMeasureContentBasics.length > 0) {

						p.Nav_DetailMeasureContentBasics.map(item => {
							let newId = item.LAW_ID;
							// 创建一个新对象，ID 为 item.LAW_ID，其他属性和 item 相同
							let newItem = {
								...item,
								ID: newId
							};
							// 将新对象添加到 this.defaultChecked 数组中
							this.defaultChecked.push(newItem);
						})
					} else {
						this.defaultChecked = []
					}
				} else if (this.nowName == 'RecPost') {
					this.isMultiple = true
					let p = this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DetailDeparts[this.nowIndex[1]]
					if (p.Nav_DepartDetails && p.Nav_DepartDetails.length > 0) {

						p.Nav_DepartDetails.map(item => {
							let newId = item.Nav_Post ? item.Nav_Post.ID : item.ID;
							// 创建一个新对象，ID 为 item.LAW_ID，其他属性和 item 相同
							let newItem = {
								...item,
								ID: newId
							};
							this.defaultChecked.push(newItem)
						})
					} else {
						this.defaultChecked = []
					}
					if (p.Nav_Department.ID) {
						extendFilterGroupGroupRules(json, 'DEPARTMENT_ID', 1, p.Nav_Department.ID)
					}


				} else if (this.nowName == 'CheckThreePost') {
					this.isMultiple = true
					let p = this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentPosts[this.nowIndex[3]]
					if (p.Nav_DetailPosts && p.Nav_DetailPosts.length > 0) {
						p.Nav_DetailPosts.map(item => {
							let newId = item.Nav_Post ? item.Nav_Post.ID : item.ID;
							// 创建一个新对象，ID 为 item.LAW_ID，其他属性和 item 相同
							let newItem = {
								...item,
								ID: newId
							};
							this.defaultChecked.push(newItem)
						})
					} else {
						this.defaultChecked = []
					}
					if (p.Nav_Department.ID) {
						extendFilterGroupGroupRules(json, 'DEPARTMENT_ID', 1, p.Nav_Department.ID)
					}

				} else {
					this.isMultiple = false
				}
				json.Limit = 100
				requestInfo(json).then(res => {
					this.stepLists = (res.Data || res).map(i => {
						return {
							...i,
							id: i.ID,
							name: i.NAME || i.CHECKCONTENT || i.DEMAND,
						}
					})
					this.curTotalStep = res.TotalCount
					// }
				})



			},
			handleSelectedStep(val) {
				this.defaultChecked = []
				if (this.nowName == 'demand') {
					this.dataModel.Nav_Require.NAME = val.NAME
					this.dataModel.REQUIRE_ID = val.ID
					this.dataModel.RequireName = val.NAME
				} else if (this.nowName == 'Area') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_Area.NAME = val.NAME
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].AREA_ID = val.ID
				} else if (this.nowName == 'Category') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_Type.NAME = val.NAME
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].TYPE_ID = val.ID
				} else if (this.nowName == 'Dep') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DetailPosts[this.nowIndex[1]].Nav_Department = val
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DetailPosts[this.nowIndex[1]].DEPARTMENT_ID = val.ID
				} else if (this.nowName == 'RecDep') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DetailDeparts[this.nowIndex[1]].Nav_Department = val
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DetailDeparts[this.nowIndex[1]].DEPARTMENT_ID = val.ID
				} else if (this.nowName == 'RecPost') {
					let listArea = []
					let areaShow = ''
					if (val.length > 0) {
						val.forEach((item, i) => {
							if (i > 0) {
								areaShow += ' '
							}
							// 创建一个新对象，ID 为 item.LAW_ID，其他属性和 item 相同
							let newItem = {
								...item,
								MECHANISM_DETAIL_DEPART_ID: item.ID,
								POST_ID: item.ID,
								NAME: item.NAME || item.Nav_Post.NAME,
							};
							listArea.push(newItem)
							if (item.NAME && item.NAME != null) {
								areaShow += item.NAME
							} else if (item.Nav_Post && item.Nav_Post.NAME != null) {
								areaShow += item.Nav_Post.NAME
							}

						})
					}
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DetailDeparts[this.nowIndex[1]].Nav_DepartDetails = listArea
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DetailDeparts[this.nowIndex[1]].Nav_DepartDetailsName = areaShow
				} else if (this.nowName == 'CheckCoTwo') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_Contents.CHECKCONTENT = val.CHECKCONTENT
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].CHECK_CONTENTS_ID = val.ID
				} else if (this.nowName == 'Inspection') {
					let listArea = []
					let areaShow = ''
					if (val.length > 0) {
						val.forEach((item, i) => {
							if (i > 0) {
								areaShow += ' '
							}
							let newItem = {
								...item,
								LAW_ID: item.ID,
								DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_ID:item.ID,
								NAME: item.NAME || item.Nav_Law.NAME,
							};
							listArea.push(newItem)
							if (item.NAME && item.NAME != null) {
								areaShow += item.NAME
							} else if (item.Nav_Law && item.Nav_Law.NAME != null) {
								areaShow += item.Nav_Law.NAME
							}
						})
					}
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentBasics = listArea
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentBasicsName = areaShow
				} else if (this.nowName == 'CheckThreePost') {
					let listArea = []
					let areaShow = ''
					if (val.length > 0) {
						val.forEach((item, i) => {
							if (i > 0) {
								areaShow += ' '
							}
							// 创建一个新对象，ID 为 item.LAW_ID，其他属性和 item 相同
							let newItem = {
								...item,
								POST_ID: item.ID,
								DOUBLE_PREVENT_MECHANISM_DETAIL_MEASURES_CONTENT_ID: item.ID,
								NAME: item.NAME || item.Nav_Post.NAME,
							};
							listArea.push(newItem)
							if (item.NAME && item.NAME != null) {
								areaShow += item.NAME
							} else if (item.Nav_Post && item.Nav_Post.NAME != null) {
								areaShow += item.Nav_Post.NAME
							}
						})
					}
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentPosts[this.nowIndex[3]].Nav_DetailPosts =
						listArea
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentPosts[this.nowIndex[3]]
						.Nav_DetailPostsName = areaShow
				} else if (this.nowName == 'CheckThreeDep') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentPosts[this.nowIndex[3]].Nav_Department =
						val
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentPosts[this.nowIndex[3]]
						.DEPARTMENT_ID = val.ID
				} else if (this.nowName == 'CheckThreeType') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentPosts[this.nowIndex[3]].Nav_CheckType =
						val
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentPosts[this.nowIndex[3]]
						.CHECK_TYPE_ID = val.ID
				} 
				else if (this.nowName == 'RiskDesThree') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentHiddens[this.nowIndex[3]]
						.CHECK_QUESTION_ID = val.ID
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentHiddens[this.nowIndex[3]].Nav_Question
						.DESCREPTION = val.DESCREPTION
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DoubleDetailMeasures[this.nowIndex[1]].Nav_DetailMeasureContents[this.nowIndex[2]].Nav_DetailMeasureContentHiddens[this.nowIndex[3]]
						.RECTIFICATION_MEASURES = val.DEMAND
				} else if (this.nowName == 'CheckArea') {
					this.dataModel.Nav_RiskArea.NAME = val.NAME
					this.dataModel.RISK_AREA_ID = val.ID

				} else if (this.nowName == 'CheckContent') {
					this.dataModel.Nav_Contents.CHECKCONTENT = val.CHECKCONTENT
					this.dataModel.CHECK_CONTENTS_ID = val.ID
				} else if (this.nowName == 'RiskDes') {
					this.dataModel.Nav_Question.DESCREPTION = val.DESCREPTION
					this.dataModel.CHECK_QUESTION_ID = val.ID
					this.dataModel.HIDDEN_LEVEL = val.QUESTION_LEVEL == 0 ? '一般' : '重大'
					this.dataModel.HIDDEN_DESCRIPTION = val.DEMAND
				} else if (this.nowName == 'RiskName') {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_RiskName.NAME = val.NAME
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].RISK_NAME_ID = val.ID
				} 
				else {
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DetailPosts[this.nowIndex[1]].Nav_User.NAME = val.NAME
					this.dataModel.Nav_DoubleDetails[this.nowIndex[0]].Nav_DetailPosts[this.nowIndex[1]].USER_ID = val.ID
				}
				this.showPopupStep = false

			},
			submit() {
				let i=1
				for (let item of this.dataModel.Nav_DoubleDetails) {
					if (!item.MineType) {
						uni.showToast({
							title: '顺序'+i+'生产单元不能为空',
							icon: 'none'
						})
						return
					}
					if (!item.Nav_Area.NAME) {
						uni.showToast({
							title: '顺序'+i+'辨识区域不能为空',
							icon: 'none'
						})
						return
					}
					if (!item.RISK_NAME) {
						uni.showToast({
							title: '顺序'+i+'风险名称不能为空',
							icon: 'none'
						})
						return
					}
					// if (!item.Nav_RiskName.NAME) {
					// 	uni.showToast({
					// 		title: '顺序'+i+'风险名称不能为空',
					// 		icon: 'none'
					// 	})
					// 	return
					// }
					if (!item.RISK_DESCRIPTION) {
						uni.showToast({
							title: '顺序'+i+'风险描述不能为空',
							icon: 'none'
						})
						return
					}
					if (!item.Nav_Type.NAME) {
						uni.showToast({
							title: '顺序'+i+'风险类别不能为空',
							icon: 'none'
						})
						return
					}
					if (!item.EVALUATE_L) {
						uni.showToast({
							title: '顺序'+i+'风险评价L不能为空',
							icon: 'none'
						})
						return
					}
					if (!item.EVALUATE_E) {
						uni.showToast({
							title: '顺序'+i+'风险评价E不能为空',
							icon: 'none'
						})
						return
					}
					if (!item.EVALUATE_C) {
						uni.showToast({
							title: '顺序'+i+'风险评价C不能为空',
							icon: 'none'
						})
						return
					}
					if (!item.EVALUATE_SCORE) {
						uni.showToast({
							title: '顺序'+i+'分值D不能为空',
							icon: 'none'
						})
						return
					}
					if (!item.EVALUATE_LEVEL) {
						uni.showToast({
							title: '顺序'+i+'风险等级不能为空',
							icon: 'none'
						})
						return
					}
					if (item.Nav_DoubleDetailMeasures.length !== 0) {
						for (let item1 of item.Nav_DoubleDetailMeasures) {
							if (!item1.MEASURES_NAME) {
								uni.showToast({
									title: '顺序'+i+'管控措施不能为空',
									icon: 'none'
								})
								return
							}
							// if (!item1.EMERGENCY) {
							// 	uni.showToast({
							// 		title: '应急处置不能为空',
							// 		icon: 'none'
							// 	})
							// 	return
							// }
							if (item1.Nav_DetailMeasureContents.length !== 0) {
								for (let item2 of item1.Nav_DetailMeasureContents) {
									if (!item2.Nav_Contents.CHECKCONTENT) {
										uni.showToast({
											title: '顺序'+i+'检查内容不能为空',
											icon: 'none'
										})
										return
									}
									if (item2.Nav_DetailMeasureContentPosts.length !== 0) {
										for (let item3 of item2.Nav_DetailMeasureContentPosts) {
											if (!item3.CHECK_TYPE) {
												uni.showToast({
													title: '顺序'+i+'检查层级不能为空',
													icon: 'none'
												})
												return
											}
											if (!item3.Nav_Department.NAME) {
												uni.showToast({
													title: '顺序'+i+'检查部门不能为空',
													icon: 'none'
												})
												return
											}
											if (!item3.Nav_CheckType.NAME) {
												uni.showToast({
													title: '顺序'+i+'检查类型不能为空',
													icon: 'none'
												})
												return
											}
											if (!item3.CHECK_CYCLE) {
												uni.showToast({
													title: '顺序'+i+'检查周期不能为空',
													icon: 'none'
												})
												return
											}
											if (item3.Nav_DetailPosts.length == 0) {
												uni.showToast({
													title: '顺序'+i+'检查岗位不能为空',
													icon: 'none'
												})
												return
											}
										}
									}
									if (item2.Nav_DetailMeasureContentHiddens.length !== 0) {
										for (let item3 of item2.Nav_DetailMeasureContentHiddens) {
											if (!item3.Nav_Question.DESCREPTION) {
												uni.showToast({
													title: '顺序'+i+'隐患描述不能为空',
													icon: 'none'
												})
												return
											}
											if (!item3.HIDDEN_LEVEL) {
												uni.showToast({
													title: '顺序'+i+'隐患等级不能为空',
													icon: 'none'
												})
												return
											}
											if (!item3.RECTIFICATION_MEASURES) {
												uni.showToast({
													title: '顺序'+i+'整改措施不能为空',
													icon: 'none'
												})
												return
											}
										}
									}

								}
							}
						}
					}
					if (item.Nav_DetailPosts.length !== 0) {
						for (let item1 of item.Nav_DetailPosts) {
							if (!item1.DEPARTMENT_TYPE) {
								uni.showToast({
									title: '顺序'+i+'管控层级不能为空',
									icon: 'none'
								})
								return
							}
							if (!item1.Nav_Department.NAME) {
								uni.showToast({
									title: '顺序'+i+'管控部门不能为空',
									icon: 'none'
								})
								return
							}
							if (!item1.Nav_User.NAME) {
								uni.showToast({
									title: '顺序'+i+'管控责任人不能为空',
									icon: 'none'
								})
								return
							}
						}
					}
					if (item.Nav_DetailDeparts.length !== 0) {
						for (let item1 of item.Nav_DetailDeparts) {
							if (!item1.Nav_Department.NAME) {
								uni.showToast({
									title: '顺序'+i+'辨识部门不能为空',
									icon: 'none'
								})
								return
							}
							if (item1.Nav_DepartDetails.length == 0) {
								uni.showToast({
									title: '顺序'+i+'辨识岗位不能为空',
									icon: 'none'
								})
								return
							}
						}
					}
					i++
				}
				this.model.ORG_ID = this.ORG_ID
				let arr = []

				this.dataModel.Nav_DoubleDetails.map(item => {
					arr.push({
						MineType: MineTypeIndex[item.MineType],
						AREA_ID: item.AREA_ID,
						RISK_NAME: item.RISK_NAME,
						RISK_NAME_ID: item.RISK_NAME_ID,
						RISK_DESCRIPTION: item.RISK_DESCRIPTION,
						TYPE_ID: item.TYPE_ID,
						EVALUATE_L: item.EVALUATE_L,
						EVALUATE_E: item.EVALUATE_E,
						EVALUATE_C: item.EVALUATE_C,
						EVALUATE_SCORE: item.EVALUATE_SCORE,
						EVALUATE_LEVEL: item.EVALUATE_LEVEL == '重大风险' ? 10 : item.EVALUATE_LEVEL == '较大风险' ? 20 : item.EVALUATE_LEVEL == '一般风险' ? 30 : item.EVALUATE_LEVEL == '低风险' ? 40 : 0,
						Nav_DoubleDetailMeasures: item.Nav_DoubleDetailMeasures.map(item1 => ({
							MEASURES_NAME: item1.MEASURES_NAME,
							EMERGENCY: item1.EMERGENCY,
							Nav_DetailMeasureContents: item1.Nav_DetailMeasureContents.map(item2 => ({
								CHECK_CONTENTS_ID: item2.CHECK_CONTENTS_ID,
								Nav_DetailMeasureContentBasics: item2.Nav_DetailMeasureContentBasics,
								CHECK_STANDARD: item2.CHECK_STANDARD,
								Nav_DetailMeasureContentPosts: item2.Nav_DetailMeasureContentPosts.map(item3 => ({
									CHECK_TYPE: item3.CHECK_TYPE == '部门' ? 0 : item3.CHECK_TYPE == '车间' ? 1 : item3.CHECK_TYPE == '班组' ? 2 : item3.CHECK_TYPE == '公司' ? 3 :
										4,
									DEPARTMENT_ID: item3.DEPARTMENT_ID,
									CHECK_TYPE_ID: item3.CHECK_TYPE_ID,
									CHECK_CYCLE: item3.CHECK_CYCLE == '无' ? 0 : item3.CHECK_CYCLE == '每天' ? 10 : item3.CHECK_CYCLE == '每周' ? 20 : item3.CHECK_CYCLE ==
										'每月' ? 30 : item3.CHECK_CYCLE == '每季' ? 40 : item3.CHECK_CYCLE == '每半年' ? 50 : item3.CHECK_CYCLE == '每年' ? 60 : 70,
									Nav_DetailPosts: item3.Nav_DetailPosts,
								})),
								Nav_DetailMeasureContentHiddens: item2.Nav_DetailMeasureContentHiddens.map(item3 => ({
									CHECK_QUESTION_ID: item3.CHECK_QUESTION_ID,
									HIDDEN_LEVEL: item3.HIDDEN_LEVEL == '一般' ? 0 : 10,
									RECTIFICATION_MEASURES: item3.RECTIFICATION_MEASURES
								})),


							}))

						})),
						Nav_DetailPosts: item.Nav_DetailPosts.map(item1 => ({
							DEPARTMENT_TYPE: item1.DEPARTMENT_TYPE == '部门' ? 0 : item1.DEPARTMENT_TYPE == '车间' ? 1 : item1.DEPARTMENT_TYPE == '班组' ? 2 : item1.DEPARTMENT_TYPE == '公司' ? 3 : 4,
							DEPARTMENT_ID: item1.DEPARTMENT_ID,
							USER_ID: item1.USER_ID
						})),
						Nav_DetailDeparts: item.Nav_DetailDeparts.map(item1 => ({
							DEPARTMENT_ID: item1.DEPARTMENT_ID,
							Nav_DepartDetails: item1.Nav_DepartDetails
						})),
					})
				})
				this.model = {
					ORG_ID: this.ORG_ID,
					RISK_AREA_ID: this.dataModel.RISK_AREA_ID,
					CHECK_CONTENTS_ID: this.dataModel.CHECK_CONTENTS_ID,
					CHECK_QUESTION_ID: this.dataModel.CHECK_QUESTION_ID,
					HIDDEN_LEVEL: this.dataModel.HIDDEN_LEVEL == '一般' ? 0 : 10,
					RECTIFICATION_MEASURES: this.dataModel.RECTIFICATION_MEASURES,
					Nav_DoubleFiles: this.dataModel.Nav_DoubleFiles,
					Nav_DoubleDetails: arr
				}
				this.model.TaskID = this.TaskID;
				this.model.ID = this.ID;
				this.model.PUBLISH = "SaveAndNotify";
				// console.log(this.model)
				SKDoublePreventFullUpdate(this.model).then(res => {
					if (res) {
						uni.$showMsgFunc('操作成功!', () => {
							uni.navigateBack()
						}, 'success', 1000)
					}
				})


			}

		},
	}
</script>

<style scoped>
	@import url("../../../../style/css/newTemplate.css");

	.sub-form>>>.u-form-item__body__right__content__slot {
		display: flex;
		justify-content: flex-end;
	}

	.collapse>>>.uni-collapse-item__title-box {
		padding: 0px;
	}

	.collapse>>>.uni-collapse-item__title-arrow {
		margin-right: 0px;
	}

	.collapse>>>.uni-icons {
		color: #606266 !important;
	}

	.collapse>>>.uni-collapse-item__wrap-content.open {
		padding: 0px 0px 20px 0px;
	}

	.force-reflow {
		/* 这里可以设置一个无实际影响的样式，例如透明边框 */
		border: 1px solid transparent;
	}

	.collapse-content {
		height: 400px;
		width: 100%;
	}

	.collapse-content-no {
		/* height: 200px;
		width: 100%; */
	}
</style>