ChooseScale.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <div class="wrapper">
  3. <div class="header">
  4. <img src="../images/back.png" @click="goback()" />
  5. </div>
  6. <div class="content">
  7. <div class="left clearfix">
  8. <img src="../images/doctor.png" alt="" class="fl" />
  9. <div class="center fl">
  10. <p>明确就诊疾病?</p>
  11. </div>
  12. </div>
  13. </div>
  14. <div class="bottom">
  15. <div class="list">
  16. <span
  17. v-for="(item, index) in list"
  18. :key="index"
  19. :class="isChange == index ? 'realItem item' : 'item'"
  20. @click="chooseScale(index)"
  21. >{{item}}</span
  22. >
  23. </div>
  24. <button :class="isChange!=-1 ? 'realSure sure' : 'sure'" @click="submit">确认</button>
  25. </div>
  26. </div>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. isChange: -1,
  33. list: ["哮喘"],
  34. };
  35. },
  36. created() {},
  37. mounted() {},
  38. methods: {
  39. goback() {
  40. this.$router.go(-1);
  41. },
  42. chooseScale(index) {
  43. if (index != this.isChange) {
  44. this.isChange = index;
  45. } else {
  46. this.isChange = -1;
  47. }
  48. },
  49. submit(){
  50. if(this.isChange == -1){
  51. return
  52. }
  53. this.$router.push({ path: "/scaleDetail",query: JSON.parse(localStorage.getItem('loginParam')) });
  54. }
  55. },
  56. components: {},
  57. };
  58. </script>
  59. <style lang="less" scoped>
  60. @import "../less/base.less";
  61. .header {
  62. height: 0.8rem;
  63. border-bottom: 3px solid #6678ff;
  64. & img {
  65. width: 0.16rem;
  66. padding: 0.2rem 0.4rem 0.4rem 0.2rem;
  67. float: left;
  68. }
  69. }
  70. .content {
  71. .left {
  72. margin-bottom: 0.2rem;
  73. padding-top: 0.5rem;
  74. padding-left: 0.24rem;
  75. .center {
  76. max-width: 5rem;
  77. background-color: #colors[bgques];
  78. border-radius: 0 0.24rem 0.24rem 0.24rem;
  79. margin-top: 0.3rem;
  80. font-size: #font[dialog];
  81. padding: 0.24rem;
  82. display: inline-block;
  83. }
  84. img {
  85. width: 0.8rem;
  86. height: 0.8rem;
  87. margin-right: 0.24rem;
  88. }
  89. }
  90. }
  91. .bottom {
  92. width: 100%;
  93. position: fixed;
  94. bottom: 0;
  95. box-shadow: 0px -0.6rem 0.2rem 0px rgba(104, 124, 189, 0.08);
  96. .list {
  97. .item {
  98. padding: 0.14rem 0.2rem;
  99. border: 0.02rem solid #dfe0e4;
  100. font-size: 0.3rem;
  101. border-radius: 0.36rem;
  102. margin-left: 0.3rem;
  103. }
  104. .realItem {
  105. background: #6678ff;
  106. }
  107. }
  108. .sure {
  109. width: 100%;
  110. height: 0.88rem;
  111. background: #6678ff;
  112. opacity: 0.5;
  113. font-size: 0.32rem;
  114. }
  115. .realSure {
  116. opacity: 1;
  117. }
  118. }
  119. </style>