autoOff.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. <template>
  2. <view>
  3. <u-navbar title="自动关闭" title-color="#101010">
  4. <view slot="right" @click="deleteShow=true">
  5. <img src="@/assets/img/riLine-check-line 1.svg" alt="" />
  6. </view>
  7. </u-navbar>
  8. <view class="time-group">
  9. <view class="time-item" @click="typeShow=true">
  10. <view class="time">
  11. <view class="time-slot">
  12. 重复
  13. </view>
  14. <view class="type">
  15. 执行一次
  16. </view>
  17. </view>
  18. <view class="more">
  19. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  20. </view>
  21. </view>
  22. <view class="time-item" @click="pickerShow=true">
  23. <view class="time">
  24. <view class="time-slot">
  25. 定时开启
  26. </view>
  27. <view class="type">
  28. 未设置
  29. </view>
  30. </view>
  31. <view class="more">
  32. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  33. </view>
  34. </view>
  35. <view class="time-item" @click="pickerShow=true">
  36. <view class="time">
  37. <view class="time-slot">
  38. 定时关闭
  39. </view>
  40. <view class="type">
  41. 未设置
  42. </view>
  43. </view>
  44. <view class="more">
  45. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  46. </view>
  47. </view>
  48. <view class="time-item" @click="thresholdsPopup=true" >
  49. <view class="time">
  50. <view class="time-slot">
  51. 最大功率阈值
  52. </view>
  53. <view class="type">
  54. 5kW
  55. </view>
  56. </view>
  57. <view class="more">
  58. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  59. </view>
  60. </view>
  61. </view>
  62. <!-- 重复类型 -->
  63. <view class="repeatType" v-if="typeShow">
  64. <u-popup v-model="typeShow" mode="bottom">
  65. <view>
  66. <view class="headline">
  67. 重复类型
  68. </view>
  69. <view class="type-group">
  70. <view class="item">
  71. <view class="item-title item-title-checked">
  72. 执行一次
  73. </view>
  74. <view class="item-icon">
  75. <img src="@/assets/img/riLine-check-line.svg" alt="" />
  76. </view>
  77. </view>
  78. <view class="item">
  79. <view class="item-title">
  80. 每天
  81. </view>
  82. <view class="item-icon">
  83. <img src="" alt="" />
  84. </view>
  85. </view>
  86. <view class="item" @click="customPopup=true">
  87. <view class="item-title">
  88. 自定义
  89. </view>
  90. <view class="item-icon">
  91. <img src="" alt="" />
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. </u-popup>
  97. </view>
  98. <!-- 关闭时间 -->
  99. <ujpPicker mode="time" v-model="pickerShow" :params="params"></ujpPicker>
  100. <!-- 自定义重复 -->
  101. <u-popup v-model="customPopup" mode="bottom">
  102. <view class="custom">
  103. <view class="headline">
  104. 自定义重复
  105. </view>
  106. <view class="radio-group">
  107. <view class="radio-item">
  108. <view class="item-title">
  109. 周一
  110. </view>
  111. <view class="item-value">
  112. <label class="radio">
  113. <radio value="" /><text></text>
  114. </label>
  115. </view>
  116. </view>
  117. <view class="radio-item">
  118. <view class="item-title">
  119. 周二
  120. </view>
  121. <view class="item-value">
  122. <label class="radio">
  123. <radio value="" /><text></text>
  124. </label>
  125. </view>
  126. </view>
  127. <view class="radio-item">
  128. <view class="item-title">
  129. 周三
  130. </view>
  131. <view class="item-value">
  132. <label class="radio">
  133. <radio value="" /><text></text>
  134. </label>
  135. </view>
  136. </view>
  137. <view class="radio-item">
  138. <view class="item-title">
  139. 周四
  140. </view>
  141. <view class="item-value">
  142. <label class="radio">
  143. <radio value="" /><text></text>
  144. </label>
  145. </view>
  146. </view>
  147. <view class="radio-item">
  148. <view class="item-title">
  149. 周五
  150. </view>
  151. <view class="item-value">
  152. <label class="radio">
  153. <radio value="" /><text></text>
  154. </label>
  155. </view>
  156. </view>
  157. <view class="radio-item">
  158. <view class="item-title">
  159. 周六
  160. </view>
  161. <view class="item-value">
  162. <label class="radio">
  163. <radio value="" /><text></text>
  164. </label>
  165. </view>
  166. </view>
  167. <view class="radio-item">
  168. <view class="item-title">
  169. 周日
  170. </view>
  171. <view class="item-value">
  172. <label class="radio">
  173. <radio value="" /><text></text>
  174. </label>
  175. </view>
  176. </view>
  177. </view>
  178. <view class="btn-group">
  179. <view class="btn cancel">
  180. 取消
  181. </view>
  182. <view class="btn confirm">
  183. 确认
  184. </view>
  185. </view>
  186. </view>
  187. </u-popup>
  188. <!-- 最大功率阈值 -->
  189. <u-popup v-model="thresholdsPopup" mode="bottom">
  190. <view class="thresholds">
  191. <view class="headline">
  192. 最大功率阈值(kW)
  193. </view>
  194. <view class="input">
  195. <input type="text" value="" placeholder="填写触发自动关闭的功率数值" />
  196. </view>
  197. <view class="btn-group">
  198. <view class="btn cancel">
  199. 取消
  200. </view>
  201. <view class="btn confirm">
  202. 确认
  203. </view>
  204. </view>
  205. </view>
  206. </u-popup>
  207. </view>
  208. </template>
  209. <script>
  210. import ujpPicker from '@/components/u-picker.vue'
  211. export default {
  212. components: {
  213. ujpPicker
  214. },
  215. data() {
  216. return {
  217. typeShow: true,
  218. pickerShow: false,
  219. typeShow: false,
  220. customPopup: false,
  221. thresholdsPopup: false,
  222. params: {
  223. year: false,
  224. month: false,
  225. day: false,
  226. hour: true,
  227. minute: true,
  228. second: false,
  229. },
  230. }
  231. },
  232. methods: {
  233. }
  234. }
  235. </script>
  236. <style lang="scss" scoped>
  237. /deep/.u-slot-right {
  238. margin-right: 32rpx;
  239. img {
  240. width: 48rpx;
  241. height: 48rpx;
  242. }
  243. }
  244. .time-group {
  245. background-color: #fff;
  246. .time-item {
  247. padding: 24rpx 0;
  248. margin: 0 32rpx;
  249. display: flex;
  250. justify-content: space-between;
  251. align-items: center;
  252. border-bottom: 1px solid rgba(221, 221, 221, 1);
  253. .time {
  254. .time-slot {
  255. color: rgba(16, 16, 16, 1);
  256. font-size: 32rpx;
  257. }
  258. .type {
  259. color: rgba(119, 119, 119, 1);
  260. }
  261. }
  262. }
  263. .time-item:last-of-type {
  264. border: none;
  265. }
  266. }
  267. // 重复类型
  268. .repeatType {
  269. .headline {
  270. color: rgba(16, 16, 16, 1);
  271. font-size: 36rpx;
  272. margin-top: 32rpx;
  273. font-weight: bold;
  274. text-align: center;
  275. }
  276. .type-group {
  277. margin-top: 24rpx;
  278. .item {
  279. display: flex;
  280. align-items: center;
  281. justify-content: space-between;
  282. height: 96rpx;
  283. line-height: 96rpx;
  284. border-bottom: 1px solid rgba(245,245,245,1);
  285. padding: 0 32rpx;
  286. }
  287. .time-item:last-of-type{
  288. border: none;
  289. }
  290. .item-title {
  291. color: rgb(16, 16, 16);
  292. font-size: 32rpx;
  293. }
  294. .item-title-checked {
  295. color: rgba(22, 119, 255, 1);
  296. }
  297. }
  298. }
  299. // 自定义重复
  300. .custom,
  301. .thresholds {
  302. padding: 32rpx 0;
  303. .headline {
  304. color: rgba(16, 16, 16, 1);
  305. font-size: 36rpx;
  306. margin-bottom: 32rpx;
  307. font-weight: bold;
  308. text-align: center;
  309. }
  310. .radio-group {
  311. .radio-item {
  312. padding: 0 32rpx;
  313. display: flex;
  314. align-items: center;
  315. justify-content: space-between;
  316. height: 96rpx;
  317. line-height: 96rpx;
  318. border-bottom: 1px solid rgba(245,245,245,1);
  319. .item-title {
  320. color: rgba(16, 16, 16, 1);
  321. font-size: 32rpx;
  322. }
  323. }
  324. }
  325. .btn-group {
  326. display: flex;
  327. align-items: center;
  328. justify-content: space-between;
  329. padding: 0 32rpx;
  330. .btn {
  331. width: 328rpx;
  332. height: 80rpx;
  333. line-height: 80rpx;
  334. font-size: 32rpx;
  335. border-radius: 4px;
  336. text-align: center;
  337. margin-top: 24rpx;
  338. }
  339. .cancel {
  340. background-color: rgba(222, 225, 228, 1);
  341. color: rgba(51, 51, 51, 1);
  342. }
  343. .confirm {
  344. background-color: rgba(22, 119, 255, 1);
  345. color: rgba(255, 255, 255, 1);
  346. }
  347. }
  348. }
  349. /deep/.u-drawer-content-visible {
  350. border-radius: 12px 12px 0 0;
  351. }
  352. /deep/uni-input{
  353. background-color: rgba(241,242,245,1);
  354. color: rgba(119,119,119,1);
  355. font-size: 36rpx;
  356. height: 80rpx;
  357. padding-left: 16rpx;
  358. }
  359. </style>