123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- <template>
- <view class="share">
- <view class="share-top">
- <image src="../../static/image/machine.png" mode="widthFix"></image>
- <view class="right">
- <view class="no">
- 设备编号:41010010001
- </view>
- <view class="no">
- 绑定日期:2021-12-12
- </view>
- <view class="no">
- 设备状态:正常
- </view>
- <view class="no">
- 水位:正常
- </view>
- </view>
- </view>
- <view class="select-time">
- <view class="title">
- 时间选择
- </view>
- <view class="time-list">
- <view class="time-item" :class="currentTime==index?'timeActive':''" @click="changeTime(index)" v-for="(item,index) in timeList"
- :key='index'>
- {{item.time}}分钟
- </view>
- <view class="time-item" :class="currentTime==-1?'timeActive':''" @click="changeTime(-1)">
- 自定义
- </view>
- </view>
- <view class="customTime" v-show="isShow">
- <input type="number" value="" placeholder="请输入时间(/分钟)" v-model="customTime" @input="inputCustom()" />
- </view>
- </view>
- <view class="buttom-list">
- <view class="list-item">
- 开始
- </view>
- <view class="list-item" style="background-color: #e76953;">
- 暂停
- </view>
- <view class="list-item" style="background-color: #01356e;">
- 结束
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- timeList: [{
- id: 0,
- time: 30
- },
- {
- id: 1,
- time: 50
- },
- {
- id: 2,
- time: 60
- },
- ],
- currentTime: 0,
- isShow: false
- }
- },
- methods: {
- changeTime: function(e) {
- console.log(e)
- if (e == -1) {
- console.log(this.customTime)
- this.currentTime = e
- this.isShow = true
- } else {
- console.log(this.customTime)
- this.isShow = false
- this.currentTime = e
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .share {
- .share-top {
- display: flex;
- padding: 50upx 30upx;
- background-color: $mine-background-color;
- image {
- flex: 0 0 200upx;
- width: 200upx;
- margin-right: 30upx;
- }
- .right {
- flex: 1;
- font-size: 28upx;
- color: #FFFFFF;
- .no {
- line-height: 40upx;
- }
- }
- }
- .select-time {
- padding: 30upx 0;
- margin-top: 50upx;
- .title {
- padding: 0 30upx;
- font-size: 34upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #000000;
- }
- .time-list {
- display: flex;
- padding: 0 10upx;
- margin-top: 25upx;
- .time-item {
- flex: 1;
- margin: 0 10upx;
- height: 80upx;
- line-height: 80upx;
- text-align: center;
- font-size: 30upx;
- font-family: PingFang SC;
- font-weight: 500;
- background-color: #FFFFFF;
- border-radius: 37upx;
- }
- .timeActive {
- font-weight: bold;
- background: $mine-background-color;
- font-size: 33upx;
- box-shadow: 0upx 2upx 13upx 0upx rgba(150, 150, 150, 0.35);
- border-radius: 37upx;
- color: #FFFFFF;
- }
- }
- .customTime {
- height: 70upx;
- background-color: #FFFFFF;
- margin: 30upx;
- input {
- height: 70upx;
- padding: 0 30upx;
- line-height: 70upx;
- font-size: 26upx;
- }
- }
- }
- .buttom-list {
- margin-top: 100upx;
- .list-item {
- height: 90upx;
- line-height: 90upx;
- margin: 0 auto;
- border-radius: 50upx;
- text-align: center;
- width: 70%;
- margin-top: 50upx;
- color: #FFFFFF;
- font-size: 30upx;
- background-color: $mine-background-color;
- font-weight: 500;
- }
- }
- }
- </style>
|