From 34b6f8e738eb6a9b2034ed9c7eb214ee27725d1e Mon Sep 17 00:00:00 2001 From: FLL <2162874245@qq.com> Date: Tue, 5 Aug 2025 17:26:09 +0800 Subject: [PATCH 1/9] =?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 --- .../inspectionRoute/data.ts | 103 ++++++++++++-- .../inspectionRoute/index.vue | 25 ++-- .../inspectionRoute/inspectionRoute-modal.vue | 128 ++++++++++++++++-- .../inspectionRoute/point-modal.vue | 112 +++++++++++++++ .../inspectionRoute/pointSetting-modal.vue | 84 ++++++++++++ 5 files changed, 411 insertions(+), 41 deletions(-) create mode 100644 apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/point-modal.vue create mode 100644 apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/pointSetting-modal.vue 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 db36a106..d23729f4 100644 --- a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/data.ts +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/data.ts @@ -1,7 +1,6 @@ -import {type FormSchemaGetter, z} from '#/adapter/form'; +import {type FormSchemaGetter} from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; - export const querySchema: FormSchemaGetter = () => [ { component: 'Input', @@ -10,8 +9,6 @@ export const querySchema: FormSchemaGetter = () => [ }, ]; -// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 -// export const columns: () => VxeGridProps['columns'] = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { @@ -61,19 +58,97 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Input', rules: 'required', }, - { - label: '巡检点', - fieldName: 'pointId', - component: 'ApiSelect', - componentProps:{ - mode: 'multiple', - }, - rules: z.array(z.string()).min(1, { message: '请选择' }), - formItemClass: 'col-span-2', - }, { label: '备注', fieldName: 'remark', component: 'Textarea', }, ]; + + +//!!!!!! +export const querySchemaPoint: FormSchemaGetter = () => [ + { + component: 'ApiSelect', + fieldName: 'pointId', + label: '巡检点名称', + componentProps: {}, + }, +]; + +export const columnsPoint: VxeGridProps['columns'] = [ + { + title: '巡检点ID', + field: 'pointId', + }, + { + title: '巡检点名称', + field: 'createTime', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + +export const modalSchemaPoint: FormSchemaGetter = () => [ + { + label: '主键id', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '巡检点名称', + fieldName: 'pointId', + rules: 'required', + component: 'ApiSelect', + componentProps: {}, + }, +]; + +export const modalSchemaPointSetting: FormSchemaGetter = () => [ + { + label: '主键id', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '开始时间', + fieldName: 'startTime', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + placeholder: '请选择开始时间', + }, + rules: 'required', + }, + { + label: '结束时间', + fieldName: 'endTime', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + placeholder: '请选择开始时间', + }, + rules: 'required', + }, + { + label: '排序', + fieldName: 'sort', + component: 'Input', + rules: 'required', + }, +]; diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/index.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/index.vue index a6d4d94a..a5a30d0e 100644 --- a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/index.vue +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/index.vue @@ -1,14 +1,8 @@ @@ -163,6 +154,6 @@ function handleMultiDelete() { - + 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 5a223913..44ec3c5d 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 @@ -9,7 +9,7 @@ import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; import { inspectionPointList, } from '#/api/property/inspectionManagement/inspectionPoint'; -import { modalSchema } from './data'; +import {modalSchema} from './data'; const emit = defineEmits<{ reload: [] }>(); @@ -20,11 +20,8 @@ const title = computed(() => { const [BasicForm, formApi] = useVbenForm({ commonConfig: { - // 默认占满两列 formItemClass: 'col-span-1', - // 默认label宽度 px labelWidth: 100, - // 通用配置项 会影响到所有表单项 componentProps: { class: 'w-full', } @@ -42,7 +39,6 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff( ); const [BasicModal, modalApi] = useVbenModal({ - // 在这里更改宽度 class: 'w-[60%]', fullscreenButton: false, onBeforeClose, @@ -59,7 +55,6 @@ const [BasicModal, modalApi] = useVbenModal({ if (isUpdate.value && id) { const record = await inspectionRouteInfo(id); - record.pointId = record.pointId?.split(',') await formApi.setValues(record); } await markInitialized(); @@ -75,9 +70,7 @@ async function handleConfirm() { if (!valid) { return; } - // getValues获取为一个readonly的对象 需要修改必须先深拷贝一次 const data = cloneDeep(await formApi.getValues()); - data.pointId = data.pointId?.join(',') await (isUpdate.value ? inspectionRouteUpdate(data) : inspectionRouteAdd(data)); resetInitialized(); emit('reload'); @@ -104,12 +97,11 @@ async function queryWorkOrdersType() { label: item.pointName, value: item.id, })); - formApi.updateSchema([{ + tableApi.formApi.updateSchema([{ componentProps: () => ({ options: options, showSearch: true, filterOption: filterOption, - mode: 'multiple', }), fieldName: 'pointId', }]) @@ -118,11 +110,127 @@ async function queryWorkOrdersType() { const filterOption = (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0; }; + + +//!!!!!! +import { Page, type VbenFormProps } from '@vben/common-ui'; +import { Space } from 'ant-design-vue'; +import { + useVbenVxeGrid, + type VxeGridProps +} from '#/adapter/vxe-table'; +import { + inspectionRouteList, +} from '#/api/property/inspectionManagement/inspectionRoute'; +import type { InspectionRouteForm } from '#/api/property/inspectionManagement/inspectionRoute/model'; +import pointModal from './point-modal.vue'; +import pointModalSetting from './pointSetting-modal.vue'; +import { columnsPoint, querySchemaPoint } from './data'; + +const formOptions: VbenFormProps = { + commonConfig: { + labelWidth: 90, + componentProps: { + allowClear: true, + }, + }, + schema: querySchemaPoint(), + wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4', +}; + +const gridOptions: VxeGridProps = { + checkboxConfig: { + highlight: true, + reserve: true, + }, + columns: columnsPoint, + height: 'auto', + keepSource: true, + pagerConfig: {}, + proxyConfig: { + ajax: { + query: async ({ page }, formValues = {}) => { + return await inspectionRouteList({ + pageNum: page.currentPage, + pageSize: page.pageSize, + ...formValues, + }); + }, + }, + }, + rowConfig: { + keyField: 'id', + }, + id: 'property-inspectionRoute-index' +}; + +const [BasicTable, tableApi] = useVbenVxeGrid({ + formOptions, + gridOptions, +}); + +const [PointModal, pointModalApi] = useVbenModal({ + connectedComponent: pointModal, +}); + +const [PointModalSetting, pointModalSettingApi] = useVbenModal({ + connectedComponent: pointModalSetting, +}); + +function handleAdd() { + pointModalApi.setData({}); + pointModalApi.open(); +} + +async function handleEdit(row: Required) { + pointModalSettingApi.setData({ id: row.id }); + pointModalSettingApi.open(); +} + +const setData = ref({}) +const handleSet = (data) => { + setData.value = data; // 更新父组件的数据源 + console.log(setData.value,111); +}; +const pointData = ref({}) +const handlePoint = (data) => { + pointData.value = data; // 更新父组件的数据源 + console.log(pointData.value,222); +}; +// const allDate = { +// ...pointData, +// ...setData +// } + + + + + + {{ $t('pages.common.add') }} + + + + + + + {{ '巡检点' }} + + + + + + + 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 new file mode 100644 index 00000000..2766caba --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/point-modal.vue @@ -0,0 +1,112 @@ + + + + + + + + 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 new file mode 100644 index 00000000..f7ed3180 --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/pointSetting-modal.vue @@ -0,0 +1,84 @@ + + + + + + + + From 8bc05afd6d045799ff57dfbe05bc352ae1f68bce Mon Sep 17 00:00:00 2001 From: zcxlsm Date: Wed, 6 Aug 2025 09:18:36 +0800 Subject: [PATCH 2/9] refactor(sis): 1 --- apps/web-antd/src/views/sis/authGroup/authGroup-modal.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/web-antd/src/views/sis/authGroup/authGroup-modal.vue b/apps/web-antd/src/views/sis/authGroup/authGroup-modal.vue index 7221e641..be5e89ed 100644 --- a/apps/web-antd/src/views/sis/authGroup/authGroup-modal.vue +++ b/apps/web-antd/src/views/sis/authGroup/authGroup-modal.vue @@ -136,11 +136,9 @@ function handleCheck(checked: Key[] | { checked: Key[]; halfChecked: Key[] }, in info.checkedNodesPositions.forEach((item: any) => { switch (item.node.label) { case 'accessControl': - console.log('item.node', item.node) acIds.value = acIds.value.concat(item.node.code) break case 'floor': - console.log('item.node', item.node) floorIds.value = floorIds.value.concat(item.node.code) eleIds.value = eleIds.value.concat(item.node.parentCode) break From fe2069a2e8bc3766489922759471e0eb574dfd4e Mon Sep 17 00:00:00 2001 From: lxj <15683799673@163.com> Date: Wed, 6 Aug 2025 12:58:32 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=97=A8=E7=A6=81?= =?UTF-8?q?=E5=8F=AF=E8=A7=86=E5=8C=96=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/sis/acAdmin/data.ts | 0 .../src/views/sis/acAdmin/dp-tree.vue | 200 ++++++++++++++++ apps/web-antd/src/views/sis/acAdmin/index.vue | 223 ++++++++++++++++++ .../device/accessControlModal.vue | 84 +++---- apps/web-antd/vite.config.mts | 2 +- 5 files changed, 466 insertions(+), 43 deletions(-) create mode 100644 apps/web-antd/src/views/sis/acAdmin/data.ts create mode 100644 apps/web-antd/src/views/sis/acAdmin/dp-tree.vue create mode 100644 apps/web-antd/src/views/sis/acAdmin/index.vue diff --git a/apps/web-antd/src/views/sis/acAdmin/data.ts b/apps/web-antd/src/views/sis/acAdmin/data.ts new file mode 100644 index 00000000..e69de29b diff --git a/apps/web-antd/src/views/sis/acAdmin/dp-tree.vue b/apps/web-antd/src/views/sis/acAdmin/dp-tree.vue new file mode 100644 index 00000000..06d54792 --- /dev/null +++ b/apps/web-antd/src/views/sis/acAdmin/dp-tree.vue @@ -0,0 +1,200 @@ + + + + + + + + 开门 + 关门 + 常开 + + 恢复正常 + + + + + + + + + + + + + + + + + {{ label.substring(0, label.indexOf(searchValue)) }} + {{ searchValue }} + {{ + label.substring( + label.indexOf(searchValue) + searchValue.length, + ) + }} + + {{ label }} + + + + + + + + diff --git a/apps/web-antd/src/views/sis/acAdmin/index.vue b/apps/web-antd/src/views/sis/acAdmin/index.vue new file mode 100644 index 00000000..47fcb088 --- /dev/null +++ b/apps/web-antd/src/views/sis/acAdmin/index.vue @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + diff --git a/apps/web-antd/src/views/sis/accessControl/device/accessControlModal.vue b/apps/web-antd/src/views/sis/accessControl/device/accessControlModal.vue index b5692d4a..c0e783f3 100644 --- a/apps/web-antd/src/views/sis/accessControl/device/accessControlModal.vue +++ b/apps/web-antd/src/views/sis/accessControl/device/accessControlModal.vue @@ -1,11 +1,11 @@ diff --git a/apps/web-antd/vite.config.mts b/apps/web-antd/vite.config.mts index 65f4cb57..29bf5bc4 100644 --- a/apps/web-antd/vite.config.mts +++ b/apps/web-antd/vite.config.mts @@ -29,7 +29,7 @@ export default defineConfig(async () => { // mock代理目标地址 // target: 'http://192.168.43.169:8080', // target: 'https://by.missmoc.top/api/', - target: 'http://192.168.13.27:8080', + target: 'http://127.0.0.1:8080', // target: 'http://192.168.0.106:8080', // target: 'http://47.109.37.87:3010', ws: true, From ee8e459aed240c5d3ad43eb5f9019ba40f8391a7 Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Wed, 6 Aug 2025 13:57:40 +0800 Subject: [PATCH 4/9] =?UTF-8?q?feat:=E5=B7=A5=E5=8D=95=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=8A=E7=BA=A7=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/assetManage/application/index.ts | 8 +++ .../workOrdersType/index.ts | 3 ++ .../workOrdersType/model.d.ts | 20 +++++-- .../application/application-modal.vue | 4 +- .../property/assetManage/application/data.ts | 4 +- .../assetManage/application/index.vue | 4 +- .../businessManagement/workOrdersType/data.ts | 25 ++++++--- .../workOrdersType/index.vue | 35 ++++++++----- .../workOrdersType/workOrdersType-detail.vue | 6 +-- .../workOrdersType/workOrdersType-modal.vue | 52 +++++++++++++------ 10 files changed, 112 insertions(+), 49 deletions(-) diff --git a/apps/web-antd/src/api/property/assetManage/application/index.ts b/apps/web-antd/src/api/property/assetManage/application/index.ts index 677eb0c6..6c31ff59 100644 --- a/apps/web-antd/src/api/property/assetManage/application/index.ts +++ b/apps/web-antd/src/api/property/assetManage/application/index.ts @@ -42,6 +42,14 @@ export function applicationAdd(data: ApplicationForm) { return requestClient.postWithMsg('/property/application', data); } +/** + * 领用审核 + * @param data + */ +export function applicationVerified(data: ApplicationForm) { + return requestClient.postWithMsg('/property/application/verified', data); +} + /** * 更新资产领用 * @param data diff --git a/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts b/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts index 4cfbd81f..f763dd31 100644 --- a/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts +++ b/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts @@ -12,6 +12,9 @@ import { requestClient } from '#/api/request'; export function workOrdersTypeList(params?: WorkOrdersTypeQuery) { return requestClient.get>('/property/workOrdersType/list', { params }); } +export function workOrdersTypeListAll(params?: WorkOrdersTypeQuery) { + return requestClient.get('/property/workOrdersType/queryList', { params }); +} /** * 导出工单类型管理列表 diff --git a/apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts b/apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts index f1f10907..ce780780 100644 --- a/apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts +++ b/apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts @@ -1,4 +1,4 @@ -import type { PageQuery, BaseEntity } from '#/api/common'; +import type {PageQuery, BaseEntity} from '#/api/common'; export interface WorkOrdersTypeVO { /** @@ -34,7 +34,9 @@ export interface WorkOrdersTypeVO { /** * 是否支持转单(0支持,1不支持) */ - isTransfers: number; + isTransfers: string; + + excludeId: string; } export interface WorkOrdersTypeForm extends BaseEntity { @@ -72,6 +74,11 @@ export interface WorkOrdersTypeForm extends BaseEntity { * 是否支持转单(0支持,1不支持) */ isTransfers?: number; + + /** + * 上级类型id + */ + parentId?: string; } export interface WorkOrdersTypeQuery extends PageQuery { @@ -106,7 +113,12 @@ export interface WorkOrdersTypeQuery extends PageQuery { isTransfers?: number; /** - * 日期范围参数 - */ + * 日期范围参数 + */ params?: any; + + /** + * 是否过滤子级 + */ + filterSubNodes?: boolean; } diff --git a/apps/web-antd/src/views/property/assetManage/application/application-modal.vue b/apps/web-antd/src/views/property/assetManage/application/application-modal.vue index 0ba82bec..93d7f91c 100644 --- a/apps/web-antd/src/views/property/assetManage/application/application-modal.vue +++ b/apps/web-antd/src/views/property/assetManage/application/application-modal.vue @@ -109,6 +109,7 @@ async function setupPackageSelect() { const assets = await assetList({ pageNum: 1, pageSize: 1000, + params: {stock: 1} //库存不为0 }); assetsData.value = assets.rows const options = users.rows.map((item) => ({ @@ -145,7 +146,8 @@ async function setupPackageSelect() { if (assetInfo) { formApi.updateSchema([{ componentProps: { - max:assetInfo.stock + max: assetInfo.stock, + min: 1 }, fieldName: 'number', }]) diff --git a/apps/web-antd/src/views/property/assetManage/application/data.ts b/apps/web-antd/src/views/property/assetManage/application/data.ts index 8afff06c..855878e0 100644 --- a/apps/web-antd/src/views/property/assetManage/application/data.ts +++ b/apps/web-antd/src/views/property/assetManage/application/data.ts @@ -28,7 +28,7 @@ export const querySchema: FormSchemaGetter = () => [ options:getDictOptions(DictEnum.WY_ZCSHZT) }, fieldName: 'state', - label: '领用状态', + label: '审核状态', }, // { // component: 'Input', @@ -78,7 +78,7 @@ export const columns: VxeGridProps['columns'] = [ field: 'applicationTime', }, { - title: '领用状态', + title: '审核状态', field: 'state', slots: { default: ({ row }) => { diff --git a/apps/web-antd/src/views/property/assetManage/application/index.vue b/apps/web-antd/src/views/property/assetManage/application/index.vue index 2569b981..df7c3417 100644 --- a/apps/web-antd/src/views/property/assetManage/application/index.vue +++ b/apps/web-antd/src/views/property/assetManage/application/index.vue @@ -14,7 +14,7 @@ import { import { applicationExport, applicationList, - applicationRemove, applicationUpdate, + applicationRemove, applicationVerified, } from '#/api/property/assetManage/application'; import type {ApplicationForm} from '#/api/property/assetManage/application/model'; import {commonDownloadExcel} from '#/utils/file/download'; @@ -98,7 +98,7 @@ async function handleAudit(row: Required, status: number) { info.state = status info.acceptanceTime = new Date() info.acceptanceUserId = userStore.userInfo?.userId - await applicationUpdate(info) + await applicationVerified(info) await tableApi.query(); } diff --git a/apps/web-antd/src/views/property/businessManagement/workOrdersType/data.ts b/apps/web-antd/src/views/property/businessManagement/workOrdersType/data.ts index 3c5f97ab..76c73e27 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrdersType/data.ts +++ b/apps/web-antd/src/views/property/businessManagement/workOrdersType/data.ts @@ -4,11 +4,11 @@ import {renderDict} from "#/utils/render"; import {getDictOptions} from "#/utils/dict"; export const querySchema: FormSchemaGetter = () => [ - { - component: 'Input', - fieldName: 'orderTypeNo', - label: '工单类型编号', - }, + // { + // component: 'Input', + // fieldName: 'orderTypeNo', + // label: '工单类型编号', + // }, { component: 'Input', fieldName: 'orderTypeName', @@ -25,7 +25,7 @@ export const querySchema: FormSchemaGetter = () => [ ]; export const columns: VxeGridProps['columns'] = [ - { type: 'checkbox', width: 60 }, + // { type: 'checkbox', width: 60 }, // { // title: '工单类型编号', // field: 'orderTypeNo', @@ -33,6 +33,8 @@ export const columns: VxeGridProps['columns'] = [ { title: '类型名称', field: 'orderTypeName', + treeNode: true, + minWidth:180, }, { title: '运作模式', @@ -42,15 +44,17 @@ export const columns: VxeGridProps['columns'] = [ return renderDict(row.operationMode, 'pro_operation_pattern'); }, }, - minWidth:'120' + width:180, }, { title: '排序值', field: 'sort', + width:180, }, { title: '累计工单数量', field: 'number', + width:180, }, { title: '是否支持转单', @@ -60,7 +64,7 @@ export const columns: VxeGridProps['columns'] = [ return renderDict(row.isTransfers, 'support_transferring_orders'); }, }, - minWidth:'120' + width:180, }, { field: 'action', @@ -87,6 +91,11 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Input', rules: 'required', }, + { + label: '父级类型', + fieldName: 'parentId', + component: 'Select', + }, { label: '运作模式', fieldName: 'operationMode', diff --git a/apps/web-antd/src/views/property/businessManagement/workOrdersType/index.vue b/apps/web-antd/src/views/property/businessManagement/workOrdersType/index.vue index 3f2d5ba7..13610bd7 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrdersType/index.vue +++ b/apps/web-antd/src/views/property/businessManagement/workOrdersType/index.vue @@ -8,13 +8,14 @@ import { type VxeGridProps } from '#/adapter/vxe-table'; import { - workOrdersTypeList, + workOrdersTypeListAll, workOrdersTypeRemove, } from '#/api/property/businessManagement/workOrdersType'; import type { WorkOrdersTypeForm } from '#/api/property/businessManagement/workOrdersType/model'; import workOrdersTypeModal from './workOrdersType-modal.vue'; import workOrdersTypeDetail from './workOrdersType-detail.vue'; import { columns, querySchema } from './data'; +import {ref} from "vue"; const formOptions: VbenFormProps = { commonConfig: { @@ -39,21 +40,27 @@ const gridOptions: VxeGridProps = { columns, height: 'auto', keepSource: true, - pagerConfig: {}, + pagerConfig: { + enabled:false, + }, proxyConfig: { ajax: { - query: async ({ page }, formValues = {}) => { - return await workOrdersTypeList({ - pageNum: page.currentPage, - pageSize: page.pageSize, + query: async (_, formValues = {}) => { + const resp = await workOrdersTypeListAll({ ...formValues, }); + return { rows: resp }; }, }, }, rowConfig: { keyField: 'id', }, + treeConfig: { + parentField: 'parentId', + rowField: 'id', + transform: true, + }, // 表格全局唯一表示 保存列配置需要用到 id: 'property-workOrdersType-index' }; @@ -111,14 +118,14 @@ function handleMultiDelete() { - - {{ $t('pages.common.delete') }} - + + + + + + + + - - {{ workOrdersTypeInfoDetail.orderTypeNo }} - + + + {{ workOrdersTypeInfoDetail.orderTypeName }} diff --git a/apps/web-antd/src/views/property/businessManagement/workOrdersType/workOrdersType-modal.vue b/apps/web-antd/src/views/property/businessManagement/workOrdersType/workOrdersType-modal.vue index b543a8ba..86d7ea95 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrdersType/workOrdersType-modal.vue +++ b/apps/web-antd/src/views/property/businessManagement/workOrdersType/workOrdersType-modal.vue @@ -1,12 +1,16 @@ - + 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 5/9] =?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 @@ - - - - - - - - From 01a71ea4c312bd222e64b33d8ab279a6f61ae7d7 Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Wed, 6 Aug 2025 14:33:02 +0800 Subject: [PATCH 6/9] =?UTF-8?q?feat:=E5=B7=A5=E5=8D=95=E6=B1=A0=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=B7=A5=E5=8D=95=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workOrdersType/index.ts | 13 ++++++ .../views/property/assetManage/log/data.ts | 18 +++++--- .../businessManagement/workOrders/data.ts | 3 +- .../workOrders/workOrders-modal.vue | 43 ++++++++++--------- 4 files changed, 49 insertions(+), 28 deletions(-) diff --git a/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts b/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts index f763dd31..acc9be74 100644 --- a/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts +++ b/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts @@ -12,10 +12,23 @@ import { requestClient } from '#/api/request'; export function workOrdersTypeList(params?: WorkOrdersTypeQuery) { return requestClient.get>('/property/workOrdersType/list', { params }); } +/** + * 查询工单类型不分页 + * @param params + * @returns 工单类型管理列表 + */ export function workOrdersTypeListAll(params?: WorkOrdersTypeQuery) { return requestClient.get('/property/workOrdersType/queryList', { params }); } +/** + * 查询工单类型树结构 + * @param params + */ +export function workOrdersTypeTree(params?: WorkOrdersTypeQuery) { + return requestClient.get('/property/workOrdersType/typeTree', { params }); +} + /** * 导出工单类型管理列表 * @param params diff --git a/apps/web-antd/src/views/property/assetManage/log/data.ts b/apps/web-antd/src/views/property/assetManage/log/data.ts index 96bed83e..c40ad90e 100644 --- a/apps/web-antd/src/views/property/assetManage/log/data.ts +++ b/apps/web-antd/src/views/property/assetManage/log/data.ts @@ -1,6 +1,7 @@ import type { FormSchemaGetter } from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; import {getDictOptions} from "#/utils/dict"; +import {renderDict} from "#/utils/render"; export const querySchema: FormSchemaGetter = () => [ @@ -69,19 +70,24 @@ export const querySchema: FormSchemaGetter = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { - title: '仓库id', - field: 'depotId', + title: '仓库', + field: 'depotName', minWidth:150, }, { - title: '资产id', - field: 'assetId', + title: '资产', + field: 'assetName', width:180, }, { title: '流转类型', field: 'type', width:120, + slots:{ + default:({row})=>{ + return renderDict(row.type,'wy_cklzlx') + } + } }, { @@ -95,8 +101,8 @@ export const columns: VxeGridProps['columns'] = [ width:150, }, { - title: '操作人id', - field: 'userId', + title: '操作人', + field: 'userName', width:150, }, { diff --git a/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts b/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts index 5ecf2907..0b7b199a 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts +++ b/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts @@ -152,8 +152,7 @@ export const modalSchema: FormSchemaGetter = () => [ { label: '工单类型', fieldName: 'type', - component: 'ApiSelect', - componentProps: {}, + component: 'TreeSelect', rules: 'selectRequired', }, { 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 5ccdda93..7712c344 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 @@ -14,9 +14,7 @@ import { import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup'; import {modalSchema} from './data'; -import {personList} from "#/api/property/resident/person"; -import {renderDictValue} from "#/utils/render"; -import {workOrdersTypeList} from "#/api/property/businessManagement/workOrdersType"; +import {workOrdersTypeTree} from "#/api/property/businessManagement/workOrdersType"; const emit = defineEmits<{ reload: [] }>(); @@ -107,23 +105,28 @@ async function handleClosed() { } async function queryWorkOrdersType() { - let params = { - pageSize: 1000, - pageNum: 1 - } - 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, - }), - fieldName: 'type', - }]) + const options = await workOrdersTypeTree() + formApi.updateSchema([ + { + componentProps: () => ({ + class: 'w-full', + fieldNames: { + key: 'id', + label: 'orderTypeName', + value: 'id', + children: 'children', + }, + placeholder: '请选择工单类型', + showSearch: true, + treeData: options, + treeDefaultExpandAll: true, + treeLine: { showLeafIcon: false }, + treeNodeFilterProp: 'orderTypeName', + treeNodeLabelProp: 'orderTypeName', + }), + fieldName: 'type', + }, + ]); } const filterOption = (input: string, option: any) => { From f7e341bf08aed986ec4df3f87439fdb5f58a4b08 Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Wed, 6 Aug 2025 14:53:51 +0800 Subject: [PATCH 7/9] =?UTF-8?q?feat:=E5=B7=A1=E6=A3=80=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspectionDetails/data.ts | 65 ++++++------------- 1 file changed, 21 insertions(+), 44 deletions(-) diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/data.ts b/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/data.ts index 7b141b66..78bb0a82 100644 --- a/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/data.ts +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/data.ts @@ -32,49 +32,26 @@ export const querySchema: FormSchemaGetter = () => [ 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: 'planId', + minWidth:200 + }, + { + title: '巡检任务', + field: 'taskId', + width:150 + }, + { + title: '巡检路线', + field: 'routeId', + width:150 + }, + { + title: '巡检点', + field: 'pointId', + width:150 + }, { title: '签到类型', field: 'signType', @@ -118,7 +95,7 @@ export const columns: VxeGridProps['columns'] = [ { title: '备注', field: 'remark', - minWidth:120 + width:180 }, // { // field: 'action', From cf17b814a81c7f4d05068d286d6342720b56772e Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Wed, 6 Aug 2025 16:41:53 +0800 Subject: [PATCH 8/9] =?UTF-8?q?feat:=E5=B7=A5=E5=8D=95=E6=B1=A0=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/businessManagement/workOrders/index.vue | 12 +++++++----- .../businessManagement/workOrdersType/index.vue | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/web-antd/src/views/property/businessManagement/workOrders/index.vue b/apps/web-antd/src/views/property/businessManagement/workOrders/index.vue index 26ac66cb..fef94b5f 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrders/index.vue +++ b/apps/web-antd/src/views/property/businessManagement/workOrders/index.vue @@ -17,7 +17,10 @@ import workOrdersDetail from './work-orders-detail.vue'; import ordersModal from './orders-modal.vue'; import {columns, querySchema} from './data'; import {onMounted, ref} from "vue"; -import {workOrdersTypeList} from "#/api/property/businessManagement/workOrdersType"; +import { + workOrdersTypeList, + workOrdersTypeListAll +} from "#/api/property/businessManagement/workOrdersType"; const ordersTypeList = ref([]); const ordersType = ref('0'); @@ -130,11 +133,10 @@ function handleMultiDelete() { async function queryOrderType() { let params = { - pageSize: 1000, - pageNum: 1 + filterSubNodes:true } - const res = await workOrdersTypeList(params) - ordersTypeList.value = res.rows.map((item) => ({ + const res = await workOrdersTypeListAll(params) + ordersTypeList.value = res.map((item) => ({ label: item.orderTypeName, value: item.id, })); diff --git a/apps/web-antd/src/views/property/businessManagement/workOrdersType/index.vue b/apps/web-antd/src/views/property/businessManagement/workOrdersType/index.vue index 13610bd7..cc2a8f58 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrdersType/index.vue +++ b/apps/web-antd/src/views/property/businessManagement/workOrdersType/index.vue @@ -94,6 +94,7 @@ async function handleEdit(row: Required) { } async function handleDelete(row: Required) { + console.log(row,'======row') await workOrdersTypeRemove(row.id); await tableApi.query(); } @@ -158,6 +159,7 @@ function handleMultiDelete() { danger v-access:code="['property:workOrdersType:remove']" @click.stop="" + :disabled="row.children?.length>0" > {{ $t('pages.common.delete') }} From f4278ee9f1999e1de8c6bd28dd3e4aba2ba09c9a Mon Sep 17 00:00:00 2001 From: FLL <2162874245@qq.com> Date: Wed, 6 Aug 2025 16:42:37 +0800 Subject: [PATCH 9/9] =?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 --- .../inspectionRoute/inspectionRoute-modal.vue | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) 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 8774d670..18f22086 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,10 +1,15 @@ @@ -198,7 +196,7 @@ const handlePoint = (data) => { - +