diff --git a/src/views/inspection/report/index.vue b/src/views/inspection/report/index.vue
index a3b1a65..0c495e2 100644
--- a/src/views/inspection/report/index.vue
+++ b/src/views/inspection/report/index.vue
@@ -16,6 +16,30 @@
+
+
+
+
+
+
+
+
搜索
重置
@@ -77,6 +101,7 @@ import { ref, reactive, toRefs, getCurrentInstance } from "vue";
const showSearch = ref(true);
const { proxy } = getCurrentInstance();
+const { inspection_point_type } = proxy.useDict("inspection_point_type");
// 三套柱状数据:总计 / 本月 / 本日(巡检点统计)
const histogramTotalData = ref({ xAxis: [], seriesData: [] });
@@ -93,26 +118,24 @@ const totalUser = ref(0);
const monthPoint = ref(0);
const monthUser = ref(0);
-// const daterangeOccurTime = ref([]);
+const dateRange = ref([]);
const data = reactive({
queryParams: {
startTime: null,
endTime: null,
inspectionPoint: '',
- inspectorId: ''
+ inspectorId: '',
+ inspectionPointType: null
}
});
const { queryParams } = toRefs(data);
function getList() {
- queryParams.value = {
- inspectionPoint: data.queryParams.inspectionPoint,
- inspectorId: data.queryParams.inspectorId
- };
+ const params = proxy.addDateRange(queryParams.value, dateRange.value);
// 巡检点统计(三合一:总/月/日)
- pointStats3(queryParams.value).then(res => {
+ pointStats3(params).then((res) => {
const d = res.data || {};
const total = d.total || { xAxis: [], seriesData: [] };
const month = d.month || { xAxis: [], seriesData: [] };
@@ -125,7 +148,7 @@ function getList() {
});
// 巡检人统计(三合一:总/月/日)
- inspectorStats3(queryParams.value).then(res=>{
+ inspectorStats3(params).then((res) => {
const d = res.data || {};
inspectorTotalData.value = (d.total || []).map(i=>({ name:i.name, value:i.value }));
inspectorMonthData.value = (d.month || []).map(i=>({ name:i.name, value:i.value }));
@@ -143,6 +166,7 @@ function handleQuery() {
}
function resetQuery() {
+ dateRange.value = [];
proxy.resetForm("queryRef");
handleQuery();
}