|
|
@@ -104,8 +104,8 @@ import numStatistics from "./components/num-statistics.vue";
|
|
|
import YearMonthSelect from "@/components/year-month-select";
|
|
|
import { getProjectListByYear } from "@/api/projectManage/projectList";
|
|
|
import { getList as getCostSummaryList } from "@/api/yfCostManage/yfCostStatistics/yfCostSummaryList";
|
|
|
-import { getList as getZlList } from "@/api/achievement/patentAchievement";
|
|
|
import { getList as getCyPersonList } from "@/api/techPerson/cyPersonRoster";
|
|
|
+import { getXmysygjqst, getZl } from "@/api/wel";
|
|
|
import Decimal from "decimal.js";
|
|
|
|
|
|
export default {
|
|
|
@@ -140,93 +140,9 @@ export default {
|
|
|
// 本年度月研发归集趋势图
|
|
|
monthAggregationBarOpt: {},
|
|
|
// 本年度项目预算与归集表
|
|
|
- currYearBudgetOpt: {
|
|
|
- title: {
|
|
|
- text: "本年度",
|
|
|
- left: "13%",
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: "axis",
|
|
|
- axisPointer: {
|
|
|
- type: "shadow",
|
|
|
- },
|
|
|
- },
|
|
|
- legend: {
|
|
|
- left: "center",
|
|
|
- bottom: 0,
|
|
|
- },
|
|
|
- grid: {
|
|
|
- top: "16%",
|
|
|
- left: "8%",
|
|
|
- right: "2%",
|
|
|
- bottom: "13%",
|
|
|
- containLabel: true,
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- type: "value",
|
|
|
- boundaryGap: [0, 0.01],
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- type: "category",
|
|
|
- data: ["项目一", "项目二", "项目三", "项目四", "项目五", "项目六"],
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: "预算",
|
|
|
- type: "bar",
|
|
|
- data: [18203, 23489, 29034, 104970, 131744, 630230],
|
|
|
- },
|
|
|
- {
|
|
|
- name: "归集",
|
|
|
- type: "bar",
|
|
|
- data: [19325, 23438, 31000, 121594, 134141, 681807],
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
+ currYearBudgetOpt: {},
|
|
|
// 全周期项目预算与归集表
|
|
|
- fullCycleBudgetOpt: {
|
|
|
- title: {
|
|
|
- text: "全周期",
|
|
|
- left: "13%",
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: "axis",
|
|
|
- axisPointer: {
|
|
|
- type: "shadow",
|
|
|
- },
|
|
|
- },
|
|
|
- legend: {
|
|
|
- left: "center",
|
|
|
- bottom: 0,
|
|
|
- },
|
|
|
- grid: {
|
|
|
- top: "16%",
|
|
|
- left: "8%",
|
|
|
- right: "2%",
|
|
|
- bottom: "13%",
|
|
|
- containLabel: true,
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- type: "value",
|
|
|
- boundaryGap: [0, 0.01],
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- type: "category",
|
|
|
- data: ["项目一", "项目二", "项目三", "项目四", "项目五", "项目六"],
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: "预算",
|
|
|
- type: "bar",
|
|
|
- data: [18203, 23489, 29034, 104970, 131744, 630230],
|
|
|
- },
|
|
|
- {
|
|
|
- name: "归集",
|
|
|
- type: "bar",
|
|
|
- data: [19325, 23438, 31000, 121594, 134141, 681807],
|
|
|
- },
|
|
|
- ],
|
|
|
- }
|
|
|
+ fullCycleBudgetOpt: {}
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -293,6 +209,8 @@ export default {
|
|
|
this.getCostSummaryListFunc();
|
|
|
this.getZlListFunc();
|
|
|
this.getCyPersonListFunc();
|
|
|
+ this.getXmysygjqstFunc(1);
|
|
|
+ this.getXmysygjqstFunc(0);
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -374,7 +292,7 @@ export default {
|
|
|
this.monthAggregationBarOpt = {
|
|
|
grid: {
|
|
|
top: "6%",
|
|
|
- left: "5%",
|
|
|
+ left: "3%",
|
|
|
right: "3%",
|
|
|
bottom: "1%",
|
|
|
},
|
|
|
@@ -414,17 +332,15 @@ export default {
|
|
|
},
|
|
|
// 获取专利数据
|
|
|
getZlListFunc() {
|
|
|
- getZlList(1, 99999).then(({ data }) => {
|
|
|
- let _zscqList = data.data.records;
|
|
|
- this.zscqTotal = _zscqList.length;
|
|
|
+ getZl({ year: this.currYear }).then(({ data }) => {
|
|
|
+ if (data.code == 200) {
|
|
|
+ this.zscqTotal = data.data.total;
|
|
|
|
|
|
- // 授权数
|
|
|
- let sqListTotal = _zscqList.filter(item => item.flzt == '授权有效').length;
|
|
|
-
|
|
|
- this.zscqOpt = this.getPieOptions("", [
|
|
|
- { value: _zscqList.length - sqListTotal, name: "申请数" },
|
|
|
- { value: sqListTotal, name: "授权数" },
|
|
|
- ]);
|
|
|
+ this.zscqOpt = this.getPieOptions("", [
|
|
|
+ { value: data.data.shenqingshu, name: "申请数" },
|
|
|
+ { value: data.data.shouquanshu, name: "授权数" },
|
|
|
+ ]);
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
// 获取年度参研人员
|
|
|
@@ -432,7 +348,14 @@ export default {
|
|
|
getCyPersonList(1, 99999, { yearAndMonth: this.currYear }).then(({ data }) => {
|
|
|
let _personList = data.data.records;
|
|
|
let yfPersonList = _personList.filter(item => item.personnelType == '研发人员');
|
|
|
- this.yfPersonZb = ((yfPersonList.length / _personList.length) * 100).toFixed(2);
|
|
|
+
|
|
|
+ if (_personList.length) {
|
|
|
+ this.yfPersonZb = ((yfPersonList.length / _personList.length) * 100).toFixed(2);
|
|
|
+ } else {
|
|
|
+ this.yfPersonZb = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log(_personList, yfPersonList)
|
|
|
|
|
|
this.RD_personOpt = this.getPieOptions("", [
|
|
|
{ value: _personList.filter(item => item.situation == '全职').length, name: "全职" },
|
|
|
@@ -440,6 +363,65 @@ export default {
|
|
|
]);
|
|
|
});
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 项目预算与归集趋势图
|
|
|
+ * @param currentYear 1:本年度、 0:全周期
|
|
|
+ */
|
|
|
+ getXmysygjqstFunc(currentYear) {
|
|
|
+ getXmysygjqst({ year: this.currYear, currentYear }).then(({ data }) => {
|
|
|
+ console.log(data)
|
|
|
+ let xmList = [], ysList = [], costList = [];
|
|
|
+ data.data.forEach(item => {
|
|
|
+ xmList.push(item.XMMC);
|
|
|
+ ysList.push(item.xmys);
|
|
|
+ costList.push(Number(item.cost).toFixed(2));
|
|
|
+ });
|
|
|
+ let _thisKey = currentYear == 1 ? 'currYearBudgetOpt' : 'fullCycleBudgetOpt';
|
|
|
+ this[_thisKey] = {
|
|
|
+ title: {
|
|
|
+ text: currentYear == 1 ? '本年度' : '全周期',
|
|
|
+ left: "13%",
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: "axis",
|
|
|
+ axisPointer: {
|
|
|
+ type: "shadow",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ left: "center",
|
|
|
+ bottom: 0,
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ top: "16%",
|
|
|
+ left: "8%",
|
|
|
+ right: "2%",
|
|
|
+ bottom: "13%",
|
|
|
+ containLabel: true,
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: "value",
|
|
|
+ boundaryGap: [0, 0.01],
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: "category",
|
|
|
+ data: xmList,
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: "预算",
|
|
|
+ type: "bar",
|
|
|
+ data: ysList,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "归集",
|
|
|
+ type: "bar",
|
|
|
+ data: costList,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ })
|
|
|
+ },
|
|
|
getPieOptions(title, seriesData) {
|
|
|
let options = {
|
|
|
title: {
|