|
|
@ -1,26 +1,61 @@ |
|
|
|
<template> |
|
|
|
<view class="p-3 bg-white"> |
|
|
|
<view class="bg-white"> |
|
|
|
<view class="flex items-center"> |
|
|
|
<image class="w-8 h-8 ml-1 mr-4 bg-yellow-700 rounded-full" src="../../static/local_play1.png"></image> |
|
|
|
<view class="text-sm font-semibold">我的LWBS</view> |
|
|
|
<view class="event-pic rounded-full flex justify-center items-center"> |
|
|
|
<image style="width: 25px; height: 25px" src="../../static/local_play1.png"></image> |
|
|
|
</view> |
|
|
|
<view class="flex items-center justify-between p-2 task" v-for="(task, index) in tasks" :key="index"> |
|
|
|
<view class="title">我的LWBS</view> |
|
|
|
</view> |
|
|
|
<view class="p-2 task" v-for="(task, index) in tasks" :key="index"> |
|
|
|
<view> |
|
|
|
<!-- 有子项目 --> |
|
|
|
<view class="flex items-center justify-between" v-if="index <= 2"> |
|
|
|
<view class="flex items-center"> |
|
|
|
<view class="firstTask ml-1 mr-2 rounded-full text-white" v-if="index === 0"> |
|
|
|
<view class="flex items-center justify-center">{{ index + 1 }}</view> |
|
|
|
</view> |
|
|
|
<view class="sencondTask ml-1 mr-2 rounded-full text-white" v-else-if="index === 1"> |
|
|
|
<view class="flex items-center justify-center">{{ index + 1 }}</view> |
|
|
|
</view> |
|
|
|
<view class="thirdTask ml-1 mr-2 rounded-full text-white" v-else-if="index === 2"> |
|
|
|
<view class="flex items-center justify-center">{{ index + 1 }}</view> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view class="flex items-center"> |
|
|
|
<view class="title">{{ task.taskName }}</view> |
|
|
|
<view class="states px-2 text-green-400 bg-green-100 rounded-full">{{ task.state }}</view> |
|
|
|
</view> |
|
|
|
<view class="dates flex items-center text-gray-400"> |
|
|
|
<view class="pr-2">{{ task.time }}</view> |
|
|
|
<view>时长:{{ task.duration }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<u-icon name="arrow-right" size="28" @click="openProjectItem(index)"></u-icon> |
|
|
|
</view> |
|
|
|
<!-- 没有子项目 --> |
|
|
|
<view v-else> |
|
|
|
<view class="flex items-center"> |
|
|
|
<view class="w-8 h-8 ml-1 mr-2 bg-blue-300 rounded-full"> |
|
|
|
<view class="flex items-center justify-center w-8 h-8">{{ index + 1 }}</view> |
|
|
|
<view class="routine w-8 h-8 ml-1 mr-2 bg-white border rounded-full"> |
|
|
|
<view class="flex items-center justify-center">{{ index + 1 }}</view> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view class="flex items-center"> |
|
|
|
<view class="text-sm font-semibold">{{ task.taskName }}</view> |
|
|
|
<view class="pl-2 pr-2 text-green-500 bg-green-200 rounded-full">{{ task.state }}</view> |
|
|
|
<view class="title">{{ task.taskName }}</view> |
|
|
|
<view class="states px-2 text-green-400 bg-green-100 rounded-full">{{ task.state }}</view> |
|
|
|
</view> |
|
|
|
<view class="flex items-center text-gray-400"> |
|
|
|
<view class="dates flex items-center text-gray-400"> |
|
|
|
<view class="pr-2">{{ task.time }}</view> |
|
|
|
<view>时长:{{ task.duration }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<u-icon name="arrow-right" size="28"></u-icon> |
|
|
|
</view> |
|
|
|
<view v-if="isrotate === index"> |
|
|
|
这是子项目 |
|
|
|
<ProjectItem /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -81,3 +116,61 @@ export default { |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.firstTask { |
|
|
|
background: linear-gradient(45deg, #9000ff, #5e00ff); |
|
|
|
width: 32px; |
|
|
|
height: 32px; |
|
|
|
margin-right: 16px; |
|
|
|
line-height: 32px; |
|
|
|
font-size: 16px; |
|
|
|
text-align: center; |
|
|
|
border: 1px solid #eee; |
|
|
|
} |
|
|
|
.sencondTask { |
|
|
|
background: linear-gradient(45deg, #0081ff, #1cbbb4); |
|
|
|
width: 32px; |
|
|
|
height: 32px; |
|
|
|
margin-right: 16px; |
|
|
|
line-height: 32px; |
|
|
|
font-size: 16px; |
|
|
|
text-align: center; |
|
|
|
border: 1px solid #eee; |
|
|
|
} |
|
|
|
.thirdTask { |
|
|
|
background: linear-gradient(45deg, #39b54a, #8dc63f); |
|
|
|
width: 32px; |
|
|
|
height: 32px; |
|
|
|
margin-right: 16px; |
|
|
|
line-height: 32px; |
|
|
|
font-size: 16px; |
|
|
|
text-align: center; |
|
|
|
border: 1px solid #eee; |
|
|
|
} |
|
|
|
.routine { |
|
|
|
width: 32px; |
|
|
|
height: 32px; |
|
|
|
margin-right: 16px; |
|
|
|
line-height: 32px; |
|
|
|
font-size: 16px; |
|
|
|
text-align: center; |
|
|
|
border: 1px solid #eee; |
|
|
|
} |
|
|
|
.event-pic { |
|
|
|
margin: 0 14px; |
|
|
|
width: 36px; |
|
|
|
height: 36px; |
|
|
|
background: linear-gradient(45deg, #ff9700, #ed1c24); |
|
|
|
} |
|
|
|
.title { |
|
|
|
font-size: 15px; |
|
|
|
margin-right: 16px; |
|
|
|
} |
|
|
|
.dates { |
|
|
|
font-size: 12px; |
|
|
|
} |
|
|
|
.states { |
|
|
|
font-size: 10px; |
|
|
|
margin: 2px; |
|
|
|
} |
|
|
|
</style> |
|
|
|