|
- <template>
- <view style="height: 100%;">
- <view class="title">
- 应到:8人
- </view>
- <view style="padding: 26rpx;overflow: hidden;">
- <view class="cate">
- <view class="cateList">
- <view v-for="item in cateList" :class="{active:item.value == cate}" :key="item.value" class="item"
- @click="cateItemClick(item)">
- {{item.label}}({{item.value}})
- </view>
- </view>
- </view>
- </view>
- <view style="height:calc(100% - 200rpx);overflow: auto;">
- <view class="list">
- <view v-for="(item, index) in list" :key="index" class="item" @click="popupShow(item)">
- <view class="right">
- <image src="@/static/image/test/image2.png" mode="aspectFill"
- style="width: 160rpx;height: 160rpx;border-radius:10rpx"></image>
- <view class="des">
- <view class="top">
- <view class="status"
- :style="{backgroundColor:cate == 1?'#0FAF76':cate == 2?'#EF2D2D':'#F49D19' }">
- {{cateList.find(e=>e.value == cate).label}}
- </view>
- <view class="name">
- 杨云
- </view>
- </view>
- <view class="depart">
- 系部:安环部
- </view>
- <view class="bottom">
- <view class="major">专业:环艺</view>
- <view class="class">班级:第二班</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <u-popup :show="show" mode="center" :round="10">
- <view class="popupInfo">
- <image src="/static/image/test/image.png" mode="widthFix" style="width: 480rpx;border-radius:10rpx"></image>
- <view class="top">
- <view class="status" :style="{backgroundColor:cate == 1?'#0FAF76':cate == 2?'#EF2D2D':'#F49D19' }">
- {{cateList.find(e=>e.value == cate).label}}
- </view>
- <view class="name">
- 杨云
- </view>
- </view>
- <view class="depart">
- 系部:安环部
- </view>
- <view class="bottom">
- <view class="major">专业:环艺</view>
- <view class="class">班级:第二班</view>
- </view>
- <view class="closeBox">
- <image @click="show = false" src="/static/image/close.png" class="close"></image>
- </view>
- </view>
- </u-popup>
- </view>
- </template>
-
- <script>
- export default {
- data() {
- return {
- list: [{
- name: 1
- }, {
- name: 2
- }, {
- name: 3
- }],
- cateList: [{
- value: 1,
- label: '实到'
- },
- {
- value: 2,
- label: '未到'
- },
- {
- value: 3,
- label: '趴桌子'
- },
- {
- value: 4,
- label: '玩手机'
- },
- {
- value: 5,
- label: '睡觉'
- },
- ],
- cate: 1,
- checkboxValue: [],
-
- show: false,
- popupInfo: {},
- }
- },
- methods: {
- cateItemClick(item) {
- this.cate = item.value
- },
- popupShow(item) {
- this.popupInfo = item
- this.show = true
- }
- }
- }
- </script>
-
- <style scoped lang="scss">
- .popupInfo {
- padding: 30rpx;
- box-sizing: border-box;
- position: relative;
-
- .top {
- margin-top: 20rpx;
- font-size: 32rpx;
- display: flex;
-
- .status {
- display: inline-block;
- font-size: 24rpx;
- line-height: 1.8;
- color: #fff;
- padding: 0 12rpx;
- border-radius: 8rpx;
- margin-right: 12rpx;
- }
-
- .name {
- font-size: 32rpx;
- font-weight: 700;
- }
- }
-
- .depart {
- margin-top: 22rpx;
- font-size: 26rpx;
- }
-
- .bottom {
- font-size: 26rpx;
- margin-top: 18rpx;
- display: flex;
- justify-content: space-between;
- margin-bottom: 12rpx;
-
- .major {}
-
- .class {}
- }
-
- .closeBox {
- width: 100%;
- position: absolute;
- left: 0;
- bottom:-98rpx;
- text-align: center;
- .close {
- width: 60rpx;
- height: 60rpx;
- }
-
- }
- }
-
- .title {
- display: flex;
- color: #333333;
- padding: 26rpx;
- background: #fff;
- border-top: 1rpx solid rgba(0, 0, 0, 0.03);
- font-size: 30rpx;
- }
-
- .cate {
- font-size: 28rpx;
- overflow-x: auto;
-
- .cateList {
- display: flex;
- width: auto;
-
- .item {
- background-color: #fff;
- border-radius: 35rpx;
- padding: 0 56rpx;
- line-height: 74rpx;
- margin-right: 30rpx;
- white-space: nowrap;
- color: #333;
-
- &.active {
- background-color: #2388FF;
- color: #fff;
- }
- }
- }
- }
-
- .list {
- padding: 0 26rpx;
- margin-bottom: 60rpx;
-
- .item {
- display: flex;
- margin-bottom: 28rpx;
-
- &:last-child {
- margin-bottom: 0;
- }
-
- .right {
- padding: 30rpx;
- flex: 1;
- background-color: #fff;
- border-radius: 18rpx;
- display: flex;
-
- .des {
- flex: 1;
- padding-left: 24rpx;
- font-size: 26rpx;
- color: #333;
-
- .top {
- font-size: 32rpx;
- display: flex;
-
- .status {
- display: inline-block;
- font-size: 24rpx;
- line-height: 1.8;
- color: #fff;
- padding: 0 12rpx;
- border-radius: 8rpx;
- margin-right: 12rpx;
- }
-
- .name {
- font-size: 32rpx;
- font-weight: 700;
- }
- }
-
- .depart {
- margin-top: 28rpx;
- font-size: 26rpx;
- }
-
- .bottom {
- font-size: 26rpx;
- margin-top: 18rpx;
- display: flex;
- justify-content: space-between;
-
- .major {}
-
- .class {}
- }
- }
- }
- }
- }
- </style>
|