会议管理
This commit is contained in:
@@ -4,6 +4,7 @@ import { getDictOptions } from '#/utils/dict';
|
||||
import { renderDict } from '#/utils/render';
|
||||
import {h} from "vue";
|
||||
import {Rate} from "ant-design-vue";
|
||||
import {rentalOrderList} from "#/api/property/rentalOrder";
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
@@ -38,11 +39,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'maintainName',
|
||||
minWidth: '120'
|
||||
},
|
||||
{
|
||||
title: '服务地点',
|
||||
field: 'roomId',
|
||||
minWidth: '120'
|
||||
},
|
||||
// {
|
||||
// title: '服务地点',
|
||||
// field: 'roomName',
|
||||
// minWidth: '120'
|
||||
// },
|
||||
{
|
||||
title: '服务类型',
|
||||
field: 'serveType',
|
||||
@@ -109,7 +110,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
});
|
||||
},
|
||||
},
|
||||
minWidth: '120'
|
||||
minWidth: '150'
|
||||
},
|
||||
{
|
||||
title: '客户反馈',
|
||||
@@ -154,8 +155,9 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
{
|
||||
label: '服务地点',
|
||||
fieldName: 'communityId',
|
||||
component: 'Input',
|
||||
fieldName: 'roomId',
|
||||
component: 'TreeSelect',
|
||||
defaultValue: undefined,
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
@@ -190,7 +192,13 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '关联订单',
|
||||
fieldName: 'orderId',
|
||||
component: 'Input',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: rentalOrderList,
|
||||
resultField: 'rows',
|
||||
labelField: 'orderNo',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
@@ -231,7 +239,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '处理措施',
|
||||
fieldName: 'measure',
|
||||
component: 'Input',
|
||||
component: 'Textarea',
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
|
@@ -34,15 +34,15 @@ async function handleOpenChange(open: boolean) {
|
||||
{{ conservationManagementDetail.maintainName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="服务地点">
|
||||
{{ conservationManagementDetail.roomId }}
|
||||
{{ conservationManagementDetail.roomName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="服务类型" v-if="conservationManagementDetail.serveType!=null">
|
||||
<component
|
||||
:is="renderDict(conservationManagementDetail.serveType,'pro_service_type')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="养护周期">
|
||||
{{ conservationManagementDetail.orderId }}
|
||||
<DescriptionsItem label="养护周期" v-if="conservationManagementDetail.periodType!=null">
|
||||
1<component style="display: inline-block" :is="renderDict(conservationManagementDetail.periodType,'wy_time_unit')"/>{{ conservationManagementDetail.periodFrequency }}次
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="关联订单">
|
||||
{{ conservationManagementDetail.orderId }}
|
||||
|
@@ -2,12 +2,12 @@
|
||||
import { computed, ref } from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { $t } from '@vben/locales';
|
||||
import { cloneDeep } from '@vben/utils';
|
||||
import { cloneDeep,handleNode,getPopupContainer } from '@vben/utils';
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { orderMaintainAdd, orderMaintainInfo, orderMaintainUpdate } from '#/api/property/conservationManagement';
|
||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||
import { modalSchema } from './data';
|
||||
|
||||
import { communityTree } from '#/api/property/community';
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
const isUpdate = ref(false);
|
||||
|
||||
@@ -45,6 +45,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
if (!isOpen) {
|
||||
return null;
|
||||
}
|
||||
setupCommunitySelect()
|
||||
modalApi.modalLoading(true);
|
||||
|
||||
const { id } = modalApi.getData() as { id?: number | string };
|
||||
@@ -55,6 +56,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
record.serveType = record.serveType?.toString();
|
||||
record.state = record.state?.toString();
|
||||
record.inspectResult = record.inspectResult?.toString();
|
||||
record.periodType = record.periodType?.toString();
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
await markInitialized();
|
||||
@@ -86,6 +88,43 @@ async function handleClosed() {
|
||||
await formApi.resetForm();
|
||||
resetInitialized();
|
||||
}
|
||||
|
||||
// 获取服务地址
|
||||
async function setupCommunitySelect() {
|
||||
const areaList = await communityTree(5);
|
||||
// 选中后显示在输入框的值 即父节点 / 子节点
|
||||
// addFullName(areaList, 'areaName', ' / ');
|
||||
const splitStr = '/';
|
||||
handleNode(areaList, 'label', splitStr, function (node: any) {
|
||||
if (node.level != 5) {
|
||||
node.disabled = true;
|
||||
}
|
||||
});
|
||||
formApi.updateSchema([
|
||||
{
|
||||
componentProps: () => ({
|
||||
class: 'w-full',
|
||||
fieldNames: {
|
||||
key: 'id',
|
||||
label: 'label',
|
||||
value: 'code',
|
||||
children: 'children',
|
||||
},
|
||||
getPopupContainer,
|
||||
placeholder: '请选择',
|
||||
showSearch: true,
|
||||
treeData: areaList,
|
||||
treeDefaultExpandAll: true,
|
||||
treeLine: { showLeafIcon: false },
|
||||
// 筛选的字段
|
||||
treeNodeFilterProp: 'label',
|
||||
// 选中后显示在输入框的值
|
||||
treeNodeLabelProp: 'fullName',
|
||||
}),
|
||||
fieldName: 'roomId',
|
||||
},
|
||||
]);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
Reference in New Issue
Block a user