@wufengteam/wform
Version:
@wufengteam/wform
408 lines (407 loc) • 11.5 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _utils = require("../utils");
var _constant = require("../utils/constant");
var _default = exports.default = {
type: 'SubForm',
alias: 'null',
icon: 'Table',
groupsName: '高级组件',
compType: 2,
label: '子表单',
isContainer: true,
props: {
name: '子表单',
span: 24,
labelCol: 8,
subFormFields: [],
isAddData: true,
isExportTemplate: true,
isImportData: true,
isExportData: true,
isDelData: true,
isView: false
},
engineApi: ['customEngineApi.Input', 'customEngineApi.TextArea', 'customEngineApi.Password', 'customEngineApi.InputPhone', 'customEngineApi.InputMail', 'customEngineApi.InputNumber', 'customEngineApi.Select', 'customEngineApi.MultipleSelect', 'customEngineApi.Radio', 'customEngineApi.CheckboxGroup', 'customEngineApi.Cascader', 'customEngineApi.TreeSelect', 'customEngineApi.DatePicker', 'customEngineApi.TimePicker', 'customEngineApi.RangePicker', 'customEngineApi.ImgUpload', 'customEngineApi.VideoUpload', 'customEngineApi.StdUpload', 'customEngineApi.DataLinkage', 'functorsMap', 'sandBoxSafeRun', 'BannerModal', 'service.uploadSingleFile', 'service.downloadByFileId', 'resolveApiPath', 'customEngineApi.getPageVersionById', 'getAppFileUrlById', 'customEngineApi.getPageInstIdApi', 'customEngineApi.queryLinkData', 'customEngineApi.downloadAction', 'customEngineApi.download', 'customEngineApi.pageOtherFormData', 'customEngineApi.exportSubFormData', 'customEngineApi.getSubTableWorkBookTemplateApi', 'customEngineApi.resolveSubTableDataApi', 'customEngineApi.verifyIfConfig', 'customEngineApi.getUserRunning', 'customEngineApi.staffs', 'customEngineApi.getOrgInfoByAsync', 'customEngineApi.getOrgByOrgName', 'customEngineApi.getMapConfig', 'customEngineApi.uploadSingleFile', 'customEngineApi.DformImagePicker', 'downFieldPrefix', 'http', 'getMaterialFile', 'customEngineApi.findAreaByCode', 'customEngineApi.getOtherFormData', 'customEngineApi.callSqlService', 'customEngineApi.callStdService', 'customEngineApi.callInnerService', 'customEngineApi.callRhinEngine', 'customEngineApi.saveFormDataValidate'],
todoProps: {
isView: {
label: '是否是子表单',
type: 'Input',
props: {
dependProps: {
noShow: true
}
}
},
subFormFields: {
label: '字段',
type: 'Input',
props: {
dependProps: {
noShow: true
}
}
},
name: {
type: 'Input',
label: '标题',
groupsName: '基础',
props: {
label: '子表单',
maxLength: 20
}
},
fieldNameAlias: {
label: '字段编码',
type: 'FieldNameAlias',
groupsName: '基础',
props: {
required: true,
tooltipText: '编码仅支持字母、数字、下划线,不能都是数字,不能都是下划线,必须是字母开头,但不能以sys开头,不能是数据库关键字'
}
},
labelCol: {
label: '标题占比',
type: 'FormItemLabel',
groupsName: '基础',
props: {
dependProps: {
noShow: true
}
}
},
wrapperCol: {
label: '标题占比',
type: 'FormItemLabel',
groupsName: '基础',
props: {
dependProps: {
noShow: true
}
}
},
// 解决复制黏贴报 [组件属性]: 单行文本组件不可配置额外的fieldName字段。
fieldName: {
label: '字段编码',
type: 'Input',
props: {
dependProps: {
noShow: true
}
}
},
basicStatus: {
label: '状态',
type: 'RadioButton',
groupsName: '基础',
istodoBind: false,
props: {
options: [{
title: '普通',
value: 1
}, {
title: '隐藏',
value: 2
}, {
title: '禁用',
value: 3
}],
defaultValue: 1,
style: {
padding: '0 6px',
fontSize: '12px'
}
}
},
isAddData: {
label: '添加一行',
type: 'Switch',
groupsName: '基础',
props: {
defaultValue: true
}
},
isExportTemplate: {
label: '导出模板',
type: 'Switch',
groupsName: '基础',
props: {
defaultValue: true
}
},
isImportData: {
label: '导入',
type: 'Switch',
groupsName: '基础',
props: {
defaultValue: true
}
},
isExportData: {
label: '导出',
type: 'Switch',
groupsName: '基础',
props: {
defaultValue: true
}
},
isDelData: {
label: '删除',
type: 'Switch',
groupsName: '基础',
props: {
defaultValue: true
}
},
defaultValueType: {
label: '默认值',
type: 'Select',
groupsName: '基础',
props: {
defaultValue: 'notHave',
inhibitBtn: true,
description: '1、子表单默认值设置,仅在表单填写时生效,表单提交后不再自动设置子表单默认值;<br> 2、默认值数据条数建议限制在2000条以内。',
options: [{
title: '无默认值',
value: 'notHave'
}, {
title: '其他表单数据',
value: 'otherFormData'
}, {
title: '调用Api',
value: 'apiFormData'
}]
}
},
otherForm: {
label: '选择表单',
type: 'bindForm',
groupsName: '基础',
props: {
required: true,
dependProps: {
defaultValueType: 'otherFormData'
}
}
},
subFormFillOtherFormRule: {
label: '数据填充',
type: 'SubFormFillOtherForm',
groupsName: '基础',
props: {
required: true,
description: '将选择的表单数据,按照设置好的填充规则,初始化于子表单中。',
dependProps: {
defaultValueType: 'otherFormData'
}
}
},
subFormFilterAttrOtherFormRule: {
label: '数据过滤',
type: 'SubFormFilterAttrOtherForm',
groupsName: '基础',
props: {
dependProps: {
defaultValueType: 'otherFormData'
}
}
},
apiObject: {
label: '调用Api',
type: 'ApiObject',
groupsName: '基础',
props: {
required: true,
dependProps: {
defaultValueType: 'apiFormData'
}
}
},
apiParams: {
label: '输入参数',
type: 'SubFormApiParams',
groupsName: '基础',
props: {
required: true,
dependProps: {
defaultValueType: 'apiFormData'
}
}
},
apiRespond: {
label: '数据填充',
type: 'SubFormApiRespond',
groupsName: '基础',
istodoBind: false,
props: {
required: true,
dependProps: {
defaultValueType: 'apiFormData'
}
}
},
// required: {
// label: '必填',
// type: 'Switch',
// groupsName: '校验',
// istodoBind: false,
// props: {
// defaultValue: false,
// },
// },
isUnique: {
label: '字段唯一性校验',
type: 'Switch',
groupsName: '校验',
istodoBind: false,
props: {
defaultValue: false,
description: '支持对子表单中一个或多个字段进行唯一性校验,避免出现重复数据。'
}
},
uniqueFields: {
label: '校验字段',
type: 'UniqueFileds',
groupsName: '校验',
istodoBind: false,
props: {
required: true,
dependProps: {
isUnique: true
}
}
},
parityBit: {
label: '同外部数据校验',
type: 'Select',
groupsName: '校验',
props: {
defaultValue: 'notHave',
inhibitBtn: true,
description: '对子表单填写、导入的内容进行高级校验:1.同其他表单字段:支持将子表单中一个或多个字段,与其他表单中字段进行比较;<br>2.调用Api:支持将子表单中一个或多个字段,通过调用Api方式进行校验',
options: [{
title: '无需校验',
value: 'notHave'
}, {
title: '同其他表单字段',
value: 'otherFormData'
}, {
title: '调用Api',
value: 'apiFormData'
}]
}
},
parityApiObject: {
label: '调用Api',
type: 'SubFormParityApiObject',
groupsName: '校验',
props: {
required: true,
dependProps: {
parityBit: 'apiFormData'
}
}
},
parityApiParams: {
label: '参数设置',
type: 'SubFormParityApiParams',
groupsName: '校验',
props: {
required: true,
dependProps: {
parityBit: 'apiFormData'
}
}
},
parityOtherForm: {
label: '选择表单',
type: 'bindForm',
groupsName: '校验',
props: {
required: true,
dependProps: {
parityBit: 'otherFormData'
}
}
},
subFormParityAttrOtherFormRule: {
label: '校验详情',
type: 'SubFormParityAttrOtherFormRule',
groupsName: '校验',
props: {
required: true,
dependProps: {
parityBit: 'otherFormData'
}
}
},
dataStatisticsRules: {
label: '统计设置',
type: 'DataStatisticsRules',
groupsName: '数据统计',
istodoBind: false
},
selfSpan: {
label: '列占比',
type: 'ColSpan',
groupsName: _constant.PROPS_FOR_PC,
istodoBind: false
},
titleTip: {
label: '标题提示',
type: 'RadioButton',
groupsName: _constant.PROPS_FOR_PC,
props: {
options: [{
title: '无',
value: 'notext'
}, {
title: '文本',
value: 'text'
}],
defaultValue: 'notext'
}
},
tipIcon: {
label: '提示图标',
type: 'ChooseIcon',
groupsName: _constant.PROPS_FOR_PC,
props: {
visibleFlag: 'titleTip',
visibleFlagValue: ['text'],
tabs: ['常用图标', '线框风格', '实底风格']
}
},
tipLocation: {
label: '提示位置',
type: 'RadioButton',
groupsName: _constant.PROPS_FOR_PC,
props: {
options: [{
title: '标题前',
value: 'before'
}, {
title: '标题后',
value: 'after'
}],
defaultValue: 'after',
visibleFlag: 'titleTip',
visibleFlagValue: ['text']
}
},
tipContent: {
label: '提示内容',
type: 'Input',
groupsName: _constant.PROPS_FOR_PC,
props: {
visibleFlag: 'titleTip',
visibleFlagValue: ['text']
}
}
},
todoActionList: (0, _utils.getTodoActionListByKey)(['getValue']),
onlyChildren: ['DataLinkage', 'Input', 'TextArea', 'Password', 'InputPhone', 'InputMail', 'InputNumber', 'Select', 'MultipleSelect', 'Radio', 'CheckboxGroup', 'Cascader', 'TreeSelect', 'DatePicker', 'TimePicker', 'RangePicker', 'VideoUpload', 'ImgUpload', 'StdUpload', 'Address', 'Location', 'Autograph', 'AddMember', 'AddDepartment']
};