소스 검색

求职意向

Xiao_123 1 년 전
부모
커밋
5bf6d16ae0

+ 2 - 1
src/components/CtForm/index.vue

@@ -15,6 +15,7 @@
                 v-model="item.value"
                 :item="item"
                 @change="handleChange(item)"
+                @blur="item.blur"
               ></textUI>
               <autocompleteUI
                 v-if="item.type === 'autocomplete'"
@@ -45,7 +46,7 @@ import textUI from './../FormUI/TextInput'
 import autocompleteUI from './../FormUI/autocomplete'
 import radioGroupUI from './../FormUI/radioGroup'
 import { ref, defineEmits } from 'vue'
-const emit = defineEmits(['change', 'inputUpdateAutocomplete'])// 定义一个或多个自定义事件
+const emit = defineEmits(['change', 'inputUpdateAutocomplete', 'blur'])// 定义一个或多个自定义事件
 const props = defineProps({items: Object})
 const valid = ref(false)
 const isValid = ref(true)

+ 7 - 2
src/components/FormUI/TextInput/index.vue

@@ -9,7 +9,7 @@
       :disabled="item.disabled"
       :dense="item.dense"
       :style="{width: item.width}"
-      :color="item.color"
+      color="primary"
       :label="item.label"
       :placeholder="item.placeholder || item.label"
       :outlined="item.outlined"
@@ -24,6 +24,7 @@
       hide-spin-buttons
       @wheel="$event => handleWheel($event, item)"
       @update:modelValue="modelValueUpDate"
+      @click:control="handleBlur"
     ></v-text-field>
   </div>
 </template>
@@ -32,7 +33,7 @@ import { defineEmits, ref } from 'vue';
 defineOptions({ name:'FormUI-v-text-field'})
 
 const props = defineProps({item: Object, modelValue: [String, Number]})
-const emit = defineEmits(['update:modelValue', 'change'])
+const emit = defineEmits(['update:modelValue', 'change', 'blur'])
 const item = props.item
 const value = ref(props.modelValue)
 const modelValueUpDate = (val) => {
@@ -40,6 +41,10 @@ const modelValueUpDate = (val) => {
   emit('update:modelValue', value.value)
   emit('change', value.value)
 }
+
+const handleBlur = () => {
+  emit('blur')
+}
 const handleWheel = (event, item) => {
   if (item.type !== 'number') return
   event.preventDefault()

+ 1 - 0
src/components/FormUI/autocomplete/index.vue

@@ -17,6 +17,7 @@
       :multiple="item.multiple"
       :clearable="item.clearable"
       :search="item.searchInput"
+      color="primary"
       :hide-no-data="item.hideNoData"
       :no-data-text="item.noDataText || 'No data available'"
       :hide-selected="item.hideSelected"

+ 7 - 0
src/locales/en.js

@@ -1,6 +1,9 @@
 export default {
   common: {
     confirmTitle: 'System Hint',
+    edit: 'Edit',
+    cancel: 'Cancel',
+    save: 'Save'
   },
   sys: {
     api: {
@@ -58,5 +61,9 @@ export default {
   },
   enterprise: {
     moreBtn: 'View More Enterprises'
+  },
+  resume: {
+    personalAdvantages: 'Personal Advantages',
+    jobIntention: 'Job Intention'
   }
 }

+ 8 - 1
src/locales/zh-CN.js

@@ -1,6 +1,9 @@
 export default {
   common: {
-    confirmTitle: '系统提示'
+    confirmTitle: '系统提示',
+    edit: '编辑',
+    cancel: '取消',
+    save: '保存'
   },
   sys: {
     api: {
@@ -58,5 +61,9 @@ export default {
   },
   enterprise: {
     moreBtn: '查看更多企业'
+  },
+  resume: {
+    personalAdvantages: '个人优势',
+    jobIntention: '求职意向'
   }
 }

+ 98 - 7
src/views/resume/components/jobIntention.vue

@@ -1,22 +1,113 @@
 <template>
   <div class="resume-box">
     <div class="resume-header mb-3">
-      <div class="resume-title">求职意向</div>
-      <v-btn v-if="!isEdit" variant="text" color="primary" prepend-icon="mdi-square-edit-outline" @click="isEdit = true">编辑</v-btn>
+      <div class="resume-title">{{ $t('resume.jobIntention') }}</div>
+      <v-btn v-if="!isEdit" variant="text" color="primary" prepend-icon="mdi-square-edit-outline" @click="isEdit = true">{{ $t('common.edit') }}</v-btn>
     </div>
-    <div v-if="isEdit"></div>
-    <div v-else>
-      <span></span>
+    <div></div>
+    <div v-if="isEdit">
+      <CtForm :items="items" style="width: 100%;">
+        <template #positionId="{ item }">
+          <textUI
+            v-model="item.value"
+            :item="item"
+            @blur="item.blur"
+            style="position: relative;"
+          ></textUI>
+          <jobTypeCard class="jobTypeCardBox" v-if="drawer"></jobTypeCard>
+        </template>
+      </CtForm>
     </div>
   </div>
 </template>
 
 <script setup name="jobIntention">
 import { ref } from 'vue'
+// import { useSharedState } from '@/store/sharedState'
+import CtForm from '@/components/CtForm'
+import textUI from '@/components/FormUI/TextInput'
+import jobTypeCard from '@/components/jobTypeCard'
 
-const isEdit = ref(false)
+const isEdit = ref(true)
+const drawer = ref(false)
+const handleBlur = () => {
+  drawer.value = !drawer.value
+}
+// const sharedState = useSharedState()
+// watch(() => sharedState.layoutClickCount, () => {
+//   if (drawer.value) drawer.value = false
+// })
+
+const items = ref({
+  options: [
+    {
+      slotName: 'positionId',
+      key: 'positionId',
+      value: null,
+      col: 6,
+      placeholder: '期望岗位 *',
+      flexStyle: 'mr-3',
+      outlined: true,
+      rules: [v => !!v || '请输入期望岗位'],
+      blur: handleBlur
+    },
+    {
+      type: 'autocomplete',
+      key: 'jobType',
+      value: null,
+      placeholder: '请选择求职类型 *',
+      outlined: true,
+      itemText: 'label',
+      col: 6,
+      itemValue: 'value',
+      rules: [v => !!v || '请选择求职类型'],
+      items: [
+        { label: '全职', value: 0 },
+        { label: '兼职', value: 1 },
+        { label: '临时', value: 2 },
+        { label: '实习', value: 3 }
+      ]
+    },
+    {
+      type: 'number',
+      key: 'payFrom',
+      value: null,
+      placeholder: '期望薪资(最低要求) *',
+      col: 6,
+      flexStyle: 'mr-3',
+      outlined: true,
+      rules: [v => !!v || '请输入薪资最低要求']
+    },
+    {
+      type: 'number',
+      key: 'payTo',
+      value: null,
+      placeholder: '期望薪资(最高要求) *',
+      col: 6,
+      outlined: true,
+      rules: [v => !!v || '请输入薪资最高要求']
+    },
+    {
+      type: 'autocomplete',
+      key: 'workAreaId',
+      value: null,
+      placeholder: '请选择工作城市 *',
+      outlined: true,
+      itemText: 'label',
+      col: 6,
+      itemValue: 'value',
+      flexStyle: 'mr-3',
+      rules: [v => !!v || '请选择工作城市'],
+      items: []
+    }
+  ]
+})
 </script>
 
 <style scoped lang="scss">
-
+.jobTypeCardBox {
+  position: absolute;
+  top: 42px;
+  left: 0;
+}
 </style>

+ 4 - 4
src/views/resume/components/selfEvaluation.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="resume-box">
     <div class="resume-header">
-      <div class="resume-title">个人优势</div>
-      <v-btn v-if="!isEdit" variant="text" color="primary" prepend-icon="mdi-square-edit-outline" @click="isEdit = true">编辑</v-btn>
+      <div class="resume-title">{{ $t('resume.personalAdvantages') }}</div>
+      <v-btn v-if="!isEdit" variant="text" color="primary" prepend-icon="mdi-square-edit-outline" @click="isEdit = true">{{ $t('common.edit') }}</v-btn>
     </div>
     <div v-if="isEdit" class="mt-5">
       <v-textarea 
@@ -16,8 +16,8 @@
         :rules="advantageRules"
       ></v-textarea>
       <div class="text-end">
-        <v-btn class="half-button mr-3" variant="tonal" @click="isEdit = false">取消</v-btn>
-        <v-btn color="primary" class="half-button" @click="handleSave">保存</v-btn>
+        <v-btn class="half-button mr-3" variant="tonal" @click="isEdit = false">{{ $t('common.cancel') }}</v-btn>
+        <v-btn color="primary" class="half-button" @click="handleSave">{{ $t('common.save') }}</v-btn>
       </div>
     </div>
     <div v-else class="content-list mt-5">