<template>
	<view class="border border-light-opc rounded mb-2 p-2 shadow-sm">
		<view class="">
			<text class="text-primary">企业名称：</text>
			<text class="text-secondary">{{itemData.enterpriseName}}</text>
		</view>
		<view class="my-2">
			<text class="text-primary">对接方式：</text>
			<text class="text-secondary">{{list[itemData.staffTotal?itemData.staffTotal-1:0].name}}</text>
		</view>
		<view class="my-2">
			<text class="text-primary">{{list[itemData.staffTotal?itemData.staffTotal-1:0].name}}记录时间：</text>
			<text class="text-secondary">{{itemData.endDate}}</text>
		</view>
		<view class="my-2">
			<text class="text-primary">挂钩干部：</text>
			<text class="text-secondary">{{hookName}}</text>
		</view>
		<slot></slot>
	</view>
</template>

<script>
import {
  Store
} from "@/common/store.js";
	export default {
		props: {
			manageData: {
				type: Object,
				default: () => {}
			}
		},
		computed: {
			itemData() {
				return this.manageData
			}
		},
		data() {
			return {
				list: [{
						name: "上门沟通",
						value: '1'
					},
					{
						name: "电话联系",
						value: '2'
					},
					{
						name: "平台沟通",
						value: '3'
					},
				],
        hookName: ''
			}
		},

    mounted() {
      this.hookName = this.itemData.hookName
      const userInfo = Store.getUser() ? JSON.parse(Store.getUser()) : {}
      if( userInfo?.roleLevel == '2'){
        this.hookName = userInfo.userName
      }
    },
	}
</script>

<style>
</style>