dept.go 345 B

12345678910111213141516
  1. package controls
  2. // 部门控件
  3. type DeptInfo struct {
  4. Type string `json:"type"`
  5. ID string `json:"subjectId"`
  6. Name string `json:"name"`
  7. }
  8. func ParseDepts(deptStr string) ([]DeptInfo, error) {
  9. return ExtractInfos[DeptInfo](deptStr)
  10. }
  11. func ParseDept(deptStr string) (*DeptInfo, error) {
  12. return ExtractInfoFormInfos[DeptInfo](deptStr)
  13. }