Commit 6c428d08 by chenwq

feat(报表埋点): 为两个组件添加页面展示与隐藏的埋点功能

为 OneCustomerGroupTab 和 StoreConfigTab 组件引入报表埋点混入,并在 mounted 和 beforeDestroy 生命周期中调用相应方法,以追踪页面的展示与隐藏行为。
1 parent 49ecdfa3
...@@ -69,8 +69,10 @@ ...@@ -69,8 +69,10 @@
<script> <script>
import { deepClone } from "@/common/util"; import { deepClone } from "@/common/util";
import { getLiveCodePage, deleteLiveCode } from "@/api/usedCarManagement"; import { getLiveCodePage, deleteLiveCode } from "@/api/usedCarManagement";
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export default { export default {
name: "OneCustomerGroupTab", name: "OneCustomerGroupTab",
mixins: [reportTrackFunMixin], // 导入混入
data() { data() {
return { return {
searchForm: { searchForm: {
...@@ -130,6 +132,12 @@ export default { ...@@ -130,6 +132,12 @@ export default {
}, },
}; };
}, },
mounted() {
this.onPageShow()
},
beforeDestroy() {
this.onPageHide()
},
methods: { methods: {
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
......
...@@ -71,9 +71,10 @@ ...@@ -71,9 +71,10 @@
<script> <script>
import { getStoreConfigPage, getCarDealerList, getPricingStaffList, addStoreConfig, updateStoreConfig, deleteStoreConfig } from "@/api/usedCarManagement"; import { getStoreConfigPage, getCarDealerList, getPricingStaffList, addStoreConfig, updateStoreConfig, deleteStoreConfig } from "@/api/usedCarManagement";
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export default { export default {
name: "StoreConfigTab", name: "StoreConfigTab",
mixins: [reportTrackFunMixin], // 导入混入
data() { data() {
return { return {
slotArr: ["pricingSpecialistTips"], slotArr: ["pricingSpecialistTips"],
...@@ -175,6 +176,12 @@ export default { ...@@ -175,6 +176,12 @@ export default {
], ],
}; };
}, },
mounted() {
this.onPageShow()
},
beforeDestroy() {
this.onPageHide()
},
methods: { methods: {
validateOption(val, list, keyField, clearFields) { validateOption(val, list, keyField, clearFields) {
if (!val) return; if (!val) return;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!