Merge pull request 'fix : 修复研发投入资金年份筛选时chart没渲染的bug' (#817) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/817
This commit is contained in:
@@ -187,7 +187,7 @@
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
|
||||
<div class="right bottom">
|
||||
<div class="right-top ">
|
||||
<div class="right-top " style="position:relative;">
|
||||
<div class="title-block">
|
||||
<div class="title">
|
||||
<div class="tag"></div>
|
||||
@@ -200,7 +200,18 @@
|
||||
</el-icon>
|
||||
</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="暂无研发投入资金信息~"/>
|
||||
</div>
|
||||
<div class="money-block" v-else>
|
||||
@@ -208,19 +219,7 @@
|
||||
<div id="moneyPie" ref="moneyPie"></div>
|
||||
</div>
|
||||
<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 v-for="(item,index) in moneyData" class="legend">
|
||||
<div style="display: flex;align-items: center">
|
||||
<div class="money-dot" :style="{'background-color': moneyColorList[index]}"></div>
|
||||
@@ -317,7 +316,7 @@ import {getArticle} from "@/api/article";
|
||||
const AuthStore = useAuthStore()
|
||||
const router = useRouter()
|
||||
const topLeftHeight = ref('')
|
||||
const researchFundYear = ref('2024')
|
||||
const researchFundYear = ref(new Date().getFullYear()+'')
|
||||
const activeName = ref('first')
|
||||
const docActiveTab = ref('first')
|
||||
const totalMoney = ref('45000')
|
||||
@@ -620,6 +619,7 @@ const getDoneList = () => {
|
||||
const changeResearchFundDataByYear=(year)=>{
|
||||
if(year){
|
||||
getResearchChart(year)
|
||||
|
||||
}
|
||||
}
|
||||
const getResearchChart = (year) => {
|
||||
@@ -628,9 +628,12 @@ const getResearchChart = (year) => {
|
||||
totalMoney.value = res.data.totalAmount
|
||||
moneyData.value = res.data.rdCompanyList
|
||||
if(res.data.rdCompanyList?.length ==0)return;
|
||||
|
||||
if (moneyPieOption.value.series && moneyPieOption.value.series?.length > 0) {
|
||||
moneyPieOption.value.series[0].data = res.data.rdCompanyList
|
||||
initMoneyCharts()
|
||||
nextTick(() => {
|
||||
initMoneyCharts()
|
||||
})
|
||||
}
|
||||
} else {
|
||||
ElNotification({
|
||||
|
||||
Reference in New Issue
Block a user