|
@@ -1,7 +1,135 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div> </div>
|
|
|
|
|
|
|
+ <div class="safety-platform-container">
|
|
|
|
|
+ <header class="safety-platform-container__header">
|
|
|
|
|
+ <div class="breadcrumb-title"> 违规行为记录 </div>
|
|
|
|
|
+ </header>
|
|
|
|
|
+ <main class="safety-platform-container__main">
|
|
|
|
|
+ <div class="search-table-container">
|
|
|
|
|
+ <header>
|
|
|
|
|
+ <!-- 按钮 -->
|
|
|
|
|
+ <el-button type="primary" class="search-table-container--button" :icon="Plus" @click=""> 新建记录 </el-button>
|
|
|
|
|
+ <el-button plain class="search-table-container--button" @click=""> 批量导入 </el-button>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="act-search">
|
|
|
|
|
+ <section class="select-box">
|
|
|
|
|
+ <SelectableInput :options="ACT_TABLE_SEARCH_OPTIONS" />
|
|
|
|
|
+ <span>违规类型:</span>
|
|
|
|
|
+ <el-select v-model="searchData.actName" placeholder="请选择违规类型" class="select-box--select">
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ <span>通知状态:</span>
|
|
|
|
|
+ <el-select v-model="searchData.status" placeholder="请选择通知状态" class="select-box--select">
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="searchData.actTime"
|
|
|
|
|
+ type="datetimerange"
|
|
|
|
|
+ range-separator="至"
|
|
|
|
|
+ start-placeholder="开始时间"
|
|
|
|
|
+ end-placeholder="结束时间"
|
|
|
|
|
+ />
|
|
|
|
|
+ </section>
|
|
|
|
|
+ <section class="search-btn">
|
|
|
|
|
+ <el-button type="primary" @click="handleSearch">查询</el-button>
|
|
|
|
|
+ <el-button @click="">重置</el-button>
|
|
|
|
|
+ <el-button @click="">导出</el-button>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </header>
|
|
|
|
|
+ <!-- 表格 -->
|
|
|
|
|
+ <BasicTable
|
|
|
|
|
+ :tableConfig="tableConfig"
|
|
|
|
|
+ :tableData="tableData"
|
|
|
|
|
+ @update:pageSize="handleSizeChange"
|
|
|
|
|
+ @update:pageNumber="handleCurrentChange"
|
|
|
|
|
+ >
|
|
|
|
|
+ </BasicTable>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </main>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
-<script setup lang="ts"></script>
|
|
|
|
|
|
|
+<script setup lang="ts">
|
|
|
|
|
+ import BasicTable from '@/components/BasicTable.vue';
|
|
|
|
|
+ import useTableConfig from '@/hooks/useTableConfigHook';
|
|
|
|
|
+ import SelectableInput from '@/components/formItems/selectableInput/SelectableInput.vue';
|
|
|
|
|
+ import { TABLE_OPTIONS, VIOLATION_ACT_TABLE_COLUMNS } from './configs/tables';
|
|
|
|
|
+ import { ACT_TABLE_SEARCH_OPTIONS } from './constants';
|
|
|
|
|
+ import { ref, reactive, onMounted } from 'vue';
|
|
|
|
|
+ import { Search, Plus } from '@element-plus/icons-vue';
|
|
|
|
|
+ import { useRouter } from 'vue-router';
|
|
|
|
|
+
|
|
|
|
|
+ const router = useRouter();
|
|
|
|
|
+
|
|
|
|
|
+ // 搜索栏
|
|
|
|
|
+ const searchData = reactive<any>({
|
|
|
|
|
+ actName: null,
|
|
|
|
|
+ status: null,
|
|
|
|
|
+ actTime: null,
|
|
|
|
|
+ });
|
|
|
|
|
+ function handleSearch() {
|
|
|
|
|
+ // tabelQuery.value.queryParam = {};
|
|
|
|
|
+ // if (searchData.plateNo) {
|
|
|
|
|
+ // tabelQuery.value.queryParam.plateNo = searchData.plateNo;
|
|
|
|
|
+ // }
|
|
|
|
|
+ getTabelData();
|
|
|
|
|
+ }
|
|
|
|
|
+ // 表格
|
|
|
|
|
+ const { tableConfig, pagination } = useTableConfig(VIOLATION_ACT_TABLE_COLUMNS, TABLE_OPTIONS);
|
|
|
|
|
+
|
|
|
|
|
+ const tableData = ref<any[]>([]);
|
|
|
|
|
+
|
|
|
|
|
+ const tabelQuery = ref({
|
|
|
|
|
+ pageNumber: pagination.pageNumber,
|
|
|
|
|
+ pageSize: pagination.pageSize,
|
|
|
|
|
+ queryParam: {},
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ const handleSizeChange = (value: number) => {
|
|
|
|
|
+ pagination.pageSize = value;
|
|
|
|
|
+ tabelQuery.value.pageSize = value;
|
|
|
|
|
+ getTabelData();
|
|
|
|
|
+ };
|
|
|
|
|
+ const handleCurrentChange = (value: number) => {
|
|
|
|
|
+ pagination.pageNumber = value;
|
|
|
|
|
+ tabelQuery.value.pageSize = value;
|
|
|
|
|
+ getTabelData();
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ async function getTabelData() {}
|
|
|
|
|
+
|
|
|
|
|
+ onMounted(async () => {
|
|
|
|
|
+ getTabelData();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ function handleCreateRegulation() {
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ name: 'traffic-regulation-item',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ operate: 'regulation-create',
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+</script>
|
|
|
|
|
|
|
|
-<style scoped></style>
|
|
|
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
|
+ @use '@/styles/page-details-layout.scss' as *;
|
|
|
|
|
+ @use '@/styles/page-main-layout.scss' as *;
|
|
|
|
|
+ @use '@/styles/basic-table-action.scss' as *;
|
|
|
|
|
+ .act-search-input {
|
|
|
|
|
+ max-width: 500px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .act-search {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ .select-box {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
+ gap: 32px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .search-btn {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|