Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
commit
e06f8861cc
137
apps/web-antd/src/api/property/building/model.d.ts
vendored
137
apps/web-antd/src/api/property/building/model.d.ts
vendored
@ -2,7 +2,7 @@ import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface BuildingVO {
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
@ -135,7 +135,7 @@ export interface BuildingVO {
|
||||
|
||||
export interface BuildingForm extends BaseEntity {
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
@ -397,3 +397,136 @@ export interface BuildingQuery extends PageQuery {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface Building extends BaseEntity {
|
||||
/**
|
||||
* 园区编码
|
||||
*/
|
||||
communityCode?: string;
|
||||
|
||||
/**
|
||||
* 建筑编码
|
||||
*/
|
||||
buildingCode?: string;
|
||||
|
||||
/**
|
||||
* 建筑名称
|
||||
*/
|
||||
buildingName?: string;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
province?: string;
|
||||
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
city?: string;
|
||||
|
||||
/**
|
||||
* 区
|
||||
*/
|
||||
district?: string;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
addr?: string;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
lon?: string;
|
||||
|
||||
/**
|
||||
* 维度
|
||||
*/
|
||||
lat?: string;
|
||||
|
||||
/**
|
||||
* 产权性质(1:自持,2:承租,3:自持+承租,4:政府免费使用)
|
||||
*/
|
||||
cqxz?: number;
|
||||
|
||||
/**
|
||||
* 不动产编号
|
||||
*/
|
||||
bdcbh?: string;
|
||||
|
||||
/**
|
||||
* 产权编号
|
||||
*/
|
||||
cqbh?: string;
|
||||
|
||||
/**
|
||||
* 图地编号
|
||||
*/
|
||||
tdbh?: string;
|
||||
|
||||
/**
|
||||
* 建筑面积
|
||||
*/
|
||||
jzmj?: number;
|
||||
|
||||
/**
|
||||
* 产权面积
|
||||
*/
|
||||
cqmj?: number;
|
||||
|
||||
/**
|
||||
* 可租面积
|
||||
*/
|
||||
kzmj?: number;
|
||||
|
||||
/**
|
||||
* 自用面积
|
||||
*/
|
||||
zymj?: number;
|
||||
|
||||
/**
|
||||
* 配套面积
|
||||
*/
|
||||
ptmj?: number;
|
||||
|
||||
/**
|
||||
* 车位面积
|
||||
*/
|
||||
cwmj?: number;
|
||||
|
||||
/**
|
||||
* 标准层高
|
||||
*/
|
||||
bzcg?: number;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
sort?: number;
|
||||
|
||||
/**
|
||||
* 组织编码
|
||||
*/
|
||||
orgCode?: string;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
dataState?: number;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
modifyTime?: string;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
searchValue?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
@ -217,3 +217,74 @@ export interface CommunityQuery extends PageQuery {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
export interface Community extends BaseEntity {
|
||||
/**
|
||||
* 社区名称
|
||||
*/
|
||||
communityName?: string;
|
||||
|
||||
/**
|
||||
* 社区编码
|
||||
*/
|
||||
communityCode?: string;
|
||||
|
||||
/**
|
||||
* 社区类型 1:园区,2:小区
|
||||
*/
|
||||
communityType?: number;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
province?: string;
|
||||
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
city?: string;
|
||||
|
||||
/**
|
||||
* 区
|
||||
*/
|
||||
district?: string;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
addr?: string;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
lon?: string;
|
||||
|
||||
/**
|
||||
* 维度
|
||||
*/
|
||||
lat?: string;
|
||||
|
||||
/**
|
||||
* 小图图片
|
||||
*/
|
||||
img?: string;
|
||||
|
||||
/**
|
||||
* 组织编码
|
||||
*/
|
||||
orgCode?: string;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
dataState?: number;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
modifyTime?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
@ -152,3 +152,60 @@ export interface PropertyQuery extends PageQuery {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface plantsProduct extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
plantCode?: string;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
plantName?: string;
|
||||
|
||||
/**
|
||||
* 产品分类
|
||||
*/
|
||||
plantType?: number;
|
||||
|
||||
/**
|
||||
* 产品图片
|
||||
*/
|
||||
imgPath?: string;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
specification?: string;
|
||||
|
||||
/**
|
||||
* 租金
|
||||
*/
|
||||
rent?: number;
|
||||
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
inventory?: number;
|
||||
|
||||
/**
|
||||
* 状态(0下架 1上架 )
|
||||
*/
|
||||
state?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
109
apps/web-antd/src/views/property/building/building-detail.vue
Normal file
109
apps/web-antd/src/views/property/building/building-detail.vue
Normal file
@ -0,0 +1,109 @@
|
||||
<script setup lang="ts">
|
||||
import type {Building} from '#/api/property/building/model';
|
||||
import {shallowRef} from 'vue';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||
import {buildingInfo} from '#/api/property/building';
|
||||
import {renderDict} from "#/utils/render";
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
buildingDetail.value = null;
|
||||
},
|
||||
});
|
||||
|
||||
const buildingDetail = shallowRef<null | Building>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const response = await buildingInfo(id);
|
||||
// 赋值
|
||||
buildingDetail.value = response;
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="建筑管理信息" class="w-[70%]">
|
||||
<Descriptions v-if="buildingDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||
<DescriptionsItem label="园区编码">
|
||||
{{ buildingDetail.communityCode }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="建筑编码">
|
||||
{{ buildingDetail.buildingCode }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="建筑名称">
|
||||
{{ buildingDetail.buildingName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="省">
|
||||
{{ buildingDetail.province }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="市">
|
||||
{{ buildingDetail.city }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="区">
|
||||
{{ buildingDetail.district }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="地址">
|
||||
{{ buildingDetail.addr }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="经度">
|
||||
{{ buildingDetail.lon }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="维度">
|
||||
{{ buildingDetail.lat }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="产权性质" v-if="buildingDetail.cqxz!=null">
|
||||
<component
|
||||
:is="renderDict(buildingDetail.cqxz,'wy_cqxz')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="不动产编号">
|
||||
{{ buildingDetail.bdcbh }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="产权编号">
|
||||
{{ buildingDetail.cqbh }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="土地编号">
|
||||
{{ buildingDetail.tdbh }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="建筑面积">
|
||||
{{ buildingDetail.jzmj }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="产权面积">
|
||||
{{ buildingDetail.cqmj }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="可租面积">
|
||||
{{ buildingDetail.kzmj }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="自用面积">
|
||||
{{ buildingDetail.zymj }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="配套面积">
|
||||
{{ buildingDetail.ptmj }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="车位面积">
|
||||
{{ buildingDetail.cwmj }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="标准层高">
|
||||
{{ buildingDetail.bzcg }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="组织编码">
|
||||
{{ buildingDetail.orgCode }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="数据状态" v-if="buildingDetail.dataState!=null">
|
||||
<component
|
||||
:is="renderDict(buildingDetail.dataState,'wy_qylx')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="修改时间">
|
||||
{{ buildingDetail.modifyTime }}
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
</template>
|
@ -20,36 +20,6 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
fieldName: 'buildingName',
|
||||
label: '建筑名称',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'province',
|
||||
label: '省',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'city',
|
||||
label: '市',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'district',
|
||||
label: '区',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'addr',
|
||||
label: '地址',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'lon',
|
||||
label: '经度',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'lat',
|
||||
label: '维度',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
@ -57,137 +27,43 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
options: getDictOptions('wy_cqxz'),
|
||||
},
|
||||
fieldName: 'cqxz',
|
||||
label: '产权性质(1:自持,2:承租,3:自持+承租,4:政府免费使用)',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'bdcbh',
|
||||
label: '不动产编号',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'cqbh',
|
||||
label: '产权编号',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'tdbh',
|
||||
label: '图地编号',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'jzmj',
|
||||
label: '建筑面积',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'cqmj',
|
||||
label: '产权面积',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'kzmj',
|
||||
label: '可租面积',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'zymj',
|
||||
label: '自用面积',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'ptmj',
|
||||
label: '配套面积',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'cwmj',
|
||||
label: '车位面积',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'bzcg',
|
||||
label: '标准层高',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'sort',
|
||||
label: '排序字段',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'orgCode',
|
||||
label: '组织编码',
|
||||
label: '产权性质',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'dataState',
|
||||
label: '数据状态:1有效,0无效',
|
||||
},
|
||||
{
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
fieldName: 'modifyTime',
|
||||
label: '修改时间',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'searchValue',
|
||||
label: '搜索值',
|
||||
},
|
||||
label: '数据状态',
|
||||
}
|
||||
];
|
||||
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// export const columns: () => VxeGridProps['columns'] = () => [
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '',
|
||||
field: 'id',
|
||||
},
|
||||
{
|
||||
title: '园区编码',
|
||||
field: 'communityCode',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '建筑编码',
|
||||
field: 'buildingCode',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '建筑名称',
|
||||
field: 'buildingName',
|
||||
},
|
||||
{
|
||||
title: '省',
|
||||
field: 'province',
|
||||
},
|
||||
{
|
||||
title: '市',
|
||||
field: 'city',
|
||||
},
|
||||
{
|
||||
title: '区',
|
||||
field: 'district',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '地址',
|
||||
field: 'addr',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '经度',
|
||||
field: 'lon',
|
||||
},
|
||||
{
|
||||
title: '维度',
|
||||
field: 'lat',
|
||||
},
|
||||
{
|
||||
title: '产权性质(1:自持,2:承租,3:自持+承租,4:政府免费使用)',
|
||||
title: '产权性质',
|
||||
field: 'cqxz',
|
||||
width: 'auto',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_CQXZ 便于维护
|
||||
@ -198,62 +74,62 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '不动产编号',
|
||||
field: 'bdcbh',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '产权编号',
|
||||
field: 'cqbh',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '图地编号',
|
||||
title: '土地编号',
|
||||
field: 'tdbh',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '建筑面积',
|
||||
field: 'jzmj',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '产权面积',
|
||||
field: 'cqmj',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '可租面积',
|
||||
field: 'kzmj',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '自用面积',
|
||||
field: 'zymj',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '配套面积',
|
||||
field: 'ptmj',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '车位面积',
|
||||
field: 'cwmj',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '标准层高',
|
||||
field: 'bzcg',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '排序字段',
|
||||
field: 'sort',
|
||||
},
|
||||
{
|
||||
title: '组织编码',
|
||||
field: 'orgCode',
|
||||
},
|
||||
{
|
||||
title: '数据状态:1有效,0无效',
|
||||
title: '数据状态',
|
||||
field: 'dataState',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
title: '修改时间',
|
||||
field: 'modifyTime',
|
||||
},
|
||||
{
|
||||
title: '搜索值',
|
||||
field: 'searchValue',
|
||||
width: 'auto'
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
@ -292,6 +168,12 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '组织编码',
|
||||
fieldName: 'orgCode',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '省',
|
||||
fieldName: 'province',
|
||||
@ -329,7 +211,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '产权性质(1:自持,2:承租,3:自持+承租,4:政府免费使用)',
|
||||
label: '产权性质',
|
||||
fieldName: 'cqxz',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
@ -404,13 +286,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '组织编码',
|
||||
fieldName: 'orgCode',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '数据状态:1有效,0无效',
|
||||
label: '数据状态',
|
||||
fieldName: 'dataState',
|
||||
component: 'Input',
|
||||
},
|
||||
@ -423,10 +299,5 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '搜索值',
|
||||
fieldName: 'searchValue',
|
||||
component: 'Input',
|
||||
},
|
||||
}
|
||||
];
|
||||
|
@ -1,18 +1,12 @@
|
||||
<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 {
|
||||
import {
|
||||
useVbenVxeGrid,
|
||||
vxeCheckboxChecked,
|
||||
type VxeGridProps
|
||||
type VxeGridProps
|
||||
} from '#/adapter/vxe-table';
|
||||
|
||||
import {
|
||||
@ -24,7 +18,10 @@ import type { BuildingForm } from '#/api/property/building/model';
|
||||
import { commonDownloadExcel } from '#/utils/file/download';
|
||||
|
||||
import buildingModal from './building-modal.vue';
|
||||
import buildingDetail from './building-detail.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
import unitInfoModal from "#/views/property/resident/unit/unit-detail.vue";
|
||||
import type {Resident_unitForm} from "#/api/property/resident/unit/model";
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
@ -87,7 +84,13 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
const [BuildingModal, modalApi] = useVbenModal({
|
||||
connectedComponent: buildingModal,
|
||||
});
|
||||
|
||||
const [buildingDetailModal, buildingDetailApi] = useVbenModal({
|
||||
connectedComponent: buildingDetail,
|
||||
});
|
||||
async function handleInfo(row: Required<BuildingForm>) {
|
||||
// buildingDetailApi.setData({ id: row.id });
|
||||
buildingDetailApi.open();
|
||||
}
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
modalApi.open();
|
||||
@ -138,8 +141,8 @@ function handleDownloadExcel() {
|
||||
<a-button
|
||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||
danger
|
||||
type="primary"
|
||||
v-access:code="['property:building:remove']"
|
||||
type="primary"
|
||||
v-access:code="['property:building:remove']"
|
||||
@click="handleMultiDelete">
|
||||
{{ $t('pages.common.delete') }}
|
||||
</a-button>
|
||||
@ -150,10 +153,21 @@ function handleDownloadExcel() {
|
||||
>
|
||||
{{ $t('pages.common.add') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="handleInfo"
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</a-button>
|
||||
</Space>
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
@click.stop="handleInfo(row)"
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
<ghost-button
|
||||
v-access:code="['property:building:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
@ -178,5 +192,6 @@ function handleDownloadExcel() {
|
||||
</template>
|
||||
</BasicTable>
|
||||
<BuildingModal @reload="tableApi.query()" />
|
||||
<buildingDetailModal/>
|
||||
</Page>
|
||||
</template>
|
||||
|
@ -0,0 +1,79 @@
|
||||
<script setup lang="ts">
|
||||
import type {Community} from '#/api/property/community/model';
|
||||
import {shallowRef} from 'vue';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||
import {communityInfo} from '#/api/property/community';
|
||||
import {renderDict} from "#/utils/render";
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
communityDetail.value = null;
|
||||
},
|
||||
});
|
||||
|
||||
const communityDetail = shallowRef<null | Community>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const response = await communityInfo(id);
|
||||
// 赋值
|
||||
communityDetail.value = response;
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="小区管理信息" class="w-[70%]">
|
||||
<Descriptions v-if="communityDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||
<DescriptionsItem label="社区名称">
|
||||
{{ communityDetail.communityName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="社区编码">
|
||||
{{ communityDetail.communityCode }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="社区类型" v-if="communityDetail.communityType!=null">
|
||||
<component
|
||||
:is="renderDict(communityDetail.communityType,'wy_sqlx')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="省">
|
||||
{{ communityDetail.province }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="市">
|
||||
{{ communityDetail.city }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="区">
|
||||
{{ communityDetail.district }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="地址">
|
||||
{{ communityDetail.addr }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="经度">
|
||||
{{ communityDetail.lon }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="维度">
|
||||
{{ communityDetail.lat }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="小图图片">
|
||||
{{ communityDetail.img }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="组织编码">
|
||||
{{ communityDetail.orgCode }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="数据状态" v-if="communityDetail.dataState!=null">
|
||||
<component
|
||||
:is="renderDict(communityDetail.dataState,'wy_cqxz')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="修改时间">
|
||||
{{ communityDetail.modifyTime }}
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
</template>
|
@ -22,63 +22,13 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
options: getDictOptions('wy_sqlx'),
|
||||
},
|
||||
fieldName: 'communityType',
|
||||
label: '社区类型 1:园区,2:小区',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'province',
|
||||
label: '省',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'city',
|
||||
label: '市',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'district',
|
||||
label: '区',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'addr',
|
||||
label: '地址',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'lon',
|
||||
label: '经度',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'lat',
|
||||
label: '维度',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'img',
|
||||
label: '小图图片',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'orgCode',
|
||||
label: '组织编码',
|
||||
label: '社区类型',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'dataState',
|
||||
label: '数据状态:1有效,0无效',
|
||||
},
|
||||
{
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
fieldName: 'modifyTime',
|
||||
label: '修改时间',
|
||||
},
|
||||
label: '数据状态',
|
||||
}
|
||||
];
|
||||
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
@ -98,7 +48,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'communityCode',
|
||||
},
|
||||
{
|
||||
title: '社区类型 1:园区,2:小区',
|
||||
title: '社区类型',
|
||||
field: 'communityType',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
@ -136,11 +86,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'img',
|
||||
},
|
||||
{
|
||||
title: '组织编码',
|
||||
field: 'orgCode',
|
||||
},
|
||||
{
|
||||
title: '数据状态:1有效,0无效',
|
||||
title: '数据状态',
|
||||
field: 'dataState',
|
||||
},
|
||||
{
|
||||
@ -179,7 +125,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '社区类型 1:园区,2:小区',
|
||||
label: '社区类型',
|
||||
fieldName: 'communityType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
@ -234,13 +180,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '组织编码',
|
||||
fieldName: 'orgCode',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '数据状态:1有效,0无效',
|
||||
label: '数据状态',
|
||||
fieldName: 'dataState',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
|
@ -1,18 +1,12 @@
|
||||
<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 {
|
||||
import {
|
||||
useVbenVxeGrid,
|
||||
vxeCheckboxChecked,
|
||||
type VxeGridProps
|
||||
type VxeGridProps
|
||||
} from '#/adapter/vxe-table';
|
||||
|
||||
import {
|
||||
@ -25,6 +19,8 @@ import { commonDownloadExcel } from '#/utils/file/download';
|
||||
|
||||
import communityModal from './community-modal.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
import communityDetail from "#/views/property/community/community-detail.vue";
|
||||
import type {BuildingForm} from "#/api/property/building/model";
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
@ -87,6 +83,13 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
const [CommunityModal, modalApi] = useVbenModal({
|
||||
connectedComponent: communityModal,
|
||||
});
|
||||
const [communityDetailModal, communityDetailApi] = useVbenModal({
|
||||
connectedComponent: communityDetail,
|
||||
});
|
||||
async function handleInfo(row: Required<BuildingForm>) {
|
||||
// communityDetailApi.setData({ id: row.id });
|
||||
communityDetailApi.open();
|
||||
}
|
||||
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
@ -138,8 +141,8 @@ function handleDownloadExcel() {
|
||||
<a-button
|
||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||
danger
|
||||
type="primary"
|
||||
v-access:code="['property:community:remove']"
|
||||
type="primary"
|
||||
v-access:code="['property:community:remove']"
|
||||
@click="handleMultiDelete">
|
||||
{{ $t('pages.common.delete') }}
|
||||
</a-button>
|
||||
@ -150,10 +153,21 @@ function handleDownloadExcel() {
|
||||
>
|
||||
{{ $t('pages.common.add') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="handleInfo"
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</a-button>
|
||||
</Space>
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
@click.stop="handleInfo(row)"
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
<ghost-button
|
||||
v-access:code="['property:community:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
@ -178,5 +192,6 @@ function handleDownloadExcel() {
|
||||
</template>
|
||||
</BasicTable>
|
||||
<CommunityModal @reload="tableApi.query()" />
|
||||
<communityDetailModal/>
|
||||
</Page>
|
||||
</template>
|
||||
|
@ -31,7 +31,7 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'dataState',
|
||||
label: '数据状态:1有效,0无效',
|
||||
label: '数据状态',
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -31,8 +31,13 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '主键',
|
||||
title: '序号',
|
||||
field: 'id',
|
||||
slots: {
|
||||
default: ({ rowIndex }) => {
|
||||
return (rowIndex + 1).toString();
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '产品编号',
|
||||
@ -114,7 +119,10 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '产品分类',
|
||||
fieldName: 'plantType',
|
||||
component: 'Input',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('pro_product_classification'),
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
|
@ -17,8 +17,11 @@ import {
|
||||
import type { PropertyForm } from '#/api/property/productManagement/model';
|
||||
import { commonDownloadExcel } from '#/utils/file/download';
|
||||
|
||||
import propertyModal from './property-modal.vue';
|
||||
import PlantsProductModal from './plantsProduct-modal.vue';
|
||||
import PlantsProductDetail from './plantsProduct-detail.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
import unitInfoModal from "#/views/property/resident/unit/unit-detail.vue";
|
||||
import type {Resident_unitForm} from "#/api/property/resident/unit/model";
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
@ -78,10 +81,18 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
gridOptions,
|
||||
});
|
||||
|
||||
const [PropertyModal, modalApi] = useVbenModal({
|
||||
connectedComponent: propertyModal,
|
||||
const [PlantsProduct, modalApi] = useVbenModal({
|
||||
connectedComponent: PlantsProductModal,
|
||||
});
|
||||
|
||||
const [PlantsProductDetailModal, PlantsProductDetailApi] = useVbenModal({
|
||||
connectedComponent: PlantsProductDetail,
|
||||
});
|
||||
async function handleInfo(row: Required<PropertyForm>) {
|
||||
PlantsProductDetailApi.setData({ id: row.id });
|
||||
PlantsProductDetailApi.open();
|
||||
}
|
||||
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
modalApi.open();
|
||||
@ -148,6 +159,11 @@ function handleDownloadExcel() {
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
@click.stop="handleInfo(row)"
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
<ghost-button
|
||||
v-access:code="['property:property:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
@ -171,6 +187,7 @@ function handleDownloadExcel() {
|
||||
</Space>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<PropertyModal @reload="tableApi.query()" />
|
||||
<PlantsProduct @reload="tableApi.query()" />
|
||||
<PlantsProductDetailModal/>
|
||||
</Page>
|
||||
</template>
|
||||
|
@ -0,0 +1,70 @@
|
||||
<script setup lang="ts">
|
||||
import type {plantsProduct} from '#/api/property/productManagement/model';
|
||||
import {shallowRef} from 'vue';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||
import {visitorManagementInfo} from '#/api/property/visitorManagement';
|
||||
import {renderDict} from "#/utils/render";
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
plantsProductDetail.value = null;
|
||||
},
|
||||
});
|
||||
|
||||
const plantsProductDetail = shallowRef<null | plantsProduct>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const response = await visitorManagementInfo(id);
|
||||
// 赋值
|
||||
plantsProductDetail.value = response;
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="产品管理信息" class="w-[70%]">
|
||||
<Descriptions v-if="plantsProductDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||
<DescriptionsItem label="产品编号">
|
||||
{{ plantsProductDetail.plantCode }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="产品名称">
|
||||
{{ plantsProductDetail.plantName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="产品分类" v-if="plantsProductDetail.plantType!=null">
|
||||
<component
|
||||
:is="renderDict(plantsProductDetail.plantType,'pro_product_classification')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="图片">
|
||||
{{ plantsProductDetail.imgPath }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="规格">
|
||||
{{ plantsProductDetail.specification }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="租金">
|
||||
{{ plantsProductDetail.rent }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="库存数量">
|
||||
{{ plantsProductDetail.inventory }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="状态" v-if="plantsProductDetail.state!=null">
|
||||
<component
|
||||
:is="renderDict(plantsProductDetail.state,'product_management_status')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="备注">
|
||||
{{ plantsProductDetail.remark }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="创建时间">
|
||||
{{ plantsProductDetail.createTime }}
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
</template>
|
Loading…
Reference in New Issue
Block a user