Browse Source

用户信息调整-暂存,身份证回显

huangguoce 2 weeks ago
parent
commit
110f92d538

+ 98 - 4
src/api/human/enrollment/EnrollmentRegistrationService.js

@@ -101,11 +101,11 @@ export default {
 			params: { id: id },
 		});
 	},
-	findAuditInfoById(id) {
+	findAuditInfoById(params) {
 		return request({
 			url: prefix + "/enrollmentRegistration/findAuditInfoById",
 			method: "get",
-			params: { id: id },
+			params: params,
 		});
 	},
 	findWageCardById(id) {
@@ -185,11 +185,11 @@ export default {
 			params: { id: id },
 		});
 	},
-	findIdCardOnly(idCard, id) {
+	findIdCardOnly(idCard, userId) {
 		return request({
 			url: prefix + "/enrollmentRegistration/findIdCardOnly",
 			method: "get",
-			params: { idCard: idCard, id: id },
+			params: { idCard: idCard, userId: userId },
 		});
 	},
 	findMobilePhoneOnly(mobilePhone) {
@@ -289,6 +289,13 @@ export default {
 			params: params,
 		});
 	},
+	findEduAuditList(params) {
+		return request({
+			url: prefix + "/eduInfo/findAuditList",
+			method: "get",
+			params: params,
+		});
+	},
 	findEduInfoById(params) {
 		return request({
 			url: prefix + "/eduInfo/findById",
@@ -296,6 +303,14 @@ export default {
 			params: params,
 		});
 	},
+	// 暂存信息
+	updateInfoTemporary(inputForm) {
+		return request({
+			url: prefix + `/enrollmentRegistration/updateInfoTemporary`,
+			method: "post",
+			data: inputForm,
+		});
+	},
 	// 工作经历接口
 	saveWorkInfo(data) {
 		return request({
@@ -318,6 +333,13 @@ export default {
 			params: params,
 		});
 	},
+	findWorkAuditList(params) {
+		return request({
+			url: prefix + "/workInfo/findAuditList",
+			method: "get",
+			params: params,
+		});
+	},
 	findWorkInfoById(params) {
 		return request({
 			url: prefix + "/workInfo/findById",
@@ -347,6 +369,13 @@ export default {
 			params: params,
 		});
 	},
+	findTrainingAuditList(params) {
+		return request({
+			url: prefix + "/trainingInfo/findAuditList",
+			method: "get",
+			params: params,
+		});
+	},
 	findTrainingInfoById(params) {
 		return request({
 			url: prefix + "/trainingInfo/findById",
@@ -354,6 +383,14 @@ export default {
 			params: params,
 		});
 	},
+
+	saveTrainingInfo(data) {
+		return request({
+			url: prefix + "/trainingInfo/save",
+			method: "post",
+			data: data,
+		});
+	},
 	// 资质证书接口
 	saveCertificateInfo(data) {
 		return request({
@@ -376,6 +413,13 @@ export default {
 			params: params,
 		});
 	},
+	findCertificateAuditList(params) {
+		return request({
+			url: prefix + "/certificateInfo/findAuditList",
+			method: "get",
+			params: params,
+		});
+	},
 	findCertificateInfoById(params) {
 		return request({
 			url: prefix + "/certificateInfo/findById",
@@ -405,6 +449,13 @@ export default {
 			params: params,
 		});
 	},
+	findSkillAuditList(params) {
+		return request({
+			url: prefix + "/skillInfo/findAuditList",
+			method: "get",
+			params: params,
+		});
+	},
 	findSkillInfoById(params) {
 		return request({
 			url: prefix + "/skillInfo/findById",
@@ -434,6 +485,13 @@ export default {
 			params: params,
 		});
 	},
+	findLanguageAuditList(params) {
+		return request({
+			url: prefix + "/languageInfo/findAuditList",
+			method: "get",
+			params: params,
+		});
+	},
 	findLanguageInfoById(params) {
 		return request({
 			url: prefix + "/languageInfo/findById",
@@ -463,6 +521,13 @@ export default {
 			params: params,
 		});
 	},
+	findFamilyAuditList(params) {
+		return request({
+			url: prefix + "/familyInfo/findAuditList",
+			method: "get",
+			params: params,
+		});
+	},
 	findFamilyInfoById(params) {
 		return request({
 			url: prefix + "/familyInfo/findById",
@@ -492,6 +557,13 @@ export default {
 			params: params,
 		});
 	},
+	findRewardAuditList(params) {
+		return request({
+			url: prefix + "/rewardInfo/findAuditList",
+			method: "get",
+			params: params,
+		});
+	},
 	findRewardInfoById(params) {
 		return request({
 			url: prefix + "/rewardInfo/findById",
@@ -550,6 +622,13 @@ export default {
 			params: params,
 		});
 	},
+	findSocietyAuditList(params) {
+		return request({
+			url: prefix + "/societyInfo/findAuditList",
+			method: "get",
+			params: params,
+		});
+	},
 	findSocietyInfoById(params) {
 		return request({
 			url: prefix + "/societyInfo/findById",
@@ -579,6 +658,13 @@ export default {
 			params: params,
 		});
 	},
+	findPerformanceAuditList(params) {
+		return request({
+			url: prefix + "/performanceInfo/findAuditList",
+			method: "get",
+			params: params,
+		});
+	},
 	findPerformanceInfoById(params) {
 		return request({
 			url: prefix + "/performanceInfo/findById",
@@ -586,4 +672,12 @@ export default {
 			params: params,
 		});
 	},
+	// 修改状态
+	updateInfoStatus(inputForm) {
+		return request({
+			url: prefix + `/enrollmentRegistration/updateInfoStatus`,
+			method: "post",
+			data: inputForm,
+		});
+	},
 };

+ 71 - 0
src/api/sys/OSSService.js

@@ -39,6 +39,39 @@ export default class OSSSerive {
 			params: { url: url },
 		});
 	}
+	getSFZSizeByUrl(url) {
+		return request({
+			url: prefix + "/oss/file/getSFZSizeByUrl",
+			method: "get",
+			params: { url: url },
+		});
+	}
+	/**
+	 * 根据url获取临时文件带水印、虚化原图地址
+	 * @param {*} url
+	 * @returns
+	 */
+	getFileTemporaryLookUrlWithWatermark(url) {
+		return request({
+			url: prefix + "/oss/file/getFileTemporaryLookUrlWithWatermark",
+			method: "get",
+			params: { url: url },
+		});
+	}
+	/**
+	 * 根据url获取临时文件带水印、虚化、缩略图地址
+	 * @param {*} url
+	 * @returns
+	 */
+	getThumbnailTemporaryWithWatermarkDimLookUrl(url) {
+		return request({
+			url:
+				prefix +
+				"/oss/file/getThumbnailTemporaryWithWatermarkDimLookUrl",
+			method: "get",
+			params: { url: url },
+		});
+	}
 	deleteMsgById(id) {
 		return request({
 			url: prefix + "/oss/file/deleteMsgById",
@@ -287,6 +320,14 @@ function getTemporaryByUrl(url) {
 	});
 }
 
+function getFileTemporaryLookUrlWithWatermark(url) {
+	return request({
+		url: prefix + "/oss/file/getFileTemporaryLookUrlWithWatermark",
+		method: "get",
+		params: { url: url },
+	});
+}
+
 export async function openWindowOnUrl(row) {
 	if (row.url === undefined || row.url === null || row.url === "") {
 		// Message.error('没有获取到文件的url')
@@ -379,6 +420,36 @@ export async function toHref(row) {
 	});
 }
 
+/**
+ * 身份证下载,虚化加水印
+ * @param {*} row
+ * @returns
+ */
+export async function toSFZHref(row) {
+	if (row.url === null || row.url === undefined || row.url === "") {
+		// Message.error('没有获取到文件的url')
+		return;
+	}
+	const link = document.createElement("a");
+	await getFileTemporaryLookUrlWithWatermark(row.url).then((data) => {
+		const url = data; // 完整的url则直接使用
+		// 这里是将url转成blob地址,
+		fetch(url)
+			.then((res) => res.blob())
+			.then((blob) => {
+				// 将链接地址字符内容转变成blob地址
+				link.href = URL.createObjectURL(blob);
+				link.download = row.name || ""; // 下载文件的名字
+				// a.download = url.split('/')[url.split('/').length -1] //  // 下载文件的名字
+				document.body.appendChild(link);
+				link.click();
+				// 在资源下载完成后 清除 占用的缓存资源
+				window.URL.revokeObjectURL(link.href);
+				document.body.removeChild(link);
+			});
+	});
+}
+
 export async function toHrefByUrlAndName(url, name) {
 	if (url === null || url === undefined || url === "") {
 		// Message.error('没有获取到文件的url')

+ 553 - 0
src/views/common/SFZUpLoadComponent.vue

@@ -0,0 +1,553 @@
+<!--文件上传组件-->
+<template>
+  <div :key="uploadKey" style="width: 100%;">
+    <!-- <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{ dividerName
+    }}</el-divider> -->
+    <el-upload ref="upload" style="display: inline-block;" :show-header="'status'" action="" :limit="999"
+      :http-request="httpRequest" :multiple="false" :on-exceed="onExceed" :show-file-list="false" :on-change="changes"
+      :on-progress="uploadVideoProcess" :file-list="fileList">
+      <template v-if="(auth === 'view' && uploadFlag === false) || dataListNew.length > 0" #tip>
+        <el-button :loading="loading" type="primary" size="default" :disabled="true"> 点击上传 </el-button>
+      </template>
+      <template v-else #trigger>
+        <el-button :loading="loading" type="primary" size="default"> 点击上传 </el-button>
+      </template>
+      <template #tip>
+        <div class="el-upload__tip" style="color: red;">
+          仅支持上传1个文件{{ tips }}
+        </div>
+      </template>
+    </el-upload>
+
+    <div style="height: calc(100% - 80px);margin-top: 10px">
+      <!-- 进度条 -->
+      <el-progress style="" v-if="progressFlag" :percentage="loadProgress"></el-progress>
+      <div class="file-item" v-for="(item, index) in dataListNew">
+        <div class="slt">
+          <template v-if="ifName(item) === 'img'">
+            <el-image :hide-on-click-modal="true" style="width: 30px; height: 30px;padding-top: 4px; margin-right: 8px;"
+              :src="item.lsUrl" :preview-src-list="[item.lsUrl]" :preview-teleported="true"></el-image>
+          </template>
+          <template v-else>
+            <el-icon size="28" style="cursor: pointer;">
+              <Document @click="showFile(item)" />
+            </el-icon>
+            <!-- <el-link type="primary" :underline="false" @click="showFile(item)">{{ item.name }}</el-link> -->
+          </template>
+        </div>
+
+        <el-tooltip effect="dark" :content="item.name" placement="top">
+          <div class="filename">
+            {{ item.name }}
+          </div>
+        </el-tooltip>
+        <div>
+          <el-divider direction="vertical"></el-divider>
+        </div>
+        <div class="file-btn" key="index">
+
+          <el-tooltip effect="dark" content="预览" placement="top">
+            <el-icon size="20" style="margin-right: 10px;cursor: pointer;">
+              <View @click="showFile(item)" />
+            </el-icon>
+          </el-tooltip>
+
+          <el-tooltip effect="dark" content="下载" placement="top">
+            <el-icon size="20" style="margin-right: 10px;cursor: pointer;">
+              <Download @click="toHref(item)" />
+            </el-icon>
+          </el-tooltip>
+          <el-tooltip v-if="auth !== 'view'" effect="dark" content="删除" placement="top">
+            <el-icon style="cursor: pointer;">
+              <!-- v-if="auth !== 'view' && delFlag !== false && createBy === item.createBy.name" -->
+              <Delete @click="deleteById(item, index, fileList)" />
+            </el-icon>
+          </el-tooltip>
+        </div>
+      </div>
+      <!-- <el-table ref="uploadTable" v-loading="loading" :key="tableKey" :data="dataListNew">
+        <el-table-column type="seq" width="40"></el-table-column>
+        <el-table-column label="文件名称" prop="name" align="center">
+          <template #default="scope">
+            <div v-if="ifName(scope.row) === true">
+              <el-image style="width: 30px; height: 30px;padding-top: 4px;" :src="scope.row.lsUrl"
+                :preview-src-list="[scope.row.lsUrl]" :preview-teleported="true"></el-image>
+            </div>
+            <div v-else>
+              <el-link type="primary" :underline="false" @click="showFile(scope.row)">{{ scope.row.name }}</el-link>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="创建人" prop="createBy.name" align="center"></el-table-column>
+        <el-table-column label="创建时间" prop="createTime" align="center"></el-table-column>
+        <el-table-column label="文件大小" prop="size" align="center">
+          <template #default="scope">
+            {{ getSize(scope.row.size) }}
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="200px" fixed="right" align="center">
+          <template #default="scope">
+            <el-button text type="primary" key="01" icon="el-icon-download" size="small"
+              @click="toHref(scope.row)">下载</el-button>
+
+            <el-button text type="primary" key="02" icon="el-icon-delete" size="small"
+              @click="deleteById(scope.row, scope.$index, fileList)"
+              :disabled="auth === 'view' && delFlag === false && createBy !== scope.row.createBy.name">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table> -->
+    </div>
+    <el-image-viewer v-if="showViewer" @close="closeViewer" :url-list="[url]" :zIndex="9999"></el-image-viewer>
+  </div>
+</template>
+
+<script>
+// eslint-disable-next-line no-unused-vars
+import OSSSerivce, {
+  httpRequest,
+  // eslint-disable-next-line no-unused-vars
+  handleRemove,
+  fileName,
+  // eslint-disable-next-line no-unused-vars
+  beforeAvatarUpload,
+  // eslint-disable-next-line no-unused-vars
+  openWindowOnUrl,
+  // eslint-disable-next-line no-unused-vars
+  toSFZHref
+} from '@/api/sys/OSSService'
+// import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
+import moment from 'moment'
+export default {
+  data() {
+    return {
+      tips: "",
+      uploadKey: '',
+      progressFlag: false,
+      loadProgress: 0,
+      fileList: [],
+      dataList: [],
+      dataListNew: [],
+      url: '',
+      showViewer: false,
+      ossService: null,
+      auth: '',
+      directory: 'public',
+      maxValue: 300,
+      tableKey: '',
+      fileLoading: true,
+      dividerName: '',
+      uploadFlag: false,
+      delFlag: false,
+      createBy: '',
+      showDivider: true,
+      loading: false,
+      dataListLength: '',
+      fileTypes: []
+    }
+  },
+  watch: {
+  },
+  created() {
+    this.ossService = new OSSSerivce()
+  },
+  components: {
+    // ElImageViewer
+  },
+  mounted() {
+    window.onPreview = this.onPreview
+  },
+  methods: {
+
+    /**
+     * dividerName: 组件中divider的名称赋值
+     * showDivider: ‘附件‘Divider是否展示
+     *     注:值为空时,默认值为true
+     *    showDivider=false时 ‘附件‘Divider隐藏
+     **/
+    setDividerName(dividerName, showDivider) {
+      if (this.commonJS.isNotEmpty(dividerName)) {
+        this.dividerName = dividerName
+      }
+      if (this.commonJS.isNotEmpty(showDivider)) {
+        if (showDivider === false) {
+          this.showDivider = false
+        } else {
+          this.showDivider = true
+        }
+      } else {
+        this.showDivider = true
+      }
+    },
+    /**
+     * 文件上传组件初始化
+     * @param auth
+     *    auth的值为"view"时,不可上传/编辑文件
+     *    auth为其他值时,可上传/编辑文件
+     * @param fileList  要显示到文件上传列表中的文件。
+     *    注:文件必须要有url属性并且文件的url属性值必须是在oss中的路径值
+     *    例:'/attachment-file/xxx/xxx/2022/9/08/xxx.jpg'
+     * @param directory  要存放到oss的哪个文件夹下。
+     *    注:值为空时,默认存放到"public"文件夹
+     * @param maxValue  上传文件允许的最大值,单位:MB
+     *    注:值为空时,默认值为300MB
+     * @param dividerName  组件中divider的名称
+     *    注:值为空时,默认值为‘附件’
+     * @param uploadFlag  ‘上传文件’按钮是否禁用
+     *    注:值为空时,默认值为false
+     *    auth=view&&uploadFlag=false时 ‘上传文件’按钮禁用
+     * @param delFlag  ‘删除’按钮是否禁用
+     *    注:值为空时,默认值为false
+     *    auth=view&&delFlag=false时 ‘删除’按钮禁用
+     * @param showDivider  ‘附件‘Divider是否展示
+     *    注:值为空时,默认值为true
+     *    showDivider=false时 ‘附件‘Divider隐藏
+     */
+    async newUpload(auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider, fileTypes) {
+      await this.fileLoadingFalse()
+      if (this.commonJS.isEmpty(fileList)) {
+        this.fileLoading = true
+      } else {
+        this.dataListLength = fileList.length
+      }
+      if (this.commonJS.isEmpty(dividerName)) {
+        this.dividerName = '附件'
+      } else {
+        this.dividerName = dividerName
+      }
+      if (directory !== undefined && directory !== null && directory !== '' && directory !== {}) {
+        this.directory = directory
+      } else {
+        this.directory = 'public'
+      }
+      if (maxValue !== undefined && maxValue !== null && maxValue !== '' && maxValue !== 0) {
+        this.maxValue = maxValue
+      } else {
+        this.maxValue = 300
+      }
+      this.auth = auth
+      if (this.commonJS.isEmpty(uploadFlag)) {
+        this.uploadFlag = false
+      } else {
+        if (uploadFlag !== true && uploadFlag !== false) {
+          this.uploadFlag = false
+        } else {
+          this.uploadFlag = uploadFlag
+        }
+      }
+      if (this.commonJS.isEmpty(delFlag)) {
+        this.delFlag = false
+      } else {
+        if (delFlag !== true && delFlag !== false) {
+          this.delFlag = false
+          this.createBy = delFlag
+        } else {
+          this.delFlag = delFlag
+        }
+      }
+      if (fileTypes !== undefined && fileTypes !== null && fileTypes.length > 0) {
+
+        this.fileTypes = [...fileTypes]
+        this.tips = `,且文件格式限于:${this.fileTypes.map(type => type.toUpperCase()).join(",")}`
+      } else {
+        this.fileTypes = []
+      }
+
+
+      for await (let item of fileList) {
+        if (item.url && item.url !== null && item.url !== undefined && item.url !== "") {
+          await this.ossService.getSFZSizeByUrl(item.url).then((data) => {
+            item.lsUrl = data.url
+            item.size = data.size
+            this.dataList.push(item)
+            this.dataListNew.push(item)
+            this.fileList.push(item)
+            if (this.dataListNew.length === fileList.length) {
+              this.fileLoading = true
+            }
+          })
+        } else {
+          this.dataList.push(item)
+          this.dataListNew.push(item)
+          this.fileList.push(item)
+          this.fileLoading = true
+        }
+      }
+      // this.dataList = JSON.parse(JSON.stringify(fileList))
+      // this.dataListNew = JSON.parse(JSON.stringify(fileList))
+      if (this.commonJS.isEmpty(showDivider)) {
+        this.showDivider = true
+      } else {
+        if (showDivider === false) {
+          this.showDivider = false
+        } else {
+          this.showDivider = true
+        }
+      }
+    },
+    async httpRequest(file) {
+      await httpRequest(file, fileName(file), this.directory, this.maxValue)
+    },
+    uploadVideoProcess(event, file, fileList) {
+      this.progressFlag = true // 显示进度条
+      this.loadProgress = parseInt(event.percent) // 动态获取文件上传进度
+      if (this.loadProgress >= 100) {
+        this.loadProgress = 100
+        setTimeout(() => {
+          this.progressFlag = false
+        }, 1000) // 一秒后关闭进度条
+      }
+    },
+    isAllowedImageType(filename) {
+      if (!fileName) {
+        return false
+      }
+      const ext = filename.split('.').pop().toLowerCase();
+      return this.fileTypes.includes(ext);
+    },
+    getSize(value) {
+      if (this.commonJS.isEmpty(value)) {
+        return '0 B'
+      } else {
+        let val = parseInt(value)
+        if (this.commonJS.isEmpty(val)) {
+          return '0 B'
+        }
+        if (isNaN(val)) {
+          return '0 B'
+        }
+        if (val === 0) {
+          return '0 B'
+        }
+        let k = 1024
+        let sizes = ['B', 'KB', 'MB', 'GB', 'PB', 'TB', 'EB', 'ZB', 'YB']
+        let i = Math.floor(Math.log(val) / Math.log(k))
+        let result = val / Math.pow(k, i);
+        let kb = parseFloat(result.toPrecision(3));
+        return kb + '' + sizes[i]
+      }
+    },
+    async changes(file, fileList) {
+
+      // if (file.status !== 'ready') {
+      //   return
+      // }
+
+
+      if (file.status !== 'ready') {
+        if (this.fileList.length >= 1) {
+          this.$message.warning(`上传失败,当前限制上传 1 个文件`)
+          return
+        }
+
+        if (this.fileTypes && this.fileTypes.length > 0) {
+
+          let uploadTypeFlag = this.isAllowedImageType(file.name);
+          if (!uploadTypeFlag) {
+            this.$message.warning(`上传失败,文件格式限于:${this.fileTypes.map(type => type.toUpperCase()).join(",")}`);
+            return;
+          }
+        }
+
+
+        let fileListNamesList = []
+        console.log(JSON.stringify(this.fileList));
+        this.fileList.forEach(fileItem => {
+          fileListNamesList.push(fileItem.name)
+        })
+
+        if (fileListNamesList.indexOf(file.name) != -1) {
+          console.log(fileListNamesList);
+
+          this.$message.error(`${file.name}已存在,无法重复上传`)
+          return
+        } else {
+
+          if (!beforeAvatarUpload(file, fileList, this.maxValue)) {
+            this.$message.error('文件大小不能超过 ' + this.maxValue + ' MB!')
+            return
+          }
+
+          var fileListNames = []
+          for (let fileItem of this.fileList) {
+            fileListNames.push(fileItem.name)
+          }
+
+
+          let item1 = JSON.parse(JSON.stringify(file))
+          this.fileList.push(item1)
+          item1.createTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          item1.createBy = {
+            id: '',
+            name: ''
+          }
+          item1.createBy.id = this.$store.state.user.id
+          item1.createBy.name = this.$store.state.user.name
+          this.dataListNew.push(item1)
+          this.dataList.push(item1)
+          // }
+          for (let item of this.dataListNew) {
+            if (item.raw !== undefined && item.raw !== null && item.raw !== {}) {
+              item.url = item.raw.url
+              if (item.raw.url !== undefined && item.raw.url !== null && item.raw.url !== {}) {
+                this.ossService.getThumbnailTemporaryWithWatermarkDimLookUrl(item.raw.url).then((data) => {
+                  item.lsUrl = data
+                })
+              }
+            }
+
+          }
+        }
+      }
+
+    },
+    showFile(row) {
+      // openWindowOnUrl(row)
+      if (this.ifName(row) == "img") {
+        this.ossService.getFileTemporaryLookUrlWithWatermark(row.url).then((data) => {
+          this.onPreview(data)
+        })
+      } else {
+        openWindowOnUrl(row)
+      }
+    },
+    onPreview(url) {
+      this.url = url
+      this.showViewer = true
+    },
+    // 关闭查看器
+    closeViewer() {
+      this.url = ''
+      this.showViewer = false
+    },
+    toHref(row) {
+      toSFZHref(row)
+    },
+    async deleteById(row, index, fileList) {
+      // this.$refs.upload.handleRemove(this.dataListNew[index])
+      await this.dataListNew.splice(index, 1)
+      await this.dataList.splice(index, 1)
+      if (this.commonJS.isNotEmpty(row.id)) {
+        // this.ossService.deleteMsgById(row.id)
+      }
+      var newFileList = [];
+      for (var i = 0; i < fileList.length; i++) {
+        if (fileList[i].name !== row.name) {
+          newFileList.push(fileList[i])
+        }
+      }
+      this.fileList = newFileList;
+    },
+    /**
+     * 关闭dialog时使用  清除el-upload中上传的文件
+     */
+    clearUpload() {
+      this.$refs.upload.clearFiles()
+      this.dataList = []
+      this.dataListNew = []
+      this.fileList = []
+      this.createBy = ''
+    },
+    /**
+     * 获取当前文件列表中的文件数据
+     */
+    getDataList() {
+
+      return this.dataListNew
+    },
+    /**
+     * 判断进度条是否结束,附件是否加载完成
+     * @returns {boolean}
+     */
+    checkProgress() {
+      if (this.progressFlag === true) {
+        this.$message.warning('请等待附件上传完成再进行操作')
+        return true
+      }
+      if (this.fileLoading === false) {
+        this.$message.warning('请等待附件加载完成再进行操作')
+        if (this.dataListLength === this.dataListNew.length) {
+          this.fileLoading = true
+        }
+        return true
+      }
+
+      const invalidFile = this.dataListNew.find(file => !file.url); // 找到第一个 URL 为空的文件
+      if (invalidFile) {
+        this.$message.warning(`${invalidFile.name}的URL为空,请检查后重新上传`)
+        return true; // 只要有一个 url 为空,直接 return
+      }
+
+      return false
+    },
+    ifName(row) {
+      if (this.commonJS.isEmpty(row.name)) {
+        row.name = '---'
+        return "file"
+      }
+      let suffix = row.name.substring(row.name.lastIndexOf('.') + 1)
+      if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+        return "img"
+      } else {
+        return "file"
+      }
+    },
+    fileLoadingFalse() {
+      this.fileLoading = false
+    },
+    // 开启/关闭页面的加载中状态
+    changeLoading(loading) {
+      if (this.commonJS.isNotEmpty(loading)) {
+        this.loading = loading
+      } else {
+        this.loading = false
+      }
+    },
+    onExceed(files, fileList) {
+      this.$message.warning(`上传失败,当前限制上传 999 个文件`)
+    }
+  }
+}
+</script>
+<style>
+.el-divider__text {
+  font-size: 16px;
+  font-weight: bold;
+}
+
+.file-item {
+  height: 40px;
+  display: flex;
+  width: 250px;
+  align-items: center;
+  border-radius: 10px;
+  background-color: #f7f9fa;
+  padding: 0 10px;
+  margin-bottom: 10px;
+
+  .slt {
+    height: 100%;
+    width: 40px;
+    display: flex;
+    align-items: center;
+  }
+
+  .filename {
+    flex: 1;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    cursor: pointer;
+    line-height: 40px;
+  }
+
+  .file-btn {
+    display: flex;
+    align-items: center;
+  }
+
+  .el-icon:hover {
+    color: #2d8cf0;
+
+  }
+}
+</style>

+ 1 - 1
src/views/human/enrollment/registration/EnrollmentRegistrationAddForm.vue

@@ -922,7 +922,7 @@ export default {
 		},
 		//身份证号码唯一性判断
 		idCardOnly(idCard, id) {
-			enrollmentRegistrationService.findIdCardOnly(idCard, id).then((data) => {
+			enrollmentRegistrationService.findIdCardOnly(idCard, this.inputForm.userId).then((data) => {
 				if (data !== 0) {
 					this.$message.error('身份证号码已存在,请重新确认')
 					this.inputForm.idCard = ''

File diff suppressed because it is too large
+ 495 - 560
src/views/human/enrollment/registration/EnrollmentRegistrationAddForm2.vue


+ 2 - 2
src/views/human/enrollment/registration/EnrollmentRegistrationEditForm.vue

@@ -1161,7 +1161,7 @@
 												<div class="collapseTitle">
 													<span style="font-size: 16px;"> {{
 														$dictUtils.getDictLabel("user_info_language",
-															item.language, '-')}}</span>
+															item.language, '-') }}</span>
 													<div style="margin-left: auto;">
 														<el-button type="text"
 															@click.stop="editLanguage(item.id)">修改</el-button>
@@ -2244,7 +2244,7 @@ export default {
 		idCardOnly(idCard, id) {
 			if (this.commonJS.isNotEmpty(idCard)) {
 
-				enrollmentRegistrationService.findIdCardOnly(idCard, id).then((data) => {
+				enrollmentRegistrationService.findIdCardOnly(idCard, this.inputForm.userId).then((data) => {
 					if (data !== 0) {
 						this.$message.error('身份证号码已存在,请重新确认')
 						this.inputForm.idCard = ''

+ 21 - 6
src/views/human/enrollment/registration/EnrollmentUserInfoAuditForm.vue

@@ -1070,7 +1070,10 @@ export default {
 				this.$refs.idCardFront.clearUpload()
 				this.$refs.idCardBack.clearUpload()
 				this.loading = true
-				enrollmentRegistrationService.findAuditInfoById(this.inputForm.id).then(async (data) => {
+				enrollmentRegistrationService.findAuditInfoById({
+					id: this.inputForm.id,
+					status: 2
+				}).then(async (data) => {
 					if (this.status === 'audit' || this.status === 'taskFormDetail') {
 						method = 'view'
 					}
@@ -1175,7 +1178,10 @@ export default {
 		},
 		reapplyForm(callback) {
 			this.loading = true
-			enrollmentRegistrationService.findAuditInfoById(this.inputForm.id).then((data) => {
+			enrollmentRegistrationService.findAuditInfoById({
+				id: this.inputForm.id,
+				status: 2
+			}).then((data) => {
 				if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
 					this.loading = false
 					this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
@@ -1223,7 +1229,10 @@ export default {
 		// 通过
 		async agreeForm(callback) {
 			this.loading = true
-			enrollmentRegistrationService.findAuditInfoById(this.inputForm.id).then((data) => {
+			enrollmentRegistrationService.findAuditInfoById({
+				id: this.inputForm.id,
+				status: 2
+			}).then((data) => {
 
 				if (data.status !== '2') { // 审核状态不是“审核中”,就弹出提示
 					this.loading = false
@@ -1252,7 +1261,10 @@ export default {
 		updateStatusById(type, callback) {
 			if (type === 'reject') {
 				this.loading = true
-				enrollmentRegistrationService.findAuditInfoById(this.inputForm.id).then((data) => {
+				enrollmentRegistrationService.findAuditInfoById({
+					id: this.inputForm.id,
+					status: 2
+				}).then((data) => {
 					if (data.status !== '2') { // 审核状态不是“审核中”,就弹出提示
 						this.loading = false
 						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
@@ -1269,7 +1281,10 @@ export default {
 				})
 			} else if (type === 'hold') {
 				this.loading = true
-				enrollmentRegistrationService.findAuditInfoById(this.inputForm.id).then((data) => {
+				enrollmentRegistrationService.findAuditInfoById({
+					id: this.inputForm.id,
+					status: "2"
+				}).then((data) => {
 					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
 						this.loading = false
 						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
@@ -1288,7 +1303,7 @@ export default {
 		idCardOnly(idCard, id) {
 			if (this.commonJS.isNotEmpty(idCard)) {
 
-				enrollmentRegistrationService.findIdCardOnly(idCard, id).then((data) => {
+				enrollmentRegistrationService.findIdCardOnly(idCard, this.inputForm.userId).then((data) => {
 					if (data !== 0) {
 						this.$message.error('身份证号码已存在,请重新确认')
 						this.inputForm.idCard = ''

File diff suppressed because it is too large
+ 943 - 386
src/views/sys/user/UserInfo.vue


+ 47 - 16
src/views/sys/user/components/CertificateInfo.vue

@@ -119,7 +119,8 @@ export default {
 				expireDate: "",//到期日期
 				enrollCertNo: '',               // 注册证书编号
 				profession: "",
-				certificateAttachment: []     // 证书附件
+				certificateAttachment: [],     // 证书附件
+				status: ""
 			},
 			keyWatch: '',
 			rules: {
@@ -193,7 +194,7 @@ export default {
 		getKeyWatch(keyWatch) {
 			this.keyWatch = keyWatch
 		},
-		init(method, row, reId) {
+		init(method, id, reId) {
 			this.method = method
 			this.inputForm = {
 				id: "",
@@ -206,7 +207,8 @@ export default {
 				expireDate: "",//到期日期
 				enrollCertNo: '',               // 注册证书编号
 				profession: "",
-				certificateAttachment: []     // 证书附件
+				certificateAttachment: [],     // 证书附件
+				status: ""
 			}
 			if (method === 'add') {
 				this.title = `新增执业资格证书`
@@ -219,17 +221,20 @@ export default {
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
-				if (row && row.id) {
-					this.inputForm = this.recover(this.inputForm, row)
-					this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-					if (!this.inputForm.certificateAttachment) {
-						this.inputForm.certificateAttachment = []
-					}
-					this.changeType(this.inputForm.type)
-					this.$refs.upLoadComponent.newUpload(method, this.inputForm.certificateAttachment, 'certificate', 50, null, null, null, null)
-					this.loading = false
+				if (id) {
+					enrollmentRegistrationService.findCertificateInfoById({
+						id: id
+					}).then(res => {
+						this.inputForm = this.recover(this.inputForm, res)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						if (!this.inputForm.certificateAttachment) {
+							this.inputForm.certificateAttachment = []
+						}
+						this.changeType(this.inputForm.type)
+						this.$refs.upLoadComponent.newUpload(method, this.inputForm.certificateAttachment, 'certificate', 50, null, null, null, null)
+						this.loading = false
+					})
 				} else {
-					this.inputForm.id = this.generateFallbackId()
 					this.$refs.upLoadComponent.newUpload(method, this.inputForm.certificateAttachment, 'certificate', 50, null, null, null, null)
 					this.loading = false
 				}
@@ -246,10 +251,36 @@ export default {
 					this.inputForm.enrollDate = new Date(this.inputForm.enrollDate).getTime(); // 转为时间戳
 					this.inputForm.expireDate = new Date(this.inputForm.expireDate).getTime(); // 转为时间戳
 					this.inputForm.issuedDate = new Date(this.inputForm.issuedDate).getTime(); // 转为时间戳
-
 					this.inputForm.certificateAttachment = this.$refs.upLoadComponent.getDataList()
-					this.$emit("addCertificateInfo", JSON.parse(JSON.stringify(this.inputForm)))
-					this.close()
+					// this.$emit("addCertificateInfo", JSON.parse(JSON.stringify(this.inputForm)))
+					// this.close()
+					if (this.inputForm.id && this.inputForm.status != "1" && this.inputForm.status != "4") {
+						enrollmentRegistrationService.updateInfoStatus({
+							id: this.inputForm.id,
+							status: "6",
+							type: "4"
+						}).then(result => {
+							// 暂存状态
+							this.inputForm.id = ""
+							this.inputForm.status = 1
+							enrollmentRegistrationService.saveCertificateInfo(this.inputForm).then(res => {
+								this.$message.success(res)
+								this.$emit("addCertificateInfo", this.inputForm.enrollmentRegistrationId)
+								this.loading = false
+								this.close()
+							})
+						})
+					} else {
+						// 暂存状态
+						this.inputForm.status = 1
+						enrollmentRegistrationService.saveCertificateInfo(this.inputForm).then(res => {
+							this.$message.success(res)
+							this.$emit("addCertificateInfo", this.inputForm.enrollmentRegistrationId)
+							this.loading = false
+							this.close()
+						})
+					}
+
 				}
 			})
 		},

+ 48 - 38
src/views/sys/user/components/EducationInfo.vue

@@ -196,7 +196,8 @@ export default {
 				educationFile: [],
 				degreeFile: [],
 				specialityDesc: "",
-				enrollmentRegistrationId: ""
+				enrollmentRegistrationId: "",
+				status: ""
 			},
 			keyWatch: '',
 			rules: {
@@ -293,7 +294,7 @@ export default {
 		getKeyWatch(keyWatch) {
 			this.keyWatch = keyWatch
 		},
-		init(method, row, reId) {
+		init(method, id, reId, status) {
 			this.method = method
 			this.inputForm = {
 				id: "",
@@ -312,7 +313,8 @@ export default {
 				educationFile: [],
 				degreeFile: [],
 				specialityDesc: "",
-				enrollmentRegistrationId: ""
+				enrollmentRegistrationId: "",
+				status: ""
 			}
 			this.currentUserId = ""
 			if (method === 'add') {
@@ -326,37 +328,27 @@ export default {
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
-				if (row && row.id) {
-					console.log(this.recover(this.inputForm, row));
-					console.log(this.recover(this.inputForm, row));
-					console.log(this.recover(this.inputForm, row));
-					console.log(this.recover(this.inputForm, row));
-					console.log(this.recover(this.inputForm, row));
-					// enrollmentRegistrationService.findEduInfoById({
-					// 	id: this.inputForm.id
-					// }).then(res => {
-					this.inputForm = this.recover(this.inputForm, row)
-					this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-					if (!this.inputForm.educationFile) {
-						this.inputForm.educationFile = []
-					}
-					if (!this.inputForm.degreeFile) {
-						this.inputForm.degreeFile = []
-					}
-					this.$refs.educationUploadComponent.newUpload(method, this.inputForm.educationFile, 'education', 50, null, null, null, null, [...this.fileType])
-					this.$refs.degreeUploadComponent.newUpload(method, this.inputForm.degreeFile, 'degree', 50, null, null, null, null, [...this.fileType])
-					this.loading = false
-					// })
+				if (id) {
+					enrollmentRegistrationService.findEduInfoById({
+						id: id
+					}).then(res => {
+						this.inputForm = this.recover(this.inputForm, res)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						if (!this.inputForm.educationFile) {
+							this.inputForm.educationFile = []
+						}
+						if (!this.inputForm.degreeFile) {
+							this.inputForm.degreeFile = []
+						}
+						this.$refs.educationUploadComponent.newUpload(method, this.inputForm.educationFile, 'education', 50, null, null, null, null, [...this.fileType])
+						this.$refs.degreeUploadComponent.newUpload(method, this.inputForm.degreeFile, 'degree', 50, null, null, null, null, [...this.fileType])
+						this.loading = false
+					})
+
 				} else {
-					this.inputForm.id = this.generateFallbackId()
 					this.$refs.educationUploadComponent.newUpload(method, this.inputForm.educationFile, 'education', 50, null, null, null, null, [...this.fileType])
 					this.$refs.degreeUploadComponent.newUpload(method, this.inputForm.degreeFile, 'degree', 50, null, null, null, null, [...this.fileType])
 					this.loading = false
-					console.log(this.inputForm.id);
-					console.log(this.inputForm.id);
-					console.log(this.inputForm.id);
-					console.log(this.inputForm.id);
-					console.log(this.inputForm.id);
 				}
 			})
 		},
@@ -372,14 +364,32 @@ export default {
 					this.inputForm.endDate = new Date(this.inputForm.endDate).getTime(); // 转为时间戳
 					this.inputForm.educationFile = this.$refs.educationUploadComponent.getDataList()
 					this.inputForm.degreeFile = this.$refs.degreeUploadComponent.getDataList()
-					this.$emit("addEduInfo", JSON.parse(JSON.stringify(this.inputForm)))
-					this.close()
-					// enrollmentRegistrationService.saveEduInfo(this.inputForm).then(res => {
-					// 	this.close()
-					// 	this.$message.success(res)
-					// 	this.$emit("addEduInfo", this.inputForm.enrollmentRegistrationId)
-					// 	this.loading = false
-					// })
+					if (this.inputForm.id && this.inputForm.status != "1" && this.inputForm.status != "4") {
+						enrollmentRegistrationService.updateInfoStatus({
+							id: this.inputForm.id,
+							status: "6",
+							type: "1"
+						}).then(result => {
+							// 暂存状态
+							this.inputForm.id = ""
+							this.inputForm.status = 1
+							enrollmentRegistrationService.saveEduInfo(this.inputForm).then(res => {
+								this.$message.success(res)
+								this.$emit("addEduInfo", this.inputForm.enrollmentRegistrationId)
+								this.loading = false
+								this.close()
+							})
+						})
+					} else {
+						// 暂存状态
+						this.inputForm.status = "1"
+						enrollmentRegistrationService.saveEduInfo(this.inputForm).then(res => {
+							this.$message.success(res)
+							this.$emit("addEduInfo", this.inputForm.enrollmentRegistrationId)
+							this.loading = false
+							this.close()
+						})
+					}
 				}
 			})
 		},

+ 42 - 11
src/views/sys/user/components/FamilyInfo.vue

@@ -100,7 +100,8 @@ export default {
 				gender: '1',          // 性别
 				mobile: '',          // 手机号码
 				workUnit: '',        // 工作单位
-				contactNumber: ''    // 联系电话
+				contactNumber: '',    // 联系电话
+				status: "",
 			},
 			keyWatch: '',
 			rules: {
@@ -158,7 +159,7 @@ export default {
 		getKeyWatch(keyWatch) {
 			this.keyWatch = keyWatch
 		},
-		init(method, row, reId) {
+		init(method, id, reId) {
 			this.method = method
 			this.inputForm = {
 				id: "",
@@ -169,7 +170,8 @@ export default {
 				gender: '1',          // 性别(如:男、女)
 				mobile: '',          // 手机号码
 				workUnit: '',        // 工作单位
-				contactNumber: ''    // 联系电话
+				contactNumber: '',    // 联系电话
+				status: "",
 			}
 			if (method === 'add') {
 				this.title = `新增家庭情况`
@@ -182,13 +184,15 @@ export default {
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
-				if (row && row.id) {
-
-					this.inputForm = this.recover(this.inputForm, res)
-					this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-					this.loading = false
+				if (id) {
+					enrollmentRegistrationService.findFamilyInfoById({
+						id: id
+					}).then(res => {
+						this.inputForm = this.recover(this.inputForm, res)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						this.loading = false
+					})
 				} else {
-					this.inputForm.id = this.generateFallbackId()
 					this.loading = false
 				}
 			})
@@ -203,8 +207,35 @@ export default {
 			this.$refs['inputForm'].validate((valid) => {
 				if (valid) {
 					this.inputForm.birthDate = new Date(this.inputForm.birthDate).getTime(); // 转为时间戳
-					this.$emit("addFamilyInfo", JSON.parse(JSON.stringify(this.inputForm)))
-					this.close()
+					// this.$emit("addFamilyInfo", JSON.parse(JSON.stringify(this.inputForm)))
+					// this.close()
+					if (this.inputForm.id && this.inputForm.status != "1" && this.inputForm.status != "4") {
+						enrollmentRegistrationService.updateInfoStatus({
+							id: this.inputForm.id,
+							status: "6",
+							type: "7"
+						}).then(result => {
+							// 暂存状态
+							this.inputForm.id = ""
+							this.inputForm.status = 1
+							enrollmentRegistrationService.saveFamilyInfo(this.inputForm).then(res => {
+								this.$message.success(res)
+								this.$emit("addFamilyInfo", this.inputForm.enrollmentRegistrationId)
+								this.loading = false
+								this.close()
+							})
+						})
+					} else {
+						// 暂存状态
+						this.inputForm.status = 1
+						enrollmentRegistrationService.saveFamilyInfo(this.inputForm).then(res => {
+							this.$message.success(res)
+							this.$emit("addFamilyInfo", this.inputForm.enrollmentRegistrationId)
+							this.loading = false
+							this.close()
+						})
+					}
+
 				}
 			})
 		},

+ 46 - 15
src/views/sys/user/components/LanguageInfo.vue

@@ -102,7 +102,8 @@ export default {
 				writingAbility: '',        // 书写能力
 				readingAbility: '',        // 阅读能力
 				speakingAbility: '',        // 口语能力
-				files: []
+				files: [],
+				status: "",
 			},
 			keyWatch: '',
 			rules: {
@@ -157,7 +158,7 @@ export default {
 		getKeyWatch(keyWatch) {
 			this.keyWatch = keyWatch
 		},
-		init(method, row, reId) {
+		init(method, id, reId) {
 			this.method = method
 			this.inputForm = {
 				id: "",
@@ -167,7 +168,8 @@ export default {
 				writingAbility: '',        // 书写能力
 				readingAbility: '',        // 阅读能力
 				speakingAbility: '',        // 口语能力
-				files: []
+				files: [],
+				status: "",
 			}
 			if (method === 'add') {
 				this.title = `新增外语语种`
@@ -180,17 +182,19 @@ export default {
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
-				if (row && row.id) {
-
-					this.inputForm = this.recover(this.inputForm, row)
-					this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-					if (!this.inputForm.files) {
-						this.inputForm.files = []
-					}
-					this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'language', 50, null, null, null, null, [...this.fileType])
-					this.loading = false
+				if (id) {
+					enrollmentRegistrationService.findLanguageInfoById({
+						id: id
+					}).then(res => {
+						this.inputForm = this.recover(this.inputForm, res)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						if (!this.inputForm.files) {
+							this.inputForm.files = []
+						}
+						this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'language', 50, null, null, null, null, [...this.fileType])
+						this.loading = false
+					})
 				} else {
-					this.inputForm.id = this.generateFallbackId()
 					this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'language', 50, null, null, null, null, [...this.fileType])
 					this.loading = false
 				}
@@ -209,8 +213,35 @@ export default {
 			this.$refs['inputForm'].validate((valid) => {
 				if (valid) {
 					this.inputForm.files = this.$refs.upLoadComponent.getDataList()
-					this.$emit("addLanguageInfo", JSON.parse(JSON.stringify(this.inputForm)))
-					this.close()
+					// this.$emit("addLanguageInfo", JSON.parse(JSON.stringify(this.inputForm)))
+					// this.close()
+					if (this.inputForm.id && this.inputForm.status != "1" && this.inputForm.status != "4") {
+						enrollmentRegistrationService.updateInfoStatus({
+							id: this.inputForm.id,
+							status: "6",
+							type: "6"
+						}).then(result => {
+							// 暂存状态
+							this.inputForm.id = ""
+							this.inputForm.status = 1
+							enrollmentRegistrationService.saveLanguageInfo(this.inputForm).then(res => {
+								this.$message.success(res)
+								this.$emit("addLanguageInfo", this.inputForm.enrollmentRegistrationId)
+								this.loading = false
+								this.close()
+							})
+						})
+					} else {
+						// 暂存状态
+						this.inputForm.status = 1
+						enrollmentRegistrationService.saveLanguageInfo(this.inputForm).then(res => {
+							this.$message.success(res)
+							this.$emit("addLanguageInfo", this.inputForm.enrollmentRegistrationId)
+							this.loading = false
+							this.close()
+						})
+					}
+
 				}
 			})
 		},

+ 47 - 8
src/views/sys/user/components/PerformanceInfo.vue

@@ -86,6 +86,7 @@ export default {
 			visible: false,
 			loading: false,
 			inputForm: {
+				id: "",
 				enrollmentRegistrationId: '',
 				name: "",
 				client: "",
@@ -93,6 +94,7 @@ export default {
 				info: "",
 				position: "",
 				participateContent: "",
+				status: "",
 			},
 			keyWatch: '',
 			rules: {
@@ -144,9 +146,10 @@ export default {
 		getKeyWatch(keyWatch) {
 			this.keyWatch = keyWatch
 		},
-		init(method, row, reId) {
+		init(method, id, reId) {
 			this.method = method
 			this.inputForm = {
+				id: "",
 				enrollmentRegistrationId: '',
 				name: "",
 				client: "",
@@ -154,6 +157,7 @@ export default {
 				info: "",
 				position: "",
 				participateContent: "",
+				status: "",
 			}
 			if (method === 'add') {
 				this.title = `新增工作业绩`
@@ -166,12 +170,15 @@ export default {
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
-				if (row && row.id) {
-					this.inputForm = this.recover(this.inputForm, res)
-					this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-					this.loading = false
+				if (id) {
+					enrollmentRegistrationService.findPerformanceInfoById({
+						id: id
+					}).then(res => {
+						this.inputForm = this.recover(this.inputForm, res)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						this.loading = false
+					})
 				} else {
-					this.inputForm.id = this.generateFallbackId()
 					this.loading = false
 				}
 			})
@@ -185,8 +192,40 @@ export default {
 		doSubmit() {
 			this.$refs['inputForm'].validate((valid) => {
 				if (valid) {
-					this.$emit("addPerformanceInfo", JSON.parse(JSON.stringify(this.inputForm)))
-					this.close()
+					// this.$emit("addPerformanceInfo", JSON.parse(JSON.stringify(this.inputForm)))
+					// this.close()
+
+
+					if (this.inputForm.id && this.inputForm.status != "1" && this.inputForm.status != "4") {
+						enrollmentRegistrationService.updateInfoStatus({
+							id: this.inputForm.id,
+							status: "6",
+							type: "10"
+						}).then(result => {
+							// 暂存状态
+							this.inputForm.id = ""
+							this.inputForm.status = 1
+							enrollmentRegistrationService.savePerformanceInfo(this.inputForm).then(res => {
+								this.$message.success(res)
+								this.$emit("addPerformanceInfo", this.inputForm.enrollmentRegistrationId)
+								this.loading = false
+								this.close()
+							})
+						})
+					} else {
+						console.log(this.inputForm.id);
+						console.log(this.inputForm.status);
+						// 暂存状态
+						this.inputForm.status = 1
+						enrollmentRegistrationService.savePerformanceInfo(this.inputForm).then(res => {
+							this.$message.success(res)
+							this.$emit("addPerformanceInfo", this.inputForm.enrollmentRegistrationId)
+							this.loading = false
+							this.close()
+						})
+					}
+
+
 				}
 			})
 		},

+ 47 - 15
src/views/sys/user/components/RewardInfo.vue

@@ -77,7 +77,8 @@ export default {
 				name: "",       // 奖项
 				rewardDate: "",       // 获奖日期
 				description: "", // 简述
-				files: []
+				files: [],
+				status: "",
 			},
 			keyWatch: '',
 			rules: {
@@ -136,7 +137,7 @@ export default {
 		getKeyWatch(keyWatch) {
 			this.keyWatch = keyWatch
 		},
-		init(method, row, reId) {
+		init(method, id, reId) {
 			this.method = method
 			this.inputForm = {
 				id: "",
@@ -144,7 +145,8 @@ export default {
 				name: "",       // 奖项
 				rewardDate: "",       // 获奖日期
 				description: "", // 简述
-				files: []
+				files: [],
+				status: "",
 			}
 			if (method === 'add') {
 				this.title = `新增语言能力`
@@ -157,17 +159,19 @@ export default {
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
-				if (row && row.id) {
-
-					this.inputForm = this.recover(this.inputForm, row)
-					this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-					if (!this.inputForm.files) {
-						this.inputForm.files = []
-					}
-					this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'reward', 50, null, null, null, null, [...this.fileType])
-					this.loading = false
+				if (id) {
+					enrollmentRegistrationService.findRewardInfoById({
+						id: id
+					}).then(res => {
+						this.inputForm = this.recover(this.inputForm, res)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						if (!this.inputForm.files) {
+							this.inputForm.files = []
+						}
+						this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'reward', 50, null, null, null, null, [...this.fileType])
+						this.loading = false
+					})
 				} else {
-					this.inputForm.id = this.generateFallbackId()
 					this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'reward', 50, null, null, null, null, [...this.fileType])
 					this.loading = false
 				}
@@ -188,8 +192,36 @@ export default {
 				if (valid) {
 					this.inputForm.rewardDate = new Date(this.inputForm.rewardDate).getTime(); // 转为时间戳
 					this.inputForm.files = this.$refs.upLoadComponent.getDataList()
-					this.$emit("addRewardInfo", JSON.parse(JSON.stringify(this.inputForm)))
-					this.close()
+					// this.$emit("addRewardInfo", JSON.parse(JSON.stringify(this.inputForm)))
+					// this.close()
+					if (this.inputForm.id && this.inputForm.status != "1" && this.inputForm.status != "4") {
+						enrollmentRegistrationService.updateInfoStatus({
+							id: this.inputForm.id,
+							status: "6",
+							type: "8"
+						}).then(result => {
+							// 暂存状态
+							this.inputForm.id = ""
+							this.inputForm.status = 1
+							enrollmentRegistrationService.saveRewardInfo(this.inputForm).then(res => {
+								this.$message.success(res)
+								this.$emit("addRewardInfo", this.inputForm.enrollmentRegistrationId)
+								this.loading = false
+								this.close()
+							})
+						})
+					} else {
+						// 暂存状态
+						this.inputForm.status = 1
+						enrollmentRegistrationService.saveRewardInfo(this.inputForm).then(res => {
+							this.$message.success(res)
+							this.$emit("addRewardInfo", this.inputForm.enrollmentRegistrationId)
+							this.loading = false
+							this.close()
+						})
+					}
+
+
 				}
 			})
 		},

+ 46 - 14
src/views/sys/user/components/SkillInfo.vue

@@ -93,7 +93,8 @@ export default {
 				category: '',
 				obtainDate: "",
 				usageTime: '',
-				files: []
+				files: [],
+				status: ""
 			},
 			keyWatch: '',
 			rules: {
@@ -161,7 +162,7 @@ export default {
 		getKeyWatch(keyWatch) {
 			this.keyWatch = keyWatch
 		},
-		init(method, row, reId) {
+		init(method, id, reId) {
 			this.method = method
 			this.inputForm = {
 				id: "",
@@ -170,7 +171,8 @@ export default {
 				category: '',
 				obtainDate: "",
 				usageTime: '',
-				files: []
+				files: [],
+				status: "",
 			}
 			if (method === 'add') {
 				this.title = `新增职称证书`
@@ -183,16 +185,19 @@ export default {
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
-				if (row && row.id) {
-					this.inputForm = this.recover(this.inputForm, row)
-					this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-					if (!this.inputForm.files) {
-						this.inputForm.files = []
-					}
-					this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'skill', 50, null, null, null, null)
-					this.loading = false
+				if (id) {
+					enrollmentRegistrationService.findSkillInfoById({
+						id: id
+					}).then(res => {
+						this.inputForm = this.recover(this.inputForm, res)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						if (!this.inputForm.files) {
+							this.inputForm.files = []
+						}
+						this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'skill', 50, null, null, null, null)
+						this.loading = false
+					})
 				} else {
-					this.inputForm.id = this.generateFallbackId()
 					this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'skill', 50, null, null, null, null)
 					this.loading = false
 				}
@@ -207,8 +212,35 @@ export default {
 				if (valid) {
 					this.inputForm.obtainDate = new Date(this.inputForm.obtainDate).getTime(); // 转为时间戳
 					this.inputForm.files = this.$refs.upLoadComponent.getDataList()
-					this.$emit("addSkillInfo", JSON.parse(JSON.stringify(this.inputForm)))
-					this.close()
+					// this.$emit("addSkillInfo", JSON.parse(JSON.stringify(this.inputForm)))
+					// this.close()
+					if (this.inputForm.id && this.inputForm.status != "1" && this.inputForm.status != "4") {
+						enrollmentRegistrationService.updateInfoStatus({
+							id: this.inputForm.id,
+							status: "6",
+							type: "5"
+						}).then(result => {
+							// 暂存状态
+							this.inputForm.id = ""
+							this.inputForm.status = 1
+							enrollmentRegistrationService.saveSkillInfo(this.inputForm).then(res => {
+								this.$message.success(res)
+								this.$emit("addSkillInfo", this.inputForm.enrollmentRegistrationId)
+								this.loading = false
+								this.close()
+							})
+						})
+					} else {
+						// 暂存状态
+						this.inputForm.status = 1
+						enrollmentRegistrationService.saveSkillInfo(this.inputForm).then(res => {
+							this.$message.success(res)
+							this.$emit("addSkillInfo", this.inputForm.enrollmentRegistrationId)
+							this.loading = false
+							this.close()
+						})
+					}
+
 				}
 			})
 		},

+ 42 - 8
src/views/sys/user/components/SocietyInfo.vue

@@ -70,11 +70,13 @@ export default {
 			visible: false,
 			loading: false,
 			inputForm: {
+				id: "",
 				enrollmentRegistrationId: '',
 				name: '',            // 名称
 				startDate: '',       // 开始日期
 				endDate: '',        // 结束日期
 				institution: '',          // 机构
+				status: ""
 			},
 			keyWatch: '',
 			rules: {
@@ -126,14 +128,16 @@ export default {
 		getKeyWatch(keyWatch) {
 			this.keyWatch = keyWatch
 		},
-		init(method, row, reId) {
+		init(method, id, reId) {
 			this.method = method
 			this.inputForm = {
+				id: "",
 				enrollmentRegistrationId: '',
 				name: '',            // 名称
 				startDate: '',       // 开始日期
 				endDate: '',        // 结束日期
 				institution: '',          // 机构
+				status: ""
 			}
 			if (method === 'add') {
 				this.title = `新增社会及行业职务`
@@ -146,12 +150,15 @@ export default {
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
-				if (row && row.id) {
-					this.inputForm = this.recover(this.inputForm, res)
-					this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-					this.loading = false
+				if (id) {
+					enrollmentRegistrationService.findSocietyInfoById({
+						id: id
+					}).then(res => {
+						this.inputForm = this.recover(this.inputForm, res)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						this.loading = false
+					})
 				} else {
-					this.inputForm.id = this.generateFallbackId()
 					this.loading = false
 				}
 			})
@@ -171,8 +178,35 @@ export default {
 					if (this.commonJS.isNotEmpty(this.inputForm.endDate)) {
 						this.inputForm.endDate = new Date(this.inputForm.endDate).getTime(); // 转为时间戳
 					}
-					this.$emit("addSocietyInfo", JSON.parse(JSON.stringify(this.inputForm)))
-					this.close()
+					// this.$emit("addSocietyInfo", JSON.parse(JSON.stringify(this.inputForm)))
+					// this.close()
+					if (this.inputForm.id && this.inputForm.status != "1" && this.inputForm.status != "4") {
+						enrollmentRegistrationService.updateInfoStatus({
+							id: this.inputForm.id,
+							status: "6",
+							type: "9"
+						}).then(result => {
+							// 暂存状态
+							this.inputForm.id = ""
+							this.inputForm.status = 1
+							enrollmentRegistrationService.saveSocietyInfo(this.inputForm).then(res => {
+								this.$message.success(res)
+								this.$emit("addSkillInfo", this.inputForm.enrollmentRegistrationId)
+								this.loading = false
+								this.close()
+							})
+						})
+					} else {
+						// 暂存状态
+						this.inputForm.status = "1"
+						enrollmentRegistrationService.saveSocietyInfo(this.inputForm).then(res => {
+							this.$message.success(res)
+							this.$emit("addSocietyInfo", this.inputForm.enrollmentRegistrationId)
+							this.loading = false
+							this.close()
+						})
+					}
+
 				}
 			})
 		},

+ 45 - 12
src/views/sys/user/components/TrainingInfo.vue

@@ -74,6 +74,7 @@ export default {
 				name: "",
 				trainingInstitution: "",
 				trainingResult: "",
+				status: "",
 				files: []
 			},
 			keyWatch: '',
@@ -134,13 +135,14 @@ export default {
 		getKeyWatch(keyWatch) {
 			this.keyWatch = keyWatch
 		},
-		init(method, row, reId) {
+		init(method, id, reId) {
 			this.method = method
 			this.inputForm = {
 				id: "",
 				name: "",
 				trainingInstitution: "",
 				trainingResult: "",
+				status: "",
 				files: []
 			}
 			if (method === 'add') {
@@ -154,16 +156,19 @@ export default {
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
-				if (row && row.id) {
-					this.inputForm = this.recover(this.inputForm, row)
-					this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-					if (!this.inputForm.files) {
-						this.inputForm.files = []
-					}
-					this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'training', 50, null, null, null, null, [...this.fileType])
-					this.loading = false
+				if (id) {
+					enrollmentRegistrationService.findTrainingInfoById({
+						id: id
+					}).then(res => {
+						this.inputForm = this.recover(this.inputForm, res)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						if (!this.inputForm.files) {
+							this.inputForm.files = []
+						}
+						this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'training', 50, null, null, null, null, [...this.fileType])
+						this.loading = false
+					})
 				} else {
-					this.inputForm.id = this.generateFallbackId()
 					this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'training', 50, null, null, null, null, [...this.fileType])
 					this.loading = false
 				}
@@ -177,8 +182,36 @@ export default {
 			this.$refs['inputForm'].validate((valid) => {
 				if (valid) {
 					this.inputForm.files = this.$refs.upLoadComponent.getDataList()
-					this.$emit("addTrainingInfo", JSON.parse(JSON.stringify(this.inputForm)))
-					this.close()
+					// this.$emit("addTrainingInfo", JSON.parse(JSON.stringify(this.inputForm)))
+					// this.close()
+					if (this.inputForm.id && this.inputForm.status != "1" && this.inputForm.status != "4") {
+						enrollmentRegistrationService.updateInfoStatus({
+							id: this.inputForm.id,
+							status: "6",
+							type: "3"
+						}).then(result => {
+							// 暂存状态
+							this.inputForm.id = ""
+							this.inputForm.status = 1
+							enrollmentRegistrationService.saveTrainingInfo(this.inputForm).then(res => {
+								this.$message.success(res)
+								this.$emit("addTrainingInfo", this.inputForm.enrollmentRegistrationId)
+								this.loading = false
+								this.close()
+							})
+						})
+					} else {
+						// 暂存状态
+						this.inputForm.status = 1
+						enrollmentRegistrationService.saveTrainingInfo(this.inputForm).then(res => {
+							this.$message.success(res)
+							this.$emit("addTrainingInfo", this.inputForm.enrollmentRegistrationId)
+							this.loading = false
+							this.close()
+						})
+					}
+
+
 				}
 			})
 		},

+ 45 - 10
src/views/sys/user/components/WorkInfo.vue

@@ -95,7 +95,8 @@ export default {
 				startDate: '',
 				endDate: '',
 				certifier: '',
-				isCurrentCompanyExperience: "1"
+				isCurrentCompanyExperience: "1",
+				status: ""
 			},
 			keyWatch: '',
 			rules: {
@@ -157,7 +158,7 @@ export default {
 		getKeyWatch(keyWatch) {
 			this.keyWatch = keyWatch
 		},
-		init(method, row, reId) {
+		init(method, id, reId) {
 			this.method = method
 			this.inputForm = {
 				id: "",
@@ -167,7 +168,8 @@ export default {
 				startDate: '',
 				endDate: '',
 				certifier: '',
-				isCurrentCompanyExperience: "1"
+				isCurrentCompanyExperience: "1",
+				status: ""
 			}
 			if (method === 'add') {
 				this.title = `新增工作经历`
@@ -180,12 +182,18 @@ export default {
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
-				if (row && row.id) {
-					this.inputForm = this.recover(this.inputForm, row)
-					this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-					this.loading = false
+				if (id) {
+					enrollmentRegistrationService.findWorkInfoById({
+						id: id
+					}).then(res => {
+						this.inputForm = this.recover(this.inputForm, res)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						if (this.inputForm.id && this.inputForm.status != "1") {
+							this.inputForm.id == this.generateFallbackId()
+						}
+						this.loading = false
+					})
 				} else {
-					this.inputForm.id = this.generateFallbackId()
 					this.loading = false
 				}
 			})
@@ -201,8 +209,35 @@ export default {
 				if (valid) {
 					this.inputForm.startDate = new Date(this.inputForm.startDate).getTime(); // 转为时间戳
 					this.inputForm.endDate = new Date(this.inputForm.endDate).getTime(); // 转为时间戳
-					this.$emit("addWorkInfo", JSON.parse(JSON.stringify(this.inputForm)))
-					this.close()
+					// this.$emit("addWorkInfo", JSON.parse(JSON.stringify(this.inputForm)))
+					// this.close()
+					if (this.inputForm.id && this.inputForm.status != "1" && this.inputForm.status != "4") {
+						enrollmentRegistrationService.updateInfoStatus({
+							id: this.inputForm.id,
+							status: "6",
+							type: "2"
+						}).then(result => {
+							// 暂存状态
+							this.inputForm.id = ""
+							this.inputForm.status = 1
+							enrollmentRegistrationService.saveWorkInfo(this.inputForm).then(res => {
+								this.$message.success(res)
+								this.$emit("addWorkInfo", this.inputForm.enrollmentRegistrationId)
+								this.loading = false
+								this.close()
+							})
+						})
+					} else {
+						// 暂存状态
+						this.inputForm.status = 1
+						enrollmentRegistrationService.saveWorkInfo(this.inputForm).then(res => {
+							this.$message.success(res)
+							this.$emit("addWorkInfo", this.inputForm.enrollmentRegistrationId)
+							this.loading = false
+							this.close()
+						})
+					}
+
 				}
 			})
 		},