|
|
|
@ -37,11 +37,23 @@ |
|
|
|
<div class="chart-container"> |
|
|
|
<!-- 左侧数据列表 --> |
|
|
|
<div class="market-data"> |
|
|
|
<div v-if="marksFlag" v-for="market in cashData.markets" :key="market.name" class="market-item"> |
|
|
|
<div |
|
|
|
v-if="marksFlag" |
|
|
|
v-for="market in cashData.markets" |
|
|
|
:key="market.name" |
|
|
|
class="market-item" |
|
|
|
@click="handleMarketClick(market.name)" |
|
|
|
> |
|
|
|
<span class="market-name">{{ market.name }}:</span> |
|
|
|
<span class="market-value">{{ market.value.toLocaleString() }} {{ t('workbench.SGD') }}</span> |
|
|
|
</div> |
|
|
|
<div v-else v-for="item in cashData.markets" :key="item.name" class="market-item"> |
|
|
|
<div |
|
|
|
v-else |
|
|
|
v-for="item in cashData.markets" |
|
|
|
:key="item.name" |
|
|
|
class="market-item" |
|
|
|
@click="handleMarketClick(item.name)" |
|
|
|
> |
|
|
|
<span class="market-name">{{ item.name }}{{ t('workbench.collect') }}:</span> |
|
|
|
<span class="market-value">{{ item.value.toLocaleString() }} {{ item.currencyLabel }}</span> |
|
|
|
|
|
|
|
@ -58,6 +70,7 @@ |
|
|
|
<script setup> |
|
|
|
import * as echarts from 'echarts' |
|
|
|
import { onMounted, ref } from 'vue' |
|
|
|
import { useRouter } from 'vue-router' |
|
|
|
import request from "@/util/http.js"; |
|
|
|
import API from "@/util/http.js"; |
|
|
|
import { Warning, Service } from "@element-plus/icons-vue"; |
|
|
|
@ -65,6 +78,7 @@ import { useI18n } from 'vue-i18n' |
|
|
|
|
|
|
|
const { t } = useI18n() |
|
|
|
|
|
|
|
const router = useRouter() |
|
|
|
|
|
|
|
const chartRef = ref(null) |
|
|
|
let chartInstance = null |
|
|
|
@ -195,6 +209,14 @@ const fetchCashData = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const handleMarketClick = (name) => { |
|
|
|
if (!name) return |
|
|
|
router.push({ |
|
|
|
path: '/moneyManage/financialAccount/cashFlow', |
|
|
|
query: { region: name } |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 标记地区 为 研发部、总部时值为 |
|
|
|
const marksFlag = ref(); |
|
|
|
const loading = ref(true); // 新增加载状态 |
|
|
|
@ -333,6 +355,7 @@ onMounted( async() => { |
|
|
|
overflow: hidden; /* 隐藏溢出内容 */ |
|
|
|
text-overflow: ellipsis; /* 溢出显示省略号 */ |
|
|
|
margin-bottom: 8px; /* 增加项间距,提升可读性 */ |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
|
|
|
|
.market-name { |
|
|
|
|