role.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. * Copyright (c) 2018-2025, lengleng All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions are met:
  6. *
  7. * Redistributions of source code must retain the above copyright notice,
  8. * this list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * Neither the name of the pig4cloud.com developer nor the names of its
  13. * contributors may be used to endorse or promote products derived from
  14. * this software without specific prior written permission.
  15. * Author: lengleng (wangiegie@gmail.com)
  16. */
  17. export const tableOption = {
  18. border: true,
  19. index: true,
  20. indexLabel: '序号',
  21. stripe: true,
  22. menuAlign: 'center',
  23. editBtn: false,
  24. delBtn: false,
  25. align: 'center',
  26. addBtn: false,
  27. viewBtn:true,
  28. column: [{
  29. label: '角色名称',
  30. prop: 'roleName',
  31. span: 24,
  32. rules: [{
  33. required: true,
  34. message: '角色名称不能为空',
  35. trigger: 'blur'
  36. },
  37. {
  38. min: 3,
  39. max: 20,
  40. message: '长度在 3 到 20 个字符',
  41. trigger: 'blur'
  42. }]
  43. }, {
  44. width: 120,
  45. label: '角色标识',
  46. prop: 'roleCode',
  47. span: 24,
  48. editDisabled: true,
  49. rules: [{
  50. required: true,
  51. message: '角色标识不能为空',
  52. trigger: 'blur'
  53. },
  54. {
  55. min: 3,
  56. max: 20,
  57. message: '长度在 3 到 20 个字符',
  58. trigger: 'blur'
  59. }
  60. ]
  61. }, {
  62. width: 150,
  63. label: '角色描述',
  64. prop: 'roleDesc',
  65. overHidden: true,
  66. span: 24
  67. }, {
  68. width: 180,
  69. label: '数据权限',
  70. prop: 'dsType',
  71. type: 'select',
  72. span: 24,
  73. rules: [{
  74. required: true,
  75. message: '请选择数据权限类型',
  76. trigger: 'blur'
  77. }],
  78. dicData: [{
  79. label: '全部',
  80. value: 0
  81. }, {
  82. label: '自定义',
  83. value: 1
  84. }, {
  85. label: '本级及子级',
  86. value: 2
  87. }, {
  88. label: '本级',
  89. value: 3
  90. }]
  91. }, {
  92. label:'',
  93. prop: 'dsScope',
  94. formsolt: true,
  95. showClomnu:false,
  96. hide: true
  97. }, {
  98. label: '创建时间',
  99. prop: 'createTime',
  100. type: 'datetime',
  101. format: 'yyyy-MM-dd HH:mm',
  102. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  103. editVisdiplay: false,
  104. addVisdiplay: false,
  105. span: 24
  106. }]
  107. }