巡检业务统计 界面完成
This commit is contained in:
@@ -66,3 +66,17 @@ export interface Request {
|
|||||||
updateTime?: string;
|
updateTime?: string;
|
||||||
[property: string]: any;
|
[property: string]: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询业务统计
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const list_statapi = (query?: { taskTimeBegin: string; taskTimeEnd: string }): AxiosPromise<any[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/inspection/data/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -31,9 +31,6 @@
|
|||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:item:export']">导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
@@ -45,18 +42,16 @@
|
|||||||
<el-table-column label="状态" width="200" align="center" prop="status">
|
<el-table-column label="状态" width="200" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
@change="(val) => handleChange(val, scope.row.id)"
|
@change="(val: string) => handleChange(val, scope.row.id)"
|
||||||
v-model="scope.row.status"
|
v-model="scope.row.status"
|
||||||
active-value="0"
|
active-value="1"
|
||||||
inactive-value="1"
|
inactive-value="0"
|
||||||
active-text="开启"
|
active-text="关闭"
|
||||||
inactive-text="关闭"
|
inactive-text="开启"
|
||||||
></el-switch>
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="添加人" width="150" align="center" prop="remark" />
|
<el-table-column label="操作" width="300" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<el-table-column label="添加时间" width="150" align="center" prop="remark" />
|
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="修改" placement="top">
|
<el-tooltip content="修改" placement="top">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:item:edit']"></el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:item:edit']"></el-button>
|
||||||
|
|||||||
@@ -45,11 +45,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="任务时间" align="center" prop="taskTime" />
|
<el-table-column label="任务时间" align="center" prop="taskTime" />
|
||||||
<el-table-column label="巡检设置" align="center" prop="inspectSetting">
|
|
||||||
<template #default="scope">
|
|
||||||
<DictTag :options="com_inspection_plan_setting" :value="scope.row.inspectSetting"></DictTag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="计划路线" align="center" prop="routeNames" />
|
<el-table-column label="计划路线" align="center" prop="routeNames" />
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|||||||
@@ -38,9 +38,9 @@
|
|||||||
<el-table v-loading="loading" border :data="pointList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" border :data="pointList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="巡检点名称" align="center" prop="pointName" />
|
<el-table-column label="巡检点名称" align="center" prop="pointName" />
|
||||||
<el-table-column label="打卡方式" align="center" prop="checkModeName">
|
<el-table-column label="打卡方式" align="center" prop="checkMode">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<DictTag :options="com_inspection_point_checkmode" :value="scope.row.checkModeName"></DictTag>
|
<DictTag :options="com_inspection_point_checkmode" :value="scope.row.checkMode"></DictTag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="巡检点位置" align="center" prop="location" />
|
<el-table-column label="巡检点位置" align="center" prop="location" />
|
||||||
@@ -49,7 +49,6 @@
|
|||||||
<DictTag :options="com_inspection_point_status" :value="scope.row.status"></DictTag>
|
<DictTag :options="com_inspection_point_status" :value="scope.row.status"></DictTag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="添加人" align="center" prop="createByName" />
|
|
||||||
<el-table-column label="添加时间" align="center" prop="createTime" />
|
<el-table-column label="添加时间" align="center" prop="createTime" />
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|||||||
@@ -37,19 +37,19 @@
|
|||||||
|
|
||||||
<el-table v-loading="loading" border :data="routeList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" border :data="routeList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="巡检路线名称" align="center" prop="routeName" />
|
<el-table-column label="巡检路线名称" width="220" align="center" prop="routeName" />
|
||||||
<el-table-column label="路线描述" align="center" prop="description" />
|
<el-table-column label="路线描述" align="center" prop="description" />
|
||||||
<el-table-column label="巡检点" align="center" prop="PointsName" show-overflow-tooltip />
|
<el-table-column label="巡检点" align="center" prop="pointNames" show-overflow-tooltip />
|
||||||
<el-table-column label="预计巡检时长" align="center" prop="estimatedTime" />
|
<el-table-column label="预计巡检时长(分钟)" width="140" align="center" prop="estimatedTime" />
|
||||||
<el-table-column label="巡检路线状态" align="center" prop="routeStatus">
|
<el-table-column label="巡检路线状态" width="120" align="center" prop="routeStatus">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="com_inspection_route_status" :value="scope.row.routeStatus"></dict-tag>
|
<dict-tag :options="com_inspection_route_status" :value="scope.row.routeStatus"></dict-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="起点经度" align="center" prop="startLng" />
|
<el-table-column label="起点经度" width="120" align="center" prop="startLng" />
|
||||||
<el-table-column label="起点纬度" align="center" prop="startLat" />
|
<el-table-column label="起点纬度" width="120" align="center" prop="startLat" />
|
||||||
<el-table-column label="终点经度" align="center" prop="endLng" />
|
<el-table-column label="终点经度" width="120" align="center" prop="endLng" />
|
||||||
<el-table-column label="终点纬度" align="center" prop="endLat" />
|
<el-table-column label="终点纬度" width="120" align="center" prop="endLat" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|||||||
@@ -1,12 +1,113 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2 h-full flex flex-col">
|
<div class="p-2 flex flex-col h-full">
|
||||||
<Pageheader></Pageheader>
|
<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" label-width="120px" :inline="true">
|
||||||
|
<el-form-item label="选择日期" prop="checkdata">
|
||||||
|
<el-date-picker
|
||||||
|
range-separator="到"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
value-format="YYYY/MM/DD"
|
||||||
|
format="YYYY/MM/DD"
|
||||||
|
v-model="checkdata"
|
||||||
|
type="daterange"
|
||||||
|
placeholder="选择日期"
|
||||||
|
/>
|
||||||
|
</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" class="mb8">
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" border :data="routeList">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="巡检人员" align="center" prop="inspectorName" show-overflow-tooltip />
|
||||||
|
<el-table-column label="计划巡检任务" align="center" prop="totalTasks" />
|
||||||
|
<el-table-column label="按时完成" align="center" prop="completedTasks">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.completedTasks - scope.row.outCompletedTasks }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="超时完成" align="center" prop="outCompletedTasks" />
|
||||||
|
<el-table-column label="超时未完成" align="center" prop="outUncompletedTasks"></el-table-column>
|
||||||
|
<el-table-column label="进行中" align="center" prop="activeTask" />
|
||||||
|
<el-table-column label="未开始" align="center" prop="pendingTask" />
|
||||||
|
<el-table-column label="完成率" align="center" prop="onTimeRateDisplay" />
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup name="Route" lang="ts">
|
||||||
import { ref } from 'vue';
|
import { list_statapi } from '@/api/system/Inspection';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
|
const routeList = ref<any[]>([]);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
taskTimeBegin: '',
|
||||||
|
taskTimeEnd: ''
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const checkdata = ref([]);
|
||||||
|
|
||||||
|
const { queryParams } = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询巡检路线列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const res = await list_statapi(queryParams.value);
|
||||||
|
routeList.value = res.rows;
|
||||||
|
total.value = res.total;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.taskTimeBegin = checkdata.value[0];
|
||||||
|
queryParams.value.taskTimeEnd = checkdata.value[1];
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
console.log(queryParams.value);
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value?.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style lang="scss" scoped>
|
||||||
|
.el-table {
|
||||||
|
height: calc(100% - 80px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user