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/attendanceManagement/arrangement/index.ts b/apps/web-antd/src/api/property/attendanceManagement/arrangement/index.ts index 9a0df5c3..0ffab03b 100644 --- a/apps/web-antd/src/api/property/attendanceManagement/arrangement/index.ts +++ b/apps/web-antd/src/api/property/attendanceManagement/arrangement/index.ts @@ -7,21 +7,20 @@ import { commonExport } from '#/api/helper'; import { requestClient } from '#/api/request'; /** -* 查询排班列表 +* 分页查询排班列表 * @param params * @returns 排班列表 */ export function arrangementList(params?: ArrangementQuery) { return requestClient.get>('/property/arrangement/list', { params }); } - /** - * 导出排班列表 + * 根据月份查询排班列表 * @param params * @returns 排班列表 */ -export function arrangementExport(params?: ArrangementQuery) { - return commonExport('/property/arrangement/export', params ?? {}); +export function arrangementCalender(params?: ArrangementQuery) { + return requestClient.get('/property/arrangement/explore', { params }); } /** diff --git a/apps/web-antd/src/api/property/attendanceManagement/arrangement/model.d.ts b/apps/web-antd/src/api/property/attendanceManagement/arrangement/model.d.ts index ac3c65a8..83f93190 100644 --- a/apps/web-antd/src/api/property/attendanceManagement/arrangement/model.d.ts +++ b/apps/web-antd/src/api/property/attendanceManagement/arrangement/model.d.ts @@ -40,7 +40,6 @@ export interface ArrangementVO { * 状态:0-未生效,1-已生效 */ status: number; - } export interface ArrangementForm extends BaseEntity { @@ -83,7 +82,10 @@ export interface ArrangementForm extends BaseEntity { * 状态:0-未生效,1-已生效 */ status?: number; - + /** + * 排班人员详情 + */ + userGroupList: any[]; } export interface ArrangementQuery extends PageQuery { @@ -123,7 +125,12 @@ export interface ArrangementQuery extends PageQuery { status?: number; /** - * 日期范围参数 - */ + * 日期范围参数 + */ params?: any; + + /** + * 月份 + */ + month?: string; } 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..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,6 +12,22 @@ 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 }); +} /** * 导出工单类型管理列表 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/api/sis/authGroup/model.d.ts b/apps/web-antd/src/api/sis/authGroup/model.d.ts index d9c1eacf..b60f3273 100644 --- a/apps/web-antd/src/api/sis/authGroup/model.d.ts +++ b/apps/web-antd/src/api/sis/authGroup/model.d.ts @@ -21,6 +21,16 @@ export interface AuthGroupVO { */ isEnable: boolean; + /** + * 设备id + */ + acIds?: string[] | number[]; + + /** + * 楼层id + */ + floorIds?: string[] | number[]; + } export interface AuthGroupForm extends BaseEntity { diff --git a/apps/web-antd/src/api/sis/deviceChannel/model.d.ts b/apps/web-antd/src/api/sis/deviceChannel/model.d.ts index 37055ca9..95496871 100644 --- a/apps/web-antd/src/api/sis/deviceChannel/model.d.ts +++ b/apps/web-antd/src/api/sis/deviceChannel/model.d.ts @@ -1,4 +1,4 @@ -import type { PageQuery, BaseEntity } from '#/api/common'; +import type { BaseEntity, PageQuery } from '#/api/common'; export interface DeviceChannelVO { /** @@ -51,6 +51,13 @@ export interface DeviceChannelVO { */ channelNo: string; + nvrId: string; + nvrFactoryNo: string; + nvrIp: string; + nvrPort: number; + nvrAccount: string; + nvrPwd: string; + nvrChannelNo: string; } export interface DeviceChannelForm extends BaseEntity { @@ -103,7 +110,6 @@ export interface DeviceChannelForm extends BaseEntity { * 设备通道编号 */ channelNo?: string; - } export interface DeviceChannelQuery extends PageQuery { @@ -153,7 +159,7 @@ export interface DeviceChannelQuery extends PageQuery { channelNo?: string; /** - * 日期范围参数 - */ + * 日期范围参数 + */ params?: any; } diff --git a/apps/web-antd/src/api/sis/deviceManage/model.d.ts b/apps/web-antd/src/api/sis/deviceManage/model.d.ts index 7f5e0160..10b2f34b 100644 --- a/apps/web-antd/src/api/sis/deviceManage/model.d.ts +++ b/apps/web-antd/src/api/sis/deviceManage/model.d.ts @@ -1,177 +1,182 @@ -import type { BaseEntity, PageQuery } from '#/api/common'; +import type { BaseEntity, PageQuery } from '#/api/common' export interface DeviceManageVO { /** * 主键id */ - id: string | number; + id: string | number /** * 设备编码 */ - deviceNo: string; + deviceNo: string /** * 设备名称 */ - deviceName: string; + deviceName: string /** * 设备ip */ - deviceIp: string; + deviceIp: string /** * 设备端口 */ - devicePort: number; + devicePort: number /** * 设备账号 */ - deviceAccount: string; + deviceAccount: string /** * 设备密码 */ - devicePwd: string; + devicePwd: string /** * 设备 */ - deviceMac: string; + deviceMac: string /** * 设备在线状态 0:离线 1:在线 2:未知 */ - deviceStatus: number; + deviceStatus: number /** * 父级设备id */ - parentId: string | number; + parentId: string | number /** * 设备通道编号 */ - channelNo: string; + channelNo: string /** * 录像机ip */ - vcrIp: string; + vcrIp: string /** * 录像机端口 */ - vcrPort: number; + vcrPort: number /** * 录像机账号 */ - vcrAccount: string; + vcrAccount: string /** * 录像机密码 */ - vcrPwd: string; + vcrPwd: string /** * 门禁id */ - accessControlId: string | number; + accessControlId: string | number + + /** + * 楼层id + */ + floorId: string | number } export interface DeviceManageForm extends BaseEntity { /** * 主键id */ - id?: string | number; + id?: string | number /** * 设备编码 */ - deviceNo?: string; + deviceNo?: string /** * 设备名称 */ - deviceName?: string; + deviceName?: string /** * 设备ip */ - deviceIp?: string; + deviceIp?: string /** * 设备端口 */ - devicePort?: number; + devicePort?: number /** * 设备账号 */ - deviceAccount?: string; + deviceAccount?: string /** * 设备密码 */ - devicePwd?: string; + devicePwd?: string /** * 设备 */ - deviceMac?: string; + deviceMac?: string /** * 设备在线状态 0:离线 1:在线 2:未知 */ - deviceStatus?: number; + deviceStatus?: number } export interface DeviceManageQuery extends PageQuery { /** * 设备编码 */ - deviceNo?: string; + deviceNo?: string /** * 设备名称 */ - deviceName?: string; + deviceName?: string /** * 设备ip */ - deviceIp?: string; + deviceIp?: string /** * 设备端口 */ - devicePort?: number; + devicePort?: number /** * 设备账号 */ - deviceAccount?: string; + deviceAccount?: string /** * 设备密码 */ - devicePwd?: string; + devicePwd?: string /** * 设备 */ - deviceMac?: string; + deviceMac?: string /** * 设备在线状态 0:离线 1:在线 2:未知 */ - deviceStatus?: number; + deviceStatus?: number /** * 日期范围参数 */ - params?: any; + params?: any } diff --git a/apps/web-antd/src/api/sis/elevatorInfo/index.ts b/apps/web-antd/src/api/sis/elevatorInfo/index.ts index 490a32f1..9c846668 100644 --- a/apps/web-antd/src/api/sis/elevatorInfo/index.ts +++ b/apps/web-antd/src/api/sis/elevatorInfo/index.ts @@ -59,22 +59,3 @@ export function elevatorInfoUpdate(data: ElevatorInfoForm) { export function elevatorInfoRemove(elevatorId: ID | IDS) { return requestClient.deleteWithMsg(`/sis/elevatorInfo/${elevatorId}`); } - -/** - * 新增电梯⇄楼层关联 - * @param params - * @returns void - */ -export function refAdd(data: ElevatorFloorRefForm) { - return requestClient.postWithMsg('/sis/elevatorInfo/ref/add', data); -} - -/** - * 查询电梯⇄楼层关联 - * @param id - * @returns void - */ -export function refQuery(id: ID) { - return requestClient.get(`/sis/elevatorInfo/ref/${id}`); -} - diff --git a/apps/web-antd/src/assets/digitalIntelligence/bg.png b/apps/web-antd/src/assets/digitalIntelligence/bg.png index c0c998d5..13301915 100644 Binary files a/apps/web-antd/src/assets/digitalIntelligence/bg.png and b/apps/web-antd/src/assets/digitalIntelligence/bg.png differ diff --git a/apps/web-antd/src/assets/energyConsumptionAnalysis/bg.png b/apps/web-antd/src/assets/energyConsumptionAnalysis/bg.png index 40c8a453..d05d513a 100644 Binary files a/apps/web-antd/src/assets/energyConsumptionAnalysis/bg.png and b/apps/web-antd/src/assets/energyConsumptionAnalysis/bg.png differ 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/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/attendanceManagement/workforceManagement/arrangement-modal.vue b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/arrangement-modal.vue index f1a0dd84..d4e5ccd3 100644 --- a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/arrangement-modal.vue +++ b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/arrangement-modal.vue @@ -34,12 +34,47 @@ const isUpdate = ref(false); const title = computed(() => { return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add'); }); +//表单项 +let formModel = reactive<{ + id: string; + groupId: string; + attendanceType: string; + dateType: number | undefined; + startDate: string; + endDate: string; + userGroupList: any[]; +}>({ + id: '', + groupId: '', + attendanceType: '', //考勤组类型 + dateType: undefined, //日期类型:1-单个日期,2-长期有效,3-期间有效 + // dateSingle: null, + // dateLong: null, + // dateRange: [null, null], + startDate: '', //开始日期 + endDate: '', //结束日期 + userGroupList: [ + // scheduleId:undefined,//排班ID + // employeeId:undefined,//员工ID + // employeeName:undefined,//员工姓名 + // deptId:undefined,//部门ID + // deptName:undefined,//部门名称 + ], //考勤组人员列表 +}); +const formRef = ref(); +let singleDate = ref(''); //排班日期单个日期 +let longDate = ref(''); //排班日期从此日起长期有效 +let rangeDate = ref(['', '']); //排班日期在此期间有效 +const rules = { + groupId: [{ required: true, message: '请选择考勤组' }], + attendanceType: [{ required: true }], + dateType: [{ required: true, message: '请选择排班日期' }], +}; const groupOptions = ref([]); const groupMap = ref>({}); // 用于快速查找 -const tableData = reactive< +let tableData = reactive< { dept: { unitId: string | number; unitName: string }; users: PersonVO[] }[] ->([]); - +>([]); //存放考勤组人员列表数据 const columns = [ { title: '序号', @@ -108,44 +143,44 @@ function handleRemoveRow(index: number) { } function handleTableData(newTableData: any) { - tableData.splice(0, tableData.length, ...newTableData); + // 如果现有数据为空,直接替换 + if (tableData.length === 0) { + tableData.splice(0, 0, ...newTableData); + return; + } + + // 如果新数据为空,不做处理 + if (newTableData.length === 0) { + return; + } + + // 处理有数据的情况 + for (const newItem of newTableData) { + // 查找是否已存在相同部门 + const existingDeptIndex = tableData.findIndex( + (item) => item.dept.unitId === newItem.dept.unitId, + ); + + if (existingDeptIndex !== -1) { + // 找到相同部门,检查人员是否有重复 + const existingDept = tableData[existingDeptIndex]; + for (const newUser of newItem.users) { + // 检查该用户是否已存在 + const userExists = existingDept?.users.some( + (existingUser) => existingUser.id === newUser.id, + ); + if (!userExists) { + // 用户不存在,添加到现有部门 + existingDept?.users.push(newUser); + } + } + } else { + // 部门不存在,直接添加新部门 + tableData.push(newItem); + } + } } -//表单项 -const formModel = reactive<{ - id: string; - groupId: string; - attendanceType: string; - dateType: number | undefined; - startDate: string; - endDate: string; - userGroupList: any[]; -}>({ - id: '', - groupId: '', - attendanceType: '', //考勤组类型 - dateType: undefined, //日期类型:1-单个日期,2-长期有效,3-期间有效 - // dateSingle: null, - // dateLong: null, - // dateRange: [null, null], - startDate: '', //开始日期 - endDate: '', //结束日期 - userGroupList: [ - // scheduleId:undefined,//排班ID - // employeeId:undefined,//员工ID - // employeeName:undefined,//员工姓名 - // deptId:undefined,//部门ID - // deptName:undefined,//部门名称 - ], //考勤组人员列表 -}); -const singleDate = ref(''); -const longDate = ref(''); -const rangeDate = ref(['', '']); -const formRef = ref(); -const rules = { - groupId: [{ required: true, message: '请选择考勤组' }], - attendanceType: [{ required: true }], - dateType: [{ required: true, message: '请选择排班日期' }], -}; + const [BasicForm, formApi] = useVbenForm({ commonConfig: { // 默认占满两列 @@ -173,7 +208,7 @@ const [UnitPersonModal, unitPersonmodalApi] = useVbenModal({ }); const [BasicModal, modalApi] = useVbenModal({ // 在这里更改宽度 - class: 'w-[70%]', + class: 'w-[85%]', fullscreenButton: false, onBeforeClose, onClosed: handleClosed, @@ -183,7 +218,6 @@ const [BasicModal, modalApi] = useVbenModal({ return null; } await getGroupList(); - console.log(getDictOptions('wy_kqlx')); modalApi.modalLoading(true); const { id } = modalApi.getData() as { id?: number | string }; isUpdate.value = !!id; @@ -220,7 +254,6 @@ async function getGroupList() { }); } function chooseGroup(value: any) { - console.log(value); const group = groupMap.value[value]; if (group) { formModel.attendanceType = String(group.attendanceType); @@ -232,12 +265,10 @@ async function handleDateTypeChange(value: any) { async function handleConfirm() { try { modalApi.lock(true); - // await formRef.value.validate(); // 先校验 + await formRef.value.validate(); // 先校验 const data = formModel; const { id } = modalApi.getData() as { id?: string }; data.id = id ? id : ''; - console.log(data); - if (data.dateType == 1) { if (singleDate.value) { data.startDate = dayjs(singleDate.value).format('YYYY-MM-DD'); @@ -264,10 +295,36 @@ async function handleConfirm() { data.endDate = dayjs(rangeDate.value[1]).format('YYYY-MM-DD'); } } - // await (isUpdate.value ? arrangementUpdate(data) : arrangementAdd(data)); + for (const item of tableData) { + for (const user of item.users) { + data.userGroupList.push({ + deptId: item.dept.unitId, //部门ID + deptName: item.dept.unitName, //部门名称 + employeeId: user.id, //员工ID + employeeName: user.userName, //员工姓名 + }); + } + } + await (isUpdate.value ? arrangementUpdate(data) : arrangementAdd(data)); resetInitialized(); emit('reload'); + // 重置表单数据 + Object.assign(formModel, { + id: '', + groupId: '', + attendanceType: '', + dateType: undefined, + startDate: '', + endDate: '', + userGroupList: [], + }); + // 重置其他数据 + tableData.length = 0; + singleDate.value = ''; + longDate.value = ''; + rangeDate.value = ['', '']; modalApi.close(); + await formApi.resetForm(); } catch (error) { console.error(error); } finally { @@ -276,8 +333,27 @@ async function handleConfirm() { } async function handleClosed() { + // 重置表单数据 + Object.assign(formModel, { + id: '', + groupId: '', + attendanceType: '', + dateType: undefined, + startDate: '', + endDate: '', + userGroupList: [], + }); + + // 重置其他数据 + tableData.length = 0; + singleDate.value = ''; + longDate.value = ''; + rangeDate.value = ['', '']; + + // 重置表单状态 await formApi.resetForm(); resetInitialized(); + modalApi.close(); } onMounted(() => {}); 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 ea4b843d..b60874bf 100644 --- a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/calendarView.vue +++ b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/calendarView.vue @@ -1,11 +1,14 @@ \ No newline at end of file + diff --git a/apps/web-antd/src/views/property/costManagement/costMeterWater/costMeterWater-modal.vue b/apps/web-antd/src/views/property/costManagement/costMeterWater/costMeterWater-modal.vue index f64606a6..7da7dabe 100644 --- a/apps/web-antd/src/views/property/costManagement/costMeterWater/costMeterWater-modal.vue +++ b/apps/web-antd/src/views/property/costManagement/costMeterWater/costMeterWater-modal.vue @@ -111,7 +111,6 @@ const schema = [ itemId: '', meterTypeId: '', }); - console.log(await formApi.getValues()); }, }, }, @@ -216,8 +215,6 @@ const [BasicModal, modalApi] = useVbenModal({ isUpdate.value = !!id; if (isUpdate.value && id) { const record = await costMeterWaterInfo(id); - console.log(1, record); - const costItemsRes = await costItemSettingList({ pageSize: 1000000000, pageNum: 1, @@ -253,7 +250,6 @@ const [BasicModal, modalApi] = useVbenModal({ }, ]); await formApi.setValues(record); - console.log(2, await formApi.getValues()); } await markInitialized(); @@ -270,8 +266,6 @@ async function handleConfirm() { } // getValues获取为一个readonly的对象 需要修改必须先深拷贝一次 const data = cloneDeep(await formApi.getValues()); - console.log(data); - await (isUpdate.value ? costMeterWaterUpdate(data) : costMeterWaterAdd(data)); 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', 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..74b8202d 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,85 @@ 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: 'pointName', + }, + { + 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: {}, + }, + { + 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 @@ - + 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..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,15 +1,20 @@ 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..c21b83c9 --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/point-modal.vue @@ -0,0 +1,116 @@ + + + + diff --git a/apps/web-antd/src/views/property/personalCenter/leaveApplication/leaveApplication-modal.vue b/apps/web-antd/src/views/property/personalCenter/category/category-modal.vue similarity index 64% rename from apps/web-antd/src/views/property/personalCenter/leaveApplication/leaveApplication-modal.vue rename to apps/web-antd/src/views/property/personalCenter/category/category-modal.vue index c052f188..c2816b44 100644 --- a/apps/web-antd/src/views/property/personalCenter/leaveApplication/leaveApplication-modal.vue +++ b/apps/web-antd/src/views/property/personalCenter/category/category-modal.vue @@ -3,14 +3,20 @@ import { computed, ref } from 'vue'; import { useVbenModal } from '@vben/common-ui'; import { $t } from '@vben/locales'; -import { cloneDeep } from '@vben/utils'; +import { + addFullName, + cloneDeep, + getPopupContainer, + listToTree, +} from '@vben/utils'; import { useVbenForm } from '#/adapter/form'; import { - leaveApplicationAdd, - leaveApplicationInfo, - leaveApplicationUpdate, -} from '#/api/property/personalCenter/leaveApplication'; + categoryAdd, + categoryInfo, + categoryList, + categoryUpdate, +} from '#/api/workflow/category'; import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; import { modalSchema } from './data'; @@ -38,6 +44,28 @@ const [BasicForm, formApi] = useVbenForm({ wrapperClass: 'grid-cols-2', }); +async function setupCategorySelect() { + const listData = await categoryList(); + const treeData = listToTree(listData, { + id: 'categoryId', + pid: 'parentId', + }); + addFullName(treeData, 'categoryName', ' / '); + formApi.updateSchema([ + { + fieldName: 'parentId', + componentProps: { + treeData, + treeLine: { showLeafIcon: false }, + fieldNames: { label: 'categoryName', value: 'categoryId' }, + treeDefaultExpandAll: true, + treeNodeLabelProp: 'fullName', + getPopupContainer, + }, + }, + ]); +} + const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff( { initializedGetter: defaultFormValueGetter(formApi), @@ -46,8 +74,6 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff( ); const [BasicModal, modalApi] = useVbenModal({ - // 在这里更改宽度 - class: 'w-[550px]', fullscreenButton: false, onBeforeClose, onClosed: handleClosed, @@ -58,13 +84,20 @@ const [BasicModal, modalApi] = useVbenModal({ } modalApi.modalLoading(true); - const { id } = modalApi.getData() as { id?: number | string }; + const { id, parentId } = modalApi.getData() as { + id?: number | string; + parentId?: number | string; + }; isUpdate.value = !!id; if (isUpdate.value && id) { - const record = await leaveApplicationInfo(id); + const record = await categoryInfo(id); await formApi.setValues(record); } + if (parentId) { + await formApi.setValues({ parentId }); + } + await setupCategorySelect(); await markInitialized(); modalApi.modalLoading(false); @@ -80,9 +113,7 @@ async function handleConfirm() { } // getValues获取为一个readonly的对象 需要修改必须先深拷贝一次 const data = cloneDeep(await formApi.getValues()); - await (isUpdate.value - ? leaveApplicationUpdate(data) - : leaveApplicationAdd(data)); + await (isUpdate.value ? categoryUpdate(data) : categoryAdd(data)); resetInitialized(); emit('reload'); modalApi.close(); @@ -100,7 +131,7 @@ async function handleClosed() { 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 @@ + + + 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 @@ + + + + + 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 @@ + + + +