|
|
@@ -1,10 +1,12 @@
|
|
|
import VillageInfoApi, { CommonInfoModel, VillageBulidingInfo, VillageEnvInfo } from "@/api/inhert/VillageInfoApi";
|
|
|
+import { useAliOssUploadCo } from "@/common/components/upload/AliOssUploadCo";
|
|
|
import type { FormDefine, FormDefineItem, IFormItemCallbackAdditionalProps } from "@/components/dynamic";
|
|
|
import type { FormGroupProps } from "@/components/dynamic/DynamicFormCate.vue";
|
|
|
import type { CheckBoxListProps } from "@/components/dynamic/wrappers/CheckBoxList.vue";
|
|
|
-import type { IDynamicFormItemSelectIdFormItemProps, IDynamicFormItemSelectIdOption } from "@/components/dynamic/wrappers/PickerIdField";
|
|
|
+import type { IDynamicFormItemSelectIdFormItemProps } from "@/components/dynamic/wrappers/PickerIdField";
|
|
|
import type { FieldProps } from "@/components/form/Field.vue";
|
|
|
import type { PickerFieldProps } from "@/components/form/PickerField.vue";
|
|
|
+import type { UploaderFieldProps } from "@/components/form/UploaderField.vue";
|
|
|
import type { NewDataModel } from "@imengyu/js-request-transform";
|
|
|
|
|
|
type SingleForm = [NewDataModel, FormDefine]
|
|
|
@@ -1442,10 +1444,13 @@ const villageInfoForm : Record<string, Record<number, SingleForm>> = {
|
|
|
{
|
|
|
label: '分布图',
|
|
|
name: 'distribution',
|
|
|
- type: 'uploader-image',
|
|
|
+ type: 'uploader',
|
|
|
defaultValue: '',
|
|
|
params: {
|
|
|
- },
|
|
|
+ upload: useAliOssUploadCo('xiangyuan/distribution'),
|
|
|
+ maxFileSize: 1024 * 1024 * 20,
|
|
|
+ single: true,
|
|
|
+ } as UploaderFieldProps,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请上传分布图',
|
|
|
@@ -1662,10 +1667,13 @@ const villageInfoForm : Record<string, Record<number, SingleForm>> = {
|
|
|
{
|
|
|
label: '图片',
|
|
|
name: 'images',
|
|
|
- type: 'uploader-image',
|
|
|
+ type: 'uploader',
|
|
|
defaultValue: '',
|
|
|
params: {
|
|
|
- },
|
|
|
+ upload: useAliOssUploadCo('xiangyuan/relic'),
|
|
|
+ maxFileSize: 1024 * 1024 * 20,
|
|
|
+ maxUploadCount: 20,
|
|
|
+ } as UploaderFieldProps,
|
|
|
rules: []
|
|
|
},
|
|
|
{
|
|
|
@@ -1883,8 +1891,8 @@ const villageInfoForm : Record<string, Record<number, SingleForm>> = {
|
|
|
label: '具体传承时间',
|
|
|
name: 'otherInheritanceTime',
|
|
|
type: 'picker-datetime',
|
|
|
- hidden: { callback(model, rawModel) {
|
|
|
- return !(rawModel.inheritanceTime === 150);
|
|
|
+ show: { callback(model, rawModel) {
|
|
|
+ return (rawModel.inheritanceTime === 150);
|
|
|
} },
|
|
|
params: {
|
|
|
type: 'datetime',
|
|
|
@@ -1989,7 +1997,7 @@ const villageInfoForm : Record<string, Record<number, SingleForm>> = {
|
|
|
label: '公交车介绍',
|
|
|
name: 'busIntro',
|
|
|
type: 'text',
|
|
|
- hidden: { callback: (_, rawModel) => !(rawModel.isBus === 1) },
|
|
|
+ show: { callback: (_, rawModel) => (rawModel.isBus === 1) },
|
|
|
defaultValue: '',
|
|
|
params: {
|
|
|
placeholder: '请输入公交车介绍',
|
|
|
@@ -2029,21 +2037,25 @@ const villageInfoForm : Record<string, Record<number, SingleForm>> = {
|
|
|
{
|
|
|
label: '景区全景图',
|
|
|
name: 'panorama',
|
|
|
- type: 'uploader-image',
|
|
|
+ type: 'uploader',
|
|
|
defaultValue: '',
|
|
|
params: {
|
|
|
- placeholder: '请上传景区全景图',
|
|
|
- },
|
|
|
+ upload: useAliOssUploadCo('xiangyuan/travel/panorama'),
|
|
|
+ maxFileSize: 1024 * 1024 * 20,
|
|
|
+ single: true,
|
|
|
+ } as UploaderFieldProps,
|
|
|
rules: []
|
|
|
},
|
|
|
{
|
|
|
label: '其他图',
|
|
|
name: 'otherImage',
|
|
|
- type: 'uploader-image',
|
|
|
+ type: 'uploader',
|
|
|
defaultValue: '',
|
|
|
params: {
|
|
|
- placeholder: '请上传其他图',
|
|
|
- },
|
|
|
+ upload: useAliOssUploadCo('xiangyuan/travel/guide'),
|
|
|
+ maxFileSize: 1024 * 1024 * 20,
|
|
|
+ single: true,
|
|
|
+ } as UploaderFieldProps,
|
|
|
rules: []
|
|
|
},
|
|
|
//解说牌
|
|
|
@@ -2179,7 +2191,8 @@ const villageInfoForm : Record<string, Record<number, SingleForm>> = {
|
|
|
{ value: 0, text: '无' },
|
|
|
{ value: 1, text: '有' },
|
|
|
{ value: 2, text: '其他' }
|
|
|
- ]]
|
|
|
+ ]],
|
|
|
+ singleValue: true,
|
|
|
} as PickerFieldProps,
|
|
|
itemParams: {
|
|
|
showRightArrow: true,
|
|
|
@@ -2193,9 +2206,11 @@ const villageInfoForm : Record<string, Record<number, SingleForm>> = {
|
|
|
label: '其他医疗点',
|
|
|
name: 'otherMedicalPoint',
|
|
|
type: 'text',
|
|
|
- hidden: { callback: (_, rawModel) => !(rawModel.medicalPoint === 2) },
|
|
|
+ show: { callback: (_, rawModel) => (rawModel.medicalPoint === 2) },
|
|
|
defaultValue: '',
|
|
|
- params: {},
|
|
|
+ params: {
|
|
|
+ placeholder: '请输入其他医疗点',
|
|
|
+ },
|
|
|
rules: []
|
|
|
},
|
|
|
//医疗点
|
|
|
@@ -2209,7 +2224,8 @@ const villageInfoForm : Record<string, Record<number, SingleForm>> = {
|
|
|
{ value: 0, text: '无' },
|
|
|
{ value: 1, text: '有' },
|
|
|
{ value: 2, text: '其他' }
|
|
|
- ]]
|
|
|
+ ]],
|
|
|
+ singleValue: true,
|
|
|
} as PickerFieldProps,
|
|
|
itemParams: {
|
|
|
showRightArrow: true,
|
|
|
@@ -2223,7 +2239,7 @@ const villageInfoForm : Record<string, Record<number, SingleForm>> = {
|
|
|
label: '其他游览车',
|
|
|
name: 'otherTourBus',
|
|
|
type: 'text',
|
|
|
- hidden: { callback: (_, rawModel) => !(rawModel.tourBus === 2) },
|
|
|
+ show: { callback: (_, rawModel) => (rawModel.tourBus === 2) },
|
|
|
defaultValue: '',
|
|
|
params: {
|
|
|
placeholder: '请输入其他游览车',
|
|
|
@@ -2467,10 +2483,13 @@ const villageInfoForm : Record<string, Record<number, SingleForm>> = {
|
|
|
{
|
|
|
label: '图片视频',
|
|
|
name: 'images',
|
|
|
- type: 'uploader-image',
|
|
|
+ type: 'uploader',
|
|
|
defaultValue: '',
|
|
|
params: {
|
|
|
- },
|
|
|
+ upload: useAliOssUploadCo('xiangyuan/activity'),
|
|
|
+ maxFileSize: 1024 * 1024 * 20,
|
|
|
+ maxUploadCount: 20,
|
|
|
+ } as UploaderFieldProps,
|
|
|
rules: []
|
|
|
},
|
|
|
]
|