修复小区背景颜色,巡检点顺序一致,投诉处理按钮
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user