四零语境后端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
1.9 KiB

  1. import {BasicColumn} from '/src/components/Table';
  2. import {FormSchema} from '/src/components/Table';
  3. import { rules} from '/src/utils/helper/validator';
  4. import { render } from '/src/utils/common/renderUtils';
  5. import { getWeekMonthQuarterYear } from '/src/utils';
  6. import { getAudioBuildStatus } from './AppletArticle.api';
  7. //列表数据
  8. export const columns: BasicColumn[] = [
  9. {
  10. title: '标题',
  11. align:"center",
  12. dataIndex: 'title'
  13. },
  14. {
  15. title: '排序',
  16. align:"center",
  17. dataIndex: 'sort'
  18. },
  19. {
  20. title: '上架',
  21. align:"center",
  22. dataIndex: 'status',
  23. customRender:({text}) => {
  24. return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}])
  25. },
  26. },
  27. {
  28. title: '音频构建状态',
  29. align:"center",
  30. dataIndex: 'contentHashcode',
  31. },
  32. ];
  33. //查询数据
  34. export const searchFormSchema: FormSchema[] = [
  35. ];
  36. //表单数据
  37. export const formSchema: FormSchema[] = [
  38. {
  39. label: '标题',
  40. field: 'title',
  41. component: 'Input',
  42. },
  43. {
  44. label: '排序',
  45. field: 'sort',
  46. component: 'InputNumber',
  47. },
  48. {
  49. label: '上架',
  50. field: 'status',
  51. component: 'JSwitch',
  52. componentProps:{
  53. },
  54. },
  55. {
  56. label: '内容',
  57. field: 'content',
  58. component: 'JEditor',
  59. },
  60. // TODO 主键隐藏字段,目前写死为ID
  61. {
  62. label: '',
  63. field: 'id',
  64. component: 'Input',
  65. show: false
  66. },
  67. ];
  68. // 高级查询数据
  69. export const superQuerySchema = {
  70. title: {title: '标题',order: 0,view: 'text', type: 'string',},
  71. sort: {title: '排序',order: 1,view: 'number', type: 'number',},
  72. status: {title: '上架',order: 2,view: 'switch', type: 'string',},
  73. };
  74. /**
  75. * formSchema
  76. * @param param
  77. */
  78. export function getBpmFormSchema(_formData): FormSchema[]{
  79. // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
  80. return formSchema;
  81. }