checkMapAdd.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="modal">
  3. <scroll-view scroll-y="true" class="modal-body">
  4. <view class="body-content">
  5. <text class="top-title">选择要新增的单位</text>
  6. <view class="list">
  7. <view class="item">
  8. <view class="item-title">门诊</view>
  9. <view class="chidren">
  10. <view class="child"
  11. :class="{active: checkedIds.includes(0)}"
  12. @click="changeChecked(0)">
  13. <text>挂号处</text>
  14. <image v-if="checkedIds.includes(0)"
  15. src="../../../static/bottom-img.png"></image>
  16. </view>
  17. <view class="child">
  18. <text>分诊处</text>
  19. </view>
  20. <view class="child">
  21. <text>挂号处</text>
  22. </view>
  23. <view class="child">
  24. <text>分诊处</text>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <tm-simple-btn-group :options="botmBtnGroup"
  31. v-on:callback="btnClick" ></tm-simple-btn-group>
  32. </scroll-view>
  33. </view>
  34. </template>
  35. <script>
  36. import {arrFilter} from "../../../utils/arrFilter.js";
  37. export default {
  38. data() {
  39. return {
  40. checkedIds: []
  41. }
  42. },
  43. computed: {
  44. botmBtnGroup: function() {
  45. return [
  46. {id: 'cancle', label: '取消'},
  47. {id: 'ok', label: `已选${this.checkedIds.length}项,确定新增`}
  48. ];
  49. }
  50. },
  51. methods: {
  52. changeChecked: function(id) {
  53. this.checkedIds = arrFilter(id, this.checkedIds);
  54. },
  55. btnClick: function(id) {
  56. if(id === 'ok') {
  57. } else {
  58. this.$store.commit({
  59. type: 'creatingSituations/comChangeState',
  60. key: 'showCheckMapAdd',
  61. data: false
  62. });
  63. }
  64. }
  65. }
  66. }
  67. </script>
  68. <style lang="less">
  69. .modal {
  70. position: absolute;
  71. bottom: 0;
  72. width: 100%;
  73. height: 100%;
  74. z-index: 1000;
  75. background-color: rgba(18, 20, 26, 0.5);
  76. .modal-body {
  77. margin-top: 10%;
  78. border-radius: 25rpx 25rpx 0 0;
  79. padding: 35rpx 40rpx 75rpx;
  80. width: 100%;
  81. height: 90%;
  82. font-size: 22.5rpx;
  83. line-height: 33.75rpx;
  84. color: #292C33;
  85. background-color: #fff;
  86. .top-title {
  87. font-size: 30rpx;
  88. line-height: 45rpx;
  89. }
  90. .list {
  91. margin-top: 25rpx;
  92. .item {
  93. .item-title {
  94. margin-bottom: 3.75rpx;
  95. font-size: 25rpx;
  96. line-height: 37.5rpx;
  97. font-weight: bold;
  98. }
  99. .chidren {
  100. display: flex;
  101. flex-direction: row;
  102. flex-wrap: wrap;
  103. justify-content: space-between;
  104. .child {
  105. position: relative;
  106. display: flex;
  107. flex-direction: row;
  108. justify-content: center;
  109. align-items: center;
  110. margin: 10rpx 0;
  111. border-radius: 5rpx;
  112. width: 200rpx;
  113. height: 50rpx;
  114. font-weight: 500;
  115. background-color: #EBEDF2;
  116. image {
  117. position: absolute;
  118. right: 0;
  119. bottom: 0;
  120. width: 25rpx;
  121. height: 25rpx;
  122. }
  123. &.active {
  124. color: #3377FF;
  125. background-color: #E6EEFF;
  126. }
  127. }
  128. }
  129. }
  130. }
  131. }
  132. }
  133. </style>