Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
fyy 2025-07-15 10:58:58 +08:00
commit 1ed923c969
7 changed files with 75 additions and 44 deletions

View File

@ -88,6 +88,7 @@ export interface InspectionPlanVO {
* *
*/ */
state?:string state?:string
} }
export interface InspectionPlanForm extends BaseEntity { export interface InspectionPlanForm extends BaseEntity {

View File

@ -92,8 +92,7 @@ export interface PersonLibImgForm extends BaseEntity {
imgUrl?: string; imgUrl?: string;
/** /**
* 1 * 1 2 99
2 99
*/ */
sex?: number; sex?: number;
@ -108,9 +107,7 @@ export interface PersonLibImgForm extends BaseEntity {
tel?: string; tel?: string;
/** /**
* * 1 2 3 99
1 2
3 99
*/ */
certificateType?: number; certificateType?: number;
@ -152,8 +149,7 @@ export interface PersonLibImgQuery extends PageQuery {
imgUrl?: string; imgUrl?: string;
/** /**
* 1 * 1 2 99
2 99
*/ */
sex?: number; sex?: number;
@ -168,9 +164,7 @@ export interface PersonLibImgQuery extends PageQuery {
tel?: string; tel?: string;
/** /**
* * 1 2 3 99
1 2
3 99
*/ */
certificateType?: number; certificateType?: number;

View File

@ -37,11 +37,11 @@ export const columns: VxeGridProps['columns'] = [
field: 'planName', field: 'planName',
minWidth: 180, minWidth: 180,
}, },
{ // {
title: '巡检路线', // title: '巡检路线',
field: 'inspectionRouteId', // field: 'inspectionRouteId',
width: 180, // width: 180,
}, // },
{ {
title: '巡检周期', title: '巡检周期',
field: 'inspectionPlanPeriod', field: 'inspectionPlanPeriod',

View File

@ -74,7 +74,9 @@ const [BasicModal, modalApi] = useVbenModal({
}else { }else {
record.inspectionWorkday=record.inspectionWorkday?.split(',') record.inspectionWorkday=record.inspectionWorkday?.split(',')
} }
record.userId=record.userId?.split(',') if(record.inspectionPlanStaffVoList&&record.inspectionPlanStaffVoList.length){
record.userId=record.inspectionPlanStaffVoList.map(item=>item.userId)
}
await formApi.setValues(record); await formApi.setValues(record);
} }
await markInitialized(); await markInitialized();
@ -95,6 +97,8 @@ async function handleConfirm() {
if (data.planDate && data.planDate.length) { if (data.planDate && data.planDate.length) {
data.startDate = data.planDate[0] data.startDate = data.planDate[0]
data.endDate = data.planDate[1] data.endDate = data.planDate[1]
data.startTime=data.planDate[0]?.split(' ')[1]
data.endTime=data.planDate[1]?.split(' ')[1]
} }
if(data.inspectionPlanPeriod=='1'){ if(data.inspectionPlanPeriod=='1'){
data.inspectionMonth=data.inspectionMonth?.join(',') data.inspectionMonth=data.inspectionMonth?.join(',')
@ -105,7 +109,16 @@ async function handleConfirm() {
data.inspectionMonth=undefined data.inspectionMonth=undefined
data.inspectionDay=undefined data.inspectionDay=undefined
} }
data.userId=data.userId?.join(',') if(data.userId){
data.inspectionPlanStaffBoList=[]
data.userId.forEach(item=>
data.inspectionPlanStaffBoList.push({
userId:item,
startTime:data.startDate,
endTime:data.endDate
}))
}
// data.userId=data.userId?.join(',')
await (isUpdate.value ? inspectionPlanUpdate(data) : inspectionPlanAdd(data)); await (isUpdate.value ? inspectionPlanUpdate(data) : inspectionPlanAdd(data));
resetInitialized(); resetInitialized();
emit('reload'); emit('reload');

View File

@ -94,7 +94,9 @@ const monthArr=Array.from({ length: 12 }, (_, i) => ({
/> />
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="巡检人员" :span="2"> <DescriptionsItem label="巡检人员" :span="2">
{{ inspectionPlanDetail.projectName }} <span style="margin-right: 10px;" v-for="item in inspectionPlanDetail.inspectionPlanStaffVoList">
{{item.userName}}
</span>
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="备注" :span="2"> <DescriptionsItem label="备注" :span="2">
{{ inspectionPlanDetail.remark }} {{ inspectionPlanDetail.remark }}

View File

@ -9,7 +9,8 @@ import { personLibList } from '#/api/sis/personLib';
import type { PersonLibQuery, PersonLibVO } from '#/api/sis/personLib/model'; import type { PersonLibQuery, PersonLibVO } from '#/api/sis/personLib/model';
let libArr: PersonLibVO[] = []; let libArr: PersonLibVO[] = [];
const labelText: VbenFormSchema = { export const querySchema: FormSchemaGetter = () => [
{
label: '图片库', label: '图片库',
fieldName: 'libId', fieldName: 'libId',
component: 'ApiSelect', component: 'ApiSelect',
@ -30,10 +31,7 @@ const labelText: VbenFormSchema = {
return libArr; return libArr;
}, },
}, },
}; },
export const querySchema: FormSchemaGetter = () => [
labelText,
{ {
component: 'Input', component: 'Input',
fieldName: 'imgName', fieldName: 'imgName',
@ -96,7 +94,30 @@ export const columns: VxeGridProps['columns'] = [
]; ];
export const modalSchema: FormSchemaGetter = () => [ export const modalSchema: FormSchemaGetter = () => [
labelText, {
label: '图片库',
fieldName: 'libIds',
component: 'ApiSelect',
rules: 'required',
componentProps: {
resultField: 'list', // 根据API返回结构调整
labelField: 'libName',
valueField: 'id',
mode: 'multiple',
// immediate: true,
api: async () => {
if (!libArr || libArr.length == 0) {
const params: PersonLibQuery = {
pageNum: 1,
pageSize: 500,
};
const res = await personLibList(params);
libArr = res.rows;
}
return libArr;
},
},
},
{ {
label: '人像名称', label: '人像名称',
fieldName: 'imgName', fieldName: 'imgName',

View File

@ -141,14 +141,14 @@ function accessControlAuth() {
<BasicTable table-title="人像信息列表"> <BasicTable table-title="人像信息列表">
<template #toolbar-tools> <template #toolbar-tools>
<Space> <Space>
<a-button <!-- <a-button
type="primary" type="primary"
:disabled="!vxeCheckboxChecked(tableApi)" :disabled="!vxeCheckboxChecked(tableApi)"
v-access:code="['system:personLibImg:add']" v-access:code="['system:personLibImg:add']"
@click="accessControlAuth" @click="accessControlAuth"
> >
门禁授权 门禁授权
</a-button> </a-button> -->
<a-button <a-button
v-access:code="['system:personLibImg:export']" v-access:code="['system:personLibImg:export']"
@click="handleDownloadExcel" @click="handleDownloadExcel"