Compare commits

...

2 Commits

@ -72,7 +72,7 @@ async function getHistory() {
getHistory() getHistory()
function goPath(item, id) { 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') emit('close')
} }
@ -94,42 +94,30 @@ function highlightText(text, query) {
<img src="../../assets/images/IP.png" alt=""> <img src="../../assets/images/IP.png" alt="">
</div> </div>
<div class="input_box"> <div class="input_box">
<n-input <n-input v-model:value="value" placeholder="搜索任务ID、任务名称、提报人、拜访终端" type="text" @input="inputHandler"
v-model:value="value" @mousedown="handlerShowList">
placeholder="搜索任务ID、任务名称、提报人、拜访终端"
type="text"
@input="inputHandler"
@mousedown="handlerShowList"
>
<template #prefix> <template #prefix>
<SvgIcon name="magnifying-1" size="18" /> <SvgIcon name="magnifying-1" size="18" />
</template> </template>
</n-input> </n-input>
</div> </div>
<div v-show="showList && (historyList.length || resultList.length)" class="list_box"> <div v-show="showList && (historyList.length || resultList.length)" class="list_box">
<div <div v-if="historyList.length" class="list_classfiy_item" style="border-bottom:1px solid #e4e4e4">
v-if="historyList.length"
class="list_classfiy_item"
style="border-bottom:1px solid #e4e4e4"
>
<div class="list_title"> <div class="list_title">
历史搜索 历史搜索
</div> </div>
<div class="flex history-list"> <div class="flex history-list">
<div class="tag-wrap"> <div class="tag-wrap">
<div v-for="(item, index) of historyList" :key="index" class="tag" @click="handlerHistory(item.historyname)"> <div v-for="(item, index) of historyList" :key="index" class="tag"
@click="handlerHistory(item.historyname)">
{{ item.historyname }} {{ item.historyname }}
</div> </div>
</div> </div>
<SvgIcon class="icon-delete" name="delete-history" size="16" @click="deleteHistory" /> <SvgIcon class="icon-delete" name="delete-history" size="16" @click="deleteHistory" />
</div> </div>
</div> </div>
<div <div v-for="(item, index) in resultList" :key="index" class="list_classfiy_item"
v-for="(item, index) in resultList" :style="(index === resultList.length - 1) ? '' : 'border-bottom:1px solid #e4e4e4'">
:key="index"
class="list_classfiy_item"
:style="(index === resultList.length - 1) ? '' : 'border-bottom:1px solid #e4e4e4'"
>
<div class="list_title"> <div class="list_title">
{{ item.title }} {{ item.title }}
</div> </div>
@ -148,13 +136,15 @@ function highlightText(text, query) {
position: absolute; position: absolute;
top: 20%; top: 20%;
left: 20%; left: 20%;
box-shadow: none!important; box-shadow: none !important;
.ip_box{
.ip_box {
z-index: 0; z-index: 0;
position: relative; position: relative;
left: calc(50% - 40px); left: calc(50% - 40px);
top: 30px; top: 30px;
img{
img {
width: 80px; width: 80px;
height: 80px; height: 80px;
} }
@ -169,6 +159,7 @@ function highlightText(text, query) {
box-shadow: 0px 12px 12px 0px rgba(80, 122, 253, 0.15), box-shadow: 0px 12px 12px 0px rgba(80, 122, 253, 0.15),
0px 0px 0px 0.5px #d4e3fc; 0px 0px 0px 0.5px #d4e3fc;
} }
.list_box { .list_box {
background: #fefefe; background: #fefefe;
border: 1px dashed #f4f4f4; border: 1px dashed #f4f4f4;
@ -176,6 +167,7 @@ function highlightText(text, query) {
box-shadow: 0px 12px 12px 0px rgba(80, 122, 253, 0.15); box-shadow: 0px 12px 12px 0px rgba(80, 122, 253, 0.15);
margin-top: 15px; margin-top: 15px;
padding: 8px 16px; padding: 8px 16px;
.list_classfiy_item { .list_classfiy_item {
.list_title { .list_title {
font-size: 12px; font-size: 12px;
@ -185,6 +177,7 @@ function highlightText(text, query) {
line-height: 17px; line-height: 17px;
margin: 10px 0 10px 5px; margin: 10px 0 10px 5px;
} }
.list_item { .list_item {
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
@ -194,28 +187,29 @@ function highlightText(text, query) {
} }
} }
} }
:deep(.n-input .n-input-wrapper) { :deep(.n-input .n-input-wrapper) {
margin: 8px; margin: 8px;
} }
.history-list{ .history-list {
align-items: center; align-items: center;
padding-bottom: 9px; padding-bottom: 9px;
} }
.name{ .name {
margin-left: 5px; margin-left: 5px;
cursor: pointer; cursor: pointer;
} }
.tag-wrap{ .tag-wrap {
display: flex; display: flex;
align-items: center; align-items: center;
flex: 1; flex: 1;
overflow-y: hidden; overflow-y: hidden;
overflow-x: auto; overflow-x: auto;
.tag{ .tag {
padding: 0 12px; padding: 0 12px;
height: 22px; height: 22px;
border: 1px solid #e4e7ed; border: 1px solid #e4e7ed;
@ -230,11 +224,11 @@ function highlightText(text, query) {
} }
} }
.icon-delete{ .icon-delete {
cursor: pointer; cursor: pointer;
} }
.highlight{ .highlight {
color: #507AFD; color: #507AFD;
} }
</style> </style>

@ -47,12 +47,11 @@ const getStateText = computed(() => {
async function getList(type = "") { async function getList(type = "") {
let res = await getMessageList({ let res = await getMessageList({
pageNo: state.pageNo, pageNo: state.pageNo,
pageSize: "7", pageSize: "20",
msgCategory: tab.value, msgCategory: tab.value,
}); });
console.log("getMessageList", res.data); console.log("getMessageList", res.data);
if (type == "more") { if (type == "more") {
while (res.data.endRow > 0) {
if (res.code == "OK") { if (res.code == "OK") {
if (tab.value === 1) { if (tab.value === 1) {
res.data.list.forEach((item) => { res.data.list.forEach((item) => {
@ -63,11 +62,10 @@ async function getList(type = "") {
state.pageNo++; state.pageNo++;
res = await getMessageList({ res = await getMessageList({
pageNo: state.pageNo, pageNo: state.pageNo,
pageSize: "7", pageSize: "20",
msgCategory: tab.value, msgCategory: tab.value,
}); });
} }
}
hasNextPage.value = res.data.hasNextPage; hasNextPage.value = res.data.hasNextPage;
} else { } else {
if (res.code === "OK") { if (res.code === "OK") {
@ -140,39 +138,21 @@ function getMore() {
</div> </div>
<div class="content"> <div class="content">
<div class="slider"> <div class="slider">
<div <div v-for="item in tabList" :key="item.value" :class="{ 'item-active': tab === item.value }" class="flex item"
v-for="item in tabList" @click="switchTab(item.value)">
:key="item.value"
:class="{ 'item-active': tab === item.value }"
class="flex item"
@click="switchTab(item.value)"
>
<div class="flex item-left align-center"> <div class="flex item-left align-center">
<img <img class="icon" :src="tab === item.value ? item.activeIcon : item.icon" alt="" />
class="icon"
:src="tab === item.value ? item.activeIcon : item.icon"
alt=""
/>
<div :class="{ 'text-active': tab === item.value }" class="text"> <div :class="{ 'text-active': tab === item.value }" class="text">
{{ item.name }} {{ item.name }}
</div> </div>
</div> </div>
<img <img class="icon-arrow" :src="tab === item.value ? iconArrowActive : iconArrow" alt="" />
class="icon-arrow"
:src="tab === item.value ? iconArrowActive : iconArrow"
alt=""
/>
<div v-if="tab === item.value" class="line" /> <div v-if="tab === item.value" class="line" />
</div> </div>
</div> </div>
<div class="list"> <div class="list">
<div <div v-for="(item, index) in list" :key="item.id" :class="{ pt0: index === 0, 'item-disabled': item.readFlag }"
v-for="(item, index) in list" class="item" @click="goDetail(item)">
:key="item.id"
:class="{ pt0: index === 0, 'item-disabled': item.readFlag }"
class="item"
@click="goDetail(item)"
>
<div class="left"> <div class="left">
<div class="num"> <div class="num">
{{ format(item.sendTime, "dd") }} {{ format(item.sendTime, "dd") }}
@ -191,7 +171,7 @@ function getMore() {
</div> </div>
<div v-if="tab === 1" class="status"> <div v-if="tab === 1" class="status">
<div class="tag tag-blue">审批节点{{ item.tag.nodeName }}</div> <div class="tag tag-blue">审批节点{{ item.tag.nodeName }}</div>
<div :class="item.tag.states === 5 ? 'tag-red' : 'tag-green'" class="tag"> <div :class="item.tag.states === 3 ? 'tag-red' : 'tag-green'" class="tag">
审批状态{{ getStateText(item.tag.states) }} 审批状态{{ getStateText(item.tag.states) }}
</div> </div>
</div> </div>
@ -256,6 +236,7 @@ function getMore() {
.content { .content {
display: flex; display: flex;
.slider { .slider {
.icon { .icon {
width: 17px; width: 17px;
@ -276,6 +257,7 @@ function getMore() {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
cursor: pointer; cursor: pointer;
&-active { &-active {
background: rgba(80, 122, 253, 0.1); background: rgba(80, 122, 253, 0.1);
} }
@ -291,6 +273,7 @@ function getMore() {
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
margin-left: 12px; margin-left: 12px;
&-active { &-active {
color: #507afd; color: #507afd;
} }
@ -472,5 +455,4 @@ function getMore() {
// ::v-deep(.n-divider:not(.n-divider--vertical)) { // ::v-deep(.n-divider:not(.n-divider--vertical)) {
// margin-top: 12px; // margin-top: 12px;
// margin-bottom: 12px; // margin-bottom: 12px;
// } // }</style>
</style>

@ -23,6 +23,11 @@ import emitter from '@/utils/mitt'
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from '@/store/modules/asideConfig'
import { getConditionList } from "@/api/home/filter"; import { getConditionList } from "@/api/home/filter";
import type { FilterSearchParam } from "/#/api"; 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 CustomFieldModalRef = ref(null)
const collapse = ref(false) const collapse = ref(false)
const taskStore = useTaskStore() const taskStore = useTaskStore()
@ -133,14 +138,14 @@ onMounted(() => {
window.addEventListener("keydown", handleKeydown); window.addEventListener("keydown", handleKeydown);
init() init()
}) })
async function init(){ async function init() {
try { try {
const searchParam: FilterSearchParam = { const searchParam: FilterSearchParam = {
search_searchname: { value: "", op: "like", type: "string" }, search_searchname: { value: "", op: "like", type: "string" },
}; };
const result = await getConditionList(1, searchParam,2); const result = await getConditionList(1, searchParam, 2);
const { data } = result; const { data } = result;
if(data[0]){ if (data[0]) {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced(data[0].searchname); AdvanceFilterRef.value.setCurrentlySelectedAdvanced(data[0].searchname);
setTimeout(() => { setTimeout(() => {
filterHandler(data[0].id) filterHandler(data[0].id)
@ -156,7 +161,8 @@ async function init(){
//currentlySelectedAdvanced.value="" //currentlySelectedAdvanced.value=""
} }
function handleKeydown(event) { function handleKeydown(event) {
if (event.key === "s") setShowSearch(true)} if (event.key === "s") setShowSearch(true)
}
// key // key
function scrollHandler(key: string) { function scrollHandler(key: string) {
const element = document.querySelector(`#${key}`) const element = document.querySelector(`#${key}`)
@ -200,6 +206,19 @@ defineExpose({
setAsideItemName, 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) => { const handleOk = (item: any) => {
if (item) { if (item) {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname); AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname);
@ -212,19 +231,14 @@ const handleOk = (item: any) => {
</script> </script>
<template> <template>
<div <div class="aside" :style="asideStyle" @mouseenter="asideEnter = true" @mouseleave="asideEnter = false">
class="aside"
:style="asideStyle"
@mouseenter="asideEnter = true"
@mouseleave="asideEnter = false"
>
<div v-show="showCollapse" class="aside-collapse"> <div v-show="showCollapse" class="aside-collapse">
<div class="aside-collapse-btn" @click="collapseHandler"> <div class="aside-collapse-btn" @click="collapseHandler">
<SvgIcon :name="collapseIcon" size="40" /> <SvgIcon :name="collapseIcon" size="40" />
</div> </div>
</div> </div>
<div class="aside-header" :style="`display:${asideWidth == 0?'none':''}`" > <div class="aside-header" :style="`display:${asideWidth == 0 ? 'none' : ''}`">
<!-- <div v-show="!showSearch" class="warpper"> <!-- <div v-show="!showSearch" class="warpper">
<div class="left"> <div class="left">
<svg-icon name="all-worksheet" size="32" /> <svg-icon name="all-worksheet" size="32" />
@ -246,55 +260,24 @@ const handleOk = (item: any) => {
</div> </div>
</div> --> </div> -->
<!-- 高级筛选 --> <!-- 高级筛选 -->
<AdvanceFilter <AdvanceFilter v-show="!showSearch" :type="2" @select="filterHandler" @update:search="setShowSearch(true)"
v-show="!showSearch" @show-custom="showModal(CustomFieldModalRef)" @show-filter="showModal(filterModalRef)" ref="AdvanceFilterRef" />
:type="2"
@select="filterHandler"
@update:search="setShowSearch(true)"
@show-custom="showModal(CustomFieldModalRef)"
@show-filter="showModal(filterModalRef)"
ref="AdvanceFilterRef"
/>
<div v-show="showSearch" class="warpper"> <div v-show="showSearch" class="warpper">
<n-input <n-input v-model:value="search" style="flex: 1; height: 32px" placeholder="请输入你需要搜索的内容" @input="inputHandler">
v-model:value="search"
style="flex: 1; height: 32px"
placeholder="请输入你需要搜索的内容"
@input="inputHandler"
>
<template #suffix> <template #suffix>
<SvgIcon size="14px" name="magnifying-1" /> <SvgIcon size="14px" name="magnifying-1" />
</template> </template>
</n-input> </n-input>
<SvgIcon <SvgIcon size="16px" style="margin-left: 6px; cursor: pointer" name="clear" @click="setShowSearch(false)" />
size="16px"
style="margin-left: 6px; cursor: pointer"
name="clear"
@click="setShowSearch(false)"
/>
</div> </div>
</div> </div>
<TaskList <TaskList ref="taskListRef" :show-field-list="showFieldList" style="height: 811px" class="work-sheet-list" />
ref="taskListRef"
:show-field-list="showFieldList"
style="height: 811px"
class="work-sheet-list"
/>
<!-- calc(100vh - 146px) --> <!-- calc(100vh - 146px) -->
<CustomFieldModal <CustomFieldModal ref="CustomFieldModalRef" :review-type="reviewType" @on-ok="getshowFieldList" />
ref="CustomFieldModalRef"
:review-type="reviewType"
@on-ok="getshowFieldList"
/>
<!-- 过滤列表 --> <!-- 过滤列表 -->
<FilterModalVue <FilterModalVue ref="filterModalRef" :type="2" @edit-filter="editFilter"
ref="filterModalRef" @show-new-filter="showModal(newFilterModalRef)" @handleOk="handleOk" />
:type="2"
@edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)"
@handleOk="handleOk"
/>
<!-- 新增过滤 --> <!-- 新增过滤 -->
<NewFilterModalVue ref="newFilterModalRef" @on-ok="newFilterOk" /> <NewFilterModalVue ref="newFilterModalRef" @on-ok="newFilterOk" />
</div> </div>

@ -18,7 +18,11 @@ import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn'
import { useUser } from '@/store/modules/user' import { useUser } from '@/store/modules/user'
import { useWorkOrder } from '@/store/modules/workOrder' import { useWorkOrder } from '@/store/modules/workOrder'
import { getViewportOffset } from '@/utils/domUtils' import { getViewportOffset } from '@/utils/domUtils'
import { useRoute } from 'vue-router'
const route = useRoute()
const searchContent = route.query.searchContent;
console.log(searchContent);
defineOptions({ name: 'AsideContent' }) defineOptions({ name: 'AsideContent' })
const emit = defineEmits(['ApprovalOver']) const emit = defineEmits(['ApprovalOver'])
@ -36,7 +40,7 @@ function collapseHandler() {
const mousetrap = inject('mousetrap') as any const mousetrap = inject('mousetrap') as any
mousetrap.bind('[', collapseHandler) mousetrap.bind('[', collapseHandler)
const searchKeyword = ref('') const searchKeyword = ref(searchContent ? searchContent : '')
const asideWidth = computed(() => { const asideWidth = computed(() => {
return collapse.value ? 0 : 308 return collapse.value ? 0 : 308
@ -157,15 +161,15 @@ const inputHandler = debounce((word) => {
function ApprovalOver(packageId) { function ApprovalOver(packageId) {
emit('ApprovalOver', packageId) emit('ApprovalOver', packageId)
} }
if (searchContent) {
showSearch.value = true
inputHandler(searchContent)
}
</script> </script>
<template> <template>
<div <div class="aside" :style="asideStyle" @mouseenter="asideEnter = true" @mouseleave="asideEnter = false">
class="aside"
:style="asideStyle"
@mouseenter="asideEnter = true"
@mouseleave="asideEnter = false"
>
<div v-show="showCollapse" class="aside-collapse"> <div v-show="showCollapse" class="aside-collapse">
<div class="aside-collapse-btn" @click="collapseHandler"> <div class="aside-collapse-btn" @click="collapseHandler">
<SvgIcon :name="collapseIcon" size="40" /> <SvgIcon :name="collapseIcon" size="40" />
@ -179,46 +183,23 @@ function ApprovalOver(packageId) {
<span style="margin-left: 8px; color: #333333">所有任务包</span> <span style="margin-left: 8px; color: #333333">所有任务包</span>
</div> </div>
<div class="right"> <div class="right">
<SvgIcon <SvgIcon style="cursor: pointer; margin-left: 10px" size="18" name="magnifying-1"
style="cursor: pointer; margin-left: 10px" @click="setShowSearch(true)" />
size="18" <SvgIcon style="cursor: pointer; margin-left: 10px" size="18" name="filter" @click="showFilter" />
name="magnifying-1"
@click="setShowSearch(true)"
/>
<SvgIcon
style="cursor: pointer; margin-left: 10px"
size="18"
name="filter"
@click="showFilter"
/>
</div> </div>
</div> </div>
<div v-show="showSearch" class="warpper"> <div v-show="showSearch" class="warpper">
<n-input <n-input v-model:value="searchKeyword" style="flex: 1; height: 32px" placeholder="请输入你需要搜索的内容"
v-model:value="searchKeyword" @input="inputHandler">
style="flex: 1; height: 32px"
placeholder="请输入你需要搜索的内容"
@input="inputHandler"
>
<template #suffix> <template #suffix>
<SvgIcon size="14px" name="magnifying-1" /> <SvgIcon size="14px" name="magnifying-1" />
</template> </template>
</n-input> </n-input>
<SvgIcon <SvgIcon size="16px" style="margin-left: 6px; cursor: pointer" name="clear" @click="setShowSearch(false)" />
size="16px"
style="margin-left: 6px; cursor: pointer"
name="clear"
@click="setShowSearch(false)"
/>
</div> </div>
</div> </div>
<WorkSheetList <WorkSheetList ref="packageListRef" class="work-sheet-list" :show-field-list="showFieldList" :dicts="dicts"
ref="packageListRef" @approval-over="ApprovalOver" />
class="work-sheet-list"
:show-field-list="showFieldList"
:dicts="dicts"
@approval-over="ApprovalOver"
/>
<CustomFieldModalVue ref="filterModalRef" :review-type="1" @on-ok="getshowFieldList" /> <CustomFieldModalVue ref="filterModalRef" :review-type="1" @on-ok="getshowFieldList" />
</div> </div>
</template> </template>
@ -237,6 +218,7 @@ function ApprovalOver(packageId) {
padding: 12px 16px; padding: 12px 16px;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
.warpper { .warpper {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

Loading…
Cancel
Save