<template>
  <!-- 任务名 跳转详情页 -->
  <view class="u-font-14 flex justify-between item-center">
    {{ task.name }}
    <u-icon name="arrow-right" class="ml-3" @click="toDetail(task)"></u-icon>
  </view>
</template>

<script setup>
  import { useStore } from 'vuex';

  const store = useStore();

  defineProps({ task: { type: Object, default: () => {} } });

  function toDetail(task) {
    const { id, projectId, executorRoleId, businessUrl, businessCode } = task;
    uni.navigateTo({ url: `/pages/project/project?p=${projectId}&url=${encodeURIComponent(businessUrl)}&businessCode=${businessCode}&taskId=${id}&roleId=${executorRoleId}` });
  }
</script>

<style>
</style>