|
@@ -9,20 +9,19 @@
|
|
|
@on-search="handleSearch"
|
|
@on-search="handleSearch"
|
|
|
@on-reset="handleReset"
|
|
@on-reset="handleReset"
|
|
|
/>
|
|
/>
|
|
|
- <el-button type="primary" :icon="Plus" @click="handleAdd">添加</el-button>
|
|
|
|
|
|
|
+ <el-button v-if="hasAddPermission()" type="primary" :icon="Plus" @click="handleAdd">添加</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="table-list">
|
|
<div class="table-list">
|
|
|
<div v-if="showActionBar" class="action-bar">
|
|
<div v-if="showActionBar" class="action-bar">
|
|
|
<span class="num-text">已选{{ chooseNum }}项</span>
|
|
<span class="num-text">已选{{ chooseNum }}项</span>
|
|
|
- <el-button
|
|
|
|
|
- :class="isActiveCancelHide ? 'btn-active' : 'btn-normal'"
|
|
|
|
|
- @click="handleCancelHideAll"
|
|
|
|
|
|
|
+ <el-button :class="isActiveCancelHide ? 'btn-active' : 'btn-normal'" @click="handleCancelHideAll"
|
|
|
>全部生效</el-button
|
|
>全部生效</el-button
|
|
|
>
|
|
>
|
|
|
- <el-button :class="isActiveHide ? 'btn-active' : 'btn-normal'" @click="handleHideAll"
|
|
|
|
|
- >全部失效</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button :class="isActiveDelete ? 'btn-active' : 'btn-normal'" @click="handleDeleteAll"
|
|
|
|
|
|
|
+ <el-button :class="isActiveHide ? 'btn-active' : 'btn-normal'" @click="handleHideAll">全部失效</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="hasDeletePermission()"
|
|
|
|
|
+ :class="isActiveDelete ? 'btn-active' : 'btn-normal'"
|
|
|
|
|
+ @click="handleDeleteAll"
|
|
|
>删除</el-button
|
|
>删除</el-button
|
|
|
>
|
|
>
|
|
|
<span class="close-btn" @click="handleSelectNone"></span>
|
|
<span class="close-btn" @click="handleSelectNone"></span>
|
|
@@ -77,18 +76,17 @@
|
|
|
import Pagination from '../common/Pagination.vue';
|
|
import Pagination from '../common/Pagination.vue';
|
|
|
import AddDrawer from '../common/AddDrawer.vue';
|
|
import AddDrawer from '../common/AddDrawer.vue';
|
|
|
import EditDrawer from '../common/EditDrawer.vue';
|
|
import EditDrawer from '../common/EditDrawer.vue';
|
|
|
|
|
+ import { useUserStore } from '@/store/modules/user';
|
|
|
import { useWorkLocation } from '../../hooks/useWorkLocation';
|
|
import { useWorkLocation } from '../../hooks/useWorkLocation';
|
|
|
import { useIssueMainType } from '../../hooks/useIssueMainType';
|
|
import { useIssueMainType } from '../../hooks/useIssueMainType';
|
|
|
- import {
|
|
|
|
|
- getShowTableData,
|
|
|
|
|
- updateShowTableData,
|
|
|
|
|
- deleteShowTableData,
|
|
|
|
|
- } from '@/api/datamanagement/alert-show';
|
|
|
|
|
|
|
+ import { getShowTableData, updateShowTableData, deleteShowTableData } from '@/api/datamanagement/alert-show';
|
|
|
import { TableQueryForm } from '@/api/datamanagement/alert-default';
|
|
import { TableQueryForm } from '@/api/datamanagement/alert-default';
|
|
|
|
|
+ import { PERM_DATA } from '@/types/permission/constants';
|
|
|
|
|
+
|
|
|
|
|
+ const userStore = useUserStore();
|
|
|
|
|
|
|
|
const { locationOptions, getLocationOptions } = useWorkLocation();
|
|
const { locationOptions, getLocationOptions } = useWorkLocation();
|
|
|
- const { aiMainOptions, manualMainOptions, getAIMainOptions, getManualMainOptions } =
|
|
|
|
|
- useIssueMainType();
|
|
|
|
|
|
|
+ const { aiMainOptions, manualMainOptions, getAIMainOptions, getManualMainOptions } = useIssueMainType();
|
|
|
|
|
|
|
|
const alertTableRef = ref<typeof AlertTable>();
|
|
const alertTableRef = ref<typeof AlertTable>();
|
|
|
const tableData = ref<DataSourceItem[]>([]);
|
|
const tableData = ref<DataSourceItem[]>([]);
|
|
@@ -249,8 +247,7 @@
|
|
|
else hasPreviousRow.value = false;
|
|
else hasPreviousRow.value = false;
|
|
|
if (detailNextRow.value) hasNextRow.value = true;
|
|
if (detailNextRow.value) hasNextRow.value = true;
|
|
|
else hasNextRow.value = false;
|
|
else hasNextRow.value = false;
|
|
|
- if (chooseRow.value.findIndex((item) => item.id === curRow.id) !== -1)
|
|
|
|
|
- detailRowChosen.value = true;
|
|
|
|
|
|
|
+ if (chooseRow.value.findIndex((item) => item.id === curRow.id) !== -1) detailRowChosen.value = true;
|
|
|
else detailRowChosen.value = false;
|
|
else detailRowChosen.value = false;
|
|
|
};
|
|
};
|
|
|
const handleDetail = (row) => {
|
|
const handleDetail = (row) => {
|
|
@@ -345,6 +342,14 @@
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ const hasAddPermission = () => {
|
|
|
|
|
+ return userStore.checkPermission(PERM_DATA.VIOLATION_FAKE_ADD);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ const hasDeletePermission = () => {
|
|
|
|
|
+ return userStore.checkPermission(PERM_DATA.VIOLATION_FAKE_DELETE);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
getTableData();
|
|
getTableData();
|
|
|
});
|
|
});
|