From 9fe04f4d9567a4de97f5f25d36557ab70b833782 Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: 星期一, 15 九月 2025 08:37:38 +0800
Subject: [PATCH] 提交

---
 src/views/index.vue                                      |    2 
 src/views/hazardMng/hazardLedger/index.vue               |   61 +++---
 src/views/saftyCheckMng/dailyCheck/index.vue             |  130 +++++++++++---
 .env.staging                                             |    4 
 src/api/saftyCheck/index.js                              |   16 +
 src/views/saftyCheckMng/securityCheckStatistic/index.vue |   93 ++++++++++
 .env.development                                         |    4 
 src/views/login.vue                                      |   38 +++
 src/layout/components/Sidebar/Logo.vue                   |    3 
 index.html                                               |    2 
 package.json                                             |    2 
 src/views/hazardMng/hazardRectify/index.vue              |   59 +++---
 .env.production                                          |    6 
 src/views/hazardMng/hazardReport/index.vue               |   52 +++--
 src/views/components/formDialog.vue                      |   39 ++++
 15 files changed, 378 insertions(+), 133 deletions(-)

diff --git a/.env.development b/.env.development
index 52f8fa5..6076d2b 100644
--- a/.env.development
+++ b/.env.development
@@ -1,8 +1,8 @@
 # 页面标题
-VITE_APP_TITLE = 安全巡检系统
+VITE_APP_TITLE = 安全检查系统
 
 # 开发环境配置
 VITE_APP_ENV = 'development'
 
-# 安全巡检系统/开发环境
+# 安全检查系统/开发环境
 VITE_APP_BASE_API = 'http://192.168.2.58:8085/api'
diff --git a/.env.production b/.env.production
index 76890e3..7654101 100644
--- a/.env.production
+++ b/.env.production
@@ -1,11 +1,11 @@
 # 页面标题
-VITE_APP_TITLE = 安全巡检系统
+VITE_APP_TITLE = 安全检查系统
 
 # 生产环境配置
 VITE_APP_ENV = 'production'
 
-# 安全巡检系统/生产环境
-VITE_APP_BASE_API = '/prod-api'
+# 安全检查系统/生产环境
+VITE_APP_BASE_API = 'http://106.15.95.149:8011/api'
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip
diff --git a/.env.staging b/.env.staging
index 1bd8153..915176b 100644
--- a/.env.staging
+++ b/.env.staging
@@ -1,10 +1,10 @@
 # 页面标题
-VITE_APP_TITLE = 安全巡检系统
+VITE_APP_TITLE = 安全检查系统
 
 # 生产环境配置
 VITE_APP_ENV = 'staging'
 
-# 安全巡检系统/生产环境
+# 安全检查系统/生产环境
 VITE_APP_BASE_API = '/stage-api'
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli
diff --git a/index.html b/index.html
index d9b2465..57da8e3 100644
--- a/index.html
+++ b/index.html
@@ -7,7 +7,7 @@
   <meta name="renderer" content="webkit">
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
   <link rel="icon" href="/favicon.ico">
-  <title>安全巡检系统</title>
+  <title>安全检查系统</title>
   <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
   <style>
     html,
diff --git a/package.json b/package.json
index 829a496..5e018b7 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "ruoyi",
   "version": "3.8.6",
-  "description": "安全巡检系统",
+  "description": "安全检查系统",
   "author": "若依",
   "license": "MIT",
   "scripts": {
diff --git a/src/api/saftyCheck/index.js b/src/api/saftyCheck/index.js
index e0e77e1..0dd20ad 100644
--- a/src/api/saftyCheck/index.js
+++ b/src/api/saftyCheck/index.js
@@ -23,3 +23,19 @@
         params: params
     })
 }
+
+export function getDeptCheckData(params) {
+    return request({
+        url: '/system/dept/getDeptCheckData',
+        method: 'get',
+        params: params
+    })
+}
+
+export function getCheckCount(params) {
+    return request({
+        url: '/system/dailySafetyInspection/getCheckCount',
+        method: 'get',
+        params: params
+    })
+}
diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue
index e373ff5..4cafe3e 100644
--- a/src/layout/components/Sidebar/Logo.vue
+++ b/src/layout/components/Sidebar/Logo.vue
@@ -68,7 +68,8 @@
       color: #fff;
       font-weight: 600;
       line-height: 50px;
-      font-size: 14px;
+      font-size: 18px;
+      letter-spacing: 2px;
       font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
       vertical-align: middle;
     }
diff --git a/src/views/components/formDialog.vue b/src/views/components/formDialog.vue
index a92743c..3cb0e76 100644
--- a/src/views/components/formDialog.vue
+++ b/src/views/components/formDialog.vue
@@ -97,6 +97,22 @@
             />
           </el-select>
 
+          <!-- 级联选择组件 -->
+          <el-cascader
+              v-else-if="item.type === 'cascader'"
+              v-model="state.formData[item.prop]"
+              :options="getCascaderOptions(item)"
+              :props="item.props || {}"
+              :placeholder="item.placeholder || '请选择'"
+              :disabled="state.title === '查看' || item.disabled"
+              :clearable="item.clearable !== false"
+              :filterable="item.filterable"
+              :show-all-levels="item.showAllLevels !== false"
+              :style="item.style || 'width: 100%'"
+              @change="item.changeEvent ? handleEvent(item.changeEvent, state.formData[item.prop]) : null"
+          />
+
+
           <!-- 日期选择器组件 -->
           <el-date-picker
               v-else-if="item.type === 'date'"
@@ -279,6 +295,27 @@
   return []
 }
 
+const getCascaderOptions = (item) => {
+  if (!item.options) return []
+
+  // 如果是函数,执行函数获取选项
+  if (typeof item.options === 'function') {
+    return item.options()
+  }
+
+  // 如果是数组,直接返回
+  if (Array.isArray(item.options)) {
+    return item.options
+  }
+
+  // 如果是响应式引用
+  if (item.options && typeof item.options === 'object' && 'value' in item.options) {
+    return item.options.value
+  }
+
+  return []
+}
+
 // 文件上传前的校验
 const beforeUpload = (rawFile, item) => {
   const maxSize = item.maxSize || 5
@@ -341,7 +378,7 @@
       if (userItem) {
         userItem.options = () => userList.map(user => ({
           value: user.userId,
-          label: user.userName
+          label: user.nickName
         }))
         state.formData.reformUserId = null
         await nextTick()
diff --git a/src/views/hazardMng/hazardLedger/index.vue b/src/views/hazardMng/hazardLedger/index.vue
index 3b18af0..b0bc2b2 100644
--- a/src/views/hazardMng/hazardLedger/index.vue
+++ b/src/views/hazardMng/hazardLedger/index.vue
@@ -34,21 +34,22 @@
           </el-select>
         </el-form-item>
         <el-form-item label="整改部门/研究组:" >
-          <el-select v-model="queryParams.reformDeptId" placeholder="请选择" clearable>
-            <el-option
-                v-for="item in deptList"
-                :key="item.deptId"
-                :label="item.deptName"
-                :value="item.deptId">
-            </el-option>
-          </el-select>
+<!--          <el-select v-model="queryParams.reformDeptId" placeholder="请选择" clearable>-->
+<!--            <el-option-->
+<!--                v-for="item in deptList"-->
+<!--                :key="item.deptId"-->
+<!--                :label="item.deptName"-->
+<!--                :value="item.deptId">-->
+<!--            </el-option>-->
+<!--          </el-select>-->
+          <el-cascader v-model="queryParams.reformDeptId" placeholder="请选择" :options="deptList" :show-all-levels="false" :props="{value: 'deptId',label: 'deptName',children: 'children',emitPath: false,checkStrictly: true}"/>
         </el-form-item>
         <el-form-item label="整改人:" >
           <el-select v-model="queryParams.reformUserId" placeholder="请选择" clearable>
             <el-option
                 v-for="item in userList"
                 :key="item.userId"
-                :label="item.userName"
+                :label="item.nickName"
                 :value="item.userId">
             </el-option>
           </el-select>
@@ -84,8 +85,8 @@
       <el-table-column prop="hazardRoom" align="center" label="房间号"/>
       <el-table-column prop="reformDeptName" align="center" label="整改部门/研究组"/>
       <el-table-column prop="reformUserName" align="center" label="整改人"/>
-      <el-table-column prop="updateBy" align="center" label="隐患等记人"/>
-      <el-table-column prop="updateTime" align="center" label="隐患等记时间"/>
+      <el-table-column prop="createBy" align="center" label="隐患登记人"/>
+      <el-table-column prop="createTime" align="center" label="隐患登记时间"/>
       <el-table-column prop="hazardLevel" align="center" label="整改状态">
         <template #default="scope">
           <el-tag v-if="scope.row.state == 1" type="primary">已整改</el-tag>
@@ -118,7 +119,7 @@
 import useUserStore from "@/store/modules/user";
 import {generateWordDocument} from "@/utils/exportWord";
 import {listDept} from "@/api/system/dept";
-import {listUser} from "@/api/system/user";
+import {listUser, listUserByRoleKey} from "@/api/system/user";
 import {delDailySafetyInspect, getDailySafetyInspectList, saveDailySafetyInspect} from "@/api/saftyCheck";
 import {delHazard, getHazardList, saveHazard, updateHazard} from "@/api/hazardMng";
 const { proxy } = getCurrentInstance();
@@ -243,16 +244,18 @@
       {
         label: '整改部门/研究组',
         prop: 'reformDeptId',
-        type: 'select',
-        disabled: true,
-        rules: [{ required: true, message: '请选择部门', trigger: 'blur' }],
-        options: () => {
-          return state.deptList.map(dept => ({
-            value: dept.deptId,
-            label: dept.deptName
-          }))
+        type: 'cascader',
+        showAllLevels: false,
+        props: {
+          value: 'deptId',
+          label: 'deptName',
+          children: 'children',
+          emitPath: false,
+          checkStrictly: true
         },
-        changeEvent: 'getUserList'
+        rules: [{ required: true, message: '请选择部门', trigger: 'blur' }],
+        options: () => state.deptList,
+        changeEvent: 'getUserListByRole'
       },
       {
         label: '整改人',
@@ -263,7 +266,7 @@
         options: () => {
           return state.userList.map(user => ({
             value: user.userId,
-            label: user.userName
+            label: user.nickName
           }))
         }
       },
@@ -319,9 +322,9 @@
     ]
   },
   dataLoader: {
-    async getUserList(reformDeptId) {
-      const res = await listUser({deptId: reformDeptId})
-      return res.code === 200 ? res.rows : []
+    async getUserListByRole(reformDeptId) {
+      const res = await listUserByRoleKey({deptId: reformDeptId,roleKey: 'safety_officer'})
+      return res.code === 200 ? res.data : []
     }
   },
   api: {},
@@ -347,14 +350,13 @@
 
 function getDeptList() {
   listDept({}).then(response => {
-    state.deptList = response.data
+    state.deptList = proxy.handleTree(response.data, "deptId")
   });
 }
 
 function getUserList() {
-  listUser().then(res => {
-    state.userList = res.rows;
-    state.total = res.total;
+  listUser({pageNum: 1,pageSize: 999}).then(res => {
+    state.userList = res.rows
   })
 };
 
@@ -404,7 +406,6 @@
 const handleSubmit = async (data, type) => {
   const {id,reasonAnalysis,rectificationMeasures,reformPeriod,reformPics} = JSON.parse(JSON.stringify(data))
   const params = {id,reasonAnalysis,rectificationMeasures,reformPeriod,reformPics}
-  console.log(params,'para')
   const res = await updateHazard(params)
   if(res.code == 200){
     ElMessage.success(res.msg)
diff --git a/src/views/hazardMng/hazardRectify/index.vue b/src/views/hazardMng/hazardRectify/index.vue
index 29fc866..3e811ef 100644
--- a/src/views/hazardMng/hazardRectify/index.vue
+++ b/src/views/hazardMng/hazardRectify/index.vue
@@ -34,21 +34,22 @@
           </el-select>
         </el-form-item>
         <el-form-item label="整改部门/研究组:" >
-          <el-select v-model="queryParams.reformDeptId" placeholder="请选择" clearable>
-            <el-option
-                v-for="item in deptList"
-                :key="item.deptId"
-                :label="item.deptName"
-                :value="item.deptId">
-            </el-option>
-          </el-select>
+<!--          <el-select v-model="queryParams.reformDeptId" placeholder="请选择" clearable>-->
+<!--            <el-option-->
+<!--                v-for="item in deptList"-->
+<!--                :key="item.deptId"-->
+<!--                :label="item.deptName"-->
+<!--                :value="item.deptId">-->
+<!--            </el-option>-->
+<!--          </el-select>-->
+          <el-cascader v-model="queryParams.reformDeptId" placeholder="请选择" :options="deptList" :show-all-levels="false" :props="{value: 'deptId',label: 'deptName',children: 'children',emitPath: false,checkStrictly: true}"/>
         </el-form-item>
         <el-form-item label="整改人:" >
           <el-select v-model="queryParams.reformUserId" placeholder="请选择" clearable>
             <el-option
                 v-for="item in userList"
                 :key="item.userId"
-                :label="item.userName"
+                :label="item.nickName"
                 :value="item.userId">
             </el-option>
           </el-select>
@@ -84,8 +85,8 @@
       <el-table-column prop="hazardRoom" align="center" label="房间号"/>
       <el-table-column prop="reformDeptName" align="center" label="整改部门/研究组"/>
       <el-table-column prop="reformUserName" align="center" label="整改人"/>
-      <el-table-column prop="updateBy" align="center" label="隐患等记人"/>
-      <el-table-column prop="updateTime" align="center" label="隐患等记时间"/>
+      <el-table-column prop="createBy" align="center" label="隐患登记人"/>
+      <el-table-column prop="createTime" align="center" label="隐患登记时间"/>
       <el-table-column prop="hazardLevel" align="center" label="整改状态">
         <template #default="scope">
           <el-tag v-if="scope.row.state == 1" type="primary">已整改</el-tag>
@@ -119,7 +120,7 @@
 import useUserStore from "@/store/modules/user";
 import {generateWordDocument} from "@/utils/exportWord";
 import {listDept} from "@/api/system/dept";
-import {listUser} from "@/api/system/user";
+import {listUser, listUserByRoleKey} from "@/api/system/user";
 import {delDailySafetyInspect, getDailySafetyInspectList, saveDailySafetyInspect} from "@/api/saftyCheck";
 import {delHazard, getHazardList, saveHazard, updateHazard} from "@/api/hazardMng";
 const { proxy } = getCurrentInstance();
@@ -244,16 +245,18 @@
       {
         label: '整改部门/研究组',
         prop: 'reformDeptId',
-        type: 'select',
-        disabled: true,
-        rules: [{ required: true, message: '请选择部门', trigger: 'blur' }],
-        options: () => {
-          return state.deptList.map(dept => ({
-            value: dept.deptId,
-            label: dept.deptName
-          }))
+        type: 'cascader',
+        showAllLevels: false,
+        props: {
+          value: 'deptId',
+          label: 'deptName',
+          children: 'children',
+          emitPath: false,
+          checkStrictly: true
         },
-        changeEvent: 'getUserList'
+        rules: [{ required: true, message: '请选择部门', trigger: 'blur' }],
+        options: () => state.deptList,
+        changeEvent: 'getUserListByRole'
       },
       {
         label: '整改人',
@@ -264,7 +267,7 @@
         options: () => {
           return state.userList.map(user => ({
             value: user.userId,
-            label: user.userName
+            label: user.nickName
           }))
         }
       },
@@ -320,9 +323,9 @@
     ]
   },
   dataLoader: {
-    async getUserList(reformDeptId) {
-      const res = await listUser({deptId: reformDeptId})
-      return res.code === 200 ? res.rows : []
+    async getUserListByRole(reformDeptId) {
+      const res = await listUserByRoleKey({deptId: reformDeptId,roleKey: 'safety_officer'})
+      return res.code === 200 ? res.data : []
     }
   },
   api: {},
@@ -348,14 +351,13 @@
 
 function getDeptList() {
   listDept({}).then(response => {
-    state.deptList = response.data
+    state.deptList = proxy.handleTree(response.data, "deptId")
   });
 }
 
 function getUserList() {
-  listUser().then(res => {
+  listUser({pageNum: 1,pageSize: 999}).then(res => {
     state.userList = res.rows;
-    state.total = res.total;
   })
 };
 
@@ -405,7 +407,6 @@
 const handleSubmit = async (data, type) => {
   const {id,reasonAnalysis,rectificationMeasures,reformPeriod,reformPics} = JSON.parse(JSON.stringify(data))
   const params = {id,reasonAnalysis,rectificationMeasures,reformPeriod,reformPics}
-  console.log(params,'para')
   const res = await updateHazard(params)
   if(res.code == 200){
     ElMessage.success(res.msg)
diff --git a/src/views/hazardMng/hazardReport/index.vue b/src/views/hazardMng/hazardReport/index.vue
index ba6cbe5..71405d2 100644
--- a/src/views/hazardMng/hazardReport/index.vue
+++ b/src/views/hazardMng/hazardReport/index.vue
@@ -34,21 +34,22 @@
           </el-select>
         </el-form-item>
         <el-form-item label="整改部门/研究组:" >
-          <el-select v-model="queryParams.reformDeptId" placeholder="请选择" clearable>
-            <el-option
-                v-for="item in deptList"
-                :key="item.deptId"
-                :label="item.deptName"
-                :value="item.deptId">
-            </el-option>
-          </el-select>
+<!--          <el-select v-model="queryParams.reformDeptId" placeholder="请选择" clearable>-->
+<!--            <el-option-->
+<!--                v-for="item in deptList"-->
+<!--                :key="item.deptId"-->
+<!--                :label="item.deptName"-->
+<!--                :value="item.deptId">-->
+<!--            </el-option>-->
+<!--          </el-select>-->
+          <el-cascader v-model="queryParams.reformDeptId" placeholder="请选择" :options="deptList" :show-all-levels="false" :props="{value: 'deptId',label: 'deptName',children: 'children',emitPath: false,checkStrictly: true}"/>
         </el-form-item>
         <el-form-item label="整改人:" >
           <el-select v-model="queryParams.reformUserId" placeholder="请选择" clearable>
             <el-option
                 v-for="item in userList"
                 :key="item.userId"
-                :label="item.userName"
+                :label="item.nickName"
                 :value="item.userId">
             </el-option>
           </el-select>
@@ -78,8 +79,8 @@
       <el-table-column prop="hazardRoom" align="center" label="房间号"/>
       <el-table-column prop="reformDeptName" align="center" label="整改部门/研究组"/>
       <el-table-column prop="reformUserName" align="center" label="整改人"/>
-      <el-table-column prop="updateBy" align="center" label="隐患等记人"/>
-      <el-table-column prop="updateTime" align="center" label="隐患等记时间"/>
+      <el-table-column prop="createBy" align="center" label="隐患登记人"/>
+      <el-table-column prop="createTime" align="center" label="隐患登记时间"/>
       <el-table-column label="操作" align="center">
         <template #default="scope">
           <el-button link type="primary" @click="openDialog('view',scope.row)">查看</el-button>
@@ -222,14 +223,17 @@
       {
         label: '整改部门/研究组',
         prop: 'reformDeptId',
-        type: 'select',
-        rules: [{ required: true, message: '请选择部门', trigger: 'blur' }],
-        options: () => {
-          return state.deptList.map(dept => ({
-            value: dept.deptId,
-            label: dept.deptName
-          }))
+        type: 'cascader',
+        showAllLevels: false,
+        props: {
+          value: 'deptId',
+          label: 'deptName',
+          children: 'children',
+          emitPath: false,
+          checkStrictly: true
         },
+        rules: [{ required: true, message: '请选择部门', trigger: 'blur' }],
+        options: () => state.deptList,
         changeEvent: 'getUserListByRole'
       },
       {
@@ -240,7 +244,7 @@
         options: () => {
           return state.userList.map(user => ({
             value: user.userId,
-            label: user.userName
+            label: user.nickName
           }))
         }
       },
@@ -279,14 +283,13 @@
 
 function getDeptList() {
   listDept({}).then(response => {
-    state.deptList = response.data
+    state.deptList = proxy.handleTree(response.data, "deptId")
   });
 }
 
 function getUserList() {
-  listUser().then(res => {
+  listUser({pageNum: 1,pageSize: 999}).then(res => {
     state.userList = res.rows;
-    state.total = res.total;
   })
 };
 
@@ -353,9 +356,8 @@
 
 const handleSubmit = async (data, type) => {
   const params = JSON.parse(JSON.stringify(data))
-  console.log(params,'para')
-  params.reformDeptName = state.deptList.find(i=>i.deptId == params.reformDeptId)?.deptName
-  params.reformUserName = state.userList.find(i=>i.userId == params.reformUserId)?.userName
+  // params.reformDeptName = state.deptList.find(i=>i.deptId == params.reformDeptId)?.deptName
+  params.reformUserName = state.userList.find(i=>i.userId == params.reformUserId)?.nickName
   // 调用API保存数据
   if (type === '新增') {
     delete params.id
diff --git a/src/views/index.vue b/src/views/index.vue
index 060e812..ac276e8 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -3,7 +3,7 @@
     <div style="margin: 150px 100px;color: #3173ea" class="login-img">
       <div >
         <div style="font-size:50px">欢迎进入</div>
-        <div style="font-size: 35px;margin-top: 20px">安全巡检系统</div>
+        <div style="font-size: 35px;margin-top: 20px">安全检查系统</div>
       </div>
 
     </div>
diff --git a/src/views/login.vue b/src/views/login.vue
index b773057..aad09d1 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -1,13 +1,13 @@
 <template>
   <el-row class="login-panel">
-    <el-col :sm="24" :md="13" class="login-left">
+    <el-col :sm="24" :md="14" class="login-left">
       <div class="login-title">
         <span>中国科学院深海科学与工程研究所</span>
         <br/>
-        安全巡检系统
+        安全检查系统
       </div>
     </el-col>
-    <el-col :sm="24" :md="11" class="login-box">
+    <el-col :sm="24" :md="10" class="login-box">
       <div class="glass-bg"></div>
       <div class="login-card">
         <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
@@ -75,14 +75,16 @@
 import { encrypt, decrypt } from "@/utils/jsencrypt";
 import useUserStore from '@/store/modules/user'
 import { Base64 } from 'js-base64'
+import {ElMessage, ElMessageBox} from "element-plus";
+import { getCheckCount } from "@/api/saftyCheck";
 const userStore = useUserStore()
 const route = useRoute();
 const router = useRouter();
 const { proxy } = getCurrentInstance();
 
 const loginForm = ref({
-  username: "admin",
-  password: "Gkhy@c413",
+  username: "",
+  password: "",
   rememberMe: false,
   code: "",
   uuid: ""
@@ -137,7 +139,26 @@
           }
           return acc;
         }, {});
-        router.push({ path: redirect.value || "/", query: otherQueryParams });
+        if(new Date().getDate() < 25){
+          router.push({ path: redirect.value || "/", query: otherQueryParams })
+          return
+        }
+        getCheckCount().then(res=>{
+          if(res.code == 200 && res.data == 0){
+            ElMessageBox.confirm(
+                '本部门当月未进行安全检查,请先完成安全检查!',
+                '提示',
+                {
+                  confirmButtonText: '安全检查',
+                  cancelButtonText: '取消',
+                  type: 'warning',
+                })
+                .then(() => {router.push({path: '/saftyCheckMng/dailyCheck'})})
+                .catch(() => {router.push({ path: redirect.value || "/", query: otherQueryParams })})
+          }else{
+            router.push({ path: redirect.value || "/", query: otherQueryParams })
+          }
+        })
       }).catch(() => {
         loading.value = false;
         // 重新获取验证码
@@ -223,7 +244,7 @@
     font-family: 'AliMa';
     color: #fff;
     letter-spacing: 10px;
-    font-size: clamp(3rem, 1.286rem + 2.68vw, 4.5rem);
+    font-size: clamp(2rem, 0.286rem + 2.68vw, 3.5rem);
     line-height: 1.2;
     text-shadow: 0 5px 10px rgba(37,99,235,.3);
     margin-bottom: 40px;
@@ -235,9 +256,10 @@
     -ms-opacity: 0;
     animation: show 0.5s 0.7s ease-in-out forwards;
     text-align: center;
+    line-height: 1.5;
 
     span{
-      font-size: clamp(1.375rem, 0.375rem + 1.56vw, 2.25rem)
+      font-size: clamp(2.675rem, 1.65rem + 1.56vw, 3.55rem)
     }
   }
 }
diff --git a/src/views/saftyCheckMng/dailyCheck/index.vue b/src/views/saftyCheckMng/dailyCheck/index.vue
index 18aa4b5..df7b6e2 100644
--- a/src/views/saftyCheckMng/dailyCheck/index.vue
+++ b/src/views/saftyCheckMng/dailyCheck/index.vue
@@ -11,24 +11,51 @@
           >新增</el-button>
         </el-form-item>
         <el-form-item label="被检查部门/研究组:" >
-          <el-select v-model="queryParams.researchGroup" placeholder="请选择" clearable>
-            <el-option
-                v-for="item in deptList"
-                :key="item.deptId"
-                :label="item.deptName"
-                :value="item.deptId">
-            </el-option>
-          </el-select>
+<!--          <el-select v-model="queryParams.researchGroup" placeholder="请选择" clearable>-->
+<!--            <el-option-->
+<!--                v-for="item in deptList"-->
+<!--                :key="item.deptId"-->
+<!--                :label="item.deptName"-->
+<!--                :value="item.deptId">-->
+<!--            </el-option>-->
+<!--          </el-select>-->
+          <el-cascader v-model="queryParams.researchGroup" placeholder="请选择" :options="deptList" :show-all-levels="false" :props="{value: 'deptId',label: 'deptName',children: 'children',emitPath: false,checkStrictly: true}"/>
         </el-form-item>
         <el-form-item label="参加检查人员:" >
           <el-select v-model="queryParams.searchCheckUserId" placeholder="请选择" clearable>
             <el-option
                 v-for="item in userList"
                 :key="item.userId"
-                :label="item.userName"
+                :label="item.nickName"
                 :value="item.userId">
             </el-option>
           </el-select>
+        </el-form-item>
+        <el-form-item label="检查类型:" >
+          <el-select v-model="queryParams.checkType" placeholder="请选择" clearable>
+            <el-option
+                v-for="item in checkTypeList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="隐患:" >
+          <el-select v-model="queryParams.haveMainHazard" placeholder="请选择" clearable>
+            <el-option :key="1" label="有" :value="1"></el-option>
+            <el-option :key="0" label="无" :value="0"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="检查日期:" >
+          <el-date-picker
+              v-model="checkDate"
+              type="daterange"
+              value-format="YYYY-MM-DD"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+          />
         </el-form-item>
         <el-form-item >
           <el-button type="primary" @click="getList">查询</el-button>
@@ -89,11 +116,33 @@
     pageNum: 1,
     pageSize: 10,
     researchGroup: null,
-    searchCheckUserId: null
+    searchCheckUserId: null,
+    checkType: null,
+    haveMainHazard: null,
+    checkBeginDate: '',
+    checkEndDate: ''
   },
   dataList: [],
   deptList: [],
   userList: [],
+  checkTypeList: [
+    {
+      value: 1,
+      label: '综合检查'
+    },
+    {
+      value: 2,
+      label: '部门检查'
+    },
+    {
+      value: 3,
+      label: '实验室自查'
+    },
+    {
+      value: 4,
+      label: '专项检查'
+    }
+  ],
   total: 0,
   formConfig: {
     formItems: [
@@ -115,7 +164,7 @@
         options: () => {
           return state.userList.map(user => ({
             value: user.userId,
-            label: user.userName
+            label: user.nickName
           }))
         }
       },
@@ -134,14 +183,25 @@
       {
         label: '被检查部门/研究组',
         prop: 'researchGroup',
-        type: 'select',
+        type: 'cascader',
+        showAllLevels: false,
+        props: {
+          value: 'deptId',
+          label: 'deptName',
+          children: 'children',
+          emitPath: false,
+          checkStrictly: true
+        },
         rules: [{ required: true, message: '请选择部门', trigger: 'blur' }],
-        options: () => {
-          return state.deptList.map(dept => ({
-            value: dept.deptId,
-            label: dept.deptName
-          }))
-        }
+        options: () => state.deptList
+      },
+      {
+        label: '检查类型',
+        prop: 'checkType',
+        type: 'select',
+        filterable: true,
+        rules: [{ required: true, message: '请选择检查类型', trigger: 'change' }],
+        options: () => state.checkTypeList
       },
       {
         label: '检查内容',
@@ -154,6 +214,7 @@
         label: '存在的主要隐患/问题',
         prop: 'mainHazard',
         type: 'textarea',
+        placeholder: '没有则填“无”',
         autosize: { minRows: 3 },
         rules: [{ required: true, message: '请输入存在的主要隐患/问题', trigger: 'blur' }]
       },
@@ -161,6 +222,7 @@
         label: '整改措施',
         prop: 'rectificationMeasures',
         type: 'textarea',
+        placeholder: '没有则填“无”',
         autosize: { minRows: 3 },
         rules: [{ required: true, message: '请输入整改措施', trigger: 'blur' }]
       },
@@ -168,16 +230,18 @@
         label: '复查结果',
         prop: 'examinationResults',
         type: 'textarea',
-        autosize: { minRows: 3 }
+        autosize: { minRows: 3 },
+        rules: [{ required: true, message: '请输入复查结果', trigger: 'blur' }]
       },
       {
         label: '复查人员',
         prop: 'reCheckUserId',
         type: 'select',
+        rules: [{ required: true, message: '请选择复查人员', trigger: 'blur' }],
         options: () => {
           return state.userList.map(user => ({
             value: user.userId,
-            label: user.userName
+            label: user.nickName
           }))
         }
       },
@@ -186,7 +250,8 @@
         prop: 'reCheckDate',
         type: 'date',
         dateType: 'date',
-        valueFormat: 'YYYY-MM-DD'
+        valueFormat: 'YYYY-MM-DD',
+        rules: [{ required: true, message: '请选择复查时间', trigger: 'blur' }]
       },
       {
         label: '备注',
@@ -197,10 +262,11 @@
     ]
   },
   dataLoader: {},
-  api: {}
+  api: {},
+  checkDate: []
 });
 
-const { queryParams, total, dataList,deptList, userList, formConfig, dataLoader, api } = toRefs(state);
+const { queryParams, total, dataList,deptList, userList, formConfig, dataLoader, api, checkTypeList, checkDate } = toRefs(state);
 onMounted(async ()=>{
   await getList()
   await getDeptList()
@@ -213,19 +279,20 @@
 
 function getDeptList() {
   listDept({}).then(response => {
-    state.deptList = response.data
+    state.deptList = proxy.handleTree(response.data, "deptId")
   });
 }
 
 function getUserList() {
-  listUser().then(res => {
+  listUser({pageNum: 1,pageSize: 999}).then(res => {
     state.userList = res.rows;
-    state.total = res.total;
   })
 };
 
 const getList = async () => {
   loading.value = true
+  state.queryParams.checkBeginDate = state.checkDate[0] || ''
+  state.queryParams.checkEndDate = state.checkDate[1] || ''
   const res = await getDailySafetyInspectList(state.queryParams)
   if(res.code == 200){
     state.dataList = res.rows || []
@@ -263,8 +330,13 @@
     pageNum: 1,
     pageSize: 10,
     researchGroup: null,
-    searchCheckUserId: null
+    searchCheckUserId: null,
+    checkType: null,
+    haveMainHazard: null,
+    checkBeginDate: '',
+    checkEndDate: ''
   }
+  state.checkDate = []
   await getList()
 }
 const handleDelete = (val) => {
@@ -292,11 +364,11 @@
   params.dailySafetyInspectionUsers = params.dailySafetyInspectionUsers.map(item=>{
     return {
       checkUserId: item,
-      checkUser: state.userList.find(i=>i.userId == item)?.userName,
+      checkUser: state.userList.find(i=>i.userId == item)?.nickName,
       dailySafetyInspectionId: params.id
     }
   })
-  params.reCheckUser = state.userList.find(i=>i.userId == params.reCheckUserId)?.userName
+  params.reCheckUser = state.userList.find(i=>i.userId == params.reCheckUserId)?.nickName
   // 调用API保存数据
   if (type === '新增') {
     delete params.id
diff --git a/src/views/saftyCheckMng/securityCheckStatistic/index.vue b/src/views/saftyCheckMng/securityCheckStatistic/index.vue
new file mode 100644
index 0000000..73a0131
--- /dev/null
+++ b/src/views/saftyCheckMng/securityCheckStatistic/index.vue
@@ -0,0 +1,93 @@
+<template>
+  <div class="app-container">
+    <div style="display: flex;justify-content: space-between">
+      <el-form :inline="true" style="display: flex;align-items: center;flex-wrap: wrap;" >
+        <el-form-item label="检查日期:" >
+          <el-date-picker
+              v-model="queryParams.searchDate"
+              type="month"
+              value-format="YYYY-MM"
+              placeholder="请选择"
+          />
+        </el-form-item>
+        <el-form-item >
+          <el-button type="primary" @click="getList">查询</el-button>
+          <el-button type="primary" plain @click="reset">重置</el-button>
+<!--          <el-button type="primary">导出</el-button>-->
+        </el-form-item>
+      </el-form>
+    </div>
+    <!-- 表格数据 -->
+    <el-table v-loading="loading" :data="deptList" :border="true" row-key="deptId" default-expand-all :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
+      <el-table-column prop="deptName" label="部门名称" align="center"></el-table-column>
+      <el-table-column prop="checkCount" label="检查状态" align="center">
+        <template #default="scope">
+          <el-tag v-if="scope.row.checkCount > 0" type="success">已检查</el-tag>
+          <el-tag v-else type="danger">未检查</el-tag>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script setup>
+import {getCurrentInstance, onMounted, onUnmounted, reactive, ref, toRefs} from "vue";
+import {ElMessage, ElMessageBox} from "element-plus";
+import Cookies from "js-cookie";
+import useUserStore from "@/store/modules/user";
+import {listDept} from "@/api/system/dept";
+import {
+  delDailySafetyInspect,
+  getDailySafetyInspectList,
+  getDeptCheckData,
+  saveDailySafetyInspect
+} from "@/api/saftyCheck";
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const dialogRef = ref();
+const state = reactive({
+  queryParams: {
+    searchDate: ''
+  },
+  deptList: [],
+});
+
+const { queryParams,deptList } = toRefs(state);
+onMounted(async ()=>{
+  await getList()
+})
+
+onUnmounted(()=>{
+
+})
+
+function getList() {
+  getDeptCheckData(state.queryParams).then(response => {
+    state.deptList = proxy.handleTree(response.data, "deptId")
+  });
+}
+
+/** 重置新增的表单以及其他数据  */
+const reset= async()=> {
+  state.queryParams = {
+    pageNum: 1,
+    pageSize: 10,
+    researchGroup: null,
+    searchCheckUserId: null,
+    checkType: null,
+    haveMainHazard: null,
+    checkBeginDate: '',
+    checkEndDate: ''
+  }
+  state.checkDate = []
+  await getList()
+}
+
+
+
+
+const handleClose = () => {
+  dialogRef.value.closeDialog()
+}
+
+</script>

--
Gitblit v1.9.2