Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. <v-text-field
  2. v-model="field.model"
  3. :label=field.placeholderText
  4. outline
  5. clearable
  6. />
  7.  
  8. export default {
  9.  
  10. data() {
  11. return {
  12.  
  13. defaultConfig: null,
  14. items: [
  15. {
  16. header: 'Параметры генетического алгоритма',
  17. fields: [
  18. {
  19. placeholderText: 'Семя генератора случ. чисел',
  20. type: 'text',
  21. model: '155557555'
  22. },
  23. {
  24. placeholderText: 'Вероятность мутации',
  25. type: 'text',
  26. model: '2'
  27. },
  28. ]
  29. },
  30. {
  31. header: 'Настройки нишинга',
  32. fields: [
  33. {
  34. placeholderText: 'Коэф-нт дополнительных генов (c1)',
  35. type: 'text',
  36. model: '2'
  37. },
  38. {
  39. placeholderText: 'Коэф-нт непересекающихся генов (c2)',
  40. type: 'text',
  41. model: '2'
  42. },
  43. ]
  44. },
  45.  
  46. ],
  47. }
  48. },
  49. methods:{
  50. getDefaultConfig(){
  51. this.$resource("/trainer/default-config").get().then(res => {
  52. if(res.ok){
  53. res.json().then(data => {
  54. this.defaultConfig = data
  55. })
  56. }
  57. })
  58. },
  59. },
  60. created() {
  61. this.getDefaultConfig();
  62. }
  63. }
  64.  
  65. items: [
  66. {
  67. header: 'Параметры генетического алгоритма',
  68. fields: [
  69. {
  70. placeholderText: 'Семя генератора случ. чисел',
  71. type: 'text',
  72. model: defaultConfig.GENERATOR_SEED
  73. },
  74. {
  75. placeholderText: 'Вероятность мутации',
  76. type: 'text',
  77. model: defaultConfig.MUTATION_PROBABILITY
  78. },
  79. ]
  80. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement