index.vue 1.89 KB
<template>
	<div class="one-customer-one-group">
		<div style="margin-right: 5px;">
			<el-tabs v-model="activeName" class="custom-tabs" @tab-click="handleClick">
				<el-tab-pane
					v-for="(item, index) in tabPaneList"
					:key="index"
					:label="item.label"
					:name="item.name"
				>
				</el-tab-pane>
			</el-tabs>
			<TipsBox :tips="tabPaneList[activeIdx].tips" />
		</div>
		<OneCustomerGroupTab v-if="activeName === 'oneCustomerGroup'" />
		<StoreConfigTab v-if="activeName === 'storeConfig'" />
	</div>
</template>

<script>
import OneCustomerGroupTab from "./components/OneCustomerGroupTab.vue";
import StoreConfigTab from "./components/StoreConfigTab.vue";
import TipsBox from "./components/TipsBox.vue";

export default {
	name: "OneCustomerOneGroup",
	components: {
		OneCustomerGroupTab,
		StoreConfigTab,
		TipsBox,
	},
	data() {
		return {
			activeName: "oneCustomerGroup",
			activeIdx: 0,
			tabPaneList: [
				{
					label: "一客一群",
					name: "oneCustomerGroup",
					tips: [
						"可将多个群二维码组合生成一个活码,当客户扫码进群后即与该群产生绑定,不会再接待新的客户入群。",
					],
				},
				{
					label: "4S店配置",
					name: "storeConfig",
					tips: [
						"管理并配置各4S店与其对应的总部定价师关联关系,以便线索精确分配。",
					],
				},
			],
		};
	},
	methods: {
		handleClick(tab, event) {
			this.activeIdx = tab.index;
			this.activeName = tab.name;
		},
	},
};
</script>

<style lang="scss" scoped>
.one-customer-one-group {
	padding: 0 20px 20px 20px;
	background-color: #f0f2f5;
	min-height: calc(100vh - 100px);

	::v-deep .custom-tabs {
		.el-tabs__header {
			background-color: #fff;
			padding: 0 20px;
			margin: 0;
		}

		.el-tabs__nav-wrap::after {
			height: 1px;
			background-color: #e4e7ed;
		}

		.el-tabs__item {
			height: 54px;
			line-height: 54px;
			font-size: 16px;
		}
	}
}
</style>