ソースを参照

缺少查看页面

chauncey 11 ヶ月 前
コミット
5ecf8cf3b9

+ 12 - 0
src/api/disaster-control/index.ts

@@ -13,6 +13,7 @@ import type {
   DisasterReportEditQuery,
   LossRecordCreateQuery,
   LossRecordEditQuery,
+  DisposalRectificationCreateQuery,
 } from '@/types/disaster-control';
 import type { QueryPageResponse, QueryPageRequest } from '@/types/disaster';
 /**
@@ -181,3 +182,14 @@ export const deleteLossRecord = (reportRecordId: number) => {
     method: 'delete',
   });
 };
+
+/**
+ * 创建处置整改
+ */
+export const createDisposalRectification = (query: DisposalRectificationCreateQuery) => {
+  return http.request({
+    url: '/disasterHandle/saveLossFixRecord',
+    method: 'post',
+    data: query,
+  });
+};

+ 1 - 0
src/hooks/useFormConfigHook.ts

@@ -44,6 +44,7 @@ export const useFormConfigHook = <T extends Record<string, any> = Record<string,
         ElMessageBox.confirm('当前页面存在修改,是否确认离开当前页面?', '提示', {
           confirmButtonText: '确认',
           cancelButtonText: '取消',
+          customClass: 'customMessageBox--warn',
         })
           .then(() => {
             next();

+ 7 - 7
src/styles/custom-component.scss

@@ -37,13 +37,6 @@ $message-box-content-padding--icon: 36px;
   }
 }
 
-.customMessageBox--default {
-  @extend .customMessageBox;
-  .el-message-box__content {
-    padding-left: $message-box-content-padding--default;
-  }
-}
-
 .customMessageBox--icon {
   @extend .customMessageBox;
   .el-message-box__title::before {
@@ -59,6 +52,13 @@ $message-box-content-padding--icon: 36px;
   }
 }
 
+.customMessageBox--default {
+  @extend .customMessageBox;
+  .el-message-box__content {
+    padding-left: $message-box-content-padding--default;
+  }
+}
+
 .customMessageBox--weak {
   @extend .customMessageBox--icon;
   .el-message-box__title::before {

+ 20 - 0
src/types/disaster-control/index.ts

@@ -1,3 +1,4 @@
+import type { FileItem } from '@/views/disaster/types';
 export interface ImageItem {
   url: string;
   name?: string;
@@ -72,6 +73,7 @@ export interface disasterReportRecordDetailListResponse {
   estimatedLoss: string | null;
   description: string;
   remark: string;
+  fixTaskId: number;
 }
 
 export interface DisposalManagementTableResponse {
@@ -142,6 +144,7 @@ export interface LossReportItemFormData
     | 'images'
     | 'fixerList'
     | 'isFixPrincipal'
+    | 'fixTaskId'
   > {
   reportTaskName: string;
   responsibleDeptId: number | null;
@@ -180,3 +183,20 @@ export interface LossRecordCreateQuery extends Omit<LossRecordFormData, 'images'
 export interface LossRecordEditQuery extends Omit<LossRecordCreateQuery, 'reportTaskId'> {
   id: number;
 }
+
+export interface DisposalRectificationFormData {
+  fixStatus: string;
+  fixMethod: string;
+  fixDeadline: string;
+  fixImages: string;
+  fixMaterials: string;
+  remark: string;
+  createdBy: number | null;
+  createdByName: string;
+  uploadImages: File[];
+  uploadFiles: FileItem[];
+}
+
+export interface DisposalRectificationCreateQuery extends DisposalRectificationFormData {
+  fixTaskId: number;
+}

+ 60 - 13
src/views/disaster/components/Upload.vue

@@ -1,11 +1,14 @@
 <template>
   <div class="upload-wrapper">
     <!-- 上传按钮 -->
-    <label for="fileInput" class="upload-button">
-      <el-icon><UploadFilled /></el-icon>
-      <span>{{ label }}</span>
-    </label>
-    <input type="file" id="fileInput" multiple accept=".pdf,.docx,.xls,.xlsx,.ppt,.pptx" @change="handleFileSelect" />
+    <div class="upload-button-container">
+      <label for="fileInput" class="upload-button" :class="{ 'disabled': isUploadDisabled }">
+        <el-icon><UploadFilled /></el-icon>
+        <span>{{ label }}</span>
+      </label>
+      <span class="upload-button-support">支持pdf、word、excel文件</span>
+    </div>
+    <input type="file" id="fileInput" multiple accept=".pdf,.docx,.xls,.xlsx,.ppt,.pptx" @change="handleFileSelect" :disabled="isUploadDisabled" />
 
     <!-- 总体进度条 -->
     <div class="progress-container" v-show="showProgress">
@@ -44,10 +47,13 @@
   const props = defineProps<{
     label: string;
     fileList?: FileItem[];
+    maxSize?: number;
+    maxCount?: number;
   }>();
 
   // 常量定义
-  const MAX_SIZE = 5 * 1024 * 1024; // 5MB
+  const MAX_SIZE = computed(() => (props.maxSize || 5) * 1024 * 1024); // 默认5MB
+  const MAX_COUNT = computed(() => props.maxCount || 9); // 默认最多9个文件
 
   // 响应式状态
   const fileList = ref<FileItem[]>([]);
@@ -61,6 +67,10 @@
     return Math.round(progress.value);
   });
 
+  const isUploadDisabled = computed(() => {
+    return fileList.value.length >= MAX_COUNT.value;
+  });
+
   // 检查文件是否已存在
   const isFileAlreadyUploaded = (newFile: File): boolean => {
     return fileList.value.some((item) => {
@@ -93,21 +103,32 @@
     const files = Array.from(input.files);
     let validFiles = 0;
     tempFiles.value = [];
+    
+    // 计算可以上传的文件数量
+    const remainingSlots = MAX_COUNT.value - fileList.value.length;
+    
+    // 检查是否超出最大文件数量限制
+    if (files.length > remainingSlots) {
+      ElMessage.warning(`最多只能上传${MAX_COUNT.value}个文件`);
+    }
+    
+    // 只处理允许数量的文件
+    const filesToProcess = files.slice(0, remainingSlots);
 
-    files.forEach((file) => {
+    filesToProcess.forEach((file) => {
       if (!isValidFileType(file)) {
-        ElMessage.error(`${file.name} 不是允许的文件类型`);
+        ElMessage.error(`文件${file.name}格式不正确,请上传pdf、word、excel、ppt文件`);
         return;
       }
 
-      if (file.size > MAX_SIZE) {
-        ElMessage.error(`${file.name} 文件过大`);
+      if (file.size > MAX_SIZE.value) {
+        ElMessage.error(`文件${file.name} 大小超过${props.maxSize || 5}MB限制`);
         return;
       }
 
       // 检查是否已经上传过相同的文件
       if (isFileAlreadyUploaded(file)) {
-        ElMessage.warning(`${file.name} 已经上传过了`);
+        ElMessage.warning(`文件${file.name} 已经上传过了`);
         return;
       }
 
@@ -165,6 +186,7 @@
     ElMessageBox.confirm('确定删除该文件吗?', '提示', {
       confirmButtonText: '确定',
       cancelButtonText: '取消',
+      customClass: 'customMessageBox--warn'
     }).then(() => {
       const index = fileList.value.findIndex((item) => item.fileId === id);
       if (index !== -1) {
@@ -228,6 +250,16 @@
     flex-direction: column;
     width: 100%;
   }
+  .upload-button-container {
+    display: flex;
+    align-items: center;
+    gap: 20px;
+  }
+
+  .upload-button-support {
+    font-size: 12px;
+    color: rgba($text-color, 0.65);
+  }
 
   .upload-button {
     @include flex-center;
@@ -245,6 +277,17 @@
       background-color: $primary-color;
       color: $white-color;
     }
+    
+    &.disabled {
+      background-color: #f5f5f5;
+      color: #aaa;
+      cursor: not-allowed;
+      
+      &:hover {
+        background-color: #f5f5f5;
+        color: #aaa;
+      }
+    }
   }
 
   #fileInput {
@@ -291,7 +334,8 @@
   .file-item {
     @include flex-center;
     justify-content: space-between;
-    width: 100%;
+    width: 200px;
+    height: 32px;
     border: 1px solid #e5e7eb;
     border-radius: 6px;
     padding: 12px;
@@ -307,7 +351,7 @@
     align-items: center;
     gap: 8px;
     img {
-      width: 20px;
+      width: 10px;
     }
   }
 
@@ -316,6 +360,8 @@
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
+    font-size: 14px;
+    color: rgba($text-color, 0.65);
   }
 
   .delete-button {
@@ -323,5 +369,6 @@
     background: none;
     border: none;
     cursor: pointer;
+    font-size: 12px;
   }
 </style>

+ 14 - 2
src/views/disaster/disaster-control/PageDisposalRectification.vue

@@ -76,7 +76,12 @@
                         <ActionButton
                           text="去整改"
                           @click="
-                            handleRectification(scope.row.id, item.id, item.tableData[0].disasterReportRecordDetailList)
+                            handleRectification(
+                              scope.row.id,
+                              item.id,
+                              scope.row.fixTaskId,
+                              item.tableData[0].disasterReportRecordDetailList,
+                            )
                           "
                         />
                         <ActionButton
@@ -90,7 +95,12 @@
                         <ActionButton
                           text="去整改"
                           @click="
-                            handleRectification(scope.row.id, item.id, item.tableData[0].disasterReportRecordDetailList)
+                            handleRectification(
+                              scope.row.id,
+                              item.id,
+                              scope.row.fixTaskId,
+                              item.tableData[0].disasterReportRecordDetailList,
+                            )
                           "
                         />
                       </div>
@@ -270,6 +280,7 @@
   const handleRectification = (
     id: number,
     handleTaskId: number,
+    fixTaskId: number,
     detailList: disasterReportRecordDetailListResponse[],
   ) => {
     const rectificationIds = detailList
@@ -283,6 +294,7 @@
       },
       query: {
         handleTaskId,
+        fixTaskId,
       },
     });
   };

+ 105 - 2
src/views/disaster/disaster-control/PageDisposalRectificationItem.vue

@@ -91,9 +91,21 @@
           <div class="disaster-information--line"></div>
           <span>整改处理</span>
         </div>
+        <BasicForm ref="basicFormRef" :formData="ruleFormData" :formRules="formRules" :formConfig="ruleFormConfig">
+          <template #fixImages>
+            <UploadImages @uploadSuccess="handleUploadImageSuccess" />
+          </template>
+          <template #fixMaterials>
+            <Upload label="上传文件" @uploadSuccess="handleUploadFileSuccess" />
+          </template>
+        </BasicForm>
       </section>
     </main>
-    <footer class="disaster-precaution-container__footer"> </footer>
+    <footer class="disaster-precaution-container__footer">
+      <el-button @click="router.back()">取消</el-button>
+      <el-button type="primary" v-if="isShowNextSubmit">提交,并处置下一条</el-button>
+      <el-button type="primary" @click="handleSubmit">提交</el-button>
+    </footer>
     <UploadLoading :form-loading="formLoading" v-if="formLoading" />
   </div>
 </template>
@@ -102,25 +114,113 @@
   import BackIcon from 'assets/svg/back.svg';
   import { useRoute, useRouter } from 'vue-router';
   import UploadLoading from '@/components/UploadLoading.vue';
+  import BasicForm from '@/components/BasicForm.vue';
+  import UploadImages from './src/components/UploadImages.vue';
+  import Upload from '@/views/disaster/components/Upload.vue';
   import { ref, onMounted } from 'vue';
   import { useDisasterControlHook } from './src/hook';
-  import type { disasterReportRecordDetailListResponse } from '@/types/disaster-control';
+  import { useFormConfigHook } from '@/hooks/useFormConfigHook';
+  import { useUserInfoHook } from '@/views/disaster/hooks/userInfo';
+  import { createDisposalRectification } from '@/api/disaster-control';
+  import { uploadFileApi, UPLOAD_BIZ_TYPE } from '@/api/minio';
+  import type { FileItem } from '@/views/disaster/types';
+  import type { disasterReportRecordDetailListResponse, DisposalRectificationFormData } from '@/types/disaster-control';
+  import {
+    DISPOSAL_RECTIFICATION_FORM_CONFIG,
+    DISPOSAL_RECTIFICATION_FORM_DATA,
+    DISPOSAL_RECTIFICATION_FORM_RULES,
+  } from './src/config';
+  import { ElMessage } from 'element-plus';
+
+  const basicFormRef = ref<InstanceType<typeof BasicForm>>();
 
   const LossReportItemFormData = ref<disasterReportRecordDetailListResponse>();
   const { getLossReportItem, getSafetyLevel, getSafetyLevelDict } = useDisasterControlHook();
+  const { realname, id: userId } = useUserInfoHook();
 
   const router = useRouter();
   const route = useRoute();
   const id = Number(route.params.id);
   const handleTaskId = Number(route.query.handleTaskId);
+  const fixTaskId = Number(route.query.fixTaskId);
   const formLoading = ref(false);
   const getLossReportItemData = async () => {
     const res = await getLossReportItem(handleTaskId, id);
     LossReportItemFormData.value = res;
   };
+  const { ruleFormConfig, ruleFormData, formRules, cloneRuleFormData, beforeRouteLeave } =
+    useFormConfigHook<DisposalRectificationFormData>(
+      DISPOSAL_RECTIFICATION_FORM_CONFIG,
+      DISPOSAL_RECTIFICATION_FORM_DATA,
+      DISPOSAL_RECTIFICATION_FORM_RULES,
+    );
+  const rectificationIds = ref<number[]>([]);
+  const isShowNextSubmit = ref(false);
+  const handleUploadImageSuccess = (files: File[]) => {
+    ruleFormData.uploadImages = files;
+  };
+  const handleUploadFileSuccess = (files: FileItem[]) => {
+    ruleFormData.uploadFiles = files;
+  };
+  const formatImageList = async (file: File) => {
+    if (!file) return file;
+    const fileName = file.name;
+    const res = await uploadFileApi({ bizType: UPLOAD_BIZ_TYPE.ATTACHMENT, fileName, file });
+    return res.url;
+  };
+  const formatFileList = async (file: FileItem) => {
+    if (!file.file) return file;
+    const fileName = file.fileName;
+    const res = await uploadFileApi({ bizType: UPLOAD_BIZ_TYPE.ATTACHMENT, fileName, file: file.file });
+    const fileType = file.fileType;
+    const fileSize = file.fileSize;
+    const fileId = file.fileId;
+    const fileUrl = res.url;
+    return {
+      fileName,
+      fileType,
+      fileSize,
+      fileUrl,
+      fileId,
+    };
+  };
+  const handleSubmit = async () => {
+    if (!basicFormRef.value) return;
+    const validateResult = await basicFormRef.value.validateForm();
+    if (!validateResult) return;
+    formLoading.value = true;
+    try {
+      const imagesListRes: string[] = await Promise.all(
+        (ruleFormData.uploadImages || []).map((item) => formatImageList(item)),
+      );
+      const fileListRes: FileItem[] = await Promise.all(
+        (ruleFormData.uploadFiles || []).map((item) => formatFileList(item)),
+      );
+      const imagesListString = JSON.stringify(imagesListRes);
+      const fileListString = JSON.stringify(fileListRes);
+      ruleFormData.fixImages = imagesListString;
+      ruleFormData.fixMaterials = fileListString;
+      await createDisposalRectification({
+        fixTaskId,
+        ...ruleFormData,
+      });
+      ElMessage.success('提交成功');
+      cloneRuleFormData();
+      router.back();
+    } finally {
+      formLoading.value = false;
+    }
+  };
   onMounted(() => {
+    ruleFormData.createdBy = userId;
+    ruleFormData.createdByName = realname;
+    cloneRuleFormData();
+    beforeRouteLeave();
     getLossReportItemData();
     getSafetyLevelDict();
+    const sessionRectificationIds = sessionStorage.getItem('rectificationIds') || '[]';
+    rectificationIds.value = JSON.parse(sessionRectificationIds);
+    isShowNextSubmit.value = rectificationIds.value.length > 1 && rectificationIds.value.includes(id);
   });
 </script>
 
@@ -133,4 +233,7 @@
     flex-direction: column !important;
     gap: 30px !important;
   }
+  :deep(.el-date-editor) {
+    --el-date-editor-width: 100%;
+  }
 </style>

+ 2 - 3
src/views/disaster/disaster-control/src/components/UploadImages.vue

@@ -123,7 +123,7 @@
   const checkFileValid = (file: File): boolean => {
     // 检查文件是否已上传
     if (isFileExist(file)) {
-      ElMessage.warning(`文件"${file.name}"已上传过,请勿重复上传`);
+      ElMessage.warning(`文件"${file.name}"已上传过`);
       return false;
     }
 
@@ -223,13 +223,12 @@
   .image-preview {
     width: 100px;
     height: 100px;
-    background-color: #f7f8fa;
     border-radius: 4px;
   }
 
   .upload-box {
     @include flex-center;
-    border: 1px dashed #d9d9d9;
+    border: 1px dashed rgba($text-color, 0.15);
     cursor: pointer;
     transition: all 0.3s;
 

+ 117 - 27
src/views/disaster/disaster-control/src/config/form.ts

@@ -3,14 +3,14 @@
  */
 import type { FormConfig } from '@/types/basic-form';
 import { validateFormTime } from '@/views/disaster/utils/validateTime';
-import { number } from 'echarts';
+import { FIX_STATUS_OPTIONS_DISPOSAL_RECTIFICATION } from '../constant';
 // 通用表单信息
 const BASIC_FROM_CONFIG = {};
 
 // 通用处置管理表单信息
 const DISPOSAL_MANAGEMENT_BASIC_FROM_CONFIG: FormConfig[] = [
   {
-    label: '应完成上报时间',
+    label: '应完成上报时间',
     prop: 'dueCompleteTime',
     component: 'ElDatePicker',
     componentProps: {
@@ -23,7 +23,7 @@ const DISPOSAL_MANAGEMENT_BASIC_FROM_CONFIG: FormConfig[] = [
     },
   },
   {
-    label: '上报要求',
+    label: '上报要求',
     prop: 'reportRequirement',
     component: 'ElInput',
     componentProps: {
@@ -35,17 +35,17 @@ const DISPOSAL_MANAGEMENT_BASIC_FROM_CONFIG: FormConfig[] = [
     },
   },
   {
-    label: '上报人员',
+    label: '上报人员',
     prop: 'userGroupList',
     slot: 'userGroupList',
   },
   {
-    label: '是否推送',
+    label: '是否推送',
     prop: 'isPush',
     slot: 'isPush',
   },
   {
-    label: '创建人',
+    label: '创建人',
     prop: 'createdByName',
     component: 'ElInput',
     componentProps: {
@@ -57,7 +57,7 @@ const DISPOSAL_MANAGEMENT_BASIC_FROM_CONFIG: FormConfig[] = [
 // 处置管理表单信息(任务项)
 export const DISPOSAL_MANAGEMENT_TASK_FROM_CONFIG: FormConfig[] = [
   {
-    label: '任务名称',
+    label: '任务名称',
     prop: 'taskName',
     component: 'ElInput',
     componentProps: {
@@ -65,7 +65,7 @@ export const DISPOSAL_MANAGEMENT_TASK_FROM_CONFIG: FormConfig[] = [
     },
   },
   {
-    label: '上报部门',
+    label: '上报部门',
     prop: 'deptIds',
     slot: 'deptIds',
   },
@@ -75,7 +75,7 @@ export const DISPOSAL_MANAGEMENT_TASK_FROM_CONFIG: FormConfig[] = [
 // 处置管理表单信息(列表项)
 export const DISPOSAL_MANAGEMENT_ITEM_FROM_CONFIG_CREATE: FormConfig[] = [
   {
-    label: '任务名称',
+    label: '任务名称',
     prop: 'taskName',
     component: 'ElInput',
     componentProps: {
@@ -84,7 +84,7 @@ export const DISPOSAL_MANAGEMENT_ITEM_FROM_CONFIG_CREATE: FormConfig[] = [
     },
   },
   {
-    label: '上报部门',
+    label: '上报部门',
     prop: 'deptIds',
     slot: 'deptIds',
   },
@@ -94,7 +94,7 @@ export const DISPOSAL_MANAGEMENT_ITEM_FROM_CONFIG_CREATE: FormConfig[] = [
 // 处置管理表单信息(列表项)
 export const DISPOSAL_MANAGEMENT_ITEM_FROM_CONFIG_EDIT: FormConfig[] = [
   {
-    label: '任务名称',
+    label: '任务名称',
     prop: 'taskName',
     component: 'ElInput',
     componentProps: {
@@ -103,7 +103,7 @@ export const DISPOSAL_MANAGEMENT_ITEM_FROM_CONFIG_EDIT: FormConfig[] = [
     },
   },
   {
-    label: '上报部门',
+    label: '上报部门',
     prop: 'deptName',
     component: 'ElInput',
     componentProps: {
@@ -116,7 +116,7 @@ export const DISPOSAL_MANAGEMENT_ITEM_FROM_CONFIG_EDIT: FormConfig[] = [
 // 创建损失记录表单信息通用项目
 const LOSS_REPORT_ITEM_FORM_CONFIG_COMMON = {
   TASK_NAME: {
-    label: '任务名称',
+    label: '任务名称',
     prop: 'reportTaskName',
     component: 'ElInput',
     componentProps: {
@@ -124,12 +124,12 @@ const LOSS_REPORT_ITEM_FORM_CONFIG_COMMON = {
     },
   },
   IS_LOSS: {
-    label: '是否损失',
+    label: '是否损失',
     prop: 'isLoss',
     slot: 'isLoss',
   },
   CREATED_BY: {
-    label: '创建人',
+    label: '创建人',
     prop: 'createdBy',
     component: 'ElInput',
     componentProps: {
@@ -150,12 +150,12 @@ export const LOSS_REPORT_ITEM_FORM_CONFIG_LOSS: FormConfig[] = [
   LOSS_REPORT_ITEM_FORM_CONFIG_COMMON.TASK_NAME,
   LOSS_REPORT_ITEM_FORM_CONFIG_COMMON.IS_LOSS,
   {
-    label: '损失楼号、楼层、房间号',
+    label: '损失楼号、楼层、房间号',
     prop: 'affectedRoom',
     slot: 'affectedRoom',
   },
   {
-    label: '受灾物品',
+    label: '受灾物品',
     prop: 'affectedItems',
     component: 'ElInput',
     componentProps: {
@@ -163,12 +163,12 @@ export const LOSS_REPORT_ITEM_FORM_CONFIG_LOSS: FormConfig[] = [
     },
   },
   {
-    label: '受灾图片',
+    label: '受灾图片',
     prop: 'images',
     slot: 'affectedImages',
   },
   {
-    label: '损失描述',
+    label: '损失描述',
     prop: 'description',
     component: 'ElInput',
     componentProps: {
@@ -180,42 +180,42 @@ export const LOSS_REPORT_ITEM_FORM_CONFIG_LOSS: FormConfig[] = [
     },
   },
   {
-    label: '影响安全评估',
+    label: '影响安全评估',
     prop: 'safetyLevel',
     slot: 'safetyLevel',
   },
   {
-    label: '是否影响正常工作',
+    label: '是否影响正常工作',
     prop: 'isAffectWork',
     slot: 'isAffectWork',
   },
   {
-    label: '损失评估金额',
+    label: '损失评估金额',
     prop: 'lossAssessmentAmount',
     slot: 'lossAssessmentAmount',
   },
   {
-    label: '处置优先级',
+    label: '处置优先级',
     prop: 'priority',
     slot: 'priority',
   },
   {
-    label: '整改责任部门',
+    label: '整改责任部门',
     prop: 'responsibleDeptId',
     slot: 'responsibleDeptId',
   },
   {
-    label: '整改责任人',
+    label: '整改责任人',
     prop: 'userGroupList',
     slot: 'userGroupList',
   },
   {
-    label: '是否推送',
+    label: '是否推送',
     prop: 'isPush',
     slot: 'isPush',
   },
   {
-    label: '备注',
+    label: '备注',
     prop: 'remark',
     component: 'ElInput',
     componentProps: {
@@ -229,6 +229,74 @@ export const LOSS_REPORT_ITEM_FORM_CONFIG_LOSS: FormConfig[] = [
   LOSS_REPORT_ITEM_FORM_CONFIG_COMMON.CREATED_BY,
 ];
 
+// 处置整改表单信息
+export const DISPOSAL_RECTIFICATION_FORM_CONFIG: FormConfig[] = [
+  {
+    label: '整改进度:',
+    prop: 'fixStatus',
+    component: 'ElSelect',
+    componentProps: {
+      placeholder: '请选择整改进度',
+    },
+    selectOptions: FIX_STATUS_OPTIONS_DISPOSAL_RECTIFICATION,
+  },
+  {
+    label: '整改措施:',
+    prop: 'fixMethod',
+    component: 'ElInput',
+    componentProps: {
+      placeholder: '请输入整改措施',
+      type: 'textarea',
+      rows: 3,
+      maxlength: 500,
+      showWordLimit: true,
+    },
+  },
+  {
+    label: '整改时限:',
+    prop: 'fixDeadline',
+    component: 'ElDatePicker',
+    componentProps: {
+      placeholder: '请选择整改时限',
+      type: 'datetime',
+      format: 'YYYY-MM-DD HH:mm:ss',
+      dateFormat: 'MMM DD, YYYY',
+      timeFormat: 'HH:mm:ss',
+      valueFormat: 'YYYY-MM-DD HH:mm:ss',
+    },
+  },
+  {
+    label: '整改图片:',
+    prop: 'fixImages',
+    slot: 'fixImages',
+  },
+  {
+    label: '上传整改材料:',
+    prop: 'fixMaterials',
+    slot: 'fixMaterials',
+  },
+  {
+    label: '备注:',
+    prop: 'remark',
+    component: 'ElInput',
+    componentProps: {
+      placeholder: '请输入备注',
+      type: 'textarea',
+      rows: 3,
+      maxlength: 500,
+      showWordLimit: true,
+    },
+  },
+  {
+    label: '创建人:',
+    prop: 'createdByName',
+    component: 'ElInput',
+    componentProps: {
+      disabled: true,
+    },
+  },
+];
+
 // 通用表单数据
 const BASIC_FROM_DATA = {};
 const DISPOSAL_MANAGEMENT_BASIC_FROM_DATA = {
@@ -268,6 +336,18 @@ export const LOSS_REPORT_ITEM_FORM_DATA = {
   affectedRoom: '永远存在', //自己创造的一个数值,不要传给后端 这个数值永远存在
   uploadImages: [],
 };
+export const DISPOSAL_RECTIFICATION_FORM_DATA = {
+  fixStatus: '',
+  fixMethod: '',
+  fixDeadline: '',
+  fixImages: '',
+  fixMaterials: '',
+  remark: '',
+  createdBy: null,
+  createdByName: '',
+  uploadImages: [],
+  uploadFiles: [],
+};
 
 // 通用表单规则
 const BASIC_FROM_RULES = {};
@@ -316,3 +396,13 @@ export const LOSS_REPORT_ITEM_FROM_RULES = {
   userGroupList: [{ required: true, message: '请选择整改责任人', trigger: 'change' }],
   isPush: [{ required: true, message: '请选择是否推送', trigger: 'change' }],
 };
+
+// 处置整改表单规则
+export const DISPOSAL_RECTIFICATION_FORM_RULES = {
+  fixStatus: [{ required: true, message: '请选择整改进度', trigger: 'change' }],
+  fixMethod: [{ required: true, message: '请输入整改措施', trigger: 'blur' }],
+  fixDeadline: [
+    { required: true, message: '请选择整改时限', trigger: 'change' },
+    { validator: validateFormTime, trigger: 'change' },
+  ],
+};

+ 6 - 0
src/views/disaster/disaster-control/src/config/index.ts

@@ -24,6 +24,9 @@ import {
   LOSS_REPORT_ITEM_FORM_CONFIG_NO_LOSS,
   LOSS_REPORT_ITEM_FORM_DATA,
   LOSS_REPORT_ITEM_FROM_RULES,
+  DISPOSAL_RECTIFICATION_FORM_CONFIG,
+  DISPOSAL_RECTIFICATION_FORM_DATA,
+  DISPOSAL_RECTIFICATION_FORM_RULES,
 } from './form';
 
 export {
@@ -48,4 +51,7 @@ export {
   LOSS_REPORT_ITEM_FORM_CONFIG_NO_LOSS,
   LOSS_REPORT_ITEM_FORM_DATA,
   LOSS_REPORT_ITEM_FROM_RULES,
+  DISPOSAL_RECTIFICATION_FORM_CONFIG,
+  DISPOSAL_RECTIFICATION_FORM_DATA,
+  DISPOSAL_RECTIFICATION_FORM_RULES,
 };

+ 21 - 6
src/views/disaster/disaster-control/src/constant.ts

@@ -53,27 +53,42 @@ export const TASK_STAGE_OPTIONS_DISPOSAL_MANAGEMENT = [
 
 export const TASK_STAGE_OPTIONS_REPORT_TASK = [...TASK_STAGE_OPTIONS_BASIC];
 
-export const FIX_STATUS_OPTIONS = [
-  {
+const FIX_STATUS_OPTIONS_BASIC = {
+  RECTIFIED: {
     label: '待整改',
     value: FIX_STATUS.TO_BE_RECTIFIED,
   },
-  {
+  RESPONDED: {
     label: '已响应',
     value: FIX_STATUS.RESPONDED,
   },
-  {
+  UPDATED: {
     label: '已更新',
     value: FIX_STATUS.UPDATED,
   },
-  {
+  COMPLETED: {
     label: '已完成',
     value: FIX_STATUS.COMPLETED,
   },
-  {
+  TEMPORARY_CLOSED: {
     label: '暂时关闭',
     value: FIX_STATUS.TEMPORARY_CLOSED,
   },
+};
+
+export const FIX_STATUS_OPTIONS = [
+  FIX_STATUS_OPTIONS_BASIC.RECTIFIED,
+  FIX_STATUS_OPTIONS_BASIC.RESPONDED,
+  FIX_STATUS_OPTIONS_BASIC.UPDATED,
+  FIX_STATUS_OPTIONS_BASIC.COMPLETED,
+  FIX_STATUS_OPTIONS_BASIC.TEMPORARY_CLOSED,
+];
+
+export const FIX_STATUS_OPTIONS_DISPOSAL_RECTIFICATION = [
+  FIX_STATUS_OPTIONS_BASIC.RESPONDED,
+  FIX_STATUS_OPTIONS_BASIC.UPDATED,
+  FIX_STATUS_OPTIONS_BASIC.COMPLETED,
+  FIX_STATUS_OPTIONS_BASIC.TEMPORARY_CLOSED,
 ];
 
 export const DEFAULT_PAGE_SIZE = 10;

+ 1 - 1
src/views/disaster/disaster-warning/src/type.ts

@@ -7,4 +7,4 @@ interface BasicRuleForm {
 }
 
 export interface WarningInfoRuleForm extends BasicRuleForm, Omit<WarningInfoDetailResponse, 'id' | 'isPush'> {}
-export interface DefenseNoticeRuleForm extends BasicRuleForm, Omit<DefenseNoticeDetailResponse, 'id' | 'isPush'> {}
+export interface DefenseNoticeRuleForm extends BasicRuleForm, Omit<DefenseNoticeDetailResponse, 'id' | 'isPush' | 'pushName'> {}