| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226 |
- <template>
- <!-- 查看模式:由 顶部摘要、基本信息、检查内容与业务工作、检查记录 组成 -->
- <main v-if="isViewMode" class="safety-platform-container__main area-check-plan-view">
- <section class="view-section view-summary">
- <div class="view-summary__title">一级危险点:{{ viewDetail.checkVenue || '-' }}</div>
- <div class="view-summary__meta">
- <span>检查类别:{{ viewDetail.venueCategoryName || '-' }}</span>
- <span>创建人:{{ viewDetail. createdPersonName || '-' }}</span>
- <span>创建时间:{{ viewDetail.createdAt || '-' }}</span>
- </div>
- </section>
- <section class="view-section audit-content">
- <h4 class="section-title">
- <el-icon class="section-title__icon"><Document /></el-icon>
- <span>基本信息</span>
- </h4>
- <div class="detail-ct detail-ct--table">
- <div class="row">
- <div class="col">
- <div class="label">区域计划名称:</div>
- <div class="value">{{ viewDetail.planName || '-' }}</div>
- </div>
- <div class="col">
- <div class="label">状态:</div>
- <div class="value">{{ viewDetail.statusName || '进行中' }}</div>
- </div>
- </div>
- <div class="row">
- <div class="col">
- <div class="label">主责部门:</div>
- <div class="value">{{ viewDetail.primaryResponsibleDeptName || '-' }}</div>
- </div>
- <div class="col">
- <div class="label">自查频率:</div>
- <div class="value">{{ viewDetail.selfCheckFrequency || '-' }}</div>
- </div>
- </div>
- <div class="row">
- <div class="col">
- <div class="label">主责部门执行人所属分组名称:</div>
- <div class="value">{{ viewDetail.primaryResponsibleDeptExecGroupName || '-' }}</div>
- </div>
- <div class="col">
- <div class="label">主责部门责任人:</div>
- <div class="value">{{ viewDetail.primaryResponsibleDeptPersonName || '-' }}</div>
- </div>
- </div>
- <div class="row">
- <div class="col">
- <div class="label">安全应急部部门名称:</div>
- <div class="value">{{ viewDetail.safetyEmergencyDeptName || '-' }}</div>
- </div>
- <div class="col">
- <div class="label">安全应急部检查频次:</div>
- <div class="value">{{ viewDetail.safetyEmergencyCheckFrequency || '-' }}</div>
- </div>
- </div>
- <div class="row">
- <div class="col">
- <div class="label">安全应急部执行人所属分组名称:</div>
- <div class="value">{{ viewDetail.safetyEmergencyExecGroupName || '-' }}</div>
- </div>
- <div class="col">
- <div class="label">安全应急部责任人:</div>
- <div class="value">{{ viewDetail.safetyEmergencyPersonName || '-' }}</div>
- </div>
- </div>
- <div class="row">
- <div class="col">
- <div class="label">院领导部门名称:</div>
- <div class="value">{{ viewDetail.hospitalLeaderDeptName || '-' }}</div>
- </div>
- <div class="col">
- <div class="label">院领导检查频次:</div>
- <div class="value">{{ viewDetail.hospitalLeaderCheckFrequency || '-' }}</div>
- </div>
- </div>
- <div class="row">
- <div class="col">
- <div class="label">院领导执行人所属分组名称:</div>
- <div class="value">{{ viewDetail.hospitalLeaderExecGroupName || '-' }}</div>
- </div>
- <div class="col">
- <div class="label">院领导责任人:</div>
- <div class="value">{{ viewDetail.hospitalLeaderPersonName || '-' }}</div>
- </div>
- </div>
- <div class="row">
- <div class="col">
- <div class="label">检查单所属类别名称:</div>
- <div class="value">{{ viewDetail.categoryName || '-' }}</div>
- </div>
- <div class="col">
- <div class="label">检查单模版名称:</div>
- <div class="value">{{ viewDetail.checklistTemplateName || '-' }}</div>
- </div>
- </div>
- <div class="row">
- <div class="col">
- <div class="label">是否需要整体检查情况描述:</div>
- <div class="value">{{ viewDetail.needOverallDesc === true ? '是' : viewDetail.needOverallDesc === false ? '否' : '-' }}</div>
- </div>
- <div class="col">
- <div class="label">是否需要被检查人签字:</div>
- <div class="value">{{ viewDetail.needSigneeSign === true ? '是' : viewDetail.needSigneeSign === false ? '否' : '-' }}</div>
- </div>
- </div>
- <div class="row">
- <div class="col">
- <div class="label">计划开始日期:</div>
- <div class="value">{{ viewDetail.planStartTime || '-' }}</div>
- </div>
- <div class="col">
- <div class="label">计划完成日期:</div>
- <div class="value">{{ viewDetail.planEndTime || '-' }}</div>
- </div>
- </div>
- <div class="row">
- <div class="col">
- <div class="label">检查内容:</div>
- <div class="value value--list">
- <ol class="inspection-content-list">
- <li v-for="(item, i) in inspectionContentList" :key="i">{{ item }}</li>
- </ol>
- </div>
- </div>
- <div class="col">
- <div class="label">业务工作:</div>
- <div class="value">{{ viewDetail.businessWork || '-' }}</div>
- </div>
- </div>
- </div>
- </section>
- <section class="view-section">
- <div class="view-section__title">
- <span class="view-section__icon" />
- 检查记录
- </div>
- <div class="view-record-toolbar">
- <el-input
- v-model="recordSearchKeyword"
- placeholder="检查场所类别/检查场所/检查人员"
- clearable
- style="width: 280px; margin-right: 12px"
- />
- <el-date-picker
- v-model="recordDateRange"
- type="daterange"
- range-separator="-"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- value-format="YYYY-MM-DD"
- style="margin-right: 12px"
- />
- <el-button type="primary" @click="onRecordSearch">查询</el-button>
- <el-button @click="onRecordExport">导出</el-button>
- </div>
- <BasicTable
- :tableData="paginatedRecordList"
- :tableConfig="recordTableConfig"
- class="view-record-table"
- @update:pageSize="handleRecordSizeChange"
- @update:pageNumber="handleRecordPageChange"
- >
- <template #unqualifiedItemNum="scope">
- <el-button
- type="primary"
- link
- size="small"
- @click="openUnqualifiedDialog(scope.row)"
- >
- {{ scope.row.unqualifiedItemNum ?? 0 }}
- </el-button>
- </template>
- <template #sign="scope">
- <template v-if="parseSignFiles(scope.row.checkedPersonSign || scope.row.signFile).length">
- <div
- class="file-container--div"
- v-for="item in parseSignFiles(scope.row.checkedPersonSign || scope.row.signFile)"
- :key="item.fileUrl || item.fileName"
- >
- <img
- class="file-container--div__icon"
- :src="FILE_TYPE_ICON[item.fileType as keyof typeof FILE_TYPE_ICON]"
- @click="previewOnline(item.fileUrl, item.fileType as keyof typeof FILE_TYPE_ICON)"
- />
- <span
- class="file-container--div__name"
- @click="previewOnline(item.fileUrl, item.fileType as keyof typeof FILE_TYPE_ICON)"
- >{{ item.fileName }}</span
- >
- <img
- class="file-container--div__download"
- :src="DownloadIcon"
- @click="downloadFile(item.fileUrl, item.fileName)"
- />
- </div>
- </template>
- <span v-else>-</span>
- </template>
- <template #action="scope">
- <el-button type="danger" link size="small" @click="onDeleteRecord(scope.row)">删除</el-button>
- <el-button type="primary" link size="small" @click="onViewRecord(scope.row)">检查记录查看</el-button>
- </template>
- </BasicTable>
- </section>
- </main>
- <main v-else class="safety-platform-container__main">
- <BasicForm
- ref="basicFormRef"
- :formData="ruleFormData"
- :formRules="isViewMode ? undefined : formRules"
- :formConfig="computedFormConfig"
- >
- <template #primaryResponsibleDept>
- <el-cascader
- ref="primaryResponsibleDeptCascaderRef"
- v-model="ruleFormData.primaryResponsibleDeptId"
- :options="deptTree"
- :props="cascaderDeptProp"
- :show-all-levels="false"
- placeholder="请选择部门"
- filterable
- clearable
- :disabled="isViewMode"
- style="width: 100%"
- @change="onPrimaryResponsibleDeptChange"
- />
- </template>
- <template #safetyEmergencyDept>
- <el-cascader
- ref="safetyEmergencyDeptCascaderRef"
- v-model="ruleFormData.safetyEmergencyDeptId"
- :options="deptTree"
- :props="cascaderDeptProp"
- :show-all-levels="false"
- placeholder="请选择部门"
- filterable
- clearable
- :disabled="isViewMode"
- style="width: 100%"
- @change="onSafetyEmergencyDeptChange"
- />
- </template>
- <template #hospitalLeaderDept>
- <el-cascader
- ref="hospitalLeaderDeptCascaderRef"
- v-model="ruleFormData.hospitalLeaderDeptId"
- :options="deptTree"
- :props="cascaderDeptProp"
- :show-all-levels="false"
- placeholder="请选择部门"
- filterable
- clearable
- :disabled="isViewMode"
- style="width: 100%"
- @change="onHospitalLeaderDeptChange"
- />
- </template>
- <template #selfCheckFrequency>
- <el-radio-group v-model="ruleFormData.selfCheckFrequency" :disabled="isViewMode">
- <el-radio
- v-for="opt in CHECK_FREQUENCY_OPTIONS"
- :key="opt.value"
- :value="opt.value"
- >
- {{ opt.label }}
- </el-radio>
- </el-radio-group>
- </template>
- <template #safetyEmergencyCheckFrequency>
- <el-radio-group v-model="ruleFormData.safetyEmergencyCheckFrequency" :disabled="isViewMode">
- <el-radio
- v-for="opt in CHECK_FREQUENCY_OPTIONS"
- :key="opt.value"
- :value="opt.value"
- >
- {{ opt.label }}
- </el-radio>
- </el-radio-group>
- </template>
- <template #hospitalLeaderCheckFrequency>
- <el-radio-group v-model="ruleFormData.hospitalLeaderCheckFrequency" :disabled="isViewMode">
- <el-radio
- v-for="opt in CHECK_FREQUENCY_OPTIONS"
- :key="opt.value"
- :value="opt.value"
- >
- {{ opt.label }}
- </el-radio>
- </el-radio-group>
- </template>
- <template #venueCategoryName>
- <el-select
- v-model="ruleFormData.venueCategoryName"
- placeholder="请选择检查类别"
- filterable
- clearable
- :disabled="isViewMode"
- style="width: 100%"
- >
- <el-option
- v-for="item in venueCategoryOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </template>
- </BasicForm>
- </main>
- <footer class="safety-platform-container__footer">
- <el-button @click="router.back()">返回</el-button>
- <el-button v-if="!isViewMode" type="primary" @click="handleSubmit">
- {{ isCreateMode ? '提交' : '保存' }}
- </el-button>
- </footer>
- <PreviewOnline ref="previewOnlineRef" />
- <!-- 检查不合格数据弹窗(管理员) -->
- <el-dialog
- v-model="showUnqualifiedDialog"
- title="检查不合格数据"
- width="800px"
- destroy-on-close
- >
- <BasicTable
- :tableData="unqualifiedList"
- :tableConfig="unqualifiedTableConfig"
- @update:pageSize="handleUnqualifiedSizeChange"
- @update:pageNumber="handleUnqualifiedPageChange"
- >
- <template #action="scope">
- <el-button
- v-if="Number(scope.row.IsSand) == 0"
- type="primary"
- link
- size="small"
- @click="handleSandToHiddenDanger(scope.row)"
- >
- 入账
- </el-button>
- <span v-else-if="Number(scope.row.IsSand) == 1" style="color: #999999">已入账</span>
- <span v-else>-</span>
- </template>
- </BasicTable>
- </el-dialog>
- <!-- 检查记录入账隐患台账确认弹窗 -->
- <el-dialog
- v-model="showSandConfirmDialog"
- title="检查记录入账隐患台账"
- width="900px"
- destroy-on-close
- >
- <BasicForm
- ref="sandHiddenDangerFormRef"
- :formData="sandHiddenDangerFormData"
- :formRules="sandHiddenDangerFormRules"
- :formConfig="sandHiddenDangerFormConfig"
- >
- <template #reviewDepartmentId>
- <el-cascader
- v-model="sandHiddenDangerFormData.reviewDepartmentId"
- :options="deptTree"
- :props="cascaderDeptProp"
- :show-all-levels="false"
- placeholder="请选择复查人员所属部门"
- filterable
- clearable
- style="width: 100%"
- />
- </template>
- <template #reviewPerson>
- <el-select
- v-model="sandHiddenDangerFormData.reviewPersonId"
- placeholder="请选择复查人员"
- clearable
- filterable
- style="width: 100%"
- >
- <el-option
- v-for="u in reviewUserList"
- :key="u.id"
- :label="u.realname || u.username"
- :value="u.id"
- />
- </el-select>
- </template>
- <template #isDrawLessonsPush>
- <el-radio-group v-model="sandHiddenDangerFormData.isDrawLessonsPush">
- <el-radio :value="0">否</el-radio>
- <el-radio :value="1">是</el-radio>
- </el-radio-group>
- </template>
- <template #drawLessonsDepartmentIds>
- <el-select
- v-model="drawLessonsDeptIdsArray"
- placeholder="请选择举一反三责任部门,可多选"
- clearable
- filterable
- multiple
- collapse-tags
- collapse-tags-tooltip
- style="width: 100%"
- @change="() => { sandHiddenDangerFormData.drawLessonsDepartmentIds = drawLessonsDeptIdsArray.join(','); }"
- >
- <el-option
- v-for="d in deptOptions"
- :key="d.id"
- :label="d.deptName"
- :value="d.id"
- />
- </el-select>
- </template>
- </BasicForm>
- <template #footer>
- <el-button @click="showSandConfirmDialog = false">取消</el-button>
- <el-button type="primary" :loading="sandConfirmLoading" @click="confirmSandToHiddenDanger">
- 提交
- </el-button>
- </template>
- </el-dialog>
- </template>
- <script setup lang="ts">
- import { computed, onMounted, ref, watch } from 'vue';
- import { useRoute, useRouter } from 'vue-router';
- import { ElMessage } from 'element-plus';
- import { Document } from '@element-plus/icons-vue';
- import BasicForm from '@/components/BasicForm.vue';
- import BasicTable from '@/components/BasicTable.vue';
- import { FILE_TYPE_ICON } from '@/components/UploadFiles/constants';
- import DownloadIcon from '@/views/disaster/disaster-control/src/svg/download.svg';
- import PreviewOnline from '@/views/disaster/components/PreviewOnline.vue';
- import { downloadFile } from '@/views/disaster/utils';
- import { useFormConfigHook } from '@/hooks/useFormConfigHook';
- import useTableConfig from '@/hooks/useTableConfigHook';
- import type { TableColumnProps } from '@/types/basic-table';
- import {
- AREA_CHECK_PLAN_FORM_CONFIG as AREA_CHECK_PLAN_FORM_CONFIG_IMPORT,
- AREA_CHECK_PLAN_FORM_DATA as AREA_CHECK_PLAN_FORM_DATA_IMPORT,
- AREA_CHECK_PLAN_FORM_RULES as AREA_CHECK_PLAN_FORM_RULES_IMPORT,
- CHECK_FREQUENCY_OPTIONS as CHECK_FREQUENCY_OPTIONS_IMPORT,
- } from '../configs/form';
- import type { AreaCheckPlanRecord } from '../configs/types';
- import { AREA_CHECK_PLAN_STATUS_LABEL } from '../configs/status';
- import { getAllDepartments } from '@/api/auth/dept';
- import type { DeptTree } from '@/types/dept/type';
- import { cloneDeep } from 'lodash-es';
- import {
- queryAreaCheckPlanManageDetail,
- saveAreaCheckPlanManage,
- updateAreaCheckPlanManage,
- queryAreaCheckPlanDetailPage,
- deleteAreaCheckPlanDetail,
- queryAreaCheckRecord,
- mapAreaCheckPlanApiRecordToUi,
- queryCheckListTemplateNameList,
- queryUnqualifiedItemNumPage,
- sandAreaCheckRecordToProductionHiddenDanger,
- exportInspectionRecordTow,
- type ChecklistTemplate,
- type UnqualifiedItemNumRecord,
- type SandAreaCheckRecordToHiddenDangerReq,
- } from '@/api/production-safety-system';
- import { queryDictTypeDetail } from '@/api/dict';
- import {
- HIDDEN_DANGER_FORM_CONFIG,
- HIDDEN_DANGER_FORM_DATA,
- HIDDEN_DANGER_FORM_RULES,
- } from '@/views/production-safety/hiddenTroubleInvestigationAndGovernance/hiddenTroubleAccountManagement/configs/form';
- import { downloadByData } from '@/utils/file/download';
- import { id } from 'element-plus/es/locale';
- const router = useRouter();
- const route = useRoute();
- const operate = computed(() => (route.query.operate as string) || 'area-check-plan-create');
- const currentId = computed(() => Number(route.query.id));
- const isCreateMode = computed(() => operate.value === 'area-check-plan-create');
- const isEditMode = computed(() => operate.value === 'area-check-plan-edit');
- const isViewMode = computed(() => operate.value === 'area-check-plan-view');
- const venueCategoryOptions = ref<Array<{ label: string; value: string }>>([]);
- const AREA_CHECK_PLAN_FORM_CONFIG = AREA_CHECK_PLAN_FORM_CONFIG_IMPORT ?? [];
- const AREA_CHECK_PLAN_FORM_DATA = AREA_CHECK_PLAN_FORM_DATA_IMPORT ?? {};
- const AREA_CHECK_PLAN_FORM_RULES = AREA_CHECK_PLAN_FORM_RULES_IMPORT ?? {};
- const CHECK_FREQUENCY_OPTIONS = CHECK_FREQUENCY_OPTIONS_IMPORT ?? [];
- const { ruleFormData, formRules, ruleFormConfig, cloneRuleFormData } = useFormConfigHook(
- AREA_CHECK_PLAN_FORM_CONFIG,
- AREA_CHECK_PLAN_FORM_DATA as Record<string, unknown>,
- AREA_CHECK_PLAN_FORM_RULES,
- );
- // 部门树,与新增物品领取记录页的部门下拉一致(getAllDepartments,取第一级 children)
- const primaryResponsibleDeptCascaderRef = ref();
- const safetyEmergencyDeptCascaderRef = ref();
- const hospitalLeaderDeptCascaderRef = ref();
- const deptTree = ref<DeptTree[]>([]);
- const cascaderDeptProp = {
- checkStrictly: true,
- expandTrigger: 'hover' as const,
- value: 'id',
- label: 'deptName',
- emitPath: false,
- };
- /** 部门树:主责部门、安全应急部门、院领导部门均使用 getAllDepartments 接口 */
- const getDeptTreeData = async () => {
- try {
- const res = await getAllDepartments();
- deptTree.value = res?.[0]?.children ?? [];
- } catch (e) {
- console.error('获取部门树失败:', e);
- deptTree.value = [];
- }
- };
- const findDeptIdByName = (nodes: DeptTree[] | undefined, name: string): number | undefined => {
- if (!nodes?.length) return undefined;
- for (const n of nodes) {
- if (n.deptName === name) return n.id ?? undefined;
- const found = findDeptIdByName(n.children, name);
- if (found != null) return found;
- }
- return undefined;
- };
- const setDeptNameFromCascader = (refVal: any, nameKey: 'primaryResponsibleDeptName' | 'safetyEmergencyDeptName' | 'hospitalLeaderDeptName') => {
- const nodes = refVal?.getCheckedNodes?.();
- const label = nodes?.[0]?.label ?? '';
- const value = nodes?.[0]?.value;
- ruleFormData[nameKey] = label;
- if (nameKey === 'primaryResponsibleDeptName') {
- ruleFormData.primaryResponsibleDeptCode = value != null ? String(value) : '';
- }
- };
- const onPrimaryResponsibleDeptChange = () => {
- setDeptNameFromCascader(primaryResponsibleDeptCascaderRef.value, 'primaryResponsibleDeptName');
- };
- const onSafetyEmergencyDeptChange = () => {
- setDeptNameFromCascader(safetyEmergencyDeptCascaderRef.value, 'safetyEmergencyDeptName');
- };
- const onHospitalLeaderDeptChange = () => {
- setDeptNameFromCascader(hospitalLeaderDeptCascaderRef.value, 'hospitalLeaderDeptName');
- };
- // 检查单模版类别:使用 admin/dict/queryDictTypeDetail 接口
- const checklistCategoryOptions = ref<Array<{ label: string; value: string }>>([]);
- const loadChecklistCategoryOptions = async () => {
- try {
- const res = await queryDictTypeDetail('checklist_template');
- const list = res?.sysDictDataList ?? [];
- checklistCategoryOptions.value = list.map((item) => ({
- label: item.itemValue,
- value: item.itemCode,
- }));
- } catch (e) {
- console.error('获取检查单模版类别字典失败:', e);
- checklistCategoryOptions.value = [];
- }
- };
- // 检查单模版名称:来自接口,可按类别筛选
- const checklistTemplateOptions = ref<Array<{ label: string; value: string }>>([]);
- const allChecklistTemplates = ref<ChecklistTemplate[]>([]);
- /** 根据类别名称(form 静态选项的 value)筛选模版下拉 */
- const updateChecklistTemplateOptionsByCategory = (categoryName?: string) => {
- const list = allChecklistTemplates.value || [];
- const filtered = categoryName
- ? list.filter((item) => (item.categoryName as string) === categoryName)
- : list;
- checklistTemplateOptions.value = filtered
- .filter((item) => !!item.templateName)
- .map((item) => ({
- label: item.templateName as string,
- value: item.templateName as string,
- }));
- };
- /** 加载检查单模版名称列表(仅模版名称下拉用,类别用 form 静态数据) */
- const loadChecklistTemplateOptions = async () => {
- try {
- const res = await queryCheckListTemplateNameList();
- const list = ((res as { data?: ChecklistTemplate[] })?.data ?? (res as ChecklistTemplate[] | undefined)) || [];
- allChecklistTemplates.value = list;
- const currentCategoryName = ruleFormData.categoryName as string | undefined;
- updateChecklistTemplateOptionsByCategory(currentCategoryName);
- } catch (e) {
- console.error('获取检查单模版名称列表失败:', e);
- checklistTemplateOptions.value = [];
- }
- };
- const viewFormConfig = ref(
- AREA_CHECK_PLAN_FORM_CONFIG.map((item) => ({
- ...item,
- componentProps: {
- ...item.componentProps,
- disabled: true,
- },
- })),
- );
- const computedFormConfig = computed(() => {
- const base = isViewMode.value ? viewFormConfig.value : cloneDeep(AREA_CHECK_PLAN_FORM_CONFIG);
- return base.map((item) => {
- if (item.prop === 'categoryCode') {
- const opts = checklistCategoryOptions.value;
- return {
- ...item,
- selectOptions: opts,
- componentProps: {
- ...(item.componentProps || {}),
- onChange: (val: string) => {
- const opt = opts.find((o) => o.value === val);
- ruleFormData.categoryName = opt?.label ?? '';
- (ruleFormData as Record<string, unknown>).categoryCode = val;
- ruleFormData.checklistTemplateName = '';
- updateChecklistTemplateOptionsByCategory(opt?.label);
- },
- },
- };
- }
- if (item.prop === 'checklistTemplateName') {
- return {
- ...item,
- selectOptions: checklistTemplateOptions.value,
- componentProps: {
- ...(item.componentProps || {}),
- },
- };
- }
- return item;
- });
- });
- const basicFormRef = ref<InstanceType<typeof BasicForm>>();
- // 查看页:详情数据
- const viewDetailData = ref<Record<string, unknown>>({});
- const viewDetail = computed(() => {
- const d = viewDetailData.value;
- const status = d?.status as number | undefined;
- return {
- ...d,
- statusName: status != null ? AREA_CHECK_PLAN_STATUS_LABEL[String(status)] ?? '-' : '-',
- planName: d?.planName ?? ruleFormData.planName ?? '-',
- venueCategoryName: d?.venueCategoryName ?? ruleFormData.venueCategoryName ?? '-',
- checkVenue: d?.checkVenue ?? ruleFormData.checkVenue ?? '-',
- primaryResponsibleDeptName: d?.primaryResponsibleDeptName ?? ruleFormData.primaryResponsibleDeptName ?? '-',
- selfCheckFrequency: d?.selfCheckFrequency ?? ruleFormData.selfCheckFrequency ?? '-',
- mainDeptExecutorGroupName: d?.mainDeptExecutorGroupName ?? '-',
- mainDeptResponsiblePerson: d?.mainDeptResponsiblePerson ?? '-',
- safetyEmergencyDeptName: d?.safetyEmergencyDeptName ?? ruleFormData.safetyEmergencyDeptName ?? '-',
- safetyEmergencyCheckFrequency: d?.safetyEmergencyCheckFrequency ?? ruleFormData.safetyEmergencyCheckFrequency ?? '-',
- safetyEmergencyExecutorGroupName: d?.safetyEmergencyExecutorGroupName ?? '-',
- safetyEmergencyResponsiblePerson: d?.safetyEmergencyResponsiblePerson ?? '-',
- hospitalLeaderDeptName: d?.hospitalLeaderDeptName ?? ruleFormData.hospitalLeaderDeptName ?? '-',
- hospitalLeaderCheckFrequency: d?.hospitalLeaderCheckFrequency ?? ruleFormData.hospitalLeaderCheckFrequency ?? '-',
- hospitalLeaderExecutorGroupName: d?.hospitalLeaderExecutorGroupName ?? '-',
- hospitalLeaderResponsiblePerson: d?.hospitalLeaderResponsiblePerson ?? '-',
- categoryName: d?.categoryName ?? ruleFormData.categoryName ?? '-',
- checklistTemplateName: d?.checklistTemplateName ?? ruleFormData.checklistTemplateName ?? '-',
- needOverallDesc: d?.needOverallDesc ?? ruleFormData.needOverallDesc,
- needSigneeSign: d?.needSigneeSign ?? ruleFormData.needSigneeSign,
- planStartTime: d?.planStartTime ?? ruleFormData.planStartTime ?? '-',
- planEndTime: d?.planEndTime ?? ruleFormData.planEndTime ?? '-',
- createdPersonName: d?. createdPersonName ?? '-',
- createdAt: d?.createdAt ?? '-',
- businessWork: d?.businessWork ?? '-',
- primaryResponsibleDeptExecGroupName: d?.primaryResponsibleDeptExecGroupName ?? '-',
- primaryResponsibleDeptPersonName: d?.primaryResponsibleDeptPersonName ?? '-',
- safetyEmergencyExecGroupName: d?.safetyEmergencyExecGroupName ?? '-',
- safetyEmergencyPersonName: d?.safetyEmergencyPersonName ?? '-',
- hospitalLeaderExecGroupName: d?.hospitalLeaderExecGroupName ?? '-',
- hospitalLeaderPersonName: d?.hospitalLeaderPersonName ?? '-',
- };
- });
- const inspectionContentList = computed(() => {
- const content = (viewDetailData.value?.checkKeyContent ?? ruleFormData.checkKeyContent) as string;
- if (!content || typeof content !== 'string') return [];
- return content.split(/[;;]/).map((s) => s.trim()).filter(Boolean);
- });
- const RECORD_TABLE_COLUMNS: TableColumnProps[] = [
- { label: '编号', type: 'index', align: 'center', width: '60px' },
- { label: '检查时间', prop: 'checkTime', minWidth: '160px' },
- { label: '检查人员', prop: 'checkPerson', minWidth: '100px' },
- { label: '检查场所类别', prop: 'checkPlaceCategory', minWidth: '120px' },
- { label: '检查场所', prop: 'checkPlace', minWidth: '120px' },
- { label: '检查项总数', prop: 'checkItemTotal', align: 'center', width: '100px' },
- { label: '合格项数', prop: 'qualifiedItemNum', align: 'center', width: '90px' },
- { label: '不合格项数', prop: 'unqualifiedItemNum', slot: 'unqualifiedItemNum', align: 'center', width: '100px' },
- { label: '整体检查情况描述', prop: 'overallCheckDesc', minWidth: '180px', showOverflowTooltip: true },
- { label: '被检查人签字', slot: 'sign', align: 'center', width: '140px' },
- { label: '操作', slot: 'action', align: 'center', width: '160px', fixed: 'right' },
- ];
- const RECORD_TABLE_OPTIONS = {
- emptyText: '暂无检查记录',
- loading: false,
- maxHeight: '400px',
- stripe: true,
- };
- const { tableConfig: recordTableConfig, pagination: recordPagination } = useTableConfig(
- RECORD_TABLE_COLUMNS,
- RECORD_TABLE_OPTIONS,
- true,
- );
- const recordSearchKeyword = ref('');
- const recordDateRange = ref<[string, string] | null>(null);
- const inspectionRecordList = ref<Array<Record<string, unknown>>>([]);
- const paginatedRecordList = computed(() => inspectionRecordList.value);
- // 检查不合格数据弹窗
- const showUnqualifiedDialog = ref(false);
- const currentRecordIdForUnqualified = ref<number | null>(null);
- const currentRowForUnqualified = ref<Record<string, unknown> | null>(null);
- const unqualifiedList = ref<UnqualifiedItemNumRecord[]>([]);
- const UNQUALIFIED_TABLE_COLUMNS: TableColumnProps[] = [
- { label: '编号', type: 'index', align: 'center', width: '60px' },
- { label: '检查场所', prop: 'checkPlace', minWidth: '200px' },
- { label: '发现问题', prop: 'checkProblem', minWidth: '220px' },
- { label: '检查时间', prop: 'checkTime', minWidth: '180px' },
- { label: '操作', slot: 'action', align: 'center', width: '100px' },
- ];
- const UNQUALIFIED_TABLE_OPTIONS = {
- emptyText: '暂无不合格数据',
- loading: false,
- maxHeight: '400px',
- stripe: true,
- };
- const { tableConfig: unqualifiedTableConfig, pagination: unqualifiedPagination } = useTableConfig(
- UNQUALIFIED_TABLE_COLUMNS,
- UNQUALIFIED_TABLE_OPTIONS,
- true,
- );
- // 入账确认弹窗数据(复用隐患台账新增表单字段与样式)
- const showSandConfirmDialog = ref(false);
- const sandConfirmLoading = ref(false);
- const sandHiddenDangerFormRef = ref<InstanceType<typeof BasicForm>>();
- const {
- ruleFormData: sandHiddenDangerFormData,
- formRules: sandHiddenDangerFormRules,
- ruleFormConfig: sandHiddenDangerFormConfig,
- } = useFormConfigHook(
- HIDDEN_DANGER_FORM_CONFIG,
- HIDDEN_DANGER_FORM_DATA as Record<string, unknown>,
- HIDDEN_DANGER_FORM_RULES,
- );
- const handleRecordSizeChange = (value: number) => {
- recordPagination.pageSize = value;
- recordPagination.pageNumber = 1;
- loadRecordList();
- };
- const handleRecordPageChange = (value: number) => {
- recordPagination.pageNumber = value;
- loadRecordList();
- };
- const loadUnqualifiedList = async () => {
- if (!currentRecordIdForUnqualified.value) return;
- unqualifiedTableConfig.loading = true;
- try {
- const res = await queryUnqualifiedItemNumPage({
- pageNumber: unqualifiedPagination.pageNumber,
- pageSize: unqualifiedPagination.pageSize,
- queryParam: {
- id: currentRecordIdForUnqualified.value,
- checkPlace: String(currentRowForUnqualified.value?.checkPlace ?? ''),
- checkProblem: String(currentRowForUnqualified.value?.checkProblem ?? ''),
- checkTime: String(currentRowForUnqualified.value?.checkTime ?? ''),
- },
- });
- const raw = (res as { data?: { records?: UnqualifiedItemNumRecord[]; totalRow?: number } })?.data ?? res;
- unqualifiedList.value = raw?.records ?? [];
- unqualifiedPagination.total = raw?.totalRow ?? 0;
- } catch (e) {
- console.error('查询不合格数据失败:', e);
- unqualifiedList.value = [];
- unqualifiedPagination.total = 0;
- } finally {
- unqualifiedTableConfig.loading = false;
- }
- };
- const handleUnqualifiedSizeChange = (value: number) => {
- unqualifiedPagination.pageSize = value;
- unqualifiedPagination.pageNumber = 1;
- loadUnqualifiedList();
- };
- const handleUnqualifiedPageChange = (value: number) => {
- unqualifiedPagination.pageNumber = value;
- loadUnqualifiedList();
- };
- const openUnqualifiedDialog = (row: { id?: number } & Record<string, unknown>) => {
- if (!row.id) return;
- currentRecordIdForUnqualified.value = Number(row.id);
- currentRowForUnqualified.value = row;
- unqualifiedPagination.pageNumber = 1;
- showUnqualifiedDialog.value = true;
- loadUnqualifiedList();
- };
- const loadRecordList = async () => {
- if (!currentId.value) return;
- recordTableConfig.loading = true;
- try {
- const [start, end] = recordDateRange.value && recordDateRange.value.length === 2
- ? recordDateRange.value
- : ['', ''];
- const res = await queryAreaCheckPlanDetailPage(currentId.value, {
- pageNumber: recordPagination.pageNumber,
- pageSize: recordPagination.pageSize,
- queryParam: {
- searchKey: recordSearchKeyword.value || undefined,
- startDate: start || undefined,
- endDate: end || undefined,
- },
- });
- const raw = (res as { data?: { records?: Array<Record<string, unknown>>; totalRow?: number } })?.data ?? res;
- const records = raw?.records ?? [];
- inspectionRecordList.value = records.map((r: Record<string, unknown>) => ({
- ...r,
- checkPerson: r.checkPerson ?? r.checkPersonName,
- checkedCompany: r.checkedCompany ?? r.checkedCompanyName,
- }));
- recordPagination.total = raw?.totalRow ?? 0;
- } catch (e) {
- console.error('查询检查记录失败:', e);
- inspectionRecordList.value = [];
- recordPagination.total = 0;
- } finally {
- recordTableConfig.loading = false;
- }
- };
- const onRecordSearch = () => {
- recordPagination.pageNumber = 1;
- loadRecordList();
- };
- const onRecordExport = async () => {
- try {
- const [start, end] = recordDateRange.value && recordDateRange.value.length === 2
- ? recordDateRange.value
- : ['', ''];
- const queryParam = {
- id: currentId.value,
- searchKey: recordSearchKeyword.value || undefined,
- startDate: start || undefined,
- endDate: end || undefined,
- };
- const response = await exportInspectionRecordTow(queryParam);
- if (response) {
- const fileName = `区域检查记录_${new Date().toISOString().split('T')[0]}.xlsx`;
- downloadByData(response, fileName);
- ElMessage.success('导出成功');
- }
- } catch (e) {
- console.error('导出区域检查记录失败:', e);
- ElMessage.error('导出失败,请重试');
- }
- };
- const handleSandToHiddenDanger = (row: { id?: number } & Record<string, unknown>) => {
- if (!row.id) return;
- currentRecordIdForUnqualified.value = Number(row.id);
- // 每次打开入账弹窗都使用一份全新的隐患台账初始数据,不带入检查记录旧数据
- Object.assign(sandHiddenDangerFormData, HIDDEN_DANGER_FORM_DATA);
- showSandConfirmDialog.value = true;
- };
- const validateSandHiddenDangerForm = async () => {
- if (!sandHiddenDangerFormRef.value) return false;
- return await sandHiddenDangerFormRef.value.validateForm();
- };
- const confirmSandToHiddenDanger = async () => {
- if (!currentRecordIdForUnqualified.value) return;
- const valid = await validateSandHiddenDangerForm();
- if (!valid) return;
- sandConfirmLoading.value = true;
- try {
- const d = sandHiddenDangerFormData;
- const payload: SandAreaCheckRecordToHiddenDangerReq = {
- areaCheckRecordId: currentRecordIdForUnqualified.value,
- sourceType: 4,
- sourceRefId: currentRecordIdForUnqualified.value,
- dangerProblem: d.dangerProblem || '',
- typeId: d.typeId,
- reasonId: d.reasonId,
- taskSource: d.taskSource || '',
- rectificationRequirement: d.rectificationRequirement || '',
- rectificationDeadline: d.rectificationDeadline || '',
- rectificationDepartmentIds: d.rectificationDepartmentIds || '',
- rectificationResponsiblePerson: d.rectificationResponsiblePerson || '',
- reviewDepartmentId: d.reviewDepartmentId,
- reviewPersonId: d.reviewPersonId,
- reviewPersonName: d.reviewPersonName || '',
- isDrawLessonsPush: d.isDrawLessonsPush ?? 0,
- drawLessonsContent: d.drawLessonsContent || '',
- drawLessonsDepartmentIds: d.drawLessonsDepartmentIds || '',
- drawLessonsDeadline: d.drawLessonsDeadline || '',
- attachments: d.attachments || '',
- };
- await sandAreaCheckRecordToProductionHiddenDanger(payload);
- ElMessage.success('下入账成功');
- // 关闭入账表单弹窗和“不合格数据”弹窗
- showSandConfirmDialog.value = false;
- showUnqualifiedDialog.value = false;
- // 重新加载检查记录列表,刷新 isSand 状态和数量
- await loadRecordList();
- } catch (e) {
- console.error('下入账失败:', e);
- ElMessage.error(e?.message || e?.data || '下入账失败,请稍后重试');
- } finally {
- sandConfirmLoading.value = false;
- }
- };
- const previewOnlineRef = ref<InstanceType<typeof PreviewOnline>>();
- const previewOnline = (url: string | undefined, type: keyof typeof FILE_TYPE_ICON) => {
- if (url) previewOnlineRef.value?.open(url, type);
- };
- const parseSignFiles = (signFile: string | undefined): Array<{ fileUrl: string; fileName: string; fileType: string }> => {
- if (!signFile || !String(signFile).trim()) return [];
- const parts = String(signFile)
- .split(',')
- .map((s) => s.trim())
- .filter(Boolean);
- return parts.map((part) => {
- const urlParts = part.split('/');
- const fileName = urlParts[urlParts.length - 1] || part || '未知文件';
- const extension = fileName.split('.').pop()?.toLowerCase() || '';
- let fileType = 'pdf';
- if (extension === 'doc' || extension === 'docx') fileType = 'word';
- else if (extension === 'xls' || extension === 'xlsx') fileType = 'excel';
- else if (extension === 'ppt' || extension === 'pptx') fileType = 'ppt';
- return { fileUrl: part, fileName, fileType };
- });
- };
- const onDeleteRecord = async (row: { id?: number }) => {
- if (!row.id) return;
- try {
- await deleteAreaCheckPlanDetail(row.id);
- ElMessage.success('删除成功');
- loadRecordList();
- } catch (e) {
- console.error('删除检查记录失败:', e);
- }
- };
- const onViewRecord = (row: Record<string, unknown>) => {
- router.push({
- name: 'areaCheckPlanManagementItem',
- query: {
- operate: 'area-check-plan-record-view',
- recordId: row.id,
- planId: currentId.value,
- },
- });
- };
- const handleValidate = async () => {
- if (!basicFormRef.value) return;
- return await basicFormRef.value.validateForm();
- };
- const getDetail = async () => {
- if (!currentId.value) return;
- try {
- const res = await queryAreaCheckPlanManageDetail(currentId.value);
- const raw = (res as { data?: unknown })?.data ?? res;
- const detail = mapAreaCheckPlanApiRecordToUi(raw);
- viewDetailData.value = { ...detail };
- ruleFormData.planName = detail.planName ?? '';
- ruleFormData.venueCategoryName = detail.venueCategoryName ?? '';
- ruleFormData.checkVenue = detail.checkVenue ?? '';
- ruleFormData.primaryResponsibleDeptName = detail.primaryResponsibleDeptName ?? '';
- ruleFormData.primaryResponsibleDeptCode = detail.primaryResponsibleDeptCode ?? '';
- ruleFormData.primaryResponsibleDeptId = findDeptIdByName(deptTree.value, ruleFormData.primaryResponsibleDeptName as string) ?? null;
- ruleFormData.selfCheckFrequency = detail.selfCheckFrequency ?? '';
- ruleFormData.safetyEmergencyDeptName = detail.safetyEmergencyDeptName ?? '';
- ruleFormData.safetyEmergencyDeptId = findDeptIdByName(deptTree.value, ruleFormData.safetyEmergencyDeptName as string) ?? null;
- ruleFormData.safetyEmergencyCheckFrequency = detail.safetyEmergencyCheckFrequency ?? '';
- ruleFormData.hospitalLeaderDeptName = detail.hospitalLeaderDeptName ?? '';
- ruleFormData.hospitalLeaderDeptId = findDeptIdByName(deptTree.value, ruleFormData.hospitalLeaderDeptName as string) ?? null;
- ruleFormData.hospitalLeaderCheckFrequency = detail.hospitalLeaderCheckFrequency ?? '';
- (ruleFormData as Record<string, unknown>).categoryCode = detail.categoryCode ?? '';
- ruleFormData.categoryName = detail.categoryName ?? '';
- ruleFormData.checklistTemplateName = detail.checklistTemplateName ?? '';
- ruleFormData.checkKeyContent = detail.checkKeyContent ?? '';
- ruleFormData.primaryResponsibleDeptExecGroupName = detail.primaryResponsibleDeptExecGroupName ?? '';
- ruleFormData.primaryResponsibleDeptPersonName = detail.primaryResponsibleDeptPersonName ?? '';
- ruleFormData.safetyEmergencyExecGroupName = detail.safetyEmergencyExecGroupName ?? '';
- ruleFormData.safetyEmergencyPersonName = detail.safetyEmergencyPersonName ?? '';
- ruleFormData.hospitalLeaderExecGroupName = detail.hospitalLeaderExecGroupName ?? '';
- ruleFormData.hospitalLeaderPersonName = detail.hospitalLeaderPersonName ?? '';
- updateChecklistTemplateOptionsByCategory(ruleFormData.categoryName as string | undefined);
- cloneRuleFormData();
- if (isViewMode.value) {
- loadRecordList();
- }
- } catch (e) {
- console.error('获取详情失败:', e);
- }
- };
- const handleSubmit = async () => {
- const valid = await handleValidate();
- if (!valid) return;
- try {
- if (isCreateMode.value) {
- await saveAreaCheckPlanManage(ruleFormData as AreaCheckPlanRecord);
- ElMessage.success('创建成功');
- } else if (isEditMode.value) {
- await updateAreaCheckPlanManage({ ...ruleFormData, id: currentId.value } as AreaCheckPlanRecord & { id: number });
- ElMessage.success('保存成功');
- }
- router.back();
- } catch (e) {
- console.error('提交失败:', e);
- }
- };
- onMounted(async () => {
- cloneRuleFormData();
- venueCategoryOptions.value = [
- { label: '各级风险点', value: '各级风险点' },
- { label: '关键业务活动', value: '关键业务活动' },
- { label: '日常安全', value: '日常安全' },
- { label: '各级危险点', value: '各级危险点' },
- { label: '试验室及试验过程', value: '试验室及试验过程' },
- { label: '办公区域(含地下车库、图书馆、档案库房、仓库等)', value: '办公区域(含地下车库、图书馆、档案库房、仓库等)' },
- { label: '老旧厂房', value: '老旧厂房' },
- { label: '施工现场', value: '施工现场' },
- { label: '职工食堂', value: '职工食堂' },
- { label: '职工宿舍', value: '职工宿舍' },
- { label: '体育活动场所', value: '体育活动场所' },
- { label: '托育园', value: '托育园' },
- { label: '租、出借房屋', value: '租、出借房屋' },
- { label: '院内经营服务场所', value: '院内经营服务场所' },
- { label: '垃圾房', value: '垃圾房' },
- { label: '院内交通', value: '院内交通' },
- { label: '消防设施设备', value: '消防设施设备' },
- { label: '特种设备', value: '特种设备' },
- { label: '防雷设施', value: '防雷设施' },
- { label: '供、配电设施设备(含弱电)', value: '供、配电设施设备(含弱电)' },
- { label: '公务车辆', value: '公务车辆' },
- { label: '燃气管道设施(含报警装置)', value: '燃气管道设施(含报警装置)' },
- { label: '建筑物外墙标识物、装饰物', value: '建筑物外墙标识物、装饰物' },
- { label: 'UPS电源', value: 'UPS电源' },
- { label: '危险化学品', value: '危险化学品' },
- { label: '设施设备应急操作流程', value: '设施设备应急操作流程' },
- { label: '堆场、物资库房', value: '堆场、物资库房' },
- { label: '室内外停车场', value: '室内外停车场' }
- ];
- await getDeptTreeData();
- await loadChecklistCategoryOptions();
- await loadChecklistTemplateOptions();
- if (isEditMode.value || isViewMode.value) {
- getDetail();
- }
- });
- </script>
- <style scoped lang="scss">
- @use '@/styles/page-details-layout.scss' as *;
- @use '@/styles/basic-table-file.scss' as *;
- .area-check-plan-view {
- padding: 16px 24px;
- display: flex;
- flex-direction: column;
- gap: 24px;
- }
- .view-section {
- .view-section__title {
- font-weight: 600;
- margin-bottom: 12px;
- display: flex;
- align-items: center;
- gap: 6px;
- &--small {
- font-size: 13px;
- margin-bottom: 8px;
- }
- }
- .view-section__icon {
- width: 4px;
- height: 14px;
- background: var(--el-color-primary);
- border-radius: 2px;
- }
- }
- .view-summary {
- .view-summary__title {
- font-weight: 600;
- font-size: 15px;
- margin-bottom: 4px;
- }
- .view-summary__venue {
- margin-bottom: 8px;
- }
- .view-summary__meta {
- font-size: 13px;
- color: var(--el-text-color-secondary);
- span + span {
- margin-left: 16px;
- }
- }
- }
- /* 基本信息:与 OneByOneAuditDetail 保持一致 */
- .audit-content {
- .section-title {
- display: flex;
- align-items: center;
- gap: 8px;
- margin: 20px 0 12px 0;
- font-size: 16px;
- font-weight: 600;
- color: #333;
- .section-title__icon {
- font-size: 18px;
- color: #333;
- }
- }
- .section-title:first-child {
- margin-top: 0;
- }
- .detail-ct {
- font-size: 14px;
- margin-bottom: 20px;
- &--table {
- border: 1px solid #dcdfe6;
- .row {
- display: flex;
- border-bottom: 1px solid #dcdfe6;
- &:last-child {
- border-bottom: none;
- }
- }
- .col {
- display: flex;
- flex: 1;
- min-height: 40px;
- align-items: stretch;
- .label {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- flex-shrink: 0;
- width: 200px;
- padding: 0 12px;
- background-color: #f5f5f5;
- border-right: 1px solid #dcdfe6;
- color: #333;
- }
- .value {
- flex: 1;
- display: flex;
- align-items: center;
- padding: 10px 20px;
- background-color: #fff;
- border-right: 1px solid #dcdfe6;
- color: #333;
- &--list {
- align-items: flex-start;
- .inspection-content-list {
- margin: 0;
- padding-left: 20px;
- line-height: 1.8;
- color: #333;
- }
- }
- }
- }
- .row .col:last-child .value {
- border-right: none;
- }
- .row .col:nth-child(2) .label {
- border-left: 1px solid #dcdfe6;
- }
- }
- }
- }
- .view-record-toolbar {
- margin-bottom: 12px;
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- gap: 8px;
- }
- .view-record-table {
- margin-bottom: 16px;
- }
- </style>
|