<template>
  <view
    class="exe-item-top"
    v-for="(medical, index) in props.data.exeMedications"
    :key="index">
    <text class="item-name"> {{ medical.name }}</text>
    <view
      v-if="index == 0"
      class="item-right-li mini">
      {{ data.exeDateTime }}
    </view>
	<view class="tag-container">
    <view class="top-btns" v-for="(type, index) in medical.useArr">
	  <uni-tag :inverted="index === 0 || index === 5 ? false : true" :text="type.label"  :type="type.type" />
      <slot :visible="index == props.data?.exeMedications?.length - 1"></slot>
    </view>
	 </view>
  </view>
  <view class="exe-item-bottom">
    开始时间：{{ data.startDeteTime }}
    <view class="end-time">停止时间：{{ data.endDeteTime }}</view>
  </view>
</template>

<script setup>
  import { ref, watch, onMounted, nextTick } from 'vue';
  const props = defineProps({
    data: {
      type: Object,
      default: () => ({}),
    },
  });
</script>
<style scoped>
  @import url(../common.css);
</style>
