|
@@ -11,8 +11,8 @@
|
|
|
bordered
|
|
|
offset-x="-25"
|
|
|
offset-y="33"
|
|
|
- :color="baseInfo?.sex ? (baseInfo?.sex === '0' ? '#1867c0' : 'error') : 'error'"
|
|
|
- :icon="baseInfo?.sex ? (baseInfo?.sex === '0' ? 'mdi-gender-male' : 'mdi-gender-female') : 'mdi-gender-female'">
|
|
|
+ :color="baseInfo?.sex ? (baseInfo?.sex === '1' ? '#1867c0' : 'error') : 'error'"
|
|
|
+ :icon="baseInfo?.sex ? (baseInfo?.sex === '1' ? 'mdi-gender-male' : 'mdi-gender-female') : 'mdi-gender-female'">
|
|
|
<v-avatar size=80 :image="baseInfo.avatar || 'https://minio.citupro.com/dev/menduner/7.png'"></v-avatar>
|
|
|
<div v-show="showIcon" class="mdi mdi-camera-outline"></div>
|
|
|
</v-badge>
|
|
@@ -23,7 +23,20 @@
|
|
|
<div v-if="isEdit">
|
|
|
<CtForm ref="CtFormRef" :items="formItems" style="width: 100%;">
|
|
|
<template v-slot:phone>
|
|
|
- <v-btn variant="text" class="ml-2" color="primary">更改</v-btn>
|
|
|
+ <v-btn variant="text" class="ml-2" color="primary">{{ $t('common.change') }}</v-btn>
|
|
|
+ </template>
|
|
|
+ <template #areaType="{ item }">
|
|
|
+ <v-menu :close-delay="1" :open-delay="0" v-bind="$attrs">
|
|
|
+ <template v-slot:activator="{ props }">
|
|
|
+ <textUI
|
|
|
+ v-model="item[item.nameKey]"
|
|
|
+ :item="item"
|
|
|
+ v-bind="props"
|
|
|
+ style="position: relative;"
|
|
|
+ ></textUI>
|
|
|
+ </template>
|
|
|
+ <areaType :isIntType="false" :select="[baseInfo?.areaId].filter(Boolean)" @handleAreaClick="handleArea" class="jobTypeCardBox" isSingle></areaType>
|
|
|
+ </v-menu>
|
|
|
</template>
|
|
|
</CtForm>
|
|
|
<div class="text-end">
|
|
@@ -38,7 +51,7 @@
|
|
|
<div class="listBox" :style="{ height: isExpand ? 'auto' : '68px' }">
|
|
|
<div>
|
|
|
<span class="mdi mdi-map-marker-outline"></span>
|
|
|
- <span>{{ baseInfo.areaText }}</span>
|
|
|
+ <span>{{ baseInfo.areaName || '暂无' }}</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
<span class="mdi mdi-phone-outline"></span>
|
|
@@ -95,6 +108,8 @@
|
|
|
<script setup>
|
|
|
import CtForm from '@/components/CtForm'
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
+import areaType from '@/components/AreaSelect'
|
|
|
+import textUI from '@/components/FormUI/TextInput'
|
|
|
import { getDict } from '@/hooks/web/useDictionaries'
|
|
|
import { getTimeStamp, timesTampChange } from '@/utils/date'
|
|
|
import { saveResumeBasicInfo } from '@/api/resume'
|
|
@@ -130,7 +145,7 @@ const formItems = ref({
|
|
|
{
|
|
|
type: 'ifRadio',
|
|
|
key: 'sex',
|
|
|
- value: 0,
|
|
|
+ value: '0', // '1' ? '男' : '女'
|
|
|
default: 0,
|
|
|
label: '性别',
|
|
|
col: 6,
|
|
@@ -164,17 +179,25 @@ const formItems = ref({
|
|
|
slotName: 'phone',
|
|
|
},
|
|
|
{
|
|
|
- type: 'autocomplete',
|
|
|
+ // type: 'autocomplete',
|
|
|
+ // key: 'areaId',
|
|
|
+ // value: null,
|
|
|
+ // default: null,
|
|
|
+ // label: '所在城市 *',
|
|
|
+ // col: 6,
|
|
|
+ // outlined: true,
|
|
|
+ // itemText: 'label',
|
|
|
+ // itemValue: 'value',
|
|
|
+ // rules: [v => !!v || '请选择所在城市'],
|
|
|
+ // items: [{ label: '广州', value: '440100'}]
|
|
|
+ slotName: 'areaType',
|
|
|
key: 'areaId',
|
|
|
value: null,
|
|
|
- default: null,
|
|
|
label: '所在城市 *',
|
|
|
+ nameKey: 'areaName', // 展示出来id对应的内容
|
|
|
col: 6,
|
|
|
- outlined: true,
|
|
|
- itemText: 'label',
|
|
|
- itemValue: 'value',
|
|
|
- rules: [v => !!v || '请选择所在城市'],
|
|
|
- items: [{ label: '广州', value: '440100'}]
|
|
|
+ flexStyle: 'mr-3',
|
|
|
+ rules: [v => !!v || '请选择所在城市']
|
|
|
},
|
|
|
{
|
|
|
type: 'text',
|
|
@@ -287,8 +310,8 @@ const handleSave = async () => {
|
|
|
if (!valid) return
|
|
|
const obj = {}
|
|
|
formItems.value.options.forEach(e => {
|
|
|
- if (e.noReturn) return
|
|
|
- else if (e.type === 'datepicker') obj[e.key] = getTimeStamp(e.value)
|
|
|
+ // if (e.nameKey) obj[e.nameKey] = e.nameKey
|
|
|
+ if (e.type === 'datepicker') obj[e.key] = getTimeStamp(e.value)
|
|
|
else obj[e.key] = e.value
|
|
|
})
|
|
|
await saveResumeBasicInfo(obj)
|
|
@@ -299,6 +322,20 @@ const handleSave = async () => {
|
|
|
await getBasicInfo()
|
|
|
}
|
|
|
|
|
|
+// 城市
|
|
|
+const setValue = (key, id, name) => {
|
|
|
+ const item = formItems.value.options.find(e => e.key === key)
|
|
|
+ if (item) {
|
|
|
+ item.value = id
|
|
|
+ item[item.nameKey] = name
|
|
|
+ }
|
|
|
+}
|
|
|
+const handleArea = (list, name) => {
|
|
|
+ if (!list.length) return
|
|
|
+ const id = list[0]
|
|
|
+ setValue('areaId', id, name)
|
|
|
+}
|
|
|
+
|
|
|
// 获取字典内容
|
|
|
const getDictData = async (dictTypeName) => {
|
|
|
const item = formItems.value.options.find(e => e.dictTypeName === dictTypeName)
|
|
@@ -307,7 +344,6 @@ const getDictData = async (dictTypeName) => {
|
|
|
item.items = data
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
formItems.value.options.forEach((e, index) => {
|
|
|
if ((index + 2) % 2 === 0) e.flexStyle = 'mr-3'
|
|
|
if (e.dictTypeName) getDictData(e.dictTypeName) // 查字典set options
|
|
@@ -318,7 +354,11 @@ formItems.value.options.forEach((e, index) => {
|
|
|
})
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
+.jobTypeCardBox {
|
|
|
+ position: absolute;
|
|
|
+ top: -22px;
|
|
|
+ left: 0;
|
|
|
+}
|
|
|
.avatarsBox {
|
|
|
height: 80px;
|
|
|
width: 80px;
|