123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <template>
- <view class="schedule">
- <view class="schedule-title">
- <view class="schedule-title-item">
- 周一
- </view>
- <view class="schedule-title-item">
- 周二
- </view>
- <view class="schedule-title-item">
- 周三
- </view>
- <view class="schedule-title-item">
- 周四
- </view>
- <view class="schedule-title-item">
- 周五
- </view>
- </view>
- <view v-if="list.length == 0" class="null">
- 暂无数据
- </view>
- <view v-else v-for="(item,index) in list" :key="index" class="schedule-content">
- <view @click="openPop(item1)" :style="`background-color: ${bgcColor(item1)};`"
- v-for="(item1,index1) in item" :key="index1" class="schedule-content-item">
- <view class="schedule-content-item-name">
- {{item1.classroom}}
- </view>
- <!-- <view v-if="item1.show" class="schedule-content-item-text">
- 调
- </view> -->
- </view>
- </view>
-
- </view>
- </template>
- <script>
- export default {
- props: {
- list: {
- type: Array,
- default: () => []
- }
- },
- data() {
- return {
- };
- },
- methods: {
- bgcColor(item1) {
- if (item1.current) {
- return '#FCE9D0'
- } else if (item1.name !== '') {
- return '#cef1e9'
- }
- },
- openPop(item1) {
- this.$emit('openPop', item1)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .null {
- width: 100%;
- height: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #999;
- font-size: 18px;
- margin-top: 16px;
- }
- .schedule {
- width: 100%;
- box-sizing: border-box;
- background-color: #fff;
- padding-bottom: 32rpx;
- .schedule-title {
- height: 70rpx;
- width: 100%;
- background: #cef1e9;
- border-radius: 10rpx;
- display: flex;
- margin-bottom: 16rpx;
-
- box-sizing: border-box;
- .schedule-title-item {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
-
- }
- }
- .schedule-content {
- width: 100%;
- display: flex;
- justify-content: space-between;
- font-size: 20rpx;
- margin-bottom: 16rpx;
- box-sizing: border-box;
-
- .schedule-content-item {
- width: 126rpx;
- height: 140rpx;
- border-radius: 10px;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- position: relative;
- .schedule-content-item-text {
- position: absolute;
- top: 2rpx;
- left: 10rpx;
- font-size: 24rpx;
- color: #FDAD45;
- }
- .schedule-content-item-name {
- width: 80rpx;
- text-align: center;
- line-height: 36rpx;
- font-size: 24rpx;
- }
- }
- }
- }
- </style>
|