mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-07-12 16:01:38 +08:00
Merge remote-tracking branch 'origin/feature/ui' into feature/ui
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": "0.13.3",
|
||||
"buildVersion": 29,
|
||||
"buildTime": 1768226645980,
|
||||
"buildHash": "ca37e258c69f54492488f285a1ec1f385baee478",
|
||||
"version": "0.14.1",
|
||||
"buildVersion": 31,
|
||||
"buildTime": 1769428838471,
|
||||
"buildHash": "a92b9ce0403a8fc816568cf3eb106a89a6afddf0",
|
||||
"name": "geekgeekrun-ui"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,40 @@
|
||||
<template>
|
||||
<div class="job-combo-filter">
|
||||
<div class="filter-item">
|
||||
<div font-size-12px>城市</div>
|
||||
<div
|
||||
style="
|
||||
align-items: center;
|
||||
background-color: var(--el-input-bg-color, var(--el-fill-color-blank));
|
||||
background-image: none;
|
||||
border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
|
||||
box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
|
||||
"
|
||||
pl4px
|
||||
pr4px
|
||||
flex
|
||||
justify-between
|
||||
items-center
|
||||
>
|
||||
<city-chooser
|
||||
v-model="modelValue.cityList"
|
||||
gt-show-scene="any-combine-boss-recommend-filter"
|
||||
>
|
||||
<template #default="{ showDialog }">
|
||||
<div flex justify-between items-center>
|
||||
<div font-size-12px>
|
||||
<template v-if="modelValue.cityList?.length"
|
||||
>已选择<span ml3px mr3px>{{ modelValue.cityList?.length }}</span
|
||||
>个城市</template
|
||||
>
|
||||
<template v-else><i color-gray>未选择城市</i></template>
|
||||
</div>
|
||||
<el-button size="small" @click="showDialog" pl4px pr4px>选择</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</city-chooser>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter-item">
|
||||
<div font-size-12px>薪资待遇</div>
|
||||
<el-select
|
||||
@@ -10,7 +45,7 @@
|
||||
collapse-tags-tooltip
|
||||
>
|
||||
<el-option
|
||||
v-for="it in conditions.salaryList.filter(it => it.code !== 0)"
|
||||
v-for="it in conditions.salaryList.filter((it) => it.code !== 0)"
|
||||
:key="it.code"
|
||||
:value="it.code"
|
||||
:label="it.name"
|
||||
@@ -27,7 +62,7 @@
|
||||
collapse-tags-tooltip
|
||||
>
|
||||
<el-option
|
||||
v-for="it in conditions.experienceList.filter(it => it.code !== 0)"
|
||||
v-for="it in conditions.experienceList.filter((it) => it.code !== 0)"
|
||||
:key="it.code"
|
||||
:value="it.code"
|
||||
:label="it.name"
|
||||
@@ -44,7 +79,7 @@
|
||||
collapse-tags-tooltip
|
||||
>
|
||||
<el-option
|
||||
v-for="it in conditions.degreeList.filter(it => it.code !== 0)"
|
||||
v-for="it in conditions.degreeList.filter((it) => it.code !== 0)"
|
||||
:key="it.code"
|
||||
:value="it.code"
|
||||
:label="it.name"
|
||||
@@ -84,7 +119,7 @@
|
||||
collapse-tags-tooltip
|
||||
>
|
||||
<el-option
|
||||
v-for="it in conditions.scaleList.filter(it => it.code !== 0)"
|
||||
v-for="it in conditions.scaleList.filter((it) => it.code !== 0)"
|
||||
:key="it.code"
|
||||
:value="it.code"
|
||||
:label="it.name"
|
||||
@@ -97,6 +132,7 @@
|
||||
<script lang="ts" setup>
|
||||
import conditions from '@geekgeekrun/geek-auto-start-chat-with-boss/internal-config/job-filter-conditions-20241002.json'
|
||||
import industryFilterExemption from '@geekgeekrun/geek-auto-start-chat-with-boss/internal-config/job-filter-industry-filter-exemption-20241002.json'
|
||||
import CityChooser from '@renderer/page/MainLayout/GeekAutoStartChatWithBoss/components/CityChooser.vue'
|
||||
import { PropType } from 'vue'
|
||||
|
||||
defineProps({
|
||||
|
||||
@@ -71,6 +71,25 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :resizable="false" label="城市" prop="city">
|
||||
<template #default="{ row }">
|
||||
<city-chooser
|
||||
v-model="row.city"
|
||||
:multiple="false"
|
||||
gt-show-scene="static-combine-boss-recommend-filter"
|
||||
>
|
||||
<template #default="{ showDialog }">
|
||||
<div flex justify-between items-center>
|
||||
<div font-size-12px lh-1.2em>
|
||||
<template v-if="row.city">{{ row.city }}</template>
|
||||
<template v-else><i color-gray>未选择城市</i></template>
|
||||
</div>
|
||||
<el-button size="small" pl4px pr4px @click="showDialog">选择</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</city-chooser>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :resizable="false" label="薪资待遇" prop="salary">
|
||||
<template #default="{ row }">
|
||||
<el-select
|
||||
@@ -183,6 +202,7 @@ import conditions from '@geekgeekrun/geek-auto-start-chat-with-boss/internal-con
|
||||
import industryFilterExemption from '@geekgeekrun/geek-auto-start-chat-with-boss/internal-config/job-filter-industry-filter-exemption-20241002.json'
|
||||
import { ArrowUp, ArrowDown, Delete, Plus } from '@element-plus/icons-vue'
|
||||
import { computed, PropType } from 'vue'
|
||||
import CityChooser from '@renderer/page/MainLayout/GeekAutoStartChatWithBoss/components/CityChooser.vue'
|
||||
|
||||
import { getStaticCombineFilterKey } from '@geekgeekrun/geek-auto-start-chat-with-boss/combineCalculator.mjs'
|
||||
|
||||
|
||||
@@ -1,56 +1,26 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="modelValue?.length">
|
||||
<div>当前已选择城市:</div>
|
||||
<div flex flex-wrap gap-10px>
|
||||
<el-tag v-for="it in modelValue" :key="it">
|
||||
{{ it }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div>当前未选择任何期望城市,将不会按照城市进行筛选</div>
|
||||
</div>
|
||||
<div
|
||||
line-height-1
|
||||
:style="{
|
||||
marginTop: modelValue?.length ? '10px' : ''
|
||||
}"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="
|
||||
() => {
|
||||
isDialogVisible = true
|
||||
gtagRenderer('choose_city_entry_button_clicked')
|
||||
}
|
||||
"
|
||||
>选择城市</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="modelValue?.length"
|
||||
size="small"
|
||||
type="danger"
|
||||
@click="handleClearSelectedCitiesInModelValue"
|
||||
>清空已选择的所有城市</el-button
|
||||
>
|
||||
</div>
|
||||
<div w-full>
|
||||
<slot
|
||||
:model-value="modelValue"
|
||||
:show-dialog="() => (isDialogVisible = true)"
|
||||
:clear-value="handleClearSelectedCitiesInModelValue"
|
||||
></slot>
|
||||
<el-dialog
|
||||
v-model="isDialogVisible"
|
||||
width="1000px"
|
||||
title="请选择城市"
|
||||
:show-close="false"
|
||||
append-to-body
|
||||
@open="handleDialogOpen"
|
||||
@closed="handleDialogClosed"
|
||||
>
|
||||
<el-tabs v-model="activeTabName">
|
||||
<el-tab-pane
|
||||
:style="{ height: '300px', overflow: 'auto' }"
|
||||
:style="{ height: '260px', overflow: 'auto' }"
|
||||
label="热门城市"
|
||||
name="热门城市"
|
||||
>
|
||||
<el-checkbox-group v-model="selectedCities">
|
||||
<el-checkbox-group v-if="multiple" v-model="selectedCities">
|
||||
<div
|
||||
:style="{
|
||||
display: 'grid',
|
||||
@@ -66,6 +36,23 @@
|
||||
</el-checkbox>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
<el-radio-group v-else v-model="selectedCities" w-full>
|
||||
<div
|
||||
w-full
|
||||
:style="{
|
||||
display: 'grid',
|
||||
gridTemplateColumns: '1fr 1fr 1fr 1fr'
|
||||
}"
|
||||
>
|
||||
<el-radio
|
||||
v-for="op in hotCityList.filter((it) => it.code !== 100010000)"
|
||||
:key="op.code"
|
||||
:label="op.name"
|
||||
>
|
||||
{{ op.name }}
|
||||
</el-radio>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
v-for="it in cityGroupsByAlphabetMap.keys()"
|
||||
@@ -75,8 +62,8 @@
|
||||
:value="it"
|
||||
>
|
||||
<div v-for="group in cityGroupsByAlphabetMap.get(it)" :key="group.firstChar">
|
||||
{{ group.firstChar }}
|
||||
<el-checkbox-group v-model="selectedCities">
|
||||
<div pt4px pb4px>{{ group.firstChar }}</div>
|
||||
<el-checkbox-group v-if="multiple" v-model="selectedCities">
|
||||
<div
|
||||
:style="{
|
||||
display: 'grid',
|
||||
@@ -88,6 +75,19 @@
|
||||
</el-checkbox>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
<el-radio-group v-else v-model="selectedCities" w-full>
|
||||
<div
|
||||
w-full
|
||||
:style="{
|
||||
display: 'grid',
|
||||
gridTemplateColumns: '1fr 1fr 1fr 1fr'
|
||||
}"
|
||||
>
|
||||
<el-radio v-for="op in group.cityList" :key="op.code" :label="op.name">
|
||||
{{ op.name }}
|
||||
</el-radio>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -95,19 +95,66 @@
|
||||
<div
|
||||
:style="{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
alignItems: multiple ? 'end' : 'center',
|
||||
justifyContent: 'space-between'
|
||||
}"
|
||||
>
|
||||
<div>
|
||||
<el-button
|
||||
v-if="selectedCities.length"
|
||||
type="danger"
|
||||
@click="handleClearSelectedCitiesInDialog"
|
||||
>清空已选择的所有城市</el-button
|
||||
>
|
||||
<div flex flex-1 mr12px text-left flex-col>
|
||||
<template v-if="selectedCities?.length">
|
||||
<div
|
||||
flex
|
||||
flex-items-center
|
||||
font-size-14px
|
||||
flex-0
|
||||
ws-nowrap
|
||||
:class="{ mb10px: multiple }"
|
||||
>
|
||||
<el-button
|
||||
v-if="multiple && selectedCities?.length"
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="handleClearSelectedCitiesInDialog"
|
||||
>清空已选择的所有城市</el-button
|
||||
>
|
||||
<template v-if="!multiple">
|
||||
<span ml6px font-size-13px class="color-#999">已选择:</span>
|
||||
<el-tag
|
||||
closable
|
||||
@close="
|
||||
() => {
|
||||
selectedCities = null
|
||||
gtagRenderer('remove_selected_cities_in_dialog_clicked', {
|
||||
gtShowScene: props.gtShowScene,
|
||||
multiple: Boolean(multiple)
|
||||
})
|
||||
}
|
||||
"
|
||||
>{{ selectedCities }}</el-tag
|
||||
>
|
||||
</template>
|
||||
</div>
|
||||
<div v-if="multiple" flex flex-1 flex-wrap gap-6px of-auto max-h-160px>
|
||||
<span font-size-13px class="color-#999" flex items-center>已选择:</span>
|
||||
<el-tag
|
||||
v-for="(city, index) in selectedCities"
|
||||
:key="city"
|
||||
closable
|
||||
@close="
|
||||
() => {
|
||||
;(selectedCities ?? []).splice(index, 1)
|
||||
gtagRenderer('remove_selected_cities_in_dialog_clicked', {
|
||||
gtShowScene: props.gtShowScene,
|
||||
multiple: Boolean(multiple)
|
||||
})
|
||||
}
|
||||
"
|
||||
>
|
||||
{{ city }}</el-tag
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div>
|
||||
<div flex-0 ws-nowrap>
|
||||
<el-button @click="handleCancelClicked">取消</el-button>
|
||||
<el-button type="primary" @click="handleConfirmClicked">确定</el-button>
|
||||
</div>
|
||||
@@ -119,12 +166,21 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { PropType, ref } from 'vue'
|
||||
import cityGroupData from '../../../../../../common/constant/cityGroup.json'
|
||||
import cityGroupData from '@geekgeekrun/geek-auto-start-chat-with-boss/cityGroup.mjs'
|
||||
import { gtagRenderer } from '@renderer/utils/gtag'
|
||||
import { ElRadioGroup } from 'element-plus'
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Array as PropType<string[]>
|
||||
type: [Array, String] as PropType<string[] | string | null>,
|
||||
default: null
|
||||
},
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
gtShowScene: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
const emits = defineEmits(['update:modelValue'])
|
||||
@@ -132,7 +188,7 @@ const { hotCityList, cityGroup } = cityGroupData.zpData
|
||||
|
||||
const activeTabName = ref('热门城市')
|
||||
const isDialogVisible = ref(false)
|
||||
const selectedCities = ref([])
|
||||
const selectedCities = ref(null)
|
||||
|
||||
const cityGroupsByAlphabetMap = ref(
|
||||
new Map(['ABCDE', 'FGHJ', 'KLMN', 'PQRST', 'WXYZ'].map((it) => [it, []]))
|
||||
@@ -151,30 +207,38 @@ for (const group of cityGroup) {
|
||||
|
||||
function handleDialogOpen() {
|
||||
activeTabName.value = '热门城市'
|
||||
selectedCities.value = [...(props.modelValue ?? [])]
|
||||
gtagRenderer('choose_city_dialog_open')
|
||||
selectedCities.value = props.multiple ? [...(props.modelValue ?? [])] : props.modelValue
|
||||
gtagRenderer('choose_city_dialog_open', { gtShowScene: props.gtShowScene })
|
||||
}
|
||||
|
||||
function handleCancelClicked() {
|
||||
gtagRenderer('choose_city_cancel_button_clicked')
|
||||
gtagRenderer('choose_city_cancel_button_clicked', { gtShowScene: props.gtShowScene })
|
||||
isDialogVisible.value = false
|
||||
}
|
||||
function handleConfirmClicked() {
|
||||
gtagRenderer('choose_city_confirm_button_clicked', { value: selectedCities.value.join(',') })
|
||||
gtagRenderer('choose_city_confirm_button_clicked', {
|
||||
gtShowScene: props.gtShowScene,
|
||||
value: Array.isArray(selectedCities.value)
|
||||
? selectedCities.value.join(',')
|
||||
: selectedCities.value
|
||||
})
|
||||
isDialogVisible.value = false
|
||||
emits('update:modelValue', [...(selectedCities.value ?? [])])
|
||||
emits(
|
||||
'update:modelValue',
|
||||
props.multiple ? [...(selectedCities.value ?? [])] : selectedCities.value
|
||||
)
|
||||
}
|
||||
function handleDialogClosed() {
|
||||
selectedCities.value = []
|
||||
gtagRenderer('choose_city_dialog_closed')
|
||||
selectedCities.value = props.multiple ? [] : null
|
||||
gtagRenderer('choose_city_dialog_closed', { gtShowScene: props.gtShowScene })
|
||||
}
|
||||
|
||||
function handleClearSelectedCitiesInModelValue() {
|
||||
emits('update:modelValue', [])
|
||||
gtagRenderer('clear_selected_cities_in_mv_clicked')
|
||||
emits('update:modelValue', (selectedCities.value = props.multiple ? [] : null))
|
||||
gtagRenderer('clear_selected_cities_in_mv_clicked', { gtShowScene: props.gtShowScene })
|
||||
}
|
||||
function handleClearSelectedCitiesInDialog() {
|
||||
selectedCities.value = []
|
||||
gtagRenderer('clear_selected_cities_in_dialog_clicked')
|
||||
selectedCities.value = props.multiple ? [] : null
|
||||
gtagRenderer('clear_selected_cities_in_dialog_clicked', { gtShowScene: props.gtShowScene })
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -314,7 +314,47 @@
|
||||
width: '100%'
|
||||
}"
|
||||
>
|
||||
<city-chooser v-model="formContent.expectCityList" />
|
||||
<city-chooser v-model="formContent.expectCityList">
|
||||
<template #default="{ modelValue, showDialog, clearValue }">
|
||||
<div v-if="modelValue?.length">
|
||||
<div>当前已选择城市:</div>
|
||||
<div flex flex-wrap gap-10px>
|
||||
<el-tag v-for="it in modelValue" :key="it">
|
||||
{{ it }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div>当前未选择任何期望城市,将不会按照城市进行筛选</div>
|
||||
</div>
|
||||
<div
|
||||
line-height-1
|
||||
:style="{
|
||||
marginTop: modelValue?.length ? '10px' : ''
|
||||
}"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="
|
||||
() => {
|
||||
// isDialogVisible = true
|
||||
showDialog()
|
||||
gtagRenderer('choose_city_entry_button_clicked')
|
||||
}
|
||||
"
|
||||
>选择城市</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="modelValue?.length"
|
||||
size="small"
|
||||
type="danger"
|
||||
@click="clearValue"
|
||||
>清空已选择的所有城市</el-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</city-chooser>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<div
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 793 KiB After Width: | Height: | Size: 1.2 MiB |
Reference in New Issue
Block a user