client.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. const DIC = {
  18. vaild: [{
  19. label: '否',
  20. value: 'false'
  21. }, {
  22. label: '是',
  23. value: 'true'
  24. }]
  25. }
  26. export const tableOption = {
  27. border: true,
  28. index: true,
  29. indexLabel: '序号',
  30. stripe: true,
  31. menuAlign: 'center',
  32. align: 'center',
  33. searchShow: false,
  34. viewBtn: true,
  35. column: [{
  36. width: 150,
  37. label: '编号',
  38. prop: 'clientId',
  39. align: 'center',
  40. sortable: true,
  41. rules: [{
  42. required: true,
  43. message: '请输入clientId',
  44. trigger: 'blur'
  45. }]
  46. }, {
  47. label: '密钥',
  48. prop: 'clientSecret',
  49. align: 'center',
  50. sortable: true,
  51. overHidden: true,
  52. width: 120,
  53. rules: [{
  54. required: true,
  55. message: '请输入clientSecret',
  56. trigger: 'blur'
  57. }]
  58. }, {
  59. label: '域',
  60. prop: 'scope',
  61. align: 'center',
  62. rules: [{
  63. required: true,
  64. message: '请输入scope',
  65. trigger: 'blur'
  66. }]
  67. }, {
  68. label: '自动放行',
  69. prop: 'autoapprove',
  70. align: 'center',
  71. type: 'radio',
  72. border:true,
  73. dicData: DIC.vaild,
  74. rules: [{
  75. required: true,
  76. message: '请选择是否放行',
  77. trigger: 'blur'
  78. }]
  79. }, {
  80. label: '授权模式',
  81. prop: 'authorizedGrantTypes',
  82. type: 'checkbox',
  83. dicUrl: '/admin/dict/type/grant_types',
  84. align: 'center',
  85. overHidden: true,
  86. row: true,
  87. span: 24,
  88. rules: [{
  89. required: true,
  90. message: '请输入授权模式',
  91. trigger: 'blur'
  92. }]
  93. }, {
  94. label: '令牌时效',
  95. type: 'number',
  96. prop: 'accessTokenValidity',
  97. align: 'center'
  98. }, {
  99. label: '刷新时效',
  100. type: 'number',
  101. prop: 'refreshTokenValidity',
  102. align: 'center'
  103. }, {
  104. label: '回调地址',
  105. prop: 'webServerRedirectUri',
  106. align: 'center',
  107. hide: true
  108. }, {
  109. label: '权限',
  110. prop: 'authorities',
  111. align: 'center',
  112. hide: true
  113. }, {
  114. label: '扩展信息',
  115. prop: 'additionalInformation',
  116. align: 'center',
  117. type: 'textarea',
  118. placeholder: 'JSON格式数据',
  119. hide: true,
  120. minRows: 2,
  121. row: true,
  122. span: 24,
  123. }]
  124. }