From 8dee11802ecce412068851af1f7a44dbe27cf412 Mon Sep 17 00:00:00 2001
From: fyy <2717885210@qq.com>
Date: Tue, 15 Jul 2025 10:58:17 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=20fix:=20=E4=BF=AE=E5=A4=8D=E4=BF=9D?=
=?UTF-8?q?=E6=B4=81=E8=AE=A2=E5=8D=95=E7=BB=93=E6=9D=9F=E6=97=B6=E9=97=B4?=
=?UTF-8?q?=E8=83=BD=E6=97=A9=E4=BA=8E=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4?=
=?UTF-8?q?bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/property/clean/cleanOrders/data.ts | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/data.ts b/apps/web-antd/src/views/property/clean/cleanOrders/data.ts
index 2a37486f..78f6337f 100644
--- a/apps/web-antd/src/views/property/clean/cleanOrders/data.ts
+++ b/apps/web-antd/src/views/property/clean/cleanOrders/data.ts
@@ -4,7 +4,7 @@ import type { VxeGridProps } from '#/adapter/vxe-table';
import { resident_unitList } from '#/api/property/resident/unit';
import { useCleanStore } from '#/store';
import type { FormSchema } from '../../../../../../../packages/@core/ui-kit/form-ui/src/types';
-
+import dayjs from 'dayjs';
const cleanStore = useCleanStore();
export const querySchema: (areaList: any[]) => FormSchema[] = (areaList) => [
@@ -163,12 +163,21 @@ export const modalSchema: FormSchemaGetter = () => [
label: '结束时间',
fieldName: 'endTime',
component: 'DatePicker',
- componentProps: {
+ componentProps: (values) => ({
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
- placeholder: '请选择结束时间',
- },
+ placeholder: !values.starTime?'请先选择开始时间':`请选择结束时间(结束时间不能早于开始时间)`,
+ disabled: !values.starTime, // 没选开始时间时禁用
+ disabledDate: (current:any) => {
+ if (!values.starTime) return false;
+ // 只允许选择大于等于开始时间的日期
+ return current && current < dayjs(values.starTime).startOf('second');
+ },
+ }),
rules: 'required',
+ dependencies: {
+ triggerFields: ['starTime'],
+ },
},
{
label: '申请人',
From 8e361c6b59b096a654289615b4a1c1ba772582c2 Mon Sep 17 00:00:00 2001
From: dev_ljl <2590379346@qq.com>
Date: Tue, 15 Jul 2025 15:39:58 +0800
Subject: [PATCH 2/6] =?UTF-8?q?1=E3=80=81=E5=B7=A1=E6=A3=80=E6=98=8E?=
=?UTF-8?q?=E7=BB=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../inspectionPlan/model.d.ts | 23 +--
.../inspectionDetails/data.ts | 160 ++++++++++++++++++
.../inspectionDetails/index.vue | 113 +++++++++++++
.../inspectionDetails-modal.vue | 101 +++++++++++
.../inspectionPlan/inspectionPlan-modal.vue | 55 +++---
5 files changed, 414 insertions(+), 38 deletions(-)
create mode 100644 apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/data.ts
create mode 100644 apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/index.vue
create mode 100644 apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/inspectionDetails-modal.vue
diff --git a/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts b/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts
index 983e43fe..56008843 100644
--- a/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts
+++ b/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts
@@ -59,7 +59,7 @@ export interface InspectionPlanVO {
/**
* 选择员工
*/
- userId: string | number;
+ userId: string;
/**
* 备注
@@ -74,21 +74,22 @@ export interface InspectionPlanVO {
/**
* 巡检月
*/
- inspectionMonth?:string;
+ inspectionMonth?: string;
/**
* 巡检日
*/
- inspectionDay?:string;
+ inspectionDay?: string;
/**
* 巡检周
*/
- inspectionWorkday?:string;
+ inspectionWorkday?: string;
/**
* 状态
*/
- state?:string
+ state?: string
+ inspectionPlanStaffVoList?: any[]
}
export interface InspectionPlanForm extends BaseEntity {
@@ -159,15 +160,15 @@ export interface InspectionPlanForm extends BaseEntity {
/**
* 巡检月
*/
- inspectionMonth?:string;
+ inspectionMonth?: string;
/**
* 巡检日
*/
- inspectionDay?:string;
+ inspectionDay?: string;
/**
* 巡检周
*/
- inspectionWorkday?:string;
+ inspectionWorkday?: string;
}
@@ -234,13 +235,13 @@ export interface InspectionPlanQuery extends PageQuery {
/**
* 巡检月
*/
- inspectionMonth?:string;
+ inspectionMonth?: string;
/**
* 巡检日
*/
- inspectionDay?:string;
+ inspectionDay?: string;
/**
* 巡检周
*/
- inspectionWorkday?:string;
+ inspectionWorkday?: string;
}
diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/data.ts b/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/data.ts
new file mode 100644
index 00000000..679a5ade
--- /dev/null
+++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/data.ts
@@ -0,0 +1,160 @@
+import type { FormSchemaGetter } from '#/adapter/form';
+import type { VxeGridProps } from '#/adapter/vxe-table';
+import {renderDict} from "#/utils/render";
+import {getDictOptions} from "#/utils/dict";
+
+1
+
+
+export const querySchema: FormSchemaGetter = () => [
+ {
+ component: 'Input',
+ fieldName: 'actUserId',
+ label: '当前巡检人',
+ },
+ {
+ component: 'Select',
+ componentProps: {
+ options:getDictOptions('wy_xjqdfs')
+ },
+ fieldName: 'taskType',
+ label: '巡检方式',
+ },
+];
+
+export const columns: VxeGridProps['columns'] = [
+ { type: 'checkbox', width: 60 },
+ {
+ title: '任务编号',
+ field: 'id',
+ width:'auto'
+ },
+ {
+ title: '巡检计划',
+ field: 'planName',
+ minWidth:200
+ },
+ {
+ title: '巡检时间范围',
+ field: 'planInsTime',
+ width:'auto'
+
+ },
+ // {
+ // title: '实际巡检时间',
+ // field: 'endDate',
+ // width:180
+ //
+ // },
+ {
+ title: '签到状态',
+ field: 'actInsTime',
+ width:150,
+ },
+ {
+ title: '巡检人',
+ field: 'planUserName',
+ width:'auto'
+
+ },
+ {
+ title: '巡检方式',
+ field: 'taskType',
+ width:'auto',
+ slots: {
+ default: ({ row }) => {
+ return renderDict(row.taskType, 'wy_xjqdfs');
+ },
+ },
+ },
+ {
+ title: '巡检状态',
+ field: 'status',
+ width:100,
+ slots: {
+ default: ({ row }) => {
+ return renderDict(row.taskType, 'wy_xjqdfs');
+ },
+ },
+ },
+ {
+ title: '巡检照片',
+ field: 'remark',
+ width:120
+ },
+ // {
+ // field: 'action',
+ // fixed: 'right',
+ // slots: { default: 'action' },
+ // title: '操作',
+ // width: 120,
+ // },
+];
+
+export const modalSchema: FormSchemaGetter = () => [
+ {
+ label: '主键id',
+ fieldName: 'id',
+ component: 'Input',
+ dependencies: {
+ show: () => false,
+ triggerFields: [''],
+ },
+ },
+ {
+ label: '巡检计划',
+ fieldName: 'planName',
+ component: 'Input',
+ },
+ {
+ label: '巡检开始日期',
+ fieldName: 'startDate',
+ component: 'Input',
+ },
+ {
+ label: '巡检结束日期',
+ fieldName: 'endDate',
+ component: 'Input',
+ },
+ {
+ label: '实际巡检时间',
+ fieldName: 'actInsTime',
+ component: 'DatePicker',
+ componentProps: {
+ showTime: true,
+ format: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ },
+ },
+ {
+ label: '当前巡检人',
+ fieldName: 'actUserId',
+ component: 'Input',
+ },
+ {
+ label: '巡检方式',
+ fieldName: 'taskType',
+ component: 'Select',
+ componentProps: {
+ },
+ },
+ {
+ label: '转移描述',
+ fieldName: 'transferDesc',
+ component: 'Textarea',
+ },
+ {
+ label: '巡检状态',
+ fieldName: 'status',
+ component: 'RadioGroup',
+ componentProps: {
+ buttonStyle: 'solid',
+ optionType: 'button',
+ },
+ },
+ {
+ label: '备注',
+ fieldName: 'remark',
+ component: 'Input',
+ },
+];
diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/index.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/index.vue
new file mode 100644
index 00000000..28e6325c
--- /dev/null
+++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/index.vue
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+ {{ $t('pages.common.export') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/inspectionDetails-modal.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/inspectionDetails-modal.vue
new file mode 100644
index 00000000..b1d11246
--- /dev/null
+++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/inspectionDetails-modal.vue
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionPlan/inspectionPlan-modal.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionPlan/inspectionPlan-modal.vue
index a7218266..bbd5bab6 100644
--- a/apps/web-antd/src/views/property/inspectionManagement/inspectionPlan/inspectionPlan-modal.vue
+++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionPlan/inspectionPlan-modal.vue
@@ -68,14 +68,14 @@ const [BasicModal, modalApi] = useVbenModal({
if (isUpdate.value && id) {
const record = await inspectionPlanInfo(id);
record.planDate = [record.startDate, record.endDate]
- if(record.inspectionPlanPeriod=='1'){
- record.inspectionMonth=record.inspectionMonth?.split(',')
- record.inspectionDay=record.inspectionDay?.split(',')
- }else {
- record.inspectionWorkday=record.inspectionWorkday?.split(',')
+ if (record.inspectionPlanPeriod == '1') {
+ record.inspectionMonth = record.inspectionMonth?.split(',')
+ record.inspectionDay = record.inspectionDay?.split(',')
+ } else {
+ record.inspectionWorkday = record.inspectionWorkday?.split(',')
}
- if(record.inspectionPlanStaffVoList&&record.inspectionPlanStaffVoList.length){
- record.userId=record.inspectionPlanStaffVoList.map(item=>item.userId)
+ if (record.inspectionPlanStaffVoList && record.inspectionPlanStaffVoList.length) {
+ record.userId = record.inspectionPlanStaffVoList.map(item => item.userId)
}
await formApi.setValues(record);
}
@@ -97,28 +97,28 @@ async function handleConfirm() {
if (data.planDate && data.planDate.length) {
data.startDate = data.planDate[0]
data.endDate = data.planDate[1]
- data.startTime=data.planDate[0]?.split(' ')[1]
- data.endTime=data.planDate[1]?.split(' ')[1]
+ data.startTime = data.planDate[0]?.split(' ')[1]
+ data.endTime = data.planDate[1]?.split(' ')[1]
}
- if(data.inspectionPlanPeriod=='1'){
- data.inspectionMonth=data.inspectionMonth?.join(',')
- data.inspectionDay=data.inspectionDay?.join(',')
- data.inspectionWorkday=undefined
- }else {
- data.inspectionWorkday=data.inspectionWorkday?.join(',')
- data.inspectionMonth=undefined
- data.inspectionDay=undefined
+ if (data.inspectionPlanPeriod == '1') {
+ data.inspectionMonth = data.inspectionMonth?.join(',')
+ data.inspectionDay = data.inspectionDay?.join(',')
+ data.inspectionWorkday = undefined
+ } else {
+ data.inspectionWorkday = data.inspectionWorkday?.join(',')
+ data.inspectionMonth = undefined
+ data.inspectionDay = undefined
}
- if(data.userId){
- data.inspectionPlanStaffBoList=[]
- data.userId.forEach(item=>
+ if (data.userId) {
+ data.inspectionPlanStaffBoList = []
+ data.userId.forEach((item: any) => {
data.inspectionPlanStaffBoList.push({
- userId:item,
- startTime:data.startDate,
- endTime:data.endDate
- }))
+ userId: item,
+ startTime: data.startDate,
+ endTime: data.endDate
+ })
+ })
}
- // data.userId=data.userId?.join(',')
await (isUpdate.value ? inspectionPlanUpdate(data) : inspectionPlanAdd(data));
resetInitialized();
emit('reload');
@@ -143,7 +143,7 @@ async function queryPersonData() {
const res = await personList(params);
const options = res.rows.map((user) => ({
label: user.userName + '-' + renderDictValue(user.gender, 'sys_user_sex')
- + '-' + user.phone+'-'+user.unitName,
+ + '-' + user.phone + '-' + user.unitName,
value: user.id,
}));
formApi.updateSchema([{
@@ -200,12 +200,13 @@ const filterOption = (input: string, option: any) => {
From b6ea9bc5bb95c0e6d33e5d8a41c9b38bc2b19bdc Mon Sep 17 00:00:00 2001
From: fyy <2717885210@qq.com>
Date: Tue, 15 Jul 2025 16:45:51 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=20fix:=20=E4=BF=AE=E5=A4=8D=E7=BB=BF?=
=?UTF-8?q?=E6=A4=8D=E7=A7=9F=E8=B5=81=E5=8F=AF=E9=80=89=E5=A4=9A=E6=AC=A1?=
=?UTF-8?q?=E7=9B=B8=E5=90=8C=E4=BA=A7=E5=93=81bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../rentalPlan-detial-modal.vue | 32 +++++++++++++++----
.../rentalPlan-modal.vue | 8 +++--
2 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-detial-modal.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-detial-modal.vue
index f7af2e4f..44edba3b 100644
--- a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-detial-modal.vue
+++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-detial-modal.vue
@@ -26,6 +26,9 @@ const title = computed(() => {
let plantListData: any[] = [];
const detailIndex = ref();//传index对应详情的某条数据,对该条数据进行编辑修改
+// 新增:接收已选产品id
+const selectedIds = ref([]);
+
// 添加数量最大值
const productNumMax = ref(0);
@@ -39,7 +42,9 @@ const detailSchema = [
api: async () => {
const res = await plantsProductList({state:1,inventory:0});
plantListData = res.rows || [];
- return res;
+ // 过滤掉已选产品
+ const filtered = plantListData.filter(item => !selectedIds.value.includes(item.id));
+ return { ...res, rows: filtered };
},
resultField: 'rows',
labelField: 'plantName',
@@ -82,6 +87,7 @@ const detailSchema = [
componentProps: {
min: 1,
max: productNumMax,
+ disabled: isView,
},
rules: 'required',
},
@@ -197,19 +203,25 @@ const [BasicModal, modalApi] = useVbenModal({
}
modalApi.modalLoading(true);
const data = modalApi.getData();
- detailIndex.value = modalApi.getData().index;
- if(!data || Object.keys(data).length === 0){
- //modalApi.getData()为空时表示添加
- isAdd.value = true;
- }else if(data.readonly){
+ console.log(data);
+
+ detailIndex.value = data.index;
+ // 新增:弹窗打开时同步 selectedIds
+ selectedIds.value = data.selectedIds || [];
+ if(data.readonly){
//不存在detailIndex.value时表示查看
isView.value = true;
+ } else if(data.add){
+ //modalApi.getData()为空时表示添加
+ isAdd.value = true;
+ console.log(123);
+
}else{
//表示编辑
isUpdate.value = true;
}
// TODO: 获取详情数据
- await formApi.setValues(modalApi.getData());
+ await formApi.setValues(data);
await markInitialized();
modalApi.modalLoading(false);
},
@@ -223,6 +235,8 @@ async function handleConfirm() {
return;
}
const data = cloneDeep(await formApi.getValues());
+ console.log(data);
+
// 获取选中的产品
const selectedService = plantListData.find(item => item.id === data.plantName);
if (selectedService) {
@@ -231,8 +245,12 @@ async function handleConfirm() {
}
if (isUpdate.value) {
data.index = detailIndex.value;
+ console.log(data);
+
emit('editReload', data);
}else if(isAdd.value){
+ console.log(12);
+
emit('reload', data);
}
handleClosed()
diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue
index b6a9a9c2..59cc2dc3 100644
--- a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue
+++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue
@@ -146,7 +146,9 @@ const detailColumns = [
},
];
function handleAddDetail() {
- detailModalApi.setData({});
+ // 传递已选产品id列表
+ const selectedIds = detailTable.value.map((item: any) => item.productId || item.plantName);
+ detailModalApi.setData({ selectedIds,add:true });
detailModalApi.open();
}
//添加植物组合包产品
@@ -169,7 +171,9 @@ function handleViewDetail(record: any) {
}
// 编辑产品详情
function handleEditDetail(record: any, index: number) {
- detailModalApi.setData({ ...record, index, readonly: false });
+ // 编辑时,排除当前项id
+ const selectedIds = detailTable.value.filter((_: any, i: number) => i !== index).map((item: any) => item.productId || item.plantName);
+ detailModalApi.setData({ ...record, index, selectedIds,edit:true });
detailModalApi.open();
}
//分类字典
From 0c71c9193b941fae3014d740b46f85cbb2b55543 Mon Sep 17 00:00:00 2001
From: fyy <2717885210@qq.com>
Date: Tue, 15 Jul 2025 16:47:20 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=20fix:=20=E5=88=A0=E9=99=A4=E5=A4=9A?=
=?UTF-8?q?=E4=BD=99=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../leasePogramManagement/rentalPlan-detial-modal.vue | 10 ----------
.../leasePogramManagement/rentalPlan-modal.vue | 1 -
2 files changed, 11 deletions(-)
diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-detial-modal.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-detial-modal.vue
index 44edba3b..166637b5 100644
--- a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-detial-modal.vue
+++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-detial-modal.vue
@@ -203,8 +203,6 @@ const [BasicModal, modalApi] = useVbenModal({
}
modalApi.modalLoading(true);
const data = modalApi.getData();
- console.log(data);
-
detailIndex.value = data.index;
// 新增:弹窗打开时同步 selectedIds
selectedIds.value = data.selectedIds || [];
@@ -214,8 +212,6 @@ const [BasicModal, modalApi] = useVbenModal({
} else if(data.add){
//modalApi.getData()为空时表示添加
isAdd.value = true;
- console.log(123);
-
}else{
//表示编辑
isUpdate.value = true;
@@ -235,8 +231,6 @@ async function handleConfirm() {
return;
}
const data = cloneDeep(await formApi.getValues());
- console.log(data);
-
// 获取选中的产品
const selectedService = plantListData.find(item => item.id === data.plantName);
if (selectedService) {
@@ -245,12 +239,8 @@ async function handleConfirm() {
}
if (isUpdate.value) {
data.index = detailIndex.value;
- console.log(data);
-
emit('editReload', data);
}else if(isAdd.value){
- console.log(12);
-
emit('reload', data);
}
handleClosed()
diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue
index 59cc2dc3..a2cd6167 100644
--- a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue
+++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue
@@ -72,7 +72,6 @@ const [BasicModal, modalApi] = useVbenModal({
// 后端返回绿植产品包列表结构处理
// detailTable.value = record.productList.map((item:any) => {...item.product,item.productNum,});
detailTable.value = record.productList.map((item: any) => ({ ...item.product, productNum: item.productNum,productId: item.productId }));
- // console.log(detailTable.value);
await formApi.setValues(record);
}
From 8052d3d63d067ef62084f282390cdd1886bacbde Mon Sep 17 00:00:00 2001
From: FLL <2162874245@qq.com>
Date: Tue, 15 Jul 2025 17:31:12 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../deviceLocation/index.ts | 61 ++++++
.../deviceLocation/model.d.ts | 84 ++++++++
.../deviceLocation/data.ts | 96 +++++++++
.../deviceLocation/deviceLocation-modal.vue | 101 ++++++++++
.../deviceLocation/index.vue | 182 ++++++++++++++++++
5 files changed, 524 insertions(+)
create mode 100644 apps/web-antd/src/api/property/equipmentManagement/deviceLocation/index.ts
create mode 100644 apps/web-antd/src/api/property/equipmentManagement/deviceLocation/model.d.ts
create mode 100644 apps/web-antd/src/views/property/equipmentManagement/deviceLocation/data.ts
create mode 100644 apps/web-antd/src/views/property/equipmentManagement/deviceLocation/deviceLocation-modal.vue
create mode 100644 apps/web-antd/src/views/property/equipmentManagement/deviceLocation/index.vue
diff --git a/apps/web-antd/src/api/property/equipmentManagement/deviceLocation/index.ts b/apps/web-antd/src/api/property/equipmentManagement/deviceLocation/index.ts
new file mode 100644
index 00000000..e9096c27
--- /dev/null
+++ b/apps/web-antd/src/api/property/equipmentManagement/deviceLocation/index.ts
@@ -0,0 +1,61 @@
+import type { DeviceLocationVO, DeviceLocationForm, DeviceLocationQuery } from './model';
+
+import type { ID, IDS } from '#/api/common';
+import type { PageResult } from '#/api/common';
+
+import { commonExport } from '#/api/helper';
+import { requestClient } from '#/api/request';
+
+/**
+* 查询设备位置列表
+* @param params
+* @returns 设备位置列表
+*/
+export function deviceLocationList(params?: DeviceLocationQuery) {
+ return requestClient.get>('/property/deviceLocation/list', { params });
+}
+
+/**
+ * 导出设备位置列表
+ * @param params
+ * @returns 设备位置列表
+ */
+export function deviceLocationExport(params?: DeviceLocationQuery) {
+ return commonExport('/property/deviceLocation/export', params ?? {});
+}
+
+/**
+ * 查询设备位置详情
+ * @param id id
+ * @returns 设备位置详情
+ */
+export function deviceLocationInfo(id: ID) {
+ return requestClient.get(`/property/deviceLocation/${id}`);
+}
+
+/**
+ * 新增设备位置
+ * @param data
+ * @returns void
+ */
+export function deviceLocationAdd(data: DeviceLocationForm) {
+ return requestClient.postWithMsg('/property/deviceLocation', data);
+}
+
+/**
+ * 更新设备位置
+ * @param data
+ * @returns void
+ */
+export function deviceLocationUpdate(data: DeviceLocationForm) {
+ return requestClient.putWithMsg('/property/deviceLocation', data);
+}
+
+/**
+ * 删除设备位置
+ * @param id id
+ * @returns void
+ */
+export function deviceLocationRemove(id: ID | IDS) {
+ return requestClient.deleteWithMsg(`/property/deviceLocation/${id}`);
+}
diff --git a/apps/web-antd/src/api/property/equipmentManagement/deviceLocation/model.d.ts b/apps/web-antd/src/api/property/equipmentManagement/deviceLocation/model.d.ts
new file mode 100644
index 00000000..384a696c
--- /dev/null
+++ b/apps/web-antd/src/api/property/equipmentManagement/deviceLocation/model.d.ts
@@ -0,0 +1,84 @@
+import type { PageQuery, BaseEntity } from '#/api/common';
+
+export interface DeviceLocationVO {
+ /**
+ * 主键
+ */
+ id: string | number;
+
+ /**
+ * 位置名称
+ */
+ locationName: string;
+
+ /**
+ * 位置编号
+ */
+ locationCode: string;
+
+ /**
+ * 位置类型
+ */
+ locationType: string;
+
+ /**
+ * 搜索值
+ */
+ searchValue: string;
+
+}
+
+export interface DeviceLocationForm extends BaseEntity {
+ /**
+ * 主键
+ */
+ id?: string | number;
+
+ /**
+ * 位置名称
+ */
+ locationName?: string;
+
+ /**
+ * 位置编号
+ */
+ locationCode?: string;
+
+ /**
+ * 位置类型
+ */
+ locationType?: string;
+
+ /**
+ * 搜索值
+ */
+ searchValue?: string;
+
+}
+
+export interface DeviceLocationQuery extends PageQuery {
+ /**
+ * 位置名称
+ */
+ locationName?: string;
+
+ /**
+ * 位置编号
+ */
+ locationCode?: string;
+
+ /**
+ * 位置类型
+ */
+ locationType?: string;
+
+ /**
+ * 搜索值
+ */
+ searchValue?: string;
+
+ /**
+ * 日期范围参数
+ */
+ params?: any;
+}
diff --git a/apps/web-antd/src/views/property/equipmentManagement/deviceLocation/data.ts b/apps/web-antd/src/views/property/equipmentManagement/deviceLocation/data.ts
new file mode 100644
index 00000000..69886942
--- /dev/null
+++ b/apps/web-antd/src/views/property/equipmentManagement/deviceLocation/data.ts
@@ -0,0 +1,96 @@
+import type { FormSchemaGetter } from '#/adapter/form';
+import type { VxeGridProps } from '#/adapter/vxe-table';
+
+
+export const querySchema: FormSchemaGetter = () => [
+ {
+ component: 'Input',
+ fieldName: 'locationName',
+ label: '位置名称',
+ },
+ {
+ component: 'Input',
+ fieldName: 'locationCode',
+ label: '位置编号',
+ },
+ {
+ component: 'Select',
+ componentProps: {
+ },
+ fieldName: 'locationType',
+ label: '位置类型',
+ },
+ {
+ component: 'Input',
+ fieldName: 'searchValue',
+ label: '搜索值',
+ },
+];
+
+// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
+// export const columns: () => VxeGridProps['columns'] = () => [
+export const columns: VxeGridProps['columns'] = [
+ { type: 'checkbox', width: 60 },
+ {
+ title: '主键',
+ field: 'id',
+ },
+ {
+ title: '位置名称',
+ field: 'locationName',
+ },
+ {
+ title: '位置编号',
+ field: 'locationCode',
+ },
+ {
+ title: '位置类型',
+ field: 'locationType',
+ },
+ {
+ title: '搜索值',
+ field: 'searchValue',
+ },
+ {
+ field: 'action',
+ fixed: 'right',
+ slots: { default: 'action' },
+ title: '操作',
+ width: 180,
+ },
+];
+
+export const modalSchema: FormSchemaGetter = () => [
+ {
+ label: '主键',
+ fieldName: 'id',
+ component: 'Input',
+ dependencies: {
+ show: () => false,
+ triggerFields: [''],
+ },
+ },
+ {
+ label: '位置名称',
+ fieldName: 'locationName',
+ component: 'Input',
+ rules: 'required',
+ },
+ {
+ label: '位置编号',
+ fieldName: 'locationCode',
+ component: 'Input',
+ },
+ {
+ label: '位置类型',
+ fieldName: 'locationType',
+ component: 'Select',
+ componentProps: {
+ },
+ },
+ {
+ label: '搜索值',
+ fieldName: 'searchValue',
+ component: 'Input',
+ },
+];
diff --git a/apps/web-antd/src/views/property/equipmentManagement/deviceLocation/deviceLocation-modal.vue b/apps/web-antd/src/views/property/equipmentManagement/deviceLocation/deviceLocation-modal.vue
new file mode 100644
index 00000000..ccdbc0c3
--- /dev/null
+++ b/apps/web-antd/src/views/property/equipmentManagement/deviceLocation/deviceLocation-modal.vue
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
diff --git a/apps/web-antd/src/views/property/equipmentManagement/deviceLocation/index.vue b/apps/web-antd/src/views/property/equipmentManagement/deviceLocation/index.vue
new file mode 100644
index 00000000..557d3582
--- /dev/null
+++ b/apps/web-antd/src/views/property/equipmentManagement/deviceLocation/index.vue
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+
+
+ {{ $t('pages.common.export') }}
+
+
+ {{ $t('pages.common.delete') }}
+
+
+ {{ $t('pages.common.add') }}
+
+
+
+
+
+
+ {{ $t('pages.common.edit') }}
+
+
+
+ {{ $t('pages.common.delete') }}
+
+
+
+
+
+
+
+