<template name="to_do_details">
  <view class="todo_done_container">
    <view class="title">
      待办明细
      <text v-if="useModel?.listData?.value?.length">
        ({{ useModel?.listData?.value?.length }})
      </text>
    </view>
    <view class="todo_done_content">
      <template v-for="(i, index) in useModel?.listData?.value" :key="`items_${index}`">
        <MyTemplateWorkorder v-if="i?.type === 'WorkOrder'" :item="i" />
        <MyTemplateMomentTask v-if="i?.type === 'MomentTask'" :item="i" />
      </template>
    </view>
  </view>
</template>

<script setup lang="ts">
import useModel from '../model';
import MyTemplateMomentTask from './TemplateMomentTask.vue';
import MyTemplateWorkorder from './TemplateWorkorder.vue';
</script>

<style lang="scss">
.todo_done_container {
  padding: 50rpx 30rpx 0 30rpx;

  .title {
    color: #333;
    font-size: 32rpx;
    font-weight: 500;

    text {
      color: #666;
    }
  }
}
</style>
