Ver código fonte

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/views/human/enrollment/registration/EnrollmentRegistrationEditForm.vue
徐滕 1 mês atrás
pai
commit
55dd12f39f

+ 7 - 0
src/api/sys/userService.js

@@ -243,4 +243,11 @@ export default {
 			data: params,
 		});
 	},
+	resetPwd(params) {
+		return request({
+			url: prefix + `/sys/user/resetPwd`,
+			method: "post",
+			params: params,
+		});
+	},
 };

+ 33 - 11
src/views/common/UpLoadComponentCardStyle.vue

@@ -6,7 +6,7 @@
     <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" #tip>
+      <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>
@@ -57,7 +57,7 @@
               <Download @click="toHref(item)" />
             </el-icon>
           </el-tooltip>
-          <el-tooltip effect="dark" content="删除" placement="top">
+          <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)" />
@@ -140,7 +140,8 @@ export default {
       createBy: '',
       showDivider: true,
       loading: false,
-      dataListLength: ''
+      dataListLength: '',
+      fileTypes: []
     }
   },
   watch: {
@@ -200,7 +201,7 @@ export default {
      *    注:值为空时,默认值为true
      *    showDivider=false时 ‘附件‘Divider隐藏
      */
-    async newUpload(auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider) {
+    async newUpload(auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider, fileTypes) {
       await this.fileLoadingFalse()
       if (this.commonJS.isEmpty(fileList)) {
         this.fileLoading = true
@@ -242,6 +243,13 @@ export default {
           this.delFlag = delFlag
         }
       }
+      if (fileTypes !== undefined && fileTypes !== null && fileTypes.length > 0) {
+
+        this.fileTypes = [...fileTypes]
+      } else {
+        this.fileTypes = []
+      }
+
 
       for await (let item of fileList) {
         if (item.url && item.url !== null && item.url !== undefined && item.url !== "") {
@@ -287,6 +295,13 @@ export default {
         }, 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'
@@ -321,6 +336,19 @@ export default {
           this.$message.warning(`上传失败,当前限制上传 1 个文件`)
           return
         }
+
+        console.log();
+
+        if (this.fileTypes && this.fileTypes.length > 0) {
+
+          let uploadTypeFlag = this.isAllowedImageType(file.name);
+          if (!uploadTypeFlag) {
+            this.$message.warning(`上传的文件类型不符合要求,请选择正确的文件类型`);
+            return;
+          }
+        }
+
+
         let fileListNamesList = []
         console.log(JSON.stringify(this.fileList));
         this.fileList.forEach(fileItem => {
@@ -338,21 +366,15 @@ export default {
             this.$message.error('文件大小不能超过 ' + this.maxValue + ' MB!')
             return
           }
-          // this.dataListNew = []
-          // this.dataList.forEach((item) => {
-          //   this.dataListNew.push(item)
-          // })
+
           var fileListNames = []
           for (let fileItem of this.fileList) {
             fileListNames.push(fileItem.name)
           }
-          // for (let item of fileList) {
 
 
           let item1 = JSON.parse(JSON.stringify(file))
-          // if (fileListNames.length === 0 || fileListNames.indexOf(item1.name) === -1) {
           this.fileList.push(item1)
-          // }
           item1.createTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
           item1.createBy = {
             id: '',

+ 17 - 14
src/views/human/enrollment/registration/EnrollmentRegistrationAddForm.vue

@@ -264,8 +264,8 @@
 					</el-row>
 				</el-form>
 				<el-form v-else-if="inputForm.type !== '0'" style="width: 100%" :model="inputForm" ref="inputForm"
-					v-loading="loading" :class="method === 'view' ? 'readonly' : ''" :disabled="true" label-width="110px"
-					@submit.native.prevent>
+					v-loading="loading" :class="method === 'view' ? 'readonly' : ''" :disabled="true"
+					label-width="110px" @submit.native.prevent>
 					<el-row :gutter="26">
 						<el-col :span="12">
 							<el-form-item label="所属部门" prop="department" :rules="[
@@ -958,7 +958,7 @@ export default {
 					}
 					//获取户籍所在地
 					const regionCode = idCard.substring(0, 6);
-					this.generalForm.nativePlace = regionCode
+					this.inputForm.nativePlace = regionCode
 					this.inputForm.age = age
 					this.inputForm.sex = sex
 					this.inputForm.birthday = birth
@@ -968,19 +968,22 @@ export default {
 		},
 		//联系电话唯一性判断
 		mobilePhoneOnly(mobilePhone) {
-			if (!this.validateXG.isPhoneOrMobile(mobilePhone)) {
-				this.$message.error('”联系电话“填写不正确,请重新填写')
-				this.loading = false
-				this.inputForm.mobilePhone = ''
-				throw new Error('”联系电话“填写不正确,请重新填写')
-			}
-			enrollmentRegistrationService.findMobilePhoneOnly(mobilePhone).then((data) => {
-				if (data !== 0) {
-					this.$message.error('联系电话已存在,请重新确认')
+			if (this.commonJS.isNotEmpty(mobilePhone)) {
+				if (!this.validateXG.isPhoneOrMobile(mobilePhone)) {
+					this.$message.error('”联系电话“填写不正确,请重新填写')
+					this.loading = false
 					this.inputForm.mobilePhone = ''
-					throw new Error('联系电话已存在,请重新确认')
+					throw new Error('”联系电话“填写不正确,请重新填写')
 				}
-			})
+				enrollmentRegistrationService.findMobilePhoneOnly(mobilePhone).then((data) => {
+					if (data !== 0) {
+						this.$message.error('联系电话已存在,请重新确认')
+						this.inputForm.mobilePhone = ''
+						throw new Error('联系电话已存在,请重新确认')
+					}
+				})
+			}
+
 
 		},
 		checkBankNumber(bankNumber) {

+ 132 - 69
src/views/human/enrollment/registration/EnrollmentRegistrationEditForm.vue

@@ -6,7 +6,7 @@
 				:disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" label-width="100px"
 				@submit.native.prevent>
 
-				<el-divider content-position="left"><i class="el-icon-document"></i> <span
+				<!-- <el-divider content-position="left"><i class="el-icon-document"></i> <span
 						style="font-weight: 900; font-size: 16px; color: #606266;">账号信息</span></el-divider>
 				<el-row :gutter="26">
 					<el-col :span="24">
@@ -34,7 +34,7 @@
 								show-password></el-input>
 						</el-form-item>
 					</el-col>
-				</el-row>
+				</el-row> -->
 				<el-divider content-position="left"><i class="el-icon-document"></i> <span
 						style="font-weight: 900; font-size: 16px; color: #606266;">基础信息</span></el-divider>
 				<el-row :gutter="26">
@@ -81,7 +81,7 @@
 							<!--						<el-input v-model="inputForm.politicalOutlook"></el-input>-->
 							<el-select v-model="inputForm.politicalOutlook" placeholder="请选择政治面貌" style="width:100%;" clearable>
 								<el-option v-for="item in $dictUtils.getDictList('political_outlook')" :key="item.value"
-									:label="item.label" :value="item.value" >
+									:label="item.label" :value="item.value">
 								</el-option>
 							</el-select>
 						</el-form-item>
@@ -255,6 +255,7 @@
 									</el-select>
 								</el-form-item>
 							</el-col>
+
 							<el-col :span="12">
 								<el-form-item label="岗位" prop="postIdList" :rules="[]">
 									<el-select v-model="inputForm.postIdList" style="width: 100%" multiple
@@ -325,14 +326,35 @@
 								<el-form-item label="员工类型" prop="onJobStatus" :rules="[
 								]">
 									<!--						<el-input v-model="inputForm.politicalOutlook"></el-input>-->
-									<el-select v-model="inputForm.onJobStatus" placeholder="请选择员工类型"
-										style="width:100%;">
+									<el-select @change="handleChangeJobStatus" v-model="inputForm.onJobStatus"
+										placeholder="请选择员工类型" style="width:100%;">
 										<el-option v-for="item in $dictUtils.getDictList('on_job_status')"
 											:key="item.value" :label="item.label" :value="item.value">
 										</el-option>
 									</el-select>
 								</el-form-item>
 							</el-col>
+							<el-col :span="12" v-if="trialFlag">
+								<el-form-item label="试用期时长(月)" prop="trialDuration" :rules="[
+									// { required: true, message: '请输入试用期时长(月)', trigger: 'blur' },
+									{ pattern: /^\d+(\.\d{1,2})?$/, message: '请输入数字', trigger: 'blur' }
+								]">
+									<el-input :disabled="!isAdmin" v-model="inputForm.trialDuration"
+										oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{0,2}).*$/, '$1').replace(/\.{2,}/g, '.').replace(/^0+(\d)/, '$1')"
+										placeholder="请输入试用期时长(月)"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12" v-if="trialFlag">
+								<el-form-item label="试用期结束日期" prop="trialEndDate" :rules="[
+									// { required: true, message: '请选择试用期结束日期', trigger: 'blur' }
+								]">
+									<el-date-picker :disabled="!isAdmin" style="width: 100%"
+										v-model="inputForm.trialEndDate" value-format="YYYY-MM-DD"
+										placeholder="选择试用期结束日期">
+									</el-date-picker>
+								</el-form-item>
+							</el-col>
+
 							<el-col :span="12">
 								<el-form-item label="岗位" prop="postIdList" :rules="[]">
 									<el-select v-model="inputForm.postIdList" style="width: 100%" multiple
@@ -493,7 +515,8 @@
 					</el-col>
 					<el-col :span="12">
 						<el-form-item label="社保卡照片正面" prop="socialSecurityPictureFront" :rules="[]">
-							<el-upload :action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
+							<el-upload class="uploadCom"
+								:action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
 								:limit="limitNum" :disabled="hideUploadEdit" list-type="picture-card"
 								:auto-upload="true" :on-success="handleUploadSuccess" v-model:file-list="fileList">
 								<el-icon>
@@ -783,7 +806,9 @@
 										<el-collapse-item>
 											<template #title="{ isActive }">
 												<div class="collapseTitle">
-													<span style="font-size: 16px;"> {{ item.education + ' - ' +
+													<span style="font-size: 16px;"> {{
+														$dictUtils.getDictLabel("education",
+															item.education, '-') + ' - ' +
 														item.graduatedFrom +
 														' - ' + item.cultureMethod }}</span>
 													<span style="color: #b0b0b0;font-size: 12px;">&nbsp;|&nbsp;</span>
@@ -803,7 +828,7 @@
 													</div>
 												</div>
 											</template>
-											<el-descriptions title="" border>
+											<el-descriptions title="" border :column="2">
 												<el-descriptions-item label="开始日期:">{{
 													handleDateFormatter(item.startDate)
 												}}</el-descriptions-item>
@@ -836,17 +861,25 @@
 												<el-descriptions-item label="毕业类型:">{{
 													$dictUtils.getDictLabel("graduation_type", item.graduationType, '-')
 												}}</el-descriptions-item>
-												<el-descriptions-item label="培养方式:">{{ item.cultureMethod
-												}}</el-descriptions-item>
+												<!-- <el-descriptions-item label="培养方式:">{{ item.cultureMethod
+												}}</el-descriptions-item> -->
 												<el-descriptions-item label="专业描述:">{{ item.specialityDesc
 												}}</el-descriptions-item>
+												<el-descriptions-item label="学历证明:">
+													<AttachmentView :fileList="item.educationFile">
+													</AttachmentView>
+												</el-descriptions-item>
+												<el-descriptions-item label="学位证明:">
+													<AttachmentView :fileList="item.degreeFile">
+													</AttachmentView>
+												</el-descriptions-item>
 
 											</el-descriptions>
 										</el-collapse-item>
 									</div>
 								</el-collapse>
-								<el-empty image-size="100px" style="margin-top: 0 !important;" v-else
-									description="暂无教育经历"></el-empty>
+								<el-empty image-size="80px" style="margin-top: 0 !important;padding: 0 !important;"
+									v-else description="暂无教育经历"></el-empty>
 							</el-col>
 						</el-row>
 					</el-collapse-transition>
@@ -910,8 +943,8 @@
 										</el-collapse-item>
 									</div>
 								</el-collapse>
-								<el-empty image-size="100px" style="margin-top: 0 !important;" v-else
-									description="暂无工作经历"></el-empty>
+								<el-empty image-size="80px" style="margin-top: 0 !important;padding: 0 !important;"
+									v-else description="暂无工作经历"></el-empty>
 							</el-col>
 						</el-row>
 					</el-collapse-transition>
@@ -959,8 +992,8 @@
 										</el-collapse-item>
 									</div>
 								</el-collapse>
-								<el-empty image-size="100px" style="margin-top: 0 !important;" v-else
-									description="暂无培训经历"></el-empty>
+								<el-empty image-size="80px" style="margin-top: 0 !important;padding: 0 !important;"
+									v-else description="暂无培训经历"></el-empty>
 							</el-col>
 						</el-row>
 					</el-collapse-transition>
@@ -1021,8 +1054,8 @@
 										</el-collapse-item>
 									</div>
 								</el-collapse>
-								<el-empty image-size="100px" style="margin-top: 0 !important;" v-else
-									description="暂无资质证书"></el-empty>
+								<el-empty image-size="80px" style="margin-top: 0 !important;padding: 0 !important;"
+									v-else description="暂无资质证书"></el-empty>
 							</el-col>
 						</el-row>
 					</el-collapse-transition>
@@ -1072,8 +1105,8 @@
 										</el-collapse-item>
 									</div>
 								</el-collapse>
-								<el-empty image-size="100px" style="margin-top: 0 !important;" v-else
-									description="暂无专业技能"></el-empty>
+								<el-empty image-size="80px" style="margin-top: 0 !important;padding: 0 !important;"
+									v-else description="暂无专业技能"></el-empty>
 							</el-col>
 						</el-row>
 					</el-collapse-transition>
@@ -1127,8 +1160,8 @@
 										</el-collapse-item>
 									</div>
 								</el-collapse>
-								<el-empty image-size="100px" style="margin-top: 0 !important;" v-else
-									description="暂无语言能力信息"></el-empty>
+								<el-empty image-size="80px" style="margin-top: 0 !important;padding: 0 !important;"
+									v-else description="暂无语言能力信息"></el-empty>
 							</el-col>
 						</el-row>
 					</el-collapse-transition>
@@ -1185,8 +1218,8 @@
 										</el-collapse-item>
 									</div>
 								</el-collapse>
-								<el-empty image-size="100px" style="margin-top: 0 !important;" v-else
-									description="暂无家庭成员信息"></el-empty>
+								<el-empty image-size="80px" style="margin-top: 0 !important;padding: 0 !important;"
+									v-else description="暂无家庭成员信息"></el-empty>
 							</el-col>
 						</el-row>
 					</el-collapse-transition>
@@ -1236,8 +1269,8 @@
 										</el-collapse-item>
 									</div>
 								</el-collapse>
-								<el-empty image-size="100px" style="margin-top: 0 !important;" v-else
-									description="暂无表彰与奖励"></el-empty>
+								<el-empty image-size="80px" style="margin-top: 0 !important;padding: 0 !important;"
+									v-else description="暂无表彰与奖励"></el-empty>
 							</el-col>
 						</el-row>
 					</el-collapse-transition>
@@ -1290,7 +1323,9 @@ import SkillInfo from "./components/SkillInfo";
 import LanguageInfo from "./components/LanguageInfo";
 import FamilyInfo from "./components/FamilyInfo";
 import RewardInfo from "./components/RewardInfo";
+import AttachmentView from './components/AttachmentView'
 
+import userService from "@/api/sys/userService";
 import postService from "@/api/sys/postService";
 import roleService from "@/api/sys/roleService";
 export default {
@@ -1310,6 +1345,8 @@ export default {
 	},
 	data() {
 		return {
+			isAdmin: false,
+			trialFlag: false,
 			bankHideUploadEdit: false, //控制上传点击
 			bankHideUploadEdit2: false, //控制上传点击
 			bankFileList: [],
@@ -1382,6 +1419,8 @@ export default {
 				remarks: '',
 				type: '',
 				onJobStatus: '',
+				trialDuration: "",
+				trialEndDate: "",
 				socialSecurityNumber: '',
 				socialSecurityBankNumber: '',
 				socialSecurityPictureFront: '',
@@ -1507,6 +1546,7 @@ export default {
 	},
 	created() {
 		this.ossService = new OSSSerivce()
+		this.checkIsAdmin()
 	},
 	components: {
 		SelectTree,
@@ -1517,7 +1557,8 @@ export default {
 		SkillInfo,
 		LanguageInfo,
 		FamilyInfo,
-		RewardInfo
+		RewardInfo,
+		AttachmentView
 	},
 	computed: {
 		bus: {
@@ -1664,6 +1705,8 @@ export default {
 				remarks: '',
 				type: '',
 				onJobStatus: '',
+				trialDuration: "",
+				trialEndDate: "",
 				socialSecurityNumber: '',
 				socialSecurityBankNumber: '',
 				socialSecurityPictureFront: '',
@@ -1702,8 +1745,14 @@ export default {
 						method = 'view'
 					}
 					this.inputForm = this.recover(this.inputForm, data)
-					console.log('this.inputForm', this.inputForm)
 					this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+
+					if (this.inputForm.onJobStatus == 1) {
+						this.trialFlag = true
+					} else {
+						this.trialFlag = false
+					}
+
 					if (this.commonJS.isEmpty(this.inputForm.roleIdList)) {
 						this.inputForm.roleIdList = []
 					}
@@ -1803,6 +1852,7 @@ export default {
 
 						})
 					}
+
 					this.loading = false
 				})
 
@@ -1985,6 +2035,14 @@ export default {
 				})
 			}
 		},
+		handleChangeJobStatus(val) {
+			if (val == 1) {
+				this.trialFlag = true
+			} else {
+				this.trialFlag = false
+
+			}
+		},
 		//身份证号码唯一性判断
 		idCardOnly(idCard, id) {
 			if (this.commonJS.isNotEmpty(idCard)) {
@@ -2229,12 +2287,10 @@ export default {
 		},
 		// 教育经历
 		addEdu() {
-			this.$refs.EducationInfo.init("add", null, this.inputForm.id)
-			this.$refs.EducationInfo.currentUserId = this.inputForm.userId
+			this.$refs.EducationInfo.init("add", null, this.inputForm.userId)
 		},
 		editEdu(id) {
-			this.$refs.EducationInfo.init("edit", id)
-			this.$refs.EducationInfo.currentUserId = this.inputForm.userId
+			this.$refs.EducationInfo.init("edit", id, this.inputForm.userId)
 		},
 		delEdu(id) {
 			this.$confirm('确定删除此条教育经历信息吗?', '提示', {
@@ -2258,19 +2314,17 @@ export default {
 		},
 		handleGetEduInfo() {
 			enrollmentRegistrationService.findEduInfo({
-				enrollmentRegistrationId: this.inputForm.id
+				userId: this.inputForm.userId
 			}).then(res => {
 				this.inputForm.eduInfoList = res
 			})
 		},
 		// 工作经历处理
 		addWork() {
-			this.$refs.WorkInfo.init("add", null, this.inputForm.id)
-			this.$refs.WorkInfo.currentUserId = this.inputForm.userId
+			this.$refs.WorkInfo.init("add", null, this.inputForm.userId)
 		},
 		editWork(id) {
-			this.$refs.WorkInfo.init("edit", id)
-			this.$refs.WorkInfo.currentUserId = this.inputForm.userId
+			this.$refs.WorkInfo.init("edit", id, this.inputForm.userId)
 		},
 		delWork(id) {
 			this.$confirm('确定删除此条工作经历信息吗?', '提示', {
@@ -2294,19 +2348,17 @@ export default {
 		},
 		handleGetWorkInfo() {
 			enrollmentRegistrationService.findWorkInfo({
-				enrollmentRegistrationId: this.inputForm.id
+				userId: this.inputForm.userId
 			}).then(res => {
 				this.inputForm.workInfoList = res
 			})
 		},
 		//培训经历处理
 		addTraining() {
-			this.$refs.TrainingInfo.init("add", null, this.inputForm.id)
-			this.$refs.TrainingInfo.currentUserId = this.inputForm.userId
+			this.$refs.TrainingInfo.init("add", null, this.inputForm.userId)
 		},
 		editTraining(id) {
-			this.$refs.TrainingInfo.init("edit", id)
-			this.$refs.TrainingInfo.currentUserId = this.inputForm.userId
+			this.$refs.TrainingInfo.init("edit", id, this.inputForm.userId)
 		},
 		delTraining(id) {
 			this.$confirm('确定删除此条培训经历信息吗?', '提示', {
@@ -2330,19 +2382,17 @@ export default {
 		},
 		handleGetTrainingInfo() {
 			enrollmentRegistrationService.findTrainingInfo({
-				enrollmentRegistrationId: this.inputForm.id
+				userId: this.inputForm.userId
 			}).then(res => {
 				this.inputForm.trainingInfoList = res
 			})
 		},
 		//资质证书处理
 		addCertificate() {
-			this.$refs.certificateInfo.init("add", null, this.inputForm.id)
-			this.$refs.certificateInfo.currentUserId = this.inputForm.userId
+			this.$refs.certificateInfo.init("add", null, this.inputForm.userId)
 		},
 		editCertificate(id) {
-			this.$refs.certificateInfo.init("edit", id)
-			this.$refs.certificateInfo.currentUserId = this.inputForm.userId
+			this.$refs.certificateInfo.init("edit", id, this.inputForm.userId)
 		},
 		delCertificate(id) {
 			this.$confirm('确定删除此条资质证书信息吗?', '提示', {
@@ -2366,19 +2416,17 @@ export default {
 		},
 		handleGetCertificateInfo() {
 			enrollmentRegistrationService.findCertificateInfo({
-				enrollmentRegistrationId: this.inputForm.id
+				userId: this.inputForm.userId
 			}).then(res => {
 				this.inputForm.certificateInfoList = res
 			})
 		},
 		//专业技能处理
 		addSkill() {
-			this.$refs.skillInfo.init("add", null, this.inputForm.id)
-			this.$refs.skillInfo.currentUserId = this.inputForm.userId
+			this.$refs.skillInfo.init("add", null, this.inputForm.userId)
 		},
 		editSkill(id) {
-			this.$refs.skillInfo.init("edit", id)
-			this.$refs.skillInfo.currentUserId = this.inputForm.userId
+			this.$refs.skillInfo.init("edit", id, this.inputForm.userId)
 		},
 		delSkill(id) {
 			this.$confirm('确定删除此条专业技能信息吗?', '提示', {
@@ -2402,19 +2450,17 @@ export default {
 		},
 		handleGetSkillInfo() {
 			enrollmentRegistrationService.findSkillInfo({
-				enrollmentRegistrationId: this.inputForm.id
+				userId: this.inputForm.userId
 			}).then(res => {
 				this.inputForm.skillInfoList = res
 			})
 		},
 		//语言能力处理
 		addLanguage() {
-			this.$refs.languageInfo.init("add", null, this.inputForm.id)
-			this.$refs.languageInfo.currentUserId = this.inputForm.userId
+			this.$refs.languageInfo.init("add", null, this.inputForm.userId)
 		},
 		editLanguage(id) {
-			this.$refs.languageInfo.init("edit", id)
-			this.$refs.languageInfo.currentUserId = this.inputForm.userId
+			this.$refs.languageInfo.init("edit", id, this.inputForm.userId)
 		},
 		delLanguage(id) {
 			this.$confirm('确定删除此条语言能力信息吗?', '提示', {
@@ -2438,19 +2484,17 @@ export default {
 		},
 		handleGetLanguageInfo() {
 			enrollmentRegistrationService.findLanguageInfo({
-				enrollmentRegistrationId: this.inputForm.id
+				userId: this.inputForm.userId
 			}).then(res => {
 				this.inputForm.languageInfoList = res
 			})
 		},
 		//家庭成员处理
 		addFamily() {
-			this.$refs.familyInfo.init("add", null, this.inputForm.id)
-			this.$refs.familyInfo.currentUserId = this.inputForm.userId
+			this.$refs.familyInfo.init("add", null, this.inputForm.userId)
 		},
 		editFamily(id) {
-			this.$refs.familyInfo.init("edit", id)
-			this.$refs.familyInfo.currentUserId = this.inputForm.userId
+			this.$refs.familyInfo.init("edit", id, this.inputForm.userId)
 		},
 		delFamily(id) {
 			this.$confirm('确定删除此条家庭成员信息吗?', '提示', {
@@ -2474,19 +2518,17 @@ export default {
 		},
 		handleGetFamilyInfo() {
 			enrollmentRegistrationService.findFamilyInfo({
-				enrollmentRegistrationId: this.inputForm.id
+				userId: this.inputForm.userId
 			}).then(res => {
 				this.inputForm.familyInfoList = res
 			})
 		},
 		//表彰与奖励处理
 		addReward() {
-			this.$refs.rewardInfo.init("add", null, this.inputForm.id)
-			this.$refs.rewardInfo.currentUserId = this.inputForm.userId
+			this.$refs.rewardInfo.init("add", null, this.inputForm.userId)
 		},
 		editReward(id) {
-			this.$refs.rewardInfo.init("edit", id)
-			this.$refs.rewardInfo.currentUserId = this.inputForm.userId
+			this.$refs.rewardInfo.init("edit", id, this.inputForm.userId)
 		},
 		delReward(id) {
 			this.$confirm('确定删除此条奖项信息吗?', '提示', {
@@ -2510,7 +2552,7 @@ export default {
 		},
 		handleGetRewardInfo() {
 			enrollmentRegistrationService.findRewardInfo({
-				enrollmentRegistrationId: this.inputForm.id
+				userId: this.inputForm.userId
 			}).then(res => {
 				this.inputForm.rewardInfoList = res
 			})
@@ -2522,7 +2564,13 @@ export default {
 		},
 		changeInfoList(index) {
 			this.changeFlag[index] = !this.changeFlag[index]
-		}
+		},
+		// 查询当前用户是否是管理员用户
+		checkIsAdmin() {
+			userService.is().then((data) => {
+				this.isAdmin = data
+			})
+		},
 	}
 }
 </script>
@@ -2543,4 +2591,19 @@ export default {
 .card-info {
 	margin-bottom: 20px;
 }
+
+/deep/ .el-upload-list {
+
+
+	.el-upload {
+		width: 80px;
+		height: 80px;
+	}
+
+	.el-upload-list__item {
+		width: 80px;
+		height: 80px;
+	}
+
+}
 </style>

+ 23 - 1
src/views/human/enrollment/registration/EnrollmentRegistrationList.vue

@@ -198,7 +198,7 @@
 									</template>
 								</vxe-column>
 
-								<vxe-column title="操作" width="300px" fixed="right" align="center">
+								<vxe-column title="操作" width="350px" fixed="right" align="center">
 									<template #default="scope">
 										<el-button
 											v-if="hasPermission('enrollmentRegistration:edit') && (scope.row.type === '2')"
@@ -221,7 +221,12 @@
 											v-if="(hasPermission('enrollmentRegistration:edit')) && (scope.row.loginFlag == '0')"
 											@click="updateLoginFlag(scope.row.userId, '1')">启用</el-button>
 										<el-button text type="primary"
+											v-if="(hasPermission('enrollmentRegistration:edit'))"
+											@click="resetPwd(scope.row.userId)">重置密码</el-button>
+										<el-button text type="primary"
+											v-if="(hasPermission('enrollmentRegistration:edit'))"
 											@click="removeRedis(scope.row.userId)">清除登录缓存</el-button>
+
 									</template>
 								</vxe-column>
 							</vxe-table>
@@ -583,6 +588,23 @@ export default {
 				})
 			})
 		},
+		resetPwd(userId) {
+			this.$confirm(`确定重置该用户的登录密码吗?重置后,默认密码为:123456`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				this.loading = true
+				userService.resetPwd({
+					id: userId
+				}).then((data) => {
+					this.$message.success(data)
+					this.refreshList()
+					this.loading = false
+				})
+			})
+		},
+
 		//修改用户是否允许登录
 		updateLoginFlag(id, loginFlag) {
 			let msg = loginFlag == "1" ? "确定允许该用户登录吗?" : "确定禁止该用户登录吗?"

+ 170 - 0
src/views/human/enrollment/registration/components/AttachmentView.vue

@@ -0,0 +1,170 @@
+<!--文件上传组件-->
+<template>
+    <div :key="uploadKey" style="width: 100%;">
+        <div style="height: calc(100% - 80px);margin-top: 10px">
+            <div class="file-item" v-for="(item, index) in newFiles">
+                <div class="slt">
+                    <template v-if="ifName(item) === 'img'">
+                        <el-image ref="imageViewer" :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>
+
+                </div>
+            </div>
+
+        </div>
+        <el-image-viewer v-if="showViewer" @close="closeViewer" :url-list="[url]" :zIndex="9999"></el-image-viewer>
+    </div>
+</template>
+
+<script>
+import OSSSerivce, {
+    openWindowOnUrl,
+    toHref
+} from '@/api/sys/OSSService'
+export default {
+    props: {
+        fileList: {
+            type: Array,
+            default: () => []
+        }
+    },
+    data() {
+        return {
+            uploadKey: '',
+            url: '',
+            newFiles: [],
+            showViewer: false,
+            ossService: null,
+            delFlag: false,
+            createBy: '',
+            loading: false,
+        }
+    },
+    watch: {
+    },
+    created() {
+        this.ossService = new OSSSerivce()
+        this.fileList.forEach(item => {
+            this.ossService.getFileSizeByUrl(item.url).then((data) => {
+                item.lsUrl = data.url
+                item.size = data.size
+                this.newFiles.push(item)
+            })
+        })
+    },
+    mounted() {
+        window.onPreview = this.onPreview
+    },
+    methods: {
+        showFile(row) {
+            if (this.ifName(row) == "img") {
+                this.ossService.getTemporaryUrl(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) {
+            toHref(row)
+        },
+        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"
+            }
+        },
+
+    }
+}
+</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>

+ 4 - 3
src/views/human/enrollment/registration/components/CertificateInfo.vue

@@ -88,7 +88,6 @@ export default {
 	},
 	data() {
 		return {
-			currentUserId: "",
 			disabled: false,
 			title: '',
 			method: '',
@@ -189,7 +188,7 @@ export default {
 				this.title = '查看资质证书'
 			}
 			this.inputForm.id = id
-			this.inputForm.enrollmentRegistrationId = reId
+			this.inputForm.userId = reId
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
@@ -214,12 +213,14 @@ export default {
 		},
 		// 表单提交
 		doSubmit() {
+			if (this.$refs.upLoadComponent.checkProgress()) {
+				return
+			}
 			this.$refs['inputForm'].validate((valid) => {
 				if (valid) {
 					this.inputForm.issueDate = new Date(this.inputForm.issueDate).getTime(); // 转为时间戳
 					this.inputForm.validUntil = new Date(this.inputForm.validUntil).getTime(); // 转为时间戳
 					this.inputForm.certificateAttachment = this.$refs.upLoadComponent.getDataList()
-					this.inputForm.userId = this.currentUserId
 					enrollmentRegistrationService.saveCertificateInfo(this.inputForm).then(res => {
 						this.close()
 						this.$message.success(res)

+ 6 - 3
src/views/human/enrollment/registration/components/EducationInfo.vue

@@ -174,7 +174,6 @@ export default {
 	},
 	data() {
 		return {
-			currentUserId: "",
 			disabled: false,
 			title: '',
 			method: '',
@@ -329,6 +328,7 @@ export default {
 				specialityDesc: "",
 				enrollmentRegistrationId: ""
 			}
+			this.currentUserId = ""
 			if (method === 'add') {
 				this.title = `新增教育经历`
 			} else if (method === 'edit') {
@@ -337,7 +337,7 @@ export default {
 				this.title = '查看教育经历'
 			}
 			this.inputForm.id = id
-			this.inputForm.enrollmentRegistrationId = reId
+			this.inputForm.userId = reId
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
@@ -367,13 +367,16 @@ export default {
 		},
 		// 表单提交
 		doSubmit() {
+			if (this.$refs.educationUploadComponent.checkProgress() || this.$refs.degreeUploadComponent.checkProgress()) {
+				return
+			}
+
 			this.$refs['inputForm'].validate((valid) => {
 				if (valid) {
 					this.inputForm.startDate = new Date(this.inputForm.startDate).getTime(); // 转为时间戳
 					this.inputForm.endDate = new Date(this.inputForm.endDate).getTime(); // 转为时间戳
 					this.inputForm.educationFile = this.$refs.educationUploadComponent.getDataList()
 					this.inputForm.degreeFile = this.$refs.degreeUploadComponent.getDataList()
-					this.inputForm.userId = this.currentUserId
 					enrollmentRegistrationService.saveEduInfo(this.inputForm).then(res => {
 						this.close()
 						this.$message.success(res)

+ 1 - 3
src/views/human/enrollment/registration/components/FamilyInfo.vue

@@ -86,7 +86,6 @@ export default {
 	},
 	data() {
 		return {
-			currentUserId: "",
 			disabled: false,
 			title: '',
 			method: '',
@@ -178,7 +177,7 @@ export default {
 				this.title = '查看家庭成员'
 			}
 			this.inputForm.id = id
-			this.inputForm.enrollmentRegistrationId = reId
+			this.inputForm.userId = reId
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
@@ -201,7 +200,6 @@ export default {
 			this.$refs['inputForm'].validate((valid) => {
 				if (valid) {
 					this.inputForm.birthDate = new Date(this.inputForm.birthDate).getTime(); // 转为时间戳
-					this.inputForm.userId = this.currentUserId
 					enrollmentRegistrationService.saveFamilyInfo(this.inputForm).then(res => {
 						this.close()
 						this.$message.success(res)

+ 4 - 3
src/views/human/enrollment/registration/components/LanguageInfo.vue

@@ -84,7 +84,6 @@ export default {
 	},
 	data() {
 		return {
-			currentUserId: "",
 			disabled: false,
 			title: '',
 			method: '',
@@ -170,7 +169,7 @@ export default {
 				this.title = '查看语言能力'
 			}
 			this.inputForm.id = id
-			this.inputForm.enrollmentRegistrationId = reId
+			this.inputForm.userId = reId
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
@@ -195,10 +194,12 @@ export default {
 		},
 		// 表单提交
 		doSubmit() {
+			if (this.$refs.upLoadComponent.checkProgress()) {
+				return
+			}
 			this.$refs['inputForm'].validate((valid) => {
 				if (valid) {
 					this.inputForm.files = this.$refs.upLoadComponent.getDataList()
-					this.inputForm.userId = this.currentUserId
 					enrollmentRegistrationService.saveLanguageInfo(this.inputForm).then(res => {
 						this.close()
 						this.$message.success(res)

+ 5 - 3
src/views/human/enrollment/registration/components/RewardInfo.vue

@@ -66,7 +66,6 @@ export default {
 	},
 	data() {
 		return {
-			currentUserId: "",
 			disabled: false,
 			title: '',
 			method: '',
@@ -151,7 +150,7 @@ export default {
 				this.title = '查看语言能力'
 			}
 			this.inputForm.id = id
-			this.inputForm.enrollmentRegistrationId = reId
+			this.inputForm.userId = reId
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
@@ -176,11 +175,14 @@ export default {
 		},
 		// 表单提交
 		doSubmit() {
+			if (this.$refs.upLoadComponent.checkProgress()) {
+				return
+			}
+
 			this.$refs['inputForm'].validate((valid) => {
 				if (valid) {
 					this.inputForm.rewardDate = new Date(this.inputForm.rewardDate).getTime(); // 转为时间戳
 					this.inputForm.files = this.$refs.upLoadComponent.getDataList()
-					this.inputForm.userId = this.currentUserId
 					enrollmentRegistrationService.saveRewardInfo(this.inputForm).then(res => {
 						this.close()
 						this.$message.success(res)

+ 4 - 3
src/views/human/enrollment/registration/components/SkillInfo.vue

@@ -68,7 +68,6 @@ export default {
 	},
 	data() {
 		return {
-			currentUserId: "",
 			disabled: false,
 			title: '',
 			method: '',
@@ -150,7 +149,7 @@ export default {
 				this.title = '查看专业技能'
 			}
 			this.inputForm.id = id
-			this.inputForm.enrollmentRegistrationId = reId
+			this.inputForm.userId = reId
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
@@ -175,10 +174,12 @@ export default {
 		},
 		// 表单提交
 		doSubmit() {
+			if (this.$refs.upLoadComponent.checkProgress()) {
+				return
+			}
 			this.$refs['inputForm'].validate((valid) => {
 				if (valid) {
 					this.inputForm.files = this.$refs.upLoadComponent.getDataList()
-					this.inputForm.userId = this.currentUserId
 					enrollmentRegistrationService.saveSkillInfo(this.inputForm).then(res => {
 						this.close()
 						this.$message.success(res)

+ 4 - 3
src/views/human/enrollment/registration/components/TrainingInfo.vue

@@ -64,7 +64,6 @@ export default {
 	},
 	data() {
 		return {
-			currentUserId: "",
 			disabled: false,
 			title: '',
 			method: '',
@@ -150,7 +149,7 @@ export default {
 				this.title = '查看培训经历'
 			}
 			this.inputForm.id = id
-			this.inputForm.enrollmentRegistrationId = reId
+			this.inputForm.userId = reId
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
@@ -175,10 +174,12 @@ export default {
 		},
 		// 表单提交
 		doSubmit() {
+			if (this.$refs.upLoadComponent.checkProgress()) {
+				return
+			}
 			this.$refs['inputForm'].validate((valid) => {
 				if (valid) {
 					this.inputForm.files = this.$refs.upLoadComponent.getDataList()
-					this.inputForm.userId = this.currentUserId
 					enrollmentRegistrationService.saveTrainingInfo(this.inputForm).then(res => {
 						this.close()
 						this.$message.success(res)

+ 1 - 3
src/views/human/enrollment/registration/components/WorkInfo.vue

@@ -81,7 +81,6 @@ export default {
 	},
 	data() {
 		return {
-			currentUserId: "",
 			disabled: false,
 			title: '',
 			method: '',
@@ -189,7 +188,7 @@ export default {
 				this.title = '查看工作经历'
 			}
 			this.inputForm.id = id
-			this.inputForm.enrollmentRegistrationId = reId
+			this.inputForm.userId = reId
 			this.visible = true
 			this.loading = true
 			this.$nextTick(() => {
@@ -213,7 +212,6 @@ export default {
 				if (valid) {
 					this.inputForm.startDate = new Date(this.inputForm.startDate).getTime(); // 转为时间戳
 					this.inputForm.endDate = new Date(this.inputForm.endDate).getTime(); // 转为时间戳
-					this.inputForm.userId = this.currentUserId
 					enrollmentRegistrationService.saveWorkInfo(this.inputForm).then(res => {
 						this.close()
 						this.$message.success(res)

Diferenças do arquivo suprimidas por serem muito extensas
+ 1036 - 52
src/views/sys/user/UserInfo.vue