|
@@ -0,0 +1,346 @@
|
|
|
|
|
+import { FormConfig } from '@/types/basic-form';
|
|
|
|
|
+
|
|
|
|
|
+/** 检查频次选项:每日/每周/每月/每季度/每半年/每年 */
|
|
|
|
|
+export const CHECK_FREQUENCY_OPTIONS = [
|
|
|
|
|
+ { label: '每日', value: '每日' },
|
|
|
|
|
+ { label: '每周', value: '每周' },
|
|
|
|
|
+ { label: '每月', value: '每月' },
|
|
|
|
|
+ { label: '每季度', value: '每季度' },
|
|
|
|
|
+ { label: '每半年', value: '每半年' },
|
|
|
|
|
+ { label: '每年', value: '每年' },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
|
|
+/** 检查单模版类别选项(单选):1-安全管理检查单 2-关键业务活动专项检查单 3-日常安全检查单 */
|
|
|
|
|
+export const CHECKLIST_CATEGORY_OPTIONS = [
|
|
|
|
|
+ { label: '安全管理检查单', value: '安全管理检查单' },
|
|
|
|
|
+ { label: '关键业务活动专项检查单', value: '关键业务活动专项检查单' },
|
|
|
|
|
+ { label: '日常安全检查单', value: '日常安全检查单' },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
|
|
+// 检查记录入账隐患台账
|
|
|
|
|
+export const HIDDEN_DANGER_FORM_CONFIG: FormConfig[] = [
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'typeId',
|
|
|
|
|
+// label: '隐患问题类别:',
|
|
|
|
|
+// component: 'ElSelect',
|
|
|
|
|
+// slot: 'typeId',
|
|
|
|
|
+// componentProps: {
|
|
|
|
|
+// placeholder: '请选择隐患问题类别',
|
|
|
|
|
+// style: { width: '100%' },
|
|
|
|
|
+// },
|
|
|
|
|
+// // selectOptions: DANGER_TYPE_OPTIONS,
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'dangerProblem',
|
|
|
|
|
+// label: '隐患问题:',
|
|
|
|
|
+// component: 'ElInput',
|
|
|
|
|
+// componentProps: {
|
|
|
|
|
+// placeholder: '请输入隐患问题描述',
|
|
|
|
|
+// },
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'reasonId',
|
|
|
|
|
+// label: '问题主要原因:',
|
|
|
|
|
+// component: 'ElSelect',
|
|
|
|
|
+// componentProps: {
|
|
|
|
|
+// placeholder: '请选择问题主要原因',
|
|
|
|
|
+// style: { width: '100%' },
|
|
|
|
|
+// },
|
|
|
|
|
+// selectOptions: REASON_OPTIONS,
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'taskSource',
|
|
|
|
|
+// label: '任务来源:',
|
|
|
|
|
+// component: 'ElInput',
|
|
|
|
|
+// componentProps: {
|
|
|
|
|
+// placeholder: '如:上级检查、院内自查',
|
|
|
|
|
+// },
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'rectificationRequirement',
|
|
|
|
|
+// label: '整改要求:',
|
|
|
|
|
+// component: 'ElInput',
|
|
|
|
|
+// componentProps: {
|
|
|
|
|
+// placeholder: '请输入整改要求',
|
|
|
|
|
+// },
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'rectificationDepartmentIds',
|
|
|
|
|
+// label: '整改责任部门:',
|
|
|
|
|
+// slot: 'rectificationDepartmentIds',
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'rectificationResponsibleIds',
|
|
|
|
|
+// label: '整改负责人:',
|
|
|
|
|
+// slot: 'rectificationResponsibleIds',
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'rectificationDeadline',
|
|
|
|
|
+// label: '整改日期:',
|
|
|
|
|
+// component: 'ElDatePicker',
|
|
|
|
|
+// componentProps: {
|
|
|
|
|
+// type: 'date',
|
|
|
|
|
+// placeholder: '请选择整改日期',
|
|
|
|
|
+// valueFormat: 'YYYY-MM-DD',
|
|
|
|
|
+// style: { width: '100%' },
|
|
|
|
|
+// },
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'reviewDepartmentId',
|
|
|
|
|
+// label: '复查人员所属部门:',
|
|
|
|
|
+// slot: 'reviewDepartmentId',
|
|
|
|
|
+// componentProps: {
|
|
|
|
|
+// placeholder: '请选择复查人员所属部门',
|
|
|
|
|
+// style: { width: '100%' },
|
|
|
|
|
+// },
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'reviewPersonId',
|
|
|
|
|
+// label: '复查人员:',
|
|
|
|
|
+// slot: 'reviewPerson',
|
|
|
|
|
+// componentProps: {
|
|
|
|
|
+// placeholder: '请选择复查人员',
|
|
|
|
|
+// style: { width: '100%' },
|
|
|
|
|
+// },
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'isDrawLessonsPush',
|
|
|
|
|
+// label: '举一反三是否推送:',
|
|
|
|
|
+// slot: 'isDrawLessonsPush',
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'drawLessonsContent',
|
|
|
|
|
+// slot:'drawLessonsContent',
|
|
|
|
|
+// label: '',
|
|
|
|
|
+// component: 'ElInput',
|
|
|
|
|
+// componentProps: {
|
|
|
|
|
+// placeholder: '如:上级检查、院内自查',
|
|
|
|
|
+// style: { paddingLeft: '136.5px' },
|
|
|
|
|
+// },
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'drawLessonsDepartmentIds',
|
|
|
|
|
+// label: '', //举一反三责任部门:
|
|
|
|
|
+// slot: 'drawLessonsDepartmentIds',
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// prop: 'drawLessonsDeadline',
|
|
|
|
|
+// label: '', //举一反三时限:
|
|
|
|
|
+// slot: 'drawLessonsDeadline',
|
|
|
|
|
+// },
|
|
|
|
|
+];
|
|
|
|
|
+/** 区域检查计划新增/编辑表单配置(与截图字段顺序一致) */
|
|
|
|
|
+export const AREA_CHECK_PLAN_FORM_CONFIG: FormConfig[] = [
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'planName',
|
|
|
|
|
+ label: '区域检查计划名称:',
|
|
|
|
|
+ component: 'ElInput',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '输入区域检查计划名称',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'venueCategoryName',
|
|
|
|
|
+ label: '检查类别:',
|
|
|
|
|
+ slot: 'venueCategoryName',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'checkVenue',
|
|
|
|
|
+ label: '检查场所:',
|
|
|
|
|
+ component: 'ElInput',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '输入检查场所',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'primaryResponsibleDeptName',
|
|
|
|
|
+ label: '主责部门:',
|
|
|
|
|
+ slot: 'primaryResponsibleDept', // 与新增物品领取记录页的部门下拉一致(el-cascader + getAllDepartments)
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请选择部门',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'selfCheckFrequency',
|
|
|
|
|
+ label: '自查频次:',
|
|
|
|
|
+ slot: 'selfCheckFrequency',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'safetyEmergencyDeptName',
|
|
|
|
|
+ label: '安全应急部门:',
|
|
|
|
|
+ slot: 'safetyEmergencyDept', // 与新增物品领取记录页的部门下拉一致(el-cascader + getAllDepartments)
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请选择部门',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'safetyEmergencyCheckFrequency',
|
|
|
|
|
+ label: '安全应急部检查频次:',
|
|
|
|
|
+ slot: 'safetyEmergencyCheckFrequency',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'hospitalLeaderDeptName',
|
|
|
|
|
+ label: '院领导部门:',
|
|
|
|
|
+ slot: 'hospitalLeaderDept', // 与新增物品领取记录页的部门下拉一致(el-cascader + getAllDepartments)
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '请选择部门',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'hospitalLeaderCheckFrequency',
|
|
|
|
|
+ label: '院领导检查频次:',
|
|
|
|
|
+ slot: 'hospitalLeaderCheckFrequency',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'categoryCode',
|
|
|
|
|
+ label: '检查单模版类别:',
|
|
|
|
|
+ component: 'ElSelect',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '选择检查单模版类别,单选',
|
|
|
|
|
+ filterable: true,
|
|
|
|
|
+ clearable: true,
|
|
|
|
|
+ style: { width: '100%' },
|
|
|
|
|
+ },
|
|
|
|
|
+ selectOptions: [], // 由详情页 queryDictTypeDetail 注入,value=itemCode, label=itemValue
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'checklistTemplateName',
|
|
|
|
|
+ label: '检查单模版名称:',
|
|
|
|
|
+ component: 'ElSelect',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ placeholder: '选择检查单模版名称,单选',
|
|
|
|
|
+ filterable: true,
|
|
|
|
|
+ clearable: true,
|
|
|
|
|
+ style: { width: '100%' },
|
|
|
|
|
+ },
|
|
|
|
|
+ selectOptions: [], // 由页面根据类别请求模版列表后注入
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'checkKeyContent',
|
|
|
|
|
+ label: '检查重点内容:',
|
|
|
|
|
+ component: 'ElInput',
|
|
|
|
|
+ componentProps: {
|
|
|
|
|
+ type: 'textarea',
|
|
|
|
|
+ rows: 4,
|
|
|
|
|
+ placeholder: '请输入检查重点内容',
|
|
|
|
|
+ maxlength: 300,
|
|
|
|
|
+ showWordLimit: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
|
|
+export const AREA_CHECK_PLAN_FORM_DATA: Record<string, unknown> = {
|
|
|
|
|
+ planName: '',
|
|
|
|
|
+ venueCategoryName: '',
|
|
|
|
|
+ checkVenue: '',
|
|
|
|
|
+ /** 主责部门多选:级联绑定 id 数组;提交给后端用 primaryResponsibleDeptName / primaryResponsibleDeptCode(逗号分隔) */
|
|
|
|
|
+ primaryResponsibleDeptId: [] as number[],
|
|
|
|
|
+ primaryResponsibleDeptName: '',
|
|
|
|
|
+ primaryResponsibleDeptCode: '',
|
|
|
|
|
+ selfCheckFrequency: '',
|
|
|
|
|
+ safetyEmergencyDeptId: null as number | null,
|
|
|
|
|
+ safetyEmergencyDeptName: '',
|
|
|
|
|
+ safetyEmergencyCheckFrequency: '',
|
|
|
|
|
+ hospitalLeaderDeptId: null as number | null,
|
|
|
|
|
+ hospitalLeaderDeptName: '',
|
|
|
|
|
+ hospitalLeaderCheckFrequency: '',
|
|
|
|
|
+ categoryName: '',
|
|
|
|
|
+ categoryCode: '',
|
|
|
|
|
+ checklistTemplateName: '',
|
|
|
|
|
+ checkKeyContent: '',
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+export const AREA_CHECK_PLAN_FORM_RULES = {
|
|
|
|
|
+ planName: [{ required: true, message: '请输入区域检查计划名称', trigger: 'blur' }],
|
|
|
|
|
+ venueCategoryName: [{ required: true, message: '请输入检查类别', trigger: 'blur' }],
|
|
|
|
|
+ checkVenue: [{ required: true, message: '请输入检查场所', trigger: 'blur' }],
|
|
|
|
|
+ primaryResponsibleDeptName: [{ required: true, message: '请选择主责部门', trigger: 'change' }],
|
|
|
|
|
+ selfCheckFrequency: [{ required: true, message: '请选择自查频次', trigger: 'change' }],
|
|
|
|
|
+ safetyEmergencyCheckFrequency: [{ required: true, message: '请选择安全应急部检查频次', trigger: 'change' }],
|
|
|
|
|
+ safetyEmergencyDeptName: [{ required: true, message: '请选择安全应急部门', trigger: 'change' }],
|
|
|
|
|
+ hospitalLeaderDeptName: [{ required: true, message: '请选择院领导部门', trigger: 'change' }],
|
|
|
|
|
+ hospitalLeaderCheckFrequency: [{ required: true, message: '请选择院领导检查频次', trigger: 'change' }],
|
|
|
|
|
+ categoryCode: [{ required: true, message: '请选择检查单模版类别', trigger: 'change' }],
|
|
|
|
|
+ checklistTemplateName: [{ required: true, message: '请选择检查单模版名称', trigger: 'change' }],
|
|
|
|
|
+ checkKeyContent: [{ required: true, message: '请输入检查重点内容', trigger: 'blur' }],
|
|
|
|
|
+};
|
|
|
|
|
+/** 问题主要原因:1-人的不安全行为,2-物的不安全状态,3-环境的不利影响,4-管理缺陷 */
|
|
|
|
|
+export const REASON_OPTIONS = [
|
|
|
|
|
+ { label: '人的不安全行为', value: 1 },
|
|
|
|
|
+ { label: '物的不安全状态', value: 2 },
|
|
|
|
|
+ { label: '环境的不利影响', value: 3 },
|
|
|
|
|
+ { label: '管理缺陷', value: 4 },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+export const HIDDEN_DANGER_FORM_DATA = {
|
|
|
|
|
+ typeId: undefined as number | undefined,
|
|
|
|
|
+ dangerProblem: '',
|
|
|
|
|
+ reasonId: undefined as number | undefined,
|
|
|
|
|
+ taskSource: '', // 任务来源
|
|
|
|
|
+ rectificationRequirement: '', // 整改要求
|
|
|
|
|
+ rectificationDepartmentIds: '', // 整改责任部门
|
|
|
|
|
+ rectificationResponsibleIds: '', // 整改负责人
|
|
|
|
|
+ rectificationDeadline: '', //整改日期
|
|
|
|
|
+ reviewDepartmentId: undefined as number | undefined, // 复查人员所属部门
|
|
|
|
|
+ reviewPersonId: undefined as number | undefined, // 复查人员
|
|
|
|
|
+ reviewPersonName: '',
|
|
|
|
|
+ isDrawLessonsPush: 0, // 举一反三是否推送
|
|
|
|
|
+ drawLessonsContent: '', // 举一反三内容
|
|
|
|
|
+ drawLessonsDepartmentIds: '', // 举一反三责任部门
|
|
|
|
|
+ drawLessonsDeadline: '', // 举一反三时限
|
|
|
|
|
+ // 提交接口需要,下发时再填
|
|
|
|
|
+ rectificationResponsiblePerson: '',
|
|
|
|
|
+ // 整改详情展示(接口可能返回)
|
|
|
|
|
+ rectificationCompletionStatus: '',
|
|
|
|
|
+ rectificationCompletionTime: '',
|
|
|
|
|
+ attachments: '',
|
|
|
|
|
+ reviewComments: '',
|
|
|
|
|
+ rectificationResponsibleUserId: '',
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+export const HIDDEN_DANGER_FORM_RULES = {
|
|
|
|
|
+ typeId: [{ required: true, message: '请选择隐患问题类别', trigger: 'change' }],
|
|
|
|
|
+ dangerProblem: [{ required: true, message: '请输入隐患问题', trigger: 'blur' }],
|
|
|
|
|
+ reasonId: [{ required: true, message: '请选择问题主要原因', trigger: 'change' }],
|
|
|
|
|
+ taskSource: [{ required: true, message: '请输入任务来源', trigger: 'blur' }],
|
|
|
|
|
+ rectificationRequirement: [{ required: true, message: '请输入整改要求', trigger: 'blur' }],
|
|
|
|
|
+ rectificationDeadline: [{ required: true, message: '请选择整改日期', trigger: 'change' }],
|
|
|
|
|
+ reviewDepartmentId: [{ required: true, message: '请选择复查人员所属部门', trigger: 'change' }],
|
|
|
|
|
+ reviewPersonId: [{ required: true, message: '请选择复查人员', trigger: 'change' }],
|
|
|
|
|
+ isDrawLessonsPush: [{ required: true, message: '请选择举一反三是否推送', trigger: 'change' }],
|
|
|
|
|
+ drawLessonsContent: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请输入举一反三内容',
|
|
|
|
|
+ trigger: 'blur',
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ drawLessonsDepartmentIds: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择举一反三责任部门',
|
|
|
|
|
+ trigger: 'change',
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ drawLessonsDeadline: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择举一反三截止日期',
|
|
|
|
|
+ trigger: 'change',
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ rectificationCompletionStatus:[
|
|
|
|
|
+ { required: true, message: '请输入整改完成情况', trigger: 'blur' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ rectificationCompletionTime: [
|
|
|
|
|
+ { required: true, message: '请选择整改完成时间', trigger: 'change' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ rectificationDepartmentIds: [
|
|
|
|
|
+ { required: true, message: '请选择整改责任部门', trigger: 'change' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ rectificationResponsibleIds: [
|
|
|
|
|
+ { required: true, message: '请选择整改负责人', trigger: 'change' }
|
|
|
|
|
+ ],
|
|
|
|
|
+};
|