@wufengteam/wform
Version:
@wufengteam/wform
230 lines (229 loc) • 5.93 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: 'DataLinkage',
icon: 'Datalink',
groupsName: '高级组件',
compType: 2,
label: '关联数据',
engineApi: ['customEngineApi.getPageVersionById', 'customEngineApi.queryLinkData', 'customEngineApi.getPageInstIdApi', 'customEngineApi.ImgUpload', 'customEngineApi.DformImagePicker', 'BannerModal', 'service.uploadSingleFile', 'service.downloadByFileId', 'getAppFileUrlById', 'resolveApiPath', 'downFieldPrefix', 'http', 'getMaterialFile', 'customEngineApi.downloadAction', 'customEngineApi.download', 'customEngineApi.pageOtherFormData'],
props: {
name: '关联数据',
span: 24,
placeholder: '请选择数据',
allowClear: true,
isInSubForm: false,
isView: false
},
todoProps: {
isView: {
label: '是否是子表单',
type: 'Input',
props: {
dependProps: {
noShow: true
}
}
},
isInSubForm: {
label: '是否是子表单',
type: 'Input',
props: {
dependProps: {
noShow: true
}
}
},
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
}
}
},
name: {
type: 'Input',
label: '标题',
groupsName: '基础',
props: {
label: '关联数据',
maxLength: 20,
showCount: true
}
},
fieldNameAlias: {
label: '字段编码',
type: 'FieldNameAlias',
groupsName: '基础',
props: {
required: true,
tooltipText: '编码仅支持字母、数字、下划线,不能都是数字,不能都是下划线,必须是字母开头,但不能以sys开头,不能是数据库关键字'
}
},
placeholder: {
label: '引导文字',
type: 'Input',
groupsName: '基础',
props: {
maxLength: 50,
showCount: 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'
}
}
},
required: {
label: '必填',
type: 'Switch',
groupsName: '校验',
istodoBind: false,
props: {
defaultValue: false
}
},
bindForm: {
label: '关联表单',
type: 'bindForm',
groupsName: '数据联动',
props: {
required: true
}
},
selectFields: {
label: '查询弹窗显示字段',
type: 'selectAttr',
groupsName: '数据联动',
props: {
required: true,
tooltipText: '取关联表单中的字段,用于选择数据弹窗中展示的列字段',
ignoreFieldByCode: ['obj_id', 'creator_id', 'created_name', 'created_time', 'updator_id', 'updated_name', 'updated_time', 'creator_org_id', 'flow_status', 'status_cd', 'creator_org_name', 'channel_flag'],
ignoreFieldByCompType: ['Switch', 'Rate', 'Api', 'QuillEditor', 'RichTextEditor', 'Attachments', 'BindTable', 'TextRecognition', 'DataLinkage', 'SubForm' // 子表单
]
}
},
dataLinkageRuleInfo: {
label: '数据填充',
type: 'dataLinkageRule',
groupsName: '数据联动'
},
previewFields: {
label: '表单中显示字段',
type: 'previewFieldsSet',
groupsName: '数据联动',
props: {
tooltipText: '取关联表单中的字段,在当前表单中展示'
}
},
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']
}
},
selfSpan: {
label: '列占比',
type: 'ColSpan',
groupsName: _constant.PROPS_FOR_PC,
props: {
dependProps: {
isInSubForm: false
}
},
istodoBind: false
}
},
todoActionList: (0, _utils.getTodoActionListByKey)(['getValue'])
};