recoverNotes.vue 5.9KB

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