signsRecord.vue 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <template>
  2. <div class="signsRecord">
  3. <div>
  4. <div class="toolBox">
  5. <div class="toolOne" @click="typeShow = true">
  6. <div style="display: flex;align-items: center;">
  7. {{ type }}
  8. <van-icon name="arrow-down" />
  9. </div>
  10. </div>
  11. <div class="toolOne" @click="startShow = true">
  12. <div style="display: flex;align-items: center;">
  13. {{ startTime }}
  14. <van-icon name="arrow-down" />
  15. </div>
  16. </div>
  17. <div class="toolOne" @click="endShow = true">
  18. <div style="display: flex;align-items: center;">
  19. {{ endTime }}
  20. <van-icon name="arrow-down" />
  21. </div>
  22. </div>
  23. </div>
  24. <div class="noimgBox">
  25. <img src="../../../assets/images/none.png" alt />
  26. </div>
  27. <!-- <div class="adviceBox">
  28. <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
  29. <div class="adviceOne" v-for="item in 3" :key="index">
  30. <div class="adviceTitle">
  31. <p>2019.09.01</p>
  32. <van-icon class="ellipsis" name="ellipsis" @click="newShow = true" />
  33. </div>
  34. <div class="orderContent">
  35. <p>血压</p>
  36. <p>血糖</p>
  37. <p>体重</p>
  38. <p>体温</p>
  39. <p>心率</p>
  40. </div>
  41. <div class="all">全部</div>
  42. </div>
  43. </van-list>
  44. </div>-->
  45. </div>
  46. <!-- <div class="add">
  47. <div style="display: flex;align-items: center;">
  48. <van-icon class="addIcon" name="add" />新增
  49. </div>
  50. </div>-->
  51. <!-- 弹出层 -->
  52. <div>
  53. <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
  54. <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
  55. </van-popup>
  56. <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
  57. <van-datetime-picker
  58. v-model="currentDate"
  59. type="date"
  60. :min-date="minDate"
  61. :max-date="maxDate"
  62. @confirm="getstartTime"
  63. @cancel="startShow = false"
  64. />
  65. </van-popup>
  66. <van-popup v-model="endShow" position="bottom" :style="{ height: '40%' }">
  67. <van-datetime-picker
  68. v-model="currentDate"
  69. type="date"
  70. :min-date="minDate"
  71. :max-date="maxDate"
  72. @confirm="getstartTime2"
  73. @cancel="endShow = false"
  74. />
  75. </van-popup>
  76. <van-action-sheet v-model="newShow" :actions="actions" cancel-text="取消" @cancel="onCancel" />
  77. </div>
  78. </div>
  79. </template>
  80. <script>
  81. export default {
  82. data() {
  83. return {
  84. newShow: false,
  85. typeShow: false,
  86. startShow: false,
  87. endShow: false,
  88. type: "请选择",
  89. columns: [
  90. "杭州",
  91. "宁波",
  92. "温州",
  93. "嘉兴",
  94. "湖州",
  95. "杭州",
  96. "宁波",
  97. "温州",
  98. "嘉兴",
  99. "湖州"
  100. ],
  101. startTime: "请选择",
  102. endTime: "请选择",
  103. minDate: new Date(1970, 0, 1),
  104. maxDate: new Date(2025, 10, 1),
  105. currentDate: new Date(),
  106. actions: [{ name: "删除" }]
  107. };
  108. },
  109. methods: {
  110. onCancel() {
  111. this.typeShow = false;
  112. },
  113. onConfirm(value) {
  114. this.type = value;
  115. this.typeShow = false;
  116. },
  117. getstartTime(value) {
  118. let year = value.getFullYear();
  119. let month = value.getMonth() + 1;
  120. let day = value.getDate();
  121. if (month >= 1 && month <= 9) {
  122. month = `0${month}`;
  123. }
  124. if (day >= 1 && day <= 9) {
  125. day = `0${day}`;
  126. }
  127. this.startTime = `${year}-${month}-${day}`;
  128. this.startShow = false;
  129. },
  130. getstartTime2(value) {
  131. let year = value.getFullYear();
  132. let month = value.getMonth() + 1;
  133. let day = value.getDate();
  134. if (month >= 1 && month <= 9) {
  135. month = `0${month}`;
  136. }
  137. if (day >= 1 && day <= 9) {
  138. day = `0${day}`;
  139. }
  140. this.endTime = `${year}-${month}-${day}`;
  141. this.endShow = false;
  142. }
  143. }
  144. };
  145. </script>
  146. <style lang="scss" scoped>
  147. .signsRecord {
  148. height: 100%;
  149. overflow-y: auto;
  150. background: #fff;
  151. .toolBox {
  152. display: flex;
  153. height: 3.125rem;
  154. justify-content: space-around;
  155. align-items: center;
  156. .toolOne {
  157. width: 6.25rem;
  158. height: 1.875rem;
  159. background: rgba(246, 246, 246, 1);
  160. border-radius: 5px;
  161. text-align: center;
  162. font-size: 0.8125rem;
  163. color: #8d8d8d;
  164. display: flex;
  165. align-items: center;
  166. justify-content: space-around;
  167. }
  168. }
  169. .adviceBox {
  170. padding: 0 1.125rem;
  171. margin-bottom: 3.125rem;
  172. }
  173. .adviceOne {
  174. box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);
  175. padding-bottom: 0.625rem;
  176. }
  177. .adviceTitle {
  178. padding-top: 0.625rem;
  179. display: flex;
  180. align-items: center;
  181. justify-content: space-between;
  182. p {
  183. color: #000000;
  184. font-weight: bold;
  185. font-size: 0.9375rem;
  186. }
  187. .ellipsis {
  188. font-size: 1.25rem;
  189. color: #cccccc;
  190. }
  191. }
  192. .orderContent {
  193. font-size: 0.875rem;
  194. color: rgba(49, 50, 52, 1);
  195. margin-top: 0.625rem;
  196. p {
  197. line-height: 1.25rem;
  198. }
  199. }
  200. .doctorBox {
  201. font-size: 0.75rem;
  202. color: rgba(152, 152, 152, 1);
  203. line-height: 1.125rem;
  204. display: flex;
  205. align-items: center;
  206. justify-content: space-between;
  207. margin-top: 0.625rem;
  208. }
  209. .all {
  210. font-size: 0.8125rem;
  211. color: #5b98ff;
  212. margin-top: 0.625rem;
  213. }
  214. .noimgBox {
  215. margin-top: 40%;
  216. img {
  217. width: 9.375rem;
  218. height: 9.375rem;
  219. margin: 0 auto;
  220. display: block;
  221. }
  222. }
  223. .add {
  224. position: fixed;
  225. bottom: 0;
  226. left: 0;
  227. width: 100%;
  228. height: 2.75rem;
  229. background: rgba(255, 255, 255, 1);
  230. box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.1);
  231. display: flex;
  232. align-items: center;
  233. justify-content: space-around;
  234. font-size: 0.9375rem;
  235. color: #979798;
  236. .addIcon {
  237. color: #5b98ff;
  238. font-size: 1.25rem;
  239. margin-right: 0.25rem;
  240. }
  241. }
  242. }
  243. ::-webkit-scrollbar {
  244. width: 0;
  245. }
  246. </style>