ソースを参照

技术档案部分优化

XU 2 ヶ月 前
コミット
6704017d6d

+ 266 - 23
src/api/technology-archives/technology-archives.js

@@ -365,7 +365,7 @@ export function selectTechnologyArchives12() {
     })
 }
 
-// 保存技术文档10
+// 保存技术文档12
 export function saveTechnologyArchives12(data) {
     return request({
         url: '/technologyArchives/saveTechnologyArchives12',
@@ -374,7 +374,7 @@ export function saveTechnologyArchives12(data) {
     })
 }
 
-// 根据serialNo, id删除技术文档7
+// 根据serialNo, id删除技术文档12
 export function delTechnologyArchives12ByCode(socialNo, id) {
     return request({
         url: '/technologyArchives/delTechnologyArchives12ByCode',
@@ -392,6 +392,22 @@ export function selectTechnologyArchives13() {
     })
 }
 
+// 查询委任聘书图片
+export function selectAppointmentImage(socialNo, name) {
+    return request({
+        url: '/technologyArchives/selectAppointmentImage',
+        method: 'get',
+        params: { socialNo, name },
+    })
+}
+export function setAppointmentImage(socialNo, name, url) {
+    return request({
+        url: '/technologyArchives/setAppointmentImage',
+        method: 'get',
+        params: { socialNo, name, url },
+    })
+}
+
 // 保存技术文档13
 export function saveTechnologyArchives13(data) {
     return request({
@@ -521,6 +537,34 @@ export function delTechnologyArchives15ByCode(socialNo, id) {
     })
 }
 
+//教育经历
+// 查询技术文档16
+export function selectTechnologyArchives16() {
+    return request({
+        url: '/technologyArchives/selectTechnologyArchives16',
+        method: 'get',
+        params: { },
+    })
+}
+
+// 保存技术文档16
+export function saveTechnologyArchives16(data) {
+    return request({
+        url: '/technologyArchives/saveTechnologyArchives16',
+        method: 'post',
+        data,
+    })
+}
+
+// 根据serialNo, id删除技术文档16
+export function delTechnologyArchives16ByCode(socialNo, id) {
+    return request({
+        url: '/technologyArchives/delTechnologyArchives16ByCode',
+        method: 'get',
+        params: { socialNo, id },
+    })
+}
+
 // 查询技术文档类型 (type: 1 Ⅰ档案   2 Ⅱ档案)
 export function selectTechnologyArchivesType(type) {
     return request({
@@ -574,6 +618,42 @@ export function exportTechnologyArchivesInfo(params) {
     })
 }
 
+
+//导出护理档案全部信息
+export function exportMultiTechnologyArchives(params) {
+    ElMessageBox.prompt('导出文件名字', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputPattern: /\S/,
+        inputErrorMessage: '文件名不能为空 (∩•̀ω•́)⊃-*⋆',
+    }).then(({ value }) => {
+        const data = {
+            param: params,
+            url: '/technologyArchives/exportMultiTechnologyArchives',
+            fileName: value + '.xls',
+        }
+        setTimeout(() => {
+            downloadExcel(data)
+        }, 500)
+    }).catch((res) => {
+        if (res.code === '0') {
+            ElMessage({
+                message: res.message,
+                type: 'success',
+                duration: 2000,
+                showClose: true,
+            })
+        } else {
+            ElMessage({
+                message: res.message,
+                type: 'warning',
+                duration: 3000,
+                showClose: true,
+            })
+        }
+    })
+}
+
 export function selectTechnologyArchivesMainDict(){
     return request({
         url: '/technologyArchives/selectTechnologyArchivesMainDict',
@@ -688,22 +768,6 @@ export function selectTechnologyArchivesHL2() {
     })
 }
 
-export function setHL2Image(socialNo, beginTime, url) {
-    return request({
-        url: '/hltechnologyArchives/setHL2Image',
-        method: 'get',
-        params: { socialNo, beginTime, url },
-    })
-}
-
-// 查询聘用图片
-export function selectHL2Image(socialNo, id) {
-    return request({
-        url: '/hltechnologyArchives/selectHL2Image',
-        method: 'get',
-        params: { socialNo, id },
-    })
-}
 
 // 保存工作经历
 export function saveTechnologyArchivesHL2(data) {
@@ -723,8 +787,8 @@ export function delTechnologyArchivesHL2ByCode(socialNo, id) {
     })
 }
 
-// 学习经历
-// 查询学习经历
+// 教育经历
+// 查询教育经历
 export function selectTechnologyArchivesHL3() {
     return request({
         url: '/hltechnologyArchives/selectTechnologyArchivesHL3',
@@ -733,7 +797,7 @@ export function selectTechnologyArchivesHL3() {
     })
 }
 
-// 保存学习经历
+// 保存教育经历
 export function saveTechnologyArchivesHL3(data) {
     return request({
         url: '/hltechnologyArchives/saveTechnologyArchivesHL3',
@@ -742,7 +806,7 @@ export function saveTechnologyArchivesHL3(data) {
     })
 }
 
-// 根据serialNo, id删除学习经历
+// 根据serialNo, id删除教育经历
 export function delTechnologyArchivesHL3ByCode(socialNo, id) {
     return request({
         url: '/hltechnologyArchives/delTechnologyArchivesHL3ByCode',
@@ -924,6 +988,185 @@ export function delTechnologyArchivesHL9ByCode(socialNo, id) {
     })
 }
 
+
+// 查询技术文档5
+export function hlselectTechnologyArchives5() {
+    return request({
+        url: '/hltechnologyArchives/selectTechnologyArchives5',
+        method: 'get',
+        params: { },
+    })
+}
+
+// 保存技术文档5
+export function hlsaveTechnologyArchives5(data) {
+    return request({
+        url: '/hltechnologyArchives/saveTechnologyArchives5',
+        method: 'post',
+        data,
+    })
+}
+
+// 根据serialNo, time删除技术文档5
+export function hldelTechnologyArchives5ByCode(socialNo, time) {
+    return request({
+        url: '/hltechnologyArchives/delTechnologyArchives5ByCode',
+        method: 'get',
+        params: { socialNo, time },
+    })
+}
+
+// 查询技术文档7
+export function hlselectTechnologyArchives7() {
+    return request({
+        url: '/hltechnologyArchives/selectTechnologyArchives7',
+        method: 'get',
+        params: { },
+    })
+}
+
+// 保存技术文档7
+export function hlsaveTechnologyArchives7(data) {
+    return request({
+        url: '/hltechnologyArchives/saveTechnologyArchives7',
+        method: 'post',
+        data,
+    })
+}
+
+// 根据serialNo, id删除技术文档7
+export function hldelTechnologyArchives7ByCode(socialNo, id) {
+    return request({
+        url: '/hltechnologyArchives/delTechnologyArchives7ByCode',
+        method: 'get',
+        params: { socialNo, id },
+    })
+}
+
+// 查询技术文档10
+export function selectTechnologyArchivesHL10() {
+    return request({
+        url: '/hltechnologyArchives/selectTechnologyArchives10',
+        method: 'get',
+        params: { },
+    })
+}
+
+// 保存技术文档10
+export function saveTechnologyArchivesHL10(data) {
+    return request({
+        url: '/hltechnologyArchives/saveTechnologyArchives10',
+        method: 'post',
+        data,
+    })
+}
+
+// 根据serialNo, id删除技术文档10
+export function delTechnologyArchivesHL10ByCode(socialNo, id) {
+    return request({
+        url: '/hltechnologyArchives/delTechnologyArchives10ByCode',
+        method: 'get',
+        params: { socialNo, id },
+    })
+}
+
+// 查询技术文档12
+export function selectTechnologyArchivesHL12() {
+    return request({
+        url: '/hltechnologyArchives/selectTechnologyArchives12',
+        method: 'get',
+        params: { },
+    })
+}
+
+// 保存技术文档12
+export function saveTechnologyArchivesHL12(data) {
+    return request({
+        url: '/hltechnologyArchives/saveTechnologyArchives12',
+        method: 'post',
+        data,
+    })
+}
+
+// 根据serialNo, id删除技术文档12
+export function delTechnologyArchivesHL12ByCode(socialNo, id) {
+    return request({
+        url: '/hltechnologyArchives/delTechnologyArchives12ByCode',
+        method: 'get',
+        params: { socialNo, id },
+    })
+}
+
+// 查询技术文档13
+export function selectTechnologyArchivesHL13() {
+    return request({
+        url: '/hltechnologyArchives/selectTechnologyArchives13',
+        method: 'get',
+        params: { },
+    })
+}
+
+// 查询委任聘书图片
+export function selectHL13Image(socialNo, name) {
+    return request({
+        url: '/hltechnologyArchives/selectAppointmentImage',
+        method: 'get',
+        params: { socialNo, name },
+    })
+}
+export function setHL13Image(socialNo, name, url) {
+    return request({
+        url: '/hltechnologyArchives/setAppointmentImage',
+        method: 'get',
+        params: { socialNo, name, url },
+    })
+}
+
+// 保存技术文档13
+export function saveTechnologyArchivesHL13(data) {
+    return request({
+        url: '/hltechnologyArchives/saveTechnologyArchives13',
+        method: 'post',
+        data,
+    })
+}
+
+// 根据serialNo, id删除技术文档13
+export function delTechnologyArchivesHL13ByCode(socialNo, id) {
+    return request({
+        url: '/hltechnologyArchives/delTechnologyArchives13ByCode',
+        method: 'get',
+        params: { socialNo, id },
+    })
+}
+
+// 查询技术文档14
+export function selectTechnologyArchivesHL14() {
+    return request({
+        url: '/hltechnologyArchives/selectTechnologyArchives14',
+        method: 'get',
+        params: { },
+    })
+}
+
+// 保存技术文档14
+export function saveTechnologyArchivesHL14(data) {
+    return request({
+        url: '/hltechnologyArchives/saveTechnologyArchives14',
+        method: 'post',
+        data,
+    })
+}
+
+// 根据serialNo, id删除技术文档14
+export function delTechnologyArchivesHL14ByCode(socialNo, id) {
+    return request({
+        url: '/hltechnologyArchives/delTechnologyArchives14ByCode',
+        method: 'get',
+        params: { socialNo, id },
+    })
+}
+
 // 查询护理技术文档类型 
 export function selectTechnologyArchivesHLType(type) {
     return request({
@@ -943,7 +1186,7 @@ export function selectTechnologyArchivesHLInfo(data) {
 }
 
 //导出护理档案全部信息
-export function exportMultiTechnologyArchives(params) {
+export function exportHLMultiTechnologyArchives(params) {
     ElMessageBox.prompt('导出文件名字', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',

+ 292 - 200
src/views/technology-archives/HLTechnologyArchivesMain.vue

@@ -461,6 +461,12 @@
                     <span v-else>{{ scope.row.workTime }}</span>
                   </template>
                 </el-table-column>
+                <el-table-column prop="speciality" label="专业">
+                  <template v-slot="scope">
+                    <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.speciality"></el-input>
+                    <span v-else>{{ scope.row.speciality }}</span>
+                  </template>
+                </el-table-column>
                 <el-table-column fixed="right" label="操作" min-width="180" width="180" center>
                   <template #default="scope">
                     <el-button type="primary" size="small" v-if="!scope.row.isEdit"
@@ -478,7 +484,7 @@
             </div>
           </div>
         </el-tab-pane>
-        <el-tab-pane key="hlthirdInfo" label="学习经历" name="hlthirdInfo">
+        <el-tab-pane key="hlthirdInfo" label="教育经历" name="hlthirdInfo">
           <div class="layout_display_flex_y">
             <div class="layout_flex_1-y">
               <el-table :data="hlthirdData" border style="width: 100%; height: 100%" stripe highlight-current-row :key="hlthirdKey">
@@ -516,7 +522,7 @@
                     <span v-else>{{ scope.row.speciality }}</span>
                   </template>
                 </el-table-column>
-                <el-table-column prop="education" label="学历" show-overflow-tooltip>
+                <el-table-column prop="education" label="学历" width="180" show-overflow-tooltip>
                   <template v-slot="scope" >
                     <div v-if="scope.row.isEdit">
                       <el-select v-model="scope.row.education" clearable placeholder="请选择学历">
@@ -542,7 +548,7 @@
                     </div>
                   </template>
                 </el-table-column>
-                <el-table-column prop="academicDegree" label="学位" >
+                <el-table-column prop="academicDegree" label="学位" width="100">
                   <template #header>
                     <span>学位</span>
                     <el-tooltip class="box-item" effect="dark" placement="top">
@@ -1044,6 +1050,48 @@
                     <span v-else>{{ scope.row.title }}</span>
                   </template>
                 </el-table-column>
+                <el-table-column prop="image" label="委任聘书" min-width="160" >
+                  <template v-slot="scope">
+                    <div v-if="scope.row.isEdit">
+                      <el-upload
+                          ref="upload"
+                          v-model:file-list="hl13fileList"
+                          list-type="picture-card"
+                          :action="apiUrl + '/hltechnologyArchives/putAppointmentImage'"
+                          :headers="header"
+                          :data="{ socialNo: scope.row.socialNo, name: scope.row.name }"
+                          :on-success="hl13uploadSuccess"
+                          :on-preview="hl13handlePreview"
+                          :on-remove="handleRemove"
+                          :before-upload="beforeUpload"
+                          :auto-upload="false"
+                          :multiple="true"
+                          :show-file-list="true"
+                      >
+                        <el-icon> <Plus /></el-icon>
+                        <template #tip>
+                          <div class="el-upload__tip">只能上传 jpg/png 文件,且不超过 2MB</div>
+                        </template>
+                      </el-upload>
+                      <el-button style="margin-top: 10px" type="success" icon="Upload" @click="hl13submitUpload(scope.row)">上传到服务器</el-button>
+                      <el-dialog v-model="dialogVisible" append-to-body >
+                        <img w-full :src="dialogImageUrl"  />
+                      </el-dialog>
+                    </div>
+                    <div v-else class="demo-image__preview">
+                      <el-image
+                      style="width: 100px; height: 100px"
+                        :src="scope.row.url"
+                        :zoom-rate="1.2"
+                        :max-scale="7"
+                        :min-scale="0.2"
+                        :preview-src-list="scope.row.srcList"
+                        :preview-teleported="true"
+                        fit="cover"
+                      />
+                  </div>
+                  </template>
+                </el-table-column>
                 <el-table-column fixed="right" label="操作" min-width="180" width="180" center>
                   <template #default="scope">
                     <el-button type="primary" size="small" v-if="!scope.row.isEdit"
@@ -1449,12 +1497,6 @@ import type { UploadFile, UploadFiles, UploadProps, UploadUserFile, UploadRawFil
 import XEUtils from "xe-utils";
 import {QuestionFilled, StarFilled} from '@element-plus/icons-vue'
 import {
-  delTechnologyArchives10ByCode,
-  delTechnologyArchives12ByCode,
-  delTechnologyArchives13ByCode,
-  delTechnologyArchives14ByCode,
-  delTechnologyArchives5ByCode,
-  delTechnologyArchives7ByCode,
   delTechnologyArchivesHL1ByCode,
   delTechnologyArchivesHL2ByCode,
   delTechnologyArchivesHL3ByCode,
@@ -1463,22 +1505,22 @@ import {
   delTechnologyArchivesHL6ByCode,
   delTechnologyArchivesHL7ByCode, 
   delTechnologyArchivesHL9ByCode,
+  hldelTechnologyArchives5ByCode,
+  hldelTechnologyArchives7ByCode,
+  delTechnologyArchivesHL10ByCode,
+  delTechnologyArchivesHL12ByCode,
+  delTechnologyArchivesHL13ByCode,
+  delTechnologyArchivesHL14ByCode,
   selectHLImage1,
   selectHL1Image,
-  selectHL2Image,
   selectHL4Image,
   selectHL7Image,
+  selectHL13Image,
   setHLImage,
   setHL1Image,
-  setHL2Image,
   setHL4Image,
   setHL7Image,
-  saveTechnologyArchives10,
-  saveTechnologyArchives12,
-  saveTechnologyArchives13,
-  saveTechnologyArchives14,
-  saveTechnologyArchives5,
-  saveTechnologyArchives7,
+  setHL13Image,
   saveTechnologyArchivesHLMain,
   saveTechnologyArchivesHL1,
   saveTechnologyArchivesHL2,
@@ -1488,14 +1530,14 @@ import {
   saveTechnologyArchivesHL6,
   saveTechnologyArchivesHL7,
   saveTechnologyArchivesHL9,
+  hlsaveTechnologyArchives5,
+  hlsaveTechnologyArchives7,
+  saveTechnologyArchivesHL10,
+  saveTechnologyArchivesHL12,
+  saveTechnologyArchivesHL13,
+  saveTechnologyArchivesHL14,
   selectHLDictInfo,
   selectHLEmployeeInfo,
-  selectTechnologyArchives10,
-  selectTechnologyArchives12,
-  selectTechnologyArchives13,
-  selectTechnologyArchives14,
-  selectTechnologyArchives5,
-  selectTechnologyArchives7,
   selectTechnologyArchivesHL1,
   selectTechnologyArchivesHL2,
   selectTechnologyArchivesHL3,
@@ -1504,6 +1546,12 @@ import {
   selectTechnologyArchivesHL6,
   selectTechnologyArchivesHL7, 
   selectTechnologyArchivesHL9,
+  hlselectTechnologyArchives5,
+  hlselectTechnologyArchives7,
+  selectTechnologyArchivesHL10,
+  selectTechnologyArchivesHL12,
+  selectTechnologyArchivesHL13,
+  selectTechnologyArchivesHL14,
 } from "@/api/technology-archives/technology-archives";
 import {useUserStore} from "@/pinia/user-store";
 
@@ -1532,10 +1580,13 @@ onMounted(() => {
         selectHLImage1(baseInfoForm.value.socialNo)
           .then((res1) => {
             console.log(res1)
-            if(res1.data.image1 && res1.data != null){
-              personalimageurl.value = res1.data.image1
-              personalsrcList.value = [res1.data.image1]
-            }else{
+            if(res1.data != null){
+              if(res1.data.image1){
+                personalimageurl.value = res1.data.image1
+                personalsrcList.value = [res1.data.image1]
+              }
+            }
+            else{
               personalimageurl.value = defaultimageUrl.value
             }
           })   
@@ -1551,7 +1602,7 @@ let baseInfoForm = ref({
   birthday: '', // 出生年月
   nativePlace: '', // 籍贯
   politicCountenance: '', // 政治面貌
-  firstEducation: '', // 最高学历
+  firstEducation: '', // 第一学历
   firstSpeciality: '', // 专业
   firstGraduationSchool: '', // 毕业学校
   lastEducation: '', // 最高学历
@@ -1706,18 +1757,6 @@ const handleClick = (tab) => {
             }
           })
     }
-  } else if(editableTabsValue.value === 'fifthInfo'){
-    queryTechnologyArchives5()
-  } else if(editableTabsValue.value === 'seventhInfo'){
-    queryTechnologyArchives7()
-  } else if(editableTabsValue.value === 'tenthInfo'){
-    queryTechnologyArchives10()
-  } else if(editableTabsValue.value === 'twelfthInfo'){
-    queryTechnologyArchives12()
-  } else if(editableTabsValue.value === 'thirteenthInfo'){
-    queryTechnologyArchives13()
-  } else if(editableTabsValue.value === 'fourteenthInfo'){
-    queryTechnologyArchives14()
   } else if(editableTabsValue.value === 'hlfirstInfo'){
     queryTechnologyArchiveshl1()
   } else if(editableTabsValue.value === 'hlsecondInfo'){
@@ -1734,6 +1773,18 @@ const handleClick = (tab) => {
     queryTechnologyArchiveshl7()
   } else if(editableTabsValue.value === 'hlninthInfo'){
     queryTechnologyArchiveshl9()
+  } else if(editableTabsValue.value === 'fifthInfo'){
+    queryTechnologyArchives5()
+  } else if(editableTabsValue.value === 'seventhInfo'){
+    queryTechnologyArchives7()
+  } else if(editableTabsValue.value === 'tenthInfo'){
+    queryTechnologyArchives10()
+  } else if(editableTabsValue.value === 'twelfthInfo'){
+    queryTechnologyArchives12()
+  } else if(editableTabsValue.value === 'thirteenthInfo'){
+    queryTechnologyArchiveshl13()
+  } else if(editableTabsValue.value === 'fourteenthInfo'){
+    queryTechnologyArchiveshl14()
   }
 }
 const megTip = '核心数据有变更,与原始数据记录存在关联,请谨慎做更改,是否确认!!!'
@@ -1766,7 +1817,7 @@ const hlseventhData = ref([])
 let hlninthKey = ref(1)
 const hlninthData = ref([])
 const queryTechnologyArchives5 = () => {
-  selectTechnologyArchives5()
+  hlselectTechnologyArchives5()
     .then((res) => {
       res.forEach(row => {
         // 是否标记
@@ -1781,7 +1832,7 @@ const queryTechnologyArchives5 = () => {
     })
 }
 const queryTechnologyArchives7 = () => {
-  selectTechnologyArchives7()
+  hlselectTechnologyArchives7()
     .then((res) => {
       res.forEach(row => {
         // 是否标记
@@ -1796,7 +1847,7 @@ const queryTechnologyArchives7 = () => {
     })
 }
 const queryTechnologyArchives10 = () => {
-  selectTechnologyArchives10()
+  selectTechnologyArchivesHL10()
     .then((res) => {
       res.forEach(row => {
         // 是否标记
@@ -1811,7 +1862,7 @@ const queryTechnologyArchives10 = () => {
     })
 }
 const queryTechnologyArchives12 = () => {
-  selectTechnologyArchives12()
+  selectTechnologyArchivesHL12()
     .then((res) => {
       res.forEach(row => {
         // 是否标记
@@ -1825,23 +1876,8 @@ const queryTechnologyArchives12 = () => {
       twelfthData.value = []
     })
 }
-const queryTechnologyArchives13 = () => {
-  selectTechnologyArchives13()
-    .then((res) => {
-      res.forEach(row => {
-        // 是否标记
-        row['isEdit'] = false
-        // 是否新增
-        row['isAdd'] = false
-      })
-      thirteenthData.value = res
-    })
-    .catch(() => {
-      thirteenthData.value = []
-    })
-}
-const queryTechnologyArchives14 = () => {
-  selectTechnologyArchives14()
+const queryTechnologyArchiveshl14 = () => {
+  selectTechnologyArchivesHL14()
       .then((res) => {
         res.forEach(row => {
           // 是否标记
@@ -2054,7 +2090,45 @@ const queryTechnologyArchiveshl9 = () => {
       hlninthData.value = []
     })
 }
+const queryTechnologyArchiveshl13 = () => {
+  selectTechnologyArchivesHL13()
+    .then((res) => {
+    // 为每行初始化图片数据属性
+    const processedRows = res.map(row => {
+        // 使用响应式对象
+        return reactive({
+          ...row,
+          isEdit: false,
+          isAdd: false,
+          imageList: [], // 存储分割后的图片名
+          srcList: [],   // 存储完整图片URL
+          url: ''        // 当前显示的图片URL
+        });
+      });
 
+      // 并行处理所有图片请求
+      Promise.all(processedRows.map(row => 
+        selectHL13Image(row.socialNo, row.name)
+          .then(res1 => {
+            // 处理图片数据,过滤空值
+            console.log(res1)
+            const images = res1.data.image.split(',').filter(img => img.trim());
+            row.imageList = images;
+            row.srcList = images.map(img => uploadurl + img);
+            row.url = row.srcList[0] || ''; // 默认显示第一张图
+          })
+          .catch(() => {
+            row.srcList = []
+            row.url = ''
+          })
+        )).then(() => {
+          thirteenthData.value = processedRows
+        });
+      })
+    .catch(() => {
+      thirteenthData.value = []
+    })
+}
 // 新增行
 const onAddItem = () => {
   if(editableTabsValue.value === 'fifthInfo'){
@@ -2106,9 +2180,14 @@ const onAddItem = () => {
       time: '',
       name: '',
       title: '',
+      image: '',
       isEdit: true,
       isAdd: true,
+      isUpload: false,
+      isOversize: false,
+      isJPG: true
     })
+    hl13fileList.value = []
   } else if(editableTabsValue.value === 'fourteenthInfo'){
     fourteenthData.value.push({
       socialNo: baseInfoForm.value.socialNo,
@@ -2147,14 +2226,9 @@ const onAddItem = () => {
       workTime: '',
       speciality: '',
       id: '',
-      image: '',
       isEdit: true,
       isAdd: true,
-      isUpload: false,
-      isOversize: false,
-      isJPG: true
     })
-    hl2fileList.value = []
   } else if(editableTabsValue.value === 'hlthirdInfo'){
     hlthirdData.value.push({
       socialNo: baseInfoForm.value.socialNo,
@@ -2356,11 +2430,6 @@ const handlePreviewhl1= (uploadFile) => {
   console.log(fileList.value[0].name)
 }
 
-const handlePreviewhl2= (uploadFile) => {
-  dialogImageUrl.value = uploadFile.url
-  dialogVisible.value = true
-  console.log(hl2fileList.value[0].name)
-}
 
 const handlePreviewhl4= (uploadFile) => {
   dialogImageUrl.value = uploadFile.url
@@ -2431,8 +2500,8 @@ const updatehlfirstInfo = (row) => {
   }
   if (row.isAdd) {
     let fe = 0
-    for (let num in hlsixthData.value) {
-      if (hlsixthData.value[num].getTime === row.getTime) {
+    for (let num in hlfirstData.value) {
+      if (hlfirstData.value[num].getTime === row.getTime) {
         fe++
       }
     }
@@ -2448,7 +2517,8 @@ const updatehlfirstInfo = (row) => {
     }  
   }else {
     let oldGetTime = row.oldRow.getTime
-    if (oldGetTime !== row.getTime) {
+    let oldTitle = row.oldRow.title
+    if (oldGetTime !== row.getTime || oldTitle !== row.title) {
       ElMessageBox.confirm(megTip, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
@@ -2500,8 +2570,13 @@ const callSavehlfirstInfo = (row, oldGetTime) => {
         } else {
           queryTechnologyArchiveshl1()
         }
-        console.log(url1.value)
-        setHL1Image(row.socialNo,row.getTime,url1.value)  
+        if(url1.value){
+          console.log(url1.value)
+          setHL1Image(row.socialNo,row.getTime,url1.value)  
+        }else{
+          setHL1Image(row.socialNo,row.getTime,row.image)
+        }
+        
         fileList.value = []
         url1s.value = []
       })
@@ -2548,9 +2623,6 @@ const edithlsecondInfo = (row) => {
   // 备份原始数据
   row['oldRow'] = JSON.parse(JSON.stringify(row))
   row.isEdit = true
-  if(row.image != null){
-    row.isUpload = true
-  }
 }
 // 取消
 const cancelhlsecondInfo = (row, index) => {
@@ -2563,48 +2635,8 @@ const cancelhlsecondInfo = (row, index) => {
       row[i] = row.oldRow[i]
     }
   }
-  if(!row.isUpload){
-    hl2fileList.value = []
-  } 
-  if(row.beginTime == null || row.endTime == null || row.workTime == null){
-    hl2fileList.value = []
-  }
-
   hlsecondKey.value = Math.random()
 }
-
-//上传
-const hl2submitUpload = (row) => {
-  if(row.isOversize && !row.isJPG){
-    row.isUpload = false
-  }else{
-    upload.value!.submit();
-    row.isUpload = true 
-  }
-}
-
-//上传图片
-const hl2fileList = ref([])
- 
-const hl2url = ref("")
-function hl2uploadSuccess(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) {
-  hl2url.value = response.data.data.path
-  const index = XEUtils.findLastIndexOf(hl2fileList.value, (item: UploadUserFile) => {
-    return item.uid === uploadFile.uid;
-  })
-  if (response.code === 200) {
-    hl2fileList.value[index].url = uploadurl + hl2url.value
-    ElMessage.success("上传成功");
-  } else {
-    hl2fileList.value[index].status = 'fail'
-    ElMessage.error("上传失败");
-  }
-}
-
-//查看图片
-const hl2srcList = ref([])
-const workurl = ref("")
-
 // 保存
 const updatehlsecondInfo = (row) => {
   if (!row.socialNo) {
@@ -2619,63 +2651,32 @@ const updatehlsecondInfo = (row) => {
   if (!row.isAdd && row.socialNo !== row.oldRow.socialNo) {
     row.oldSocialNo = row.oldRow.socialNo
   }
-  if (row.isAdd) {
-    let fe = 0
-    for (let num in hlsecondData.value) {
-      if (hlsecondData.value[num].workTime === row.workTime) {
-        fe++
-      }
-    }
-    if (fe === 2) {
+  callSavehlsecondInfo(row)
+}
+
+const callSavehlsecondInfo = (row) => {
+  let title = '请确认是否保存<span style="color:#d12020;">' + row.title + '</span>?'
+  ElMessageBox.confirm(title, {
+    cancelButtonText: '取消',
+    confirmButtonText: '确定',
+    type: 'warning',
+    distinguishCancelAndClose: true,
+    dangerouslyUseHTMLString: true
+  }).then(() => {
+    saveTechnologyArchivesHL2(row).then((res) => {
       ElMessage({
-        type: "warning",
-        message: "存在重复的工作经历,请核对!",
+        type: "success",
+        message: res.cg,
         duration: 2500,
         showClose: true,
       });
-    } else {
-      callSavehlsecondInfo(row)
-    }  
-  }else {
-    callSavehlsecondInfo(row)
-  }
-}
-
-const callSavehlsecondInfo = (row) => {
-  if(!row.isUpload){
-    ElMessage({
-      type: "warning",
-      message: "图片还未上传!",
-      duration: 2500,
-      showClose: true,
-    });
-  }else{
-    let title = '请确认是否保存<span style="color:#d12020;">' + row.title + '</span>?'
-    ElMessageBox.confirm(title, {
-      cancelButtonText: '取消',
-      confirmButtonText: '确定',
-      type: 'warning',
-      distinguishCancelAndClose: true,
-      dangerouslyUseHTMLString: true
-    }).then(() => {
-      saveTechnologyArchivesHL2(row).then((res) => {
-        ElMessage({
-          type: "success",
-          message: res.cg,
-          duration: 2500,
-          showClose: true,
-        });
-        queryTechnologyArchiveshl2()
-        // setHL2Image(row.socialNo,row.workTime,hl2url.value)
-        hl2fileList.value = []  
-      })
-    }).catch((action) => {
-      if (action === 'cancel') {
-        queryTechnologyArchiveshl2()
-        hl2fileList.value = [] 
-      }
+      queryTechnologyArchiveshl2()
     })
-  }
+  }).catch((action) => {
+    if (action === 'cancel') {
+      queryTechnologyArchiveshl2()
+    }
+  })
 }
 
 const deletehlsecondInfo = (row) => {
@@ -2787,7 +2788,7 @@ const callSaveFifthInfo = (row, oldTime) => {
     distinguishCancelAndClose: true,
     dangerouslyUseHTMLString: true
   }).then(() => {
-    saveTechnologyArchives5(row).then((res) => {
+    hlsaveTechnologyArchives5(row).then((res) => {
       ElMessage({
         type: "success",
         message: res.cg,
@@ -2796,7 +2797,7 @@ const callSaveFifthInfo = (row, oldTime) => {
       });
       if (oldTime !== null && oldTime !== row.time) {
         // 删除原始数据
-        delTechnologyArchives5ByCode(row.socialNo, oldTime).then((res) => {
+        hldelTechnologyArchives5ByCode(row.socialNo, oldTime).then((res) => {
           queryTechnologyArchives5()
         })
       } else {
@@ -2819,7 +2820,7 @@ const deleteFifthInfo = (row) => {
     distinguishCancelAndClose: true,
     dangerouslyUseHTMLString: true
   }).then(() => {
-    delTechnologyArchives5ByCode(row.socialNo, row.time).then((res) => {
+    hldelTechnologyArchives5ByCode(row.socialNo, row.time).then((res) => {
       ElMessage({
         type: "success",
         message: res.cg,
@@ -2882,7 +2883,7 @@ const callSaveSeventhInfo = (row) => {
     distinguishCancelAndClose: true,
     dangerouslyUseHTMLString: true
   }).then(() => {
-    saveTechnologyArchives7(row).then((res) => {
+    hlsaveTechnologyArchives7(row).then((res) => {
       ElMessage({
         type: "success",
         message: res.cg,
@@ -2908,7 +2909,7 @@ const deleteSeventhInfo = (row) => {
     distinguishCancelAndClose: true,
     dangerouslyUseHTMLString: true
   }).then(() => {
-    delTechnologyArchives7ByCode(row.socialNo, row.id).then((res) => {
+    hldelTechnologyArchives7ByCode(row.socialNo, row.id).then((res) => {
       ElMessage({
         type: "success",
         message: res.cg,
@@ -2971,7 +2972,7 @@ const callSaveTenthInfo = (row) => {
     distinguishCancelAndClose: true,
     dangerouslyUseHTMLString: true
   }).then(() => {
-    saveTechnologyArchives10(row).then((res) => {
+    saveTechnologyArchivesHL10(row).then((res) => {
       ElMessage({
         type: "success",
         message: res.cg,
@@ -2997,7 +2998,7 @@ const deleteTenthInfo = (row) => {
     distinguishCancelAndClose: true,
     dangerouslyUseHTMLString: true
   }).then(() => {
-    delTechnologyArchives10ByCode(row.socialNo, row.id).then((res) => {
+    delTechnologyArchivesHL10ByCode(row.socialNo, row.id).then((res) => {
       ElMessage({
         type: "success",
         message: res.cg,
@@ -3060,7 +3061,7 @@ const callSaveTwelfthInfo = (row) => {
     distinguishCancelAndClose: true,
     dangerouslyUseHTMLString: true
   }).then(() => {
-    saveTechnologyArchives12(row).then((res) => {
+    saveTechnologyArchivesHL12(row).then((res) => {
       ElMessage({
         type: "success",
         message: res.cg,
@@ -3086,7 +3087,7 @@ const deleteTwelfthInfo = (row) => {
     distinguishCancelAndClose: true,
     dangerouslyUseHTMLString: true
   }).then(() => {
-    delTechnologyArchives12ByCode(row.socialNo, row.id).then((res) => {
+    delTechnologyArchivesHL12ByCode(row.socialNo, row.id).then((res) => {
       ElMessage({
         type: "success",
         message: res.cg,
@@ -3123,6 +3124,45 @@ const cancelThirteenthInfo = (row, index) => {
   }
   thirteenthKey.value = Math.random()
 }
+const hl13handlePreview= (uploadFile) => {
+  dialogImageUrl.value = uploadFile.url
+  dialogVisible.value = true
+  console.log(hl13fileList.value[0].name)
+}
+
+const hl13submitUpload = (row) => {
+  if(row.isOversize && !row.isJPG){
+    row.isUpload = false
+  }else{
+    upload.value!.action = `${apiUrl}/hltechnologyArchives/putAppointmentImage?socialNo=${row.socialNo}&name=${row.name}`
+    upload.value!.submit();
+    row.isUpload = true 
+  }
+}
+//上传图片
+const hl13fileList = ref([])
+const url13s = ref([])
+const url13 = ref("")
+function hl13uploadSuccess(response: any, uploadFile: UploadFile) {
+  console.log(response.data.urls.length)
+  url13s.value.push(response.data.urls)  
+  console.log(url13s.value)
+  url13.value = url13s.value.join(",") 
+  console.log(url13.value)
+  const index = XEUtils.findLastIndexOf(hl13fileList.value, (item: UploadUserFile) => {
+    return item.uid === uploadFile.uid;
+  })
+  if (response.code === 200) {
+    for(let i=0; i<url13s.value.length; i++){
+      hl13fileList.value[index].url = uploadurl + url13s.value[i]
+    }
+    ElMessage.success("上传成功");
+  } else {
+    hl13fileList.value[index].status = 'fail'
+    ElMessage.error("上传失败");
+  }
+}
+
 // 保存
 const updateThirteenthInfo = (row) => {
   if (!row.socialNo) {
@@ -3137,7 +3177,25 @@ const updateThirteenthInfo = (row) => {
   if (!row.isAdd && row.socialNo !== row.oldRow.socialNo) {
     row.oldSocialNo = row.oldRow.socialNo
   }
-  callSaveThirteenthInfo(row)
+  let oldName = row.oldRow.name
+  if (oldName !== row.name) {
+    ElMessageBox.confirm(megTip, {
+      cancelButtonText: '取消',
+      confirmButtonText: '确定',
+      type: 'warning',
+      distinguishCancelAndClose: true,
+      dangerouslyUseHTMLString: true
+    }).then(() => {
+      callSaveThriteenthInfo(row)
+    }).catch((action) => {
+      if (action === 'cancel') {
+        queryTechnologyArchiveshl13()
+      }
+    })
+  } else {
+    callSaveThirteenthInfo(row)
+  }
+  
 }
 
 const callSaveThirteenthInfo = (row) => {
@@ -3149,18 +3207,26 @@ const callSaveThirteenthInfo = (row) => {
     distinguishCancelAndClose: true,
     dangerouslyUseHTMLString: true
   }).then(() => {
-    saveTechnologyArchives13(row).then((res) => {
+    saveTechnologyArchivesHL13(row).then((res) => {
       ElMessage({
         type: "success",
         message: res.cg,
         duration: 2500,
         showClose: true,
       });
-      queryTechnologyArchives13()
+      if(url13.value){
+        setHL13Image(row.socialNo,row.name,url13.value)
+      }else{
+        setHL13Image(row.socialNo,row.name,row.image)
+      }
+      hl13fileList.value = [] 
+      url13s.value = []
+      queryTechnologyArchiveshl13()
     })
   }).catch((action) => {
     if (action === 'cancel') {
-      queryTechnologyArchives13()
+      queryTechnologyArchiveshl13()
+      hl13fileList.value = []
     }
   })
 }
@@ -3175,18 +3241,18 @@ const deleteThirteenthInfo = (row) => {
     distinguishCancelAndClose: true,
     dangerouslyUseHTMLString: true
   }).then(() => {
-    delTechnologyArchives13ByCode(row.socialNo, row.id).then((res) => {
+    delTechnologyArchivesHL13ByCode(row.socialNo, row.id).then((res) => {
       ElMessage({
         type: "success",
         message: res.cg,
         duration: 2500,
         showClose: true,
       });
-      queryTechnologyArchives13()
+      queryTechnologyArchiveshl13()
     })
   }).catch((action) => {
     if (action === 'cancel') {
-      queryTechnologyArchives13()
+      queryTechnologyArchiveshl13()
     }
   })
 }
@@ -3250,18 +3316,18 @@ const callSaveFourteenthInfo = (row) => {
     distinguishCancelAndClose: true,
     dangerouslyUseHTMLString: true
   }).then(() => {
-    saveTechnologyArchives14(row).then((res) => {
+    saveTechnologyArchivesHL14(row).then((res) => {
       ElMessage({
         type: "success",
         message: res.cg,
         duration: 2500,
         showClose: true,
       });
-      queryTechnologyArchives14()
+      queryTechnologyArchiveshl14()
     })
   }).catch((action) => {
     if (action === 'cancel') {
-      queryTechnologyArchives14()
+      queryTechnologyArchiveshl14()
     }
   })
 }
@@ -3276,18 +3342,18 @@ const deleteFourteenthInfo = (row) => {
     distinguishCancelAndClose: true,
     dangerouslyUseHTMLString: true
   }).then(() => {
-    delTechnologyArchives14ByCode(row.socialNo, row.id).then((res) => {
+    delTechnologyArchivesHL14ByCode(row.socialNo, row.id).then((res) => {
       ElMessage({
         type: "success",
         message: res.cg,
         duration: 2500,
         showClose: true,
       });
-      queryTechnologyArchives14()
+      queryTechnologyArchiveshl14()
     })
   }).catch((action) => {
     if (action === 'cancel') {
-      queryTechnologyArchives14()
+      queryTechnologyArchiveshl14()
     }
   })
 }
@@ -3300,7 +3366,7 @@ const totalFormat = (data) => {
       + Number.parseFloat(data.other === '' ? '0' : data.other)
 }
 
-// 学习经历增删改存开始
+// 教育经历增删改存开始
 // 编辑
 const edithlthirdInfo = (row) => {
   // 备份原始数据
@@ -3387,7 +3453,7 @@ const deletehlthirdInfo = (row) => {
     }
   })
 }
-// 学习经历增删改存结束
+// 教育经历增删改存结束
 
 // 培训经历增删改存开始
 // 编辑
@@ -3485,8 +3551,25 @@ const updatehlfourthInfo = (row) => {
     } else {
       callSavehlfourthInfo(row)
     }  
-  }else{
-    callSavehlfourthInfo(row)
+  } else {
+    let oldName = row.oldRow.name
+    if (oldName !== row.name) {
+      ElMessageBox.confirm(megTip, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+        distinguishCancelAndClose: true,
+        dangerouslyUseHTMLString: true
+      }).then(() => {
+        callSavehlfourthInfo(row)
+      }).catch((action) => {
+        if (action === 'cancel') {
+          queryTechnologyArchiveshl4()
+        }
+      })
+    } else {
+      callSavehlfourthInfo(row)
+    }
   }
   // 
 }
@@ -3516,7 +3599,11 @@ const callSavehlfourthInfo = (row) => {
           duration: 2500,
           showClose: true,
         });
-        setHL4Image(row.socialNo,row.beginTime,hl4url.value)
+        if(hl4url.value){
+          setHL4Image(row.socialNo,row.beginTime,hl4url.value)
+        }else{
+          setHL4Image(row.socialNo,row.beginTime,row.image)
+        }
         hl4fileList.value = [] 
         hl4urls.value = []
         queryTechnologyArchiveshl4()
@@ -3903,8 +3990,13 @@ const callSavehlseventhInfo = (row, oldApprovalTime) => {
         } else {
           queryTechnologyArchiveshl7()
         }
-        console.log(hl7url.value)
-        setHL7Image(row.socialNo,row.approvalTime,hl7url.value)
+        if(hl7url.value){
+          console.log(hl7url.value)
+          setHL7Image(row.socialNo,row.approvalTime,hl7url.value)
+        }else{
+          setHL7Image(row.socialNo,row.approvalTime,row.image)
+        }
+        
         hl7fileList.value = []
         hl7urls.value = []  
       })

+ 398 - 33
src/views/technology-archives/TechnologyArchivesMain.vue

@@ -501,6 +501,115 @@
             </div>
           </div>
         </el-tab-pane>
+        <el-tab-pane key="sixteenthInfo" label="教育经历" name="sixteenthInfo">
+          <div class="layout_display_flex_y">
+            <div class="layout_flex_1-y">
+              <el-table :data="sixteenthData" border style="width: 100%; height: 100%" stripe highlight-current-row :key="sixteenthKey">
+                <el-table-column type="index" prop="no" label="序号" width="80" />
+                <el-table-column prop="id" label="id号" width="80" v-if="false"/>
+                <el-table-column prop="socialNo" label="身份证号" width="180">
+                  <template v-slot="scope">
+                    <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.socialNo"></el-input>
+                    <span v-else>{{ scope.row.socialNo }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="beginTime" label="开始时间" width="200">
+                  <template v-slot="scope">
+                    <el-date-picker v-if="scope.row.isEdit" v-model="scope.row.beginTime" type="date" style="width: 100%"
+                                    format="YYYY-MM-DD" value-format="YYYY-MM-DD"/>
+                    <span v-else>{{ scope.row.beginTime }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="endTime" label="结束时间" width="200">
+                  <template v-slot="scope">
+                    <el-date-picker v-if="scope.row.isEdit" v-model="scope.row.endTime" type="date" style="width: 100%"
+                                    format="YYYY-MM-DD" value-format="YYYY-MM-DD"/>
+                    <span v-else>{{ scope.row.endTime }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="schoolName" label="院校名称" width="180">
+                  <template v-slot="scope">
+                    <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.schoolName"></el-input>
+                    <span v-else>{{ scope.row.schoolName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="speciality" label="所学专业" show-overflow-tooltip>
+                  <template v-slot="scope">
+                    <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.speciality"></el-input>
+                    <span v-else>{{ scope.row.speciality }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="education" label="学历" width="180" show-overflow-tooltip>
+                  <template v-slot="scope" >
+                    <div v-if="scope.row.isEdit">
+                      <el-select v-model="scope.row.education" clearable placeholder="请选择学历">
+                        <el-option v-for="item in dictData.education" :key="item.code" :label="item.name"
+                                   :value="item.code">
+                            <span style="float: left">{{ item.name }}</span>
+                            <span style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">
+                              {{ item.code }}
+                            </span>
+                          </el-option>
+                      </el-select>
+                    </div>
+                    <div v-else>
+                      <el-select v-model="scope.row.education" disabled placeholder="请选择学历">
+                        <el-option v-for="item in dictData.education" :key="item.code" :label="item.name"
+                                   :value="item.code">
+                          <span style="float: left">{{ item.name }}</span>
+                          <span style="float: right; color: var(--el-text-color-secondary); font-size: 13px;">
+                            {{ item.code }}
+                          </span>          
+                        </el-option>
+                      </el-select>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="academicDegree" label="学位" width="100">
+                  <template #header>
+                    <span>学位</span>
+                    <el-tooltip class="box-item" effect="dark" placement="top">
+                      <template #content>注:<br />请选择与获得的学位证书相应的选项。</template>
+                      <el-icon color="red" size="14"><QuestionFilled /></el-icon>
+                    </el-tooltip>
+                  </template>
+                  <template v-slot="scope" >
+                    <div v-if="scope.row.isEdit">
+                      <el-select v-model="scope.row.academicDegree" clearable placeholder="请选择学位">
+                        <el-option v-for="option in academicdegree" :key="option.code" :label="option.name"
+                                   :value="option.code"></el-option>
+                      </el-select>
+                    </div>
+                    <div v-else>
+                      <el-select v-model="scope.row.academicDegree" disabled placeholder="请选择学位">
+                        <el-option v-for="option in academicdegree" :key="option.code" :label="option.name"
+                                   :value="option.code"></el-option>
+                      </el-select>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="comment" label="备注" width="300" show-overflow-tooltip>
+                  <template v-slot="scope">
+                    <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.comment"></el-input>
+                    <span v-else>{{ scope.row.comment }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column fixed="right" label="操作" min-width="180" width="180" center>
+                  <template #default="scope">
+                    <el-button type="primary" size="small" v-if="!scope.row.isEdit"
+                               @click="editsixteenthInfo(scope.row)">编辑</el-button>
+                    <el-button type="primary" size="small" v-if="scope.row.isEdit"
+                               @click="updatesixteenthInfo(scope.row)">保存</el-button>
+                    <el-button type="primary" size="small" v-if="scope.row.isEdit"
+                               @click="cancelsixteenthInfo(scope.row, scope.$index)">取消</el-button>
+                    <el-button type="danger" size="small" @click.prevent="deletesixteenthInfo(scope.row)">
+                      删除</el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+          </div>
+        </el-tab-pane>
         <el-tab-pane key="fourthInfo" label="学习培训情况" name="fourthInfo">
           <div class="layout_display_flex_y">
             <div class="layout_flex_1-y">
@@ -1092,6 +1201,48 @@
                     <span v-else>{{ scope.row.title }}</span>
                   </template>
                 </el-table-column>
+                <el-table-column prop="image" label="委任聘书" min-width="160" >
+                  <template v-slot="scope">
+                    <div v-if="scope.row.isEdit">
+                      <el-upload
+                          ref="upload"
+                          v-model:file-list="appointmentfileList"
+                          list-type="picture-card"
+                          :action="apiUrl + '/technologyArchives/putAppointmentImage'"
+                          :headers="header"
+                          :data="{ socialNo: scope.row.socialNo, name: scope.row.name }"
+                          :on-success="appointmentuploadSuccess"
+                          :on-preview="appointmenthandlePreview"
+                          :on-remove="handleRemove"
+                          :before-upload="beforeUpload"
+                          :auto-upload="false"
+                          :multiple="true"
+                          :show-file-list="true"
+                      >
+                        <el-icon> <Plus /></el-icon>
+                        <template #tip>
+                          <div class="el-upload__tip">只能上传 jpg/png 文件,且不超过 2MB</div>
+                        </template>
+                      </el-upload>
+                      <el-button style="margin-top: 10px" type="success" icon="Upload" @click="appoinmentsubmitUpload(scope.row)">上传到服务器</el-button>
+                      <el-dialog v-model="dialogVisible" append-to-body >
+                        <img w-full :src="dialogImageUrl"  />
+                      </el-dialog>
+                    </div>
+                    <div v-else class="demo-image__preview">
+                      <el-image
+                      style="width: 100px; height: 100px"
+                        :src="scope.row.url"
+                        :zoom-rate="1.2"
+                        :max-scale="7"
+                        :min-scale="0.2"
+                        :preview-src-list="scope.row.srcList"
+                        :preview-teleported="true"
+                        fit="cover"
+                      />
+                  </div>
+                  </template>
+                </el-table-column>
                 <el-table-column fixed="right" label="操作" min-width="180" width="180" center>
                   <template #default="scope">
                     <el-button type="primary" size="small" v-if="!scope.row.isEdit"
@@ -1201,6 +1352,7 @@ import {
   delTechnologyArchives12ByCode,
   delTechnologyArchives13ByCode,
   delTechnologyArchives14ByCode,
+  delTechnologyArchives16ByCode,
   delTechnologyArchives1ByCode,
   delTechnologyArchives2ByCode,
   delTechnologyArchives3ByCode,
@@ -1214,14 +1366,17 @@ import {
   selectImage2,
   selectTrainingImage,
   selectExamineImage,
+  selectAppointmentImage,
   setImage1,
   setImage2,
   setTrainingImage,
   setExamineImage,
+  setAppointmentImage,
   saveTechnologyArchives10,
   saveTechnologyArchives12,
   saveTechnologyArchives13,
   saveTechnologyArchives14,
+  saveTechnologyArchives16,
   saveTechnologyArchives2,
   saveTechnologyArchives3,
   saveTechnologyArchives4,
@@ -1237,6 +1392,7 @@ import {
   selectTechnologyArchives12,
   selectTechnologyArchives13,
   selectTechnologyArchives14,
+  selectTechnologyArchives16,
   selectTechnologyArchives2,
   selectTechnologyArchives3,
   selectTechnologyArchives4,
@@ -1255,6 +1411,7 @@ const learnOptions = [{ code: '1', name: '讲座' }, { code: '2', name: '学习
 const resultOptions = [{ code: '1', name: '通过' }, { code: '2', name: '不通过' }]
 const assessOptions = [{ code: '1', name: '笔试' }, { code: '2', name: '面试' }, { code: '3', name: '综合考评' }]
 const verifyOptions = [{ code: '1', name: '通过' }, { code: '2', name: '不通过' }, { code: '9', name: '其他' }]
+const academicdegree = [{ code: '1', name: '无' }, { code: '2', name: '学士' }, { code: '3', name: '硕士' }, { code: '4', name: '博士' }]
 const userInfo = useUserStore().userInfo
 onMounted(() => {
   nextTick(() => {
@@ -1436,6 +1593,8 @@ const handleClick = (tab) => {
     queryTechnologyArchives13()
   } else if(editableTabsValue.value === 'fourteenthInfo'){
     queryTechnologyArchives14()
+  } else if(editableTabsValue.value === 'sixteenthInfo'){
+    queryTechnologyArchives16()
   }
 }
 const megTip = '核心数据有变更,与原始数据记录存在关联,请谨慎做更改,是否确认!!!'
@@ -1463,6 +1622,8 @@ let thirteenthKey = ref(1)
 const thirteenthData = ref([])
 let fourteenthKey = ref(1)
 const fourteenthData = ref([])
+let sixteenthKey = ref(1)
+const sixteenthData = ref([])
 const queryTechnologyArchives1 = () => {
   selectTechnologyArchives1()
     .then((res) => {
@@ -1502,7 +1663,6 @@ const queryTechnologyArchives1 = () => {
       firstData.value = []
     })
 }
-const imageList2 = ref([])
 const queryTechnologyArchives2 = () => {
   selectTechnologyArchives2()
     .then((res) => {
@@ -1712,6 +1872,45 @@ const queryTechnologyArchives12 = () => {
 }
 const queryTechnologyArchives13 = () => {
   selectTechnologyArchives13()
+    .then((res) => {
+       // 为每行初始化图片数据属性
+     const processedRows = res.map(row => {
+        // 使用响应式对象
+        return reactive({
+          ...row,
+          isEdit: false,
+          isAdd: false,
+          imageList: [], // 存储分割后的图片名
+          srcList: [],   // 存储完整图片URL
+          url: ''        // 当前显示的图片URL
+        });
+      });
+
+      // 并行处理所有图片请求
+      Promise.all(processedRows.map(row => 
+        selectAppointmentImage(row.socialNo, row.name)
+          .then(res1 => {
+            // 处理图片数据,过滤空值
+            console.log(res1)
+            const images = res1.data.image.split(',').filter(img => img.trim());
+            row.imageList = images;
+            row.srcList = images.map(img => uploadurl + img);
+            row.url = row.srcList[0] || ''; // 默认显示第一张图
+          })
+          .catch(() => {
+            row.srcList = []
+            row.url = ''
+          })
+      )).then(() => {
+       thirteenthData.value = processedRows
+      });
+    })
+    .catch(() => {
+      thirteenthData.value = []
+    })
+}
+const queryTechnologyArchives14 = () => {
+  selectTechnologyArchives14()
     .then((res) => {
       res.forEach(row => {
         // 是否标记
@@ -1719,26 +1918,26 @@ const queryTechnologyArchives13 = () => {
         // 是否新增
         row['isAdd'] = false
       })
-      thirteenthData.value = res
+      fourteenthData.value = res
     })
     .catch(() => {
-      thirteenthData.value = []
+      fourteenthData.value = []
     })
 }
-const queryTechnologyArchives14 = () => {
-  selectTechnologyArchives14()
-      .then((res) => {
-        res.forEach(row => {
-          // 是否标记
-          row['isEdit'] = false
-          // 是否新增
-          row['isAdd'] = false
-        })
-        fourteenthData.value = res
-      })
-      .catch(() => {
-        fourteenthData.value = []
+const queryTechnologyArchives16 = () => {
+  selectTechnologyArchives16()
+    .then((res) => {
+      res.forEach(row => {
+        // 是否标记
+        row['isEdit'] = false
+        // 是否新增
+        row['isAdd'] = false
       })
+      sixteenthData.value = res
+    })
+    .catch(() => {
+      sixteenthData.value = []
+    })
 }
 // 新增行
 const onAddItem = () => {
@@ -1880,9 +2079,14 @@ const onAddItem = () => {
       time: '',
       name: '',
       title: '',
+      image: '',
       isEdit: true,
       isAdd: true,
+      isUpload: false,
+      isOversize: false,
+      isJPG: true
     })
+    appointmentfileList.value = []
   } else if(editableTabsValue.value === 'fourteenthInfo'){
     fourteenthData.value.push({
       socialNo: baseInfoForm.value.socialNo,
@@ -1896,6 +2100,21 @@ const onAddItem = () => {
       isEdit: true,
       isAdd: true,
     })
+  } else if(editableTabsValue.value === 'sixteenthInfo'){
+    sixteenthData.value.push({
+      socialNo: baseInfoForm.value.socialNo,
+      beginTime: '',
+      endTime: '',
+      schoolName: '',
+      speciality: '',
+      education: '',
+      academicDegree: '',
+      id: '',
+      account: '',
+      comment: '',
+      isEdit: true,
+      isAdd: true,
+    })
   }
 }
 
@@ -1978,9 +2197,6 @@ const header = {
   token: localStorage.token, 
 }
 
-//查看图片
-const srcList1 = ref([])
-const srcurl1 = ref("") 
 
 //上传
 const submitUploadta1 = (row) => {
@@ -2016,8 +2232,6 @@ function uploadSuccess(response: any, uploadFile: UploadFile) {
   }
 }
 
-const srcList2 = ref([])
-const srcurl2 = ref("")
 
 const url2s = ref([])
 const url2 = ref("")
@@ -2134,8 +2348,13 @@ const callSaveFirstInfo = (row, oldGetTime) => {
         } else {
           queryTechnologyArchives1()
         }
-        console.log(url1.value)
-        setImage1(row.socialNo,row.getTime,url1.value)  
+        if(url1.value){
+          console.log(url1.value)
+          setImage1(row.socialNo,row.getTime,url1.value)  
+        }else{
+          setImage1(row.socialNo,row.getTime,row.image)  
+        }
+        
         fileList.value = []
         url1s.value = []
       })
@@ -2299,8 +2518,12 @@ const callSaveSecondInfo = (row, oldNo) => {
         } else {
           queryTechnologyArchives2()
         }
-        console.log(url2.value)
-        setImage2(row.socialNo,row.no,url2.value)
+        if(url2.value){
+          console.log(url2.value)
+          setImage2(row.socialNo,row.no,url2.value)
+        }else{
+          setImage2(row.socialNo,row.no,row.image)
+        }
         fileList2.value = []  
         url2s.value = []
       })
@@ -2495,9 +2718,6 @@ const traininghandlePreview= (uploadFile) => {
   dialogVisible.value = true
   console.log(trainingfileList.value[0].name)
 }
-//查看图片
-const trainingsrcList = ref([])
-const trainingurl = ref("")
 
 // 保存
 const updateFourthInfo = (row) => {
@@ -2564,7 +2784,11 @@ const callSaveFourthInfo = (row) => {
           showClose: true,
         });
         queryTechnologyArchives4()
-        setTrainingImage(row.socialNo,row.beginTime,turl.value)
+        if(turl.value){
+          setTrainingImage(row.socialNo,row.beginTime,turl.value)
+        }else{
+          setTrainingImage(row.socialNo,row.beginTime,row.image)
+        }
         trainingfileList.value = []
         turls.value = []
       })
@@ -2980,9 +3204,6 @@ const examinehandlePreview= (uploadFile) => {
   dialogVisible.value = true
   console.log(examinefileList.value[0].name)
 }
-//查看图片
-const examinesrcList = ref([])
-const examineurl = ref("")
 
 // 保存
 const updateNinthInfo = (row) => {
@@ -3045,7 +3266,11 @@ const callSaveNinthInfo = (row) => {
           showClose: true,
         });
         queryTechnologyArchives9()
-        setExamineImage(row.socialNo,row.time,url9.value)
+        if(url9.value){
+          setExamineImage(row.socialNo,row.time,url9.value)
+        }else{
+          setExamineImage(row.socialNo,row.time,row.image)
+        }
         examinefileList.value = []
         urls9.value = []
       })
@@ -3269,6 +3494,9 @@ const editThirteenthInfo = (row) => {
   // 备份原始数据
   row['oldRow'] = JSON.parse(JSON.stringify(row))
   row.isEdit = true
+  if(row.image != null){
+    row.isUpload = true
+  }
 }
 // 取消
 const cancelThirteenthInfo = (row, index) => {
@@ -3283,6 +3511,46 @@ const cancelThirteenthInfo = (row, index) => {
   }
   thirteenthKey.value = Math.random()
 }
+
+const appointmenthandlePreview= (uploadFile) => {
+  dialogImageUrl.value = uploadFile.url
+  dialogVisible.value = true
+  console.log(appointmentfileList.value[0].name)
+}
+
+const appoinmentsubmitUpload = (row) => {
+  if(row.isOversize && !row.isJPG){
+    row.isUpload = false
+  }else{
+    upload.value!.action = `${apiUrl}/technologyArchives/putAppointmentImage?socialNo=${row.socialNo}&name=${row.name}`
+    upload.value!.submit();
+    row.isUpload = true 
+  }
+}
+//上传图片
+const appointmentfileList = ref([])
+const url13s = ref([])
+const url13 = ref("")
+function appointmentuploadSuccess(response: any, uploadFile: UploadFile) {
+  console.log(response.data.urls.length)
+  url13s.value.push(response.data.urls)  
+  console.log(url13s.value)
+  url13.value = url13s.value.join(",") 
+  console.log(url13.value)
+  const index = XEUtils.findLastIndexOf(appointmentfileList.value, (item: UploadUserFile) => {
+    return item.uid === uploadFile.uid;
+  })
+  if (response.code === 200) {
+    for(let i=0; i<url13s.value.length; i++){
+      appointmentfileList.value[index].url = uploadurl + url13s.value[i]
+    }
+    ElMessage.success("上传成功");
+  } else {
+    appointmentfileList.value[index].status = 'fail'
+    ElMessage.error("上传失败");
+  }
+}
+
 // 保存
 const updateThirteenthInfo = (row) => {
   if (!row.socialNo) {
@@ -3316,11 +3584,19 @@ const callSaveThirteenthInfo = (row) => {
         duration: 2500,
         showClose: true,
       });
+      if(url13.value){
+        setAppointmentImage(row.socialNo,row.name,url13.value)
+      }else{
+        setAppointmentImage(row.socialNo,row.name,row.image)
+      }
+      appointmentfileList.value = [] 
+      url13s.value = []
       queryTechnologyArchives13()
     })
   }).catch((action) => {
     if (action === 'cancel') {
       queryTechnologyArchives13()
+      appointmentfileList.value = []
     }
   })
 }
@@ -3349,6 +3625,7 @@ const deleteThirteenthInfo = (row) => {
       queryTechnologyArchives13()
     }
   })
+  appointmentfileList.value = []
 }
 // 专业学会任职情况增删改存结束
 
@@ -3460,6 +3737,94 @@ const totalFormat = (data) => {
       + Number.parseFloat(data.other === '' ? '0' : data.other)
 }
 
+// 教育经历增删改存开始
+// 编辑
+const editsixteenthInfo = (row) => {
+  // 备份原始数据
+  row['oldRow'] = JSON.parse(JSON.stringify(row))
+  row.isEdit = true
+}
+// 取消
+const cancelsixteenthInfo = (row, index) => {
+  // 如果是新增的数据
+  if (row.isAdd) {
+    sixteenthData.value.splice(index, 1)
+  } else {
+    // 不是新增的数据  还原数据
+    for (const i in row.oldRow) {
+      row[i] = row.oldRow[i]
+    }
+  }
+  sixteenthKey.value = Math.random()
+}
+// 保存
+const updatesixteenthInfo = (row) => {
+  if (!row.socialNo) {
+    ElMessage({
+      type: "warning",
+      message: "身份证号不存在,请检查!",
+      duration: 2500,
+      showClose: true,
+    });
+    return
+  }
+  if (!row.isAdd && row.socialNo !== row.oldRow.socialNo) {
+    row.oldSocialNo = row.oldRow.socialNo
+  }
+  callSavesixteenthInfo(row)
+}
+
+const callSavesixteenthInfo = (row) => {
+  let title = '请确认是否保存学习经历<span style="color:#d12020;">' + row.id + '</span>?'
+  ElMessageBox.confirm(title, {
+    cancelButtonText: '取消',
+    confirmButtonText: '确定',
+    type: 'warning',
+    distinguishCancelAndClose: true,
+    dangerouslyUseHTMLString: true
+  }).then(() => {
+    saveTechnologyArchives16(row).then((res) => {
+      ElMessage({
+        type: "success",
+        message: res.cg,
+        duration: 2500,
+        showClose: true,
+      });
+      queryTechnologyArchives16()
+    })
+  }).catch((action) => {
+    if (action === 'cancel') {
+      queryTechnologyArchives16()
+    }
+  })
+}
+
+// 删除
+const deletesixteenthInfo = (row) => {
+  let title = '请确认是否删除学习经历<span style="color:#d12020;">' + row.id + '</span>?'
+  ElMessageBox.confirm(title, {
+    cancelButtonText: '取消',
+    confirmButtonText: '确定',
+    type: 'warning',
+    distinguishCancelAndClose: true,
+    dangerouslyUseHTMLString: true
+  }).then(() => {
+    delTechnologyArchives16ByCode(row.socialNo, row.id).then((res) => {
+      ElMessage({
+        type: "success",
+        message: res.cg,
+        duration: 2500,
+        showClose: true,
+      });
+      queryTechnologyArchives16()
+    })
+  }).catch((action) => {
+    if (action === 'cancel') {
+      queryTechnologyArchives16()
+    }
+  })
+}
+// 教育经历增删改存结束
 </script>
 <style scoped>
 .numbered-list {

+ 31 - 1
src/views/technology-archives/TechnologyArchivesSearch.vue

@@ -9,6 +9,7 @@
       </el-select>
       <el-button type="primary" icon="Search" @click="queryTechnologyArchivesInfo" style="margin-left: 10px">查询</el-button>
       <el-button type="primary" icon="Download" @click="exportData" style="margin-left: 5px">导出</el-button>
+      <el-button type="primary" icon="Download" @click="exportDataall" style="margin-left: 5px">导出全部</el-button>
     </header>
     <div class="layout_main">
       <div class="layout_display_flex_y">
@@ -67,7 +68,8 @@ import {ElMessage} from "element-plus";
 import {
   exportTechnologyArchivesInfo,
   selectTechnologyArchivesInfo,
-  selectTechnologyArchivesType
+  selectTechnologyArchivesType,
+  exportMultiTechnologyArchives
 } from "@/api/technology-archives/technology-archives";
 import {useUserStore} from "@/pinia/user-store";
 
@@ -76,6 +78,12 @@ let param = ref({
   text: '',
   exportName: ''
 })
+
+let params = ref({
+  exportTypes: [],
+  exportNames: []
+})
+
 const userInfo = useUserStore().userInfo
 const text = ref('')
 const textType = ref('tamain')
@@ -99,6 +107,7 @@ const typeList = ref([])
 const queryAcType = () => {
   selectTechnologyArchivesType("all")
     .then((res) => {
+      console.log(res.taData)
       if(res){
         typeList.value = res.taList
       }
@@ -147,4 +156,25 @@ const exportData = () => {
   param.value.exportName = p[0].name
   exportTechnologyArchivesInfo(param.value)
 }
+
+//导出全部档案信息
+const exportDataall = () => {
+  if (technologyArchivesData.value.length <= 0) {
+    ElMessage({
+      message: '没有可以导出的数据!',
+      type: 'warning',
+      duration: 2500,
+      showClose: true,
+    })
+    return
+  }
+  console.log(typeList.value)
+  for(let i=0; i<typeList.value.length; i++){
+    params.value.exportTypes[i] = typeList.value[i].code
+    params.value.exportNames[i] = typeList.value[i].name
+    
+  } 
+  console.log(params.value)
+  exportMultiTechnologyArchives(params.value)
+}
 </script>