Эх сурвалжийг харах

新增城市选择/我的评价/修改我的简历

空白格 3 жил өмнө
parent
commit
0b8f3ad465

+ 3 - 1
h5_web/pages.json

@@ -267,7 +267,9 @@
       "path": "pages/myEvaluation/myEvaluation",
       "style": {
         "navigationBarTitleText": "我的评价",
-        "enablePullDownRefresh": false
+        "enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#3D5D4C",
+				"navigationBarTextStyle": "white"
       }
 
     }, {

+ 1 - 0
h5_web/pages/evaluationIntention/evaluationIntention.scss

@@ -66,4 +66,5 @@
 			margin-top: 40rpx;
 		}
 	}
+	
 }

+ 27 - 17
h5_web/pages/evaluationIntention/evaluationIntention.vue

@@ -33,17 +33,18 @@
 				label-position="top"
 			>
 				<u-form-item label="工作城市" prop="city" required>
-					<u-input v-model="intentionForm.city" type="select" @click="cityShow = true" placeholder="请选择工作城市"/>
-					<u-select v-model="cityShow" :list="cityList" @confirm="cityConfirm"></u-select>
+					<u-input v-model="intentionForm.city" type="select" @click="workCityClick" placeholder="请选择工作城市"/>
+					<!-- <u-select v-model="cityShow" :list="cityList" @confirm="cityConfirm"></u-select> -->
+					<u-city-select v-if="cityShow" v-model="cityShow" :default-region="defaultRegion" @city-change="cityConfirm"/>
 				</u-form-item>
-				<u-form-item label="期望职位" prop="position" required>
+				<!-- <u-form-item label="期望职位" prop="position" required>
 					<u-input v-model="intentionForm.position" type="select" @click="positionShow = true" placeholder="请选择期望职位"/>
 					<u-select v-model="positionShow" :list="positionList" @confirm="positionConfirm"></u-select>
 				</u-form-item>
 				<u-form-item label="期望行业" prop="industry" required>
 					<u-input v-model="intentionForm.industry" type="select" @click="industryShow = true" placeholder="请选择期望行业"/>
 					<u-select v-model="industryShow" :list="industryList" @confirm="industryConfirm"></u-select>
-				</u-form-item>
+				</u-form-item> -->
 				<u-form-item label="薪资要求" prop="salary" required>
 					<u-input v-model="intentionForm.salary" type="select" @click="salaryShow = true" placeholder="请选择薪资要求"/>
 					<u-select v-model="salaryShow" :list="salaryList" @confirm="salaryConfirm"></u-select>
@@ -88,7 +89,7 @@
 			return {
 				list: [
 					{
-						name: '求职意向'
+						name: '期望薪资'
 					},
 					{
 						name: '自我评价'
@@ -105,6 +106,7 @@
 					salary: '',
 					salaryId: ''
 				},
+				defaultRegion: [],
 				intentionRules: {
 					city: [
 						{ 
@@ -166,23 +168,23 @@
 				salaryList: [
 					{
 						value: 1,
-						label: '1 ~ 3'
+						label: '1k ~ 3k'
 					},
 					{
 						value: 2,
-						label: '3 ~ 5'
+						label: '3k ~ 5k'
 					},
 					{
 						value: 3,
-						label: '5 ~ 7'
+						label: '5k ~ 7k'
 					},
 					{
 						value: 4,
-						label: '7 ~ 10'
+						label: '7k ~ 10k'
 					},
 					{
 						value: 5,
-						label: '10 ~ 以上'
+						label: '10k ~ 以上'
 					}
 				],
 				// 自我评价
@@ -212,9 +214,9 @@
 					if (res.code === 200){
 						this.evaluateForm.content = res.data.selfAssessment
 						this.intentionForm.city = res.data.workCity
-						this.evaluateForm.position = res.data.expectedPost
-						this.evaluateForm.industry = res.data.expectedIndustry
-						this.evaluateForm.salary = (res.data.expectedLowestSalary + 'k ~ ' + res.data.expectedHighestSalary + 'k')
+						this.intentionForm.position = res.data.expectedPost
+						this.intentionForm.industry = res.data.expectedIndustry
+						this.intentionForm.salary = (res.data.expectedLowestSalary + 'k ~ ' + res.data.expectedHighestSalary + 'k')
 					} else {
 						this.$refs.uToast.show({
 							title: res.msg,
@@ -233,8 +235,7 @@
 			 * @param { Object } item
 			 */
 			cityConfirm(item) {
-				this.intentionForm.city = item[0].label
-				this.intentionForm.cityId = item[0].value
+				this.intentionForm.city = item.province.label + '-' + item.city.label + '-' + item.area.label
 			},
 			/**
 			 * 职位下拉
@@ -279,8 +280,8 @@
 							workCity: form.city,
 							expectedPost: form.position,
 							expectedIndustry: form.industry,
-							expectedLowestSalary: form.salary.split(' ~ ')[0],
-							expectedHighestSalary: form.salary.split(' ~ ')[1]
+							expectedLowestSalary: form.salary.split(' ~ ')[0].replace('k', ''),
+							expectedHighestSalary: form.salary.split(' ~ ')[1].replace('k', '')
 						}).then(res => {
 							if (res.code === 200) {
 								this.$refs.uToast.show({
@@ -349,6 +350,15 @@
 						type: 'warning'
 					})
 				}
+			},
+			/**
+			 * 城市下拉
+			 */
+			workCityClick() {
+				if (this.intentionForm.city) {
+					this.defaultRegion = this.intentionForm.city.split('-');
+				}
+				this.cityShow = true;
 			}
 		}
 	}

+ 60 - 0
h5_web/pages/myEvaluation/myEvaluation.scss

@@ -0,0 +1,60 @@
+/* 我的评价 */
+.evaluation {
+	min-height: calc(100vh - 44px);
+	background-color: #F2F2F2;
+	
+	&-list {
+		padding: 26rpx 30rpx;
+		
+		&-item {
+			background-color: #fff;
+			border-radius: 10rpx;
+			padding: 22rpx 34rpx;
+			margin-bottom: 20rpx;
+			
+			&-title {
+				color: #000;
+				font-size: 32rpx;
+				margin-bottom: 24rpx;
+				font-family: 'PingFangSC-Regular, PingFang SC';
+			}
+			
+			&-content {
+				display: flex;
+				align-items: center;
+				
+				.left {
+					margin-right: 24rpx;
+					
+					// image {
+					// 	width: 96rpx;
+					// 	height: 96rpx;
+					// 	border-radius: 10rpx;
+					// }
+				}
+				
+				.right {
+					font-size: 28rpx;
+					color: #3D3D3D;
+					line-height: 40rpx;
+					
+					view {
+						&:nth-child(2) {
+							color: #C4C4C4;
+							font-size: 22rpx;
+							display: flex;
+							align-items: center;
+							text {
+								margin-left: 10rpx;
+							}
+						}
+						&:last-child {
+							color: #6C6C6C;
+							font-size: 24rpx;
+						}
+					}
+				}
+			}
+		}
+	}
+}

+ 36 - 6
h5_web/pages/myEvaluation/myEvaluation.vue

@@ -1,6 +1,30 @@
+<!-- 我的评价 -->
 <template>
-	<view>
-		我的评价
+	<view class="evaluation">
+		<z-paging
+			ref="paging"
+			v-model="evaluationList"
+			@query="queryList"
+		>
+			<view class="evaluation-list">
+				<view class="evaluation-list-item" v-for="(item, index) in evaluationList" :key="index">
+					<view class="evaluation-list-item-title">{{ item.title }}</view>
+					<view class="evaluation-list-item-content">
+						<view class="left">
+							<u-avatar :src="item.src" mode="square" size="96"/>
+						</view>
+						<view class="right">
+							<view>{{ item.name }}</view>
+							<view>
+								<u-rate :count="5" v-model="item.star" active-color="#C4C4C4" disabled/>
+								<text>{{ item.date }}</text>
+							</view>
+							<view>{{ item.remark }}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</z-paging>
 	</view>
 </template>
 
@@ -8,15 +32,21 @@
 	export default {
 		data() {
 			return {
-				
+				// 评论列表
+				evaluationList: []
 			}
 		},
 		methods: {
-			
+			queryList(pageNo, pageSize) {
+				this.$refs.paging.complete([
+					{ title: '汽车检测与维修技能课程1', src: require('../../static/img/major-工商企业管理.png'), name: '李立萍', star: 4, date: '2021-07-21', remark: '老师给人感觉很专业,学习过程轻松愉快。' },
+					{ title: '汽车检测与维修技能课程1', src: require('../../static/img/major-工商企业管理.png'), name: '李立萍', star: 4, date: '2021-07-21', remark: '老师给人感觉很专业,学习过程轻松愉快。' }
+				])
+			}
 		}
 	}
 </script>
 
-<style>
-
+<style lang="scss" scoped>
+@import './myEvaluation.scss';
 </style>

+ 15 - 4
h5_web/pages/myResume/myResume.vue

@@ -3,7 +3,8 @@
 	<view class="resume">
 
 		<!-- ================================ 头像部分 ================================ -->
-		<view class="resume-head" @click="jumpPage('/pages/dynamicTracking/dynamicTracking')">
+		<!--  @click="jumpPage('/pages/dynamicTracking/dynamicTracking')" -->
+		<view class="resume-head">
 			<view class="resume-head-left">
 				<view class="name">
 					<view>{{ memberinfo.name }}</view>
@@ -27,7 +28,7 @@
 		<view class="resume-base-info">
 			<view class="resume-base-info-left">
 				<view class="title">基本信息</view>
-				<view class="resume-base-info-item">退役军人 · 36岁 · {{ memberinfo.politOutlook }} · {{ memberinfo.degrEduc }}</view>
+				<view class="resume-base-info-item">退役军人 · {{ getAge(memberinfo.menBirth) }}岁 · {{ memberinfo.politOutlook }} · {{ memberinfo.degrEduc }}</view>
 				<view class="resume-base-info-phone">
 					电话:<text class="icon-phone-icon"></text> {{ memberinfo.mobile }}
 				</view>
@@ -40,8 +41,8 @@
 		<!-- ================================ 求职意向部分 ================================ -->
 		<view class="resume-job-intention">
 			<view class="resume-job-intention-left">
-				<view class="title">求职意向</view>
-				<view v-if="memberinfo.workCity">{{ memberinfo.expectedPost }}  {{ `${memberinfo.expectedLowestSalary}k ~ ${memberinfo.expectedHighestSalary}k` }}</view>
+				<view class="title">期望薪资</view>
+				<view v-if="memberinfo.workCity">{{ memberinfo.workCity }}  {{ `${memberinfo.expectedLowestSalary}k ~ ${memberinfo.expectedHighestSalary}k` }}</view>
 				<view class="supple" v-else>暂末补充求意向… </view>
 			</view>
 			<view class="resume-job-intention-right">
@@ -203,6 +204,16 @@
 						type: 'error'
 					})
 				})
+			},
+			/**
+			 * 通过出生年月计算年龄
+			 * @param { String } date
+			 */
+			getAge(date) {
+				const birth = new Date(date).valueOf();
+				const now = new Date().valueOf();
+				const age = (now - birth) / 1000 / 60 / 60 / 24 / 365;
+				return parseInt(age);
 			}
 		}
 	}

+ 237 - 0
h5_web/uview-ui/components/u-city-select/u-city-select.vue

@@ -0,0 +1,237 @@
+<template>
+	<u-popup v-model="value" mode="bottom" :popup="false" :mask="true" :closeable="true" :safe-area-inset-bottom="true"
+	 close-icon-color="#ffffff" :z-index="uZIndex" :maskCloseAble="maskCloseAble" @close="close">
+		<u-tabs v-if="value" :list="genTabsList" :is-scroll="true" :current="tabsIndex" @change="tabsChange" ref="tabs"></u-tabs>
+		<view class="area-box">
+			<view class="u-flex" :class="{ 'change':isChange }">
+				<view class="area-item">
+					<view class="u-padding-10 u-bg-gray" style="height: 100%;">
+						<scroll-view :scroll-y="true" style="height: 100%">
+							<u-cell-group>
+								<u-cell-item v-for="(item,index) in provinces" :title="item.label" :arrow="false" :index="index" :key="index"
+								 @click="provinceChange">
+									<u-icon v-if="isChooseP&&province===index" slot="right-icon" size="34" name="checkbox-mark"></u-icon>
+								</u-cell-item>
+							</u-cell-group>
+						</scroll-view>
+					</view>
+				</view>
+				<view class="area-item">
+					<view class="u-padding-10 u-bg-gray" style="height: 100%;">
+						<scroll-view :scroll-y="true" style="height: 100%">
+							<u-cell-group v-if="isChooseP">
+								<u-cell-item v-for="(item,index) in citys" :title="item.label" :arrow="false" :index="index" :key="index"
+								 @click="cityChange">
+									<u-icon v-if="isChooseC&&city===index" slot="right-icon" size="34" name="checkbox-mark"></u-icon>
+								</u-cell-item>
+							</u-cell-group>
+						</scroll-view>
+					</view>
+				</view>
+
+				<view class="area-item">
+					<view class="u-padding-10 u-bg-gray" style="height: 100%;">
+						<scroll-view :scroll-y="true" style="height: 100%">
+							<u-cell-group v-if="isChooseC">
+								<u-cell-item v-for="(item,index) in areas" :title="item.label" :arrow="false" :index="index" :key="index"
+								 @click="areaChange">
+									<u-icon v-if="isChooseA&&area===index" slot="right-icon" size="34" name="checkbox-mark"></u-icon>
+								</u-cell-item>
+							</u-cell-group>
+						</scroll-view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</u-popup>
+</template>
+
+<script>
+	import provinces from "uview-ui/libs/util/province.js";
+	import citys from "uview-ui/libs/util/city.js";
+	import areas from "uview-ui/libs/util/area.js";
+	/**
+	 * city-select 省市区级联选择器
+	 * @property {String Number} z-index 弹出时的z-index值(默认1075)
+	 * @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭Picker(默认true)
+	 * @property {String} default-region 默认选中的地区,中文形式
+	 * @property {String} default-code 默认选中的地区,编号形式
+	 */
+	export default {
+		name: 'u-city-select',
+		props: {
+			// 通过双向绑定控制组件的弹出与收起
+			value: {
+				type: Boolean,
+				default: false
+			},
+			// 默认显示的地区,可传类似["河北省", "秦皇岛市", "北戴河区"]
+			defaultRegion: {
+				type: Array,
+				default () {
+					return [];
+				}
+			},
+			// 默认显示地区的编码,defaultRegion和areaCode同时存在,areaCode优先,可传类似["13", "1303", "130304"]
+			areaCode: {
+				type: Array,
+				default () {
+					return [];
+				}
+			},
+			// 是否允许通过点击遮罩关闭Picker
+			maskCloseAble: {
+				type: Boolean,
+				default: true
+			},
+			// 弹出的z-index值
+			zIndex: {
+				type: [String, Number],
+				default: 0
+			}
+		},
+		data() {
+			return {
+				cityValue: "",
+				isChooseP: false, //是否已经选择了省
+				province: 0, //省级下标
+				provinces: provinces,
+				isChooseC: false, //是否已经选择了市
+				city: 0, //市级下标
+				citys: citys[0],
+				isChooseA: false, //是否已经选择了区
+				area: 0, //区级下标
+				areas: areas[0][0],
+				tabsIndex: 0,
+			}
+		},
+		mounted() {
+			this.init();
+		},
+		computed: {
+			isChange() {
+				return this.tabsIndex > 1;
+			},
+			genTabsList() {
+				let tabsList = [{
+					name: "请选择"
+				}];
+				if (this.isChooseP) {
+					tabsList[0]['name'] = this.provinces[this.province]['label'];
+					tabsList[1] = {
+						name: "请选择"
+					};
+				}
+				if (this.isChooseC) {
+					tabsList[1]['name'] = this.citys[this.city]['label'];
+					tabsList[2] = {
+						name: "请选择"
+					};
+				}
+				if (this.isChooseA) {
+					tabsList[2]['name'] = this.areas[this.area]['label'];
+				}
+				return tabsList;
+			},
+			uZIndex() {
+				// 如果用户有传递z-index值,优先使用
+				return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
+			}
+		},
+		methods: {
+			init() {
+				if (this.areaCode.length == 3) {
+					this.setProvince("", this.areaCode[0]);
+					this.setCity("", this.areaCode[1]);
+					this.setArea("", this.areaCode[2]);
+				} else if (this.defaultRegion.length == 3) {
+					this.setProvince(this.defaultRegion[0], "");
+					this.setCity(this.defaultRegion[1], "");
+					this.setArea(this.defaultRegion[2], "");
+				};
+			},
+			setProvince(label = "", value = "") {
+				this.provinces.map((v, k) => {
+					if (value ? v.value == value : v.label == label) {
+						this.provinceChange(k);
+					}
+				})
+			},
+			setCity(label = "", value = "") {
+				this.citys.map((v, k) => {
+					if (value ? v.value == value : v.label == label) {
+						this.cityChange(k);
+					}
+				})
+			},
+			setArea(label = "", value = "") {
+				this.areas.map((v, k) => {
+					if (value ? v.value == value : v.label == label) {
+						this.isChooseA = true;
+						this.area = k;
+					}
+				})
+			},
+			close() {
+				this.$emit('input', false);
+			},
+			tabsChange(index) {
+				this.tabsIndex = index;
+			},
+			provinceChange(index) {
+				this.isChooseP = true;
+				this.isChooseC = false;
+				this.isChooseA = false;
+				this.province = index;
+				this.citys = citys[index];
+				this.tabsIndex = 1;
+			},
+			cityChange(index) {
+				this.isChooseC = true;
+				this.isChooseA = false;
+				this.city = index;
+				this.areas = areas[this.province][index];
+				this.tabsIndex = 2;
+				// 只选到市添加以下代码
+				// let result = {};
+				// result.province = this.provinces[this.province];
+				// result.city = this.citys[this.city];
+				// this.$emit('city-change', result);
+				// this.close();
+			},
+			areaChange(index) {
+				this.isChooseA = true;
+				this.area = index;
+				let result = {};
+				result.province = this.provinces[this.province];
+				result.city = this.citys[this.city];
+				result.area = this.areas[this.area];
+				this.$emit('city-change', result);
+				this.close();
+			}
+		}
+
+	}
+</script>
+<style lang="scss">
+	.area-box {
+		width: 100%;
+		overflow: hidden;
+		height: 800rpx;
+
+		>view {
+			width: 150%;
+			transition: transform 0.3s ease-in-out 0s;
+			transform: translateX(0);
+
+			&.change {
+				transform: translateX(-33.3333333%);
+			}
+		}
+
+		.area-item {
+			width: 33.3333333%;
+			height: 800rpx;
+		}
+	}
+</style>