From 65e371d16e554263feba8d3d4aa658ef545d136d Mon Sep 17 00:00:00 2001
From: FLL <2162874245@qq.com>
Date: Wed, 6 Aug 2025 14:09:26 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E5=AE=A2=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../workOrders/workOrders-modal.vue | 32 ++++---
.../inspectionRoute/data.ts | 14 +---
.../inspectionRoute/inspectionRoute-modal.vue | 60 ++++++-------
.../inspectionRoute/point-modal.vue | 8 +-
.../inspectionRoute/pointSetting-modal.vue | 84 -------------------
5 files changed, 46 insertions(+), 152 deletions(-)
delete mode 100644 apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/pointSetting-modal.vue
diff --git a/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue b/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue
index a641283f..5ccdda93 100644
--- a/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue
+++ b/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue
@@ -61,7 +61,7 @@ const [BasicModal, modalApi] = useVbenModal({
return null;
}
modalApi.modalLoading(true);
- await queryPersonData()
+ await queryWorkOrdersType()
const {id} = modalApi.getData() as { id?: number | string };
isUpdate.value = !!id;
@@ -106,34 +106,30 @@ async function handleClosed() {
resetInitialized();
}
-async function queryPersonData() {
+async function queryWorkOrdersType() {
let params = {
pageSize: 1000,
- pageNum: 1,
+ pageNum: 1
}
- const res = await personList(params);
- const options = res.rows.map((user) => ({
- label: user.userName + '-' + renderDictValue(user.gender, 'sys_user_sex') + '-' + user.phone,
- value: user.id,
+ const res = await tree(params)
+ const options = res.rows.map((item) => ({
+ label: item.orderTypeName,
+ value: item.id,
}));
formApi.updateSchema([{
componentProps: () => ({
options: options,
+ filterOption: filterOption,
showSearch:true,
- filterOption: filterOption
}),
- fieldName: 'initiatorName',
- },
- {
- componentProps: () => ({
- options: options,
- showSearch:true,
- filterOption: filterOption
- }),
- fieldName: 'handler',
- }])
+ fieldName: 'type',
+ }])
}
+const filterOption = (input: string, option: any) => {
+ return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+};
+
diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/data.ts b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/data.ts
index d23729f4..74b8202d 100644
--- a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/data.ts
+++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/data.ts
@@ -83,7 +83,7 @@ export const columnsPoint: VxeGridProps['columns'] = [
},
{
title: '巡检点名称',
- field: 'createTime',
+ field: 'pointName',
},
{
field: 'action',
@@ -111,18 +111,6 @@ export const modalSchemaPoint: FormSchemaGetter = () => [
component: 'ApiSelect',
componentProps: {},
},
-];
-
-export const modalSchemaPointSetting: FormSchemaGetter = () => [
- {
- label: '主键id',
- fieldName: 'id',
- component: 'Input',
- dependencies: {
- show: () => false,
- triggerFields: [''],
- },
- },
{
label: '开始时间',
fieldName: 'startTime',
diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/inspectionRoute-modal.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/inspectionRoute-modal.vue
index 44ec3c5d..8774d670 100644
--- a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/inspectionRoute-modal.vue
+++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/inspectionRoute-modal.vue
@@ -1,5 +1,5 @@
@@ -229,7 +220,6 @@ const handlePoint = (data) => {
-
diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/point-modal.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/point-modal.vue
index 2766caba..c21b83c9 100644
--- a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/point-modal.vue
+++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/point-modal.vue
@@ -2,15 +2,18 @@
import { useVbenModal } from '@vben/common-ui';
import { cloneDeep } from '@vben/utils';
import { useVbenForm } from '#/adapter/form';
-import { inspectionRouteAdd, inspectionRouteInfo } from '#/api/property/inspectionManagement/inspectionRoute';
+import { inspectionRouteInfo } from '#/api/property/inspectionManagement/inspectionRoute';
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
import {
inspectionPointList,
} from '#/api/property/inspectionManagement/inspectionPoint';
import { modalSchemaPoint } from './data';
+import {ref} from "vue";
const emit = defineEmits<{ reload: [] }>();
+const isUpdate = ref(false);
+
const [BasicForm, formApi] = useVbenForm({
commonConfig: {
formItemClass: 'col-span-2',
@@ -44,8 +47,9 @@ const [BasicModal, modalApi] = useVbenModal({
modalApi.modalLoading(true);
await queryWorkOrdersType()
const { id } = modalApi.getData() as { id?: number | string };
+ isUpdate.value = !!id;
- if (id) {
+ if (isUpdate.value && id) {
const record = await inspectionRouteInfo(id);
await formApi.setValues(record);
}
diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/pointSetting-modal.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/pointSetting-modal.vue
deleted file mode 100644
index f7ed3180..00000000
--- a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/pointSetting-modal.vue
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
-
-
-