client.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. dicData: DIC.vaild,
  72. rules: [{
  73. required: true,
  74. message: '请选择是否放行',
  75. trigger: 'blur'
  76. }]
  77. }, {
  78. label: '授权模式',
  79. prop: 'authorizedGrantTypes',
  80. type: 'checkbox',
  81. dicUrl: '/admin/dict/type/grant_types',
  82. align: 'center',
  83. overHidden: true,
  84. row: true,
  85. span: 24,
  86. rules: [{
  87. required: true,
  88. message: '请输入授权模式',
  89. trigger: 'blur'
  90. }]
  91. }, {
  92. label: '令牌时效',
  93. type: 'number',
  94. prop: 'accessTokenValidity',
  95. align: 'center'
  96. }, {
  97. label: '刷新时效',
  98. type: 'number',
  99. prop: 'refreshTokenValidity',
  100. align: 'center'
  101. }, {
  102. label: '回调地址',
  103. prop: 'webServerRedirectUri',
  104. align: 'center',
  105. hide: true
  106. }, {
  107. label: '权限',
  108. prop: 'authorities',
  109. align: 'center',
  110. hide: true
  111. }, {
  112. label: '扩展信息',
  113. prop: 'additionalInformation',
  114. align: 'center',
  115. type: 'textarea',
  116. placeholder: 'JSON格式数据',
  117. hide: true,
  118. minRows: 2,
  119. row: true,
  120. span: 24,
  121. }]
  122. }