From 1e8fff896d7cb61a6c82454588dc4da5bbec98ac Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 28 二月 2025 11:26:49 +0800
Subject: [PATCH] 人员-人员培训计划搬迁

---
 src/views/CNAS/personnel/personnelInfo/index.vue                  |   12 ++++--
 src/api/cnas/personal/personalTraining.js                         |    2 
 src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue |   65 +++++++++++++++++++++-----------
 src/views/CNAS/personnel/personnelInfo/components/Edit.vue        |    1 
 src/views/CNAS/personnel/personnelInfo/components/ViewRecord.vue  |   27 ++++++++-----
 5 files changed, 68 insertions(+), 39 deletions(-)

diff --git a/src/api/cnas/personal/personalTraining.js b/src/api/cnas/personal/personalTraining.js
index d814ce4..cdca93c 100644
--- a/src/api/cnas/personal/personalTraining.js
+++ b/src/api/cnas/personal/personalTraining.js
@@ -3,7 +3,7 @@
 // 鏌ヨ浜哄憳鍩硅
 export function personTraining(query) {
   return request({
-    url: "/personTraining/personTraining",
+    url: "/personTraining/personTrainingSelect",
     method: "get",
     params: query
   });
diff --git a/src/views/CNAS/personnel/personnelInfo/components/Edit.vue b/src/views/CNAS/personnel/personnelInfo/components/Edit.vue
index 6dff2e6..3992697 100644
--- a/src/views/CNAS/personnel/personnelInfo/components/Edit.vue
+++ b/src/views/CNAS/personnel/personnelInfo/components/Edit.vue
@@ -222,7 +222,6 @@
       },
       addUserTableInfo: {
         name: null,
-        departLimsId: '1',
       },
       multipleSelection: [],
       userList: [],
diff --git a/src/views/CNAS/personnel/personnelInfo/components/ViewRecord.vue b/src/views/CNAS/personnel/personnelInfo/components/ViewRecord.vue
index 36364cf..e9938c7 100644
--- a/src/views/CNAS/personnel/personnelInfo/components/ViewRecord.vue
+++ b/src/views/CNAS/personnel/personnelInfo/components/ViewRecord.vue
@@ -35,6 +35,7 @@
 import filePreview from '@/components/Preview/filePreview.vue';
 import limsTable from "@/components/Table/lims-table.vue";
 import {delTrainingDetailedFileList, getTrainingDetailedFileList} from "@/api/cnas/personal/personalTraining";
+import {delCustomById} from "@/api/system/customer";
 
 export default {
   name: 'ViewRecord',
@@ -126,15 +127,21 @@
     },
     // 鍒犻櫎
     delete (row) {
-      this.tableLoading = true
-      delTrainingDetailedFileList({detailedFileId: row.detailedFileId}).then(res => {
-        this.tableLoading = false
-        this.$message.success('鍒犻櫎鎴愬姛')
-        this.searchTableList()
-      }).catch(err => {
-        this.tableLoading = false
-        console.log('err---', err);
-      })
+      this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning"
+      }).then(() => {
+        this.tableLoading = true
+        delTrainingDetailedFileList({detailedFileId: row.detailedFileId}).then(res => {
+          this.tableLoading = false
+          this.$message.success('鍒犻櫎鎴愬姛')
+          this.searchTableList()
+        }).catch(err => {
+          this.tableLoading = false
+          console.log('err---', err);
+        })
+      }).catch(() => {})
     },
     // 涓婁紶楠岃瘉
     fileBeforeUpload(file) {
@@ -167,7 +174,7 @@
   },
   computed: {
     fileAction() {
-      return this.javaApi + '/personTraining/delTrainingDetailedFileList'
+      return this.javaApi + '/personTraining/uploadTrainingDetailedFile'
 
     }
   },
diff --git a/src/views/CNAS/personnel/personnelInfo/index.vue b/src/views/CNAS/personnel/personnelInfo/index.vue
index a55381e..2bae370 100644
--- a/src/views/CNAS/personnel/personnelInfo/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/index.vue
@@ -57,10 +57,10 @@
                          @updatePerson="updatePerson"></PersonnelList>
           <personnelInformation v-if="activeName === '浜哄憳鍩烘湰淇℃伅' && !isShowAll" :clickNodeVal="clickNodeVal"></personnelInformation>
         </el-tab-pane>
-<!--        <el-tab-pane label="鍩硅璁″垝" name="鍩硅璁″垝">-->
-<!--          <PersonnelTraining v-if="activeName === '鍩硅璁″垝'" ref="personnelTraining"-->
-<!--                             :departId="departId" :isDepartment="isDepartment"></PersonnelTraining>-->
-<!--        </el-tab-pane>-->
+        <el-tab-pane label="鍩硅璁″垝" name="鍩硅璁″垝">
+          <PersonnelTraining v-if="activeName === '鍩硅璁″垝'" ref="personnelTraining"
+                             :departId="departId" :isDepartment="isDepartment"></PersonnelTraining>
+        </el-tab-pane>
 <!--        <el-tab-pane label="宀椾綅鑱岃矗" name="宀椾綅鑱岃矗">-->
 <!--          <job-responsibilities v-if="activeName === '宀椾綅鑱岃矗'" ref="jobResponsibilities"-->
 <!--                                :departId="departId"-->
@@ -274,6 +274,10 @@
   height: 14px;
   /* 璁剧疆婊氬姩鏉″搴� */
 }
+.node_i {
+  color: orange;
+  font-size: 18px;
+}
 .custom-tree-node {
   width: 80%;
   line-height: 32px;
diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue b/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue
index 8af11b0..46c637d 100644
--- a/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue
+++ b/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue
@@ -2,6 +2,9 @@
 <template>
   <div class="flex_column">
     <div v-if="!editPlanShow && isDepartment">
+      <div class="title">
+        <span style="font-weight: bold">骞村害璁″垝</span>
+      </div>
       <div style="display: flex;justify-content: space-between;">
         <el-form :model="page" ref="page" size="small" :inline="true">
           <el-form-item label="缂栧埗浜�">
@@ -17,11 +20,14 @@
       </div>
       <lims-table :tableData="yearPlanTableData" :column="yearPlanColumn"
                   :currentChange="currentChange"
-                  @pagination="pagination" :height="'calc(100vh - 290px)'"
+                  @pagination="pagination" height="40vh"
                   :page="page" :tableLoading="yearLoading"></lims-table>
     </div>
     <div v-if="!editPlanShow" class="table">
-      <div v-if="!editPlanShow && isDepartment">
+      <div>
+        <div class="title">
+          <span style="font-weight: bold">骞村害璁″垝鏄庣粏</span>
+        </div>
         <div style="display: flex;justify-content: space-between;">
           <el-form :model="inDetailForm" ref="inDetailForm" size="small" :inline="true">
             <el-form-item label="鍩硅璁插笀">
@@ -42,10 +48,10 @@
           </div>
         </div>
         <lims-table :tableData="inDetailPlanTableData" :column="inDetailPlanColumn"
-                    :currentChange="currentChange" :height="isDepartment ? '45vh' : '68vh' "
+                    :height="isDepartment ? '40vh' : '62vh' "
                     :isSelection="true" :handleSelectionChange="handleSelectionChange"
                     @pagination="pagination1"
-                    :page="inDetailPagination" :tableLoading="yearLoading"></lims-table>
+                    :page="inDetailPagination" :tableLoading="yearDetailLoading"></lims-table>
       </div>
     </div>
     <Add ref="addPlan" :currentChangeRow="currentChangeRow" @search="getInDetailPlan(currentRowId, departId)"></Add>
@@ -167,6 +173,7 @@
         trainingDate: '',
       },
       yearLoading: false,
+      yearDetailLoading: false,
       yearPlanTableData: [], // 骞村害璁″垝琛ㄦ暟鎹�
       yearPlanColumn: [
         {
@@ -292,7 +299,7 @@
               name: '鎵瑰噯',
               type: 'text',
               disabled: (row) => {
-                if(row.approvalStatus === 1 || this.userId != row.approverId) {
+                if(row.approvalStatus === 1 || this.userId != row.approverId || row.reviewerStatus != 1) {
                   return true;
                 } else {
                   return false;
@@ -477,6 +484,7 @@
     },
     // 鏌ヨ-骞村害璁″垝琛�
     getYearPlanList(userId) {
+      this.yearLoading = true
       const params = this.isDepartment ?
       {
         departmentId: userId,
@@ -490,13 +498,16 @@
           compilerName: this.page.compilerName,
         }
       personTraining(params).then(res => {
+        this.yearLoading = false
         this.yearPlanTableData = res.data.records;
         this.pagination.total = res.data.total;
         if (this.yearPlanTableData.length > 0) {
           this.currentRowId = this.yearPlanTableData[0].id
           this.currentChange(this.yearPlanTableData[0])
         }
-      });
+      }).catch(err => {
+        this.yearLoading = false
+      })
     },
     pagination (page) {
       this.page.size = page.limit
@@ -530,10 +541,14 @@
           trainingLecturerName: this.inDetailForm.trainingLecturerName,
           trainingDate: this.inDetailForm.trainingDate,
         }
+      this.yearDetailLoading = true
       queryTheAnnualPlanDetailsTable(params).then(res => {
+        this.yearDetailLoading = false
         this.inDetailPlanTableData = res.data.records;
         this.inDetailPagination.total = res.data.total;
-      });
+      }).catch(err => {
+        this.yearDetailLoading = false
+      })
     },
     pagination1 (page) {
       this.inDetailPagination.size = page.limit
@@ -639,7 +654,7 @@
       this.uploadDia = false
       this.uploading = false
       if (response.code != 200) {
-        this.$message.error(response.message)
+        this.$message.error(response.msg)
         return
       }
       this.$message.success('涓婁紶鎴愬姛')
@@ -761,23 +776,27 @@
   overflow: auto;
   justify-content: space-between;
 }
-
-.pagination {
-  display: flex;
-  justify-content: space-between
-}
-
-.items_center {
-  display: flex;
-  align-items: center;
-}
-
-.date_box {
-  margin: 0 5px;
-}
-
 .search {
   width: 150px;
   margin: 0 16px;
 }
+.title {
+  position: relative;
+  font-size: 16px;
+  color: #333;
+  font-weight: 400;
+  padding-left: 10px;
+  margin-bottom: 10px;
+}
+
+.title::before {
+  position: absolute;
+  left: 0;
+  top: 4px;
+  content: '';
+  width: 4px;
+  height: 16px;
+  background-color: #3A7BFA;
+  border-radius: 2px;
+}
 </style>

--
Gitblit v1.9.3