Przeglądaj źródła

更换日期组件

lifanagju_citu 11 miesięcy temu
rodzic
commit
6320235c95

+ 1 - 0
src/components/DatePicker/index.vue

@@ -2,6 +2,7 @@
   <div style="width: 100%">
     <VueDatePicker
       locale="zh-CN"
+      :disabled="options?.disabled || false"
       :range="options?.range || false"
       :model-type="options?.format || 'yyyy.MM.dd'"
       :month-picker="month"

+ 20 - 12
src/views/resume/components/basicInfo.vue

@@ -99,7 +99,7 @@ import { getDict } from '@/hooks/web/useDictionaries'
 import { getTimeStamp, timesTampChange } from '@/utils/date'
 import { saveResumeBasicInfo } from '@/api/resume'
 import { useUserStore } from '@/store/user'
-import { ref, shallowRef } from 'vue';
+import { ref } from 'vue';
 
 defineOptions({name: 'resume-components-basicInfo'})
 const userStore = useUserStore()
@@ -139,14 +139,18 @@ const formItems = ref({
       items: [],
     },
     {
-      type: 'datepicker',
+      type: 'datePicker',
       key: 'birthday',
-      value: shallowRef(null),
+      value: null,
       default: null,
       col: 6,
-      label: '出生日期 *',
-      // outlined: true,
-      disabled: true,
+      class: 'mb-3',
+      options: {
+        type: 'date',
+        format: 'timestamp',
+        placeholder: '出生日期 *',
+        disabled: true,
+      },
     },
     {
       type: 'text',
@@ -235,7 +239,7 @@ const formItems = ref({
       itemText: 'label',
       itemValue: 'value',
       rules: [v => !!v || '请选择求职状态'],
-      items: [{ label: '离职-随时到岗 ', value: 0 }, { label: '在职-月内到岗', value: 1 }, { label: '在职-考虑机会', value: 2 }, { label: '在职-暂不考虑', value: 3 }]
+      items: [{ label: '离职-随时到岗 ', value: '0' }, { label: '在职-月内到岗', value: '1' }, { label: '在职-考虑机会', value: '2' }, { label: '在职-暂不考虑', value: '3' }]
     },
     {
       type: 'autocomplete',
@@ -248,16 +252,20 @@ const formItems = ref({
       itemText: 'label',
       itemValue: 'value',
       rules: [v => !!v || '请选择婚姻状况'],
-      items: [{ label: '未婚 ', value: 0 }, { label: '已婚', value: 1 }, { label: '离异', value: 2 }, { label: '保密', value: 3 }]
+      items: [{ label: '未婚 ', value: '0' }, { label: '已婚', value: '1' }, { label: '离异', value: '2' }, { label: '保密', value: '3' }]
     },
     {
-      type: 'datepicker',
+      type: 'datePicker',
       key: 'firstWorkTime',
-      value: shallowRef(null),
+      value: null,
       default: null,
       col: 6,
-      label: '首次工作时间 *',
-      // outlined: true,
+      class: 'mb-3',
+      options: {
+        type: 'month',
+        format: 'timestamp',
+        placeholder: '首次工作时间 *',
+      },
       rules: [v => !!v || '请选择首次工作时间']
     },
   ]

+ 21 - 7
src/views/resume/components/educationExp.vue

@@ -57,7 +57,7 @@ import { saveResumeEduExp, getResumeEduExp, deleteResumeEduExp, schoolSearchByNa
 import Confirm from '@/plugins/confirm'
 import { getText, dealCanBeInputtedSave, dealCanBeInputtedValueAndLabel } from '@/utils/getText'
 import { debounce } from 'lodash'
-import { nextTick, shallowRef, reactive, ref } from 'vue'
+import { nextTick, reactive, ref } from 'vue'
 const editId = ref(null)
 const CtFormRef = ref()
 const dictItemsObj = reactive({})
@@ -152,19 +152,33 @@ const formItems = ref({
       items: dictItemsObj.educationSystemType,
     },
     {
-      type: 'datepicker',
+      type: 'datePicker',
       key: 'startTime',
-      value: shallowRef(null),
+      value: null,
+      default: null,
       col: 6,
-      label: '起始时间 *',
+      class: 'mb-3',
+      options: {
+        type: 'month',
+        format: 'timestamp',
+        placeholder: '起始时间 *',
+        disabled: true,
+      },
       rules: [v => !!v || '请选择起始时间']
     },
     {
-      type: 'datepicker',
+      type: 'datePicker',
       key: 'endTime',
-      value: shallowRef(null),
+      value: null,
+      default: null,
       col: 6,
-      label: '结束时间 *',
+      class: 'mb-3',
+      options: {
+        type: 'month',
+        format: 'timestamp',
+        placeholder: '结束时间 *',
+        disabled: true,
+      },
       rules: [v => !!v || '请选择结束时间']
     },
     {

+ 21 - 7
src/views/resume/components/workExperience.vue

@@ -55,7 +55,7 @@ import { saveResumeWorkExp, getResumeWorkExp, deleteResumeWorkExp, enterpriseSea
 import Confirm from '@/plugins/confirm'
 import { dealCanBeInputtedSave, dealCanBeInputtedValueAndLabel } from '@/utils/getText'
 import { debounce } from 'lodash'
-import { nextTick, shallowRef, reactive, ref } from 'vue'
+import { nextTick, reactive, ref } from 'vue'
 const editId = ref(null)
 const CtFormRef = ref()
 const dictItemsObj = reactive({})
@@ -118,19 +118,33 @@ const formItems = ref({
       items: []
     },
     {
-      type: 'datepicker',
+      type: 'datePicker',
       key: 'startTime',
-      value: shallowRef(null),
+      value: null,
+      default: null,
       col: 6,
-      label: '起始时间 *',
+      class: 'mb-3',
+      options: {
+        type: 'month',
+        format: 'timestamp',
+        placeholder: '起始时间 *',
+        disabled: true,
+      },
       rules: [v => !!v || '请选择起始时间']
     },
     {
-      type: 'datepicker',
+      type: 'datePicker',
       key: 'endTime',
-      value: shallowRef(null),
+      value: null,
+      default: null,
       col: 6,
-      label: '结束时间 *',
+      class: 'mb-3',
+      options: {
+        type: 'month',
+        format: 'timestamp',
+        placeholder: '结束时间 *',
+        disabled: true,
+      },
       rules: [v => !!v || '请选择结束时间']
     },
     {