|
@@ -152,21 +152,46 @@ const items = ref({
|
|
// flexStyle: 'mr-3',
|
|
// flexStyle: 'mr-3',
|
|
// rules: [v => !!v || '请选择工作城市']
|
|
// rules: [v => !!v || '请选择工作城市']
|
|
// },
|
|
// },
|
|
|
|
+ // {
|
|
|
|
+ // type: 'nestedListGroup',
|
|
|
|
+ // key: 'workAreaId',
|
|
|
|
+ // value: null,
|
|
|
|
+ // label: '工作城市 *',
|
|
|
|
+ // itemText: 'name',
|
|
|
|
+ // itemValue: 'id',
|
|
|
|
+ // col: 6,
|
|
|
|
+ // flexStyle: 'mr-3',
|
|
|
|
+ // selectLevel: 2,
|
|
|
|
+ // items: [],
|
|
|
|
+ // rules: [v => !!v || '请选择工作城市'],
|
|
|
|
+ // },
|
|
{
|
|
{
|
|
- // slotName: 'workAreaId',
|
|
|
|
- // type: 'citySelect',
|
|
|
|
- type: 'nestedListGroup',
|
|
|
|
- key: 'workAreaId',
|
|
|
|
|
|
+ type: 'autocomplete',
|
|
|
|
+ key: 'workAreaProvinceId',
|
|
value: null,
|
|
value: null,
|
|
- label: '工作城市 *',
|
|
|
|
|
|
+ label: '工作城市:省 *',
|
|
|
|
+ outlined: true,
|
|
itemText: 'name',
|
|
itemText: 'name',
|
|
itemValue: 'id',
|
|
itemValue: 'id',
|
|
|
|
+ returnSelect: true,
|
|
col: 6,
|
|
col: 6,
|
|
flexStyle: 'mr-3',
|
|
flexStyle: 'mr-3',
|
|
- selectLevel: 2,
|
|
|
|
|
|
+ rules: [v => !!v || '请选择工作城市:省'],
|
|
items: [],
|
|
items: [],
|
|
- rules: [v => !!v || '请选择工作城市'],
|
|
|
|
- // valueKey: 'workArea',
|
|
|
|
|
|
+ change: null
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: 'autocomplete',
|
|
|
|
+ key: 'workAreaId',
|
|
|
|
+ value: null,
|
|
|
|
+ label: '工作城市:市 *',
|
|
|
|
+ outlined: true,
|
|
|
|
+ itemText: 'name',
|
|
|
|
+ itemValue: 'id',
|
|
|
|
+ col: 6,
|
|
|
|
+ flexStyle: 'mr-3',
|
|
|
|
+ rules: [v => !!v || '请选择工作城市:市'],
|
|
|
|
+ items: []
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 'autocomplete',
|
|
type: 'autocomplete',
|
|
@@ -175,7 +200,7 @@ const items = ref({
|
|
label: '求职类型 *',
|
|
label: '求职类型 *',
|
|
outlined: true,
|
|
outlined: true,
|
|
itemText: 'label',
|
|
itemText: 'label',
|
|
- col: 6,
|
|
|
|
|
|
+ col: 12,
|
|
itemValue: 'value',
|
|
itemValue: 'value',
|
|
rules: [v => !!v || '请选择求职类型'],
|
|
rules: [v => !!v || '请选择求职类型'],
|
|
items: [
|
|
items: [
|
|
@@ -187,7 +212,13 @@ const items = ref({
|
|
}
|
|
}
|
|
]
|
|
]
|
|
})
|
|
})
|
|
|
|
+// items.value.options.forEach((e, index) => { if (index%2 === 0 && !e.flexStyle) { e.flexStyle = 'mr-3' } }) //
|
|
|
|
|
|
|
|
+const provinceChange = (value, val, obj) => {
|
|
|
|
+ const item = items.value.options.find(e => e.key === 'workAreaId')
|
|
|
|
+ if (item?.items && obj?.children?.length) item.items = obj.children
|
|
|
|
+ else item.items = []
|
|
|
|
+}
|
|
getDict('areaTreeData', null, 'areaTreeData').then(({ data }) => {
|
|
getDict('areaTreeData', null, 'areaTreeData').then(({ data }) => {
|
|
data = data?.length && data || []
|
|
data = data?.length && data || []
|
|
if (!data?.length) return console.error('areaTreeData获取失败!')
|
|
if (!data?.length) return console.error('areaTreeData获取失败!')
|
|
@@ -196,8 +227,11 @@ getDict('areaTreeData', null, 'areaTreeData').then(({ data }) => {
|
|
const chinaTreeData = china?.children?.length ? china.children : []
|
|
const chinaTreeData = china?.children?.length ? china.children : []
|
|
//
|
|
//
|
|
if (!chinaTreeData?.length) return console.error('chinaTreeData获取失败!')
|
|
if (!chinaTreeData?.length) return console.error('chinaTreeData获取失败!')
|
|
- const item = items.value.options.find(e => e.key === 'workAreaId')
|
|
|
|
- if (item?.items) item.items = chinaTreeData
|
|
|
|
|
|
+ const item = items.value.options.find(e => e.key === 'workAreaProvinceId')
|
|
|
|
+ if (item?.items) {
|
|
|
|
+ item.items = chinaTreeData
|
|
|
|
+ item.change = provinceChange
|
|
|
|
+ }
|
|
})
|
|
})
|
|
getDict()
|
|
getDict()
|
|
|
|
|