feat : 新增按钮权限

This commit is contained in:
bin
2025-11-06 17:45:39 +08:00
parent 04e52a5681
commit 3953717b60
4 changed files with 11 additions and 11 deletions

View File

@@ -109,7 +109,7 @@ function StorageDetectionList() {
key="view" key="view"
icon={<EyeOutlined />} icon={<EyeOutlined />}
loading={loading} loading={loading}
hidden={!access.hasPerms('storage:detection:view')} hidden={!access.hasPerms('recruitmentDataCollection:jobMonitor:view')}
onClick={() => handleViewDetail(detectionId)} onClick={() => handleViewDetail(detectionId)}
> >
@@ -120,7 +120,7 @@ function StorageDetectionList() {
key="edit" key="edit"
icon={<FormOutlined />} icon={<FormOutlined />}
loading={loading} loading={loading}
hidden={!access.hasPerms('storage:detection:update')} hidden={!access.hasPerms('recruitmentDataCollection:jobMonitor:edit')}
onClick={() => handleEdit(detectionId)} onClick={() => handleEdit(detectionId)}
> >

View File

@@ -137,7 +137,7 @@ function JobIndexList() {
key="view" key="view"
icon={<EyeOutlined />} icon={<EyeOutlined />}
loading={loading} loading={loading}
hidden={!access.hasPerms('jobIndex:view')} hidden={!access.hasPerms('recruitmentDataCollection:metricAdmin:view')}
onClick={() => handleViewDetail(indexId)} onClick={() => handleViewDetail(indexId)}
> >
@@ -148,7 +148,7 @@ function JobIndexList() {
key="edit" key="edit"
icon={<FormOutlined />} icon={<FormOutlined />}
loading={loading} loading={loading}
hidden={!access.hasPerms('jobIndex:update')} hidden={!access.hasPerms('recruitmentDataCollection:metricAdmin:edit')}
onClick={() => handleEdit(indexId)} onClick={() => handleEdit(indexId)}
> >
@@ -159,7 +159,7 @@ function JobIndexList() {
danger danger
key="delete" key="delete"
icon={<DeleteOutlined />} icon={<DeleteOutlined />}
hidden={!access.hasPerms('jobIndex:delete')} hidden={!access.hasPerms('recruitmentDataCollection:metricAdmin:delete')}
onClick={async () => { onClick={async () => {
Modal.confirm({ Modal.confirm({
title: '删除', title: '删除',
@@ -217,7 +217,7 @@ function JobIndexList() {
<Button <Button
type="primary" type="primary"
key="add" key="add"
hidden={!access.hasPerms('jobIndex:add')} hidden={!access.hasPerms('recruitmentDataCollection:metricAdmin:add')}
onClick={async () => { onClick={async () => {
setCurrentRow(undefined); setCurrentRow(undefined);
setModalVisible(true); setModalVisible(true);

View File

@@ -143,7 +143,7 @@ function WebsiteList() {
key="view" key="view"
icon={<EyeOutlined />} icon={<EyeOutlined />}
loading={loading} loading={loading}
hidden={!access.hasPerms('website:view')} hidden={!access.hasPerms('recruitmentDataCollection:sourceManager:view')}
onClick={() => handleViewDetail(websiteId)} onClick={() => handleViewDetail(websiteId)}
> >
@@ -154,7 +154,7 @@ function WebsiteList() {
key="edit" key="edit"
icon={<FormOutlined />} icon={<FormOutlined />}
loading={loading} loading={loading}
hidden={!access.hasPerms('website:update')} hidden={!access.hasPerms('recruitmentDataCollection:sourceManager:edit')}
onClick={() => handleEdit(websiteId)} onClick={() => handleEdit(websiteId)}
> >
@@ -165,7 +165,7 @@ function WebsiteList() {
danger danger
key="delete" key="delete"
icon={<DeleteOutlined />} icon={<DeleteOutlined />}
hidden={!access.hasPerms('website:delete')} hidden={!access.hasPerms('recruitmentDataCollection:sourceManager:delete')}
onClick={async () => { onClick={async () => {
Modal.confirm({ Modal.confirm({
title: '删除', title: '删除',
@@ -223,7 +223,7 @@ function WebsiteList() {
<Button <Button
type="primary" type="primary"
key="add" key="add"
hidden={!access.hasPerms('website:add')} hidden={!access.hasPerms('recruitmentDataCollection:sourceManager:add')}
onClick={async () => { onClick={async () => {
setCurrentRow(undefined); setCurrentRow(undefined);
setModalVisible(true); setModalVisible(true);

View File

@@ -177,7 +177,7 @@ function ResumeList() {
key="view" key="view"
icon={<EyeOutlined />} icon={<EyeOutlined />}
loading={loading} loading={loading}
hidden={!access.hasPerms('appUser:resume:view')} hidden={!access.hasPerms('resumeLibrary:resumeList:view')}
onClick={() => handleViewDetail(userId)} onClick={() => handleViewDetail(userId)}
> >