|
@@ -117,8 +117,6 @@
|
|
<script setup>
|
|
<script setup>
|
|
import CtForm from '@/components/CtForm'
|
|
import CtForm from '@/components/CtForm'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
-// import areaType from '@/components/AreaSelect'
|
|
|
|
-// import textUI from '@/components/FormUI/TextInput'
|
|
|
|
import { getDict } from '@/hooks/web/useDictionaries'
|
|
import { getDict } from '@/hooks/web/useDictionaries'
|
|
import { cityToProvince } from '@/utils/areaDeal'
|
|
import { cityToProvince } from '@/utils/areaDeal'
|
|
import { getTimeStamp, timesTampChange } from '@/utils/date'
|
|
import { getTimeStamp, timesTampChange } from '@/utils/date'
|
|
@@ -137,7 +135,9 @@ const isExpand = ref(false)
|
|
const welfareList = ref(['响应', '改变', '诚信', '进取精神', '信任', '卓越'])
|
|
const welfareList = ref(['响应', '改变', '诚信', '进取精神', '信任', '卓越'])
|
|
let baseInfo = ref({})
|
|
let baseInfo = ref({})
|
|
const getBasicInfo = () => { // 获取基础信息
|
|
const getBasicInfo = () => { // 获取基础信息
|
|
- baseInfo.value = JSON.parse(localStorage.getItem('baseInfo')) || {} // 人才信息
|
|
|
|
|
|
+ const key = localStorage.getItem('baseInfo')
|
|
|
|
+ if (!key) return
|
|
|
|
+ baseInfo.value = JSON.parse(key) // 人才信息
|
|
}
|
|
}
|
|
getBasicInfo()
|
|
getBasicInfo()
|
|
|
|
|
|
@@ -364,24 +364,11 @@ const handleSave = async () => {
|
|
Snackbar.success(t('common.saveMsg'))
|
|
Snackbar.success(t('common.saveMsg'))
|
|
isEdit.value = false
|
|
isEdit.value = false
|
|
// 获取当前登录账户信息
|
|
// 获取当前登录账户信息
|
|
- if (baseInfo.value.userId) await userStore.getUserBaseInfos(baseInfo.value.userId)
|
|
|
|
- await getBasicInfo()
|
|
|
|
|
|
+ // if (baseInfo.value.userId) await userStore.getUserBaseInfos(baseInfo.value.userId)
|
|
|
|
+ await userStore.getUserBaseInfos(baseInfo.value.userId || null)
|
|
|
|
+ getBasicInfo()
|
|
}
|
|
}
|
|
|
|
|
|
-// 城市
|
|
|
|
-// const setValue = (key, id, name) => {
|
|
|
|
-// const item = items.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 getDictData = async (dictTypeName) => {
|
|
const item = items.value.options.find(e => e.dictTypeName === dictTypeName)
|
|
const item = items.value.options.find(e => e.dictTypeName === dictTypeName)
|
|
@@ -399,7 +386,6 @@ const deal = async () => {
|
|
const city = items.value.options.find(pv => pv.key === 'areaId')
|
|
const city = items.value.options.find(pv => pv.key === 'areaId')
|
|
if (city) city.items = dealReturnObj.cityList || []
|
|
if (city) city.items = dealReturnObj.cityList || []
|
|
province.value = dealReturnObj.pid || ''
|
|
province.value = dealReturnObj.pid || ''
|
|
- console.log(dealReturnObj, 'dealReturnObj', province)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|