Commit 1aafa8ab authored by 李明环(东信)'s avatar 李明环(东信)
parents ae002bcf 5a449cce
<template> <template>
<div class="form-item" :style="{ borderWidth: props.border ? '2rpx' : '0' }"> <div class="form-item" :style="{ borderWidth: props.border ? '2rpx' : '0' }">
<p class="title"> <p class="title">
{{ props.title }} <span>{{ props.subTitle }}</span> {{ props.title }} <span>{{ props.subTitle }}</span
><span class="required" v-if="props.required">*</span>
</p> </p>
<div class="temp"></div> <div class="temp"></div>
<img v-if="icon" class="icon" :src="iconPath" alt="" /> <img v-if="icon" class="icon" :src="iconPath" alt="" />
...@@ -26,6 +27,10 @@ const props = defineProps({ ...@@ -26,6 +27,10 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: () => true default: () => true
}, },
required: {
type: Boolean,
default: () => false
},
// 图标 (如果为空不显示) // 图标 (如果为空不显示)
icon: { icon: {
type: String as PropType<"arrow" | "edit" | "">, type: String as PropType<"arrow" | "edit" | "">,
...@@ -56,6 +61,9 @@ const iconPath = new URL(`../../static/image/icon/${props.icon}.png`, import.met ...@@ -56,6 +61,9 @@ const iconPath = new URL(`../../static/image/icon/${props.icon}.png`, import.met
font-size: 12px; font-size: 12px;
color: #77818f; color: #77818f;
} }
.required {
color: red;
}
} }
.temp { .temp {
margin-top: 36px; margin-top: 36px;
......
<template> <template>
<div class="page"> <div class="page">
<NavBar :showIcon="false" :showTitle="true" title="登录"></NavBar>
<!-- pages/login/login.wxml --> <!-- pages/login/login.wxml -->
<view class="login-page"> <!-- <view class="login-page">
<view></view> <view></view>
<view class="title"> <view class="title">
<text class="t1">乐业观山湖</text> <text class="t1">乐业观山湖</text>
...@@ -10,6 +9,17 @@ ...@@ -10,6 +9,17 @@
</view> </view>
<view class="unit-name">观山湖区人力资源和社会保障局</view> <view class="unit-name">观山湖区人力资源和社会保障局</view>
<button class="login-btn" @click="login">授权手机号登录</button> <button class="login-btn" @click="login">授权手机号登录</button>
</view> -->
<view class="login-page">
<NavBar :showIcon="false" :showTitle="true" title="登录"></NavBar>
<view class="title">
<text class="t1">乐业观山湖</text>
<text class="t2">安全、便捷的就业、创业服务平台</text>
</view>
<view class="box">
<text class="box-text">观山湖区人力资源和社会保障局</text>
<button class="login-btn" @click="login">授权手机号登录</button>
</view>
</view> </view>
<!-- {{ res }} --> <!-- {{ res }} -->
</div> </div>
...@@ -63,16 +73,13 @@ const login = () => { ...@@ -63,16 +73,13 @@ const login = () => {
.page { .page {
height: 100%; height: 100%;
background-color: #eaf5ff; background-color: #eaf5ff;
}
.login-page {
height: 100%;
background-image: url("https://lygsh-image.wjzpgz.com/login/loginBG.png"); background-image: url("https://lygsh-image.wjzpgz.com/login/loginBG.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 50% 50%; background-position: 50% 50%;
background-size: auto 100%; background-size: auto 100%;
}
.login-page {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.student { .student {
font-size: 36rpx; font-size: 36rpx;
font-weight: 600; font-weight: 600;
...@@ -84,6 +91,10 @@ const login = () => { ...@@ -84,6 +91,10 @@ const login = () => {
flex-direction: column; flex-direction: column;
margin-top: 176rpx; margin-top: 176rpx;
text-align: center; text-align: center;
img {
width: 368rpx;
margin: 0 auto;
}
.t1 { .t1 {
font-size: 80rpx; font-size: 80rpx;
font-weight: normal; font-weight: normal;
...@@ -92,27 +103,30 @@ const login = () => { ...@@ -92,27 +103,30 @@ const login = () => {
} }
.t2 { .t2 {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500;
color: #1b2026; color: #1b2026;
margin-top: 28rpx;
} }
} }
.box {
position: fixed;
bottom: 336rpx;
left: 0;
text-align: center;
width: 100%;
.box-text {
font-size: 28rpx;
color: #0e2761;
font-family: 苹方-;
}
.login-btn { .login-btn {
// position: fixed;
// bottom: 336rpx;
// left: 50%;
width: 640rpx; width: 640rpx;
height: 96rpx; height: 96rpx;
font-size: 34rpx; font-size: 34rpx;
margin-top: 100rpx;
line-height: 96rpx; line-height: 96rpx;
color: #ffffff; color: #ffffff;
background-color: #1f86ff; background-color: #1f86ff;
margin-top: 60rpx;
} }
.unit-name {
margin-top: 421 * 2rpx;
font-size: 24rpx;
font-weight: 500;
color: #1b2026;
} }
} }
</style> </style>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
></selectbox> ></selectbox>
<!-- 职位类型 --> <!-- 职位类型 -->
<form-row> <form-row>
<form-item title="职位类型"> <form-item title="职位类型" :required="true">
<wd-col-picker <wd-col-picker
v-model="positionTypeValue" v-model="positionTypeValue"
:columns="columns" :columns="columns"
...@@ -46,24 +46,24 @@ ...@@ -46,24 +46,24 @@
</form-row> </form-row>
<!-- 岗位名称 --> <!-- 岗位名称 -->
<form-row> <form-row>
<form-item title="岗位名称" icon="arrow"> <form-item title="岗位名称" icon="arrow" :required="true">
<input type="text" v-model="item.name" placeholder="请输入岗位名称" /> <input type="text" v-model="item.name" placeholder="请输入岗位名称" />
</form-item> </form-item>
</form-row> </form-row>
<!-- 职位描述 --> <!-- 职位描述 -->
<form-row> <form-row>
<form-item title="岗位描述" :border="false" icon=""> <form-item title="岗位描述" :border="false" icon="" :required="true">
<textarea maxlength="800" v-model="item.positionDesc" placeholder="请输入你的岗位描述"></textarea> <textarea maxlength="800" v-model="item.positionDesc" placeholder="请输入你的岗位描述"></textarea>
</form-item> </form-item>
</form-row> </form-row>
<form-item title="岗位薪资" icon=""> <form-item title="岗位薪资" icon="" :required="true">
<view <view
v-if="item.settlementType == 4" v-if="item.settlementType == 4"
:class="`inner flex-between ${item.salaryText ? '' : 'placeholder'}`" :class="`inner flex-between ${item.salaryText ? '' : 'placeholder'}`"
style="display: flex; justify-content: space-between; width: 100%" style="display: flex; justify-content: space-between; width: 100%"
@click="onOpen(item, index)" @click="onOpen(item, index)"
> >
{{ item.salaryText || "请选择岗位薪资待遇" }} {{ item.salaryText || "请选择月薪范围" }}
<!-- <view class="arrow"></view> --> <!-- <view class="arrow"></view> -->
<checkbox <checkbox
...@@ -80,8 +80,8 @@ ...@@ -80,8 +80,8 @@
style="display: flex; justify-content: space-between; width: 100%" style="display: flex; justify-content: space-between; width: 100%"
@click="onOpen(item, index)" @click="onOpen(item, index)"
> >
<!-- {{ item.salaryText || "请选择时薪范围" }} --> {{ item.salaryText || "请选择时薪范围" }}
{{ item.salaryText || "请选择岗位薪资待遇" }} <!-- {{ item.salaryText || "请选择岗位薪资待遇" }} -->
<!-- <view class="arrow"></view> --> <!-- <view class="arrow"></view> -->
<checkbox <checkbox
class="checkbox" class="checkbox"
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
</view> </view>
</form-item> </form-item>
<form-item title="工作地点" icon=""> <form-item title="工作地点" icon="" :required="true">
<wd-col-picker <wd-col-picker
v-model="cityValue" v-model="cityValue"
:columns="cityOpstion" :columns="cityOpstion"
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
</p> </p>
</wd-col-picker> </wd-col-picker>
</form-item> </form-item>
<form-item title="是否提供食宿" icon=""> <form-item title="是否提供食宿" icon="" :required="true">
<wd-radio-group v-model="item.accommodation" inline shape="dot"> <wd-radio-group v-model="item.accommodation" inline shape="dot">
<wd-radio v-for="(v, n) in radioOpstion" :value="v.code" :key="n">{{ v.text }}</wd-radio> <wd-radio v-for="(v, n) in radioOpstion" :value="v.code" :key="n">{{ v.text }}</wd-radio>
</wd-radio-group> </wd-radio-group>
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
> >
</view> </view>
</form-item> </form-item>
<form-item title="身份" icon=""> <form-item title="人员类别" icon="" :required="true">
<wd-picker <wd-picker
:columns="identityPostion" :columns="identityPostion"
value-key="code" value-key="code"
...@@ -135,13 +135,13 @@ ...@@ -135,13 +135,13 @@
> >
<view :class="`inner flex-between ${item.identityText ? '' : 'placeholder'}`"> <view :class="`inner flex-between ${item.identityText ? '' : 'placeholder'}`">
<view class="flex-align-center"> <view class="flex-align-center">
{{ item.identityText || "请选择身份" }} {{ item.identityText || "请选择人员类别" }}
</view> </view>
</view> </view>
</wd-picker> </wd-picker>
</form-item> </form-item>
<view class="transverse"> <view>
<form-item title="学历" icon=""> <form-item title="学历" icon="" :required="true">
<wd-picker <wd-picker
:columns="educationPostion" :columns="educationPostion"
value-key="code" value-key="code"
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
</wd-picker> </wd-picker>
</form-item> </form-item>
<form-item title="专业" icon=""> <form-item title="专业" icon="" :required="true">
<wd-col-picker <wd-col-picker
v-model="majorValue" v-model="majorValue"
:columns="majorOpstion" :columns="majorOpstion"
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
</form-item> </form-item>
</view> </view>
<form-item title="年龄" icon=""> <form-item title="年龄" icon="" :required="true">
<wd-col-picker <wd-col-picker
v-model="ageValue" v-model="ageValue"
:columns="ageColumns" :columns="ageColumns"
...@@ -244,13 +244,13 @@ ...@@ -244,13 +244,13 @@
<input v-model="item.specialCertificates" type="text" placeholder="请填写特种作业证" /> <input v-model="item.specialCertificates" type="text" placeholder="请填写特种作业证" />
</form-item> </form-item>
<form-row :fill="false"> <form-row :fill="false">
<form-item title="招聘人数" icon="edit"> <form-item title="招聘人数" icon="edit" :required="true">
<input type="number" v-model="item.recruitmentNumber" placeholder="请输入招聘人数" /> <input type="number" v-model="item.recruitmentNumber" placeholder="请输入招聘人数" />
</form-item> </form-item>
<form-item title="联系电话" icon="edit"> <form-item title="联系电话" icon="edit" :required="true">
<input type="number" v-model="item.contactPhone" placeholder="请输入联系电话" /> <input type="number" v-model="item.contactPhone" placeholder="请输入联系电话" />
</form-item> </form-row </form-item> </form-row
><form-item title="联系人" icon="edit"> ><form-item title="联系人" icon="edit" :required="true">
<input type="text" v-model="item.contactPerson" placeholder="请输入联系人" /> <input type="text" v-model="item.contactPerson" placeholder="请输入联系人" />
</form-item> </form-item>
</view> </view>
...@@ -449,9 +449,11 @@ const columnChangeMajor = ({ selectedItem, resolve, finish }) => { ...@@ -449,9 +449,11 @@ const columnChangeMajor = ({ selectedItem, resolve, finish }) => {
}; };
const handleConfirmMajor = (params, item) => { const handleConfirmMajor = (params, item) => {
const { value } = params; const { value } = params;
item.majorText = value[0]; if (value[1]) {
item.majorRequirement = value[0]; item.majorText = value.join("-");
if (value[0] == "不限") { item.majorRequirement = value.join("-");
} else {
item.majorText = "不限";
item.majorRequirement = ""; item.majorRequirement = "";
} }
}; };
...@@ -478,13 +480,14 @@ function deleteItem(index) { ...@@ -478,13 +480,14 @@ function deleteItem(index) {
jobForm.value.splice(index, 1); jobForm.value.splice(index, 1);
} }
const initageColumns = () => { const initageColumns = () => {
const temp = [ // const temp = [
{ // {
value: "不限", // value: "不限",
label: "不限", // label: "不限",
next: false // next: false
} // }
]; // ];
const temp = [];
for (let i = 16; i < 81; i++) { for (let i = 16; i < 81; i++) {
temp.push({ temp.push({
value: i, value: i,
...@@ -791,7 +794,7 @@ const submitFrom = () => { ...@@ -791,7 +794,7 @@ const submitFrom = () => {
}); });
} else { } else {
xma.showToast({ xma.showToast({
title: "请完善岗位信息", title: "请完善相关信息",
icon: "none" icon: "none"
}); });
} }
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
<div class="top"> <div class="top">
<img v-if="params.logoPath" :src="evn.APP_IMAGE_BASE_API + params.logoPath" @click="chooseImage" /> <img v-if="params.logoPath" :src="evn.APP_IMAGE_BASE_API + params.logoPath" @click="chooseImage" />
<img v-else src="@/static/image/temp/defaultCompany.png" alt="" @click="chooseImage" /> <img v-else src="@/static/image/temp/defaultCompany.png" alt="" @click="chooseImage" />
<div class="name">{{ companyInfo.companyName }}</div> <div class="name1" @click="chooseImage">更换企业头像</div>
<div class="name">{{ companyInfo.companyName || companyInfo.name }}</div>
<formItem style="margin-top: 80rpx" title="营业执照" arrow :border="false" @click="jupmLicenseInfo"> <formItem style="margin-top: 80rpx" title="营业执照" arrow :border="false" @click="jupmLicenseInfo">
<p :class="`status${companyInfo?.status}`">{{ auditStatus }}</p> <p :class="`status${companyInfo?.status}`">{{ auditStatus }}</p>
</formItem> </formItem>
...@@ -263,21 +264,6 @@ const submit = () => { ...@@ -263,21 +264,6 @@ const submit = () => {
console.log("params", params); console.log("params", params);
if ( if (
// validateForm(params, [
// "location",
// "cityCode",
// "cityName",
// "companyName",
// "creditCode",
// "introduction",
// "districtCode",
// "districtName",
// "id",
// "logoPath",
// "provinceCode",
// "provinceName",
// "industry"
// ])
validateForm(params, [ validateForm(params, [
"location", "location",
"cityCode", "cityCode",
...@@ -286,7 +272,6 @@ const submit = () => { ...@@ -286,7 +272,6 @@ const submit = () => {
"introduction", "introduction",
"districtCode", "districtCode",
"id", "id",
"logoPath",
"provinceCode", "provinceCode",
"industry" "industry"
]) ])
...@@ -319,10 +304,8 @@ const validateForm = (formData, requiredFields) => { ...@@ -319,10 +304,8 @@ const validateForm = (formData, requiredFields) => {
const value = formData[field]; const value = formData[field];
// 排除 0 和 "0" 的值,不作为空值校验 // 排除 0 和 "0" 的值,不作为空值校验
if (value === undefined || value === null || value === "") { if (value === undefined || value === null || value === "") {
console.log("field", field);
uni.showToast({ uni.showToast({
title: `请填写完整表单`, title: `请完善相关信息`,
icon: "none", icon: "none",
duration: 2000 duration: 2000
}); });
...@@ -341,17 +324,22 @@ const validateForm = (formData, requiredFields) => { ...@@ -341,17 +324,22 @@ const validateForm = (formData, requiredFields) => {
.content { .content {
flex: 1; flex: 1;
.top { .top {
padding: 0 16px; padding: 0 32rpx;
text-align: center; text-align: center;
border-bottom: 8px solid #f3f4f8; border-bottom: 16rpx solid #f3f4f8;
img { img {
width: 80px; width: 160rpx;
height: 80px; height: 160rpx;
margin-top: 14px; margin-top: 28rpx;
border-radius: 50%; border-radius: 50%;
} }
.name { .name {
margin-top: 16px; margin-top: 32rpx;
}
.name1 {
margin-top: 20rpx;
font-size: 24rpx;
color: #77818f;
} }
.status0 { .status0 {
color: #1f86ff; color: #1f86ff;
...@@ -367,7 +355,7 @@ const validateForm = (formData, requiredFields) => { ...@@ -367,7 +355,7 @@ const validateForm = (formData, requiredFields) => {
text-align: left; text-align: left;
} }
.form-wrap { .form-wrap {
padding: 0 16px; padding: 0 32rpx;
:deep(.wd-col-picker__cell) { :deep(.wd-col-picker__cell) {
padding: 0 !important; padding: 0 !important;
} }
...@@ -382,20 +370,20 @@ const validateForm = (formData, requiredFields) => { ...@@ -382,20 +370,20 @@ const validateForm = (formData, requiredFields) => {
margin-left: 50rpx; margin-left: 50rpx;
} }
.textarea-wrap { .textarea-wrap {
padding: 16px 0; padding: 32rpx 0;
.label { .label {
font-size: 12px; font-size: 24rpx;
font-weight: normal; font-weight: normal;
color: #77818f; color: #77818f;
} }
textarea { textarea {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
height: 136px; height: 272rpx;
padding: 16px; padding: 32rpx;
margin-top: 8px; margin-top: 16rpx;
background: #f2f5fb; background: #f2f5fb;
border-radius: 4px; border-radius: 8rpx;
} }
} }
} }
......
...@@ -88,9 +88,9 @@ export const validateForm = (formData, requiredFields, type) => { ...@@ -88,9 +88,9 @@ export const validateForm = (formData, requiredFields, type) => {
postitDesc: "职位描述", postitDesc: "职位描述",
jobName: "职位名称", jobName: "职位名称",
address: "工作地址", address: "工作地址",
identityRequirement: "身份要求", identityRequirement: "人员类别",
educationRequirement: "学历要求", educationRequirement: "学历",
maxAgeRequirement: "年龄要求", maxAgeRequirement: "年龄",
contactPerson: "联系人", contactPerson: "联系人",
jobType: "职位类型", jobType: "职位类型",
position: "职位", position: "职位",
...@@ -113,9 +113,10 @@ export const validateForm = (formData, requiredFields, type) => { ...@@ -113,9 +113,10 @@ export const validateForm = (formData, requiredFields, type) => {
return false; return false;
} }
} else if (fieldValue === null || fieldValue === undefined || fieldValue === "") { } else if (fieldValue === null || fieldValue === undefined || fieldValue === "") {
const title = fieldMapping[field] || (type === "post" ? "岗位信息" : "表单"); // const title = fieldMapping[field] || (type === "post" ? "岗位信息" : "表单");
const title = fieldMapping[field] || (type === "post" ? "相关信息" : "相关信息");
uni.showToast({ uni.showToast({
title: `请${type === "post" ? "完善" : "填写"}${title}!`, title: `请${type === "post" ? "完善" : "完善"}${title}!`,
icon: "none", icon: "none",
duration: 2000 duration: 2000
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment