Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
This commit is contained in:
@@ -94,6 +94,10 @@ export interface WorkOrdersVO {
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
orderImgUrl: string;
|
||||
|
||||
}
|
||||
|
||||
|
@@ -32,20 +32,59 @@ export interface TaskDetailVO {
|
||||
patrolType: string;
|
||||
|
||||
/**
|
||||
* 签到类型
|
||||
* 签到类型(1.现场拍照、2.摄像头签到、3.现场扫码)
|
||||
*/
|
||||
signType: string;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
*/
|
||||
actualInspectionTime: string;
|
||||
|
||||
/**
|
||||
* 实际签到状态(1已签到2.未签到)
|
||||
*/
|
||||
actualSignState: string;
|
||||
|
||||
/**
|
||||
* 巡检状态(0未完成,1已完成)
|
||||
*/
|
||||
inspectionState: string;
|
||||
|
||||
/**
|
||||
* 巡检照片
|
||||
* 巡检图片
|
||||
*/
|
||||
inspectionImag
|
||||
e: string;
|
||||
inspectionImage: string;
|
||||
|
||||
/**
|
||||
* 计划巡检人
|
||||
*/
|
||||
planInspectionPerson: string;
|
||||
|
||||
/**
|
||||
* 实际巡检人
|
||||
*/
|
||||
actualInspectionPerson: string;
|
||||
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
taskStatus: string;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
inspectionResults: string;
|
||||
|
||||
/**
|
||||
* 巡检描述
|
||||
*/
|
||||
inspectionDesc: string;
|
||||
|
||||
/**
|
||||
* 巡检位置
|
||||
*/
|
||||
inspectionLocation: string;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
@@ -67,6 +106,11 @@ e: string;
|
||||
*/
|
||||
pointEndTime: string;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
searchValue: string;
|
||||
|
||||
}
|
||||
|
||||
export interface TaskDetailForm extends BaseEntity {
|
||||
@@ -101,20 +145,60 @@ export interface TaskDetailForm extends BaseEntity {
|
||||
patrolType?: string;
|
||||
|
||||
/**
|
||||
* 签到类型
|
||||
* 签到类型(1.现场拍照、2.摄像头签到、3.现场扫码)
|
||||
*/
|
||||
signType?: string;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
*/
|
||||
actualInspectionTime?: string;
|
||||
|
||||
/**
|
||||
* 实际签到状态(1已签到2.未签到)
|
||||
*/
|
||||
actualSignState?: string;
|
||||
|
||||
/**
|
||||
* 巡检状态(0未完成,1已完成)
|
||||
*/
|
||||
inspectionState?: string;
|
||||
|
||||
/**
|
||||
* 巡检照片
|
||||
* 巡检图片
|
||||
*/
|
||||
inspectionImage?: string;
|
||||
|
||||
/**
|
||||
* 计划巡检人
|
||||
*/
|
||||
planInspectionPerson?: string;
|
||||
|
||||
/**
|
||||
* 实际巡检人
|
||||
*/
|
||||
actualInspectionPerson?: string;
|
||||
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
taskStatus?: string;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
inspectionResults?: string;
|
||||
|
||||
/**
|
||||
* 巡检描述
|
||||
*/
|
||||
inspectionDesc?: string;
|
||||
|
||||
/**
|
||||
* 巡检位置
|
||||
*/
|
||||
inspectionLocation?: string;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
*/
|
||||
@@ -135,6 +219,11 @@ export interface TaskDetailForm extends BaseEntity {
|
||||
*/
|
||||
pointEndTime?: string;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
searchValue?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface TaskDetailQuery extends PageQuery {
|
||||
@@ -164,20 +253,59 @@ export interface TaskDetailQuery extends PageQuery {
|
||||
patrolType?: string;
|
||||
|
||||
/**
|
||||
* 签到类型
|
||||
* 签到类型(1.现场拍照、2.摄像头签到、3.现场扫码)
|
||||
*/
|
||||
signType?: string;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
*/
|
||||
actualInspectionTime?: string;
|
||||
|
||||
/**
|
||||
* 实际签到状态(1已签到2.未签到)
|
||||
*/
|
||||
actualSignState?: string;
|
||||
|
||||
/**
|
||||
* 巡检状态(0未完成,1已完成)
|
||||
*/
|
||||
inspectionState?: string;
|
||||
|
||||
/**
|
||||
* 巡检照片
|
||||
* 巡检图片
|
||||
*/
|
||||
inspectionImag
|
||||
e?: string;
|
||||
inspectionImage?: string;
|
||||
|
||||
/**
|
||||
* 计划巡检人
|
||||
*/
|
||||
planInspectionPerson?: string;
|
||||
|
||||
/**
|
||||
* 实际巡检人
|
||||
*/
|
||||
actualInspectionPerson?: string;
|
||||
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
taskStatus?: string;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
inspectionResults?: string;
|
||||
|
||||
/**
|
||||
* 巡检描述
|
||||
*/
|
||||
inspectionDesc?: string;
|
||||
|
||||
/**
|
||||
* 巡检位置
|
||||
*/
|
||||
inspectionLocation?: string;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
@@ -194,6 +322,11 @@ e?: string;
|
||||
*/
|
||||
pointEndTime?: string;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
searchValue?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
|
@@ -24,7 +24,7 @@ export interface PersonVO {
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
gender: number
|
||||
gender: string | number
|
||||
|
||||
/**
|
||||
* 人脸图片
|
||||
@@ -75,6 +75,10 @@ export interface PersonVO {
|
||||
|
||||
authEndDate?: string
|
||||
|
||||
authTime: any[]
|
||||
|
||||
rosterType?: string | number
|
||||
|
||||
}
|
||||
|
||||
export interface PersonForm extends BaseEntity {
|
||||
@@ -293,7 +297,7 @@ export interface Person extends BaseEntity {
|
||||
* @param file excel文件
|
||||
*/
|
||||
export interface PerssonImportParam {
|
||||
updateSupport: boolean;
|
||||
unitId: number;
|
||||
file: Blob | File;
|
||||
updateSupport: boolean
|
||||
unitId: number
|
||||
file: Blob | File
|
||||
}
|
||||
|
@@ -51,6 +51,16 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'typeName',
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
title: '上报类型',
|
||||
field: 'reportingType',
|
||||
slots: {
|
||||
default: ({row}) => {
|
||||
return renderDict(row.reportingType, 'wy_gdsblx');
|
||||
},
|
||||
},
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '派单时间',
|
||||
field: 'dispatchTime',
|
||||
@@ -164,6 +174,15 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '上报类型',
|
||||
fieldName: 'reportingType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('wy_gdsblx'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
// {
|
||||
// label: '状态',
|
||||
// fieldName: 'status',
|
||||
@@ -206,6 +225,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'location',
|
||||
component: 'Input',
|
||||
rules: 'selectRequired',
|
||||
formItemClass:'col-span-2'
|
||||
},
|
||||
// {
|
||||
// label: '计划完成时间',
|
||||
@@ -234,6 +254,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
label: '备注',
|
||||
fieldName: 'remark',
|
||||
component: 'Textarea',
|
||||
formItemClass:'col-span-2'
|
||||
},
|
||||
// {
|
||||
// label: '是否超时',
|
||||
|
@@ -42,7 +42,7 @@ async function handleOpenChange(open: boolean) {
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="工单详情信息" class="w-[70%]">
|
||||
<div v-if="orderDetail">
|
||||
<Descriptions size="small" :column="2" :labelStyle="{width:'120px'}">
|
||||
<Descriptions size="small" :column="2" :labelStyle="{width:'130px'}" bordered>
|
||||
<DescriptionsItem label="订单号">
|
||||
{{ orderDetail.orderNo }}
|
||||
</DescriptionsItem>
|
||||
@@ -52,6 +52,16 @@ async function handleOpenChange(open: boolean) {
|
||||
<DescriptionsItem label="工单类型">
|
||||
{{orderDetail.typeName}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="上报类型">
|
||||
<component
|
||||
:is="renderDict(orderDetail.reportingType,'wy_gdsblx')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="处理权重">
|
||||
<component
|
||||
:is="renderDict(orderDetail.processingWeight,'pro_processing_weight')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="发起人">
|
||||
{{ orderDetail.initiatorPeople }}
|
||||
</DescriptionsItem>
|
||||
@@ -68,26 +78,23 @@ async function handleOpenChange(open: boolean) {
|
||||
<!-- {{ orderDetail.planCompleTime }}-->
|
||||
<!-- </DescriptionsItem>-->
|
||||
|
||||
|
||||
<DescriptionsItem label="备注" :span="2">
|
||||
{{ orderDetail.remark }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="创建时间">
|
||||
{{ orderDetail.createTime }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="备注">
|
||||
{{ orderDetail.remark }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="完成时间">
|
||||
{{ orderDetail.compleTime }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="处理权重">
|
||||
<component
|
||||
:is="renderDict(orderDetail.processingWeight,'pro_processing_weight')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="是否超时" v-if="orderDetail.isTimeOut!=null">
|
||||
<component
|
||||
:is="renderDict(orderDetail.isTimeOut,'wy_sf')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="服务评价" v-if="orderDetail.serviceEvalua!=null">
|
||||
<DescriptionsItem label="服务评价" v-if="orderDetail.serviceEvalua!=null" :span="2">
|
||||
<Rate :value="orderDetail.serviceEvalua" disabled/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="评价内容" v-if="orderDetail.serviceEvaluaText" :span="2">
|
||||
|
@@ -52,6 +52,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'pointId',
|
||||
width:150
|
||||
},
|
||||
{
|
||||
title: '巡检位置',
|
||||
field: 'inspectionLocation',
|
||||
width:150
|
||||
},
|
||||
{
|
||||
title: '签到类型',
|
||||
field: 'signType',
|
||||
@@ -64,7 +69,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
},
|
||||
{
|
||||
title: '巡检状态',
|
||||
field: 'status',
|
||||
field: 'inspectionState',
|
||||
width:150,
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
@@ -92,6 +97,36 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'inspectionTime',
|
||||
width:150
|
||||
},
|
||||
{
|
||||
title: '签到状态',
|
||||
field: 'actualSignState',
|
||||
width:120,
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.actualSignState, 'wy_xjqdzt');
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '计划巡检人',
|
||||
field: 'planInspectionPerson',
|
||||
width:120
|
||||
},
|
||||
{
|
||||
title: '实际巡检人',
|
||||
field: 'actualInspectionPerson',
|
||||
width:120
|
||||
},
|
||||
{
|
||||
title: '巡检结果',
|
||||
field: 'inspectionResults',
|
||||
width:180
|
||||
},
|
||||
{
|
||||
title: '巡检描述',
|
||||
field: 'inspectionDesc',
|
||||
width:180
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
field: 'remark',
|
||||
|
@@ -0,0 +1,98 @@
|
||||
<script setup lang="ts">
|
||||
import {shallowRef} from 'vue';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||
import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import {renderDict} from "#/utils/render";
|
||||
import {taskDetailInfo} from "#/api/property/inspectionManagement/inspectionDetail";
|
||||
import type {TaskDetailVO} from "#/api/property/inspectionManagement/inspectionDetail/model";
|
||||
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
taskDetail.value = null;
|
||||
},
|
||||
});
|
||||
|
||||
const taskDetail = shallowRef<null | TaskDetailVO>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
taskDetail.value = await taskDetailInfo(id);
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="巡检明细详情" class="w-[70%]">
|
||||
<Descriptions v-if="taskDetail" size="small" :column="2" bordered
|
||||
:labelStyle="{width:'100px'}">
|
||||
<DescriptionsItem label="巡检计划">
|
||||
{{ taskDetail.planId }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="巡检任务">
|
||||
{{ taskDetail.taskId }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="巡检路线">
|
||||
{{taskDetail.routeId}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="巡检点">
|
||||
{{ taskDetail.pointId}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="巡检位置">
|
||||
{{ taskDetail.inspectionLocation}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="签到类型">
|
||||
<component
|
||||
:is="renderDict(taskDetail.signType,'wy_xjqdfs')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="巡检状态">
|
||||
<component
|
||||
:is="renderDict(taskDetail.inspectionState,'wy_xjzt')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="巡检照片" :span="2">
|
||||
{{ taskDetail.inspectionImage }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="开始时间">
|
||||
{{ taskDetail.pointStartTime }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="结束时间">
|
||||
{{ taskDetail.pointEndTime }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="实际巡检时间">
|
||||
{{ taskDetail.inspectionTime }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="签到状态">
|
||||
<component
|
||||
:is="renderDict(taskDetail.actualSignState,'wy_xjqdzt')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="计划巡检人">
|
||||
{{ taskDetail.planInspectionPerson }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="实际巡检人">
|
||||
{{ taskDetail.actualInspectionPerson }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="巡检结果" :span="2">
|
||||
{{ taskDetail.inspectionResults }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="巡检描述" :span="2">
|
||||
{{ taskDetail.inspectionDesc }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="备注" :span="2">
|
||||
{{ taskDetail.remark }}
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
</template>
|
@@ -17,6 +17,7 @@ import {
|
||||
taskDetailExport,
|
||||
taskDetailList
|
||||
} from "#/api/property/inspectionManagement/inspectionDetail";
|
||||
import detailModal from './detail.vue'
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
@@ -67,8 +68,12 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
gridOptions,
|
||||
});
|
||||
|
||||
const [InspectionDetailsModal, modalApi] = useVbenModal({
|
||||
connectedComponent: inspectionDetailsModal,
|
||||
// const [InspectionDetailsModal, modalApi] = useVbenModal({
|
||||
// connectedComponent: inspectionDetailsModal,
|
||||
// });
|
||||
|
||||
const [DetailModal, detailApi] = useVbenModal({
|
||||
connectedComponent: detailModal,
|
||||
});
|
||||
|
||||
async function handInfo(row: Required<InspectionTaskForm>) {
|
||||
@@ -97,17 +102,18 @@ function handleDownloadExcel() {
|
||||
|
||||
</Space>
|
||||
</template>
|
||||
<!-- <template #action="{ row }">-->
|
||||
<!-- <Space>-->
|
||||
<!-- <ghost-button-->
|
||||
<!-- v-access:code="['property:inspectionTask:info']"-->
|
||||
<!-- @click.stop="handInfo(row)"-->
|
||||
<!-- >-->
|
||||
<!-- {{ $t('pages.common.info') }}-->
|
||||
<!-- </ghost-button>-->
|
||||
<!-- </Space>-->
|
||||
<!-- </template>-->
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
v-access:code="['property:inspectionTask:info']"
|
||||
@click.stop="handInfo(row)"
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
</Space>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<InspectionDetailsModal @reload="tableApi.query()"/>
|
||||
<DetailModal></DetailModal>
|
||||
<!-- <InspectionDetailsModal @reload="tableApi.query()"/>-->
|
||||
</Page>
|
||||
</template>
|
||||
|
@@ -41,19 +41,10 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
// {
|
||||
// title: '序号',
|
||||
// title: '员工编号',
|
||||
// field: 'id',
|
||||
// slots: {
|
||||
// default: ({ rowIndex }) => {
|
||||
// return (rowIndex + 1).toString();
|
||||
// },
|
||||
// },
|
||||
// width: 100,
|
||||
// },
|
||||
{
|
||||
title: '员工编号',
|
||||
field: 'id',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '员工名称',
|
||||
field: 'userName',
|
||||
@@ -62,7 +53,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '联系电话',
|
||||
field: 'phone',
|
||||
width: 100,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
@@ -72,18 +63,18 @@ export const columns: VxeGridProps['columns'] = [
|
||||
return renderDict(row.gender, 'sys_user_sex')
|
||||
},
|
||||
},
|
||||
width: 100,
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
field: 'img',
|
||||
title: '人脸图片',
|
||||
slots: { default: 'img' },
|
||||
minWidth: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '所属单位',
|
||||
field: 'unitName',
|
||||
width: 100,
|
||||
width: 160,
|
||||
},
|
||||
// {
|
||||
// title: '入驻位置',
|
||||
@@ -93,10 +84,18 @@ export const columns: VxeGridProps['columns'] = [
|
||||
title: '入驻时间',
|
||||
field: 'time',
|
||||
width: 100,
|
||||
formatter: ({ cellValue }) => {
|
||||
return cellValue ? new Date(cellValue).toLocaleDateString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '-') : ''
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '车牌号码',
|
||||
field: 'carNumber',
|
||||
title: '人员标签',
|
||||
field: 'rosterType',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.rosterType, 'roster_type')
|
||||
},
|
||||
},
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
@@ -112,14 +111,13 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '备注',
|
||||
field: 'remark',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
slots: { default: 'action' },
|
||||
title: '操作',
|
||||
minWidth: 180,
|
||||
width: 200,
|
||||
},
|
||||
]
|
||||
|
||||
@@ -236,7 +234,24 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
triggerFields: ['id'],
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
label: '人员标签',
|
||||
fieldName: 'rosterType',
|
||||
component: 'Select',
|
||||
formItemClass: 'col-span-1',
|
||||
componentProps: {
|
||||
options: getDictOptions('roster_type')
|
||||
},
|
||||
dependencies: {
|
||||
show: (values) => {
|
||||
return typeof values.id !== 'undefined'
|
||||
},
|
||||
disabled: (values) => {
|
||||
return !values.authSwitch
|
||||
},
|
||||
triggerFields: ['id', 'authSwitch'],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '授权期限',
|
||||
@@ -253,7 +268,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
show: (values) => {
|
||||
return typeof values.id !== 'undefined'
|
||||
},
|
||||
disabled:(values) => {
|
||||
disabled: (values) => {
|
||||
return !values.authSwitch
|
||||
},
|
||||
triggerFields: ['id', 'authSwitch'],
|
||||
@@ -263,12 +278,12 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
label: '通行权限组',
|
||||
fieldName: 'authGroupId',
|
||||
component: 'ApiSelect',
|
||||
formItemClass: 'col-span-2',
|
||||
formItemClass: 'col-span-1',
|
||||
dependencies: {
|
||||
show: (values) => {
|
||||
return typeof values.id !== 'undefined'
|
||||
},
|
||||
disabled:(values) => {
|
||||
disabled: (values) => {
|
||||
return !values.authSwitch
|
||||
},
|
||||
triggerFields: ['id', 'authSwitch'],
|
||||
@@ -393,8 +408,8 @@ export async function getUnitList(): Promise<
|
||||
{ value: number; label: string }[]
|
||||
> {
|
||||
const queryParam = {
|
||||
pageNum: 1000,
|
||||
pageSize: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
}
|
||||
const res = await resident_unitList(queryParam)
|
||||
const data: { value: number; label: string }[] = []
|
||||
|
@@ -165,11 +165,6 @@ function handleInfo(row: Required<PersonForm>) {
|
||||
<Avatar :src="row.img" v-if="row.img" />
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
<template #state="{ row }">
|
||||
|
||||
<TableSwitch :checkedValue="1" :unCheckedValue="0" v-model:value="row.state" :api="() => personUpdate(row)"
|
||||
:disabled="!hasAccessByCodes(['property:person:edit'])" @reload="() => tableApi.query()" />
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button @click.stop="handleInfo(row)">
|
||||
|
@@ -72,7 +72,9 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
const record = await personInfo(id)
|
||||
userId.value = record.userId
|
||||
unitId.value = record.unitId.toString()
|
||||
record.gender = record.gender?.toString()
|
||||
record.state = record.state?.toString()
|
||||
record.rosterType = record.rosterType?.toString()
|
||||
record.authTime = [record.authBegDate, record.authEndDate]
|
||||
await formApi.setValues(record)
|
||||
}
|
||||
|
@@ -5,31 +5,16 @@ import { DictEnum } from '@vben/constants';
|
||||
import { getPopupContainer } from '@vben/utils';
|
||||
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
import { personLibList } from '#/api/sis/personLib';
|
||||
import type { PersonLibQuery, PersonLibVO } from '#/api/sis/personLib/model';
|
||||
import { renderDict } from '#/utils/render'
|
||||
import { log } from 'console'
|
||||
|
||||
let libArr: PersonLibVO[] = [];
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '图片库',
|
||||
fieldName: 'libId',
|
||||
component: 'ApiSelect',
|
||||
label: '人员标签',
|
||||
fieldName: 'rosterType',
|
||||
component: 'Select',
|
||||
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;
|
||||
},
|
||||
options: getDictOptions('roster_type'),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -63,6 +48,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '性别',
|
||||
field: 'sex',
|
||||
slots:{
|
||||
default: ({row}) =>{
|
||||
return renderDict(row.sex, 'sys_user_sex')
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '邮箱',
|
||||
@@ -75,6 +65,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '证件类型',
|
||||
field: 'certificateType',
|
||||
slots:{
|
||||
default: ({row}) =>{
|
||||
return renderDict(row.certificateType, 'sys_certificate_type')
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '证件号码',
|
||||
@@ -84,6 +79,16 @@ export const columns: VxeGridProps['columns'] = [
|
||||
title: '出生日期',
|
||||
field: 'birthDate',
|
||||
},
|
||||
{
|
||||
title: '人员标签',
|
||||
field: 'rosterType',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.rosterType, 'roster_type')
|
||||
},
|
||||
},
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
@@ -93,29 +98,19 @@ export const columns: VxeGridProps['columns'] = [
|
||||
},
|
||||
];
|
||||
|
||||
const test = getDictOptions('roster_type');
|
||||
test.forEach(item => {
|
||||
console.log('item',item)
|
||||
});
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '图片库',
|
||||
fieldName: 'libIds',
|
||||
component: 'ApiSelect',
|
||||
label: '人员标签',
|
||||
fieldName: 'rosterType',
|
||||
component: 'Select',
|
||||
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;
|
||||
},
|
||||
options: getDictOptions('roster_type'),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user