From 6390fa18f5c2df1158a0d664786797b0e8b2fbf9 Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: 星期三, 15 十月 2025 13:10:16 +0800
Subject: [PATCH] 提交
---
src/views/hazardMng/hazardReport/index.vue | 38 ++++++++++++++++++--------------------
1 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/src/views/hazardMng/hazardReport/index.vue b/src/views/hazardMng/hazardReport/index.vue
index 71405d2..99a5ca1 100644
--- a/src/views/hazardMng/hazardReport/index.vue
+++ b/src/views/hazardMng/hazardReport/index.vue
@@ -8,6 +8,7 @@
plain
icon="Plus"
@click="openDialog('add',{})"
+ v-if="isAuthority"
>新增</el-button>
</el-form-item>
<el-form-item label="隐患名称:" >
@@ -123,7 +124,8 @@
hazardSource: null,
hazardLevel: null,
reformDeptId: null,
- reformUserId: null
+ reformUserId: null,
+ hazardsType: 1
},
dataList: [],
deptList: [],
@@ -131,31 +133,19 @@
sourceList: [
{
id: 1,
- name: '日常排查'
+ name: '综合检查'
},
{
id: 2,
- name: '综合性排查'
+ name: '部门检查'
},
{
id: 3,
- name: '专业性排查'
+ name: '实验室自查'
},
{
id: 4,
- name: '季节性排查'
- },
- {
- id: 5,
- name: '重点时段及节假日前排查'
- },
- {
- id: 6,
- name: '外聘专家诊断式排查'
- },
- {
- id: 7,
- name: '其他'
+ name: '专项检查'
}
],
levelList: [
@@ -267,14 +257,21 @@
return res.code === 200 ? res.data : []
}
},
- api: {}
+ api: {},
+ isAuthority: false
});
-const { queryParams, total, dataList, deptList, userList, formConfig, dataLoader, api, sourceList, levelList } = toRefs(state);
+const { queryParams, total, dataList, deptList, userList, formConfig, dataLoader, api, sourceList, levelList, isAuthority } = toRefs(state)
+const userStore = useUserStore()
onMounted(async ()=>{
await getList()
await getDeptList()
await getUserList()
+ if(userStore.roles.includes('admin') || userStore.roles.includes('sys_admin') || userStore.roles.includes('place_safety_officer')){
+ state.isAuthority = true
+ }else{
+ state.isAuthority = false
+ }
})
onUnmounted(()=>{
@@ -330,7 +327,8 @@
hazardSource: null,
hazardLevel: null,
reformDeptId: null,
- reformUserId: null
+ reformUserId: null,
+ hazardsType: 1
}
await getList()
}
--
Gitblit v1.9.2