Merge remote-tracking branch 'origin/feature/ui' into feature/ui

This commit is contained in:
geekgeekrun
2026-02-05 21:09:09 +08:00
16 changed files with 565 additions and 218 deletions

View File

@@ -149,17 +149,6 @@ jobs:
- name: Display structure of downloaded files
run: ls -llR geekgeekrun-ui@${{ github.sha }}
- name: Create release for private
uses: ncipollo/release-action@v1
with:
repo: ggr
prerelease: true
allowUpdates: true
artifacts: geekgeekrun-ui@${{ github.sha }}/*
tag: ${{ github.ref }}
token: ${{ secrets.GGR_ACTION_SECRET }}
body: TODO New Release.
- name: Create release for public
uses: ncipollo/release-action@v1
with:
@@ -168,5 +157,5 @@ jobs:
allowUpdates: true
artifacts: geekgeekrun-ui@${{ github.sha }}/*
tag: ${{ github.ref }}
token: ${{ secrets.GGR_ACTION_SECRET }}
token: ${{ secrets.GITHUB_TOKEN }}
body: TODO New Release.

View File

@@ -1,8 +1,6 @@
# 牛人快跑 - GeekGeekRun
**->由于BOSS直聘于2026.1.8上线了反调试/反爬虫/反自动化逻辑本程序可能暂时无法使用目前正在尝试处理中有相关处理经验的朋友可以提交PR<-**
**->维护者正在疯狂找工作<-**
**->维护者正在疯狂求职中<-**
一款可以帮助你在Boss直聘上**自动批量开聊Boss**的脚本基于Puppeteer。
@@ -137,39 +135,7 @@ Boss不明原因已读不回简历就是投不出去
在此先谢过了~
## 为什么要写这个程序?
### 个人而言
以我为例,我真的求职求累了
2023年初~2026年年初这段时间
- 求职经历离职求职7个月曾面试73个岗位各种面试一面、二面、三面、HR面加起来156次Offer 寥寥无几
- 被动失业经历1 次裁员1 次卡试用期1 次部门整体裁撤
- 目前状态:无工作(**正在疯狂找工作**
如此多的经历已经让我成为了一位资深Boss用户
2023年处于Gap期时一天差不多可以有8小时浪费在Boss上挑选工作、开聊Boss上这让我内心经常会很心累时常陷入内耗有种被全世界放弃的感觉
当时就有了想法,要让求职自动化。虽然后续也有新工作,但同工不同酬、卡试用期等情况,我还是有一些感受的。由此,便有了这个项目
我把之前的求职经验,通过这个程序表现了出来,假设你也在看机会,或许我的求职经验可以帮到你,让你少走弯路、减少内耗,愿你也能找到一份更好的工作
本程序完全公益、免费、开源。如需使用大模型功能请自行到你喜欢的平台例如DeepSeek、阿里云、火山引擎、OpenAI开通、充值并在本程序中配置
### 大环境而言
个人感受,大环境真的差,对于求职者相当不友好
一个岗位可以收到一堆简历投递,大部分简历最终的归宿都是人才库或者垃圾场
当然,如果运气好:
- 好不容易过了 HR 面,到了 Offer 阶段HR / 用人部门 几乎都在极限压缩用人成本,经常能被 ** 到,但你又没有其它更好 Offer ,不敢贸然放弃这个不满意的 Offer
- 终于你自我催眠(类似:“领导看我薪资低,所以一定会争取给我涨薪”、“领导看我薪资低,所以假设我加倍努力工作绩效一定会向我倾斜”、“领导画的饼很好,吃了一定能有好结果”),接了不满意的 Offer 入了职然而经过一段时间的接触最终结果完全不符合期望诸如“团队很难融入”、“协作方经常踢皮球”、“你需要做很多脏活累活而且要帮前人擦屁股”、“领导希望用最小成本把你招来这样裁员时可以最小成本把你打发走”、“团队需要新人来背C/M-/3.25/裁员指标”、“领导分配的工作和领导入职时画的诱人的饼完全不一致”)
为了避免这种情况的发生,找工作时还是需要尽可能多的面试,多个选择。如果真的不慎遭遇了这些情况,让你认为在当前岗位继续做下去的收益不如离职换工作的收益,那就做好走的准备吧
因此我编写了Boss炸弹可以帮你尽可能多地将当日开聊机会用完也编写了已读不回提醒器帮你戳一戳列表里读了消息但无回应的 Boss
### 求职平台Boss直聘而言
根据日常使用经验Boss直聘在已经开聊很多职位的情况下经常会推荐
根据日常使用求职平台Boss直聘的经验在已经开聊很多职位的情况下经常会推荐
1. 一些长时间不活跃的“僵尸”职位 - 活跃信息默认隐藏,需要点开职位详情才能看到
2. 牛头不对马嘴,不符合求职期望的职位

View File

@@ -1,4 +1,4 @@
{
export default {
"code": 0,
"message": "Success",
"zpData": {

View File

@@ -56,10 +56,11 @@ function combineWithZero(arr, min, max) {
}
export function* combineFiltersWithConstraintsGenerator(selectedFilters) {
const { salaryList, experienceList, degreeList, scaleList, industryList } =
const { cityList, salaryList, experienceList, degreeList, scaleList, industryList } =
selectedFilters;
// 生成符合限制条件的组合
const cityComb = combineWithZero(cityList, 0, 1) // Salary: 0-1 个
const salaryComb = combineWithZero(salaryList, 0, 1) // Salary: 0-1 个
const experienceComb = combineWithZero(experienceList, 0, experienceList.length) // Experience: 0 个或更多
const degreeComb = combineWithZero(degreeList, 0, degreeList.length) // Degree: 0 个或更多
@@ -67,17 +68,20 @@ export function* combineFiltersWithConstraintsGenerator(selectedFilters) {
const industryComb = combineWithZero(industryList, 0, 3) // Industry: 0-3 个
// 通过迭代生成所有组合
for (const salary of salaryComb) {
for (const experience of experienceComb) {
for (const degree of degreeComb) {
for (const scale of scaleComb) {
for (const industry of industryComb) {
yield {
salaryList: salary,
experienceList: experience,
degreeList: degree,
scaleList: scale,
industryList: industry
for (const city of cityComb) {
for (const salary of salaryComb) {
for (const experience of experienceComb) {
for (const degree of degreeComb) {
for (const scale of scaleComb) {
for (const industry of industryComb) {
yield {
cityList: city,
salaryList: salary,
experienceList: experience,
degreeList: degree,
scaleList: scale,
industryList: industry
}
}
}
}
@@ -92,6 +96,7 @@ export function* combineFiltersWithConstraintsGenerator(selectedFilters) {
// 计算符合限制条件的组合数量
export function calculateTotalCombinations(selectedFilters, includeEmptyCondition) {
const {
cityList = [],
salaryList = [],
experienceList = [],
degreeList = [],
@@ -100,13 +105,14 @@ export function calculateTotalCombinations(selectedFilters, includeEmptyConditio
} = selectedFilters
// 生成符合限制条件的组合
const cityComb = combineWithZero(cityList, 0, 1) // City: 0-1 个
const salaryComb = combineWithZero(salaryList, 0, 1) // Salary: 0-1 个
const experienceComb = combineWithZero(experienceList, 0, experienceList.length) // Experience: 0 个或更多
const degreeComb = combineWithZero(degreeList, 0, degreeList.length) // Degree: 0 个或更多
const scaleComb = combineWithZero(scaleList, 0, scaleList.length) // Scale: 0 个或更多
const industryComb = combineWithZero(industryList, 0, 3) // Industry: 0-3 个
let result = [salaryComb, experienceComb, degreeComb, scaleComb, industryComb].reduce((accu, cur) => {
let result = [cityComb, salaryComb, experienceComb, degreeComb, scaleComb, industryComb].reduce((accu, cur) => {
return accu * cur.length
}, 1)
if (!includeEmptyCondition) {
@@ -146,6 +152,7 @@ export function formatStaticCombineFilters(rawStaticCombineRecommendJobFilterCon
const conditions = Array.from(map.values())
const result = conditions.map((condition) => {
return {
cityList: condition.city ? [condition.city] : [],
salaryList: condition.salary ? [condition.salary] : [],
experienceList: condition.experience ? [condition.experience] : [],
degreeList: condition.degree ? [condition.degree] : [],
@@ -155,6 +162,7 @@ export function formatStaticCombineFilters(rawStaticCombineRecommendJobFilterCon
})
if (!result.length) {
result.push({
cityList: [],
salaryList: [],
experienceList: [],
degreeList: [],

View File

@@ -1,6 +1,7 @@
{
"combineRecommendJobFilterType": 1,
"anyCombineRecommendJobFilter": {
"cityList": [],
"salaryList": [],
"experienceList": [],
"degreeList": [],

View File

@@ -38,6 +38,18 @@ import {
} from './constant.mjs'
import { parseSalary } from "@geekgeekrun/sqlite-plugin/dist/utils/parser"
import { waitForSageTimeOrJustContinue } from './sage-time.mjs'
import cityGroupData from './cityGroup.mjs'
const flattedCityList = []
;(cityGroupData?.zpData?.cityGroup ?? []).forEach(it => {
const firstChar = it.firstChar
it.cityList.forEach(city => {
flattedCityList.push({
...city,
firstChar
})
})
})
const jobFilterConditionsMapByCode = {}
Object.values(jobFilterConditions).forEach(arr => {
arr.forEach(option => {
@@ -406,6 +418,7 @@ export function testIfJobTitleOrDescriptionSuit (jobInfo, matchLogic) {
async function setFilterCondition (selectedFilters) {
const {
cityList = [],
salaryList = [],
experienceList = [],
degreeList = [],
@@ -413,9 +426,9 @@ async function setFilterCondition (selectedFilters) {
industryList = []
} = selectedFilters
const placeholderTexts = ['薪资待遇', '工作经验', '学历要求', '公司行业', '公司规模']
const optionKaPrefixes = ['sel-job-rec-salary-', 'sel-job-rec-exp-', 'sel-job-rec-degree-', 'sel-industry-', 'sel-job-rec-scale-']
const conditionArr = [salaryList, experienceList, degreeList, industryList, scaleList]
const placeholderTexts = ['城市', '薪资待遇', '工作经验', '学历要求', '公司行业', '公司规模']
const optionKaPrefixes = ['switch_city_dialog_open', 'sel-job-rec-salary-', 'sel-job-rec-exp-', 'sel-job-rec-degree-', 'sel-industry-', 'sel-job-rec-scale-']
const conditionArr = [cityList, salaryList, experienceList, degreeList, industryList, scaleList]
console.log('current filter condition----')
for (let i = 0; i < placeholderTexts.length; i++) {
@@ -434,10 +447,15 @@ async function setFilterCondition (selectedFilters) {
const placeholderText = placeholderTexts[i]
const filterDropdownProxy = await (async () => {
const jsHandle = (await page.evaluateHandle((placeholderText) => {
const filterBar = document.querySelector('.page-jobs-main .filter-condition-inner')
const dropdownEntry = filterBar.__vue__.$children.find(it => it.placeholder === placeholderText)
return dropdownEntry.$el
}, placeholderText)).asElement();
if (placeholderText === '城市') {
return document.querySelector('.page-jobs-main .filter-condition-inner [ka="switch_city_dialog_open"]')
}
else {
const filterBar = document.querySelector('.page-jobs-main .filter-condition-inner')
const dropdownEntry = filterBar.__vue__.$children.find(it => it.placeholder === placeholderText)
return dropdownEntry?.$el
}
}, placeholderText))?.asElement();
return jsHandle
})()
if (!filterDropdownProxy) {
@@ -446,88 +464,143 @@ async function setFilterCondition (selectedFilters) {
const currentFilterConditions = conditionArr[i];
const filterDropdownCssList = await filterDropdownProxy.evaluate(el => Array.from(el.classList));
if (!filterDropdownCssList.includes('is-select') && !currentFilterConditions.length) {
continue
} else {
const filterDropdownElBBox = await filterDropdownProxy.boundingBox()
await page.mouse.move(
filterDropdownElBBox.x + filterDropdownElBBox.width / 2,
filterDropdownElBBox.y + filterDropdownElBBox.height / 2,
)
await sleepWithRandomDelay(500)
if (placeholderText === '城市') {
const onPageSelectedCity = filterDropdownCssList.includes('active') ? (await filterDropdownProxy.evaluate(el => el.textContent.trim())) : null
if (!onPageSelectedCity && !currentFilterConditions.length) {
continue
} else if (onPageSelectedCity === (currentFilterConditions[0] ?? null)) {
continue
} else {
if (!currentFilterConditions.length) {
const clearButtonHandle = await page.$(`.page-jobs-main .filter-condition-inner [ka="empty-filter"]`)
await clearButtonHandle.click()
}
else {
await filterDropdownProxy?.click()
await page.waitForFunction(() => {
const dialogEl = document.querySelector('.city-select-dialog')
return dialogEl && window.getComputedStyle(dialogEl).display !== 'none'
})
const citySelectWrapperProxy = await page.waitForSelector('.city-select-wrapper')
let targetCityElJsHandle = (await page.evaluateHandle((cityName) => {
const targetCityEl = [...document.querySelectorAll('.city-select-dialog .city-select-wrapper ul.city-list-hot li')].find(it => it.textContent.trim() === cityName) ?? null
return targetCityEl
}, currentFilterConditions[0]))?.asElement()
if (!targetCityElJsHandle) {
const targetCityItem = flattedCityList.find(it => it.name === currentFilterConditions[0])
if (!targetCityItem) {
// unexpected condition
continue
}
const firstChar = targetCityItem.firstChar
const targetCityCharListEntryHandle = await page.$(`xpath///*[contains(@class, "city-select-dialog")]//*[contains(@class, "city-select-wrapper")]//ul[contains(@class, "city-char-list")]//li[contains(text(), '${firstChar.toUpperCase()}')]`)
await targetCityCharListEntryHandle.click()
targetCityElJsHandle = (await page.evaluateHandle((cityName) => {
const targetCityEl = [...document.querySelectorAll('.city-select-dialog .city-select-wrapper .list-select-list a')].find(it => it.textContent.trim() === cityName) ?? null
return targetCityEl
}, currentFilterConditions[0]))?.asElement()
}
if (!targetCityElJsHandle) {
// unexpected condition
continue
}
await targetCityElJsHandle.click()
await sleep(1000)
}
}
}
else {
if (!filterDropdownCssList.includes('is-select') && !currentFilterConditions.length) {
continue
} else {
await filterDropdownProxy.scrollIntoView()
const filterDropdownElBBox = await filterDropdownProxy.boundingBox()
await page.mouse.move(
filterDropdownElBBox.x + filterDropdownElBBox.width / 2,
filterDropdownElBBox.y + filterDropdownElBBox.height / 2,
)
await sleepWithRandomDelay(500)
const optionKaPrefix = optionKaPrefixes[i]
if (!currentFilterConditions.length) {
if (placeholderText === '公司行业') {
const activeOptionElAtCurrentFilterProxyList = await page.$$(`.page-jobs-main .filter-condition-inner .active[ka^="${optionKaPrefix}"]`)
for (const it of activeOptionElAtCurrentFilterProxyList) {
await it.click()
const optionKaPrefix = optionKaPrefixes[i]
if (!currentFilterConditions.length) {
if (placeholderText === '公司行业') {
const activeOptionElAtCurrentFilterProxyList = await page.$$(`.page-jobs-main .filter-condition-inner .active[ka^="${optionKaPrefix}"]`)
for (const it of activeOptionElAtCurrentFilterProxyList) {
await it.click()
}
} else {
// select 不限 immediately
const buxianOptionElProxy = await page.$(`.page-jobs-main .filter-condition-inner [ka="${optionKaPrefix}${0}"]`)
await buxianOptionElProxy.click()
}
} else {
// select 不限 immediately
const buxianOptionElProxy = await page.$(`.page-jobs-main .filter-condition-inner [ka="${optionKaPrefix}${0}"]`)
await buxianOptionElProxy.click()
}
} else {
//#region uncheck options perviously checked but not existed in current filter.
const activeOptionElAtCurrentFilterProxyList = await page.$$(`.page-jobs-main .filter-condition-inner .active[ka^="${optionKaPrefix}"]`)
const activeOptionValues = (await Promise.all(
activeOptionElAtCurrentFilterProxyList.map(elProxy => {
return elProxy.evaluate((el) => {
return el.getAttribute('ka')
//#region uncheck options perviously checked but not existed in current filter.
const activeOptionElAtCurrentFilterProxyList = await page.$$(`.page-jobs-main .filter-condition-inner .active[ka^="${optionKaPrefix}"]`)
const activeOptionValues = (await Promise.all(
activeOptionElAtCurrentFilterProxyList.map(elProxy => {
return elProxy.evaluate((el) => {
return el.getAttribute('ka')
})
})
})
)).map(it => it.replace(optionKaPrefix, '')).map(Number)
if (placeholderText !== '薪资待遇') {
for(let i = 0; i < activeOptionValues.length; i++) {
let activeValue
)).map(it => it.replace(optionKaPrefix, '')).map(Number)
if (placeholderText !== '薪资待遇') {
for(let i = 0; i < activeOptionValues.length; i++) {
let activeValue
if (placeholderText === '公司行业') {
activeValue = industryFilterConditionsMapByIndex[activeOptionValues[i]]?.code
} else {
activeValue = activeOptionValues[i]
}
const activeOptionElProxy = activeOptionElAtCurrentFilterProxyList[i]
if (!currentFilterConditions.includes(activeValue)) {
await activeOptionElProxy.click()
}
}
}
//#endregion
//#region only click the one which we need check, don't change already checked.
const conditionToCheck = currentFilterConditions.filter(it => {
if (placeholderText === '公司行业') {
activeValue = industryFilterConditionsMapByIndex[activeOptionValues[i]]?.code
return !activeOptionValues.map(value => industryFilterConditionsMapByIndex[value].code).includes(it);
} else {
activeValue = activeOptionValues[i]
return !activeOptionValues.includes(it)
}
const activeOptionElProxy = activeOptionElAtCurrentFilterProxyList[i]
if (!currentFilterConditions.includes(activeValue)) {
await activeOptionElProxy.click()
})
for(let j = 0; j < conditionToCheck.length; j++) {
let optionValue
if (placeholderText === '公司行业') {
optionValue = industryFilterConditionCodeToIndexMap[conditionToCheck[j]]
} else {
optionValue = conditionToCheck[j]
}
await sleepWithRandomDelay(500)
await filterDropdownProxy.scrollIntoView()
const filterDropdownElBBox = await filterDropdownProxy.boundingBox()
await page.mouse.move(
filterDropdownElBBox.x + filterDropdownElBBox.width / 2,
filterDropdownElBBox.y + filterDropdownElBBox.height / 2,
)
await sleepWithRandomDelay(500)
const optionElProxy = await page.$(`.page-jobs-main .filter-condition-inner [ka="${optionKaPrefix}${optionValue}"]`)
if (!optionElProxy) {
continue;
}
await optionElProxy.click()
}
//#endregion
//#region move out dropdown entry to make dropdown hidden
const navBarLogoElProxy = await page.$(`[ka="header-home-logo"]`)
if (navBarLogoElProxy) {
const navBarLogoElBBox = await navBarLogoElProxy.boundingBox()
await page.mouse.move(
navBarLogoElBBox.x + navBarLogoElBBox.width / 2,
navBarLogoElBBox.y + navBarLogoElBBox.height / 2,
)
}
//#endregion
}
//#endregion
//#region only click the one which we need check, don't change already checked.
const conditionToCheck = currentFilterConditions.filter(it => {
if (placeholderText === '公司行业') {
return !activeOptionValues.map(value => industryFilterConditionsMapByIndex[value].code).includes(it);
} else {
return !activeOptionValues.includes(it)
}
})
for(let j = 0; j < conditionToCheck.length; j++) {
let optionValue
if (placeholderText === '公司行业') {
optionValue = industryFilterConditionCodeToIndexMap[conditionToCheck[j]]
} else {
optionValue = conditionToCheck[j]
}
await sleepWithRandomDelay(500)
const optionElProxy = await page.$(`.page-jobs-main .filter-condition-inner [ka="${optionKaPrefix}${optionValue}"]`)
if (!optionElProxy) {
continue;
}
await optionElProxy.click()
}
//#endregion
//#region move out dropdown entry to make dropdown hidden
const navBarLogoElProxy = await page.$(`[ka="header-home-logo"]`)
if (navBarLogoElProxy) {
const navBarLogoElBBox = await navBarLogoElProxy.boundingBox()
await page.mouse.move(
navBarLogoElBBox.x + navBarLogoElBBox.width / 2,
navBarLogoElBBox.y + navBarLogoElBBox.height / 2,
)
}
//#endregion
await sleepWithRandomDelay(500)
}
await sleepWithRandomDelay(500)
}
}
}
@@ -538,7 +611,7 @@ async function toRecommendPage (hooks) {
return true
}
return false
}).then((res) => {
}, { timeout: 120 * 1000 }).then((res) => {
return res.json()
})
page.goto(recommendJobPageUrl, { timeout: 1 * 1000 }).catch(e => { void e })
@@ -561,7 +634,7 @@ async function toRecommendPage (hooks) {
let userInfoResponse = await userInfoPromise
await hooks.userInfoResponse?.promise(userInfoResponse)
if (userInfoResponse.code !== 0) {
if (userInfoResponse?.code !== 0) {
autoStartChatEventBus.emit('LOGIN_STATUS_INVALID', {
userInfoResponse
})
@@ -685,9 +758,12 @@ async function toRecommendPage (hooks) {
? formatStaticCombineFilters(staticCombineRecommendJobFilterConditions)
: combineFiltersWithConstraintsGenerator(anyCombineRecommendJobFilter)
let expectJobList
let filterConditionIndex = -1
iterateFilterCondition: for (
const filterCondition of filterConditions
) {
filterConditionIndex++
console.log(`current filter condition index to apply: ${filterConditionIndex}`, JSON.stringify(filterCondition))
findInCurrentFilterCondition: while(true) {
await sleepWithRandomDelay(2500)

File diff suppressed because one or more lines are too long

View File

@@ -100,7 +100,7 @@ export default class SqlitePlugin {
hooks.userInfoResponse.tapPromise(
"SqlitePlugin",
async (userInfoResponse) => {
if (userInfoResponse.code !== 0) {
if (!userInfoResponse || userInfoResponse.code !== 0) {
return;
}
const { zpData: userInfo } = userInfoResponse;

View File

@@ -1,6 +1,6 @@
{
"name": "geekgeekrun-ui",
"version": "0.13.3",
"version": "0.14.1",
"description": "Boss 炸弹 - 自动开聊Boss助力每位打工人求职",
"main": "./out/main/index.js",
"author": "geekgeekrun",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -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"
}

View File

@@ -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({

View File

@@ -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'

View File

@@ -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>

View File

@@ -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