wkw 7 månader sedan
förälder
incheckning
2f59a7b5ce
2 ändrade filer med 159 tillägg och 145 borttagningar
  1. 67 57
      src/components/header/header.vue
  2. 92 88
      src/components/postPush/postPush.vue

+ 67 - 57
src/components/header/header.vue

@@ -408,9 +408,9 @@
 			</div>
 		</div>
 		<el-dialog v-model="dialogCompay" title="企业认证" width="60%">
-			<div style="width: 100%;color: red;" v-if="form.auditContent&&form.status==3">
+			<!-- <div style="width: 100%;color: red;" v-if="form.auditContent&&form.status==3">
 				拒绝理由:{{form.auditContent}}
-			</div>
+			</div> -->
 			<el-form v-loading="loadingCompany" ref="formCompany" size="large" style="margin-top: 20px;"
 				class="flex align-center justify-between" label-position="top" :inline="true" :model="form"
 				label-width="120px">
@@ -434,7 +434,6 @@
 					class="row45" label="详细地址">
 					<el-autocomplete style="width: 100%;" @input="workInput" v-model="form.companyAddress"
 						:fetch-suggestions="querySearchAsync" placeholder="请输入工作地址" @select="handleSelect" />
-					<!-- <el-input placeholder="请输入详细地址" class="inputClass" v-model="form.companyAddress" /> -->
 				</el-form-item>
 				<el-form-item prop="companyScope" :rules="[{required: true,message: '请选择公司所属行业',trigger: 'blur',},]"
 					class="row45" label="所属行业">
@@ -451,10 +450,10 @@
 					<el-input placeholder="请输入企业邮箱" class="inputClass" v-model="form.email" />
 				</el-form-item>
 				<el-form-item prop="companyRegisteredFund" :rules="[{required: true,message: '请输入注册资金(万)',trigger: 'blur',}, {
-          type: 'number',
-          message: '请输入数字',
-          trigger: ['blur', 'change'],
-        },]" class="row45" label="注册资金(万)">
+					type: 'number',
+					message: '请输入数字',
+					trigger: ['blur', 'change'],
+					},]" class="row45" label="注册资金(万)">
 					<el-input placeholder="请输入注册资金(万)" class="inputClass" v-model.number="form.companyRegisteredFund" />
 				</el-form-item>
 				<el-form-item prop="companyCreateTime" :rules="[{required: true,message: '请选择注册时间',trigger: 'blur',},]"
@@ -493,7 +492,7 @@
 					<el-button @click="dialogCompay = false" style="width: 100px;" type="Info">取消</el-button>
 					<el-button @click="saveCompany()" style="width: 100px;margin-left: 30px;"
 						type="primary">保存</el-button>
-				</div>
+				</div> 
 			</el-form>
 		</el-dialog>
 		<!-- 行业选择 -->
@@ -1011,56 +1010,68 @@
 			//企业认证
 			saveCompany() {
 				let formRef = this.$refs.formCompany
-
-
 				formRef.validate((valid) => {
 					if (valid) {
-						let form = JSON.parse(JSON.stringify(this.form))
-						form.companyCreateTime = this.getFormDate(form.companyCreateTime) //处理注册时间
-						// form.companyAddress1 = form.companyAddress1.join('') //处理地区
-						// form.companyAddress = form.companyAddress1 + '' + form.companyAddress
+						let form = JSON.parse(JSON.stringify(this.form));
+						console.log(form)
+						const data = {
+							companyAllName: form.companyName,
+							companyPeople: form.companyPeople
+						};
 						this.loadingCompany = true
-						if (this.form.companyId) { //修改
-							this.$Request.post("/app/company/updateCompany", form, {
-								type: 'json'
-							}).then(res => {
-								if (res.code == 0) {
-									ElMessage({
-										message: '认证修改成功!',
-										type: 'success',
-										duration: 1500,
-										offset: this.screenHeight / 2
-									})
-									this.loadingCompany = false
-									this.dialogCompay = false
-								} else {
-									this.loadingCompany = false
-									ElMessageBox.alert(res.msg, '提示', {
-										confirmButtonText: '确认'
-									})
-								}
-							});
-						} else { //保存
-							this.$Request.post("/app/company/insertCompany", form, {
-								type: 'json'
-							}).then(res => {
-								if (res.code == 0) {
-									ElMessage({
-										message: '认证提交成功!',
-										type: 'success',
-										duration: 1500,
-										offset: this.screenHeight / 2
-									})
-									this.loadingCompany = false
-									this.dialogCompay = false
-								} else {
-									this.loading = false
-									ElMessageBox.alert(res.msg, '提示', {
-										confirmButtonText: '确认'
-									})
-								}
-							});
-						}
+						this.$Request.post("/app/company/insertCompany", data,{type:'json'}).then(res=>{
+							if (res.code == 0) {
+								this.loadingCompany = false
+								this.dialogCompay = false;
+								this.dialogPostPush = true
+							} else {
+								this.loading = false
+								ElMessageBox.alert(res.msg, '提示', {
+									confirmButtonText: '确认'
+								})
+							}
+						})
+						// if (this.form.companyId) { //修改
+						// 	this.$Request.post("/app/company/updateCompany", form, {
+						// 		type: 'json'
+						// 	}).then(res => {
+						// 		if (res.code == 0) {
+						// 			ElMessage({
+						// 				message: '认证修改成功!',
+						// 				type: 'success',
+						// 				duration: 1500,
+						// 				offset: this.screenHeight / 2
+						// 			})
+						// 			this.loadingCompany = false
+						// 			this.dialogCompay = false
+						// 		} else {
+						// 			this.loadingCompany = false
+						// 			ElMessageBox.alert(res.msg, '提示', {
+						// 				confirmButtonText: '确认'
+						// 			})
+						// 		}
+						// 	});
+						// } else { //保存
+						// 	this.$Request.post("/app/company/insertCompany", form, {
+						// 		type: 'json'
+						// 	}).then(res => {
+						// 		if (res.code == 0) {
+						// 			ElMessage({
+						// 				message: '认证提交成功!',
+						// 				type: 'success',
+						// 				duration: 1500,
+						// 				offset: this.screenHeight / 2
+						// 			})
+						// 			this.loadingCompany = false
+						// 			this.dialogCompay = false
+						// 		} else {
+						// 			this.loading = false
+						// 			ElMessageBox.alert(res.msg, '提示', {
+						// 				confirmButtonText: '确认'
+						// 			})
+						// 		}
+						// 	});
+						// }
 
 					} else {
 						console.log('error submit!')
@@ -1261,14 +1272,13 @@
 						}
 					} else {
 						ElMessageBox.confirm(
-							'您还未企业认证,请下载app进行认证',
+							'您还未企业认证,请进行认证',
 							'温馨提示', {
 								confirmButtonText: '确定',
 								cancelButtonText: '取消',
 								type: 'warning',
 							}
 						).then(() => {
-							return;
 							this.getComList()
 							this.dialogCompay = true
 						}).catch(() => {

+ 92 - 88
src/components/postPush/postPush.vue

@@ -23,8 +23,8 @@
 					<el-form-item prop="postType" :rules="[{ required: true, message: '请选择招聘类型', trigger: 'blur', },]"
 						class="row45" label="招聘类型">
 						<el-select style="width: 100%;" v-model="postPushForm.postType" placeholder="请选择招聘类型">
-							<el-option v-for="item in postTypeList" :key="item.value" :label="item.value"
-								:value="item.value" />
+							<el-option v-for="(item, index) in postTypeList" :key="index" :label="item"
+								:value="index" />
 						</el-select>
 					</el-form-item>
 					<!-- <el-form-item prop="stationName" :rules="[{ required: true, message: '请输入岗位名称', trigger: 'blur', },]"
@@ -69,9 +69,9 @@
 								:value="item.value" />
 						</el-select>
 					</el-form-item>
-					<el-form-item prop="tag" :rules="[{ required: true, message: '请添加岗位关键词', trigger: 'blur', },]"
+					<el-form-item prop="positionTag" :rules="[{ required: true, message: '请添加岗位关键词', trigger: 'blur', },]"
 						class="row45" label="岗位关键词">
-						<el-tag size="large" style="margin-right: 10px;" v-for="(item, index) in postPushForm.tag"
+						<el-tag size="large" style="margin-right: 10px;" v-for="(item, index) in postPushForm.positionTag"
 							:key="item" closable :disable-transitions="false" @close="handleClose(index)">
 							{{ item }}
 						</el-tag>
@@ -86,9 +86,9 @@
 						<el-input @click="getIndustryList()" placeholder="请选择行业要求" readonly class="inputClass"
 							v-model="postPushForm.industry" />
 					</el-form-item> -->
-					<el-form-item prop="positionWelfare"
+					<el-form-item prop="welfareTag"
 						:rules="[{ required: true, message: '请选择岗位福利', trigger: 'blur', },]" class="row45" label="岗位福利">
-						<el-select v-model="postPushForm.positionWelfare" multiple placeholder="请选择岗位福利"
+						<el-select v-model="postPushForm.welfareTag" multiple placeholder="请选择岗位福利"
 							style="width: 100%">
 							<el-option v-for="item in flList" :key="item.value" :label="item.value"
 								:value="item.value" />
@@ -122,7 +122,7 @@
 			<agreement title="岗位发布协议" v-if="dialogAgreements" :dialogAgreements="dialogAgreements" typeid="333"
 				@closeAgree="closeAgree" />
 			<!-- 行业选择 -->
-			<el-dialog class="workDialog" :draggable="true" destroy-on-close align-center center
+			<!-- <el-dialog class="workDialog" :draggable="true" destroy-on-close align-center center
 				v-model="industryDialog" title="选择行业">
 				<template #header>
 					<div class="my-header flex align-center">
@@ -161,7 +161,7 @@
 						<el-empty v-if="industryList.length == 0" description="暂无行业" />
 					</div>
 				</div>
-			</el-dialog>
+			</el-dialog> -->
 		</el-dialog>
 		<!-- 岗位选择 -->
 		<el-dialog @close="type = false" class="workDialog" :draggable="true" destroy-on-close align-center center
@@ -263,11 +263,11 @@ export default {
 			industryDialog: false,
 			inputValue: '',
 			inputVisible: false,
-			postTypeList: [],
+			postTypeList: ["社招全职", "应届生校园招聘", "实习生招聘", "兼职招聘"],
 			postPushForm: {
 				isDue: 0,//岗位招聘模式
 				postType: '', //岗位类型
-				stationName: '', //岗位名称
+				// stationName: '', //岗位名称
 				ruleClassifyName: '', //岗位类型
 				ruleClassifyId: '', //岗位id
 				address: '', //工作地址
@@ -275,9 +275,9 @@ export default {
 				education: '', //学历要求
 				salaryRange: '', //薪资范围
 				salaryTimes: '',
-				tag: [], //岗位关键词
-				industry: '', //行业要求
-				positionWelfare: '', //岗位福利
+				positionTag: [], //岗位关键词
+				// industry: '', //行业要求
+				welfareTag: '', //岗位福利
 				positionDetails: '', //岗位介绍
 				province: '', //省
 				city: '', //市
@@ -362,7 +362,7 @@ export default {
 		if (this.postPushId) {
 			this.getJobInfo()
 		}
-		this.getPostType()
+		// this.getPostType()
 		this.IntentionChen()
 		this.getSchoolList()
 		this.getMoneyList()
@@ -464,16 +464,16 @@ export default {
 				if (res.code == 0) {
 					let obj = res.data
 					this.postPushForm.postType = obj.postType
-					this.postPushForm.stationName = obj.stationName
+					// this.postPushForm.stationName = obj.stationName
 					this.postPushForm.ruleClassifyName = obj.ruleClassifyName
 					this.postPushForm.ruleClassifyId = obj.ruleClassifyId
 					this.postPushForm.address = obj.address
 					this.postPushForm.experience = obj.experience
 					this.postPushForm.education = obj.education
 					this.postPushForm.salaryRange = obj.salaryRange
-					this.postPushForm.tag = obj.tag.split(',')
-					this.postPushForm.industry = obj.industry
-					this.postPushForm.positionWelfare = obj.positionWelfare.split(',')
+					this.postPushForm.positionTag = obj.positionTag.split(',')
+					// this.postPushForm.industry = obj.industry
+					this.postPushForm.welfareTag = obj.welfareTag.split(',')
 					this.postPushForm.positionDetails = obj.positionDetails
 					this.postPushForm.province = obj.province
 					this.postPushForm.city = obj.city
@@ -504,11 +504,12 @@ export default {
 		},
 		//发布岗位
 		savePostPush() {
+			console.log(this.postPushForm)
 			let obj = JSON.parse(JSON.stringify(this.postPushForm))
-			obj.positionWelfare = obj.positionWelfare.join(',')
-			obj.tag = obj.tag.join(',')
-			console.log(obj, '发布岗位')
-			let formPost = this.$refs.formPost
+			obj.welfareTag = obj.welfareTag.join(',')
+			obj.positionTag = obj.positionTag.join(',')
+			obj.type = obj.postType;
+			let formPost = this.$refs.formPost;
 			formPost.validate((valid) => {
 				if (valid) {
 					if (!obj.lng || !obj.lat) {
@@ -520,15 +521,15 @@ export default {
 						})
 						return
 					}
-					if (!this.checked) {
-						ElMessage({
-							message: '请阅读并同意《岗位发布协议》',
-							type: 'info',
-							duration: 1500,
-							offset: this.screenHeight / 2
-						})
-						return
-					}
+					// if (!this.checked) {
+					// 	ElMessage({
+					// 		message: '请阅读并同意《岗位发布协议》',
+					// 		type: 'info',
+					// 		duration: 1500,
+					// 		offset: this.screenHeight / 2
+					// 	})
+					// 	return
+					// }
 					if (this.type == 'save') {
 						// ElMessageBox.confirm(
 						// 	'发布该岗位需支付' + this.price + '钻石,确认发布吗?',
@@ -547,48 +548,51 @@ export default {
 
 					} else if (this.type == 'updata') {
 						if (this.postPushForm.status == 3) { //拒绝重新发布
-							ElMessageBox.confirm(
-								'发布该岗位为热门岗位,需支付' + this.price + '钻石,确认发布吗?',
-								'温馨提示', {
-								confirmButtonText: '确认',
-								cancelButtonText: '取消',
-								type: 'warning',
-							}
-							).then(() => {
-								//发布岗位
-								this.pay(obj)
-							}).catch(() => {
-
-							})
+							// ElMessageBox.confirm(
+							// 	'发布该岗位为热门岗位,需支付' + this.price + '钻石,确认发布吗?',
+							// 	'温馨提示', {
+							// 	confirmButtonText: '确认',
+							// 	cancelButtonText: '取消',
+							// 	type: 'warning',
+							// }
+							// ).then(() => {
+								
+							// }).catch(() => {
+
+							// })
+							//发布岗位
+							this.pay(obj)
 						} else {
-							ElMessageBox.confirm(
-								'本次修改岗位信息免费,确认发布吗?',
-								'温馨提示', {
-								confirmButtonText: '确认',
-								cancelButtonText: '取消',
-								type: 'warning',
-							}
-							).then(() => {
-								//发布岗位
-								this.pay(obj, this.postPushId)
-							}).catch(() => {
-
-							})
+							// ElMessageBox.confirm(
+							// 	'本次修改岗位信息免费,确认发布吗?',
+							// 	'温馨提示', {
+							// 	confirmButtonText: '确认',
+							// 	cancelButtonText: '取消',
+							// 	type: 'warning',
+							// }
+							// ).then(() => {
+								
+							// }).catch(() => {
+
+							// })
+							//发布岗位
+							this.pay(obj, this.postPushId)
 						}
 					} else {
-						ElMessageBox.confirm(
-							'发布该岗位为热门岗位,需支付' + this.price + '钻石,确认发布吗?',
-							'温馨提示', {
-							confirmButtonText: '确认',
-							cancelButtonText: '取消',
-							type: 'warning',
-						}
-						).then(() => {
-							//发布岗位
-							this.pay(obj)
-						}).catch(() => {
+						// ElMessageBox.confirm(
+						// 	'发布该岗位为热门岗位,需支付' + this.price + '钻石,确认发布吗?',
+						// 	'温馨提示', {
+						// 	confirmButtonText: '确认',
+						// 	cancelButtonText: '取消',
+						// 	type: 'warning',
+						// }
+						// ).then(() => {
+							
+						// }).catch(() => {
 
-						})
+						// })
+						//发布岗位
+						this.pay(obj)
 					}
 
 				}
@@ -625,11 +629,11 @@ export default {
 			}
 			ite.select = !ite.select
 		},
-		//确认行业
-		addHangye() {
-			this.postPushForm.industry = this.industryArr.join(',')
-			this.industryDialog = false
-		},
+		// //确认行业
+		// addHangye() {
+		// 	this.postPushForm.industry = this.industryArr.join(',')
+		// 	this.industryDialog = false
+		// },
 		/**
 		 * 获取行业数据
 		 */
@@ -659,12 +663,12 @@ export default {
 		},
 		//删除关键词
 		handleClose(index) {
-			this.postPushForm.tag.splice(index, 1)
+			this.postPushForm.positionTag.splice(index, 1)
 		},
 		//确认
 		handleInputConfirm() {
 			if (this.inputValue) {
-				this.postPushForm.tag.push(this.inputValue)
+				this.postPushForm.positionTag.push(this.inputValue)
 				this.inputVisible = false
 				this.inputValue = ''
 			} else {
@@ -766,18 +770,18 @@ export default {
 			})
 		},
 		//岗位类型
-		getPostType() {
-			let data = {
-				type: '工作性质'
-			}
-			this.$Request.get('/app/dict/list', {
-				params: data
-			}).then(res => {
-				if (res.code == 0) {
-					this.postTypeList = res.data
-				}
-			})
-		},
+		// getPostType() {
+		// 	let data = {
+		// 		type: '工作性质'
+		// 	}
+		// 	this.$Request.get('/app/dict/list', {
+		// 		params: data
+		// 	}).then(res => {
+		// 		if (res.code == 0) {
+		// 			this.postTypeList = res.data
+		// 		}
+		// 	})
+		// },
 	}
 }
 </script>