tall小程序和时间轴结合在小程序中
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

77 lines
2.6 KiB

<template>
<view class="px-3 pb-10">
<view :key="index" v-for="(item, index) in tasks">
<view class="flex items-center">
<TimeStatus :content="JSON.stringify(item.process)" :status="item.process" />
<view class="flex justify-between flex-1 ml-2">
<view>{{ +item.planStart | date('mm-dd hh:MM') }}</view>
<view>
<view class="flex justify-between" style="min-width: 180rpx">
<u-icon custom-prefix="custom-icon" name="C-bxl-redux" size="34"></u-icon>
<u-icon custom-prefix="custom-icon" name="attachment" size="42"></u-icon>
<u-icon custom-prefix="custom-icon" name="moneycollect" size="40"></u-icon>
</view>
</view>
</view>
</view>
<view class="border-l-2 border-gray-300 ml-3.5 my-2">
<view class="ml-4 overflow-hidden shadow-lg task-box">
<u-card :show-foot="false" :show-head="false" :style="{ height: setHeight(item.panel) }" class="h-16" margin="0">
<!-- 任务面板插件 -->
<view slot="body">
<view :key="pluginIndex" class="p-0 u-col-between u-skeleton" v-for="(plugin, pluginIndex) in item.plugins">
<!-- <view :key="p.pluginId" v-for="p in plugin">
<p-task-title :item="item" v-if="p.pluginId === 1" />
<p-task-description :item="item" v-if="p.pluginId === 2" />
<p-task-duration-delay :item="item" v-if="p.pluginId === 3" />
<p-task-start-time-delay :item="item" v-if="p.pluginId === 4" />
<p-deliverable :item="item" v-if="p.pluginId === 5" />
<p-subtasks :item="item" v-if="p.pluginId === 6" />
<p-subproject :item="item" v-if="p.pluginId === 7" />
<p-task-countdown :item="item" v-if="p.pluginId === 8" />
</view>-->
</view>
</view>
</u-card>
</view>
</view>
</view>
<Tips />
</view>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
import TimeStatus from './TimeStatus.vue';
export default {
name: 'TimeBox',
components: { TimeStatus },
data() {
return { currentComponent: '' };
},
computed: mapState('home', ['roleId', 'timeNode', 'timeUnit', 'tasks']),
created() {},
methods: {
...mapMutations('home', ['setTipsContent', 'setTipsContent']),
// 设置任务面板高度
setHeight(panel) {
if (panel && panel.height) {
return panel.height + 'px';
} else {
return 'auto';
}
},
},
};
</script>
<style scoped lang="scss">
.task-box {
border-radius: 24rpx;
}
</style>