taskdetails.vue 2.57 KB
   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
<template>
<view class="task">
<!-- 切换 -->
<view class="task_tab">
<view class="task_tab_title" v-for="(item, index) in title" :key="item.name" @tap="selectTitle(item.name)"
:class="{ 'selected': item.name === selectedTitle }">
{{item.name}}
</view>
</view>
<!-- 列表 -->
<view class="task_list">
<view class="task_list_column">
<view class="task_list_column_label">
<view class="quest_label">
急救任务 :BHU78685F
</view>
<view class="quest_status">
已完成
</view>
</view>
<view class="task_list_column_car">
</view>
<view class="task_list_column_time">
</view>
</view>
<view class="task_list_column">
</view>
<view class="task_list_column">
</view>
</view>
</view>
</template>

<script>
export default {
data() {
return {
title: [{
name: "今日急诊任务"
}, {
name: "本周"
}, {
name: "本月"
}, {
name: "所有任务"
}],
selectedTitle: '今日急诊任务' // 初始选中第一个标题
}
},
methods:{
selectTitle(title) {
this.selectedTitle = title;
}
}
}
</script>

<style lang="scss" scoped>
.task {
width: 100%;
height: 100%;
box-sizing: border-box;
.task_tab {
width: 100%;
height: 120rpx;
padding-left: 30rpx;
display: flex;
justify-content: flex-start;
align-items: center;
border-bottom: 20rpx solid #F5F7FC;
.task_tab_title {
margin-right: 40rpx;
padding-bottom: 20rpx;
}
.selected {
/* 添加选中标题的样式 */
color: #466CB4;
font-weight: bold;
border-bottom: 1rpx solid #466CB4;
}
}
.task_list{
width: calc(100% - 30rpx);
min-height: 300rpx;
margin-left: 30rpx;
background: #F5F7FC;
.task_list_column{
height: 346rpx;
background: #fff;
margin-top: 20rpx;
padding-right: 30rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: space-around;
.task_list_column_label{
width: 100%;
height: 50rpx;
display: flex;
justify-content: space-between;
align-items: center;
.quest_label{
font-weight: 400;
font-size: 24rpx;
color: #3B3B3B;
}
.quest_status{
font-weight: 400;
font-size: 24rpx;
color: #959595;
}
}
.task_list_column_car{
width: 100%;
height: 150rpx;
// background-color: #466CB4;
}
.task_list_column_time{
width: 100%;
height: 100rpx;
// background-color: rosybrown;
}
}
}
}
</style>