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 01/10] =?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 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 02/10] =?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 03/10] =?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 04/10] =?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 05/10] =?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 06/10] =?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 07/10] =?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) => { - + Date: Wed, 6 Aug 2025 16:47:42 +0800 Subject: [PATCH 08/10] =?UTF-8?q?feat:=20=E4=B8=AA=E4=BA=BA=E4=B8=AD?= =?UTF-8?q?=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workforceManagement/calendarView.vue | 273 +++++++-- .../category/category-modal.vue | 137 +++++ .../property/personalCenter/category/data.ts | 69 +++ .../personalCenter/category/index.vue | 153 +++++ .../personalCenter/components/apply-modal.vue | 149 +++++ .../components/approval-card.vue | 93 +++ .../components/approval-content.vue | 26 + .../components/approval-details.vue | 41 ++ .../components/approval-modal.vue | 227 +++++++ .../components/approval-panel.vue | 556 ++++++++++++++++++ .../components/approval-rejection-modal.vue | 146 +++++ .../components/approval-timeline-item.vue | 81 +++ .../components/approval-timeline.vue | 21 + .../components/copy-component.vue | 98 +++ .../components/flow-designer.vue | 52 ++ .../components/flow-info-modal.vue | 38 ++ .../components/flow-interfere-modal.vue | 171 ++++++ .../components/flow-preview.vue | 28 + .../personalCenter/components/helper.tsx | 60 ++ .../personalCenter/components/index.ts | 30 + .../components/user-select-modal.vue | 378 ++++++++++++ .../personalCenter/leave/api/index.ts | 62 ++ .../personalCenter/leave/api/model.d.ts | 107 ++++ .../property/personalCenter/leave/data.tsx | 175 ++++++ .../property/personalCenter/leave/index.vue | 200 +++++++ .../leave/leave-description.vue | 45 ++ .../personalCenter/leave/leave-form.vue | 192 ++++++ .../personalCenter/leave/leaveEdit.vue | 11 + .../personalCenter/leaveApplication/data.ts | 111 +++- .../personalCenter/leaveApplication/index.vue | 42 +- .../processDefinition/category-tree.vue | 114 ++++ .../processDefinition/constant.ts | 36 ++ .../personalCenter/processDefinition/data.tsx | 103 ++++ .../processDefinition/design.vue | 11 + .../processDefinition/index.vue | 378 ++++++++++++ .../process-definition-deploy-modal.vue | 73 +++ .../process-definition-modal.vue | 137 +++++ .../personalCenter/processInstance/data.tsx | 91 +++ .../personalCenter/processInstance/index.vue | 240 ++++++++ .../instance-invalid-modal.vue | 67 +++ .../instance-variable-modal.vue | 28 + .../personalCenter/task/allTaskWaiting.vue | 360 ++++++++++++ .../property/personalCenter/task/constant.ts | 7 + .../personalCenter/task/myDocument.vue | 257 ++++++++ .../personalCenter/task/taskCopyList.vue | 299 ++++++++++ .../personalCenter/task/taskFinish.vue | 299 ++++++++++ .../personalCenter/task/taskWaiting.vue | 302 ++++++++++ 47 files changed, 6522 insertions(+), 52 deletions(-) create mode 100644 apps/web-antd/src/views/property/personalCenter/category/category-modal.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/category/data.ts create mode 100644 apps/web-antd/src/views/property/personalCenter/category/index.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/apply-modal.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/approval-card.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/approval-content.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/approval-details.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/approval-modal.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/approval-panel.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/approval-rejection-modal.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/approval-timeline-item.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/approval-timeline.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/copy-component.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/flow-designer.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/flow-info-modal.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/flow-interfere-modal.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/flow-preview.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/components/helper.tsx create mode 100644 apps/web-antd/src/views/property/personalCenter/components/index.ts create mode 100644 apps/web-antd/src/views/property/personalCenter/components/user-select-modal.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/leave/api/index.ts create mode 100644 apps/web-antd/src/views/property/personalCenter/leave/api/model.d.ts create mode 100644 apps/web-antd/src/views/property/personalCenter/leave/data.tsx create mode 100644 apps/web-antd/src/views/property/personalCenter/leave/index.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/leave/leave-description.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/leave/leave-form.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/leave/leaveEdit.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/processDefinition/category-tree.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/processDefinition/constant.ts create mode 100644 apps/web-antd/src/views/property/personalCenter/processDefinition/data.tsx create mode 100644 apps/web-antd/src/views/property/personalCenter/processDefinition/design.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/processDefinition/index.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/processDefinition/process-definition-deploy-modal.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/processDefinition/process-definition-modal.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/processInstance/data.tsx create mode 100644 apps/web-antd/src/views/property/personalCenter/processInstance/index.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/processInstance/instance-invalid-modal.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/processInstance/instance-variable-modal.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/task/allTaskWaiting.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/task/constant.ts create mode 100644 apps/web-antd/src/views/property/personalCenter/task/myDocument.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/task/taskCopyList.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/task/taskFinish.vue create mode 100644 apps/web-antd/src/views/property/personalCenter/task/taskWaiting.vue diff --git a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/calendarView.vue b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/calendarView.vue index 774f9aa0..b60874bf 100644 --- a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/calendarView.vue +++ b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/calendarView.vue @@ -7,6 +7,7 @@ import dayjs from 'dayjs'; import arrangementModal from './arrangement-modal.vue'; import { useVbenModal } from '@vben/common-ui'; import { arrangementCalender } from '#/api/property/attendanceManagement/arrangement'; // 导入接口 +import { Modal } from 'ant-design-vue'; const emit = defineEmits<{ (e: 'changeView', value: boolean): void; @@ -19,6 +20,8 @@ const calendarData = reactive([]); const loading = ref(false); // 查询日历数据 const fetchCalendarData = async (month?: string) => { + console.log(123); + try { loading.value = true; const params = { @@ -32,47 +35,150 @@ const fetchCalendarData = async (month?: string) => { month || selectedDate.value?.format('YYYY-MM') || dayjs().format('YYYY-MM'); //当前月份的开始日期 + + // 清空之前的数据 + calendarData.length = 0; + // 生成日历渲染数据结构 for (const row of res.rows) { if (row.endDate) { + const startDate = dayjs(row.startDate); + const endDate = dayjs(row.endDate); + const currentMonthStart = dayjs(currentMonth).startOf('month'); + const currentMonthEnd = dayjs(currentMonth).endOf('month'); + //当开始时间小于当前月份的开始日期 - if (row.startDate <= currentMonth) { - console.log(row, '小'); - + if (startDate.isBefore(currentMonthStart) || startDate.isSame(currentMonthStart, 'day')) { + console.log(row, '小 - 开始时间小于等于当前月份开始时间'); + console.log('开始时间:', row.startDate); + console.log('结束时间:', row.endDate); + console.log('当前月份开始:', currentMonthStart.format('YYYY-MM-DD')); + console.log('当前月份结束:', currentMonthEnd.format('YYYY-MM-DD')); + //如果结束时间小于当前月份的结束时间,则生成当前月份开始时间到row.endDate结束时间的n条数据 //如果结束时间大于等于当前月份的结束时间,则生成当前月份开始时间到当前月份结束时间(即当前月份天数)的n条数据 + + // 确定结束日期:取row.endDate和当前月份结束日期的较小值 + const actualEndDate = endDate.isBefore(currentMonthEnd) ? endDate : currentMonthEnd; + console.log('实际结束日期:', actualEndDate.format('YYYY-MM-DD')); + + // 生成从当前月份开始到实际结束日期的数据 + let currentDate = currentMonthStart; + let generatedCount = 0; + while (currentDate.isSame(actualEndDate, 'day') || currentDate.isBefore(actualEndDate, 'day')) { + calendarData.push({ + date: currentDate.format('YYYY-MM-DD'), + item: { + id: row.id, + groupName: row.attendanceGroup.groupName, + groupId: row.attendanceGroup.id, + startDate: row.startDate, + endDate: row.endDate, + }, + }); + generatedCount++; + currentDate = currentDate.add(1, 'day'); + } + console.log(`生成了 ${generatedCount} 条数据`); } else { //当开始时间大于当前月份的开始日期 //如果结束时间小于当前月份的结束时间,则生成开始时间到结束时间的n条数据 - console.log(row, '大'); + console.log(row, '大 - 开始时间大于当前月份开始时间'); + console.log('开始时间:', row.startDate); + console.log('结束时间:', row.endDate); + console.log('当前月份开始:', currentMonthStart.format('YYYY-MM-DD')); + console.log('当前月份结束:', currentMonthEnd.format('YYYY-MM-DD')); + + // 确定结束日期:取row.endDate和当前月份结束日期的较小值 + const actualEndDate = endDate.isBefore(currentMonthEnd) ? endDate : currentMonthEnd; + console.log('实际结束日期:', actualEndDate.format('YYYY-MM-DD')); + + // 生成从开始日期到实际结束日期的数据 + let currentDate = startDate; + let generatedCount = 0; + while (currentDate.isSame(actualEndDate, 'day') || currentDate.isBefore(actualEndDate, 'day')) { + calendarData.push({ + date: currentDate.format('YYYY-MM-DD'), + item: { + id: row.id, + groupName: row.attendanceGroup.groupName, + groupId: row.attendanceGroup.id, + startDate: row.startDate, + endDate: row.endDate, + }, + }); + generatedCount++; + currentDate = currentDate.add(1, 'day'); + } + console.log(`生成了 ${generatedCount} 条数据`); } } else { + // 没有结束日期的情况,只在开始日期添加一条数据 calendarData.push({ - data: row.startDate, + date: row.startDate, item: { id: row.id, groupName: row.attendanceGroup.groupName, groupId: row.attendanceGroup.id, + startDate: row.startDate, + endDate: row.endDate, }, }); } } - // if (response) { - // calendarData.value = response.data || []; - // console.log('日历数据:', calendarData.value); - // } + console.log('日历数据:', calendarData); + //变量calendarData,日期相同的数据放到一个对象中,数据结构为scheduleData + + // 将calendarData按日期分组,形成scheduleData结构 + const groupedData = new Map(); + + // 遍历calendarData,按日期分组 + calendarData.forEach(item => { + const date = item.date; + if (!groupedData.has(date)) { + groupedData.set(date, []); + } + groupedData.get(date)!.push(item.item); + }); + + // 转换为scheduleData格式 + scheduleData.length = 0; // 清空原有数据 + groupedData.forEach((items, date) => { + scheduleData.push({ + date: date, + list: items.map(item => ({ + type: 'success' as BadgeProps['status'], + content: item.groupName || '排班安排', + item: item + })) + }); + }); + + console.log('处理后的scheduleData:', scheduleData); + + // 测试:验证生成的日历数据 + console.log('=== 日历数据验证 ==='); + console.log('当前月份:', currentMonth); + console.log('原始数据条数:', res.rows.length); + console.log('生成的日历数据条数:', calendarData.length); + console.log('分组后的数据条数:', scheduleData.length); + + // 验证是否有重复日期 + const dateCounts = new Map(); + calendarData.forEach(item => { + const count = dateCounts.get(item.date) || 0; + dateCounts.set(item.date, count + 1); + }); + + console.log('日期分布:', Object.fromEntries(dateCounts)); + console.log('=== 验证完成 ==='); + } catch (error) { + console.error('获取日历数据失败:', error); + message.error('获取日历数据失败'); } finally { loading.value = false; } }; - -// 切换视图模式 -function handleViewModeChange(e: RadioChangeEvent): void { - // 将父组件的isCalenderView变为true - emit('changeView', e.target.value); -} - -// 日历模拟数据 const scheduleData: { date: string; list: { type: BadgeProps['status']; content: string }[]; @@ -81,18 +187,25 @@ const scheduleData: { { date: '2025-07-06', list: [{ type: 'success', content: '8月8日事件' }] }, // ... ]; +// 切换视图模式 +function handleViewModeChange(e: RadioChangeEvent): void { + // 将父组件的isCalenderView变为true + emit('changeView', e.target.value); +} const getListData2 = ( current: Dayjs, -): { type: BadgeProps['status']; content: string }[] => { +): { type: BadgeProps['status']; content: string; item?: any }[] => { const dateStr = current.format('YYYY-MM-DD'); - // 优先使用接口数据 - if (calendarData.length > 0) { - const found = calendarData.find((item) => item.date === dateStr); + + // 使用scheduleData结构 + if (scheduleData.length > 0) { + const found = scheduleData.find((item) => item.date === dateStr); if (found) { - return found.list || []; + return found.list; } } + // 如果没有找到数据,返回空数组 return []; }; @@ -130,13 +243,8 @@ const getListData = ( return listData || []; }; -const getMonthData = (value: Dayjs) => { - if (value.month() === 8) { - return 1394; - } -}; function customHeader() { - // 返回你想要的VNode或null + // 返回想要的VNode或null return null; // 什么都不显示 } const [ArrangementModal, modalApi] = useVbenModal({ @@ -147,6 +255,57 @@ function handleAdd() { modalApi.open(); } +// 编辑排班 +function handleEdit(item: any) { +console.log(815328); + + // modalApi.setData({ + // id: item.id, + // groupId: item.groupId, + // startDate: item.startDate, + // endDate: item.endDate, + // }); + // modalApi.open(); +} + +// 删除排班 +function handleDelete(item: any) { + Modal.confirm({ + title: '确认删除', + content: '确定要删除这个排班安排吗?', + onOk: async () => { + try { + // 这里需要调用删除接口 + // await deleteArrangement(item.id); + message.success('删除成功'); + fetchCalendarData(); + } catch (error) { + console.error('删除失败:', error); + message.error('删除失败'); + } + }, + }); +} + +// 查看详情 +function handleViewDetails(item: any) { + // 这里可以打开详情弹窗或跳转到详情页面 + console.log('查看详情:', item); +} + +// 获取指定日期的所有排班项目 +function getScheduleItemsByDate(date: string) { + const found = scheduleData.find((item) => item.date === date); + return found ? found.list : []; +} + +// 查看某日期的所有排班详情 +function handleViewDateDetails(date: string) { + const items = getScheduleItemsByDate(date); + console.log(`${date} 的所有排班安排:`, items); + // 这里可以打开详情弹窗显示该日期的所有排班 +} + // 页面初始化时加载数据 onMounted(() => { fetchCalendarData(); @@ -169,6 +328,7 @@ onMounted(() => { picker="month" v-model:value="selectedDate" @change="fetchCalendarData()" + @select="fetchCalendarData()" /> @@ -187,29 +347,32 @@ onMounted(() => { - {{ item.content }} - 编辑 - 删除 + + + 编辑 + + + 删除 + + 详情 + 详情 + - - - {{ getMonthData(current) }} - Backlog number - - @@ -228,6 +391,32 @@ onMounted(() => { text-overflow: ellipsis; font-size: 12px; } +.events li { + margin-bottom: 4px; + padding: 4px; + /* background-color: #f6ffed; */ + /* border: 1px solid #b7eb8f; */ + border-radius: 4px; + font-size: 12px; +} +.events li span { + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; +} +.events li .action-buttons { + display: flex; + gap: 4px; + margin-top: 2px; +} +.events li a { + font-size: 11px; + text-decoration: none; +} +.events li a:hover { + text-decoration: underline; +} .notes-month { text-align: center; font-size: 28px; diff --git a/apps/web-antd/src/views/property/personalCenter/category/category-modal.vue b/apps/web-antd/src/views/property/personalCenter/category/category-modal.vue new file mode 100644 index 00000000..c2816b44 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/category/category-modal.vue @@ -0,0 +1,137 @@ + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/category/data.ts b/apps/web-antd/src/views/property/personalCenter/category/data.ts new file mode 100644 index 00000000..9dfe1940 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/category/data.ts @@ -0,0 +1,69 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + +export const querySchema: FormSchemaGetter = () => [ + { + fieldName: 'categoryName', + label: '分类名称', + component: 'Input', + }, + { + fieldName: 'categoryCode', + label: '分类编码', + component: 'Input', + }, +]; + +export const columns: VxeGridProps['columns'] = [ + { + field: 'categoryName', + title: '分类名称', + treeNode: true, + }, + { + field: 'orderNum', + title: '排序', + }, + { + field: 'createTime', + title: '创建时间', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + resizable: false, + width: 'auto', + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: 'categoryId', + fieldName: 'categoryId', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + fieldName: 'parentId', + label: '父级分类', + rules: 'required', + defaultValue: 100, + component: 'TreeSelect', + }, + { + fieldName: 'categoryName', + label: '分类名称', + component: 'Input', + rules: 'required', + }, + { + fieldName: 'orderNum', + label: '排序', + component: 'InputNumber', + }, +]; diff --git a/apps/web-antd/src/views/property/personalCenter/category/index.vue b/apps/web-antd/src/views/property/personalCenter/category/index.vue new file mode 100644 index 00000000..5131775d --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/category/index.vue @@ -0,0 +1,153 @@ + + + + + + + + + {{ $t('pages.common.collapse') }} + + + {{ $t('pages.common.expand') }} + + + {{ $t('pages.common.add') }} + + + + + + + {{ $t('pages.common.edit') }} + + + {{ $t('pages.common.add') }} + + + + {{ $t('pages.common.delete') }} + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/apply-modal.vue b/apps/web-antd/src/views/property/personalCenter/components/apply-modal.vue new file mode 100644 index 00000000..d0116f03 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/apply-modal.vue @@ -0,0 +1,149 @@ + + + + + + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/approval-card.vue b/apps/web-antd/src/views/property/personalCenter/components/approval-card.vue new file mode 100644 index 00000000..d8f1a060 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/approval-card.vue @@ -0,0 +1,93 @@ + + + + + + + + + + {{ info.nodeName }} + + + {{ info.createTime }} + + + + + + + + {{ info.createByName }} + + + + + + + {{ diffUpdateTimeString }}前更新 + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/approval-content.vue b/apps/web-antd/src/views/property/personalCenter/components/approval-content.vue new file mode 100644 index 00000000..8db040d0 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/approval-content.vue @@ -0,0 +1,26 @@ + + + + + + {{ description }} + $emit('update:value', e.target.value!)" + /> + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/approval-details.vue b/apps/web-antd/src/views/property/personalCenter/components/approval-details.vue new file mode 100644 index 00000000..09adcff9 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/approval-details.vue @@ -0,0 +1,41 @@ + + + + + + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/approval-modal.vue b/apps/web-antd/src/views/property/personalCenter/components/approval-modal.vue new file mode 100644 index 00000000..bc9e7b90 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/approval-modal.vue @@ -0,0 +1,227 @@ + + + + + + + + + + + + + {{ item.nodeName }} + + + + 没有权限, 请联系管理员 + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/approval-panel.vue b/apps/web-antd/src/views/property/personalCenter/components/approval-panel.vue new file mode 100644 index 00000000..b0a5632f --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/approval-panel.vue @@ -0,0 +1,556 @@ + + + + + + + + 编号: {{ task.id }} + + + + + handleLoadInfo(task)"> + + + + + + + + + {{ task.flowName }} + + + + + + + {{ task.createByName }} + + + + 流程分类: {{ task.categoryName }} + + + + + 提交时间: {{ task.createTime }} + + + + + + + + + + + + + + + + + + + + 撤销申请 + + + 重新编辑 + + + 删除 + + + + 通过 + + 终止 + + + 驳回 + + + + + delegationModalApi.open()" + > + 委托 + + transferModalApi.open()" + > + 转办 + + addSignatureModalApi.open()" + > + 加签 + + reductionSignatureModalApi.open()" + > + 减签 + + + + 其他 + + + + + + + + + + 流程干预 + updateAssigneeModalApi.open()"> + 修改办理人 + + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/approval-rejection-modal.vue b/apps/web-antd/src/views/property/personalCenter/components/approval-rejection-modal.vue new file mode 100644 index 00000000..8f2d42b9 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/approval-rejection-modal.vue @@ -0,0 +1,146 @@ + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/approval-timeline-item.vue b/apps/web-antd/src/views/property/personalCenter/components/approval-timeline-item.vue new file mode 100644 index 00000000..924de720 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/approval-timeline-item.vue @@ -0,0 +1,81 @@ + + + + + + + + + + + + {{ item.nodeName }} + + + {{ item.approveName }} + {{ item.updateTime }} + + {{ item.message }} + + + + + + + {{ attachment.name }} + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/approval-timeline.vue b/apps/web-antd/src/views/property/personalCenter/components/approval-timeline.vue new file mode 100644 index 00000000..b469099e --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/approval-timeline.vue @@ -0,0 +1,21 @@ + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/copy-component.vue b/apps/web-antd/src/views/property/personalCenter/components/copy-component.vue new file mode 100644 index 00000000..ead8f89a --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/copy-component.vue @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + +{{ userListModel.length - props.ellipseNumber }} + + + + 选择人员 + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/flow-designer.vue b/apps/web-antd/src/views/property/personalCenter/components/flow-designer.vue new file mode 100644 index 00000000..1f678f4c --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/flow-designer.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/flow-info-modal.vue b/apps/web-antd/src/views/property/personalCenter/components/flow-info-modal.vue new file mode 100644 index 00000000..034d1565 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/flow-info-modal.vue @@ -0,0 +1,38 @@ + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/flow-interfere-modal.vue b/apps/web-antd/src/views/property/personalCenter/components/flow-interfere-modal.vue new file mode 100644 index 00000000..38b6d66c --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/flow-interfere-modal.vue @@ -0,0 +1,171 @@ + + + + + + + {{ taskInfo.nodeName }} + + + {{ taskInfo.nodeCode }} + + + {{ taskInfo.createTime }} + + + {{ taskInfo.instanceId }} + + + {{ taskInfo.version }} + + + {{ taskInfo.businessId }} + + + + + + + + addSignatureModalApi.open()">加签 + reductionSignatureModalApi.open()"> + 减签 + + + transferModalApi.open()">转办 + 终止 + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/flow-preview.vue b/apps/web-antd/src/views/property/personalCenter/components/flow-preview.vue new file mode 100644 index 00000000..6be8b703 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/flow-preview.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/components/helper.tsx b/apps/web-antd/src/views/property/personalCenter/components/helper.tsx new file mode 100644 index 00000000..a4ec7a41 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/helper.tsx @@ -0,0 +1,60 @@ +import { defineComponent, h, ref } from 'vue'; + +import { Modal } from 'ant-design-vue'; +import dayjs from 'dayjs'; +import duration from 'dayjs/plugin/duration'; +import relativeTime from 'dayjs/plugin/relativeTime'; + +import ApprovalContent from './approval-content.vue'; + +export interface ApproveWithReasonModalProps { + title: string; + description: string; + onOk: (reason: string) => void; +} + +/** + * 带审批意见的confirm + * @param props props + */ +export function approveWithReasonModal(props: ApproveWithReasonModalProps) { + const { onOk, title, description } = props; + const content = ref(''); + Modal.confirm({ + title, + content: h( + defineComponent({ + setup() { + return () => + h(ApprovalContent, { + description, + value: content.value, + 'onUpdate:value': (v) => (content.value = v), + }); + }, + }), + ), + centered: true, + okButtonProps: { danger: true }, + onOk: () => onOk(content.value), + }); +} + +dayjs.extend(duration); +dayjs.extend(relativeTime); +/** + * 计算相差的时间 + * @param dateTime 时间字符串 + * @returns 相差的时间 + */ +export function getDiffTimeString(dateTime: string) { + // 计算相差秒数 + const diffSeconds = dayjs().diff(dayjs(dateTime), 'second'); + /** + * 转为时间显示(x月 x天) + * https://dayjs.fenxianglu.cn/category/duration.html#%E4%BA%BA%E6%80%A7%E5%8C%96 + * + */ + const diffText = dayjs.duration(diffSeconds, 'seconds').humanize(); + return diffText; +} diff --git a/apps/web-antd/src/views/property/personalCenter/components/index.ts b/apps/web-antd/src/views/property/personalCenter/components/index.ts new file mode 100644 index 00000000..4155011d --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/index.ts @@ -0,0 +1,30 @@ +export { default as applyModal } from './apply-modal.vue'; +export { default as ApprovalCard } from './approval-card.vue'; +/** + * 审批同意 + */ +export { default as approvalModal } from './approval-modal.vue'; +export { default as ApprovalPanel } from './approval-panel.vue'; +/** + * 审批驳回 + */ +export { default as approvalRejectionModal } from './approval-rejection-modal.vue'; +export { default as ApprovalTimeline } from './approval-timeline.vue'; +/** + * 选择抄送人 + */ +export { default as CopyComponent } from './copy-component.vue'; + +/** + * 详情信息 modal + */ +export { default as flowInfoModal } from './flow-info-modal.vue'; +/** + * 流程干预 modal + */ +export { default as flowInterfereModal } from './flow-interfere-modal.vue'; + +/** + * 选人 支持单选/多选 + */ +export { default as userSelectModal } from './user-select-modal.vue'; diff --git a/apps/web-antd/src/views/property/personalCenter/components/user-select-modal.vue b/apps/web-antd/src/views/property/personalCenter/components/user-select-modal.vue new file mode 100644 index 00000000..4789f6c4 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/components/user-select-modal.vue @@ -0,0 +1,378 @@ + + + + + + + tableApi.reload()" + @select="handleDeptQuery" + /> + + + + + + + {{ row.nickName }} + + {{ row.phonenumber || '暂无手机号' }} + + + + + + + + + + 已选中人员 + + + 清空选中 + + + + + + + + + + + {{ row.nickName }} + + + {{ row.phonenumber || '暂无手机号' }} + + + + + + + 移除 + + + + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/leave/api/index.ts b/apps/web-antd/src/views/property/personalCenter/leave/api/index.ts new file mode 100644 index 00000000..20b87efc --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/leave/api/index.ts @@ -0,0 +1,62 @@ +import type { LeaveForm, LeaveQuery, LeaveVO } from './model'; + +import type { ID, IDS, PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** + * 查询请假申请列表 + * @param params + * @returns 请假申请列表 + */ +export function leaveList(params?: LeaveQuery) { + return requestClient.get>('/workflow/leave/list', { + params, + }); +} + +/** + * 导出请假申请列表 + * @param params + * @returns 请假申请列表 + */ +export function leaveExport(params?: LeaveQuery) { + return commonExport('/workflow/leave/export', params ?? {}); +} + +/** + * 查询请假申请详情 + * @param id id + * @returns 请假申请详情 + */ +export function leaveInfo(id: ID) { + return requestClient.get(`/workflow/leave/${id}`); +} + +/** + * 新增请假申请 + * @param data + * @returns void + */ +export function leaveAdd(data: LeaveForm) { + return requestClient.postWithMsg('/workflow/leave', data); +} + +/** + * 更新请假申请 + * @param data + * @returns void + */ +export function leaveUpdate(data: LeaveForm) { + return requestClient.putWithMsg('/workflow/leave', data); +} + +/** + * 删除请假申请 + * @param id id + * @returns void + */ +export function leaveRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/workflow/leave/${id}`); +} diff --git a/apps/web-antd/src/views/property/personalCenter/leave/api/model.d.ts b/apps/web-antd/src/views/property/personalCenter/leave/api/model.d.ts new file mode 100644 index 00000000..c1b0dbf7 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/leave/api/model.d.ts @@ -0,0 +1,107 @@ +import type { BaseEntity, PageQuery } from '#/api/common'; + +export interface LeaveVO { + /** + * 主键 + */ + id: number | string; + + /** + * 请假类型 + */ + leaveType: string; + + /** + * 开始时间 + */ + startDate: string; + + /** + * 结束时间 + */ + endDate: string; + + /** + * 请假天数 + */ + leaveDays: number; + + /** + * 请假原因 + */ + remark: string; + + /** + * + */ + status: string; +} + +export interface LeaveForm extends BaseEntity { + /** + * 主键 + */ + id?: number | string; + + /** + * 请假类型 + */ + leaveType?: string; + + /** + * 开始时间 + */ + startDate?: string; + + /** + * 结束时间 + */ + endDate?: string; + + /** + * 请假天数 + */ + leaveDays?: number; + + /** + * 请假原因 + */ + remark?: string; + + /** + * + */ + status?: string; +} + +export interface LeaveQuery extends PageQuery { + /** + * 请假类型 + */ + leaveType?: string; + + /** + * 开始时间 + */ + startDate?: string; + + /** + * 结束时间 + */ + endDate?: string; + + /** + * 请假天数 + */ + leaveDays?: number; + + /** + * + */ + status?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/personalCenter/leave/data.tsx b/apps/web-antd/src/views/property/personalCenter/leave/data.tsx new file mode 100644 index 00000000..7eb3441b --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/leave/data.tsx @@ -0,0 +1,175 @@ +import type { FormSchemaGetter, VbenFormSchema } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + +import { DictEnum } from '@vben/constants'; +import { getPopupContainer } from '@vben/utils'; + +import dayjs from 'dayjs'; + +import { OptionsTag } from '#/components/table'; +import { renderDict } from '#/utils/render'; + +export const leaveTypeOptions = [ + { label: '病假', value: '1' }, + { label: '事假', value: '2' }, + { label: '年假', value: '3' }, + { label: '婚假', value: '4' }, + { label: '产假', value: '5' }, + { label: '其他', value: '7' }, +]; + +export const leaveFlowOptions = [ + { label: '请假流程-普通', value: 'leave1' }, + { label: '请假流程-排他网关', value: 'leave2' }, + { label: '请假流程-并行网关', value: 'leave3' }, + { label: '请假流程-会签', value: 'leave4' }, + { label: '请假申请-并行会签网关', value: 'leave5' }, + { label: '请假申请-排他并行网关', value: 'leave6' }, +]; + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'InputNumber', + componentProps: { + min: 1, + }, + fieldName: 'startLeaveDays', + label: '请假天数', + }, + { + component: 'InputNumber', + componentProps: { + min: 1, + }, + fieldName: 'endLeaveDays', + label: '至', + labelClass: 'justify-center', + }, +]; + +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '请假类型', + field: 'leaveType', + slots: { + default: ({ row }) => { + return ; + }, + }, + }, + { + title: '开始时间', + field: 'startDate', + formatter: ({ cellValue }) => dayjs(cellValue).format('YYYY-MM-DD'), + }, + { + title: '结束时间', + field: 'endDate', + formatter: ({ cellValue }) => dayjs(cellValue).format('YYYY-MM-DD'), + }, + { + title: '请假天数', + field: 'leaveDays', + formatter: ({ cellValue }) => `${cellValue}天`, + }, + { + title: '请假原因', + field: 'remark', + }, + { + title: '流程状态', + field: 'status', + slots: { + default: ({ row }) => { + return renderDict(row.status, DictEnum.WF_BUSINESS_STATUS); + }, + }, + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + resizable: false, + width: 'auto', + }, +]; + +export const modalSchema: (isEdit: boolean) => VbenFormSchema[] = ( + isEdit: boolean, +) => [ + { + label: '主键', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '流程类型', + fieldName: 'flowType', + component: 'Select', + help: '这里仅仅为了发起流程方便, 实际不应该包含此字段', + componentProps: { + options: leaveFlowOptions, + getPopupContainer, + }, + defaultValue: 'leave1', + rules: 'selectRequired', + dependencies: { + show: () => isEdit, + triggerFields: [''], + }, + }, + { + label: '请假类型', + fieldName: 'leaveType', + component: 'Select', + componentProps: { + options: leaveTypeOptions, + getPopupContainer, + }, + rules: 'selectRequired', + formItemClass: 'col-span-1', + }, + { + label: '开始时间', + fieldName: 'dateRange', + component: 'RangePicker', + componentProps(model) { + return { + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + onChange: (dates: [string, string]) => { + if (!dates) { + model.leaveDays = null; + return; + } + const [start, end] = dates; + const leaveDays = dayjs(end).diff(dayjs(start), 'day') + 1; + model.leaveDays = leaveDays; + }, + }; + }, + rules: 'required', + formItemClass: 'col-span-1', + }, + { + label: '请假天数', + fieldName: 'leaveDays', + component: 'Input', + componentProps: { + disabled: true, + }, + rules: 'required', + }, + { + label: '请假原因', + fieldName: 'remark', + component: 'Textarea', + formItemClass: 'items-start', + }, +]; diff --git a/apps/web-antd/src/views/property/personalCenter/leave/index.vue b/apps/web-antd/src/views/property/personalCenter/leave/index.vue new file mode 100644 index 00000000..8e46ab00 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/leave/index.vue @@ -0,0 +1,200 @@ + + + + + + + + + {{ $t('pages.common.export') }} + + + {{ $t('pages.common.delete') }} + + + {{ $t('pages.common.add') }} + + + + + + + {{ $t('pages.common.edit') }} + + + + 撤销 + + + + 详情 + + + + {{ $t('pages.common.delete') }} + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/leave/leave-description.vue b/apps/web-antd/src/views/property/personalCenter/leave/leave-description.vue new file mode 100644 index 00000000..d81ef9b8 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/leave/leave-description.vue @@ -0,0 +1,45 @@ + + + + + + {{ leaveType }} + + + {{ formatDate(data.startDate) }} - {{ formatDate(data.endDate) }} + + + {{ data.leaveDays }}天 + + + {{ data.remark || '无' }} + + + diff --git a/apps/web-antd/src/views/property/personalCenter/leave/leave-form.vue b/apps/web-antd/src/views/property/personalCenter/leave/leave-form.vue new file mode 100644 index 00000000..0e4d7751 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/leave/leave-form.vue @@ -0,0 +1,192 @@ + + + + + + + + + + 暂存 + 提交 + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/leave/leaveEdit.vue b/apps/web-antd/src/views/property/personalCenter/leave/leaveEdit.vue new file mode 100644 index 00000000..f7b08309 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/leave/leaveEdit.vue @@ -0,0 +1,11 @@ + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/leaveApplication/data.ts b/apps/web-antd/src/views/property/personalCenter/leaveApplication/data.ts index b75bac23..17622b13 100644 --- a/apps/web-antd/src/views/property/personalCenter/leaveApplication/data.ts +++ b/apps/web-antd/src/views/property/personalCenter/leaveApplication/data.ts @@ -3,7 +3,8 @@ import type { VxeGridProps } from '#/adapter/vxe-table'; import { getDictOptions } from '#/utils/dict'; import { renderDict } from '#/utils/render'; - +import {resident_unitList} from '#/api/property/resident/unit/index' +import dayjs from 'dayjs'; export const modalSchema: FormSchemaGetter = () => [ { @@ -25,6 +26,15 @@ export const modalSchema: FormSchemaGetter = () => [ label: '部门', fieldName: 'departmentId', component: 'ApiSelect', + componentProps:{ + api: async () => { + const res = await resident_unitList({pageSize:1000000000,pageNum:1}) + return res; + }, + resultField:'rows', + labelField:'name', + valueField:'id' + }, rules:'required' }, { @@ -32,43 +42,126 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'leaveType', component: 'Select', componentProps: { + options:getDictOptions('wy_qjlx') }, rules:'required' }, + { + label: '', + fieldName: 'Placeholder', + component: '' + }, { label: '开始时间', fieldName: 'startTime', component: 'DatePicker', - componentProps: { + componentProps: (values)=>({ showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, + onChange: (value: string) => { + if (value && values.endTime) { + const start = dayjs(value); + const end = dayjs(values.endTime); + const diffMinutes = end.diff(start, 'minute'); + + if (diffMinutes < 0) { + values.totalDuration = '时间计算错误'; + return; + } + + const days = Math.floor(diffMinutes / (24 * 60)); + const remainingMinutes = diffMinutes % (24 * 60); + const hours = Math.floor(remainingMinutes / 60); + const minutes = remainingMinutes % 60; + + let durationText = ''; + if (days > 0) { + durationText += `${days}天`; + } + if (hours > 0 || days > 0) { + durationText += `${hours}小时`; + } + durationText += `${minutes}分钟`; + + // 更新合计时间字段 + values.totalDuration = durationText; + } else { + // 如果开始时间被清空,也清空合计时间 + values.totalDuration = ''; + } + }, + }), rules:'required' - }, { label: '结束时间', fieldName: 'endTime', component: 'DatePicker', - componentProps: { + componentProps: (values)=>({ showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - rules:'required' + placeholder:!values.startTime?'请先选择开始时间':'请选择结束时间(结束时间不能早于开始时间)', + disabled:!values.startTime, + disabledDate: (current: any) => { + if (!values.startTime) return false; + // 只允许选择大于等于开始时间的日期,将小于等于的时间禁用 + return current && current <= dayjs(values.startTime).startOf('second'); + }, + onChange: (value: string) => { + if (values.startTime && value) { + const start = dayjs(values.startTime); + const end = dayjs(value); + const diffMinutes = end.diff(start, 'minute'); + + if (diffMinutes < 0) { + values.totalDuration = '时间计算错误'; + return; + } + + const days = Math.floor(diffMinutes / (24 * 60)); + const remainingMinutes = diffMinutes % (24 * 60); + const hours = Math.floor(remainingMinutes / 60); + const minutes = remainingMinutes % 60; + + let durationText = ''; + if (days > 0) { + durationText += `${days}天`; + } + if (hours > 0 || days > 0) { + durationText += `${hours}小时`; + } + durationText += `${minutes}分钟`; + + // 更新合计时间字段 + values.totalDuration = durationText; + } else { + // 如果结束时间被清空,也清空合计时间 + values.totalDuration = ''; + } + }, + }), + rules:'required', + dependencies:{ + triggerFields:['startTime'] + } }, { label: '合计时间', fieldName: 'totalDuration', component: 'Input', disabled:true, - rules:'required' + rules:'required', + componentProps:{ + placeholder:'请选择开始时间与结束时间' + } }, { label: '请假事由', fieldName: 'reason', component: 'Textarea', - rules:'required' + rules:'required', + formItemClass: 'col-span-2' } ]; diff --git a/apps/web-antd/src/views/property/personalCenter/leaveApplication/index.vue b/apps/web-antd/src/views/property/personalCenter/leaveApplication/index.vue index 8bba1c88..46134fbb 100644 --- a/apps/web-antd/src/views/property/personalCenter/leaveApplication/index.vue +++ b/apps/web-antd/src/views/property/personalCenter/leaveApplication/index.vue @@ -12,6 +12,7 @@ import { useVbenForm } from '#/adapter/form'; import { useVbenModal} from '@vben/common-ui'; import {modalSchema} from "./data"; import { useVModel } from '@vueuse/core'; +import { Button, message } from 'ant-design-vue'; const [BasicForm, formApi] = useVbenForm({ commonConfig: { @@ -25,8 +26,30 @@ const [BasicForm, formApi] = useVbenForm({ }, schema: modalSchema(), showDefaultActions: false, - wrapperClass: 'grid-cols-2 gap-x-10 gap-y-2', + wrapperClass: 'grid-cols-2', }); + +// 提交处理函数 +async function handleSubmit() { + const { valid } = await formApi.validate(); + if (!valid) { + message.error('请完善表单信息'); + return; + } + + const formData = await formApi.getValues(); + formData.startTime = dayjs(formData.startTime).format('YYYY-MM-DD HH:mm:ss'); + formData.endTime = dayjs(formData.endTime).format('YYYY-MM-DD HH:mm:ss'); + + console.log('提交数据:', formData); + // await leaveApplicationAdd(formData); + + message.success('提交成功'); + await formApi.resetForm(); +} +async function cleanForm () { + await formApi.resetForm(); +} @@ -34,6 +57,23 @@ const [BasicForm, formApi] = useVbenForm({ 请假申请 + + 提交申请 + 重置 + + diff --git a/apps/web-antd/src/views/property/personalCenter/processDefinition/category-tree.vue b/apps/web-antd/src/views/property/personalCenter/processDefinition/category-tree.vue new file mode 100644 index 00000000..901038c8 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/processDefinition/category-tree.vue @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + {{ label.substring(0, label.indexOf(searchValue)) }} + {{ searchValue }} + {{ + label.substring( + label.indexOf(searchValue) + searchValue.length, + ) + }} + + {{ label }} + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/processDefinition/constant.ts b/apps/web-antd/src/views/property/personalCenter/processDefinition/constant.ts new file mode 100644 index 00000000..e24dfc7f --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/processDefinition/constant.ts @@ -0,0 +1,36 @@ +import { optionsToEnum } from '@vben/utils'; + +export const activityStatusOptions = [ + { + label: '激活', + value: 1, + color: 'success', + enumName: 'Active', + }, + { + label: '挂起', + value: 0, + color: 'error', + enumName: 'Suspended', + }, +] as const; + +export const ActivityStatusEnum = optionsToEnum(activityStatusOptions); + +export const publishStatusOptions = [ + { + label: '已发布', + value: 1, + color: 'success', + }, + { + label: '未发布', + value: 0, + color: 'warning', + }, + { + label: '失效', + value: 9, + color: 'error', + }, +]; diff --git a/apps/web-antd/src/views/property/personalCenter/processDefinition/data.tsx b/apps/web-antd/src/views/property/personalCenter/processDefinition/data.tsx new file mode 100644 index 00000000..dafc2e1a --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/processDefinition/data.tsx @@ -0,0 +1,103 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + +import { OptionsTag } from '#/components/table'; + +import { publishStatusOptions } from './constant'; + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'flowName', + label: '流程名称', + }, + { + component: 'Input', + fieldName: 'flowCode', + label: '流程code', + }, +]; + +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + field: 'flowName', + title: '流程名称', + minWidth: 150, + }, + { + field: 'flowCode', + title: '流程code', + minWidth: 150, + }, + { + field: 'version', + title: '版本号', + minWidth: 80, + formatter: ({ cellValue }) => `V${cellValue}.0`, + }, + { + field: 'activityStatus', + title: '激活状态', + minWidth: 100, + slots: { + default: 'activityStatus', + }, + }, + { + field: 'isPublish', + title: '发布状态', + minWidth: 100, + slots: { + default: ({ row }) => { + const cellValue = row.isPublish; + return ( + + ); + }, + }, + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + resizable: false, + width: 'auto', + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + fieldName: 'id', + }, + { + component: 'TreeSelect', + fieldName: 'category', + label: '流程分类', + rules: 'selectRequired', + }, + { + component: 'Input', + fieldName: 'flowCode', + label: '流程code', + rules: 'required', + }, + { + component: 'Input', + fieldName: 'flowName', + label: '流程名称', + rules: 'required', + }, + { + component: 'Input', + fieldName: 'formPath', + label: '表单路径', + rules: 'required', + }, +]; diff --git a/apps/web-antd/src/views/property/personalCenter/processDefinition/design.vue b/apps/web-antd/src/views/property/personalCenter/processDefinition/design.vue new file mode 100644 index 00000000..232fdba2 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/processDefinition/design.vue @@ -0,0 +1,11 @@ + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/processDefinition/index.vue b/apps/web-antd/src/views/property/personalCenter/processDefinition/index.vue new file mode 100644 index 00000000..d924f148 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/processDefinition/index.vue @@ -0,0 +1,378 @@ + + + + + + + tableApi.reload()" + @select="() => tableApi.reload()" + /> + + + + + + + + {{ $t('pages.common.delete') }} + + + 部署 + + + {{ $t('pages.common.add') }} + + + + + handleActive(row, status)" + /> + + + + + + 编辑信息 + + + + 删除流程 + + + + + + {{ row.isPublish ? '查看流程' : '设计流程' }} + + + + 发布流程 + + + + + + 复制流程 + + + 导出流程 + + + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/processDefinition/process-definition-deploy-modal.vue b/apps/web-antd/src/views/property/personalCenter/processDefinition/process-definition-deploy-modal.vue new file mode 100644 index 00000000..fa9ef352 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/processDefinition/process-definition-deploy-modal.vue @@ -0,0 +1,73 @@ + + + + + + + + + + + 点击或者拖拽到此处上传[json]文件 + + + diff --git a/apps/web-antd/src/views/property/personalCenter/processDefinition/process-definition-modal.vue b/apps/web-antd/src/views/property/personalCenter/processDefinition/process-definition-modal.vue new file mode 100644 index 00000000..c73efbd8 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/processDefinition/process-definition-modal.vue @@ -0,0 +1,137 @@ + + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/processInstance/data.tsx b/apps/web-antd/src/views/property/personalCenter/processInstance/data.tsx new file mode 100644 index 00000000..6e7e711d --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/processInstance/data.tsx @@ -0,0 +1,91 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + +import { DictEnum } from '@vben/constants'; + +import { OptionsTag } from '#/components/table'; +import { renderDict } from '#/utils/render'; + +import { activityStatusOptions } from '../processDefinition/constant'; + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + label: '任务名称', + fieldName: 'nodeName', + }, + { + component: 'Input', + label: '流程名称', + fieldName: 'flowName', + }, + { + component: 'Input', + label: '流程编码', + fieldName: 'flowCode', + }, +]; + +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + field: 'flowName', + title: '流程名称', + minWidth: 150, + }, + { + field: 'nodeName', + title: '任务名称', + minWidth: 150, + }, + { + field: 'flowCode', + title: '流程编码', + minWidth: 150, + }, + { + field: 'createByName', + title: '申请人', + minWidth: 150, + }, + { + field: 'version', + title: '版本号', + minWidth: 150, + formatter: ({ cellValue }) => `V${cellValue}.0`, + }, + { + field: 'activityStatus', + title: '状态', + minWidth: 100, + slots: { + default: ({ row }) => { + const cellValue = row.activityStatus; + return ( + + ); + }, + }, + }, + { + field: 'flowStatus', + title: '流程状态', + minWidth: 100, + slots: { + default: ({ row }) => { + return renderDict(row.flowStatus, DictEnum.WF_BUSINESS_STATUS); + }, + }, + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + resizable: false, + width: 200, + }, +]; diff --git a/apps/web-antd/src/views/property/personalCenter/processInstance/index.vue b/apps/web-antd/src/views/property/personalCenter/processInstance/index.vue new file mode 100644 index 00000000..653dca5e --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/processInstance/index.vue @@ -0,0 +1,240 @@ + + + + + + tableApi.reload()" + @select="() => tableApi.reload()" + /> + + + + + + + + {{ $t('pages.common.delete') }} + + + + + + + + 作废流程 + + + + 删除流程 + + + + + + 流程预览 + + + 变量查看 + + + + + + + tableApi.reload()" /> + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/processInstance/instance-invalid-modal.vue b/apps/web-antd/src/views/property/personalCenter/processInstance/instance-invalid-modal.vue new file mode 100644 index 00000000..58727b2b --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/processInstance/instance-invalid-modal.vue @@ -0,0 +1,67 @@ + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/processInstance/instance-variable-modal.vue b/apps/web-antd/src/views/property/personalCenter/processInstance/instance-variable-modal.vue new file mode 100644 index 00000000..420a9d0c --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/processInstance/instance-variable-modal.vue @@ -0,0 +1,28 @@ + + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/task/allTaskWaiting.vue b/apps/web-antd/src/views/property/personalCenter/task/allTaskWaiting.vue new file mode 100644 index 00000000..2288acf5 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/task/allTaskWaiting.vue @@ -0,0 +1,360 @@ + + + + + + + + + + + + + + + + + + + + 搜索 + + + reload(false)" + > + + + (popoverOpen = true)" + @finish="handleFinish" + /> + + + + + + + + + + + + + + 搜索 + + + 重置 + + + + + + + + + + + + + + + + + + 没有更多数据了 + + + + + + + + + + 共 {{ taskTotal }} 条记录 + + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/task/constant.ts b/apps/web-antd/src/views/property/personalCenter/task/constant.ts new file mode 100644 index 00000000..9fc943c7 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/task/constant.ts @@ -0,0 +1,7 @@ +/** + * 底部偏移量 + * 在缩放时会差大概0.5px 导致触底逻辑不会触发 + * 在这里设置手动补偿 + * @see https://gitee.com/dapppp/ruoyi-plus-vben5/issues/IC28RE#note_40175381 + */ +export const bottomOffset = 2; diff --git a/apps/web-antd/src/views/property/personalCenter/task/myDocument.vue b/apps/web-antd/src/views/property/personalCenter/task/myDocument.vue new file mode 100644 index 00000000..12a39cf2 --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/task/myDocument.vue @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + + + + + + 搜索 + + + reload(false)" + > + + + + + + + + + + 搜索 + + + 重置 + + + + + + + + + + + + + + + + + + 没有更多数据了 + + + + + + + + + + 共 {{ taskTotal }} 条记录 + + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/task/taskCopyList.vue b/apps/web-antd/src/views/property/personalCenter/task/taskCopyList.vue new file mode 100644 index 00000000..3505f8fe --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/task/taskCopyList.vue @@ -0,0 +1,299 @@ + + + + + + + + + + + + + + + + + + + 搜索 + + + reload(false)" + > + + + (popoverOpen = true)" + @finish="handleFinish" + /> + + + + + + + + + + + + + + 搜索 + + + 重置 + + + + + + + + + + + + + + + + + + 没有更多数据了 + + + + + + + + + + 共 {{ taskTotal }} 条记录 + + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/task/taskFinish.vue b/apps/web-antd/src/views/property/personalCenter/task/taskFinish.vue new file mode 100644 index 00000000..d9641b0b --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/task/taskFinish.vue @@ -0,0 +1,299 @@ + + + + + + + + + + + + + + + + + + + 搜索 + + + reload(false)" + > + + + (popoverOpen = true)" + @finish="handleFinish" + /> + + + + + + + + + + + + + + 搜索 + + + 重置 + + + + + + + + + + + + + + + + + + 没有更多数据了 + + + + + + + + + + 共 {{ taskTotal }} 条记录 + + + + + + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/task/taskWaiting.vue b/apps/web-antd/src/views/property/personalCenter/task/taskWaiting.vue new file mode 100644 index 00000000..4a2024af --- /dev/null +++ b/apps/web-antd/src/views/property/personalCenter/task/taskWaiting.vue @@ -0,0 +1,302 @@ + + + + + + + + + + + + + + + + + + + 搜索 + + + reload(false)" + > + + + (popoverOpen = true)" + @finish="handleFinish" + /> + + + + + + + + + + + + + + 搜索 + + + 重置 + + + + + + + + + + + + + + + + + + 没有更多数据了 + + + + + + + + + + 共 {{ taskTotal }} 条记录 + + + + + + + + + From a048f3627eb431546c666a51046e7797139e29cc Mon Sep 17 00:00:00 2001 From: zcxlsm Date: Wed, 6 Aug 2025 20:38:29 +0800 Subject: [PATCH 09/10] =?UTF-8?q?refactor(sis):=20-=20=E5=B0=86=E5=8E=9F?= =?UTF-8?q?=E6=9C=89=E7=9A=84=E5=8D=95=E4=B8=80=E5=A4=96=E9=83=A8=E9=80=9A?= =?UTF-8?q?=E9=81=93=E5=8F=B7=E6=8B=86=E5=88=86=E4=B8=BA=E4=B8=8A=E9=94=AE?= =?UTF-8?q?=E9=80=9A=E9=81=93=E5=8F=B7=E5=92=8C=E4=B8=8B=E9=94=AE=E9=80=9A?= =?UTF-8?q?=E9=81=93=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sis/elevatorInfo/elevatorInfo-modal.vue | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/apps/web-antd/src/views/sis/elevatorInfo/elevatorInfo-modal.vue b/apps/web-antd/src/views/sis/elevatorInfo/elevatorInfo-modal.vue index 34dabeef..616c6704 100644 --- a/apps/web-antd/src/views/sis/elevatorInfo/elevatorInfo-modal.vue +++ b/apps/web-antd/src/views/sis/elevatorInfo/elevatorInfo-modal.vue @@ -111,11 +111,12 @@ async function handleConfirm() { const data = cloneDeep(await formApi.getValues()) // 通道信息 const filteredChannels = dynamicValidateForm.floor - .filter(item => !(item.out.length === 0 && item.in.length === 0)) + .filter(item => !(item.outUp.length === 0 && item.outDown.length === 0 && item.in.length === 0)) .map(item => ({ floorId: item.id, inChannel: item.in, - outChannel: item.out + upChannel: item.outUp, + downChannel: item.outDown, })) data.channels = filteredChannels @@ -223,7 +224,8 @@ async function setupCommunitySelect() { } interface floor { - out: string + outUp: string + outDown: string in: string num: string | number id: string | number @@ -238,7 +240,8 @@ async function handleGetFloor(unitId: string | number) { floorList.value = [] res.forEach((item) => { floorList.value.push({ - out: '', + outUp: '', + outDown: '', in: '', num: item.floorNumber, id: item.id, @@ -268,10 +271,14 @@ async function handleClosed() { - - + {{ "楼层"+floor.num }} + + - + + + + From 80d3739fb7df59bd5d26ad4c1b06aeff2d7b06b8 Mon Sep 17 00:00:00 2001 From: 15683799673 Date: Wed, 6 Aug 2025 22:29:04 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E5=A4=84=E7=90=86=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/sis/acAdmin/dp-tree.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web-antd/src/views/sis/acAdmin/dp-tree.vue b/apps/web-antd/src/views/sis/acAdmin/dp-tree.vue index 06d54792..97997178 100644 --- a/apps/web-antd/src/views/sis/acAdmin/dp-tree.vue +++ b/apps/web-antd/src/views/sis/acAdmin/dp-tree.vue @@ -116,8 +116,8 @@ function onTreeCheck(_keys: any, nodes: any) { delete checkData[id]; } }); - const nodes = toRaw(checkedNodes); - emit('checked', nodes); + const data = toRaw(checkedNodes); + emit('checked', data); } onMounted(loadChannelTree);
+ +
点击或者拖拽到此处上传[json]文件