2.6 盈利能力模块表格完善
This commit is contained in:
57
unpackage/dist/dev/mp-weixin/pages/ztfx/ztfx.js
vendored
57
unpackage/dist/dev/mp-weixin/pages/ztfx/ztfx.js
vendored
@@ -322,6 +322,10 @@ const _sfc_main = {
|
||||
onReady() {
|
||||
},
|
||||
methods: {
|
||||
// 词云绘制完成
|
||||
onWordCloudRendered() {
|
||||
common_vendor.index.hideLoading();
|
||||
},
|
||||
getStockHeatType(stock) {
|
||||
const days = stock.continuous_days_num || 0;
|
||||
if (days >= this.RISK_THRESHOLDS.CRITICAL) {
|
||||
@@ -462,9 +466,19 @@ const _sfc_main = {
|
||||
this.$refs.chartRef && this.initPieChart();
|
||||
break;
|
||||
case 1:
|
||||
common_vendor.index.showLoading({
|
||||
title: "词云生成中...",
|
||||
mask: true
|
||||
// 防止用户误触
|
||||
});
|
||||
this.initWordCloud();
|
||||
break;
|
||||
case 2:
|
||||
common_vendor.index.showLoading({
|
||||
title: "词云生成中...",
|
||||
mask: true
|
||||
// 防止用户误触
|
||||
});
|
||||
this.initWordCloud();
|
||||
break;
|
||||
}
|
||||
@@ -476,7 +490,7 @@ const _sfc_main = {
|
||||
const currentDay = String(now.getDate()).padStart(2, "0");
|
||||
const dateStr = `${currentYear}-${currentMonth}-${currentDay}`;
|
||||
if (!/^\d{4}-\d{2}-\d{2}$/.test(dateStr)) {
|
||||
common_vendor.index.__f__("error", "at pages/ztfx/ztfx.vue:749", "日期格式错误,请传入 YYYY-MM-DD 格式的日期");
|
||||
common_vendor.index.__f__("error", "at pages/ztfx/ztfx.vue:763", "日期格式错误,请传入 YYYY-MM-DD 格式的日期");
|
||||
return "";
|
||||
}
|
||||
const [year, month, day] = dateStr.split("-").map(Number);
|
||||
@@ -496,7 +510,7 @@ const _sfc_main = {
|
||||
const formattedDate = this.selectedFullDate;
|
||||
const baseURL = request_http.getBaseURL1();
|
||||
const requestUrl = `${baseURL}/data/zt/daily/${formattedDate}.json?t=${timestamp}`;
|
||||
common_vendor.index.__f__("log", "at pages/ztfx/ztfx.vue:782", "请求URL:", requestUrl);
|
||||
common_vendor.index.__f__("log", "at pages/ztfx/ztfx.vue:796", "请求URL:", requestUrl);
|
||||
const res = await common_vendor.index.request({
|
||||
url: requestUrl,
|
||||
method: "GET"
|
||||
@@ -535,7 +549,7 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/ztfx/ztfx.vue:832", "请求异常:", error);
|
||||
common_vendor.index.__f__("error", "at pages/ztfx/ztfx.vue:846", "请求异常:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "网络异常",
|
||||
icon: "none"
|
||||
@@ -585,18 +599,18 @@ const _sfc_main = {
|
||||
];
|
||||
if (this.$refs.chartRef) {
|
||||
const Piechart = await this.$refs.chartRef.init(echarts);
|
||||
common_vendor.index.__f__("log", "at pages/ztfx/ztfx.vue:893", "Piechart实例创建成功", Piechart);
|
||||
common_vendor.index.__f__("log", "at pages/ztfx/ztfx.vue:907", "Piechart实例创建成功", Piechart);
|
||||
Piechart.setOption(this.pieOption);
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/ztfx/ztfx.vue:897", "饼图初始化失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/ztfx/ztfx.vue:911", "饼图初始化失败:", error);
|
||||
}
|
||||
},
|
||||
// 初始化词云
|
||||
initWordCloud() {
|
||||
if (this.originData.word_freq_data && Array.isArray(this.originData.word_freq_data)) {
|
||||
this.wordData = this.originData.word_freq_data;
|
||||
common_vendor.index.__f__("log", "at pages/ztfx/ztfx.vue:906", "词云数据赋值完成", this.wordData);
|
||||
common_vendor.index.__f__("log", "at pages/ztfx/ztfx.vue:920", "词云数据赋值完成", this.wordData);
|
||||
} else {
|
||||
this.wordData = [{
|
||||
name: "脑机",
|
||||
@@ -606,10 +620,13 @@ const _sfc_main = {
|
||||
value: 3428
|
||||
}];
|
||||
}
|
||||
setTimeout(() => {
|
||||
common_vendor.index.hideLoading();
|
||||
}, 2e3);
|
||||
},
|
||||
handleDateChange(data) {
|
||||
var _a, _b, _c, _d;
|
||||
common_vendor.index.__f__("log", "at pages/ztfx/ztfx.vue:924", "从日历组件接收的参数:", {
|
||||
common_vendor.index.__f__("log", "at pages/ztfx/ztfx.vue:940", "从日历组件接收的参数:", {
|
||||
currentZtCount: (_a = data.item) == null ? void 0 : _a.zt_count,
|
||||
prevZtCount: (_b = data.prevItem) == null ? void 0 : _b.zt_count
|
||||
});
|
||||
@@ -647,7 +664,7 @@ const _sfc_main = {
|
||||
const prevDay = String(selectedDate.getDate()).padStart(2, "0");
|
||||
const prevDateFormatted = `${prevYear}${prevMonth}${prevDay}`;
|
||||
this.selectedFullDate = prevDateFormatted;
|
||||
common_vendor.index.__f__("log", "at pages/ztfx/ztfx.vue:982", `选中日期为当天(${todayFormatted}),已自动调整为前一天:`, prevDateFormatted);
|
||||
common_vendor.index.__f__("log", "at pages/ztfx/ztfx.vue:998", `选中日期为当天(${todayFormatted}),已自动调整为前一天:`, prevDateFormatted);
|
||||
}
|
||||
}
|
||||
this.fetchData();
|
||||
@@ -716,7 +733,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
a: common_vendor.t(item.title),
|
||||
b: common_vendor.t(item.count),
|
||||
c: index,
|
||||
d: item.bgColor
|
||||
d: item.bgColor,
|
||||
e: common_vendor.o(($event) => $options.bkydAction(index), index)
|
||||
};
|
||||
}),
|
||||
k: common_vendor.f($data.bkTypes, (item, index, i0) => {
|
||||
@@ -731,18 +749,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
l: common_vendor.sr("chartRef", "06b829a4-2"),
|
||||
m: $data.activeType === 0,
|
||||
n: $data.activeType === 1,
|
||||
o: common_vendor.p({
|
||||
o: common_vendor.o($options.onWordCloudRendered),
|
||||
p: common_vendor.p({
|
||||
wordData: $data.wordData,
|
||||
width: 330,
|
||||
height: 330
|
||||
}),
|
||||
p: common_assets._imports_3$8,
|
||||
q: common_vendor.t($data.highPositionStats.total_count),
|
||||
r: common_vendor.t($data.highPositionStats.avg_continuous_days),
|
||||
s: common_vendor.t($data.highPositionStats.max_continuous_days),
|
||||
t: common_vendor.t($data.riskAssessment.level),
|
||||
v: $data.riskAssessment.color,
|
||||
w: common_vendor.f($data.highPositionStockList, (stock, index, i0) => {
|
||||
q: common_assets._imports_3$8,
|
||||
r: common_vendor.t($data.highPositionStats.total_count),
|
||||
s: common_vendor.t($data.highPositionStats.avg_continuous_days),
|
||||
t: common_vendor.t($data.highPositionStats.max_continuous_days),
|
||||
v: common_vendor.t($data.riskAssessment.level),
|
||||
w: $data.riskAssessment.color,
|
||||
x: common_vendor.f($data.highPositionStockList, (stock, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(stock.sname),
|
||||
b: common_vendor.t(stock.risk_info.status),
|
||||
@@ -759,8 +778,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
k: index
|
||||
});
|
||||
}),
|
||||
x: common_assets._imports_5$4,
|
||||
y: common_vendor.s("top:" + $data.contentTop + "px;")
|
||||
y: common_assets._imports_5$4,
|
||||
z: common_vendor.s("top:" + $data.contentTop + "px;")
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
|
||||
Reference in New Issue
Block a user