client.js 2.8 KB

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