EduCollection.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import { MatDialog } from "@angular/material/dialog";
  2. import { Router } from "@angular/router";
  3. import { openObjectEditDialog, ParseSchema } from "./func-parse";
  4. const EduCollection:ParseSchema = {
  5. "title":"报送合集",
  6. "subTitle":"创建报送合集,分配合集管理员,统一管理各地区的教材推荐报送流程和配额。",
  7. "className": "EduCollection",
  8. emptyImg:"/img/webhook-empty.png",
  9. emptyDesc:"请您创建报送合集,分配合集管理员,统一管理各地区的教材推荐报送流程和配额。",
  10. "fieldsArray": [
  11. {
  12. "key":"name",
  13. "name":"合集名称",
  14. "type": "String",
  15. isHeader:true
  16. },
  17. {
  18. "key":"code",
  19. "name":"合集CODE",
  20. "type": "String",
  21. isHeader:true
  22. },
  23. {
  24. "key":"desc",
  25. "name":"合集描述",
  26. "type": "String",
  27. isHeader:true
  28. },
  29. {
  30. "key":"profileSubmitted",
  31. "name":"合集报送人",
  32. "type": "Pointer",
  33. "targetClass":"Profile",
  34. isHeader:true
  35. },
  36. {
  37. "key":"status",
  38. "name":"合集状态",
  39. "type": "String",
  40. "options":[
  41. {label:"遴选中",value:"遴选中"},
  42. {label:"公示中",value:"公示中"},
  43. {label:"已完成",value:"已完成"}
  44. ],
  45. isHeader:true
  46. },
  47. ],
  48. buttons:[
  49. {
  50. name:"编辑",
  51. place:"item",
  52. show:(options:{object:Parse.Object})=>{
  53. return true
  54. },
  55. handle:(options:{dialog:MatDialog,object:Parse.Object,router:Router})=>{
  56. // openObjectEditDialog(options?.dialog,EduCollection,options?.object)
  57. options.router.navigate(['/nav-admin/manage/collection/edit',{id:options.object.id}])
  58. }
  59. },
  60. ]
  61. };
  62. export default EduCollection;