Bläddra i källkod

fix:修复内部测试问题

sunqijun 1 månad sedan
förälder
incheckning
18adf6a4b0

+ 5 - 1
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/areaCheckPlanManagementDept.vue

@@ -221,7 +221,11 @@
   const handleDownload = async () => {
     try {
       let params = {
-        ...tableQuery.queryParam,
+        searchKey: tableQuery.queryParam.keyword,
+        checkPlaceCategory: tableQuery.queryParam.venueCategory,
+        status: tableQuery.queryParam.status || undefined,
+        startDate: tableQuery.queryParam.planStartTime,
+        endDate: tableQuery.queryParam.planEndTime,
       }
       const response = await exportAreaCheckPlanList(params);
       if (response) {

+ 5 - 2
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/components/areaCheckPlanManagementDeptDetail.vue

@@ -135,9 +135,12 @@
 
     <section class="view-section">
       <div class="view-section__title">
-        <span class="view-section__icon" />
+        <span class="view-section__icon"></span>
         检查记录
       </div>
+      <div style="margin-bottom: 20px;">
+        <el-button type="primary" @click="onAddRecord">新增检查日志</el-button>
+      </div>
       <div class="view-record-toolbar">
         <el-input
           v-model="recordSearchKeyword"
@@ -156,7 +159,7 @@
         />
         <el-button type="primary" class="view-record-toolbar-btn" @click="onRecordSearch">查询</el-button>
         <el-button @click="onRecordExport">导出</el-button>
-        <el-button type="primary" @click="onAddRecord">新增检查日志</el-button>
+
       </div>
       <BasicTable
         :tableData="paginatedRecordList"

+ 2 - 2
src/views/production-safety/implement-safety-duty/responsibility-notice-manage-admin/components/SelectNotifyArea.vue

@@ -14,7 +14,7 @@
     <div class="main">
       <el-form :inline="true">
         <el-form-item>
-          <el-input v-model="queryParams.queryParam.nameFunction" placeholder="搜索楼宇/区域" />
+          <el-input v-model="queryParams.queryParam.buildingArea" :placeholder="`搜索${activeTab===1?'楼宇/区域':'楼层'}`" />
         </el-form-item>
         <!-- <el-form-item>
           <el-select v-model="queryParams.queryParam.status" clearable placeholder="状态" style="width: 170px">
@@ -112,7 +112,7 @@
     pageSize: 10,
     queryParam: {
       type: activeTab.value,
-      nameFunction: '',
+      buildingArea: '',
       status: 1,
       responsibilityPersonId: '',
     },

+ 1 - 1
src/views/production-safety/risk-identification-and-control/labor-products-manage/add.vue

@@ -82,7 +82,7 @@
     ppeName:[{ required: true, message: '请输入物品名称', trigger: 'blur' }],
     serviceMonths: [{ required: true, message: '请输入使用期限', trigger: 'blur' }],
     status: [{ required: true, message: '请输入用品状态', trigger: 'change' }],
-    remark: [{ required: true, message: '请输入备注', trigger: 'blur' }],
+    // remark: [{ required: true, message: '请输入备注', trigger: 'blur' }],
   };
 
   const handleSubmit = async () => {

+ 1 - 1
src/views/production-safety/risk-identification-and-control/labor-products-manage/edit.vue

@@ -91,7 +91,7 @@
     ppeName:[{ required: true, message: '请输入物品名称', trigger: 'blur' }],
     serviceMonths: [{ required: true, message: '请输入使用期限', trigger: 'blur' }],
     status: [{ required: true, message: '请输入用品状态', trigger: 'change' }],
-    remark: [{ required: true, message: '请输入备注', trigger: 'blur' }],
+    // remark: [{ required: true, message: '请输入备注', trigger: 'blur' }],
   };
 
   const getDetail = async () => {

+ 44 - 6
src/views/production-safety/risk-identification-and-control/labor-products-purchase-apply-manage/components/detail.vue

@@ -12,8 +12,7 @@
       <div class="select-box--item_new">
         <span>
           <span style="color: red;">*</span>
-          审批流程
-          :
+          审批流程:
         </span>
         <el-select
           class="select-box--item__select"
@@ -30,8 +29,7 @@
       <div class="select-box--item_new" v-if="!isCreateMode">
         <span>
           <span style="color: red;">*</span>
-          申请单号
-          :
+          申请单号:
         </span>
         {{ form.applyNo }}
       </div>
@@ -92,13 +90,14 @@
                 @uploadSuccess="(list: FileItem[]) => onStylePhotoSuccess(row, list)"
               /> -->
               <el-upload
-                :key="row.id || row.$$uid || $index"
+                :key="row.id || row.$$uid"
                 :ref="el => setUploadRef(row, el)"
                 v-model:file-list="row.pictureUrl"
                 :auto-upload="false"
                 list-type="picture-card"
                 :limit="1"
                 :disabled="isViewMode"
+                :before-upload="beforeUpload"
                 :on-change="(file) => handleApprovalImageChange(row, file)"
                 :on-exceed="handleApprovalImageExceed"
                 :on-remove="() => handleApprovalImageRemove(row)"
@@ -838,10 +837,49 @@
       }
     });
   };
+// 图片格式校验
+  const validateImage = (file) => {
+    console.log(file, 'jiaoyan')
+    const validMIME = [
+      'image/jpeg',
+      'image/png',
+      'image/gif',
+      'image/bmp',
+      'image/webp',
+      'image/svg+xml',
+      'image/tiff',
+      'image/heic',
+      'image/heif',
+      'image/avif',
+    ];
+
+    if (!validMIME.includes(file.type)) {
+      ElMessage.error('仅支持图片文件(JPEG/PNG/GIF/BMP/WEBP/SVG/TIFF/HEIC/AVIF等)');
+      return false;
+    }
+
+    if (!validMIME.includes(file.type)) {
+      ElMessage.error('仅支持JPG/PNG格式图片');
+      return false; // 阻止上传
+    }
 
+    // 可选:添加文件大小限制
+    const maxSize = 1 * 1024 * 1024; // 5MB
+    if (file.size > maxSize) {
+      ElMessage.error('图片大小不能超过1MB');
+      return false;
+    }
+
+    return true; // 验证通过
+  };
+  const beforeUpload = (row: PurchaseApplyItem, uploadFile: UploadUserFile) => {
+    const validate = validateImage(uploadFile.raw)
+    if(!validate) return;
+  }
   const handleApprovalImageChange = (row: PurchaseApplyItem, uploadFile: UploadUserFile) => {
     if (!uploadFile.raw) return;
-
+    const validate = validateImage(uploadFile.raw)
+    if(!validate) return;
     uploadFileApi({
       file: uploadFile.raw,
       bizType: UPLOAD_BIZ_TYPE['DICTIONARY'],

+ 1 - 1
src/views/production-safety/risk-identification-and-control/labor-products-requisition-manage/view.vue

@@ -180,7 +180,7 @@
           rn !== '' && rn != null && !Number.isNaN(Number(rn)) ? Number(rn) : undefined;
         form.receiverCode = res.receiverCode ?? '';
         form.receiverName = res.receiverName ?? '';
-        form.status = res.status === true || res.status === 'true';
+        form.status = res.status === 1 ? true : false;
         form.remark = res.remark ?? '';
         form.createdAt = res.createdAt ?? '';
         form.updatedAt = res.updatedAt ?? '';