巡检日,周,月完成,数据概况待修改

This commit is contained in:
Zy
2026-04-22 16:05:44 +08:00
parent 48852a33ec
commit 04eb40d0e4
55 changed files with 1583 additions and 422 deletions

View File

@@ -1,12 +1,110 @@
<template>
<div class="p-2 h-full flex flex-col">
<div class="h-full flex flex-col p-2">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="选择日期" prop="itemName">
<el-date-picker
v-model="starDate"
type="daterange"
unlink-panels
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
format="YYYY/MM/DD"
value-format="YYYY/MM/DD"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</transition>
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10">
<el-col :span="1.5">
<span style="font-size: 1.2rem">月报列表</span>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
<el-table v-loading="loading" border :data="itemList">
<el-table-column label="日期" width="100" align="center" prop="statDate" />
<el-table-column label="计划巡检任务" width="120" align="center" prop="totalPlans" />
<el-table-column label="按时完成" align="center" prop="completedTasks" />
<el-table-column label="超时完成" align="center" prop="outCompletedTasks" />
<el-table-column label="超时未完成" align="center" prop="outUncompletedTasks" />
<el-table-column label="进行中" align="center" prop="activeTask" />
<el-table-column label="未开始" align="center" prop="pendingTask" />
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-card>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
<script setup name="Item" lang="ts">
import { listItem, type Request } from '@/api/system/Inspection/index';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const itemList = ref<any[]>([]);
const loading = ref(true);
const showSearch = ref(true);
const total = ref(0);
const queryFormRef = ref<ElFormInstance>();
const starDate = ref([]);
const data = reactive<{
queryParams: Request;
}>({
queryParams: {
pageNum: 1,
pageSize: 10,
dataType: '3' // 1 日报 3 月报
}
});
const { queryParams } = toRefs(data);
/** 查询巡检项目列表 */
const getList = async () => {
queryParams.value.statDate = starDate.value.join('-');
loading.value = true;
const res = await listItem(queryParams.value);
itemList.value = res.rows;
total.value = res.total;
loading.value = false;
};
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
};
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
starDate.value = [];
handleQuery();
};
onMounted(() => {
getList();
});
</script>
<style scoped lang="scss"></style>
<style lang="scss" scoped>
.el-table {
height: calc(100% - 80px);
}
</style>