Explorar el Código

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

lifanagju_citu hace 1 año
padre
commit
554294dc8c

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

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

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

@@ -17,34 +17,35 @@
       :required="item.required"
       :required="item.required"
       :class="item.class"
       :class="item.class"
       :suffix="item.suffix"
       :suffix="item.suffix"
-      :append-icon="item.appendIcon"
+      :append-inner-icon="item.appendInnerIcon"
       :clearable="item.clearable"
       :clearable="item.clearable"
       :readonly="item.readonly"
       :readonly="item.readonly"
       :prepend-inner-icon="item.prependInnerIcon"
       :prepend-inner-icon="item.prependInnerIcon"
       hide-spin-buttons
       hide-spin-buttons
+      :hide-details="item.hideDetails || false"
       @wheel="$event => handleWheel($event, item)"
       @wheel="$event => handleWheel($event, item)"
       @update:modelValue="modelValueUpDate"
       @update:modelValue="modelValueUpDate"
-      @click:control="handleBlur"
     ></v-text-field>
     ></v-text-field>
   </div>
   </div>
 </template>
 </template>
 <script setup>
 <script setup>
-import { defineEmits, ref } from 'vue';
+import { defineEmits, ref, watch } from 'vue';
 defineOptions({ name:'FormUI-v-text-field'})
 defineOptions({ name:'FormUI-v-text-field'})
 
 
 const props = defineProps({item: Object, modelValue: [String, Number]})
 const props = defineProps({item: Object, modelValue: [String, Number]})
-const emit = defineEmits(['update:modelValue', 'change', 'blur'])
+const emit = defineEmits(['update:modelValue', 'change'])
 const item = props.item
 const item = props.item
 const value = ref(props.modelValue)
 const value = ref(props.modelValue)
+
+watch(() => props.modelValue, (newVal) => {
+  value.value = newVal
+})
 const modelValueUpDate = (val) => {
 const modelValueUpDate = (val) => {
   value.value = val
   value.value = val
   emit('update:modelValue', value.value)
   emit('update:modelValue', value.value)
   emit('change', value.value)
   emit('change', value.value)
 }
 }
 
 
-const handleBlur = () => {
-  emit('blur')
-}
 const handleWheel = (event, item) => {
 const handleWheel = (event, item) => {
   if (item.type !== 'number') return
   if (item.type !== 'number') return
   event.preventDefault()
   event.preventDefault()

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

@@ -25,13 +25,12 @@
 import { getDict } from '@/hooks/web/useDictionaries'
 import { getDict } from '@/hooks/web/useDictionaries'
 import { reactive, ref } from 'vue';
 import { reactive, ref } from 'vue';
 defineOptions({ name:'common-components-industryTypeCard'})
 defineOptions({ name:'common-components-industryTypeCard'})
-const emits = defineEmits('inputChange')
+const emits = defineEmits(['inputChange'])
 
 
 let items = ref()
 let items = ref()
 getDict('industryTreeData', null, 'industryTreeData').then(({ data }) => {
 getDict('industryTreeData', null, 'industryTreeData').then(({ data }) => {
   data = data?.length && data || []
   data = data?.length && data || []
   items.value = data
   items.value = data
-  console.log('industryTreeData', data)
 })
 })
 
 
 // 设置选中ids
 // 设置选中ids

+ 5 - 0
src/components/jobTypeCard/index.vue

@@ -73,11 +73,16 @@ const props = defineProps({
     type: Boolean,
     type: Boolean,
     default: false
     default: false
   },
   },
+  isCustomer: {
+    type: Boolean,
+    default: false
+  }
 })
 })
 const isPage = props.page
 const isPage = props.page
 
 
 // 职位点击
 // 职位点击
 const handleJobClick = async (val) => {
 const handleJobClick = async (val) => {
+  if (props.isCustomer) return emits('handleJobClick', val)
   const path = '/recruit/position'
   const path = '/recruit/position'
   if (path === route.path) emits('jobClick', val)
   if (path === route.path) emits('jobClick', val)
   else router.push({ path, query: { ...val, jumpType: 1 } })
   else router.push({ path, query: { ...val, jumpType: 1 } })

+ 2 - 1
src/locales/en.js

@@ -3,7 +3,8 @@ export default {
     confirmTitle: 'System Hint',
     confirmTitle: 'System Hint',
     edit: 'Edit',
     edit: 'Edit',
     cancel: 'Cancel',
     cancel: 'Cancel',
-    save: 'Save'
+    save: 'Save',
+    add: 'Add'
   },
   },
   sys: {
   sys: {
     api: {
     api: {

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

@@ -3,7 +3,8 @@ export default {
     confirmTitle: '系统提示',
     confirmTitle: '系统提示',
     edit: '编辑',
     edit: '编辑',
     cancel: '取消',
     cancel: '取消',
-    save: '保存'
+    save: '保存',
+    add: '新增'
   },
   },
   sys: {
   sys: {
     api: {
     api: {

+ 1 - 1
src/styles/index.css

@@ -56,7 +56,7 @@
 
 
 .resume-box {
 .resume-box {
   border-radius: 5px;
   border-radius: 5px;
-  padding: 12px;
+  padding: 20px 30px;
   background-color: #fff;
   background-color: #fff;
 }
 }
 
 

+ 1 - 1
src/styles/index.min.css

@@ -1 +1 @@
-:root{--zIndex-dialog:9999;--default-bgc:#f2f4f7;--v-primary-base:#00897B;--v-error-base:#fe574a;--v-primary-lighten1:#26A69A;--v-primary-lighten2:#4DB6AC;--v-primary-lighten3:#80CBC4;--v-primary-lighten4:#B2DFDB;--default-text:#666}.buttons{height:36px;width:224px}.half-button{height:36px;width:88px}.default-width{width:1184px;min-width:1184px;max-width:1184px;margin:0 auto}.default-active{color:var(--v-primary-base) !important}.border-bottom-dashed{border-bottom:1px dashed #ccc}.white-bgc{background-color:#fff}.ellipsis{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.vline{display:inline-block;width:1px;height:10px;vertical-align:middle;background-color:#e0e0e0;margin:0 10px}.resume-box{border-radius:5px;padding:12px;background-color:#fff}.resume-header{display:flex;justify-content:space-between;align-items:center}.resume-title{font-weight:700;font-size:18px;border-left:5px solid #00897B;padding-left:12px;line-height:17px}
+:root{--zIndex-dialog:9999;--default-bgc:#f2f4f7;--v-primary-base:#00897B;--v-error-base:#fe574a;--v-primary-lighten1:#26A69A;--v-primary-lighten2:#4DB6AC;--v-primary-lighten3:#80CBC4;--v-primary-lighten4:#B2DFDB;--default-text:#666}.buttons{height:36px;width:224px}.half-button{height:36px;width:88px}.default-width{width:1184px;min-width:1184px;max-width:1184px;margin:0 auto}.default-active{color:var(--v-primary-base) !important}.border-bottom-dashed{border-bottom:1px dashed #ccc}.white-bgc{background-color:#fff}.ellipsis{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.vline{display:inline-block;width:1px;height:10px;vertical-align:middle;background-color:#e0e0e0;margin:0 10px}.resume-box{border-radius:5px;padding:20px 30px;background-color:#fff}.resume-header{display:flex;justify-content:space-between;align-items:center}.resume-title{font-weight:700;font-size:18px;border-left:5px solid #00897B;padding-left:12px;line-height:17px}

+ 1 - 1
src/styles/index.scss

@@ -55,7 +55,7 @@
 // 个人简历
 // 个人简历
 .resume-box {
 .resume-box {
   border-radius: 5px;
   border-radius: 5px;
-  padding: 12px;
+  padding: 20px 30px;
   background-color: #fff;
   background-color: #fff;
 }
 }
 .resume-header {
 .resume-header {

+ 64 - 35
src/views/resume/components/jobIntention.vue

@@ -2,19 +2,38 @@
   <div class="resume-box">
   <div class="resume-box">
     <div class="resume-header mb-3">
     <div class="resume-header mb-3">
       <div class="resume-title">{{ $t('resume.jobIntention') }}</div>
       <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>
+      <v-btn v-if="!isEdit" variant="text" color="primary" prepend-icon="mdi-plus-box" @click="isEdit = true">{{ $t('common.add') }}</v-btn>
     </div>
     </div>
     <div></div>
     <div></div>
     <div v-if="isEdit">
     <div v-if="isEdit">
       <CtForm :items="items" style="width: 100%;">
       <CtForm :items="items" style="width: 100%;">
         <template #positionId="{ item }">
         <template #positionId="{ item }">
-          <textUI
-            v-model="item.value"
-            :item="item"
-            @blur="item.blur"
-            style="position: relative;"
-          ></textUI>
-          <jobTypeCard class="jobTypeCardBox" v-if="drawer"></jobTypeCard>
+          <v-menu :close-delay="1" :open-delay="0" v-bind="$attrs">
+            <template v-slot:activator="{  props }">
+              <textUI
+              :modelValue="item.value"
+                :item="item"
+                @blur="item.blur"
+                v-bind="props"
+                style="position: relative;"
+              ></textUI>
+            </template>
+            <jobTypeCard class="jobTypeCardBox" :isCustomer="true" @handleJobClick="handleJobClickItem"></jobTypeCard>
+          </v-menu>
+        </template>
+        <template #industryIdList="{ item }">
+          <v-menu :close-delay="1" :open-delay="0" v-bind="$attrs" :close-on-content-click="false">
+            <template v-slot:activator="{  props }">
+              <textUI
+                v-model="item.value"
+                :item="item"
+                @blur="item.blur"
+                v-bind="props"
+                style="position: relative;"
+              ></textUI>
+            </template>
+            <industryTypeCard @inputChange="handleIndustry"></industryTypeCard>
+          </v-menu>
         </template>
         </template>
       </CtForm>
       </CtForm>
     </div>
     </div>
@@ -23,50 +42,34 @@
 
 
 <script setup name="jobIntention">
 <script setup name="jobIntention">
 import { ref } from 'vue'
 import { ref } from 'vue'
-// import { useSharedState } from '@/store/sharedState'
 import CtForm from '@/components/CtForm'
 import CtForm from '@/components/CtForm'
 import textUI from '@/components/FormUI/TextInput'
 import textUI from '@/components/FormUI/TextInput'
 import jobTypeCard from '@/components/jobTypeCard'
 import jobTypeCard from '@/components/jobTypeCard'
+import industryTypeCard from '@/components/industryTypeCard'
 
 
 const isEdit = ref(true)
 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({
 const items = ref({
   options: [
   options: [
     {
     {
       slotName: 'positionId',
       slotName: 'positionId',
       key: 'positionId',
       key: 'positionId',
-      value: null,
+      value: '',
       col: 6,
       col: 6,
-      placeholder: '期望岗位 *',
+      label: '期望岗位 *',
       flexStyle: 'mr-3',
       flexStyle: 'mr-3',
+      hideDetails: true,
       outlined: true,
       outlined: true,
-      rules: [v => !!v || '请输入期望岗位'],
-      blur: handleBlur
+      rules: [v => !!v || '请选择期望岗位']
     },
     },
     {
     {
-      type: 'autocomplete',
-      key: 'jobType',
-      value: null,
-      placeholder: '请选择求职类型 *',
+      slotName: 'industryIdList',
+      key: 'industryIdList',
+      value: '不限',
       outlined: true,
       outlined: true,
-      itemText: 'label',
+      label: '期望行业 *',
       col: 6,
       col: 6,
-      itemValue: 'value',
-      rules: [v => !!v || '请选择求职类型'],
-      items: [
-        { label: '全职', value: 0 },
-        { label: '兼职', value: 1 },
-        { label: '临时', value: 2 },
-        { label: '实习', value: 3 }
-      ]
+      rules: [v => !!v || '请选择期望行业']
     },
     },
     {
     {
       type: 'number',
       type: 'number',
@@ -99,15 +102,41 @@ const items = ref({
       flexStyle: 'mr-3',
       flexStyle: 'mr-3',
       rules: [v => !!v || '请选择工作城市'],
       rules: [v => !!v || '请选择工作城市'],
       items: []
       items: []
+    },
+    {
+      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 }
+      ]
     }
     }
   ]
   ]
 })
 })
+
+// 期望职位
+const handleJobClickItem = (val) => {
+  items.value.options.find(e => e.key === 'positionId').value = val.nameCn
+}
+
+const handleIndustry = (list) => {
+  console.log(list, 'industry')
+}
 </script>
 </script>
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">
 .jobTypeCardBox {
 .jobTypeCardBox {
   position: absolute;
   position: absolute;
-  top: 42px;
+  top: 0;
   left: 0;
   left: 0;
 }
 }
 </style>
 </style>

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

@@ -29,7 +29,7 @@
 <script setup>
 <script setup>
 defineOptions({ name: 'selfEvaluation'})
 defineOptions({ name: 'selfEvaluation'})
 import { ref } from 'vue'
 import { ref } from 'vue'
-// import { saveResumeAdvantage } from '@/api/resume'
+import { saveResumeAdvantage } from '@/api/resume'
 import Snackbar from '@/plugins/snackbar'
 import Snackbar from '@/plugins/snackbar'
 
 
 const isEdit = ref(false)
 const isEdit = ref(false)
@@ -47,9 +47,9 @@ const advantageRules = ref([
 
 
 const handleSave = async () => {
 const handleSave = async () => {
   if (!advantage.value) return Snackbar.warning('请先输入个人优势!')
   if (!advantage.value) return Snackbar.warning('请先输入个人优势!')
-  // await saveResumeAdvantage({ content: advantage.value })
+  await saveResumeAdvantage({ content: advantage.value })
   isEdit.value = false
   isEdit.value = false
-  // Snackbar.success('编辑成功')
+  Snackbar.success('编辑成功')
 }
 }
 </script>
 </script>