Browse Source

夺宝奇兵大模型marketList全市场参数;股市温度计日历新增指数判断;能量转化器y轴字体样式修改;

dev
宋杰 1 day ago
parent
commit
71e68b5df1
  1. 4
      src/views/AIchat.vue
  2. 3
      src/views/AiEmotion.vue
  3. 19
      src/views/components/emoEnergyConverter.vue
  4. 92
      src/views/components/marketTemperature.vue

4
src/views/AIchat.vue

@ -779,7 +779,7 @@ watch(
spaceForecastPrivilegeState: 1, spaceForecastPrivilegeState: 1,
aibullPrivilegeState: 1, aibullPrivilegeState: 1,
aigoldBullPrivilegeState: 1, aigoldBullPrivilegeState: 1,
airadarPrivilegeState: 1,
airadarPrivilegeState: 1,
// marketList: 1, // marketList: 1,
// brainPrivilegeState: userStore.brainPerssion, // brainPrivilegeState: userStore.brainPerssion,
// swordPrivilegeState: userStore.swordPerssion, // swordPrivilegeState: userStore.swordPerssion,
@ -788,7 +788,7 @@ watch(
// aibullPrivilegeState: userStore.aibullPerssion, // aibullPrivilegeState: userStore.aibullPerssion,
// aigoldBullPrivilegeState: userStore.aiGnbullPerssion, // aigoldBullPrivilegeState: userStore.aiGnbullPerssion,
// airadarPrivilegeState: userStore.airadarPerssion, // airadarPrivilegeState: userStore.airadarPerssion,
marketList: userStore.aiGoldMarketList,
marketList: 'usa,sg,my,hk,cn,can,vi,th,in,gb',
}); });
// 访null // 访null

3
src/views/AiEmotion.vue

@ -62,7 +62,7 @@
<div class="div02">市场温度{{ data1 }}</div> <div class="div02">市场温度{{ data1 }}</div>
</div> </div>
</div> </div>
<marketTemperature ref="marketTemperatureRef" />
<marketTemperature ref="marketTemperatureRef" :companyName="stockName" :stockCode="stockCode" />
</div> </div>
</div> </div>
<div class="class0301" v-if="chartVisibility.emotionDecod"> <div class="class0301" v-if="chartVisibility.emotionDecod">
@ -311,6 +311,7 @@ const showBackToTop = ref(false);
// - store // - store
const currentStock = computed(() => emotionStore.activeStock); const currentStock = computed(() => emotionStore.activeStock);
const stockName = computed(() => currentStock.value?.stockInfo.name || ""); const stockName = computed(() => currentStock.value?.stockInfo.name || "");
const stockCode = computed(() => currentStock.value?.stockInfo.code || currentStock.value?.stockInfo.symbol || "");
const displayDate = computed(() => { const displayDate = computed(() => {
if (!currentStock.value?.apiData) return ""; if (!currentStock.value?.apiData) return "";
const lastData = currentStock.value.apiData.GSWDJ?.at(-1); const lastData = currentStock.value.apiData.GSWDJ?.at(-1);

19
src/views/components/emoEnergyConverter.vue

@ -52,7 +52,7 @@ const generateGraphics = (min, max) => {
if (isFullyVisible || isPartiallyVisible) { if (isFullyVisible || isPartiallyVisible) {
graphics.push({ graphics.push({
type: "text", type: "text",
left: '10%',
left: '13%',
top: getNameTop(min, max, safeY), top: getNameTop(min, max, safeY),
style: { style: {
text: region.name, text: region.name,
@ -67,13 +67,14 @@ const generateGraphics = (min, max) => {
if (isFullyVisible) { if (isFullyVisible) {
graphics.push({ graphics.push({
type: "text", type: "text",
left: '5%', //
left: '13%', //
top: getNumberTop(min, max, region.max), top: getNumberTop(min, max, region.max),
// top: 100, // top: 100,
style: { style: {
text: region.max.toString(), text: region.max.toString(),
fill: region.NumberColor, fill: region.NumberColor,
fontSize: 12, fontSize: 12,
fontWeight: "bold",
}, },
z: 3, z: 3,
}); });
@ -109,7 +110,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
max: qxnlzhqData.zc, max: qxnlzhqData.zc,
name: "【情绪冰点区】", name: "【情绪冰点区】",
color: "#FF9F9F", color: "#FF9F9F",
fontColor: '#666666',
fontColor: '#2D2D89',
NumberColor: 'white', NumberColor: 'white',
}, },
{ {
@ -117,7 +118,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
max: qxnlzhqData.ht, max: qxnlzhqData.ht,
name: "【认知潜伏区】", name: "【认知潜伏区】",
color: "#FFCB75", color: "#FFCB75",
fontColor: '#666666',
fontColor: '#2D2D89',
NumberColor: 'white', NumberColor: 'white',
}, },
{ {
@ -125,7 +126,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
max: qxnlzhqData.qs, max: qxnlzhqData.qs,
name: "【多空消化区】", name: "【多空消化区】",
color: "#D7E95D", color: "#D7E95D",
fontColor: '#666666',
fontColor: '#2D2D89',
NumberColor: 'white', NumberColor: 'white',
}, },
{ {
@ -133,7 +134,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
max: qxnlzhqData.tp, max: qxnlzhqData.tp,
name: "【共识加速区】", name: "【共识加速区】",
color: "#A0F56F", color: "#A0F56F",
fontColor: '#666666',
fontColor: '#2D2D89',
NumberColor: 'white', NumberColor: 'white',
}, },
{ {
@ -141,7 +142,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
max: qxnlzhqData.js, max: qxnlzhqData.js,
name: "【情绪临界区】", name: "【情绪临界区】",
color: "#87F3CD", color: "#87F3CD",
fontColor: '#666666',
fontColor: '#2D2D89',
NumberColor: 'white', NumberColor: 'white',
}, },
]; ];
@ -153,7 +154,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
max: qxnlzhqData.yl, max: qxnlzhqData.yl,
name: "【杠杆失衡区】", name: "【杠杆失衡区】",
color: "#51C3F9", color: "#51C3F9",
fontColor: '#666666',
fontColor: '#2D2D89',
NumberColor: 'white', NumberColor: 'white',
}, },
) )
@ -165,7 +166,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
max: qxnlzhqData.gg, max: qxnlzhqData.gg,
name: "【情绪熔断区】", name: "【情绪熔断区】",
color: "#D0A7FF", color: "#D0A7FF",
fontColor: '#666666',
fontColor: '#2D2D89',
NumberColor: 'white', NumberColor: 'white',
}, },
) )

92
src/views/components/marketTemperature.vue

@ -4,10 +4,10 @@
<div class="border3"> <div class="border3">
<section class="chart-section"> <section class="chart-section">
<div> <div>
<div class="trapezoid">
<!-- <div class="trapezoid">
<span>{{ companyName }}</span> <span>{{ companyName }}</span>
<span>{{ stockCode }}</span> <span>{{ stockCode }}</span>
</div>
</div> -->
<div ref="KlineCanvs" class="KlineClass"></div> <div ref="KlineCanvs" class="KlineClass"></div>
</div> </div>
</section> </section>
@ -28,31 +28,18 @@
</div> </div>
<div class="calendar"> <div class="calendar">
<div v-for="row in 5" :key="row" class="calendarCol"> <div v-for="row in 5" :key="row" class="calendarCol">
<div
v-for="item in currentData.slice((row - 1) * 7, row * 7)"
:key="item"
class="calendarRow"
>
<div
class="calendarItem"
:style="{ backgroundColor: item.color }"
>
<div v-for="item in currentData.slice((row - 1) * 7, row * 7)" :key="item" class="calendarRow">
<div class="calendarItem" :style="{ backgroundColor: item.color }">
<div v-if="item.month" class="month"> <div v-if="item.month" class="month">
<div class="monthContent"> <div class="monthContent">
{{ months[item.month - 1] }} {{ months[item.month - 1] }}
</div> </div>
</div> </div>
<div class="calendarItemTitle">{{ item.day }}</div> <div class="calendarItemTitle">{{ item.day }}</div>
<div
class="calendarItemContent"
v-if="item.stock_temperature == ''"
>
<div class="calendarItemContent" v-if="item.stock_temperature == ''">
<img :src="suoding" alt="锁定" class="ciImg" /> <img :src="suoding" alt="锁定" class="ciImg" />
</div> </div>
<div
class="calendarItemContent"
v-else-if="item.stock_temperature == '休市'"
>
<div class="calendarItemContent" v-else-if="item.stock_temperature == '休市'">
休市 休市
</div> </div>
<div class="calendarItemContent" v-else> <div class="calendarItemContent" v-else>
@ -84,9 +71,9 @@
{{ getDayData(rowIndex, colIndex + 1).market_temperature }} {{ getDayData(rowIndex, colIndex + 1).market_temperature }}
</span> </span>
</template> </template>
<template v-else>
<template v-else>
<template v-if="isBothRest(rowIndex, colIndex + 1)">休市</template> <template v-if="isBothRest(rowIndex, colIndex + 1)">休市</template>
<template v-else>
<template v-else>
<span v-if="getDayData(rowIndex, colIndex + 1).stock_temperature"> <span v-if="getDayData(rowIndex, colIndex + 1).stock_temperature">
{{ getDayData(rowIndex, colIndex + 1).stock_temperature }} {{ getDayData(rowIndex, colIndex + 1).stock_temperature }}
</span> </span>
@ -95,15 +82,15 @@
{{ getDayData(rowIndex, colIndex + 1).market_temperature }} {{ getDayData(rowIndex, colIndex + 1).market_temperature }}
</span> </span>
</template> </template>
</template>
</p>
</div>
<div v-else-if="shouldShowRest(rowIndex, colIndex + 1)">
<p class="WDRL_date">休市</p>
</div>
</template>
</el-table-column>
</el-table> -->
</template>
</p>
</div>
<div v-else-if="shouldShowRest(rowIndex, colIndex + 1)">
<p class="WDRL_date">休市</p>
</div>
</template>
</el-table-column>
</el-table> -->
</div> </div>
</div> </div>
</div> </div>
@ -182,7 +169,7 @@ const indexCodes = [
"I63", "I63",
"VNINDE", "VNINDE",
]; ];
const isIndexCode = computed(() => indexCodes.includes(props.code));
const isIndexCode = computed(() => indexCodes.includes(props.stockCode));
const currentData = ref([]); const currentData = ref([]);
const fetchCalendarData = () => { const fetchCalendarData = () => {
@ -341,6 +328,7 @@ function initChart(raw, klineDataRawValue, WDRLValue) {
); );
return; return;
} }
console.log(props)
// //
if (chartInstance) { if (chartInstance) {
@ -394,10 +382,10 @@ function initChart(raw, klineDataRawValue, WDRLValue) {
const chartHeight = size.viewSize[1]; const chartHeight = size.viewSize[1];
const tooltipWidth = size.contentSize[0]; const tooltipWidth = size.contentSize[0];
const tooltipHeight = size.contentSize[1]; const tooltipHeight = size.contentSize[1];
// //
const isMobile = window.innerWidth <= 768; const isMobile = window.innerWidth <= 768;
if (isMobile) { if (isMobile) {
// //
return { return {
@ -408,17 +396,17 @@ function initChart(raw, klineDataRawValue, WDRLValue) {
// //
let x = point[0]; let x = point[0];
let y = point[1]; let y = point[1];
// tooltip // tooltip
if (x + tooltipWidth > chartWidth) { if (x + tooltipWidth > chartWidth) {
x = chartWidth - tooltipWidth - 10; x = chartWidth - tooltipWidth - 10;
} }
// tooltip // tooltip
if (y + tooltipHeight > chartHeight) { if (y + tooltipHeight > chartHeight) {
y = chartHeight - tooltipHeight - 10; y = chartHeight - tooltipHeight - 10;
} }
return [Math.max(10, x), Math.max(10, y)]; return [Math.max(10, x), Math.max(10, y)];
} }
}, },
@ -443,8 +431,8 @@ function initChart(raw, klineDataRawValue, WDRLValue) {
color: '#fff', color: '#fff',
fontSize: window.innerWidth <= 768 ? 10 : 12 // 使 fontSize: window.innerWidth <= 768 ? 10 : 12 // 使
}, },
extraCssText: window.innerWidth <= 768 ?
'max-width: 280px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);' :
extraCssText: window.innerWidth <= 768 ?
'max-width: 280px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);' :
'max-width: 350px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);', 'max-width: 350px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);',
formatter: function (params) { formatter: function (params) {
if (params && params.length > 0) { if (params && params.length > 0) {
@ -452,16 +440,16 @@ function initChart(raw, klineDataRawValue, WDRLValue) {
const fontSize = isMobile ? '10px' : '12px'; const fontSize = isMobile ? '10px' : '12px';
const lineHeight = isMobile ? '1.3' : '1.5'; const lineHeight = isMobile ? '1.3' : '1.5';
const marginBottom = isMobile ? '4px' : '6px'; const marginBottom = isMobile ? '4px' : '6px';
let result = `<div style="font-weight: bold; color: #fff; margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">日期: ${params[0].name}</div>`; let result = `<div style="font-weight: bold; color: #fff; margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">日期: ${params[0].name}</div>`;
params.forEach((param) => { params.forEach((param) => {
if (param.seriesType === "candlestick") { if (param.seriesType === "candlestick") {
const open = param.data[1]; const open = param.data[1];
const close = param.data[2]; const close = param.data[2];
const low = param.data[3]; const low = param.data[3];
const high = param.data[4]; const high = param.data[4];
if (isMobile) { if (isMobile) {
// //
result += `<div style="margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">`; result += `<div style="margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">`;
@ -535,7 +523,7 @@ function initChart(raw, klineDataRawValue, WDRLValue) {
color: "#FFFFFF", color: "#FFFFFF",
fontSize: window.innerWidth <= 768 ? 10 : 12, // 使 fontSize: window.innerWidth <= 768 ? 10 : 12, // 使
fontWeight: "bold", fontWeight: "bold",
formatter: function(value) {
formatter: function (value) {
// //
return value.toString(); return value.toString();
}, },
@ -792,10 +780,10 @@ defineExpose({ initChart });
/* padding: 20px; */ /* padding: 20px; */
max-width: 80vw; max-width: 80vw;
padding-bottom: 10%; padding-bottom: 10%;
display:flex;
flex-direction:column;
justify-content:center;
align-items:center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
} }
.border3 { .border3 {
@ -837,8 +825,8 @@ defineExpose({ initChart });
/* 手机端适配样式 */ /* 手机端适配样式 */
@media only screen and (max-width: 768px) { @media only screen and (max-width: 768px) {
.container{
padding-bottom:16%
.container {
padding-bottom: 16%
} }
.KlineClass { .KlineClass {
@ -969,7 +957,8 @@ defineExpose({ initChart });
left: -2.5px; left: -2.5px;
width: 20px; width: 20px;
height: 20px; height: 20px;
border-top: 3px solid #00ffff; /* 左上角颜色 */
border-top: 3px solid #00ffff;
/* 左上角颜色 */
border-left: 3px solid #00ffff; border-left: 3px solid #00ffff;
border-top-left-radius: 8px; border-top-left-radius: 8px;
} }
@ -981,7 +970,8 @@ defineExpose({ initChart });
right: -2px; right: -2px;
width: 20px; width: 20px;
height: 20px; height: 20px;
border-bottom: 3px solid #00ffff; /* 右下角颜色 */
border-bottom: 3px solid #00ffff;
/* 右下角颜色 */
border-right: 3px solid #00ffff; border-right: 3px solid #00ffff;
border-bottom-right-radius: 8px; border-bottom-right-radius: 8px;
} }
@ -993,6 +983,7 @@ defineExpose({ initChart });
font-style: normal; font-style: normal;
font-display: swap; font-display: swap;
} }
.title { .title {
width: 100%; width: 100%;
margin-bottom: 0px; margin-bottom: 0px;
@ -1056,6 +1047,7 @@ defineExpose({ initChart });
width: 13.5%; width: 13.5%;
height: 100%; height: 100%;
} }
.calendarItem { .calendarItem {
border: 1px solid #0060af; border: 1px solid #0060af;
width: 100%; width: 100%;

Loading…
Cancel
Save