From 8efce15fd59a913a9de4584d3785283c1b40e9bc Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Sun, 29 Jun 2025 05:30:39 +0800 Subject: [PATCH] enhance ui after add jobDetailRegExpMatchLogic option; change layout of job detail RegExp option --- .../GeekAutoStartChatWithBoss/index.vue | 310 +++++++++++------- 1 file changed, 193 insertions(+), 117 deletions(-) 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 795a2d4..3879a8e 100644 --- a/packages/ui/src/renderer/src/page/MainLayout/GeekAutoStartChatWithBoss/index.vue +++ b/packages/ui/src/renderer/src/page/MainLayout/GeekAutoStartChatWithBoss/index.vue @@ -520,50 +520,6 @@ >如下各信息位置图示 - - - 怎样填写下面的三个输入框? -
@@ -584,88 +540,166 @@
-
- -
职位名称/类型/描述正则匹配筛选逻辑
- - {{ op.name }} - -
-
- -
职位名称正则(不区分大小写)
- + +
职位类型/正则/描述 正则匹配筛选逻辑
+ + {{ op.name }} + +
+
- -
- -
职位类型正则(推荐填写,不区分大小写)
- -
-
- -
职位描述正则(不区分大小写)
- -
-
- +
+
@@ -1307,6 +1349,40 @@ function handleHowToFillDetailFilterClick() { 'https://linux.do/t/topic/640626/74?u=geekgeekrun' ) } + +function isJobDetailRegExpEmpty() { + return [ + formContent.value.expectJobDescRegExpStr, + formContent.value.expectJobNameRegExpStr, + formContent.value.expectJobTypeRegExpStr + ] + .map((it) => Boolean(it?.trim())) + .every((it) => it === false) +} + +function getJobDetailRegExpMatchLogicConfig() { + const result = { + logicText: '-', + inputPlaceholderText: '-' + } + if (formContent.value.jobDetailRegExpMatchLogic === JobDetailRegExpMatchLogic.EVERY) { + Object.assign(result, { + logicText: '且', + inputPlaceholderText: 'true' + }) + } + if (formContent.value.jobDetailRegExpMatchLogic === JobDetailRegExpMatchLogic.SOME) { + Object.assign(result, { + logicText: '或', + inputPlaceholderText: 'false' + }) + } + + if (isJobDetailRegExpEmpty()) { + result.inputPlaceholderText = 'true' + } + return result +}