diff --git a/packages/geek-auto-start-chat-with-boss/default-config-file/boss.json b/packages/geek-auto-start-chat-with-boss/default-config-file/boss.json index 437e47f..2b202d4 100644 --- a/packages/geek-auto-start-chat-with-boss/default-config-file/boss.json +++ b/packages/geek-auto-start-chat-with-boss/default-config-file/boss.json @@ -35,5 +35,6 @@ ], "isSageTimeEnabled": true, "sageTimeOpTimes": 100, - "sageTimePauseMinute": 15 + "sageTimePauseMinute": 15, + "blockCompanyNameRegExpStr": "" } \ No newline at end of file diff --git a/packages/ui/src/main/flow/OPEN_SETTING_WINDOW/ipc/index.ts b/packages/ui/src/main/flow/OPEN_SETTING_WINDOW/ipc/index.ts index 012747a..3eb9a96 100644 --- a/packages/ui/src/main/flow/OPEN_SETTING_WINDOW/ipc/index.ts +++ b/packages/ui/src/main/flow/OPEN_SETTING_WINDOW/ipc/index.ts @@ -181,6 +181,12 @@ export default function initIpc() { if (hasOwn(payload, 'sageTimePauseMinute')) { bossConfig.sageTimePauseMinute = payload.sageTimePauseMinute } + if (hasOwn(payload, 'blockCompanyNameRegExpStr')) { + bossConfig.blockCompanyNameRegExpStr = payload.blockCompanyNameRegExpStr + } + if (hasOwn(payload, 'blockCompanyNameRegMatchStrategy')) { + bossConfig.blockCompanyNameRegMatchStrategy = payload.blockCompanyNameRegMatchStrategy + } promiseArr.push(writeConfigFile('boss.json', bossConfig)) diff --git a/packages/ui/src/renderer/src/page/MainLayout/GeekAutoStartChatWithBoss/index.vue b/packages/ui/src/renderer/src/page/MainLayout/GeekAutoStartChatWithBoss/index.vue index 9c63d91..c3e1c1a 100644 --- a/packages/ui/src/renderer/src/page/MainLayout/GeekAutoStartChatWithBoss/index.vue +++ b/packages/ui/src/renderer/src/page/MainLayout/GeekAutoStartChatWithBoss/index.vue @@ -245,14 +245,16 @@
- 公司白名单(以逗号分隔,不区分大小写;输入框留空表示不筛选)公司信息UI位置图示 - + >
逗号分隔,不区分大小写;输入框留空表示不筛选
+
+
+
+ 不期望投递公司正则  + + 公司信息UI位置图示
正则表达式,不区分大小写;输入框留空表示不筛选;优先级高于上方“期望投递公司” +
+ +
+
+ + + +
+ +
当前职位对应公司名称与不期望投递公司正则匹配时:
+ + {{ op.name }} + +
+
+
工作地
@@ -1213,7 +1318,9 @@ const formContent = ref({ ]), isSageTimeEnabled: true, sageTimeOpTimes: 100, - sageTimePauseMinute: 15 + sageTimePauseMinute: 15, + blockCompanyNameRegExpStr: '', + blockCompanyNameRegMatchStrategy: MarkAsNotSuitOp.NO_OP }) const anyCombineBossRecommendFilterHasCondition = computed(() => { @@ -1371,10 +1478,15 @@ electron.ipcRenderer.invoke('fetch-config-file-content').then((res) => { parseFloat(res.config['boss.json'].sageTimePauseMinute) < 0 ? 15 : parseFloat(res.config['boss.json'].sageTimePauseMinute) + formContent.value.blockCompanyNameRegExpStr = + res.config['boss.json'].blockCompanyNameRegExpStr?.trim() ?? '' + formContent.value.blockCompanyNameRegMatchStrategy = + res.config['boss.json'].blockCompanyNameRegMatchStrategy ?? MarkAsNotSuitOp.NO_OP }) const jobSourceFormItemSectionEl = ref() const jobDetailRegExpSectionEl = ref() +const blockCompanyNameRegExpSectionEl = ref() const formRules = { expectJobNameRegExpStr: { trigger: 'blur', @@ -1489,6 +1601,25 @@ const formRules = { } cb() } + }, + blockCompanyNameRegExpStr: { + trigger: 'blur', + validator(_, value, cb) { + if (!value) { + cb() + gtagRenderer('empty_reg_exp_for_bcn') + return + } + try { + new RegExp(value, 'ig') + gtagRenderer('valid_reg_exp_for_bcn', { v: value }) + cb() + } catch (err) { + cb(new Error(`正则无效:${err?.message}`)) + blockCompanyNameRegExpSectionEl.value?.scrollIntoViewIfNeeded() + gtagRenderer('invalid_reg_exp_for_bcn', { v: value }) + } + } } } @@ -1526,6 +1657,7 @@ const handleSubmit = async () => { clonedFormContent.__jobSourceList ) delete clonedFormContent.__jobSourceList + debugger await electron.ipcRenderer.invoke('save-config-file-from-ui', JSON.stringify(clonedFormContent)) mittBus.emit('auto-start-chat-with-boss-config-saved') gtagRenderer('config_saved_and_launch_auto_start_chat', { @@ -1671,7 +1803,7 @@ const strategyScopeOptionWhenMarkJobNotMatch = [ value: StrategyScopeOptionWhenMarkJobNotMatch.ALL_JOB }, { - name: '仅和“公司白名单”匹配的职位', + name: '仅和“期望投递公司”匹配的职位', value: StrategyScopeOptionWhenMarkJobNotMatch.ONLY_COMPANY_MATCHED_JOB } ] @@ -1989,7 +2121,8 @@ const handleStopButtonClick = async () => { font-size: 12px; line-height: 1.2em; } - .job-detail-filter-wrap .el-form-item__error { + .job-detail-filter-wrap .el-form-item__error, + .block-company-filter-wrap .el-form-item__error { position: static; word-break: break-word; } diff --git a/packages/ui/src/renderer/src/page/MainLayout/resources/intro-of-job-entry.png b/packages/ui/src/renderer/src/page/MainLayout/resources/intro-of-job-entry.png index 33be529..6b5b3a5 100644 Binary files a/packages/ui/src/renderer/src/page/MainLayout/resources/intro-of-job-entry.png and b/packages/ui/src/renderer/src/page/MainLayout/resources/intro-of-job-entry.png differ