|
@@ -6,7 +6,7 @@
|
|
|
<main class="safety-platform-container__main">
|
|
<main class="safety-platform-container__main">
|
|
|
<div class="search-table-container">
|
|
<div class="search-table-container">
|
|
|
<header>
|
|
<header>
|
|
|
- <div style="position: relative">
|
|
|
|
|
|
|
+ <div v-if="actManagementPermission" style="position: relative">
|
|
|
<el-button type="primary" class="search-table-container--button" :icon="Plus" @click="handleCreateAct">
|
|
<el-button type="primary" class="search-table-container--button" :icon="Plus" @click="handleCreateAct">
|
|
|
新建记录
|
|
新建记录
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -73,7 +73,7 @@
|
|
|
</header>
|
|
</header>
|
|
|
<!-- 表格 -->
|
|
<!-- 表格 -->
|
|
|
<div class="batch-table">
|
|
<div class="batch-table">
|
|
|
- <div class="batch-operation--div" v-show="trafficManagementPermission && selectionItems.length > 0">
|
|
|
|
|
|
|
+ <div class="batch-operation--div" v-show="actManagementPermission && selectionItems.length > 0">
|
|
|
<span>已选{{ selectionItems.length }}项</span>
|
|
<span>已选{{ selectionItems.length }}项</span>
|
|
|
<div class="batch-operation--div--close">
|
|
<div class="batch-operation--div--close">
|
|
|
<div class="batch-operation--div--button">
|
|
<div class="batch-operation--div--button">
|
|
@@ -155,7 +155,7 @@
|
|
|
import RealtimeNotice from './components/RealtimeNotice.vue';
|
|
import RealtimeNotice from './components/RealtimeNotice.vue';
|
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
import { ElMessage } from 'element-plus';
|
|
import { ElMessage } from 'element-plus';
|
|
|
- import { TABLE_OPTIONS, VIOLATION_ACT_TABLE_COLUMNS } from './configs/tables';
|
|
|
|
|
|
|
+ import { TABLE_OPTIONS, VIOLATION_ACT_TABLE_COLUMNS, VIOLATION_NOTICE_TABLE_COLUMNS } from './configs/tables';
|
|
|
import {
|
|
import {
|
|
|
ACT_NOTICE_DATA_SOURCE_LABEL,
|
|
ACT_NOTICE_DATA_SOURCE_LABEL,
|
|
|
ACT_VIOLATION_TYPE,
|
|
ACT_VIOLATION_TYPE,
|
|
@@ -190,7 +190,7 @@
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
const { permissions } = useUserInfoHook();
|
|
const { permissions } = useUserInfoHook();
|
|
|
- const trafficManagementPermission = ref<Boolean>(
|
|
|
|
|
|
|
+ const actManagementPermission = ref<Boolean>(
|
|
|
Boolean(permissions.find((item: { code: string }) => item.code === ACT_MANAGEMENT_PROMISSION_CODE)),
|
|
Boolean(permissions.find((item: { code: string }) => item.code === ACT_MANAGEMENT_PROMISSION_CODE)),
|
|
|
);
|
|
);
|
|
|
|
|
|
|
@@ -250,7 +250,10 @@
|
|
|
// 表格
|
|
// 表格
|
|
|
const basicTableRef = ref<InstanceType<typeof BasicTable>>();
|
|
const basicTableRef = ref<InstanceType<typeof BasicTable>>();
|
|
|
|
|
|
|
|
- const { tableConfig, pagination } = useTableConfig(VIOLATION_ACT_TABLE_COLUMNS, TABLE_OPTIONS);
|
|
|
|
|
|
|
+ const { tableConfig, pagination } = useTableConfig(
|
|
|
|
|
+ actManagementPermission ? VIOLATION_ACT_TABLE_COLUMNS : VIOLATION_NOTICE_TABLE_COLUMNS,
|
|
|
|
|
+ TABLE_OPTIONS,
|
|
|
|
|
+ );
|
|
|
|
|
|
|
|
const tableData = ref<ActTableData[]>([]);
|
|
const tableData = ref<ActTableData[]>([]);
|
|
|
|
|
|