xiaweibo пре 2 месеци
родитељ
комит
b48f75d9bd

+ 15 - 1
src/api/evaluationSystem/index.ts

@@ -735,4 +735,18 @@ export function exportEvaluationDeptSort(query: ExportMonthlyDeductionRequest) {
   }, {
     isTransformResponse: false,
   });
-}
+}
+
+/**
+ * 下载模板
+ */
+export function addDownloadTheTemplate(query: ExportMonthlyDeductionRequest) {
+  return http.request({
+    url: '/securityExamine/admin/exportImportSecurityExamineDetTemplate',
+    method: 'get',
+    data: query,
+    responseType: 'blob',
+  }, {
+    isTransformResponse: false,
+  });
+}

+ 16 - 1
src/views/production-safety/risk-identification-and-control/work-injury-apply-manage/components/detail.vue

@@ -7,7 +7,15 @@
       show-icon
       class="detail-reject-alert"
     />
-
+    <div class="detail-reject-alert">
+      <div class="detail-reject-alert-name">
+        填表说明:
+      </div>
+      <div class="detail-reject-alert-content">
+        4张(事故报告、委托书、地址确认书、申请表)工伤认定表格需下载模版,手填,上传相关材料给吴剑希审批(驳回或通过)+判定工伤类别(责任事故/非责任事故);通过后状态变为申请加盖公章及材料申请;用印申请后编写一段告知通知(内容先把告知单信息先编辑进去),给申请人。
+        
+      </div>
+    </div>
     <BasicForm
       ref="basicFormRef"
       :formData="ruleFormData"
@@ -857,4 +865,11 @@
   .detail-reject-alert{
     margin-bottom: 20px;
   }
+  .detail-reject-alert-name{
+    color: #aaa;
+    margin-bottom: 10px;
+  }
+  .detail-reject-alert-content{
+    color: #aaa;
+  }
 </style>

+ 0 - 1
src/views/production-safety/safety-culture/safetyCultureActivityManagementExecutor/components/safetyCultureActivityManagementDetail.vue

@@ -315,7 +315,6 @@
   };
 
   const previewOnline = (url: string | undefined, type) => {
-    debugger
     if (url) {
       previewOnlineRef.value?.open(url, type);
     }

+ 17 - 5
src/views/production-safety/safetyAssessment/evaluationSystem/components/EvaluationSystemDetail.vue

@@ -24,8 +24,8 @@
 
     <div class="evaluation-items-section">
       <div class="section-header">
-        <!-- <el-button plain @click="handleDownloadTemplate">模板下载</el-button> -->
-        <!-- <el-button plain @click="handleImport">导入</el-button> -->
+        <el-button plain @click="handleDownloadTemplate">模板下载</el-button>
+        <el-button plain @click="handleImport">导入</el-button>
       </div>
       <div class="evaluation-items-table">
         <el-table :data="evaluationItems" border :span-method="handleSpanMethod">
@@ -144,12 +144,14 @@
     saveSecurityExamine,
     querySecurityExamineDetail,
     updateSecurityExamine,
+    addDownloadTheTemplate,
   } from '@/api/evaluationSystem';
   import type { EvaluationContent } from '@/api/evaluationSystem';
   import type { FileItem } from '@/components/UploadFiles/types';
   import { useUserInfoHook } from '@/hooks/useUserInfoHook';
   import { formatAttachmentList } from '@/components/UploadFiles/utils';
   import { queryAvailableUserList } from '@/api/production-safety/responsibility-implementation';
+  import { downloadByData } from '@/utils/file/download';
 
   const props = defineProps<{
     id?: number;
@@ -228,9 +230,19 @@
     ruleFormData.value.attachmentDocument = files;
   };
 
-  const handleDownloadTemplate = () => {
-    // TODO: 下载模板
-    console.log('download template');
+  const handleDownloadTemplate = async () => {
+    try {
+      const exportParams = {};
+      const response = await addDownloadTheTemplate(exportParams);
+      if (response) {
+        const fileName = `安全考核内容模板_${new Date().toISOString().split('T')[0]}.xlsx`;
+        downloadByData(response, fileName);
+        ElMessage.success('导出成功');
+      }
+    } catch (e) {
+      console.error('导出月度扣分失败:', e);
+      ElMessage.error(e?.message || e?.data || '导出失败,请重试');
+    }
   };
 
   // 导入弹窗相关

+ 0 - 1
src/views/production-safety/safetyAssessment/evaluationSystem/components/EvaluationTarget.vue

@@ -562,7 +562,6 @@
       };
       const response = route.query.operate == 'evaluationSystem-advanced-group' ? await exportEvaluationDeptSort(exportParams) : await exportEvaluationTarget(exportParams);
       if (response) {
-        debugger
         const fileName = `${route.query.operate == 'evaluationSystem-advanced-group' ? '部门考核' : '考核对象'}_${new Date().toISOString().split('T')[0]}.xlsx`;
         downloadByData(response, fileName);
         ElMessage.success('导出成功');