会议管理
This commit is contained in:
@@ -14,6 +14,7 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('pro_processing_status'),
|
||||
},
|
||||
fieldName: 'state',
|
||||
label: '处理状态',
|
||||
@@ -30,60 +31,72 @@ export const columns: VxeGridProps['columns'] = [
|
||||
return (rowIndex + 1).toString();
|
||||
},
|
||||
},
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '养护名称',
|
||||
field: 'maintainName',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '小区id',
|
||||
field: 'communityId',
|
||||
},
|
||||
{
|
||||
title: '建筑id',
|
||||
field: 'buildingId',
|
||||
},
|
||||
{
|
||||
title: '楼层id',
|
||||
field: 'floorId',
|
||||
title: '服务地点(房间id)',
|
||||
field: 'roomId',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '服务类型',
|
||||
field: 'serveType',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.serveType, 'pro_service_type');
|
||||
},
|
||||
},
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '养护周期类型',
|
||||
field: 'periodType',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_TIME_UNIT 便于维护
|
||||
return renderDict(row.periodType, 'wy_time_unit');
|
||||
},
|
||||
},
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '养护周期频次',
|
||||
field: 'periodFrequency',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '订单id',
|
||||
title: '关联订单',
|
||||
field: 'orderId',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '计划执行时间',
|
||||
field: 'startTime',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '计划完成时间',
|
||||
field: 'endTime',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '巡检结果',
|
||||
field: 'inspectResult',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.inspectResult, 'pro_inspection_results');
|
||||
},
|
||||
},
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '处理措施',
|
||||
field: 'measure',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '客户评分',
|
||||
@@ -96,15 +109,22 @@ export const columns: VxeGridProps['columns'] = [
|
||||
});
|
||||
},
|
||||
},
|
||||
width:200
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '客户反馈',
|
||||
field: 'customerAdvice',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '处理状态',
|
||||
field: 'state',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.state, 'pro_processing_status');
|
||||
},
|
||||
},
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
@@ -130,32 +150,24 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'maintainName',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
{
|
||||
label: '小区id',
|
||||
label: '服务地点',
|
||||
fieldName: 'communityId',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '建筑id',
|
||||
fieldName: 'buildingId',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '楼层id',
|
||||
fieldName: 'floorId',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
{
|
||||
label: '服务类型',
|
||||
fieldName: 'serveType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('pro_service_type'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
labelWidth:100
|
||||
},
|
||||
{
|
||||
label: '养护周期类型',
|
||||
@@ -166,18 +178,21 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
options: getDictOptions('wy_time_unit'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
labelWidth:100
|
||||
},
|
||||
{
|
||||
label: '养护周期频次',
|
||||
fieldName: 'periodFrequency',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
{
|
||||
label: '订单id',
|
||||
label: '关联订单',
|
||||
fieldName: 'orderId',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
{
|
||||
label: '计划执行时间',
|
||||
@@ -189,6 +204,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
{
|
||||
label: '计划完成时间',
|
||||
@@ -200,16 +216,24 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
{
|
||||
label: '巡检结果',
|
||||
fieldName: 'inspectResult',
|
||||
component: 'Input',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('pro_inspection_results'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
labelWidth:100
|
||||
},
|
||||
{
|
||||
label: '处理措施',
|
||||
fieldName: 'measure',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
{
|
||||
label: '客户评分',
|
||||
@@ -222,17 +246,22 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
defaultValue: 0
|
||||
},
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
{
|
||||
label: '客户反馈',
|
||||
fieldName: 'customerAdvice',
|
||||
component: 'Textarea',
|
||||
labelWidth:100
|
||||
},
|
||||
{
|
||||
label: '处理状态',
|
||||
fieldName: 'state',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('pro_processing_status'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
labelWidth:100
|
||||
},
|
||||
];
|
||||
|
@@ -2,6 +2,7 @@
|
||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||
import { getVxePopupContainer } from '@vben/utils';
|
||||
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
||||
import { $t } from '@vben/locales';
|
||||
import {
|
||||
useVbenVxeGrid,
|
||||
vxeCheckboxChecked,
|
||||
@@ -14,6 +15,7 @@ import {
|
||||
import type { OrderMaintainForm } from '#/api/property/conservationManagement/model';
|
||||
import orderMaintainModal from './orderMaintain-modal.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
import orderMaintainDetail from "#/views/property/greenPlantRentalManagement/conservationManagement/orderMaintain-detail.vue";
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
@@ -61,6 +63,15 @@ const [OrderMaintainModal, modalApi] = useVbenModal({
|
||||
connectedComponent: orderMaintainModal,
|
||||
});
|
||||
|
||||
const [orderMaintainDetailModal, orderMaintainDetailApi] = useVbenModal({
|
||||
connectedComponent: orderMaintainDetail,
|
||||
});
|
||||
|
||||
async function handleInfo(row: Required<OrderMaintainForm>) {
|
||||
orderMaintainDetailApi.setData({ id: row.id });
|
||||
orderMaintainDetailApi.open();
|
||||
}
|
||||
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
modalApi.open();
|
||||
@@ -115,6 +126,11 @@ function handleMultiDelete() {
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
@click.stop="handleInfo(row)"
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
<ghost-button
|
||||
v-access:code="['property:orderMaintain:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
@@ -139,5 +155,6 @@ function handleMultiDelete() {
|
||||
</template>
|
||||
</BasicTable>
|
||||
<OrderMaintainModal @reload="tableApi.query()" />
|
||||
<orderMaintainDetailModal/>
|
||||
</Page>
|
||||
</template>
|
||||
|
@@ -0,0 +1,77 @@
|
||||
<script setup lang="ts">
|
||||
import type {conservationManagement} from '#/api/property/conservationManagement/model';
|
||||
import {shallowRef} from 'vue';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {Descriptions, DescriptionsItem, Rate} from 'ant-design-vue';
|
||||
import {orderMaintainInfo} from '#/api/property/conservationManagement';
|
||||
import {renderDict} from "#/utils/render";
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
conservationManagementDetail.value = null;
|
||||
},
|
||||
});
|
||||
|
||||
const conservationManagementDetail = shallowRef<null | conservationManagement>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const response = await orderMaintainInfo(id);
|
||||
conservationManagementDetail.value = response;
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="养护管理信息" class="w-[70%]">
|
||||
<Descriptions v-if="conservationManagementDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||
<DescriptionsItem label="养护名称">
|
||||
{{ conservationManagementDetail.maintainName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="服务地点">
|
||||
{{ conservationManagementDetail.roomId }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="服务类型" v-if="conservationManagementDetail.serveType!=null">
|
||||
<component
|
||||
:is="renderDict(conservationManagementDetail.serveType,'pro_service_type')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="养护周期">
|
||||
{{ conservationManagementDetail.orderId }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="关联订单">
|
||||
{{ conservationManagementDetail.orderId }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="计划执行时间">
|
||||
{{ conservationManagementDetail.startTime }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="计划完成时间">
|
||||
{{ conservationManagementDetail.endTime }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="巡检结果" v-if="conservationManagementDetail.inspectResult!=null">
|
||||
<component
|
||||
:is="renderDict(conservationManagementDetail.inspectResult,'pro_inspection_results')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="处理措施">
|
||||
{{ conservationManagementDetail.measure }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="客户评分">
|
||||
<Rate :value="conservationManagementDetail.customerScore" disabled />
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="客户反馈">
|
||||
{{ conservationManagementDetail.customerAdvice }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="处理状态" v-if="conservationManagementDetail.state!=null">
|
||||
<component
|
||||
:is="renderDict(conservationManagementDetail.state,'pro_processing_status')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
</template>
|
@@ -17,7 +17,7 @@ const title = computed(() => {
|
||||
|
||||
const [BasicForm, formApi] = useVbenForm({
|
||||
commonConfig: {
|
||||
formItemClass: 'col-span-2',
|
||||
formItemClass: 'col-span-1',
|
||||
labelWidth: 80,
|
||||
componentProps: {
|
||||
class: 'w-full',
|
||||
@@ -36,7 +36,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||
);
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
class: 'w-[550px]',
|
||||
class: 'w-[60%]',
|
||||
fullscreenButton: false,
|
||||
onBeforeClose,
|
||||
onClosed: handleClosed,
|
||||
@@ -52,6 +52,9 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
|
||||
if (isUpdate.value && id) {
|
||||
const record = await orderMaintainInfo(id);
|
||||
record.serveType = record.serveType?.toString();
|
||||
record.state = record.state?.toString();
|
||||
record.inspectResult = record.inspectResult?.toString();
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
await markInitialized();
|
||||
|
Reference in New Issue
Block a user