checkMapDetail.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <view class="check-map-detail">
  3. <view class="item">
  4. <view class="icon-wrap" @click="openChildren(0)">
  5. <image :src="`../../static/list-${openItems.includes(0)
  6. ?'close':'open'}.png`"></image>
  7. </view>
  8. <view class="content">
  9. <view class="content-title" @click="openChildren(0)">疼痛之评估及再评估</view>
  10. <view class="children" v-if="openItems.includes(0)">
  11. <view class="child">
  12. <text>PRN order时间间隔与时机</text>
  13. <view class="check-icon-wrap" @click="changeChecked(1)">
  14. <image :src="`../../static/check-${checkedIds.includes(1)
  15. ?'checkbox':'no'}.png`"></image>
  16. </view>
  17. </view>
  18. <view class="child">
  19. <text>过敏反应表现</text>
  20. <view class="check-icon-wrap">
  21. <image src="../../../static/check-no.png"></image>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="item">
  28. <view class="icon-wrap" @click="openChildren(1)">
  29. <image :src="`../../static/list-${openItems.includes(1)
  30. ?'close':'open'}.png`"></image>
  31. </view>
  32. <view class="content">
  33. <view class="content-title" @click="openChildren(1)">疼痛之评估及再评估</view>
  34. <view class="children" v-if="openItems.includes(1)">
  35. <view class="child">
  36. <text>PRN order时间间隔与时机</text>
  37. <view class="check-icon-wrap">
  38. <image src="../../../static/check-no.png"></image>
  39. </view>
  40. </view>
  41. <view class="child">
  42. <text>过敏反应表现</text>
  43. <view class="check-icon-wrap">
  44. <image src="../../../static/check-no.png"></image>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <tm-simple-btn-group :options="botmBtnGroup"
  51. v-on:callback="btnClick" ></tm-simple-btn-group>
  52. </view>
  53. </template>
  54. <script>
  55. import {arrFilter} from "../../../utils/arrFilter.js";
  56. export default {
  57. data() {
  58. return {
  59. openItems: [],
  60. checkedIds: [],
  61. }
  62. },
  63. computed: {
  64. botmBtnGroup: function() {
  65. return [
  66. {id: 'cancle', label: '取消'},
  67. {id: 'ok', label: `已选${this.checkedIds.length}项,确定`}
  68. ];
  69. }
  70. },
  71. methods: {
  72. openChildren: function(key) {
  73. this.openItems = arrFilter(key, this.openItems);
  74. },
  75. changeChecked: function(id) {
  76. this.checkedIds = arrFilter(id, this.checkedIds);
  77. },
  78. btnClick: function(id) {
  79. if(id === 'ok') {
  80. } else {
  81. this.$store.commit({
  82. type: 'creatingSituations/comChangeState',
  83. key: 'showCheckMapDetail',
  84. data: false
  85. });
  86. }
  87. },
  88. }
  89. }
  90. </script>
  91. <style lang="less">
  92. .check-map-detail {
  93. padding-bottom: 75rpx;
  94. width: 100%;
  95. height: 100%;
  96. .item {
  97. display: flex;
  98. flex-direction: row;
  99. border-top: 1px solid #DADEE6;
  100. padding-left: 25rpx;
  101. width: 100%;
  102. background-color: #fff;
  103. .icon-wrap {
  104. padding-top: 28.12rpx;
  105. padding-right: 23.75rpx;
  106. width: 45rpx;
  107. height: inherit;
  108. image {
  109. width: 100%;
  110. height: 12.5rpx;
  111. }
  112. }
  113. .content {
  114. width: 100%;
  115. color: #292C33;
  116. line-height: 87.5rpx;
  117. .content-title {
  118. height: 87.5rpx;
  119. font-size: 22.5rpx;
  120. font-weight: 500;
  121. }
  122. .children {
  123. width: 100%;
  124. .child {
  125. display: flex;
  126. flex-direction: row;
  127. justify-content: space-between;
  128. border-top: 1px solid #DADEE6;
  129. height: 87.5rpx;
  130. .check-icon-wrap {
  131. display: flex;
  132. flex-direction: row;
  133. justify-content: center;
  134. align-items: center;
  135. width: 75rpx;
  136. height: 100%;
  137. image {
  138. width: 25rpx;
  139. height: 25rpx;
  140. }
  141. }
  142. }
  143. }
  144. }
  145. }
  146. }
  147. </style>