fix:巡检计划编辑、保养计划编辑
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
parent
9cb6d99e90
commit
84cade81df
@ -19,9 +19,15 @@ export interface GroupVO {
|
||||
/**
|
||||
* 考勤类型(0:固定班制,1:排班制)
|
||||
*/
|
||||
attendanceType: number;
|
||||
attendanceType: number| string;
|
||||
|
||||
isAutomatic: number;
|
||||
isAutomatic: boolean;
|
||||
|
||||
clockDateList: any[];
|
||||
|
||||
weekList: any[];
|
||||
|
||||
attendanceList:any[];
|
||||
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,8 @@ export interface MaintainPlanVO {
|
||||
userId: string[];
|
||||
|
||||
machineMaintainPlanStaffBoList:any[];
|
||||
|
||||
machineMaintainPlanStaffVos:any[];
|
||||
}
|
||||
|
||||
export interface MaintainPlanForm extends BaseEntity {
|
||||
|
@ -19,7 +19,7 @@ export interface InspectionPlanVO {
|
||||
/**
|
||||
* 巡检周期
|
||||
*/
|
||||
inspectionPlanPeriod: number;
|
||||
inspectionPlanPeriod: string;
|
||||
|
||||
/**
|
||||
* 任务提前分组
|
||||
|
@ -45,7 +45,7 @@ async function handleOpenChange(open: boolean) {
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const {id,attendanceType} = modalApi.getData() as { id?: number | string,attendanceType?:string };
|
||||
const res = await groupInfo(id,attendanceType);
|
||||
const res = await groupInfo(id as string,attendanceType as string);
|
||||
groupDetail.value=res;
|
||||
if(res.attendanceType==0){
|
||||
unCheckInData.value=res.clockDateList.filter(item=>item.mustNoCheck==0)
|
||||
@ -65,7 +65,7 @@ async function handleOpenChange(open: boolean) {
|
||||
})
|
||||
groupDetail.value.isAutomatic=true
|
||||
}else {
|
||||
cycleData.value=res;
|
||||
cycleData.value=[];
|
||||
}
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
@ -115,7 +115,7 @@ async function showHoliday() {
|
||||
size="small"
|
||||
:pagination="false"
|
||||
>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.dataIndex === 'dayOfWeek'">
|
||||
<component :is="renderDict(record.dayOfWeek,'wy_kqgzr')"></component>
|
||||
</template>
|
||||
|
@ -89,7 +89,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
};
|
||||
isUpdate.value = !!id;
|
||||
if (isUpdate.value && id) {
|
||||
const record = await groupInfo(id, attendanceType);
|
||||
const record = await groupInfo(id, attendanceType as string);
|
||||
record.attendanceType = record.attendanceType.toString()
|
||||
if (record.attendanceType == '0') {
|
||||
settingData.unCheckInData = record.clockDateList.filter(item => item.mustNoCheck == 0)
|
||||
|
@ -177,7 +177,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
rules:'required'
|
||||
},
|
||||
{
|
||||
label: '巡检人员',
|
||||
label: '保养人员',
|
||||
fieldName: 'userId',
|
||||
component: 'ApiSelect',
|
||||
componentProps:{
|
||||
|
@ -15,8 +15,8 @@ import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
||||
|
||||
import {modalSchema} from './data';
|
||||
import {getMachineTypeTree} from "#/api/property/machineType";
|
||||
import {personList} from "#/api/property/resident/person";
|
||||
import {renderDictValue} from "#/utils/render";
|
||||
import {userList} from "#/api/system/user";
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
@ -72,8 +72,8 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
record.maintainMonth = record.maintainMonth?.split(',')
|
||||
record.maintainDay = record.maintainDay?.split(',')
|
||||
}
|
||||
if (record.machineMaintainPlanStaffBoList) {
|
||||
record.userId = record.machineMaintainPlanStaffBoList.map(item=>item.userId)
|
||||
if (record.machineMaintainPlanStaffVos) {
|
||||
record.userId = record.machineMaintainPlanStaffVos.map(item=>item.userId.toString())
|
||||
}
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
@ -161,11 +161,11 @@ async function queryPersonData() {
|
||||
pageSize: 1000,
|
||||
pageNum: 1,
|
||||
}
|
||||
const res = await personList(params);
|
||||
const res = await userList(params);
|
||||
const options = res.rows.map((user) => ({
|
||||
label: user.userName + '-' + renderDictValue(user.gender, 'sys_user_sex')
|
||||
+ '-' + user.phone + '-' + user.unitName,
|
||||
value: user.id,
|
||||
label: user.nickName + '-' + renderDictValue(user.sex, 'sys_user_sex')
|
||||
+ '-' + user.phonenumber,
|
||||
value: user.userId.toString(),
|
||||
}));
|
||||
formApi.updateSchema([{
|
||||
componentProps: () => ({
|
||||
|
@ -10,7 +10,6 @@ import {renderDict} from "#/utils/render";
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
import {CheckboxGroup} from 'ant-design-vue'
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
import {maintainPlanInfo} from "#/api/property/equipmentManagement/maintainPlan";
|
||||
import type {MaintainPlanVO} from "#/api/property/equipmentManagement/maintainPlan/model";
|
||||
|
||||
@ -78,11 +77,16 @@ const monthArr=Array.from({ length: 12 }, (_, i) => ({
|
||||
<DescriptionsItem label="计划日期" :span="2">
|
||||
{{ maintainPlanDetail.startDate + '\xa0至\xa0' + maintainPlanDetail.endDate }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="状态" v-if="maintainPlanDetail.state!=null">
|
||||
<DescriptionsItem label="状态" v-if="maintainPlanDetail.state!=null" :span="2">
|
||||
<component
|
||||
:is="renderDict(maintainPlanDetail.state,'wy_state')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="保养人员" :span="2">
|
||||
<span style="margin-right: 10px;" v-for="item in maintainPlanDetail.machineMaintainPlanStaffVos">
|
||||
{{item.userName}}
|
||||
</span>
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
@ -14,10 +14,10 @@ import {
|
||||
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
||||
|
||||
import {modalSchema} from './data';
|
||||
import {personList} from "#/api/property/resident/person";
|
||||
import {renderDictValue} from "#/utils/render";
|
||||
import {inspectionRouteList} from "#/api/property/inspectionManagement/inspectionRoute";
|
||||
import {InputNumber} from 'ant-design-vue'
|
||||
import {userList} from "#/api/system/user";
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
@ -75,7 +75,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
record.inspectionWorkday = record.inspectionWorkday?.split(',')
|
||||
}
|
||||
if (record.inspectionPlanStaffVoList && record.inspectionPlanStaffVoList.length) {
|
||||
record.userId = record.inspectionPlanStaffVoList.map(item => item.userId)
|
||||
record.userId = record.inspectionPlanStaffVoList.map(item => item.userId.toString())
|
||||
}
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
@ -140,11 +140,11 @@ async function queryPersonData() {
|
||||
pageSize: 1000,
|
||||
pageNum: 1,
|
||||
}
|
||||
const res = await personList(params);
|
||||
const res = await userList(params);
|
||||
const options = res.rows.map((user) => ({
|
||||
label: user.userName + '-' + renderDictValue(user.gender, 'sys_user_sex')
|
||||
+ '-' + user.phone + '-' + user.unitName,
|
||||
value: user.id,
|
||||
label: user.nickName + '-' + renderDictValue(user.sex, 'sys_user_sex')
|
||||
+ '-' + user.phonenumber,
|
||||
value: user.userId.toString(),
|
||||
}));
|
||||
formApi.updateSchema([{
|
||||
componentProps: () => ({
|
||||
|
Loading…
Reference in New Issue
Block a user