Bladeren bron

科研无形资产摊销导出

ljb 8 maanden geleden
bovenliggende
commit
25a72f1f3b

+ 75 - 40
src/views/wel/index.vue

@@ -36,25 +36,26 @@
 
       <el-row gutter="20">
         <el-col :span="9">
-        <basic-card title="研发人员情况">
-
-          <div style="position: relative;">
-            <basic-chart
-              style="width: 100%; height: 300px"
-              :options="RD_personOpt"
-            />
-          </div>
-        </basic-card>
+          <basic-card title="研发人员情况">
+            <avue-data-display :option="RD_person_zb_opt"></avue-data-display>
+            <div style="position: relative;">
+              <basic-chart
+                style="width: 100%; height: 300px"
+                :options="RD_personOpt"
+              />
+            </div>
+          </basic-card>
         </el-col>
         <el-col :span="9">
-        <basic-card title="知识产权情况">
-          <div style="position: relative;">
-            <basic-chart
-              style="width: 100%; height: 300px"
-              :options="zscqOpt"
-            />
-          </div>
-        </basic-card>
+          <basic-card title="知识产权情况">
+            <avue-data-display :option="zscqTotalOpt"></avue-data-display>
+            <div style="position: relative;">
+              <basic-chart
+                style="width: 100%; height: 300px"
+                :options="zscqOpt"
+              />
+            </div>
+          </basic-card>
         </el-col>
       </el-row>
 
@@ -101,6 +102,7 @@ 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 Decimal from "decimal.js";
 
 export default {
@@ -120,6 +122,8 @@ export default {
       currYear: "",
       projectTotal: 0,
       costAmount: 0,
+      yfPersonZb: 0, // 研发人员占比
+      zscqTotal: 0,
       
       // 项目情况
       projectStatusOpt: {},
@@ -286,18 +290,47 @@ export default {
         ],
       }
     },
+    RD_person_zb_opt() {
+      return {
+        span: 24,
+        data: [
+          {
+            icon: 'el-icon-view',
+            color: 'rgb(56, 161, 242)',
+            count: this.yfPersonZb,
+            decimals: 2,
+            title: "研发人员占比(%)",
+          },
+        ],
+      }
+    },
+    zscqTotalOpt() {
+      return {
+        span: 24,
+        data: [
+          {
+            icon: 'el-icon-view',
+            color: 'rgb(56, 161, 242)',
+            count: this.zscqTotal,
+            decimals: 0,
+            title: "知识产权总数",
+          },
+        ],
+      }
+    }
   },
   watch: {
     currYear() {
       this.getProjectListByYearFunc();
       this.getCostSummaryListFunc();
       this.getZlListFunc();
+      this.getCyPersonListFunc();
     }
   },
   mounted() {
     // this.initProjectStatusOptions();
-    this.initRdPersonOptions();
-    this.initZscqOptions();
+    // this.initRdPersonOptions();
+    // this.initZscqOptions();
     // this.initYfffChartOptions();
 
   },
@@ -361,29 +394,31 @@ export default {
     },
     // 获取专利数据 
     getZlListFunc() {
-      getZlList().then(({ data }) => {
-        console.log(data)
+      getZlList(1, 99999).then(({ data }) => {
+        let _zscqList = data.data.records;
+        this.zscqTotal = _zscqList.length;
+
+        // 授权数
+        let sqListTotal = _zscqList.filter(item => item.flzt == '授权有效').length;
+
+        this.zscqOpt = this.getPieOptions("", [
+          { value: _zscqList.length - sqListTotal, name: "申请数" },
+          { value: sqListTotal, name: "授权数" },
+        ]);
       });
     },
-    // initProjectStatusOptions() {
-    //   this.projectStatusOpt = this.getPieOptions("", [
-    //     { value: 21, name: "开展中" },
-    //     { value: 3, name: "已结题" },
-    //     { value: 3, name: "项目暂停" },
-    //     { value: 3, name: "项目终止" },
-    //   ]);
-    // },
-    initRdPersonOptions() {
-      this.RD_personOpt = this.getPieOptions("", [
-        { value: 21, name: "全职" },
-        { value: 3, name: "非全职" },
-      ]);
-    },
-    initZscqOptions() {
-      this.zscqOpt = this.getPieOptions("", [
-        { value: 30, name: "申请数" },
-        { value: 29, name: "授权数" },
-      ]);
+    // 获取年度参研人员
+    getCyPersonListFunc() {
+      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);
+        console.log(yfPersonList.length, _personList.length, yfPersonList.length / _personList.length)
+        this.RD_personOpt = this.getPieOptions("", [
+          { value: _personList.filter(item => item.situation == '全职').length, name: "全职" },
+          { value: _personList.filter(item => item.situation == '非全职').length, name: "非全职" },
+        ]);
+      });
     },
     getPieOptions(title, seriesData) {
       let options = {

+ 2 - 2
src/views/yf-cost-manage/yf-cost-statistics/wxzc-cost-statistics/amortize-cost-summary-list.vue

@@ -104,7 +104,7 @@
 
 <script>
 import YearMonthSelect from "@/components/year-month-select";
-import {exportBlob} from "@/api/common";
+import {exportBloByPost} from "@/api/common";
 import {getToken} from "@/util/auth";
 import {downloadXls} from "@/util/util";
 import moment from "moment";
@@ -154,7 +154,7 @@ export default window.$crudCommon({
       return newParams;
     },
     handleExport() {
-      exportBlob(`/api/kd-scientific/ys-wxzctxfy/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
+      exportBloByPost(`/api/kd-scientific/asset/kywxzctxfyfpb/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
         downloadXls(res.data, `${this.pageTitle}.xlsx`);
       });
     },