|
@@ -1,7 +1,94 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div> this is disaster control page </div>
|
|
|
|
|
|
|
+ <div class="disaster-precaution-container">
|
|
|
|
|
+ <header class="header">
|
|
|
|
|
+ <span class="title">灾后处置清单</span>
|
|
|
|
|
+ </header>
|
|
|
|
|
+ <main class="main">
|
|
|
|
|
+ <div class="disaster-control-container">
|
|
|
|
|
+ <header class="disaster-control__header">
|
|
|
|
|
+ <el-button type="primary" class="disaster-control__header-button" :icon="Plus">创建灾害处置单</el-button>
|
|
|
|
|
+ <Search />
|
|
|
|
|
+ </header>
|
|
|
|
|
+ <BasicTable :table-config="tableConfig" :table-data="tableData"> </BasicTable>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </main>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
-<script lang="ts" setup></script>
|
|
|
|
|
|
|
+<script lang="ts" setup>
|
|
|
|
|
+ import { ref } from 'vue';
|
|
|
|
|
+ import { Plus } from '@element-plus/icons-vue';
|
|
|
|
|
+ import Search from './src/components/Search.vue';
|
|
|
|
|
+ import BasicTable from '@/components/BasicTable.vue';
|
|
|
|
|
+ import type { TableColumnProps } from '@/types/basic-table';
|
|
|
|
|
+ import useTableConfig from '@/hooks/useTableConfigHook';
|
|
|
|
|
+ const tableData = ref<any[]>([]);
|
|
|
|
|
+ const columns: TableColumnProps[] = [
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'disasterType',
|
|
|
|
|
+ label: '灾害类型',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'disasterLevel',
|
|
|
|
|
+ label: '等级',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'startTime',
|
|
|
|
|
+ label: '开始时间',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'endTime',
|
|
|
|
|
+ label: '结束时间',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'disasterMaterial',
|
|
|
|
|
+ label: '处置材料',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ slot: 'disasterMaterial',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'shouldCompleteTime',
|
|
|
|
|
+ label: '应完成时间',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ slot: 'shouldCompleteTime',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'activeStatus',
|
|
|
|
|
+ label: '生效状态',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ slot: 'activeStatus',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'action',
|
|
|
|
|
+ label: '操作',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ slot: 'action',
|
|
|
|
|
+ width: '250cpx',
|
|
|
|
|
+ fixed: 'right',
|
|
|
|
|
+ },
|
|
|
|
|
+ ];
|
|
|
|
|
+ const options = {
|
|
|
|
|
+ emptyText: '暂无数据',
|
|
|
|
|
+ height: '64vh',
|
|
|
|
|
+ loading: true,
|
|
|
|
|
+ stripe: true,
|
|
|
|
|
+ };
|
|
|
|
|
+ const { tableConfig, pagination } = useTableConfig(columns, options);
|
|
|
|
|
+</script>
|
|
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+ @use '../style/disaster.scss' as *;
|
|
|
|
|
+ .disaster-control__header-button {
|
|
|
|
|
+ font-size: 14cpx;
|
|
|
|
|
+ margin-bottom: 20cpx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .disaster-control-container{
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ gap: 20cpx;
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|