dict.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. align: 'center',
  24. refreshBtn: false,
  25. showClomnuBtn: false,
  26. searchSize: 'mini',
  27. column: [{
  28. label: '类型',
  29. prop: 'type',
  30. 'search': true,
  31. rules: [{
  32. required: true,
  33. message: '请输入字典类型',
  34. trigger: 'blur'
  35. }]
  36. }, {
  37. label: '描述',
  38. prop: 'description',
  39. rules: [{
  40. required: true,
  41. message: '请输入字典描述',
  42. trigger: 'blur'
  43. }]
  44. }, {
  45. label: '字典类型',
  46. prop: 'system',
  47. type: 'select',
  48. dicUrl: '/admin/dict/type/dict_type',
  49. addVisdiplay: false,
  50. editVisdiplay: false,
  51. search: true
  52. }, {
  53. label: '备注信息',
  54. prop: 'remarks'
  55. }, {
  56. width: 150,
  57. label: '创建时间',
  58. prop: 'createTime',
  59. type: 'datetime',
  60. addVisdiplay: false,
  61. editDisabled: true,
  62. format: 'yyyy-MM-dd HH:mm',
  63. valueFormat: 'yyyy-MM-dd HH:mm:ss'
  64. }]
  65. }
  66. export const tableDictItemOption = {
  67. border: true,
  68. index: true,
  69. indexLabel: '序号',
  70. stripe: true,
  71. menuAlign: 'center',
  72. align: 'center',
  73. refreshBtn: false,
  74. showClomnuBtn: false,
  75. searchSize: 'mini',
  76. column: [{
  77. label: '类型',
  78. prop: 'type',
  79. addDisabled: true,
  80. editDisabled: true
  81. }, {
  82. width: 150,
  83. label: '数据值',
  84. prop: 'value',
  85. rules: [{
  86. required: true,
  87. message: '请输入数据值',
  88. trigger: 'blur'
  89. }]
  90. }, {
  91. label: '标签名',
  92. prop: 'label',
  93. rules: [{
  94. required: true,
  95. message: '请输入标签名',
  96. trigger: 'blur'
  97. }]
  98. }, {
  99. label: '描述',
  100. prop: 'description',
  101. rules: [{
  102. required: true,
  103. message: '请输入字典描述',
  104. trigger: 'blur'
  105. }]
  106. }, {
  107. label: '排序',
  108. prop: 'sort',
  109. type: 'number',
  110. rules: [{
  111. required: true,
  112. message: '请输入排序',
  113. trigger: 'blur'
  114. }]
  115. }, {
  116. label: '备注信息',
  117. prop: 'remarks'
  118. }]
  119. }