zaijin пре 2 година
родитељ
комит
94bccd72e3

+ 29 - 5
h5_web/pages/businessDetails/businessDetails.vue

@@ -2,7 +2,7 @@
 <template>
 	<view class="business-details">
 		<!-- 导航栏 -->
-		<u-navbar title="" :background="background" title-color="#fff" back-icon-color="#fff" :border-bottom="false"/>
+		<u-navbar title="" :background="background" title-color="#fff" back-icon-color="#fff" :border-bottom="false" />
 		<!-- 背景 -->
 		<view class="business-details-bg"></view>
 		<!-- 内容 -->
@@ -11,7 +11,8 @@
 				<!-- <image :src="companyInfo.logoUrl" mode=""></image> -->
 				<u-image :src="companyInfo.logoUrl" width="140" height="140" border-radius="70">
 					<view slot="error">
-						<u-image src="../../static/img/default-company.png" width="140" height="140" border-radius="70"/>
+						<u-image src="../../static/img/default-company.png" width="140" height="140"
+							border-radius="70" />
 					</view>
 				</u-image>
 			</view>
@@ -91,14 +92,15 @@
 								<u-image :src="item.companyLogoUrl" mode="aspectFill" width="112" height="112"
 									border-radius="10">
 									<view slot="error">
-										<u-image src="../../static/img/default-company.png" width="112" height="112" border-radius="10"/>
+										<u-image src="../../static/img/default-company.png" width="112" height="112"
+											border-radius="10" />
 									</view>
 								</u-image>
 							</view>
 							<view class="info">
 								<view>{{ item.postName }}</view>
 								<view>
-									{{ `${ item.areaName ?  item.areaName + ' |' : '' } 经验${item.workYear ? item.workYear + '年' : '不限'} | ${ getEducationBg(item.educationBg) || '' }` }}
+									{{ `${ item.areaName ?  item.areaName + ' |' : '' } ${item.workYear ? getDictsLabel(workYearList, item.workYear) : '不限'} | ${ getEducationBg(item.educationBg) || '' }` }}
 								</view>
 								<view>{{ item.companyName }}</view>
 							</view>
@@ -131,13 +133,15 @@
 				companyTradeList: [],
 				// 公司职位
 				positionList: [],
-				degrEducList: []
+				degrEducList: [],
+				workYearList: []
 			}
 		},
 		onLoad(page) {
 			this.getDict('company_scope');
 			this.getDict('company_trade');
 			this.getDict('degr_educ');
+			this.getDict('work_year');
 			if (page.id) {
 				this.companyId = page.id
 			}
@@ -206,6 +210,8 @@
 							this.companyTradeList = res.data;
 						} else if (key === 'degr_educ') {
 							this.degrEducList = res.data;
+						} else if (key === 'work_year') {
+							this.workYearList = res.data
 						}
 					}
 				})
@@ -276,6 +282,24 @@
 					current: index,
 					urls: this.companyInfo.environmentUrlList
 				})
+			},
+			/**
+			 * 通过value获取label
+			 * @param {Object} list
+			 * @param {Object} value
+			 */
+			getDictsLabel(list, value) {
+				let label = '-';
+				try {
+					list.forEach(item => {
+						if (Number(item.text) === Number(value)) {
+							throw (item)
+						}
+					})
+				} catch (e) {
+					label = e.label
+				}
+				return label
 			}
 		}
 	}

+ 24 - 2
h5_web/pages/jobDetails/jobDetails.vue

@@ -15,7 +15,7 @@
 						<view class="content">
 							<view class="left">
 								<view>{{ recruitmentData.postName }}</view>
-								<view>经验{{ recruitmentData.workYear }} /
+								<view>{{ getDictsLabel(workYearList, recruitmentData.workYear) }} /
 									{{ getEducationBg(recruitmentData.educationBg) }} / {{ recruitmentData.cityName }}
 								</view>
 							</view>
@@ -127,13 +127,15 @@
 				isSubmit: true,
 				companyInfo: {},
 				companyScopeList: [],
-				companyTradeList: []
+				companyTradeList: [],
+				workYearList: []
 			};
 		},
 		onLoad(param) {
 			this.getVeteDegrEduc();
 			this.getDict('company_scope');
 			this.getDict('company_trade');
+			this.getDict('work_year');
 			if (param.id) {
 				this.getPostDetails(param.id)
 				this.judgeIsSubmit(param.id)
@@ -158,6 +160,8 @@
 							this.companyScopeList = res.data
 						} else if (key === 'company_trade') {
 							this.companyTradeList = res.data;
+						} else if (key === 'work_year') {
+							this.workYearList = res.data;
 						}
 					}
 				})
@@ -335,6 +339,24 @@
 			 */
 			handleResumeClick() {
 				this.$refs['judgeAuth'].modalShow()
+			},
+			/**
+			 * 通过value获取label
+			 * @param {Object} list
+			 * @param {Object} value
+			 */
+			getDictsLabel(list, value) {
+				let label = '-';
+				try {
+					list.forEach(item => {
+						if (Number(item.text) === Number(value)) {
+							throw (item)
+						}
+					})
+				} catch (e) {
+					label = e.label
+				}
+				return label
 			}
 		}
 	}

+ 2 - 0
h5_web/pages/myDelivery/myDelivery.scss

@@ -15,6 +15,7 @@
 			&-left {
 				display: flex;
 				align-items: center;
+				width: 80%;
 				&-image {
 					width: 104rpx;
 					height: 104rpx;
@@ -48,6 +49,7 @@
 			&-right {
 				display: flex;
 				flex-direction: column;
+				width: 20%;
 				view {
 					font-size: 26rpx;
 					font-family: 'Microsoft YaHei';

+ 28 - 2
h5_web/pages/myDelivery/myDelivery.vue

@@ -23,7 +23,7 @@
 						</view>
 						<view class="delivery-list-item-left-info">
 							<view>{{ item.postName }}</view>
-							<view>{{ `${item.provinceName || ''} | 经验${item.workYear ? item.workYear + '年' : '不限'} | ${getEducationBg(item.educationBg)}` }}</view>
+							<view>{{ `${item.provinceName || '-'} | ${item.workYear ? getDictsLabel(workYearList, item.workYear) : '不限'} | ${getEducationBg(item.educationBg)}` }}</view>
 							<view>{{ item.companyName }}</view>
 						</view>
 					</view>
@@ -44,7 +44,8 @@
 		data() {
 			return {
 				deliveryList: [],
-				degrEducList: []
+				degrEducList: [],
+				workYearList: []
 			}
 		},
 		onShow() {
@@ -75,6 +76,13 @@
 						this.degrEducList = res.data;
 					}
 				})
+				this.$u.api.getDictdataUrl({
+					key: 'work_year'
+				}).then(res => {
+					if (res.code === 200) {
+						this.workYearList = res.data;
+					}
+				})
 			},
 			getList(pageNum, pageSize) {
 				this.$u.api.delivery.getDeliveryList({
@@ -113,6 +121,24 @@
 					url: url,
 					params: params
 				})
+			},
+			/**
+			 * 通过value获取label
+			 * @param {Object} list
+			 * @param {Object} value
+			 */
+			getDictsLabel(list, value) {
+				let label = '-';
+				try {
+					list.forEach(item => {
+						if (Number(item.text) === Number(value)) {
+							throw (item)
+						}
+					})
+				} catch (e) {
+					label = e.label
+				}
+				return label
 			}
 		}
 	}