baseInfo.vue 2.37 KB
<!--
 * @Author: 'wangzhihui' '1733904062@qq.com'
 * @Date: 2025-10-17 21:05:36
 * @LastEditors: 'wangzhihui' '1733904062@qq.com'
 * @LastEditTime: 2025-10-30 14:13:41
 * @FilePath: \dj-car-life-system\src\views\residentManage\recruitmentManagement\components\baseInfo.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <div class="baseInfo">
        <DetailComp :config-data="configData" :detail-info="detailInfo"></DetailComp>
    </div>
</template>

<script>
import detailComp from "./detailComp.vue";

export default {
	components: {
		DetailComp: detailComp,
	},
	props: {
		detailInfo: {
			type: Object,
			default: () => { },
		},
	},

	data() {
		const contentStyle = {
			"width": "100%",
			"display": "inline-block",
			"overflow": "hidden",
			"text-overflow": "ellipsis",
			"white-space": "nowrap",
		};
		return {
			configData: [
				{
					title: "基础信息",
					infoData: [
						{
							title: "门店名称",
							key: "merchantName",
						},
						{
							title: "近一月新车销售",
							key: "salesVolume",
						},
						{
							title: "主营品牌",
							key: "brand",
							style: contentStyle,
							hasTooltip: true,
						},
						{
							title: "所属省市",
							key: "merchantAddress",
							hasTooltip: true,
						},
						{
							title: "详细地址",
							key: "merchantAddressDetail",
							style: contentStyle,
							hasTooltip: true,
							col: 24,
						},
						{
							title: "业务类型",
							key: "businessTypeName",
						},
						{
							title: "招聘类型",
							key: "recruitmentTypeName",
						},
						{
							title: "招聘数量",
							key: "recruitmentQuantity",
						},
						{
							title: "区域运营",
							key: "regionOperationName",
						},
						{
							title: "创建人",
							key: "createdBy",
						},
						{
							title: "申请时间",
							key: "createdDate",
						},
						{
							title: "需求描述",
							key: "requirementDescription",
							col: 24,
						},
					],
				},
			],
		};
	},
	methods: {
		getStatusItem(baseData, optKey, row, rowKey) {
			if (!baseData || !baseData[optKey] || !row)
				return null;

			return baseData[optKey].find(
				item => item.confId == row[rowKey], // 使用严格相等
			);
		},
	},
};
</script>