feat(oa): add dept select FormCreate control with print formatting
Register type=dept on main app and oa-fc-host, with PC tree-select and
narrow drawer pickers storing {id,name} path snapshots; format dept values
in print and related-summary flatten.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
45d84d9642
commit
2e6e1f47d6
9 files changed
+475
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import FcDesigner from '@form-create/designer'
|
||||
import OaDeptSelect from '@/components/oa-approval/OaDeptSelect.vue'
|
||||
import { deptSelectDragRule } from '@/utils/oa-dept-select-rule'
|
||||
|
||||
const FLAG = '__oaDeptSelectConfigured'
|
||||
|
||||
export function setupOaDeptSelect(formCreate?: { component?: (name: string, c: unknown) => void }) {
|
||||
if ((FcDesigner as any)[FLAG]) return
|
||||
FcDesigner.component('dept', OaDeptSelect)
|
||||
if (typeof formCreate?.component === 'function') {
|
||||
formCreate.component('dept', OaDeptSelect)
|
||||
}
|
||||
if (typeof FcDesigner.addDragRule === 'function') {
|
||||
FcDesigner.addDragRule(deptSelectDragRule)
|
||||
}
|
||||
;(FcDesigner as any)[FLAG] = true
|
||||
}
|
||||
Reference in new issue
Block a user