Files
zkxw/web-admin/src/utils/oa-related-approval-rule.ts
T

44 lines
917 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/** 与 FormCreate 官方 unique 同类:生成不重复 field(不依赖未声明的 @form-create/utils) */
let _uidSeq = 0
function uniqueId() {
const num = 370 + ++_uidSeq
return (
'F' +
Math.random().toString(36).slice(3, 6) +
Number(`${Date.now()}`).toString(36) +
num.toString(36) +
'c'
)
}
/** FormCreate Designer DragRule:关联审批单 */
export const relatedApprovalDragRule = {
menu: 'main' as const,
icon: 'icon-select',
label: '关联审批单',
name: 'relatedApproval',
input: true,
mask: true,
validate: ['array'],
event: ['change'],
rule() {
return {
type: 'relatedApproval',
field: uniqueId(),
title: '关联审批单',
info: '',
$required: false,
props: {}
}
},
props() {
return [
{
type: 'input',
field: 'formCreateInfo',
title: '提示信息'
}
]
}
}