Kaynağa Gözat

feat:时间选中

jianghaili 2 hafta önce
ebeveyn
işleme
a2d8e374c3
1 değiştirilmiş dosya ile 26 ekleme ve 40 silme
  1. 26 40
      pages/my/jobApplicant/workRecord.vue

+ 26 - 40
pages/my/jobApplicant/workRecord.vue

@@ -82,9 +82,8 @@
         <!-- 出生年月 -->
         <view class="form-item required">
           <view class="form-label">出生年月</view>
-          <!-- formData.birthDate -->
-          <view @click="showBirthDatePicker = true" class="form-input-time">
-            <text>请输入出生年月</text>
+          <view @click="pickerShow" class="form-input-time">
+            <text>{{ formData.birthDate?formData.birthDate:'请选择出生年月日' }}</text>
             <image src="@/static/images/jobApplicant/rili.svg" mode="scaleToFill" />
           </view>
         </view>
@@ -92,8 +91,7 @@
         <!-- 求职状态 -->
         <view class="form-item required">
           <view class="form-label">求职状态</view>
-          <!-- formData.birthDate -->
-          <view @click="showBirthDatePicker = true" class="form-input-time">
+          <view @click.stop="showJobStatus" class="form-input-time">
             <text>离职&随时到岗</text>
             <image src="@/static/images/jobApplicant/icon-next.svg" mode="scaleToFill" />
           </view>
@@ -237,12 +235,18 @@
       </view>
     </view>
     <u-picker
-      :show="showBirthDatePicker"
+      v-model="showBirthDatePicker"
       :columns="dateColumns"
       keyName="label"
       @confirm="confirmBirthDate"
       @cancel="showBirthDatePicker = false"
     ></u-picker>
+    <u-picker
+      v-model="showStatus"
+      :columns="statusColumns"
+      @confirm="confirmStatus"
+      @cancel="showStatus = false"
+    ></u-picker>
   </view>
 </template>
 
@@ -268,9 +272,12 @@ export default {
     }
 
     return {
+      show: false,
       avatarUrl: "",
       showBirthDatePicker: false,
       dateColumns: [years, months, days],
+      statusColumns: ["兼职", "在职", "离职&随时到岗"],
+      showStatus: false,
       formData: {
         name: "",
         gender: "male",
@@ -287,18 +294,19 @@ export default {
           skills: "请填写面试技能要求",
         },
       ],
-      educationExperiences: [
-        {
-          school: "学校名称",
-          degree: "学历",
-          major: "专业",
-          duration: "在职时间",
-          content: "请填写简历或简历",
-        },
-      ],
     };
   },
   methods: {
+    showJobStatus() {
+      console.log('转台')
+      this.showStatus = true;
+    },
+    pickerShow() {
+      this.showBirthDatePicker = true;
+    },
+    confirmStatus() {
+      this.showStatus = false;
+    },
     // 选择头像
     chooseAvatar() {
       uni.chooseImage({
@@ -313,8 +321,9 @@ export default {
 
     // 确认出生日期
     confirmBirthDate(e) {
-      const [year, month, day] = e.value;
-      this.formData.birthDate = `${year.label}${month.label}${day.label}`;
+      console.log(e,'测试')
+      const {year, month, day} = e;
+      this.formData.birthDate = `${year}-${month}-${day}`;
       this.showBirthDatePicker = false;
     },
 
@@ -342,29 +351,6 @@ export default {
       }
     },
 
-    // 添加教育经历
-    addEducationExperience() {
-      this.educationExperiences.push({
-        school: "学校名称",
-        degree: "学历",
-        major: "专业",
-        duration: "在职时间",
-        content: "请填写简历或简历",
-      });
-    },
-
-    // 删除教育经历
-    removeEducationExperience(index) {
-      if (this.educationExperiences.length > 1) {
-        this.educationExperiences.splice(index, 1);
-      } else {
-        uni.showToast({
-          title: "至少保留一条教育经历",
-          icon: "none",
-        });
-      }
-    },
-
     // 提交简历
     submitResume() {
       if (!this.formData.name) {