diff --git a/components.d.ts b/components.d.ts index ddd3db7..6458938 100644 --- a/components.d.ts +++ b/components.d.ts @@ -10,17 +10,49 @@ declare module 'vue' { Application: typeof import('./src/components/Application/Application.vue')['default'] BasicModal: typeof import('./src/components/Modal/BasicModal.vue')['default'] DataHeader: typeof import('./src/components/DataHeader/index.vue')['default'] + NAvatar: typeof import('naive-ui')['NAvatar'] + NBackTop: typeof import('naive-ui')['NBackTop'] NButton: typeof import('naive-ui')['NButton'] + NCard: typeof import('naive-ui')['NCard'] NCheckbox: typeof import('naive-ui')['NCheckbox'] + NCollapse: typeof import('naive-ui')['NCollapse'] + NCollapseItem: typeof import('naive-ui')['NCollapseItem'] NConfigProvider: typeof import('naive-ui')['NConfigProvider'] + NDatePicker: typeof import('naive-ui')['NDatePicker'] NDialogProvider: typeof import('naive-ui')['NDialogProvider'] + NDivider: typeof import('naive-ui')['NDivider'] + NDropdown: typeof import('naive-ui')['NDropdown'] + NEllipsis: typeof import('naive-ui')['NEllipsis'] + NEmpty: typeof import('naive-ui')['NEmpty'] NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] + NGi: typeof import('naive-ui')['NGi'] + NGrid: typeof import('naive-ui')['NGrid'] + NGridItem: typeof import('naive-ui')['NGridItem'] + NImage: typeof import('naive-ui')['NImage'] NInput: typeof import('naive-ui')['NInput'] NMessageProvider: typeof import('naive-ui')['NMessageProvider'] NModal: typeof import('naive-ui')['NModal'] NNotificationProvider: typeof import('naive-ui')['NNotificationProvider'] NotPassed: typeof import('./src/components/NotPassed.vue')['default'] + NPopconfirm: typeof import('naive-ui')['NPopconfirm'] + NPopover: typeof import('naive-ui')['NPopover'] + NPopselect: typeof import('naive-ui')['NPopselect'] + NProgress: typeof import('naive-ui')['NProgress'] + NScrollbar: typeof import('naive-ui')['NScrollbar'] + NSelect: typeof import('naive-ui')['NSelect'] + NSlider: typeof import('naive-ui')['NSlider'] + NSpace: typeof import('naive-ui')['NSpace'] + NSpin: typeof import('naive-ui')['NSpin'] + NSwitch: typeof import('naive-ui')['NSwitch'] + NTabPane: typeof import('naive-ui')['NTabPane'] + NTabs: typeof import('naive-ui')['NTabs'] + NTag: typeof import('naive-ui')['NTag'] + NTimeline: typeof import('naive-ui')['NTimeline'] + NTimelineItem: typeof import('naive-ui')['NTimelineItem'] + NTooltip: typeof import('naive-ui')['NTooltip'] + NUpload: typeof import('naive-ui')['NUpload'] + NUploadDragger: typeof import('naive-ui')['NUploadDragger'] Quill: typeof import('./src/components/RichEditor/Quill.vue')['default'] Robot: typeof import('./src/components/Robot/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/src/components/Search/Search.vue b/src/components/Search/Search.vue index 729f970..28fb5c9 100644 --- a/src/components/Search/Search.vue +++ b/src/components/Search/Search.vue @@ -72,7 +72,7 @@ async function getHistory() { getHistory() function goPath(item, id) { - router.push({ name: item.path, query: { id } }) + router.push({ name: item.path, query: { id, searchContent: item.data[0].name } }) emit('close') } @@ -94,42 +94,30 @@ function highlightText(text, query) {
- +
-
+
历史搜索
-
+
{{ item.historyname }}
-
+
{{ item.title }}
@@ -148,13 +136,15 @@ function highlightText(text, query) { position: absolute; top: 20%; left: 20%; - box-shadow: none!important; - .ip_box{ + box-shadow: none !important; + + .ip_box { z-index: 0; position: relative; left: calc(50% - 40px); top: 30px; - img{ + + img { width: 80px; height: 80px; } @@ -169,6 +159,7 @@ function highlightText(text, query) { box-shadow: 0px 12px 12px 0px rgba(80, 122, 253, 0.15), 0px 0px 0px 0.5px #d4e3fc; } + .list_box { background: #fefefe; border: 1px dashed #f4f4f4; @@ -176,6 +167,7 @@ function highlightText(text, query) { box-shadow: 0px 12px 12px 0px rgba(80, 122, 253, 0.15); margin-top: 15px; padding: 8px 16px; + .list_classfiy_item { .list_title { font-size: 12px; @@ -185,6 +177,7 @@ function highlightText(text, query) { line-height: 17px; margin: 10px 0 10px 5px; } + .list_item { display: flex; flex-flow: row nowrap; @@ -194,28 +187,29 @@ function highlightText(text, query) { } } } + :deep(.n-input .n-input-wrapper) { margin: 8px; } -.history-list{ +.history-list { align-items: center; padding-bottom: 9px; } -.name{ +.name { margin-left: 5px; cursor: pointer; } -.tag-wrap{ +.tag-wrap { display: flex; align-items: center; flex: 1; overflow-y: hidden; overflow-x: auto; - .tag{ + .tag { padding: 0 12px; height: 22px; border: 1px solid #e4e7ed; @@ -230,11 +224,11 @@ function highlightText(text, query) { } } -.icon-delete{ +.icon-delete { cursor: pointer; } -.highlight{ +.highlight { color: #507AFD; } diff --git a/src/views/message/content/List.vue b/src/views/message/content/List.vue index da07608..ca54ed6 100644 --- a/src/views/message/content/List.vue +++ b/src/views/message/content/List.vue @@ -47,26 +47,24 @@ const getStateText = computed(() => { async function getList(type = "") { let res = await getMessageList({ pageNo: state.pageNo, - pageSize: "7", + pageSize: "20", msgCategory: tab.value, }); console.log("getMessageList", res.data); if (type == "more") { - while (res.data.endRow > 0) { - if (res.code == "OK") { - if (tab.value === 1) { - res.data.list.forEach((item) => { - item.tag = JSON.parse(item.busJson); - }); - } - state.list = state.list.concat(res.data.list); - state.pageNo++; - res = await getMessageList({ - pageNo: state.pageNo, - pageSize: "7", - msgCategory: tab.value, + if (res.code == "OK") { + if (tab.value === 1) { + res.data.list.forEach((item) => { + item.tag = JSON.parse(item.busJson); }); } + state.list = state.list.concat(res.data.list); + state.pageNo++; + res = await getMessageList({ + pageNo: state.pageNo, + pageSize: "20", + msgCategory: tab.value, + }); } hasNextPage.value = res.data.hasNextPage; } else { @@ -140,39 +138,21 @@ function getMore() {
-
+
- +
{{ item.name }}
- +
-
+
{{ format(item.sendTime, "dd") }} @@ -191,7 +171,7 @@ function getMore() {
审批节点:{{ item.tag.nodeName }}
-
+
审批状态:{{ getStateText(item.tag.states) }}
@@ -256,6 +236,7 @@ function getMore() { .content { display: flex; + .slider { .icon { width: 17px; @@ -276,6 +257,7 @@ function getMore() { align-items: center; justify-content: space-between; cursor: pointer; + &-active { background: rgba(80, 122, 253, 0.1); } @@ -291,6 +273,7 @@ function getMore() { font-weight: 600; color: #333333; margin-left: 12px; + &-active { color: #507afd; } @@ -472,5 +455,4 @@ function getMore() { // ::v-deep(.n-divider:not(.n-divider--vertical)) { // margin-top: 12px; // margin-bottom: 12px; -// } - +// } diff --git a/src/views/task/aside/Aside.vue b/src/views/task/aside/Aside.vue index 16a90f6..bcb02e0 100644 --- a/src/views/task/aside/Aside.vue +++ b/src/views/task/aside/Aside.vue @@ -21,8 +21,13 @@ import { getAllfieldList, getfieldList } from '@/api/home/filter' import { useTaskStore } from '@/store/modules/task' import emitter from '@/utils/mitt' import { useConfig } from '@/store/modules/asideConfig' -import { getConditionList } from "@/api/home/filter"; +import { getConditionList } from "@/api/home/filter"; import type { FilterSearchParam } from "/#/api"; +import { useRoute } from 'vue-router' + + +const route = useRoute() +const searchContent = route.query.searchContent as string; const CustomFieldModalRef = ref(null) const collapse = ref(false) const taskStore = useTaskStore() @@ -130,25 +135,25 @@ async function getshowFieldList() { onMounted(() => { getshowFieldList() - window.addEventListener("keydown", handleKeydown); - init() + window.addEventListener("keydown", handleKeydown); + init() }) -async function init(){ +async function init() { try { const searchParam: FilterSearchParam = { search_searchname: { value: "", op: "like", type: "string" }, }; - const result = await getConditionList(1, searchParam,2); + const result = await getConditionList(1, searchParam, 2); const { data } = result; - if(data[0]){ + if (data[0]) { AdvanceFilterRef.value.setCurrentlySelectedAdvanced(data[0].searchname); setTimeout(() => { - filterHandler(data[0].id) + filterHandler(data[0].id) }, 1000); - //filterHandler(data[0].id); + //filterHandler(data[0].id); } // pagination.pageNo += 1 - + } catch (error) { return []; } finally { @@ -156,7 +161,8 @@ async function init(){ //currentlySelectedAdvanced.value="邱霞" } function handleKeydown(event) { - if (event.key === "s") setShowSearch(true)} + if (event.key === "s") setShowSearch(true) +} // 滚动容器,让key对应模块处于可视区域 function scrollHandler(key: string) { const element = document.querySelector(`#${key}`) @@ -200,6 +206,19 @@ defineExpose({ setAsideItemName, }) +const initSerach = () => { + if (searchContent) { + setShowSearch(true); + const id_param = searchContent.match(/-\d+-/); + if (id_param) { + console.log("aaaa", id_param); + search.value = id_param[0].slice(1, -1); + inputHandler(id_param[0].slice(1, -1)); + } + } +} +initSerach(); + const handleOk = (item: any) => { if (item) { AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname); @@ -212,19 +231,14 @@ const handleOk = (item: any) => {