fix : 修复研发投入资金年份筛选时chart没渲染的bug
This commit is contained in:
@@ -187,7 +187,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
|
<el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
|
||||||
<div class="right bottom">
|
<div class="right bottom">
|
||||||
<div class="right-top ">
|
<div class="right-top " style="position:relative;">
|
||||||
<div class="title-block">
|
<div class="title-block">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="tag"></div>
|
<div class="tag"></div>
|
||||||
@@ -200,7 +200,18 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="moneyData&&moneyData.length==0" style="margin-top: 15px">
|
<div style="position:absolute;top: 65px;right: 20px;z-index: 99">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="researchFundYear"
|
||||||
|
type="year"
|
||||||
|
placeholder="年份"
|
||||||
|
style="width: 80px"
|
||||||
|
value-format="YYYY"
|
||||||
|
size="small"
|
||||||
|
@change="changeResearchFundDataByYear"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div v-if="moneyData&&moneyData.length==0" style="margin-top: 30px">
|
||||||
<el-empty image-size="135" description="暂无研发投入资金信息~"/>
|
<el-empty image-size="135" description="暂无研发投入资金信息~"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="money-block" v-else>
|
<div class="money-block" v-else>
|
||||||
@@ -208,19 +219,7 @@
|
|||||||
<div id="moneyPie" ref="moneyPie"></div>
|
<div id="moneyPie" ref="moneyPie"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="legend-block">
|
<div class="legend-block">
|
||||||
<div style="position:absolute;top: 15px;right: 20px">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="researchFundYear"
|
|
||||||
type="year"
|
|
||||||
placeholder="年份"
|
|
||||||
style="width: 80px"
|
|
||||||
value-format="YYYY"
|
|
||||||
size="small"
|
|
||||||
@change="changeResearchFundDataByYear"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="total-money">总资金:{{ toThousands(totalMoney) }}</div>
|
<div class="total-money">总资金:{{ toThousands(totalMoney) }}</div>
|
||||||
|
|
||||||
<div v-for="(item,index) in moneyData" class="legend">
|
<div v-for="(item,index) in moneyData" class="legend">
|
||||||
<div style="display: flex;align-items: center">
|
<div style="display: flex;align-items: center">
|
||||||
<div class="money-dot" :style="{'background-color': moneyColorList[index]}"></div>
|
<div class="money-dot" :style="{'background-color': moneyColorList[index]}"></div>
|
||||||
@@ -317,7 +316,7 @@ import {getArticle} from "@/api/article";
|
|||||||
const AuthStore = useAuthStore()
|
const AuthStore = useAuthStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const topLeftHeight = ref('')
|
const topLeftHeight = ref('')
|
||||||
const researchFundYear = ref('2024')
|
const researchFundYear = ref(new Date().getFullYear()+'')
|
||||||
const activeName = ref('first')
|
const activeName = ref('first')
|
||||||
const docActiveTab = ref('first')
|
const docActiveTab = ref('first')
|
||||||
const totalMoney = ref('45000')
|
const totalMoney = ref('45000')
|
||||||
@@ -620,6 +619,7 @@ const getDoneList = () => {
|
|||||||
const changeResearchFundDataByYear=(year)=>{
|
const changeResearchFundDataByYear=(year)=>{
|
||||||
if(year){
|
if(year){
|
||||||
getResearchChart(year)
|
getResearchChart(year)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const getResearchChart = (year) => {
|
const getResearchChart = (year) => {
|
||||||
@@ -628,9 +628,12 @@ const getResearchChart = (year) => {
|
|||||||
totalMoney.value = res.data.totalAmount
|
totalMoney.value = res.data.totalAmount
|
||||||
moneyData.value = res.data.rdCompanyList
|
moneyData.value = res.data.rdCompanyList
|
||||||
if(res.data.rdCompanyList?.length ==0)return;
|
if(res.data.rdCompanyList?.length ==0)return;
|
||||||
|
|
||||||
if (moneyPieOption.value.series && moneyPieOption.value.series?.length > 0) {
|
if (moneyPieOption.value.series && moneyPieOption.value.series?.length > 0) {
|
||||||
moneyPieOption.value.series[0].data = res.data.rdCompanyList
|
moneyPieOption.value.series[0].data = res.data.rdCompanyList
|
||||||
initMoneyCharts()
|
nextTick(() => {
|
||||||
|
initMoneyCharts()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
|
|||||||
Reference in New Issue
Block a user