signsRecord.vue 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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: "编辑" }, { 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. console.log(value);
  119. let year = value.getFullYear();
  120. let month = value.getMonth() + 1;
  121. let day = value.getDate();
  122. if (month >= 1 && month <= 9) {
  123. month = `0${month}`;
  124. }
  125. if (day >= 1 && day <= 9) {
  126. day = `0${day}`;
  127. }
  128. this.startTime = `${year}-${month}-${day}`;
  129. this.startShow = false;
  130. },
  131. getstartTime2(value) {
  132. console.log(value);
  133. let year = value.getFullYear();
  134. let month = value.getMonth() + 1;
  135. let day = value.getDate();
  136. if (month >= 1 && month <= 9) {
  137. month = `0${month}`;
  138. }
  139. if (day >= 1 && day <= 9) {
  140. day = `0${day}`;
  141. }
  142. this.endTime = `${year}-${month}-${day}`;
  143. this.endShow = false;
  144. }
  145. }
  146. };
  147. </script>
  148. <style lang="scss" scoped>
  149. .signsRecord {
  150. height: 100%;
  151. overflow-y: auto;
  152. background: #fff;
  153. .toolBox {
  154. display: flex;
  155. height: 3.125rem;
  156. justify-content: space-around;
  157. align-items: center;
  158. .toolOne {
  159. width: 5.625rem;
  160. height: 1.875rem;
  161. background: rgba(246, 246, 246, 1);
  162. border-radius: 5px;
  163. text-align: center;
  164. font-size: 0.8125rem;
  165. color: #8d8d8d;
  166. display: flex;
  167. align-items: center;
  168. justify-content: space-around;
  169. }
  170. }
  171. .adviceBox {
  172. padding: 0 1.125rem;
  173. margin-bottom: 3.125rem;
  174. }
  175. .adviceOne {
  176. box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);
  177. padding-bottom: 0.625rem;
  178. }
  179. .adviceTitle {
  180. padding-top: 0.625rem;
  181. display: flex;
  182. align-items: center;
  183. justify-content: space-between;
  184. p {
  185. color: #000000;
  186. font-weight: bold;
  187. font-size: 0.9375rem;
  188. }
  189. .ellipsis {
  190. font-size: 1.25rem;
  191. color: #cccccc;
  192. }
  193. }
  194. .orderContent {
  195. font-size: 0.875rem;
  196. color: rgba(49, 50, 52, 1);
  197. margin-top: 0.625rem;
  198. p {
  199. line-height: 1.25rem;
  200. }
  201. }
  202. .doctorBox {
  203. font-size: 0.75rem;
  204. color: rgba(152, 152, 152, 1);
  205. line-height: 1.125rem;
  206. display: flex;
  207. align-items: center;
  208. justify-content: space-between;
  209. margin-top: 0.625rem;
  210. }
  211. .all {
  212. font-size: 0.8125rem;
  213. color: #5b98ff;
  214. margin-top: 0.625rem;
  215. }
  216. .noimgBox {
  217. margin-top: 40%;
  218. img {
  219. width: 6.25rem;
  220. height: 6.25rem;
  221. margin: 0 auto;
  222. display: block;
  223. }
  224. }
  225. .add {
  226. position: fixed;
  227. bottom: 0;
  228. left: 0;
  229. width: 100%;
  230. height: 2.75rem;
  231. background: rgba(255, 255, 255, 1);
  232. box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.1);
  233. display: flex;
  234. align-items: center;
  235. justify-content: space-around;
  236. font-size: 0.9375rem;
  237. color: #979798;
  238. .addIcon {
  239. color: #5b98ff;
  240. font-size: 1.25rem;
  241. margin-right: 0.25rem;
  242. }
  243. }
  244. }
  245. ::-webkit-scrollbar {
  246. width: 0;
  247. }
  248. </style>