dongqian 4 weeks ago
parent
commit
7a20126775
  1. BIN
      src/assets/img/AiEmotion/解码器.png
  2. 24
      src/views/AiEmotion.vue

BIN
src/assets/img/AiEmotion/解码器.png

After

Width: 154  |  Height: 138  |  Size: 33 KiB

24
src/views/AiEmotion.vue

@ -36,6 +36,8 @@
<img src="@/assets/img/AiEmotion/L2.png" alt="情绪解码">
<!-- 情绪解码器图表 -->
<div class="class04">
<span class="class0401">
</span>
<emotionDecod ref="emotionDecodRef"></emotionDecod>
</div>
<img src="@/assets/img/AiEmotion/L3.png" alt="情绪推演">
@ -67,7 +69,7 @@ import { getReplyAPI } from '@/api/AiEmotionApi.js'; // 导入工作流接口方
import axios from 'axios';
import emotionDecod from '@/views/components/emotionDecod.vue'; //
import emotionalBottomRadar from '@/views/components/emotionalBottomRadar.vue'; //
import emoEnergyConverter from '@/views/components/emotionalBottomRadar.vue'; //
import emoEnergyConverter from '@/views/components/emoEnergyConverter.vue'; //
const emoEnergyConverterRef = ref(null)
@ -169,6 +171,10 @@ async function fetchData(code, market) {
sender: 'ai',
text: `股票数据已成功获取: ${JSON.stringify(stockDataResponse.data)}`,
});
console.log('1111111111111111111111')
//
renderCharts(stockDataResponse.data);
console.log('2222222222222222222222')
} else {
console.error('图表数据接口返回数据不完整');
messages.value.push({
@ -190,7 +196,11 @@ function renderCharts(data) {
nextTick(() => {
//
if (emoEnergyConverterRef.value && data.QXNLZHQ) {
console.log('开始渲染情绪能量转化器图表');
console.log('KLine20:', data.KLine20);
console.log('QXNLZHQ:', data.QXNLZHQ);
emoEnergyConverterRef.value.initQXNLZHEcharts(data.KLine20, data.QXNLZHQ);
console.log('情绪能量转化器图表已渲染');
}
//
@ -207,6 +217,18 @@ function renderCharts(data) {
</script>
<style scoped>
.class0401 {
background-image: url('@/assets/img/AiEmotion/解码器.png'); /* 设置背景图片 */
background-size: contain; /* 背景图片覆盖整个容器 */
background-repeat: no-repeat; /* 防止背景图片重复 */
width: 100%; /* 设置容器宽度 */
height: 300px; /* 设置容器高度,确保图片显示完整 */
display: flex; /* 使用 flex 布局 */
justify-content: flex-start; /* 容器内容居左 */
align-items: center; /* 垂直居中内容 */
display: inline-block;
}
.class08 {
background-image: url('@/assets/img/AiEmotion/tree.png');
/* 使用导入的背景图片 */

Loading…
Cancel
Save