修复小区背景颜色,巡检点顺序一致,投诉处理按钮
This commit is contained in:
@@ -29,12 +29,16 @@
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
@@ -50,7 +54,7 @@
|
||||
</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;
|
||||
|
||||
@@ -61,12 +65,12 @@ const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
|
||||
const data = reactive<{
|
||||
queryParams: Request;
|
||||
}>({
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
queryDateEnd: '',
|
||||
queryDateBegin: '',
|
||||
statDate: '',
|
||||
dataType: '1' // 1 日报
|
||||
}
|
||||
@@ -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) => {
|
||||
@@ -101,6 +107,26 @@ const resetQuery = () => {
|
||||
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();
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
@@ -86,6 +86,7 @@ import { Check } from '@element-plus/icons-vue';
|
||||
import MapWrapper from '@/components/Map/index.vue';
|
||||
import { PointVO } from '@/api/system/InspectionPoint/type';
|
||||
import { LngLat } from '@/components/Map/type';
|
||||
import { PlanVO } from '@/api/system/InspectionPlan/type';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_inspection_remind_tiime } = toRefs<any>(proxy?.useDict('com_inspection_remind_tiime'));
|
||||
@@ -167,7 +168,6 @@ async function init() {
|
||||
} else {
|
||||
taskTime.value = [['', '']];
|
||||
}
|
||||
|
||||
handleChangeMap(res.data.routeIds);
|
||||
});
|
||||
}
|
||||
@@ -181,19 +181,24 @@ function outback() {
|
||||
const MapWrapperRef = ref<InstanceType<typeof MapWrapper>>();
|
||||
|
||||
function handleChangeMap(val: string) {
|
||||
if (val) {
|
||||
MapWrapperRef.value.clearMapMarker();
|
||||
const find = playlist.value.find((item) => item.id === val);
|
||||
if (find.points && find.points.length > 0) {
|
||||
find.points.forEach((item: PointVO) => {
|
||||
const angular = item.location.split(',').map(Number).filter(Boolean) as LngLat;
|
||||
MapWrapperRef.value.addMarker_more(angular, item.pointName, item.id);
|
||||
if (!val) return;
|
||||
MapWrapperRef.value.clearMapMarker();
|
||||
const find = playlist.value.find((item) => item.id === val);
|
||||
if (!find) return;
|
||||
if (find.points && find.points.length > 0) {
|
||||
const pointMap = new Map(find.points.map((p) => [p.id, p]));
|
||||
const totalPointsList = find.totalPoints.split(',').filter(Boolean);
|
||||
if (totalPointsList.length > 0) {
|
||||
totalPointsList.forEach((item) => {
|
||||
const findItem = pointMap.get(item);
|
||||
const angular = findItem.location.split(',').map(Number).filter(Boolean) as LngLat;
|
||||
MapWrapperRef.value.addMarker_more(angular, findItem.pointName, findItem.id);
|
||||
});
|
||||
}
|
||||
// 巡检路线
|
||||
if (find.pathPoints) {
|
||||
MapWrapperRef.value.renderSavedPath(find.pathPoints);
|
||||
}
|
||||
}
|
||||
// 巡检路线
|
||||
if (find.pathPoints) {
|
||||
MapWrapperRef.value.renderSavedPath(find.pathPoints);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,22 +69,20 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Plan" lang="ts">
|
||||
import { listPlan, delPlan, changePlanStatus } from '@/api/system/InspectionPlan/index';
|
||||
import { listPlan, delPlan, changePlanStatus } from '@/api/system/InspectionPlan';
|
||||
import { PlanVO, PlanQuery, PlanForm } from '@/api/system/InspectionPlan/type';
|
||||
import { checkPermi } from '@/utils/permission';
|
||||
import { numToWeek } from '@/utils/time';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_inspection_plan_setting } = toRefs<any>(proxy?.useDict('com_inspection_plan_setting'));
|
||||
|
||||
interface planlistType extends PlanVO {
|
||||
interface planListType extends PlanVO {
|
||||
routeNames?: string;
|
||||
inspectorNames?: string;
|
||||
executeDayNames?: number[];
|
||||
}
|
||||
|
||||
const planList = ref<planlistType[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const planList = ref<planListType[]>([]);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
@@ -93,12 +91,6 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const planFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: PlanForm = {
|
||||
id: undefined,
|
||||
@@ -132,7 +124,7 @@ const data = reactive<PageData<PlanForm, PlanQuery>>({
|
||||
rules: {}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
/** 查询巡检计划列表 */
|
||||
const getList = async () => {
|
||||
@@ -154,18 +146,6 @@ const getList = async () => {
|
||||
});
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
planFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
@@ -194,7 +174,7 @@ const handleAdd = () => {
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = (row?: PlanVO) => {
|
||||
const handleUpdate = (row?: PlanVO) => {
|
||||
const _ids = row?.id || ids.value[0];
|
||||
router.push({
|
||||
path: '/inspection/editPlan',
|
||||
@@ -220,17 +200,6 @@ const handleDelete = async (row?: PlanVO) => {
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'system/plan/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`plan_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" label-width="100px" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
|
||||
<el-form-item label="执行状态" prop="statuss">
|
||||
<el-form-item label="执行状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择执行状态" clearable>
|
||||
<el-option v-for="(item, index) in com_inspection_task_status" :key="index" :value="item.value" :label="item.label"></el-option>
|
||||
</el-select>
|
||||
@@ -77,7 +77,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Task" lang="ts">
|
||||
import { listTask, delTask } from '@/api/system/InspectionTask/index';
|
||||
import { listTask, delTask } from '@/api/system/InspectionTask';
|
||||
import { TaskVO, TaskQuery, TaskForm } from '@/api/system/InspectionTask/type';
|
||||
import { checkPermi } from '@/utils/permission';
|
||||
|
||||
@@ -86,7 +86,6 @@ const { com_inspection_task_status } = toRefs<any>(proxy?.useDict('com_inspectio
|
||||
const { com_inspection_remind_tiime } = toRefs<any>(proxy?.useDict('com_inspection_remind_tiime'));
|
||||
const router = useRouter();
|
||||
const taskList = ref<TaskVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
@@ -95,12 +94,6 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const taskFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: TaskForm = {
|
||||
id: undefined,
|
||||
@@ -121,7 +114,7 @@ const data = reactive<PageData<TaskForm, TaskQuery>>({
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
/** 查询巡检任务列表 */
|
||||
const getList = async () => {
|
||||
@@ -136,12 +129,6 @@ const getList = async () => {
|
||||
});
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
taskFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
@@ -169,7 +156,7 @@ const handleAdd = () => {
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: TaskVO) => {
|
||||
const handleUpdate = (row?: TaskVO) => {
|
||||
const _ids = row?.id || ids.value[0];
|
||||
router.push({
|
||||
path: '/inspection/editTask',
|
||||
|
||||
@@ -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,7 +55,7 @@
|
||||
</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;
|
||||
|
||||
@@ -61,12 +66,13 @@ const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
|
||||
const data = reactive<{
|
||||
queryParams: Request;
|
||||
}>({
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
statDate: '',
|
||||
queryDateBegin: '',
|
||||
queryDateEnd: '',
|
||||
dataType: '2' // 1 日报 2 周报 3 月报
|
||||
}
|
||||
});
|
||||
@@ -76,6 +82,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) => {
|
||||
@@ -99,7 +107,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