|
|
@@ -16,6 +16,7 @@
|
|
|
<avue-data-display :option="projectTotalOpt"></avue-data-display>
|
|
|
<div style="position: relative;">
|
|
|
<basic-chart
|
|
|
+ ref="projectStatusChart"
|
|
|
style="width: 100%; height: 300px"
|
|
|
:options="projectStatusOpt"
|
|
|
/>
|
|
|
@@ -27,6 +28,7 @@
|
|
|
<avue-data-display :option="RD_costOpt"></avue-data-display>
|
|
|
<div style="position: relative;">
|
|
|
<basic-chart
|
|
|
+ ref="yffyPieChart"
|
|
|
style="width: 100%; height: 300px"
|
|
|
:options="yffyPieOptions"
|
|
|
/>
|
|
|
@@ -43,6 +45,7 @@
|
|
|
<avue-data-display :option="RD_person_zb_opt"></avue-data-display>
|
|
|
<div style="position: relative;">
|
|
|
<basic-chart
|
|
|
+ ref="RD_personChart"
|
|
|
style="width: 100%; height: 300px"
|
|
|
:options="RD_personOpt"
|
|
|
/>
|
|
|
@@ -54,6 +57,7 @@
|
|
|
<avue-data-display :option="zscqTotalOpt"></avue-data-display>
|
|
|
<div style="position: relative;">
|
|
|
<basic-chart
|
|
|
+ ref="zscqChart"
|
|
|
style="width: 100%; height: 300px"
|
|
|
:options="zscqOpt"
|
|
|
/>
|
|
|
@@ -68,6 +72,7 @@
|
|
|
<el-row style="margin-top: 10px">
|
|
|
<el-col :span="24">
|
|
|
<basic-chart
|
|
|
+ ref="monthAggChart"
|
|
|
style="width: 100%; height: 300px"
|
|
|
:options="monthAggregationBarOpt"
|
|
|
/>
|
|
|
@@ -81,12 +86,14 @@
|
|
|
<el-row v-if="xmList.length">
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
|
|
<basic-chart
|
|
|
+ ref="currYearBudgetChart"
|
|
|
style="width: 100%; height: 300px"
|
|
|
:options="currYearBudgetOpt"
|
|
|
/>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
|
|
<basic-chart
|
|
|
+ ref="fullCycleBudgetChart"
|
|
|
style="width: 100%; height: 300px"
|
|
|
:options="fullCycleBudgetOpt"
|
|
|
/>
|
|
|
@@ -110,6 +117,7 @@ import { getList as getCyPersonList } from "@/api/techPerson/cyPersonRoster";
|
|
|
import { getXmysygjqst, getZl } from "@/api/wel";
|
|
|
import Decimal from "decimal.js";
|
|
|
import { mapGetters } from "vuex";
|
|
|
+import { getEnterpriseInfo } from "@/api/basicResource/compInfoSetting";
|
|
|
|
|
|
export default {
|
|
|
name: "home",
|
|
|
@@ -223,6 +231,13 @@ export default {
|
|
|
if (this.pageYear && this.currYear && this.currYear != this.pageYear) {
|
|
|
this.currYear = this.pageYear;
|
|
|
}
|
|
|
+ this.$refs.projectStatusChart.handleResize()
|
|
|
+ this.$refs.yffyPieChart.handleResize()
|
|
|
+ this.$refs.RD_personChart.handleResize()
|
|
|
+ this.$refs.zscqChart.handleResize()
|
|
|
+ this.$refs.monthAggChart.handleResize()
|
|
|
+ this.$refs.currYearBudgetChart.handleResize()
|
|
|
+ this.$refs.fullCycleBudgetChart.handleResize()
|
|
|
},
|
|
|
methods: {
|
|
|
handleSearchBtn() {
|
|
|
@@ -358,12 +373,18 @@ export default {
|
|
|
},
|
|
|
// 获取年度参研人员
|
|
|
getCyPersonListFunc() {
|
|
|
- getCyPersonList(1, 99999, { yearAndMonth: this.currYear }).then(({ data }) => {
|
|
|
- let _personList = data.data.records;
|
|
|
- let yfPersonList = _personList.filter(item => item.personnelType == '研发人员');
|
|
|
+ Promise.all([
|
|
|
+ getCyPersonList(1, 99999, { yearAndMonth: this.currYear }),
|
|
|
+ getEnterpriseInfo(this.currYear)
|
|
|
+ ]).then(([res1, res2]) => {
|
|
|
+ let _personList = res1.data.data.records;
|
|
|
+ let zgzs = 0 // 职工总数
|
|
|
+ if (!isNaN(res2.data.data.remark)) {
|
|
|
+ zgzs = res2.data.data.remark
|
|
|
+ }
|
|
|
|
|
|
- if (_personList.length) {
|
|
|
- this.yfPersonZb = ((yfPersonList.length / _personList.length) * 100).toFixed(2);
|
|
|
+ if (_personList.length && zgzs > 0) {
|
|
|
+ this.yfPersonZb = ((_personList.length / zgzs) * 100).toFixed(2);
|
|
|
} else {
|
|
|
this.yfPersonZb = 0;
|
|
|
}
|
|
|
@@ -372,7 +393,7 @@ export default {
|
|
|
{ value: _personList.filter(item => item.situation == '全职').length, name: "全职" },
|
|
|
{ value: _personList.filter(item => item.situation == '非全职').length, name: "非全职" },
|
|
|
]);
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* 项目预算与归集趋势图
|