diff --git a/apps/web-antd/src/api/property/attendanceManagement/shiftSetting/model.d.ts b/apps/web-antd/src/api/property/attendanceManagement/shiftSetting/model.d.ts index e0d1b668..04902ade 100644 --- a/apps/web-antd/src/api/property/attendanceManagement/shiftSetting/model.d.ts +++ b/apps/web-antd/src/api/property/attendanceManagement/shiftSetting/model.d.ts @@ -5,7 +5,7 @@ export interface ShiftVO { /** * 主键id */ - id: string | number; + id: string; /** * 班次名称 diff --git a/apps/web-antd/src/api/property/customerService/contingenPlan/index.ts b/apps/web-antd/src/api/property/customerService/contingenPlan/index.ts new file mode 100644 index 00000000..49af0f2f --- /dev/null +++ b/apps/web-antd/src/api/property/customerService/contingenPlan/index.ts @@ -0,0 +1,61 @@ +import type { ContingenPlanVO, ContingenPlanForm, ContingenPlanQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询应急预案管理列表 +* @param params +* @returns 应急预案管理列表 +*/ +export function contingenPlanList(params?: ContingenPlanQuery) { + return requestClient.get>('/property/contingenPlan/list', { params }); +} + +/** + * 导出应急预案管理列表 + * @param params + * @returns 应急预案管理列表 + */ +export function contingenPlanExport(params?: ContingenPlanQuery) { + return commonExport('/property/contingenPlan/export', params ?? {}); +} + +/** + * 查询应急预案管理详情 + * @param id id + * @returns 应急预案管理详情 + */ +export function contingenPlanInfo(id: ID) { + return requestClient.get(`/property/contingenPlan/${id}`); +} + +/** + * 新增应急预案管理 + * @param data + * @returns void + */ +export function contingenPlanAdd(data: ContingenPlanForm) { + return requestClient.postWithMsg('/property/contingenPlan', data); +} + +/** + * 更新应急预案管理 + * @param data + * @returns void + */ +export function contingenPlanUpdate(data: ContingenPlanForm) { + return requestClient.putWithMsg('/property/contingenPlan', data); +} + +/** + * 删除应急预案管理 + * @param id id + * @returns void + */ +export function contingenPlanRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/contingenPlan/${id}`); +} diff --git a/apps/web-antd/src/api/property/customerService/contingenPlan/model.d.ts b/apps/web-antd/src/api/property/customerService/contingenPlan/model.d.ts new file mode 100644 index 00000000..454c9597 --- /dev/null +++ b/apps/web-antd/src/api/property/customerService/contingenPlan/model.d.ts @@ -0,0 +1,159 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface ContingenPlanVO { + /** + * 主键 + */ + id: string | number; + + /** + * 预案类型(1.自然灾害,2事故灾难3公共卫生,4社会安全) + */ + contingenPlanType: string; + + /** + * 预案名称 + */ + contingenPlanName: string; + + /** + * 预案内容 + */ + contingenPlanContent: string; + + /** + * 发起人 + */ + initiat: string; + + /** + * 责任人 + */ + dutyPersion: number; + + /** + * 风险等级 + */ + grade: number; + + /** + * 完成时间 + */ + compleTimes: string; + + /** + * 状态(1.待审核2待进行3已完成) + */ + status: string; + + /** + * 搜索值 + */ + searchValue: string; + +} + +export interface ContingenPlanForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 预案类型(1.自然灾害,2事故灾难3公共卫生,4社会安全) + */ + contingenPlanType?: string; + + /** + * 预案名称 + */ + contingenPlanName?: string; + + /** + * 预案内容 + */ + contingenPlanContent?: string; + + /** + * 发起人 + */ + initiat?: string; + + /** + * 责任人 + */ + dutyPersion?: number; + + /** + * 风险等级 + */ + grade?: number; + + /** + * 完成时间 + */ + compleTimes?: string; + + /** + * 状态(1.待审核2待进行3已完成) + */ + status?: string; + + /** + * 搜索值 + */ + searchValue?: string; + +} + +export interface ContingenPlanQuery extends PageQuery { + /** + * 预案类型(1.自然灾害,2事故灾难3公共卫生,4社会安全) + */ + contingenPlanType?: string; + + /** + * 预案名称 + */ + contingenPlanName?: string; + + /** + * 预案内容 + */ + contingenPlanContent?: string; + + /** + * 发起人 + */ + initiat?: string; + + /** + * 责任人 + */ + dutyPersion?: number; + + /** + * 风险等级 + */ + grade?: number; + + /** + * 完成时间 + */ + compleTimes?: string; + + /** + * 状态(1.待审核2待进行3已完成) + */ + status?: string; + + /** + * 搜索值 + */ + searchValue?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/attendance-group-detail.vue b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/attendance-group-detail.vue new file mode 100644 index 00000000..30ed4436 --- /dev/null +++ b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/attendance-group-detail.vue @@ -0,0 +1,166 @@ + + + + diff --git a/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/change-shift-schedule.vue b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/change-shift-schedule.vue index 81d6ebe6..7aa45d56 100644 --- a/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/change-shift-schedule.vue +++ b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/change-shift-schedule.vue @@ -14,19 +14,21 @@ const [BasicModal, modalApi] = useVbenModal({ onConfirm: handleConfirm, }); -const emit = defineEmits<{ shiftInfo: [info: ShiftVO], shiftList: [list: ShiftVO[]] }>(); +const emit = defineEmits(['shiftInfo', 'shiftList', 'afterValue']); + const handleType = ref(1); -const tableLoading = ref(true); async function handleConfirm() { try { modalApi.lock(true); if (state.selectedRowKeys.length) { - let arr = shiftData.value.filter(item => state.selectedRowKeys.includes(item.id)) - if (handleType.value == 1 && arr.length) { - await emit('shiftInfo', arr[0]); - } else if (handleType.value == 2 && arr.length) { - await emit('shiftList', arr); + let arr = shiftData.value.filter((item: ShiftVO) => state.selectedRowKeys.includes(item.id)); + if (handleType.value === 1 && arr.length) { + emit('shiftInfo', arr[0]); + } else if (handleType.value === 2 && arr.length) { + emit('shiftList', arr); + } else if (handleType.value === 3 && arr.length) { + emit('afterValue', arr[0]); } } modalApi.close(); @@ -41,10 +43,11 @@ async function handleOpenChange(open: boolean) { if (!open) { return null; } - state.selectedRowKeys = [] - handleType.value = modalApi.getData()?.type; - await queryShiftData() modalApi.modalLoading(true); + state.selectedRowKeys = [] + const {type} = await modalApi.getData() as {type:number}; + handleType.value = type; + await queryShiftData() modalApi.modalLoading(false); } @@ -52,7 +55,6 @@ const shiftData = ref([]) const shiftName = ref('') async function queryShiftData() { - tableLoading.value = true let params = { name: shiftName.value, pageNum: 1, @@ -60,17 +62,16 @@ async function queryShiftData() { } const res = await shiftList(params) shiftData.value = res.rows - tableLoading.value = false } // 行勾选状态 const state = reactive({ - selectedRowKeys: [], + selectedRowKeys: [] as string[], }); // 勾选变化时的回调 const onSelectChange = (selectedRowKeys: string[]) => { - if (selectedRowKeys.length > 1 && handleType.value == 1) { + if (selectedRowKeys.length > 1 && (handleType.value == 1||handleType.value == 3)) { state.selectedRowKeys = selectedRowKeys.slice(-1); } else { state.selectedRowKeys = selectedRowKeys; @@ -110,7 +111,6 @@ const resetHandle = () => { :pagination="false" rowKey="id" :scroll="{ y: 350 }" - :loading="tableLoading" >