Browse Source

科研仪器设备和房屋建筑物设备分配表bug修改

ljb 9 months ago
parent
commit
6779f7b0b2

+ 22 - 0
package-lock.json

@@ -4816,6 +4816,15 @@
         "safer-buffer": "^2.1.0"
       }
     },
+    "echarts": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-6.0.0.tgz",
+      "integrity": "sha512-Tte/grDQRiETQP4xz3iZWSvoHrkCQtwqd6hs+mifXcjrCuo2iKWbajFObuLJVBlDIJlOzgQPd1hsaKt/3+OMkQ==",
+      "requires": {
+        "tslib": "2.3.0",
+        "zrender": "6.0.0"
+      }
+    },
     "ee-first": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -12433,6 +12442,11 @@
       "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==",
       "dev": true
     },
+    "tslib": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+      "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
+    },
     "tty-browserify": {
       "version": "0.0.0",
       "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
@@ -14053,6 +14067,14 @@
           "dev": true
         }
       }
+    },
+    "zrender": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-6.0.0.tgz",
+      "integrity": "sha512-41dFXEEXuJpNecuUQq6JlbybmnHaqqpGlbH1yxnA5V9MMP4SbohSVZsJIwz+zdjQXSSlR1Vc34EgH1zxyTDvhg==",
+      "requires": {
+        "tslib": "2.3.0"
+      }
     }
   }
 }

+ 1 - 0
package.json

@@ -19,6 +19,7 @@
     "classlist-polyfill": "^1.2.0",
     "crypto-js": "^4.0.0",
     "decimal.js": "^10.5.0",
+    "echarts": "^6.0.0",
     "element-ui": "^2.15.6",
     "js-base64": "^2.5.1",
     "js-cookie": "^2.2.0",

+ 50 - 0
src/components/basic-chart/index.vue

@@ -0,0 +1,50 @@
+<template>
+  <div ref="chartContainer"></div>
+</template>
+ 
+<script>
+import * as echarts from 'echarts';
+ 
+export default {
+  name: 'Chart',
+  props: {
+    options: {
+      type: Object,
+      required: true
+    },
+  },
+  data() {
+    return {
+      chartInstance: null
+    };
+  },
+  watch: {
+    options: {
+      handler(newOption) {
+        if (this.chartInstance) {
+          this.chartInstance.setOption(newOption);
+        }
+      },
+      deep: true
+    }
+  },
+  mounted() {
+    this.chartInstance = echarts.init(this.$refs.chartContainer);
+    this.chartInstance.setOption(this.options);
+    window.addEventListener('resize', this.handleResize);
+  },
+  beforeDestroy() {
+    window.removeEventListener('resize', this.handleResize);
+    if (this.chartInstance) {
+      this.chartInstance.dispose();
+    }
+  },
+  methods: {
+    handleResize() {
+      if (this.chartInstance) {
+        this.chartInstance.resize();
+      }
+    }
+  }
+};
+</script>

+ 3 - 3
src/option/yfCostManage/yfCostStatistics/devDepreAllocation.js

@@ -28,13 +28,13 @@ export default {
       label: '研发项目编号',
       prop: 'xmbh',
       span: 24,
-      width: 90,
+      width: 100,
       align: 'center',
       showOverflowTooltip: true,
     },
     {
       label: '研发项目名称',
-      prop: 'xmbh',
+      prop: 'xmmc',
       span: 24,
       width: 120,
       search: true,
@@ -103,7 +103,7 @@ export default {
       prop: 'jcz',
       type: 'number',
       span: 24,
-      width: 70,
+      width: 90,
       align: 'center',
       search: true,
       showOverflowTooltip: true,

+ 4 - 4
src/option/yfCostManage/yfCostStatistics/hourseDepreAllocation.js

@@ -29,14 +29,14 @@ export default {
       label: '研发项目编号',
       prop: 'xmbh',
       span: 24,
-      width: 90,
+      width: 100,
       align: 'center',
       display: false,
       showOverflowTooltip: true,
     },
     {
       label: '研发项目名称',
-      prop: 'xmbh',
+      prop: 'xmmc',
       span: 24,
       width: 120,
       search: true,
@@ -111,7 +111,7 @@ export default {
       prop: 'jcz',
       type: 'number',
       span: 24,
-      width: 70,
+      width: 90,
       align: 'center',
       search: true,
       display: false,
@@ -122,7 +122,7 @@ export default {
       prop: 'yzje',
       type: 'number',
       span: 24,
-      minWidth: 90,
+      minWidth: 120,
       align: 'center',
       search: true,
       display: false,

+ 1 - 1
src/views/basic-resource/comp-basic-info/components/comp-info-table.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="comp-info-table">
     <div class="top-btn">
-      <el-button type="primary" size="small">保存</el-button>
+      <el-button type="primary" size="small" icon="el-icon-check">保存</el-button>
       <el-button type="primary" plain size="small">读取上年度数据</el-button>
     </div>
     <div class="table-wrap">

+ 50 - 0
src/views/wel/components/num-statistics.vue

@@ -0,0 +1,50 @@
+<template>
+  <div class="num-statistics">
+    <div class="icon">
+      <i class="el-icon-s-data"></i>
+    </div>
+    <div class="con">
+      <div>
+        <span class="num">{{ num }}</span>
+        <i class="el-icon-top" style="color: green; font-weight: 600;"></i>
+      </div>
+      <div class="name">{{ name }}</div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    num: [String, Number],
+    name: String
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.num-statistics {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 260px;
+  padding: 12px 8px;
+  border: 1px solid #eee;
+  border-radius: 3px;
+  .icon {
+    font-size: 26px;
+  }
+  .con {
+    margin-left: 12px;
+    text-align: center;
+  }
+  .num {
+    font-size: 32px;
+    font-weight: 600;
+    color: rgb(64, 158, 255);
+  }
+  .name {
+    color: #999;
+  }
+}
+</style>

+ 316 - 32
src/views/wel/index.vue

@@ -1,50 +1,334 @@
 <template>
-  <div>
-    <el-row>
+  <div class="home-contain">
+    <el-row :gutter="20" style="margin-top: 20px">
       <el-col :span="24">
-        <third-register></third-register>
+        <basic-card title="研发项目情况">
+          <el-row style="margin-top: 45px">
+            <el-col :span="8">
+              <basic-chart
+                style="width: 100%; height: 300px"
+                :options="ysBarOptions"
+              />
+            </el-col>
+            <el-col :span="8">
+              <div style="position: relative;">
+                <basic-chart
+                  style="width: 100%; height: 300px"
+                  :options="yffyPieOptions"
+                />
+              </div>
+              
+            </el-col>
+            <el-col :span="8">
+              <basic-chart
+                style="width: 100%; height: 300px"
+                :options="yfhmProjectOptions"
+              />
+            </el-col>
+          </el-row>
+        </basic-card>
       </el-col>
     </el-row>
-    <el-row>
+
+    <el-row :gutter="20" style="margin-top: 20px">
+      <el-col :span="24">
+        <basic-card title="研发人员情况">
+          <el-row style="margin-top: 45px">
+            <el-col :span="8">
+              <basic-chart
+                style="width: 100%; height: 300px"
+                :options="ysBarOptions"
+              />
+            </el-col>
+            <el-col :span="8">
+              <div style="position: relative;">
+                <basic-chart
+                  style="width: 100%; height: 300px"
+                  :options="yffyPieOptions"
+                />
+              </div>
+              
+            </el-col>
+            <el-col :span="8">
+              <basic-chart
+                style="width: 100%; height: 300px"
+                :options="yfhmProjectOptions"
+              />
+            </el-col>
+          </el-row>
+        </basic-card>
+      </el-col>
+    </el-row>
+
+    <el-row :gutter="20" style="margin-top: 20px">
       <el-col :span="24">
-        <basic-container>
-          <p style="text-align: center">
-            <img src="https://img.shields.io/badge/Release-V4.5.0-green.svg" alt="Downloads"/>
-            <img src="https://img.shields.io/badge/JDK-17+-green.svg" alt="Build Status"/>
-            <img src="https://img.shields.io/badge/Spring%20Cloud-2023-blue.svg" alt="Coverage Status"/>
-            <img src="https://img.shields.io/badge/Spring%20Boot-3.2-blue.svg" alt="Downloads"/>
-          </p>
-        </basic-container>
+        <basic-card title="本年度月研发归集趋势图">
+          <el-row style="margin-top: 45px">
+            <el-col :span="8">
+              <basic-chart
+                style="width: 100%; height: 300px"
+                :options="ysBarOptions"
+              />
+            </el-col>
+            <el-col :span="8">
+              <div style="position: relative;">
+                <basic-chart
+                  style="width: 100%; height: 300px"
+                  :options="yffyPieOptions"
+                />
+              </div>
+              
+            </el-col>
+            <el-col :span="8">
+              <basic-chart
+                style="width: 100%; height: 300px"
+                :options="yfhmProjectOptions"
+              />
+            </el-col>
+          </el-row>
+        </basic-card>
       </el-col>
     </el-row>
+
   </div>
 </template>
-
 <script>
-  import {mapGetters} from "vuex";
+import basicCard from "@/components/basic-card";
+import basicChart from "@/components/basic-chart";
+import numStatistics from "./components/num-statistics.vue";
 
-  export default {
-    name: "wel",
-    data() {
-      return {
-        activeNames: ['1', '2', '3', '5'],
-        logActiveNames: ['41']
+export default {
+  name: "home",
+  components: {
+    basicCard,
+    basicChart,
+    numStatistics
+  },
+  data() {
+    return {
+      currYear: "2025",
+      topPie1Options: {},
+      topPie2Options: {},
+      ysBarOptions: {
+        grid: {
+          top: "13%",
+          left: "12%",
+          right: "8%",
+          bottom: "8%",
+        },
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "shadow",
+          },
+        },
+        xAxis: {
+          type: 'category',
+          data: ['预计研发投入金额', '实际已归集研发费用金额']
+        },
+        yAxis: {
+          type: 'value'
+        },
+        series: [
+          {
+            data: [6200, 4000],
+            type: 'bar',
+            barWidth: "25%",
+            label: {
+              show: true,
+              position: "top"
+            }
+          }
+        ]
+      },
+      yffyPieOptions: {},
+      yfhmProjectOptions: {},
+      zscqOptions: {},
+      zlPieOptions: {},
+      xxZlPieOptions: {},
+    };
+  },
+  mounted() {
+    this.initTopPie1Options();
+    this.initTopPie2Options();
+    this.initYfffChartOptions();
+    this.initYfhmProjectOptions();
+    this.initZscqChartOptions();
+    this.initZlChartOptions();
+    this.initXxzlChartOptions();
+  },
+  methods: {
+    initTopPie1Options() {
+      this.topPie1Options = this.getPieOptions("", [
+        { value: 21, name: "研发项目" },
+        { value: 3, name: "终止项目" },
+        { value: 11, name: "结题项目" },
+      ]);
+    },
+    initTopPie2Options() {
+      this.topPie2Options = this.getPieOptions("", [
+        { value: 25, name: "自主研发项目" },
+        { value: 5, name: "委外研发项目" },
+        { value: 2, name: "集中研发项目" },
+        { value: 3, name: "合作研发项目" },
+      ]);
+    },
+    initYfhmProjectOptions() {
+      this.yfhmProjectOptions = {
+        title: {
+          text: "2025年科研费用(万元)",
+          left: "center",
+        },
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "shadow",
+          },
+        },
+        legend: {
+          left: "center",
+          bottom: 0,
+        },
+        grid: {
+          top: "13%",
+          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],
+          },
+        ],
       };
     },
-    computed: {
-      ...mapGetters(["userInfo"]),
+    initYfffChartOptions() {
+      this.yffyPieOptions = this.getPieOptions("2025年研发费用(万元)", [
+        { value: 800, name: "人员人工费用" },
+        { value: 2400, name: "直接投入费用" },
+        { value: 500, name: "折旧费用与长期待摊费用" },
+        { value: 50, name: "无形资产摊销费用" },
+        { value: 100, name: "设计费用" },
+        { value: 100, name: "装备调试费用与试验费用" },
+        { value: 20, name: "委托外部研究开发费用" },
+        { value: 30, name: "其他费用" },
+      ]);
+    },
+    initZscqChartOptions() {
+      this.zscqOptions = this.getPieOptions("知识产权申报情况", [
+        { value: 5, name: "发明专利" },
+        { value: 20, name: "实用新型专利" },
+        { value: 15, name: "软件著作权" },
+        { value: 5, name: "技术标注" },
+        { value: 8, name: "科研论文" },
+        { value: 6, name: "其他成果" },
+      ]);
     },
-    methods: {
-      handleChange(val) {
-        window.console.log(val);
-      }
+    initZlChartOptions() {
+      this.zlPieOptions = this.getPieOptions("知识产权获得情况", [
+        { value: 2, name: "发明专利" },
+        { value: 9, name: "实用新型专利" },
+        { value: 10, name: "软件著作权" },
+        { value: 1, name: "技术标注" },
+        { value: 3, name: "科研论文" },
+        { value: 5, name: "其他成果" },
+      ]);
     },
-  };
+    initXxzlChartOptions() {
+      this.xxZlPieOptions = this.getPieOptions("各子公司实用新型专利数量", [
+        { value: 5, name: "银漫矿业" },
+        { value: 2, name: "融冠矿业" },
+        { value: 3, name: "荣邦矿业" },
+        { value: 1, name: "乾金达矿业" },
+      ]);
+    },
+    getPieOptions(title, seriesData) {
+      let options = {
+        title: {
+          text: title,
+          left: "center",
+        },
+        tooltip: {
+          trigger: "item",
+        },
+        legend: {
+          orient: "vertical",
+          top: "center",
+          right: 0,
+          textStyle: {
+            rich: {
+              a: {
+                verticalAlign: "right",
+                align: "left",
+                width: 180,
+                fontSize: 14,
+              },
+              num: {
+                align: "right",
+                fontSize: 14,
+                color: "rgb(64, 158, 255)",
+              },
+            },
+          },
+          formatter: function (name) {
+            let currItem = seriesData.find((item) => item.name === name);
+            let str = "{a|" + name + "}{num|" + currItem.value + "}";
+            return str;
+          },
+        },
+        series: [
+          {
+            name: title,
+            type: "pie",
+            radius: "50%",
+            radius: ["45%", "70%"],
+            center: ["25%", "50%"],
+            avoidLabelOverlap: false,
+            label: {
+              show: false,
+              position: "center",
+            },
+            labelLine: {
+              show: false,
+            },
+            data: seriesData,
+          },
+        ],
+      };
+      return options;
+    },
+  },
+};
 </script>
 
-<style>
-  .el-font-size {
-    font-size: 14px;
-  }
-</style>
+<style lang="scss" scoped>
+.home-contain {
+  min-height: calc(100vh - 50px);
+  background-color: #eee;
+  padding: 16px 18px;
+  box-sizing: border-box;
+}
 
+.count {
+  font-size: 20px;
+  font-weight: 600;
+  color: rgb(64, 158, 255);
+  margin: 0 3px;
+}
+</style>

+ 3 - 3
src/views/yf-cost-manage/yf-cost-statistics/zjfy-cost-statistics/dev-depre-allocation.vue

@@ -41,7 +41,7 @@
         </div>
       </template>
 
-      <template slot="ytxeSearch">
+      <template slot="yzjeSearch">
         <div style="display: flex; align-items: center;">
           <span>月折旧额:</span>
           <avue-input-number v-model="params.yzjeMin" :min="0" style="width: 100px !important;"></avue-input-number>
@@ -50,7 +50,7 @@
         </div>
       </template>
 
-      <template slot="ysygsSearch">
+      <template slot="attendanceHoursSearch">
         <div style="display: flex; align-items: center;">
           <span>月使用工时:</span>
           <avue-input-number v-model="params.attendanceHoursMin" :min="0" style="width: 100px !important;"></avue-input-number>
@@ -59,7 +59,7 @@
         </div>
       </template>
 
-      <template slot="yyfgsSearch">
+      <template slot="workHoursSearch">
         <div style="display: flex; align-items: center;">
           <span>已研发工时:</span>
           <avue-input-number v-model="params.workHoursMin" :min="0" style="width: 100px !important;"></avue-input-number>