ly преди 2 години
родител
ревизия
e249bf0dcf

+ 1 - 1
master/src/main/java/com/ruoyi/project/plant/controller/TStaffmgrController.java

@@ -460,7 +460,7 @@ public class TStaffmgrController extends BaseController
     {
         int insertResult = tStaffmgrService.insertTStaffmgr(tStaffmgr);
         tStaffmgr.setCreaterCode(getUserId().toString());
-        if (tStaffmgr.getUnit().equals("10") || tStaffmgr.getUnit().equals("18")|| tStaffmgr.getUnit().equals("20")) {
+        if (tStaffmgr.getUnit().equals("10") || tStaffmgr.getUnit().equals("18")|| tStaffmgr.getUnit().equals("20")|| tStaffmgr.getUnit().equals("30")) {
             TTrainingrecords tTrainingrecords = new TTrainingrecords();
             tTrainingrecords.setStaffId(tStaffmgr.getId());
             tTrainingrecords.setPlantCode(tStaffmgr.getPlantCode());

+ 18 - 0
master/src/main/java/com/ruoyi/project/training/newstaff/controller/TTnNewController.java

@@ -1,10 +1,13 @@
 package com.ruoyi.project.training.newstaff.controller;
 
+import java.util.Calendar;
+import java.util.HashMap;
 import java.util.List;
 
 import com.ruoyi.project.plant.domain.TStaffmgr;
 import com.ruoyi.project.plant.service.ITStaffmgrService;
 import com.ruoyi.project.system.domain.SysUser;
+import com.ruoyi.project.training.domain.TTraining;
 import com.ruoyi.project.training.newstaff.domain.TTnFirstplan;
 import com.ruoyi.project.training.newstaff.domain.TTnFirstplanTmpl;
 import com.ruoyi.project.training.newstaff.mapper.TTnFirstplanMapper;
@@ -74,6 +77,21 @@ public class TTnNewController extends BaseController
         return getDataTable(list);
     }
 
+    @GetMapping("/trainNewstaffCount")
+    public AjaxResult trainNewstaffCount() {
+        TTnNew tTnNew = new TTnNew();
+        tTnNew.setPlanStatus(1l);
+        List<TTnNew> list1 = tTnNewService.selectTTnNewList(tTnNew);
+        tTnNew.setPlanStatus(0l);
+        List<TTnNew> list0 = tTnNewService.selectTTnNewList(tTnNew);
+        HashMap<String, Object> result = new HashMap<>();
+        result.put("count1", list1.size());
+        result.put("count1Name", "已完成");
+        result.put("count0", list0.size());
+        result.put("count0Name", "未完成");
+        return AjaxResult.success(result);
+    }
+
     /**
      * 查询下拉
      */

+ 2 - 2
master/src/main/resources/application.yml

@@ -9,7 +9,7 @@ ruoyi:
   # 实例演示开关
   demoEnabled: true
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /u03/cpmsfile/uploadPath)
-  profile: D:/ruoyi/uploadPath
+  profile: /u03/cpmsfile/uploadPath
   # 邮件中链接跳转路径 示例(本地:http://localhost/#,服务器:http://47.114.101.16:8080/cpms/index.html#)
   requestJumpPath: https://cpms.basf-ypc.net.cn/cpms/index.html#
   # 获取ip地址开关
@@ -182,7 +182,7 @@ jodconverter:
     enabled: true
     # 设置LibreOffice主目录
     #    office-home: /opt/libreoffice7.2  C:/Program Files/LibreOffice
-    office-home: C:/Program Files/LibreOffice
+    office-home: /opt/libreoffice7.2
     max-tasks-per-process: 100
     port-numbers: 8100
     # 开启多个LibreOffice进程,每个端口对应一个进程

+ 9 - 0
ui/src/api/training/newstaff/tnNew.js

@@ -61,4 +61,13 @@ export function exportTnNew(query) {
   })
 }
 
+// 统计培训
+export function trainNewstaffCount() {
+  return request({
+    url: '/newstaff/tnNew/trainNewstaffCount',
+    method: 'get',
+  })
+}
+
+
 

+ 1 - 1
ui/src/views/byxhome.vue

@@ -32,7 +32,7 @@
       <el-col :xs="24" :sm="24" :lg="8">
         <div>
           <div class="card-head">
-            <span class="card-name">{{ $t('新员工培训') }}</span>
+            <span class="card-name">{{ $t('生日提醒') }}</span>
           </div>
         </div>
         <div class="chart-wrapper">

+ 98 - 0
ui/src/views/dashboard/hcq/BrithChart.vue

@@ -0,0 +1,98 @@
+<template>
+  <div :class="className" :style="{height:height,width:width}" />
+</template>
+
+<script>
+import echarts from 'echarts'
+require('echarts/theme/macarons') // echarts theme
+import resize from '../mixins/resize'
+import { trainNewstaffCount} from "@/api/training/newstaff/tnNew";
+
+export default {
+  mixins: [resize],
+  props: {
+    className: {
+      type: String,
+      default: 'chart'
+    },
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '210px'
+    }
+  },
+  data() {
+    return {
+      chart: null,
+      dataOut: []
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      trainNewstaffCount().then(res=>{
+        this.dataOut = [
+          {value: res.data.count1, name: res.data.count1Name},
+          {value: res.data.count0, name: res.data.count0Name},
+        ]
+        this.initChart()
+      })
+    })
+  },
+  beforeDestroy() {
+    if (!this.chart) {
+      return
+    }
+    this.chart.dispose()
+    this.chart = null
+  },
+  methods: {
+    initChart() {
+      this.chart = echarts.init(this.$el, 'macarons')
+
+      this.chart.setOption({
+        tooltip: {
+          trigger: 'item',
+          formatter: "{b}: {c} " + " | " + "{d}%"
+        },
+        title:
+          {
+            text: '',
+          }
+        ,
+        legend: {
+          orient: 'vertical',
+          left: 'left',
+          itemWidth: 10,
+          itemHeight: 10,
+          textStyle: {
+            fontSize: 12,
+            padding:[0,0]
+          },
+          selectedMode: true,
+          data: [],
+        },
+        series: [
+          {
+            name: '',
+            type: 'pie',
+            selectedMode: 'single',
+            label: {
+              position: 'outside',
+              fontSize: 10,
+            },
+            animationEasing: 'cubicInOut',
+            animationDuration: 1300,
+            labelLine: {
+              show: true
+            },
+            data: this.dataOut
+          }
+        ],
+      })
+    }
+  }
+}
+</script>

+ 82 - 0
ui/src/views/dashboard/hcq/PieChart.vue

@@ -0,0 +1,82 @@
+<template>
+  <div :class="className" :style="{height:height,width:width}" />
+</template>
+
+<script>
+import echarts from 'echarts'
+require('echarts/theme/macarons') // echarts theme
+import resize from '../mixins/resize'
+import {trainCount} from "@/api/ehs/homedata";
+
+export default {
+  mixins: [resize],
+  props: {
+    className: {
+      type: String,
+      default: 'chart'
+    },
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '210px'
+    }
+  },
+  data() {
+    return {
+      chart: null,
+      trainData:[],
+      trainingType:[]
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      trainCount().then(res=>{
+        for (const item of res.data) {
+          this.trainData.push({value:item.trainingTypeCount,name:item.trainingType});
+          this.trainingType.push(item.trainingType)
+        }
+        this.initChart()
+      })
+    })
+  },
+  beforeDestroy() {
+    if (!this.chart) {
+      return
+    }
+    this.chart.dispose()
+    this.chart = null
+  },
+  methods: {
+    initChart() {
+      this.chart = echarts.init(this.$el, 'macarons')
+
+      this.chart.setOption({
+        tooltip: {
+          trigger: 'item',
+          formatter: '{a} <br/>{b} : {c} ({d}%)'
+        },
+        legend: {
+          left: 'center',
+          bottom: '10',
+          data:this.trainingType
+        },
+        series: [
+          {
+            name: '',
+            type: 'pie',
+            roseType: 'radius',
+            radius: ['10%', '55%'],
+            center: ['50%', '38%'],
+            data: this.trainData,
+            animationEasing: 'cubicInOut',
+            animationDuration: 2600
+          }
+        ]
+      })
+    }
+  }
+}
+</script>

+ 126 - 0
ui/src/views/dashboard/hcq/RaddarChart.vue

@@ -0,0 +1,126 @@
+<template>
+  <div :class="className" :style="{height:height,width:width}"/>
+</template>
+
+<script>
+import echarts from 'echarts'
+
+require('echarts/theme/macarons') // echarts theme
+import resize from '../mixins/resize'
+import {procedureCount} from "@/api/ehs/homedata";
+
+const animationDuration = 3000
+
+export default {
+  mixins: [resize],
+  props: {
+    className: {
+      type: String,
+      default: 'chart'
+    },
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '210px'
+    }
+  },
+  data() {
+    return {
+      chart: null,
+      chartData: {},
+      color: [
+        '#87CA8B',
+        '#58B1FF',
+        '#FBD44A',
+        '#7485E5',
+        '#AEE5B1',
+        '#81C4FF',
+        '#AAD7FF',
+        '#FFE791',
+        '#9AA6EA',
+      ],
+      dataIn: [
+        // 外层数据
+      ],
+      dataOut: []
+    }
+  },
+  created() {
+
+  },
+  mounted() {
+    this.$nextTick(() => {
+      procedureCount().then(res => {
+        this.dataOut = [
+          {value: res.data.appNum, name: res.data.app},
+          {value: res.data.trainNum, name: res.data.train},
+          {value: res.data.excelNum, name: res.data.excel},
+          {value: res.data.fileNum, name: res.data.file},
+          {value: res.data.guideNum, name: res.data.guide},
+          {value: res.data.fingerpostNum, name: res.data.fingerpost}
+        ]
+        this.initChart()
+      })
+
+    })
+  },
+  beforeDestroy() {
+    if (!this.chart) {
+      return
+    }
+    this.chart.dispose()
+    this.chart = null
+  },
+  methods: {
+    initChart() {
+      this.chart = echarts.init(this.$el, 'macarons')
+
+      this.chart.setOption({
+        color: this.color,
+        tooltip: {
+          trigger: 'item',
+          formatter: "{b}: {c} " + " | " + "{d}%"
+        },
+        title:
+          {
+            text: '',
+          }
+        ,
+        legend: {
+          orient: 'vertical',
+          left: 'left',
+          itemWidth: 10,
+          itemHeight: 10,
+          textStyle: {
+            fontSize: 12,
+            padding:[0,0]
+          },
+          selectedMode: true,
+          data: ['程序总汇', '指南总汇', '指导书总汇', '附件总汇', '表格总汇', '培训材料'],
+        },
+        series: [
+          {
+            name: '',
+            type: 'pie',
+            selectedMode: 'single',
+            radius: ['20%', '80%'],
+            label: {
+              position: 'outside',
+              fontSize: 10,
+            },
+            animationEasing: 'cubicInOut',
+            animationDuration: 1300,
+            labelLine: {
+              show: true
+            },
+            data: this.dataOut
+          }
+        ],
+      })
+    }
+  }
+}
+</script>

+ 120 - 0
ui/src/views/hcqhome.vue

@@ -0,0 +1,120 @@
+<template>
+  <div class="dashboard-editor-container">
+
+    <panel-group @handleSetLineChartData="handleSetLineChartData" />
+
+    <el-row :gutter="32">
+      <el-col :xs="24" :sm="24" :lg="8">
+        <div>
+          <div class="card-head">
+            <span class="card-name">{{ $t('程序状态') }}</span>
+          </div>
+        </div>
+        <div class="chart-wrapper">
+          <raddar-chart />
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="24" :lg="8">
+        <div>
+          <div class="card-head">
+            <span class="card-name">{{ $t('培训状态') }}</span>
+          </div>
+        </div>
+        <div class="chart-wrapper">
+          <pie-chart />
+        </div>
+      </el-col>
+<!--      <el-col :xs="24" :sm="24" :lg="8">-->
+<!--        <div class="chart-wrapper">-->
+<!--          <bar-chart />-->
+<!--        </div>-->
+<!--      </el-col>-->
+      <el-col :xs="24" :sm="24" :lg="8">
+        <div>
+          <div class="card-head">
+            <span class="card-name">{{ $t('新员工培训') }}</span>
+          </div>
+        </div>
+        <div class="chart-wrapper">
+          <brith-chart />
+        </div>
+      </el-col>
+    </el-row>
+
+
+    <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
+      <line-chart :chart-data="lineChartData" />
+    </el-row>
+
+  </div>
+</template>
+
+<script>
+import PanelGroup from './dashboard/PanelGroup'
+import LineChart from './dashboard/LineChart'
+import RaddarChart from './dashboard/hcq/RaddarChart'
+import PieChart from './dashboard/hcq/PieChart'
+import BarChart from './dashboard/BarChart'
+import BrithChart from "./dashboard/hcq/BrithChart";
+
+const lineChartData = {
+  newVisitis: {
+    expectedData: [100, 120, 161, 134, 105, 160, 165],
+    actualData: [120, 82, 91, 154, 162, 140, 145]
+  },
+  messages: {
+    expectedData: [200, 192, 120, 144, 160, 130, 140],
+    actualData: [180, 160, 151, 106, 145, 150, 130]
+  },
+  purchases: {
+    expectedData: [80, 100, 121, 104, 105, 90, 100],
+    actualData: [120, 90, 100, 138, 142, 130, 130]
+  },
+  shoppings: {
+    expectedData: [130, 140, 141, 142, 145, 150, 160],
+    actualData: [120, 82, 91, 154, 162, 140, 130]
+  }
+}
+
+export default {
+  name: 'Index',
+  components: {
+    PanelGroup,
+    LineChart,
+    RaddarChart,
+    PieChart,
+    BarChart,
+    BrithChart
+  },
+  data() {
+    return {
+      lineChartData: lineChartData.newVisitis
+    }
+  },
+  methods: {
+    handleSetLineChartData(type) {
+      this.lineChartData = lineChartData[type]
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.dashboard-editor-container {
+  padding: 32px;
+  background-color: rgb(240, 242, 245);
+  position: relative;
+
+  .chart-wrapper {
+    background: #fff;
+    padding: 16px 16px 0;
+    margin-bottom: 32px;
+  }
+}
+
+@media (max-width:1024px) {
+  .chart-wrapper {
+    padding: 8px;
+  }
+}
+</style>

+ 4 - 2
ui/src/views/index.vue

@@ -3,7 +3,7 @@
   <semshome v-else-if="homeType == 2"></semshome>
   <invoice v-else-if="homeType== 3"></invoice>
   <byxhome v-else-if="homeType== 4"></byxhome>
-  <byxhome v-else-if="homeType== 5"></byxhome>
+  <hcqhome v-else-if="homeType== 5"></hcqhome>
 <!--  <semshome v-show="homeType == 2"></semshome>-->
 </template>
 
@@ -14,6 +14,7 @@
   // 重构后首页
   import homepage from "./monitor/bccHome/index";
   import byxhome from "./byxhome";
+  import hcqhome from "./hcqhome";
   import semshome from "./sems/specanalysis/index";
   import invoice from "./invoice/bookingworkticket/index";
   import '@/common/flexible.js';
@@ -28,7 +29,8 @@
       homepage,
       semshome,
       invoice,
-      byxhome
+      byxhome,
+      hcqhome
     },
     mounted() {
       console.log(this.$store.state.user.homeType)

+ 5 - 0
ui/src/views/training/newstaff/tnNew/index.vue

@@ -141,6 +141,11 @@
           <el-button  icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'training-teacher')" circle></el-button>
         </template>
       </el-table-column>
+      <el-table-column label="培训考评" align="center" prop="pipe">
+        <template slot-scope="scope">
+          <el-button  icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'training-score')" circle></el-button>
+        </template>
+      </el-table-column>
       <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
       <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">