From 63c3e8ab66c7c2cf943297211eff47703febb766 Mon Sep 17 00:00:00 2001 From: wersd <1523826083@qq.com> Date: Mon, 24 Nov 2025 21:19:27 +0800 Subject: [PATCH] =?UTF-8?q?mod=20=E5=B7=A1=E6=A3=80=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E4=B8=8E=E8=A1=A8=E5=8D=95=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=85=8D=E7=BD=AE=E7=B1=BB=E5=9E=8B=E6=8A=98=E5=8F=A0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=8F=8A=E7=9B=B8=E5=85=B3=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/ProjectInspectConfigForm.vue | 4 - .../data/ProjectInspectionDataForm.vue | 12 +- .../ProjectInspectionRecordUploadForm.vue | 75 ++- .../crm/project/inspection/record/index.vue | 488 ++++++++++++++---- 4 files changed, 483 insertions(+), 96 deletions(-) diff --git a/src/views/crm/project/component/ProjectInspectConfigForm.vue b/src/views/crm/project/component/ProjectInspectConfigForm.vue index 97bb0976b..5cd5ed2f0 100644 --- a/src/views/crm/project/component/ProjectInspectConfigForm.vue +++ b/src/views/crm/project/component/ProjectInspectConfigForm.vue @@ -105,7 +105,6 @@ import { ElMessage } from 'element-plus' import { Crontab } from '@/components/Crontab' import * as UserApi from '@/api/system/user' import * as ProjectInspectionConfigApi from '@/api/crm/project/inspection' -import * as ProjectInspectionCheckpointApi from '@/api/crm/project/inspection/checkpoint' defineProps<{ disabled?: boolean @@ -186,9 +185,6 @@ const open = async (projectId?: number) => { try { // 先加载检查点列表,生成标签页 await loadCheckpointList() - - }) - } } catch (error) { console.error('加载配置数据失败:', error) ElMessage.error('加载配置数据失败') diff --git a/src/views/crm/project/inspection/data/ProjectInspectionDataForm.vue b/src/views/crm/project/inspection/data/ProjectInspectionDataForm.vue index a247c4566..e83bde1ce 100644 --- a/src/views/crm/project/inspection/data/ProjectInspectionDataForm.vue +++ b/src/views/crm/project/inspection/data/ProjectInspectionDataForm.vue @@ -26,7 +26,12 @@ - + @@ -168,7 +173,10 @@ const formData = ref>( }) const formRules = reactive({ configType: [{ required: true, message: '巡检配置类型不能为空', trigger: 'change' }], - name: [{ required: true, message: '管理规则不能为空', trigger: 'blur' }], + name: [ + { required: true, message: '管理规则不能为空', trigger: 'blur' }, + { max: 12, message: '管理规则不能超过12个字符', trigger: 'blur' } + ], isRequired: [{ required: true, message: '是否必填不能为空', trigger: 'blur' }], type: [{ required: true, message: '类型不能为空', trigger: 'change' }], options: [ diff --git a/src/views/crm/project/inspection/record/ProjectInspectionRecordUploadForm.vue b/src/views/crm/project/inspection/record/ProjectInspectionRecordUploadForm.vue index b53cf5547..c0ef51b95 100644 --- a/src/views/crm/project/inspection/record/ProjectInspectionRecordUploadForm.vue +++ b/src/views/crm/project/inspection/record/ProjectInspectionRecordUploadForm.vue @@ -29,10 +29,21 @@ + + + + {{ item.name }} + + + + + + {{ item.remark }} + @@ -471,5 +486,63 @@ const submitForm = async () => { font-size: 14px; } } + +.inspection-form-item { + margin-bottom: 22px; + + :deep(.el-form-item__label) { + line-height: 1.6; + word-break: break-word; + white-space: normal; + padding-right: 12px; + width: 200px !important; + min-width: 200px; + vertical-align: top; + padding-top: 8px; + } + + :deep(.el-form-item__content) { + line-height: 1.6; + } + + .form-label-wrapper { + display: flex; + flex-direction: column; + gap: 6px; + width: 100%; + + .form-label-text { + display: inline-block; + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + vertical-align: middle; + font-weight: 500; + } + } + + .form-content-remark { + font-size: 12px; + color: #606266; + line-height: 1.6; + word-break: break-word; + white-space: normal; + margin-top: 8px; + padding: 8px 12px; + background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); + border-radius: 6px; + border-left: 3px solid #409EFF; + box-shadow: 0 1px 3px rgba(64, 158, 255, 0.1); + width: 100%; + box-sizing: border-box; + + &::before { + content: '💡'; + margin-right: 6px; + font-size: 14px; + } + } +} diff --git a/src/views/crm/project/inspection/record/index.vue b/src/views/crm/project/inspection/record/index.vue index 4f5f466fd..4bc64e40d 100644 --- a/src/views/crm/project/inspection/record/index.vue +++ b/src/views/crm/project/inspection/record/index.vue @@ -156,42 +156,64 @@ - 巡检内容: + + 巡检内容: + - - - {{ configTypeName }} + - {{ field.name }}: - - - - - 📎 {{ field.value.split('/').pop() }} - - {{ field.value }} + + + + + {{ configTypeName }} + + + + + + + 题目: + {{ field.name }} + + + 答案: + + + + + 📎 {{ field.value.split('/').pop() }} + + {{ field.value }} + + + + - - - {{ item.summary }} + + {{ item.summary }} @@ -249,6 +271,28 @@ {{ getUserName(scope.row.inspector) }} + + + + + + {{ configType }} + + + + - + + @@ -317,6 +361,28 @@ {{ getUserName(scope.row.inspector) }} + + + + + + {{ configType }} + + + + - + + @@ -384,17 +450,39 @@ {{ getUserName(scope.row.inspector) }} + + + + + + {{ configType }} + + + + - + + - +