|
|
@@ -0,0 +1,412 @@
|
|
|
+import VillageInfoApi, { VillageBulidingInfo } from "@/api/inhert/VillageInfoApi";
|
|
|
+import type { CheckBoxListProps } from "@/components/dynamic/wrappers/CheckBoxList.vue";
|
|
|
+import type { PickerIdFieldProps } from "@/components/dynamic/wrappers/PickerIdField";
|
|
|
+import type { FieldProps } from "@/components/form/Field.vue";
|
|
|
+import type { SingleForm } from "../forms";
|
|
|
+
|
|
|
+export const villageInfoBuildingForm : SingleForm = [VillageBulidingInfo, () => ({
|
|
|
+ formItems: [
|
|
|
+ {
|
|
|
+ label: '建筑名称',
|
|
|
+ name: 'name',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: {
|
|
|
+ placeholder: '请输入建筑名称',
|
|
|
+ },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入建筑名称',
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '建筑编码',
|
|
|
+ name: 'code',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: {
|
|
|
+ placeholder: '请输入建筑编码',
|
|
|
+ },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入建筑编码',
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '产权归属',
|
|
|
+ name: 'ownership',
|
|
|
+ type: 'select-id',
|
|
|
+ additionalProps: {
|
|
|
+ loadData: async () =>
|
|
|
+ (await VillageInfoApi.getCategoryChildList(152))
|
|
|
+ .map((p) => ({
|
|
|
+ value: p.id,
|
|
|
+ text: p.title,
|
|
|
+ }))
|
|
|
+ ,
|
|
|
+ } as PickerIdFieldProps,
|
|
|
+ formProps: { showRightArrow: true } as FieldProps,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择产权归属',
|
|
|
+ }],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '位置',
|
|
|
+ name: 'position',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: {
|
|
|
+ placeholder: '请输入位置',
|
|
|
+ },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入位置',
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '建筑类型',
|
|
|
+ name: 'buildingType',
|
|
|
+ type: 'select-id',
|
|
|
+ additionalProps: {
|
|
|
+ loadData: async () =>
|
|
|
+ (await VillageInfoApi.getCategoryChildList(163))
|
|
|
+ .map((p) => ({
|
|
|
+ value: p.id,
|
|
|
+ text: p.title,
|
|
|
+ }))
|
|
|
+ ,
|
|
|
+ } as PickerIdFieldProps,
|
|
|
+ formProps: { showRightArrow: true } as FieldProps,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择建筑类型',
|
|
|
+ }],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '建筑中的故事',
|
|
|
+ name: 'story',
|
|
|
+ type: 'richtext',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: {
|
|
|
+ placeholder: '请输入建筑中的故事',
|
|
|
+ maxLength: 200,
|
|
|
+ showWordLimit: true,
|
|
|
+ },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入建筑中的故事',
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '保护级别',
|
|
|
+ name: 'protectionLevel',
|
|
|
+ type: 'select-id',
|
|
|
+ additionalProps: {
|
|
|
+ loadData: async () =>
|
|
|
+ (await VillageInfoApi.getCategoryChildList(171))
|
|
|
+ .map((p) => ({
|
|
|
+ value: p.id,
|
|
|
+ text: p.title,
|
|
|
+ }))
|
|
|
+ ,
|
|
|
+ } as PickerIdFieldProps,
|
|
|
+ formProps: { showRightArrow: true } as FieldProps,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择建筑类型',
|
|
|
+ }],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '总占地面积',
|
|
|
+ name: 'area',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: {
|
|
|
+ placeholder: '请输入总占地面积',
|
|
|
+ },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入总占地面积',
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '建筑面积',
|
|
|
+ name: 'buildingArea',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: {
|
|
|
+ placeholder: '请输入建筑面积',
|
|
|
+ },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入建筑面积',
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '建筑层数',
|
|
|
+ name: 'floor',
|
|
|
+ type: 'number',
|
|
|
+ defaultValue: 0,
|
|
|
+ additionalProps: {
|
|
|
+ min: 0,
|
|
|
+ max: 1000,
|
|
|
+ },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入建筑层数',
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '所含建筑幢数',
|
|
|
+ name: 'num',
|
|
|
+ type: 'number',
|
|
|
+ defaultValue: 0,
|
|
|
+ additionalProps: {
|
|
|
+ min: 0,
|
|
|
+ max: 1000,
|
|
|
+ },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入所含建筑幢数',
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '始建时间(年)',
|
|
|
+ name: 'age',
|
|
|
+ type: 'number',
|
|
|
+ defaultValue: 2025,
|
|
|
+ additionalProps: {
|
|
|
+ min: -50000,
|
|
|
+ max: 2000,
|
|
|
+ },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入始建时间',
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '功能特点',
|
|
|
+ name: 'funcFeatures',
|
|
|
+ type: 'richtext',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: {
|
|
|
+ placeholder: '请输入功能特点',
|
|
|
+ maxLength: 200,
|
|
|
+ showWordLimit: true,
|
|
|
+ },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入功能特点',
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '承重结构(多选)',
|
|
|
+ name: 'bearingType',
|
|
|
+ type: 'check-box-list',
|
|
|
+ additionalProps: {
|
|
|
+ multiple: true,
|
|
|
+ loadData: async () =>
|
|
|
+ (await VillageInfoApi.getCategoryChildList(246))
|
|
|
+ .map((p) => ({
|
|
|
+ value: p.id,
|
|
|
+ text: p.title,
|
|
|
+ }))
|
|
|
+ ,
|
|
|
+ } as CheckBoxListProps,
|
|
|
+ defaultValue: [],
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择类型',
|
|
|
+ }],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '其他建筑类型',
|
|
|
+ name: 'otherBuildingType',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '其他建筑类型' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '居民建筑类型',
|
|
|
+ name: 'residentialBuildingType',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '居民建筑类型' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '其他保护级别',
|
|
|
+ name: 'otherProtectionLevel',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '其他保护级别' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '修缮过程',
|
|
|
+ name: 'repairProcess',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '修缮过程' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '建筑风貌',
|
|
|
+ name: 'architecturalStyle',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '建筑风貌' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '院落布局',
|
|
|
+ name: 'layout',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '院落布局' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '其他承重结构类型',
|
|
|
+ name: 'otherBearing',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '其他承重结构类型' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '屋面形式(多选)',
|
|
|
+ name: 'roofForm',
|
|
|
+ type: 'check-box-list',
|
|
|
+ additionalProps: {
|
|
|
+ multiple: true,
|
|
|
+ loadData: async () =>
|
|
|
+ (await VillageInfoApi.getCategoryChildList(264))
|
|
|
+ .map((p) => ({
|
|
|
+ value: p.id,
|
|
|
+ text: p.title,
|
|
|
+ }))
|
|
|
+ ,
|
|
|
+ } as CheckBoxListProps,
|
|
|
+ defaultValue: [],
|
|
|
+ rules: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '屋面形式说明',
|
|
|
+ name: 'roofDescribe',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '屋面形式说明' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '围护墙体(多选)',
|
|
|
+ name: 'wallType',
|
|
|
+ type: 'check-box-list',
|
|
|
+ additionalProps: {
|
|
|
+ multiple: true,
|
|
|
+ loadData: async () =>
|
|
|
+ (await VillageInfoApi.getCategoryChildList(271))
|
|
|
+ .map((p) => ({
|
|
|
+ value: p.id,
|
|
|
+ text: p.title,
|
|
|
+ }))
|
|
|
+ ,
|
|
|
+ } as CheckBoxListProps,
|
|
|
+ defaultValue: [],
|
|
|
+ rules: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '围护墙体说明',
|
|
|
+ name: 'otherBuildingType',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '围护墙体说明' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '地面做法(多选)',
|
|
|
+ name: 'floorType',
|
|
|
+ type: 'check-box-list',
|
|
|
+ additionalProps: {
|
|
|
+ multiple: true,
|
|
|
+ loadData: async () =>
|
|
|
+ (await VillageInfoApi.getCategoryChildList(258))
|
|
|
+ .map((p) => ({
|
|
|
+ value: p.id,
|
|
|
+ text: p.title,
|
|
|
+ }))
|
|
|
+ ,
|
|
|
+ } as CheckBoxListProps,
|
|
|
+ defaultValue: [],
|
|
|
+ rules: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '地面做法说明',
|
|
|
+ name: 'floorDescribe',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '地面做法说明' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '特殊工艺做法',
|
|
|
+ name: 'specialProcess',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '特殊工艺做法' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '历史功能',
|
|
|
+ name: 'funcHistory',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '历史功能' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '现状用途(多选)',
|
|
|
+ name: 'purpose',
|
|
|
+ type: 'check-box-list',
|
|
|
+ additionalProps: {
|
|
|
+ multiple: true,
|
|
|
+ loadData: async () =>
|
|
|
+ (await VillageInfoApi.getCategoryChildList(252))
|
|
|
+ .map((p) => ({
|
|
|
+ value: p.id,
|
|
|
+ text: p.title,
|
|
|
+ }))
|
|
|
+ ,
|
|
|
+ } as CheckBoxListProps,
|
|
|
+ defaultValue: [],
|
|
|
+ rules: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '其他现状用途',
|
|
|
+ name: 'otherPurpose',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '其他现状用途' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '改扩建情况及维修状况',
|
|
|
+ name: 'repair',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '改扩建情况及维修状况' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '改扩建情况及维修状况说明',
|
|
|
+ name: 'repairDescribe',
|
|
|
+ type: 'text',
|
|
|
+ defaultValue: '',
|
|
|
+ additionalProps: { placeholder: '改扩建情况及维修状况说明' },
|
|
|
+ rules: []
|
|
|
+ },
|
|
|
+ ]
|
|
|
+})]
|