healthAlarm.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <template>
  2. <view class="container">
  3. <view class="nomalNotice">
  4. <view class="nomalTitle">异常提醒</view>
  5. <view class="nomal_contain">
  6. <view class="nomalItem">
  7. <view class="switchBox">
  8. <view class="switchBox">
  9. <text class="name">起夜频次</text>
  10. <switch
  11. :value="statusLight"
  12. @change="handleLightChange"
  13. :active-value="1"
  14. :inactive-value="0"
  15. size="24px"
  16. active-color="#07c160"
  17. inactive-color="#eeeff1"
  18. style="transform: scale(0.8)"
  19. />
  20. </view>
  21. <view class="nomalLeft">
  22. <text>
  23. <view class="uni-list-cell-db">
  24. <picker
  25. mode="time"
  26. :value="timeOne"
  27. start="00:00"
  28. end="23:59"
  29. @change="bindTimeChange"
  30. >
  31. <view class="uni-input">{{
  32. timeOne
  33. }}</view>
  34. </picker> </view
  35. >-<view class="uni-list-cell-db">
  36. <picker
  37. mode="time"
  38. :value="timeOne"
  39. start="00:00"
  40. end="23:59"
  41. @change="bindTimeChange"
  42. >
  43. <view class="uni-input">{{
  44. timeOne
  45. }}</view>
  46. </picker>
  47. </view></text
  48. >
  49. <image src="../../static/arrThree.png" mode="" />
  50. </view>
  51. </view>
  52. </view>
  53. <view class="nomalItem">
  54. <view class="switchBox">
  55. <view class="switchBox">
  56. <text class="name">如厕频次</text>
  57. <switch
  58. :value="statusLight"
  59. @change="handleLightChange"
  60. :active-value="1"
  61. :inactive-value="0"
  62. size="24px"
  63. active-color="#07c160"
  64. inactive-color="#eeeff1"
  65. style="transform: scale(0.8)"
  66. />
  67. </view>
  68. <view class="nomalLeft">
  69. <text>23:00-06:30</text>
  70. <image src="../../static/arrThree.png" mode="" />
  71. </view>
  72. </view>
  73. </view>
  74. <view class="nomalItem">
  75. <view class="switchBox">
  76. <view class="switchBox">
  77. <text class="name">卫生间频次</text>
  78. <switch
  79. :value="statusLight"
  80. @change="handleLightChange"
  81. :active-value="1"
  82. :inactive-value="0"
  83. size="24px"
  84. active-color="#07c160"
  85. inactive-color="#eeeff1"
  86. style="transform: scale(0.8)"
  87. />
  88. </view>
  89. <view class="nomalLeft">
  90. <text>23:00-06:30</text>
  91. <image src="../../static/arrThree.png" mode="" />
  92. </view>
  93. </view>
  94. </view>
  95. <view class="nomalItem">
  96. <view class="switchBox">
  97. <view class="switchBox">
  98. <text class="name">夜间如厕频次</text>
  99. <switch
  100. :value="statusLight"
  101. @change="handleLightChange"
  102. :active-value="1"
  103. :inactive-value="0"
  104. size="24px"
  105. active-color="#07c160"
  106. inactive-color="#eeeff1"
  107. style="transform: scale(0.8)"
  108. />
  109. </view>
  110. <view class="nomalLeft">
  111. <text>23:00-06:30</text>
  112. <image src="../../static/arrThree.png" mode="" />
  113. </view>
  114. </view>
  115. </view>
  116. <view class="nomalItem">
  117. <view class="switchBox">
  118. <view class="switchBox">
  119. <text class="name">如厕频次异常</text>
  120. <switch
  121. :value="statusLight"
  122. @change="handleLightChange"
  123. :active-value="1"
  124. :inactive-value="0"
  125. size="24px"
  126. active-color="#07c160"
  127. inactive-color="#eeeff1"
  128. style="transform: scale(0.8)"
  129. />
  130. </view>
  131. <view class="nomalLeft">
  132. <text>23:00-06:30</text>
  133. <image src="../../static/arrThree.png" mode="" />
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. <view class="box">
  140. <view class="handle-btn">
  141. <view class="btn2" @click="healthAlarm"> 保存设置 </view>
  142. </view>
  143. </view>
  144. </view>
  145. </template>
  146. <script>
  147. export default {
  148. name: "my",
  149. data() {
  150. return {
  151. status_light: 1,
  152. devInfo: "",
  153. statusLight: 1,
  154. timeOne: "23:00",
  155. };
  156. },
  157. computed: {},
  158. methods: {
  159. bindTimeChange(e) {
  160. this.timeOne = e.detail.value;
  161. },
  162. },
  163. onLoad(option) {
  164. this.devInfo = JSON.parse(option.devInfo);
  165. console.log(this.devInfo, 999999);
  166. },
  167. onShow() {},
  168. onHide() {},
  169. onUnload() {},
  170. };
  171. </script>
  172. <style lang="less" scoped>
  173. .container {
  174. height: 100vh;
  175. background: linear-gradient(180deg, #faede2 0%, #f4f4f4 100%);
  176. box-sizing: border-box;
  177. padding-top: 20rpx;
  178. .nomalNotice {
  179. width: 712rpx;
  180. margin: 0 auto;
  181. box-sizing: border-box;
  182. &.moreNotice {
  183. margin-top: 56rpx;
  184. }
  185. .nomalTitle {
  186. padding-left: 38rpx;
  187. font-family: MiSans;
  188. color: #9d8179;
  189. font-size: 28rpx;
  190. }
  191. .nomal_contain {
  192. padding: 10rpx 37rpx;
  193. margin-top: 18rpx;
  194. background: #ffffff;
  195. border-radius: 37rpx;
  196. .nomalItem {
  197. display: flex;
  198. justify-content: space-between;
  199. .switchBox {
  200. width: 600rpx;
  201. height: 94rpx;
  202. display: flex;
  203. align-items: center;
  204. padding-top: 20rpx;
  205. padding-bottom: 20rpx;
  206. border-bottom: 2rpx solid #eef2f6;
  207. background: #ffffff;
  208. &.switchLast {
  209. border-bottom: none;
  210. }
  211. .name {
  212. margin-left: 18rpx;
  213. color: #111111;
  214. font-size: 32rpx;
  215. margin-bottom: 10rpx;
  216. &.otherClass {
  217. color: #999999;
  218. }
  219. }
  220. .nomalLeft {
  221. width: 250rpx;
  222. display: flex;
  223. justify-content: space-between;
  224. align-items: center;
  225. margin-left: auto;
  226. color: #a0acbe;
  227. font-size: 28rpx;
  228. text-align: right;
  229. margin-bottom: 10rpx;
  230. .otherClass {
  231. color: #999999;
  232. }
  233. image {
  234. width: 12rpx;
  235. height: 21rpx;
  236. margin-left: 10rpx;
  237. }
  238. }
  239. }
  240. }
  241. }
  242. }
  243. .box {
  244. position: fixed;
  245. bottom: 0;
  246. left: 0;
  247. width: 100vw;
  248. height: 168rpx;
  249. padding: 0 37rpx;
  250. background: #ffffff;
  251. box-sizing: border-box;
  252. .handle-btn {
  253. margin-top: 40rpx;
  254. display: flex;
  255. align-items: center;
  256. justify-content: space-between;
  257. .btn2 {
  258. display: flex;
  259. align-items: center;
  260. justify-content: center;
  261. width: 700rpx;
  262. height: 94rpx;
  263. background: linear-gradient(
  264. 105.95deg,
  265. #a27867 0%,
  266. #74483d 100%
  267. );
  268. border-radius: 28rpx;
  269. box-shadow: 0rpx 4.69rpx 18.75rpx rgba(72, 41, 29, 0.15),
  270. 0rpx 9.38rpx 9.38rpx rgba(154, 132, 89, 0.2),
  271. 0rpx -4.69rpx 28.13rpx 4.69rpx #a16647 inset;
  272. font-family: MiSans;
  273. font-weight: 500;
  274. color: #ffffff;
  275. font-size: 32rpx;
  276. }
  277. }
  278. }
  279. }
  280. </style>