|
@@ -5,6 +5,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
|
+import { getDict } from '@/hooks/web/useDictionaries'
|
|
defineOptions({ name: 'shareJob-baseInfoCompleteForm'})
|
|
defineOptions({ name: 'shareJob-baseInfoCompleteForm'})
|
|
import { reactive, ref, defineExpose } from 'vue'
|
|
import { reactive, ref, defineExpose } from 'vue'
|
|
|
|
|
|
@@ -16,7 +17,7 @@ const items = ref({
|
|
{
|
|
{
|
|
type: 'text',
|
|
type: 'text',
|
|
key: 'name',
|
|
key: 'name',
|
|
- value: '姓名',
|
|
|
|
|
|
+ value: '',
|
|
default: null,
|
|
default: null,
|
|
label: '姓名 *',
|
|
label: '姓名 *',
|
|
outlined: true,
|
|
outlined: true,
|
|
@@ -25,7 +26,7 @@ const items = ref({
|
|
{
|
|
{
|
|
type: 'text',
|
|
type: 'text',
|
|
key: 'phone',
|
|
key: 'phone',
|
|
- value: '1840000003',
|
|
|
|
|
|
+ value: '',
|
|
clearable: true,
|
|
clearable: true,
|
|
label: '联系手机号 *',
|
|
label: '联系手机号 *',
|
|
rules: [v => !!v || '请填写联系手机号']
|
|
rules: [v => !!v || '请填写联系手机号']
|
|
@@ -33,7 +34,7 @@ const items = ref({
|
|
{
|
|
{
|
|
type: 'autocomplete',
|
|
type: 'autocomplete',
|
|
key: 'jobStatus',
|
|
key: 'jobStatus',
|
|
- value: '0',
|
|
|
|
|
|
+ value: '',
|
|
default: null,
|
|
default: null,
|
|
label: '求职状态 *',
|
|
label: '求职状态 *',
|
|
outlined: true,
|
|
outlined: true,
|
|
@@ -46,7 +47,7 @@ const items = ref({
|
|
{
|
|
{
|
|
type: 'autocomplete',
|
|
type: 'autocomplete',
|
|
key: 'expType',
|
|
key: 'expType',
|
|
- value: '0',
|
|
|
|
|
|
+ value: '',
|
|
default: null,
|
|
default: null,
|
|
label: '工作经验 *',
|
|
label: '工作经验 *',
|
|
outlined: true,
|
|
outlined: true,
|
|
@@ -59,7 +60,7 @@ const items = ref({
|
|
{
|
|
{
|
|
type: 'autocomplete',
|
|
type: 'autocomplete',
|
|
key: 'eduType',
|
|
key: 'eduType',
|
|
- value: '0',
|
|
|
|
|
|
+ value: '',
|
|
default: null,
|
|
default: null,
|
|
label: '最高学历 *',
|
|
label: '最高学历 *',
|
|
outlined: true,
|
|
outlined: true,
|
|
@@ -72,6 +73,26 @@ const items = ref({
|
|
]
|
|
]
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+// 获取字典内容
|
|
|
|
+const getDictData = async (dictTypeName) => {
|
|
|
|
+ const item = items.value.options.find(e => e.dictTypeName === dictTypeName)
|
|
|
|
+ if (item) {
|
|
|
|
+ const { data } = await getDict(dictTypeName)
|
|
|
|
+ item.items = data
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+items.value.options.forEach((e) => {
|
|
|
|
+ if (e.dictTypeName) getDictData(e.dictTypeName) // 查字典set options
|
|
|
|
+ // formItems回显
|
|
|
|
+ // const infoExist = baseInfo.value && Object.keys(baseInfo.value).length
|
|
|
|
+ // if (infoExist && baseInfo.value[e.key]) e.value = baseInfo.value[e.key]
|
|
|
|
+ // // 日期相关
|
|
|
|
+ // if (e.type === 'datepicker') e.value = timesTampChange(e.value).slice(0, 10)
|
|
|
|
+ // // 所在城市回显
|
|
|
|
+ // if (infoExist && e.nameKey) e[e.nameKey] = baseInfo.value[e.nameKey]
|
|
|
|
+})
|
|
|
|
+
|
|
const getQuery = async () => {
|
|
const getQuery = async () => {
|
|
const { valid } = await formPageRef.value.formRef.validate()
|
|
const { valid } = await formPageRef.value.formRef.validate()
|
|
if (!valid) return
|
|
if (!valid) return
|