diff --git a/src/api/community/locationManageApi.js b/src/api/community/locationManageApi.js new file mode 100644 index 0000000..39c5998 --- /dev/null +++ b/src/api/community/locationManageApi.js @@ -0,0 +1,211 @@ +import request from '@/utils/request' +import { getCommunityId } from '@/api/community/communityApi' + +// 查询位置列表 +export function listCommunityLocations(params) { + return new Promise((resolve, reject) => { + request({ + url: '/communityLocation.listCommunityLocations', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 添加位置 +export function saveCommunityLocation(data) { + return new Promise((resolve, reject) => { + request({ + url: '/communityLocation.saveCommunityLocation', + method: 'post', + data: { + ...data, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 修改位置 +export function updateCommunityLocation(data) { + return new Promise((resolve, reject) => { + request({ + url: '/communityLocation.updateCommunityLocation', + method: 'post', + data: { + ...data, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 删除位置 +export function deleteCommunityLocation(data) { + return new Promise((resolve, reject) => { + request({ + url: '/communityLocation.deleteCommunityLocation', + method: 'post', + data: { + ...data, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 查询楼栋列表 +export function queryFloors(params) { + return new Promise((resolve, reject) => { + request({ + url: '/floor.queryFloors', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 查询单元列表 +export function queryUnits(params) { + return new Promise((resolve, reject) => { + request({ + url: '/unit.queryUnits', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 查询房屋列表 +export function queryRooms(params) { + return new Promise((resolve, reject) => { + request({ + url: '/room.queryRooms', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 查询岗亭列表 +export function listParkingBox(params) { + return new Promise((resolve, reject) => { + request({ + url: '/parkingBox.listParkingBox', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 查询停车场列表 +export function listParkingAreas(params) { + return new Promise((resolve, reject) => { + request({ + url: '/parkingArea.listParkingAreas', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 查询组织树 +export function listOrgTree(params) { + return new Promise((resolve, reject) => { + request({ + url: '/org.listOrgTree', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 查询组织列表 +export function listOrgs(params) { + return new Promise((resolve, reject) => { + request({ + url: '/org.listOrgs', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} \ No newline at end of file diff --git a/src/api/machine/machineTypeTreeManageApi.js b/src/api/machine/machineTypeTreeManageApi.js new file mode 100644 index 0000000..79fc467 --- /dev/null +++ b/src/api/machine/machineTypeTreeManageApi.js @@ -0,0 +1,65 @@ +import request from '@/utils/request' + +// 获取设备类型列表 +export function listMachineType(params) { + return new Promise((resolve, reject) => { + request({ + url: '/machineType.listMachineType', + method: 'get', + params + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 添加设备类型 +export function saveMachineType(data) { + return new Promise((resolve, reject) => { + request({ + url: '/machineType.saveMachineType', + method: 'post', + data + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 更新设备类型 +export function updateMachineType(data) { + return new Promise((resolve, reject) => { + request({ + url: '/machineType.updateMachineType', + method: 'post', + data + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 删除设备类型 +export function deleteMachineType(data) { + return new Promise((resolve, reject) => { + request({ + url: '/machineType.deleteMachineType', + method: 'post', + data + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} \ No newline at end of file diff --git a/src/components/community/AddLocation.vue b/src/components/community/AddLocation.vue new file mode 100644 index 0000000..c39e5c5 --- /dev/null +++ b/src/components/community/AddLocation.vue @@ -0,0 +1,126 @@ + + + \ No newline at end of file diff --git a/src/components/community/DeleteLocation.vue b/src/components/community/DeleteLocation.vue new file mode 100644 index 0000000..ce3b83c --- /dev/null +++ b/src/components/community/DeleteLocation.vue @@ -0,0 +1,54 @@ + + + \ No newline at end of file diff --git a/src/components/community/EditLocation.vue b/src/components/community/EditLocation.vue new file mode 100644 index 0000000..b32873f --- /dev/null +++ b/src/components/community/EditLocation.vue @@ -0,0 +1,129 @@ + + + \ No newline at end of file diff --git a/src/components/machine/addMachineType.vue b/src/components/machine/addMachineType.vue new file mode 100644 index 0000000..b187e01 --- /dev/null +++ b/src/components/machine/addMachineType.vue @@ -0,0 +1,164 @@ + + + \ No newline at end of file diff --git a/src/components/machine/deleteMachineType.vue b/src/components/machine/deleteMachineType.vue new file mode 100644 index 0000000..f2ab0f8 --- /dev/null +++ b/src/components/machine/deleteMachineType.vue @@ -0,0 +1,60 @@ + + + + + \ No newline at end of file diff --git a/src/components/machine/editMachineType.vue b/src/components/machine/editMachineType.vue new file mode 100644 index 0000000..bbeab66 --- /dev/null +++ b/src/components/machine/editMachineType.vue @@ -0,0 +1,171 @@ + + + \ No newline at end of file diff --git a/src/components/machine/machineTypeTree.vue b/src/components/machine/machineTypeTree.vue new file mode 100644 index 0000000..559214e --- /dev/null +++ b/src/components/machine/machineTypeTree.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/src/i18n/index.js b/src/i18n/index.js index ddb1f92..4140dfc 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -197,7 +197,8 @@ import { messages as assetInventoryManageMessages } from '../views/resource/asse import { messages as myResourceStoreManageMessages } from '../views/resource/myResourceStoreManageLang' import { messages as allocationUserStorehouseManageMessages } from '../views/resource/allocationUserStorehouseManageLang' import { messages as resourceStoreUseRecordManageMessages } from '../views/resource/resourceStoreUseRecordManageLang' - +import { messages as locationManageMessages } from '../views/community/locationManageLang' +import { messages as machineTypeTreeManageMessages } from '../views/machine/machineTypeTreeManageLang' Vue.use(VueI18n) // 合并所有语言配置 @@ -398,6 +399,8 @@ const messages = { ...myResourceStoreManageMessages.en, ...allocationUserStorehouseManageMessages.en, ...resourceStoreUseRecordManageMessages.en, + ...locationManageMessages.en, + ...machineTypeTreeManageMessages.en, }, zh: { ...loginMessages.zh, @@ -595,6 +598,8 @@ const messages = { ...myResourceStoreManageMessages.zh, ...allocationUserStorehouseManageMessages.zh, ...resourceStoreUseRecordManageMessages.zh, + ...locationManageMessages.zh, + ...machineTypeTreeManageMessages.zh, } } diff --git a/src/router/index.js b/src/router/index.js index 1a9f016..9d7c3e0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -976,6 +976,16 @@ const routes = [ name: '/pages/common/resourceStoreUseRecordManage', component: () => import('@/views/resource/resourceStoreUseRecordManageList.vue') }, + { + path:'/pages/property/locationManage', + name:'/pages/property/locationManage', + component: () => import('@/views/community/locationManageList.vue') + }, + { + path:'/pages/property/machineTypeTreeManage', + name:'/pages/property/machineTypeTreeManage', + component: () => import('@/views/machine/machineTypeTreeManageList.vue') + }, // 其他子路由可以在这里添加 ] }, diff --git a/src/views/community/locationManageLang.js b/src/views/community/locationManageLang.js new file mode 100644 index 0000000..5cf150f --- /dev/null +++ b/src/views/community/locationManageLang.js @@ -0,0 +1,102 @@ +export const messages = { + en: { + locationManage: { + queryCondition: 'Query Conditions', + deviceLocation: 'Device Location', + enterLocationCode: 'Enter location code', + enterLocationName: 'Enter location name', + selectLocationType: 'Select location type', + locationCode: 'Location Code', + locationName: 'Location Name', + locationType: 'Location Type', + locationObject: 'Location Object', + operation: 'Operation', + add: 'Add', + edit: 'Edit', + delete: 'Delete', + confirmOperation: 'Please confirm your operation', + confirmDeleteLocation: 'Confirm to delete this location?', + selectBuilding: 'Select building', + selectUnit: 'Select unit', + selectRoom: 'Select room', + selectGuardBox: 'Select guard box', + selectParkingArea: 'Select parking area', + selectCompany: 'Select company', + selectDepartment: 'Select department', + selectOrg: 'Select organization', + selectOrgRequired: 'Please select related organization', + selectOrgFirst: 'Please select an organization first', + belongBuilding: 'Belong Building', + belongUnit: 'Belong Unit', + belongGuardBox: 'Belong Guard Box', + belongDepartment: 'Belong Department', + modifyBuilding: 'Modify Building', + modifyUnit: 'Modify Unit', + modifyGuardBox: 'Modify Guard Box', + modifyParkingLot: 'Modify Parking Lot', + community: 'Community', + building: 'Building', + unit: 'Unit', + room: 'Room', + guardBox: 'Guard Box', + department: 'Department', + parkingLot: 'Parking Lot', + buildingUnit: 'Building', + noOwner: 'No Owner', + locationNameRequired: 'Location name is required', + locationNameMaxLength: 'Location name cannot exceed 100 characters', + locationTypeRequired: 'Location type is required', + fetchError: 'Failed to fetch location data' + } + }, + zh: { + locationManage: { + queryCondition: '查询条件', + deviceLocation: '设备位置', + enterLocationCode: '请输入位置编码', + enterLocationName: '请输入位置名称', + selectLocationType: '请选择位置类型', + locationCode: '位置编码', + locationName: '位置名称', + locationType: '位置类型', + locationObject: '位置对象', + operation: '操作', + add: '添加', + edit: '修改', + delete: '删除', + confirmOperation: '请确认您的操作', + confirmDeleteLocation: '确定删除该位置管理?', + selectBuilding: '请选择楼栋', + selectUnit: '请选择单元', + selectRoom: '请选择房屋', + selectGuardBox: '请选择岗亭', + selectParkingArea: '请选择停车场', + selectCompany: '请选择公司', + selectDepartment: '选择部门', + selectOrg: '选择组织', + selectOrgRequired: '必填,请填写关联组织', + selectOrgFirst: '请先选择组织', + belongBuilding: '归属楼栋', + belongUnit: '归属单元', + belongGuardBox: '归属岗亭', + belongDepartment: '归属部门', + modifyBuilding: '修改楼栋', + modifyUnit: '修改单元', + modifyGuardBox: '修改岗亭', + modifyParkingLot: '修改停车场', + community: '小区', + building: '楼栋', + unit: '单元', + room: '房屋', + guardBox: '岗亭', + department: '部门', + parkingLot: '停车场', + buildingUnit: '号楼', + noOwner: '无业主', + locationNameRequired: '位置名称不能为空', + locationNameMaxLength: '位置名称不能超过100位', + locationTypeRequired: '位置类型不能为空', + fetchError: '获取位置数据失败' + } + } +} \ No newline at end of file diff --git a/src/views/community/locationManageList.vue b/src/views/community/locationManageList.vue new file mode 100644 index 0000000..dd81336 --- /dev/null +++ b/src/views/community/locationManageList.vue @@ -0,0 +1,188 @@ + + + + + \ No newline at end of file diff --git a/src/views/machine/machineTypeTreeManageLang.js b/src/views/machine/machineTypeTreeManageLang.js new file mode 100644 index 0000000..6096e65 --- /dev/null +++ b/src/views/machine/machineTypeTreeManageLang.js @@ -0,0 +1,58 @@ +export const messages = { + en: { + machineTypeTree: { + addParent: 'Add Parent Category', + addChild: 'Add Child Category', + edit: 'Edit', + delete: 'Delete', + detail: 'Details', + machineTypeName: 'Equipment Type Name', + machineTypeCode: 'Category Code', + status: 'Status', + enable: 'Enable', + disable: 'Disable', + importanceLevel: 'Importance Level', + seq: 'Sort Value', + unit: 'Unit', + warrantyDeadline: 'Warranty Deadline', + remark: 'Remark', + requiredPlaceholder: 'Required, please enter {field}', + optionalPlaceholder: 'Optional, please enter {field}', + requiredMessage: '{field} is required', + maxLengthMessage: 'Cannot exceed {length} characters', + selectTypeFirst: 'Please select equipment category first', + confirmOperation: 'Please confirm your operation', + confirmDelete: 'Confirm to delete equipment type?', + cancelDelete: 'Cancel', + confirmDeleteBtn: 'Confirm Delete' + } + }, + zh: { + machineTypeTree: { + addParent: '添加一级分类', + addChild: '添加子级分类', + edit: '修改', + delete: '删除', + detail: '详情', + machineTypeName: '设备类型名称', + machineTypeCode: '分类编码', + status: '启用状态', + enable: '启用', + disable: '停用', + importanceLevel: '重要等级', + seq: '排序值', + unit: '单位', + warrantyDeadline: '保修截止日期', + remark: '备注', + requiredPlaceholder: '必填,请填写{field}', + optionalPlaceholder: '选填,请填写{field}', + requiredMessage: '{field}不能为空', + maxLengthMessage: '{field}不能超过{length}个字符', + selectTypeFirst: '请先选择设备分类', + confirmOperation: '请确认您的操作', + confirmDelete: '确定删除设备类型?', + cancelDelete: '点错了', + confirmDeleteBtn: '确认删除' + } + } +} \ No newline at end of file diff --git a/src/views/machine/machineTypeTreeManageList.vue b/src/views/machine/machineTypeTreeManageList.vue new file mode 100644 index 0000000..42a4886 --- /dev/null +++ b/src/views/machine/machineTypeTreeManageList.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file