233 lines
10 KiB
JavaScript
233 lines
10 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const RecordingDurationPopup = () => "../../pages-subpackage/ai_features/recording_duration/recording-duration-popup.js";
|
|
const QualityCoveragePopup = () => "../../pages-subpackage/ai_features/quality_coverage/quality-coverage-popup.js";
|
|
const _sfc_main = {
|
|
components: {
|
|
RecordingDurationPopup,
|
|
QualityCoveragePopup
|
|
},
|
|
data() {
|
|
const systemInfo = common_vendor.index.getSystemInfoSync();
|
|
const statusBarHeight = systemInfo.statusBarHeight || 20;
|
|
const navbarHeight = 44;
|
|
const statusBarHeightRpx = statusBarHeight * 2;
|
|
const navbarHeightRpx = navbarHeight * 2;
|
|
const totalNavbarHeight = statusBarHeightRpx + navbarHeightRpx;
|
|
return {
|
|
contentTop: totalNavbarHeight + "rpx",
|
|
// 内容区域距离顶部的距离
|
|
contentBottom: "96rpx",
|
|
// 内容区域距离底部的距离(默认值,会在 onReady 中更新)
|
|
popupReady: false
|
|
// 弹出框组件是否准备就绪
|
|
};
|
|
},
|
|
computed: {
|
|
// 计算内容区域的位置(使用计算属性确保响应式)
|
|
computedContentTop() {
|
|
const systemInfo = common_vendor.index.getSystemInfoSync();
|
|
const statusBarHeight = systemInfo.statusBarHeight || 20;
|
|
const navbarHeight = 44;
|
|
const statusBarHeightRpx = statusBarHeight * 2;
|
|
const navbarHeightRpx = navbarHeight * 2;
|
|
const totalNavbarHeight = statusBarHeightRpx + navbarHeightRpx;
|
|
return totalNavbarHeight + "rpx";
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.updateNavbarPosition();
|
|
this.$nextTick(() => {
|
|
setTimeout(() => {
|
|
this.popupReady = true;
|
|
}, 100);
|
|
});
|
|
},
|
|
onShow() {
|
|
this.$nextTick(() => {
|
|
this.updateNavbarPosition();
|
|
setTimeout(() => {
|
|
this.updateNavbarPosition();
|
|
}, 50);
|
|
});
|
|
},
|
|
onReady() {
|
|
this.$nextTick(() => {
|
|
const query = common_vendor.index.createSelectorQuery().in(this);
|
|
query.select(".uni-navbar__content").boundingClientRect((data) => {
|
|
if (data && data.height) {
|
|
const actualHeight = data.height;
|
|
const actualHeightRpx = actualHeight * 2;
|
|
const adjustedHeight = Math.max(actualHeightRpx - 4, 0);
|
|
this.$set(this, "contentTop", adjustedHeight + "rpx");
|
|
common_vendor.index.__f__("log", "at pages/ai_analysis/ai_analysis.vue:204", "[AIAnalysis] 使用实际导航栏高度:", actualHeight, "px =", actualHeightRpx, "rpx, 调整后:", adjustedHeight, "rpx");
|
|
} else {
|
|
const systemInfo = common_vendor.index.getSystemInfoSync();
|
|
const statusBarHeight = systemInfo.statusBarHeight || 20;
|
|
const navbarHeight = 44;
|
|
const statusBarHeightRpx = statusBarHeight * 2;
|
|
const navbarHeightRpx = navbarHeight * 2;
|
|
const totalNavbarHeight = statusBarHeightRpx + navbarHeightRpx;
|
|
const adjustedHeight = Math.max(totalNavbarHeight - 4, 0);
|
|
this.$set(this, "contentTop", adjustedHeight + "rpx");
|
|
}
|
|
}).exec();
|
|
const queryTabbar = common_vendor.index.createSelectorQuery().in(this);
|
|
queryTabbar.select(".tabbar").boundingClientRect((tabbarData) => {
|
|
if (tabbarData && tabbarData.height) {
|
|
const tabbarHeight = tabbarData.height;
|
|
const tabbarHeightRpx = tabbarHeight * 2;
|
|
const adjustedBottom = Math.max(tabbarHeightRpx - 4, 0);
|
|
this.$set(this, "contentBottom", adjustedBottom + "rpx");
|
|
common_vendor.index.__f__("log", "at pages/ai_analysis/ai_analysis.vue:228", "[AIAnalysis] 使用实际tabbar高度:", tabbarHeight, "px =", tabbarHeightRpx, "rpx, 调整后:", adjustedBottom, "rpx");
|
|
} else {
|
|
this.$set(this, "contentBottom", "96rpx");
|
|
}
|
|
}).exec();
|
|
setTimeout(() => {
|
|
const query2 = common_vendor.index.createSelectorQuery().in(this);
|
|
query2.select(".uni-navbar__content").boundingClientRect((data) => {
|
|
if (data && data.height) {
|
|
const actualHeight = data.height;
|
|
const actualHeightRpx = actualHeight * 2;
|
|
const adjustedHeight = Math.max(actualHeightRpx - 4, 0);
|
|
this.$set(this, "contentTop", adjustedHeight + "rpx");
|
|
common_vendor.index.__f__("log", "at pages/ai_analysis/ai_analysis.vue:246", "[AIAnalysis] 延迟更新导航栏高度:", actualHeight, "px =", actualHeightRpx, "rpx, 调整后:", adjustedHeight, "rpx");
|
|
}
|
|
}).exec();
|
|
const queryTabbar2 = common_vendor.index.createSelectorQuery().in(this);
|
|
queryTabbar2.select(".tabbar").boundingClientRect((tabbarData) => {
|
|
if (tabbarData && tabbarData.height) {
|
|
const tabbarHeight = tabbarData.height;
|
|
const tabbarHeightRpx = tabbarHeight * 2;
|
|
const adjustedBottom = Math.max(tabbarHeightRpx - 4, 0);
|
|
this.$set(this, "contentBottom", adjustedBottom + "rpx");
|
|
common_vendor.index.__f__("log", "at pages/ai_analysis/ai_analysis.vue:258", "[AIAnalysis] 延迟更新tabbar高度:", tabbarHeight, "px =", tabbarHeightRpx, "rpx, 调整后:", adjustedBottom, "rpx");
|
|
}
|
|
}).exec();
|
|
}, 200);
|
|
});
|
|
},
|
|
methods: {
|
|
// 显示录音时长弹出框
|
|
showRecordingDurationPopup() {
|
|
if (!this.popupReady) {
|
|
common_vendor.index.__f__("warn", "at pages/ai_analysis/ai_analysis.vue:269", "[AIAnalysis] Popup component not ready yet");
|
|
return;
|
|
}
|
|
this.$nextTick(() => {
|
|
const popup = this.$refs.recordingDurationPopup;
|
|
if (popup && typeof popup.open === "function") {
|
|
popup.open();
|
|
} else {
|
|
common_vendor.index.__f__("error", "at pages/ai_analysis/ai_analysis.vue:278", "[AIAnalysis] recordingDurationPopup ref not found or open method not available");
|
|
}
|
|
});
|
|
},
|
|
// 弹出框关闭事件
|
|
onPopupClose() {
|
|
},
|
|
// 显示质检覆盖率弹出框
|
|
showQualityCoveragePopup() {
|
|
if (!this.popupReady) {
|
|
common_vendor.index.__f__("warn", "at pages/ai_analysis/ai_analysis.vue:290", "[AIAnalysis] Popup component not ready yet");
|
|
return;
|
|
}
|
|
this.$nextTick(() => {
|
|
const popup = this.$refs.qualityCoveragePopup;
|
|
if (popup && typeof popup.open === "function") {
|
|
popup.open();
|
|
} else {
|
|
common_vendor.index.__f__("error", "at pages/ai_analysis/ai_analysis.vue:299", "[AIAnalysis] qualityCoveragePopup ref not found or open method not available");
|
|
}
|
|
});
|
|
},
|
|
// 质检覆盖率弹出框关闭事件
|
|
onQualityCoveragePopupClose() {
|
|
},
|
|
// 计算并更新导航栏和内容区域的位置
|
|
updateNavbarPosition() {
|
|
const systemInfo = common_vendor.index.getSystemInfoSync();
|
|
const statusBarHeight = systemInfo.statusBarHeight || 20;
|
|
const navbarHeight = 44;
|
|
const statusBarHeightRpx = statusBarHeight * 2;
|
|
const navbarHeightRpx = navbarHeight * 2;
|
|
const totalNavbarHeight = statusBarHeightRpx + navbarHeightRpx;
|
|
const contentTop = totalNavbarHeight + "rpx";
|
|
this.$set(this, "contentTop", contentTop);
|
|
this.$forceUpdate();
|
|
},
|
|
goBack() {
|
|
const pages = getCurrentPages();
|
|
if (pages.length <= 1) {
|
|
common_vendor.index.__f__("log", "at pages/ai_analysis/ai_analysis.vue:329", "[AIAnalysis][goBack] 当前是第一个页面,无法返回");
|
|
return;
|
|
}
|
|
common_vendor.index.navigateBack({
|
|
fail: (err) => {
|
|
common_vendor.index.__f__("error", "at pages/ai_analysis/ai_analysis.vue:334", "[AIAnalysis][goBack] 返回失败:", err);
|
|
}
|
|
});
|
|
},
|
|
navigateToPage(pageName) {
|
|
const pagePath = `pages-subpackage/ai_features/${pageName}/${pageName}`;
|
|
common_vendor.index.navigateTo({
|
|
url: `/${pagePath}`,
|
|
fail: (err) => {
|
|
common_vendor.index.__f__("error", "at pages/ai_analysis/ai_analysis.vue:343", "导航失败:", err);
|
|
common_vendor.index.showToast({
|
|
title: "页面跳转失败",
|
|
icon: "none"
|
|
});
|
|
}
|
|
});
|
|
}
|
|
}
|
|
};
|
|
if (!Array) {
|
|
const _easycom_uni_nav_bar2 = common_vendor.resolveComponent("uni-nav-bar");
|
|
const _component_RecordingDurationPopup = common_vendor.resolveComponent("RecordingDurationPopup");
|
|
const _component_QualityCoveragePopup = common_vendor.resolveComponent("QualityCoveragePopup");
|
|
(_easycom_uni_nav_bar2 + _component_RecordingDurationPopup + _component_QualityCoveragePopup)();
|
|
}
|
|
const _easycom_uni_nav_bar = () => "../../uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.js";
|
|
if (!Math) {
|
|
_easycom_uni_nav_bar();
|
|
}
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return common_vendor.e({
|
|
a: common_vendor.o($options.goBack),
|
|
b: common_vendor.p({
|
|
fixed: true,
|
|
statusBar: true,
|
|
title: "AI销冠系统",
|
|
leftIcon: "left",
|
|
color: "#333",
|
|
backgroundColor: "#FFFFFF"
|
|
}),
|
|
c: common_vendor.o((...args) => $options.showRecordingDurationPopup && $options.showRecordingDurationPopup(...args)),
|
|
d: common_vendor.o(($event) => $options.navigateToPage("customer_count")),
|
|
e: common_vendor.o((...args) => $options.showQualityCoveragePopup && $options.showQualityCoveragePopup(...args)),
|
|
f: common_vendor.o(($event) => $options.navigateToPage("speech_rating")),
|
|
g: common_vendor.o(($event) => $options.navigateToPage("intent_level")),
|
|
h: common_vendor.o(($event) => $options.navigateToPage("deal_attribution")),
|
|
i: common_vendor.o(($event) => $options.navigateToPage("opening_rate")),
|
|
j: common_vendor.o(($event) => $options.navigateToPage("over_commitment")),
|
|
k: common_vendor.o(($event) => $options.navigateToPage("red_line_touch")),
|
|
l: $options.computedContentTop || $data.contentTop,
|
|
m: $data.contentBottom || "96rpx",
|
|
n: $data.popupReady
|
|
}, $data.popupReady ? {
|
|
o: common_vendor.sr("recordingDurationPopup", "8462a2f1-1"),
|
|
p: common_vendor.o($options.onPopupClose)
|
|
} : {}, {
|
|
q: $data.popupReady
|
|
}, $data.popupReady ? {
|
|
r: common_vendor.sr("qualityCoveragePopup", "8462a2f1-2"),
|
|
s: common_vendor.o($options.onQualityCoveragePopupClose)
|
|
} : {});
|
|
}
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8462a2f1"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/ai_analysis/ai_analysis.js.map
|