From a5651e394f5d006a52fc882ace0da6a556fe113c Mon Sep 17 00:00:00 2001 From: Dragon <> Date: Mon, 18 Mar 2024 13:32:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/search/search.ts | 14 +++ src/assets/icons/delete-history.svg | 22 ++++ src/components/Search/Search.vue | 171 +++++++++++++++++++++------- 3 files changed, 168 insertions(+), 39 deletions(-) create mode 100644 src/assets/icons/delete-history.svg diff --git a/src/api/search/search.ts b/src/api/search/search.ts index 20230cb..9df567d 100644 --- a/src/api/search/search.ts +++ b/src/api/search/search.ts @@ -27,3 +27,17 @@ export async function historySearch(params) { return res } + +/** + * 清除历史记录 + * @returns + */ +export async function deleteSearch(params) { + const res = await http.request({ + url: `/ocr/history/searchdelete`, + method: 'delete', + params, + }) + + return res +} diff --git a/src/assets/icons/delete-history.svg b/src/assets/icons/delete-history.svg new file mode 100644 index 0000000..4260184 --- /dev/null +++ b/src/assets/icons/delete-history.svg @@ -0,0 +1,22 @@ + + + 删除 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/Search/Search.vue b/src/components/Search/Search.vue index de59eac..da3b834 100644 --- a/src/components/Search/Search.vue +++ b/src/components/Search/Search.vue @@ -1,56 +1,97 @@ @@ -63,7 +104,7 @@ getHistory() v-model:value="value" placeholder="搜索任务ID、任务名称、提报人、拜访终端" type="text" - @input="handlerSearch" + @input="inputHandler" @mousedown="handlerShowList" > @@ -73,17 +114,35 @@ getHistory() + + 历史搜索 + + + + + {{ item.historyname }} + + + + + + {{ item.title }} - + - {{ sitem.title }} + + @@ -144,4 +203,38 @@ getHistory() :deep(.n-input .n-input-wrapper) { margin: 8px; } + +.history-list{ + align-items: center; + padding-bottom: 9px; +} + +.tag-wrap{ + display: flex; + align-items: center; + flex: 1; + overflow-y: hidden; + overflow-x: auto; + + .tag{ + padding: 0 12px; + height: 22px; + border: 1px solid #e4e7ed; + border-radius: 12px; + margin-right: 12px; + font-size: 13px; + font-family: PingFang SC, PingFang SC-Regular; + font-weight: Regular; + text-align: left; + color: #666666; + } +} + +.icon-delete{ + cursor: pointer; +} + +.highlight{ + color: #507AFD; +}