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
}
export interface InspectionPlanForm extends BaseEntity {

View File

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

View File

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

View File

@ -74,7 +74,9 @@ const [BasicModal, modalApi] = useVbenModal({
}else {
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 markInitialized();
@ -95,6 +97,8 @@ async function handleConfirm() {
if (data.planDate && data.planDate.length) {
data.startDate = data.planDate[0]
data.endDate = data.planDate[1]
data.startTime=data.planDate[0]?.split(' ')[1]
data.endTime=data.planDate[1]?.split(' ')[1]
}
if(data.inspectionPlanPeriod=='1'){
data.inspectionMonth=data.inspectionMonth?.join(',')
@ -105,7 +109,16 @@ async function handleConfirm() {
data.inspectionMonth=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));
resetInitialized();
emit('reload');

View File

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

View File

@ -9,31 +9,29 @@ import { personLibList } from '#/api/sis/personLib';
import type { PersonLibQuery, PersonLibVO } from '#/api/sis/personLib/model';
let libArr: PersonLibVO[] = [];
const labelText: VbenFormSchema = {
label: '图片库',
fieldName: 'libId',
component: 'ApiSelect',
componentProps: {
resultField: 'list', // 根据API返回结构调整
labelField: 'libName',
valueField: 'id',
// 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;
export const querySchema: FormSchemaGetter = () => [
{
label: '图片库',
fieldName: 'libId',
component: 'ApiSelect',
componentProps: {
resultField: 'list', // 根据API返回结构调整
labelField: 'libName',
valueField: 'id',
// 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;
},
},
},
};
export const querySchema: FormSchemaGetter = () => [
labelText,
{
component: 'Input',
fieldName: 'imgName',
@ -96,7 +94,30 @@ export const columns: VxeGridProps['columns'] = [
];
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: '人像名称',
fieldName: 'imgName',

View File

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