修复小区背景颜色,巡检点顺序一致,投诉处理按钮
This commit is contained in:
@@ -29,9 +29,14 @@
|
||||
<el-card class="flex-1" shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="1.5">
|
||||
<el-col :span="5">
|
||||
<span style="font-size: 1.2rem">月报列表</span>
|
||||
</el-col>
|
||||
<el-col :span="14"> </el-col>
|
||||
<el-col :span="5" style="text-align: right">
|
||||
<el-button type="warning" @click="exportCurrentPage">导出当前页</el-button>
|
||||
<el-button type="warning" @click="exportAll">导出所有</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
@@ -50,10 +55,8 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Item" lang="ts">
|
||||
import { listItem, type Request } from '@/api/system/Inspection/index';
|
||||
|
||||
import { listItem } from '@/api/system/Inspection';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const itemList = ref<any[]>([]);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
@@ -62,12 +65,13 @@ const total = ref(0);
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
|
||||
const starDate = ref([]);
|
||||
const data = reactive<{
|
||||
queryParams: Request;
|
||||
}>({
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
statDate: '',
|
||||
queryDateEnd: '',
|
||||
queryDateBegin: '',
|
||||
dataType: '3' // 1 日报 3 月报
|
||||
}
|
||||
});
|
||||
@@ -77,6 +81,8 @@ const { queryParams } = toRefs(data);
|
||||
/** 查询巡检项目列表 */
|
||||
const getList = async () => {
|
||||
queryParams.value.statDate = starDate.value.join('-');
|
||||
queryParams.value.queryDateBegin = starDate.value[0];
|
||||
queryParams.value.queryDateEnd = starDate.value[1];
|
||||
loading.value = true;
|
||||
listItem(queryParams.value)
|
||||
.then((res) => {
|
||||
@@ -100,7 +106,25 @@ const resetQuery = () => {
|
||||
starDate.value = [];
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 导出当前页数据 */
|
||||
const exportCurrentPage = () => {
|
||||
proxy?.download(
|
||||
'/inspection/data/export/page',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`巡检月报_${new Date().toLocaleString()}.xlsx`
|
||||
);
|
||||
};
|
||||
const exportAll = () => {
|
||||
proxy?.download(
|
||||
'/inspection/data/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`巡检月报_${new Date().toLocaleString()}.xlsx`
|
||||
);
|
||||
};
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user