|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- <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>
|