fix:建筑管理、楼层管理
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
@@ -29,7 +29,7 @@ export interface BuildingVO {
|
||||
/**
|
||||
* 建筑类型('1:住宅','2:商业','3:混合')
|
||||
*/
|
||||
buildType: number;
|
||||
buildType: string;
|
||||
|
||||
/**
|
||||
* 电梯数量
|
||||
|
@@ -59,6 +59,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
|
||||
if (isUpdate.value && id) {
|
||||
const record = await buildingInfo(id);
|
||||
record.buildType = record.buildType.toString();
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
await markInitialized();
|
||||
|
@@ -105,12 +105,20 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '总层数',
|
||||
fieldName: 'floorCount',
|
||||
component: 'Input',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:1,
|
||||
precision:0,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '单元数',
|
||||
fieldName: 'unitCount',
|
||||
component: 'Input',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:1,
|
||||
precision:0,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '建筑类型',
|
||||
@@ -124,14 +132,17 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '电梯数量',
|
||||
fieldName: 'elevatorCount',
|
||||
component: 'Input',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:0,
|
||||
precision:0,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '竣工日期',
|
||||
fieldName: 'completionDate',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD',
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
},
|
||||
|
@@ -54,7 +54,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
{
|
||||
component: 'TreeSelect',
|
||||
fieldName: 'unitId',
|
||||
fieldName: 'buildingId',
|
||||
defaultValue: undefined,
|
||||
label: '社区建筑',
|
||||
rules: 'selectRequired',
|
||||
@@ -80,11 +80,19 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '房间数量',
|
||||
fieldName: 'roomCount',
|
||||
component: 'Input',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:0,
|
||||
precision:0,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '层高',
|
||||
fieldName: 'floorHeight',
|
||||
component: 'Input',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:0,
|
||||
precision:0,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@@ -90,12 +90,12 @@ async function handleConfirm() {
|
||||
* 初始化城市
|
||||
*/
|
||||
async function setupCommunitySelect() {
|
||||
const areaList = await communityTree(3);
|
||||
const areaList = await communityTree(2);//楼层关联建筑
|
||||
// 选中后显示在输入框的值 即父节点 / 子节点
|
||||
// addFullName(areaList, 'areaName', ' / ');
|
||||
const splitStr = '/';
|
||||
handleNode(areaList, 'label', splitStr, function (node: any) {
|
||||
if (node.level != 3) {
|
||||
if (node.level != 2) {
|
||||
node.disabled = true;
|
||||
}
|
||||
});
|
||||
@@ -120,7 +120,7 @@ async function setupCommunitySelect() {
|
||||
// 选中后显示在输入框的值
|
||||
treeNodeLabelProp: 'fullName',
|
||||
}),
|
||||
fieldName: 'unitId',
|
||||
fieldName: 'buildingId',
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
@@ -1,13 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import type { Recordable } from '@vben/types';
|
||||
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||
import { getVxePopupContainer } from '@vben/utils';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import {
|
||||
useVbenVxeGrid,
|
||||
|
Reference in New Issue
Block a user