Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
This commit is contained in:
@@ -2,6 +2,8 @@ import type {FormSchemaGetter} from '#/adapter/form';
|
||||
import type {VxeGridProps} from '#/adapter/vxe-table';
|
||||
import {renderDict} from "#/utils/render";
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
import {z} from "#/adapter/form";
|
||||
import {$t} from "@vben/locales";
|
||||
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
@@ -30,18 +32,10 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{type: 'checkbox', width: 60},
|
||||
{
|
||||
title: '序号',
|
||||
field: 'id',
|
||||
slots: {
|
||||
default: ({rowIndex}) => {
|
||||
return (rowIndex + 1).toString();
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '仓库名称',
|
||||
field: 'depotName',
|
||||
width:200
|
||||
},
|
||||
{
|
||||
title: '仓库类型',
|
||||
@@ -50,21 +44,23 @@ export const columns: VxeGridProps['columns'] = [
|
||||
default: ({row}) => {
|
||||
return renderDict(row.modelType, 'wy_cclx')
|
||||
}
|
||||
}
|
||||
},
|
||||
width:180
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'state',
|
||||
slots: {default: 'state'}
|
||||
slots: {default: 'state'},
|
||||
width:120
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
},
|
||||
{
|
||||
title: '描述信息',
|
||||
field: 'msg',
|
||||
},
|
||||
|
||||
{
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
minWidth:180,
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
@@ -89,7 +85,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
label: '仓库名称',
|
||||
fieldName: 'depotName',
|
||||
component: 'Input',
|
||||
rules:'required'
|
||||
rules: z.string().min(1,'请输入仓库名称').max(30, { message: '仓库名称过长' }),
|
||||
},
|
||||
{
|
||||
label: '仓库类型',
|
||||
|
@@ -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">
|
||||
|
@@ -154,7 +154,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '占地面积',
|
||||
fieldName: 'area',
|
||||
component: 'Input',
|
||||
component: 'InputNumber',
|
||||
},
|
||||
{
|
||||
label: '建成时间',
|
||||
|
@@ -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>
|
||||
|
@@ -116,7 +116,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
label: '计划名称',
|
||||
fieldName: 'planName',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
rules: z.string().min(1,'请输入计划名称').max(30, { message: '计划名称过长' }),
|
||||
},
|
||||
{
|
||||
label: '巡检路线',
|
||||
|
@@ -50,6 +50,13 @@ export const columns: VxeGridProps['columns'] = [
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
},
|
||||
{
|
||||
title: '二维码',
|
||||
field: 'qrcode',
|
||||
slots:{
|
||||
default: 'qrcode'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
field: 'remark',
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||
import { getVxePopupContainer } from '@vben/utils';
|
||||
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
||||
import { Modal, Popconfirm, Space,Popover,QRCode } from 'ant-design-vue';
|
||||
|
||||
import {
|
||||
useVbenVxeGrid,
|
||||
@@ -17,6 +17,8 @@ import type { InspectionPointForm } from '#/api/property/inspectionManagement/in
|
||||
|
||||
import inspectionPointModal from './inspectionPoint-modal.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
import pointDetail from './point-detail.vue';
|
||||
import {ref} from "vue";
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
@@ -80,6 +82,10 @@ const [InspectionPointModal, modalApi] = useVbenModal({
|
||||
connectedComponent: inspectionPointModal,
|
||||
});
|
||||
|
||||
const [PointDetail, detailApi] = useVbenModal({
|
||||
connectedComponent: pointDetail,
|
||||
});
|
||||
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
modalApi.open();
|
||||
@@ -89,6 +95,10 @@ async function handleEdit(row: Required<InspectionPointForm>) {
|
||||
modalApi.setData({ id: row.id });
|
||||
modalApi.open();
|
||||
}
|
||||
async function handleInfo(row: Required<InspectionPointForm>) {
|
||||
detailApi.setData({ id: row.id });
|
||||
detailApi.open();
|
||||
}
|
||||
|
||||
async function handleDelete(row: Required<InspectionPointForm>) {
|
||||
await inspectionPointRemove(row.id);
|
||||
@@ -108,6 +118,16 @@ function handleMultiDelete() {
|
||||
},
|
||||
});
|
||||
}
|
||||
const qrcodeCanvasRef = ref();
|
||||
async function handleDownload(row){
|
||||
const url = await qrcodeCanvasRef.value.toDataURL();
|
||||
const a = document.createElement('a');
|
||||
a.download = `${row.pointName}.png`;
|
||||
a.href = url;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -134,6 +154,12 @@ function handleMultiDelete() {
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
v-access:code="['property:inspectionPoint:info']"
|
||||
@click.stop="handleInfo(row)"
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
<ghost-button
|
||||
v-access:code="['property:inspectionPoint:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
@@ -156,7 +182,20 @@ function handleMultiDelete() {
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
</template>
|
||||
<template #qrcode="{row}">
|
||||
<Popover :overlay-inner-style="{ padding: 0 }">
|
||||
<template #content>
|
||||
<QRCode ref="qrcodeCanvasRef" :value="row.id" :bordered="false" />
|
||||
</template>
|
||||
<a-button
|
||||
size="small"
|
||||
@click="handleDownload(row)">
|
||||
下载
|
||||
</a-button>
|
||||
</Popover>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<InspectionPointModal @reload="tableApi.query()" />
|
||||
<PointDetail></PointDetail>
|
||||
</Page>
|
||||
</template>
|
||||
|
@@ -0,0 +1,64 @@
|
||||
<script setup lang="ts">
|
||||
import {shallowRef} from 'vue';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {Descriptions, DescriptionsItem,QRCode} 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 {inspectionPointInfo} from "#/api/property/inspectionManagement/inspectionPoint";
|
||||
import type {InspectionPointVO} from "#/api/property/inspectionManagement/inspectionPoint/model";
|
||||
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
pointDetail.value = null;
|
||||
},
|
||||
});
|
||||
|
||||
const pointDetail = shallowRef<null | InspectionPointVO>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
pointDetail.value = await inspectionPointInfo(id);
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="巡检点详情" class="w-[70%]">
|
||||
<Descriptions v-if="pointDetail" size="small" :column="2" bordered
|
||||
:labelStyle="{width:'120px'}">
|
||||
<DescriptionsItem label="巡检点名称">
|
||||
{{ pointDetail.pointName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="巡检点类型">
|
||||
<component
|
||||
:is="renderDict(pointDetail.pointType,'inspection_point_type')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="巡检项目">
|
||||
{{pointDetail.itemName}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="nfc编码">
|
||||
{{ pointDetail.nfcCode}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="创建时间" :span="2">
|
||||
{{ pointDetail.createTime}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="二维码" :span="2">
|
||||
<QRCode :value="pointDetail.id" />
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="备注" :span="2">
|
||||
{{pointDetail.remark}}
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
</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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user