Compare commits

..

No commits in common. 'cc6f0ce4c17689329956f4ef4e4ba44510b0812d' and 'ca6fb53d08a0f56ee4d1f84360b5da03c9fa8c69' have entirely different histories.

@ -72,7 +72,7 @@ async function getHistory() {
getHistory() getHistory()
function goPath(item, id) { function goPath(item, id) {
router.push({ name: item.path, query: { id, searchContent: item.data[0].name } }) router.push({ name: item.path, query: { id } })
emit('close') emit('close')
} }
@ -94,30 +94,42 @@ 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 v-model:value="value" placeholder="搜索任务ID、任务名称、提报人、拜访终端" type="text" @input="inputHandler" <n-input
@mousedown="handlerShowList"> v-model:value="value"
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 v-if="historyList.length" class="list_classfiy_item" style="border-bottom:1px solid #e4e4e4"> <div
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" <div v-for="(item, index) of historyList" :key="index" class="tag" @click="handlerHistory(item.historyname)">
@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 v-for="(item, index) in resultList" :key="index" class="list_classfiy_item" <div
:style="(index === resultList.length - 1) ? '' : 'border-bottom:1px solid #e4e4e4'"> v-for="(item, index) in resultList"
: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>
@ -136,15 +148,13 @@ 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;
} }
@ -159,7 +169,6 @@ 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;
@ -167,7 +176,6 @@ 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;
@ -177,7 +185,6 @@ 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;
@ -187,29 +194,28 @@ 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;
@ -224,11 +230,11 @@ function highlightText(text, query) {
} }
} }
.icon-delete { .icon-delete{
cursor: pointer; cursor: pointer;
} }
.highlight { .highlight{
color: #507AFD; color: #507AFD;
} }
</style> </style>

@ -47,24 +47,26 @@ 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: "20", pageSize: "7",
msgCategory: tab.value, msgCategory: tab.value,
}); });
console.log("getMessageList", res.data); console.log("getMessageList", res.data);
if (type == "more") { if (type == "more") {
if (res.code == "OK") { while (res.data.endRow > 0) {
if (tab.value === 1) { if (res.code == "OK") {
res.data.list.forEach((item) => { if (tab.value === 1) {
item.tag = JSON.parse(item.busJson); 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,
}); });
} }
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; hasNextPage.value = res.data.hasNextPage;
} else { } else {
@ -138,21 +140,39 @@ function getMore() {
</div> </div>
<div class="content"> <div class="content">
<div class="slider"> <div class="slider">
<div v-for="item in tabList" :key="item.value" :class="{ 'item-active': tab === item.value }" class="flex item" <div
@click="switchTab(item.value)"> v-for="item in tabList"
: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 class="icon" :src="tab === item.value ? item.activeIcon : item.icon" alt="" /> <img
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 class="icon-arrow" :src="tab === item.value ? iconArrowActive : iconArrow" alt="" /> <img
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 v-for="(item, index) in list" :key="item.id" :class="{ pt0: index === 0, 'item-disabled': item.readFlag }" <div
class="item" @click="goDetail(item)"> v-for="(item, index) in list"
: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") }}
@ -171,7 +191,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 === 3 ? 'tag-red' : 'tag-green'" class="tag"> <div :class="item.tag.states === 5 ? 'tag-red' : 'tag-green'" class="tag">
审批状态{{ getStateText(item.tag.states) }} 审批状态{{ getStateText(item.tag.states) }}
</div> </div>
</div> </div>
@ -236,7 +256,6 @@ function getMore() {
.content { .content {
display: flex; display: flex;
.slider { .slider {
.icon { .icon {
width: 17px; width: 17px;
@ -257,7 +276,6 @@ 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);
} }
@ -273,7 +291,6 @@ function getMore() {
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
margin-left: 12px; margin-left: 12px;
&-active { &-active {
color: #507afd; color: #507afd;
} }
@ -455,4 +472,5 @@ 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>

@ -21,13 +21,8 @@ import { getAllfieldList, getfieldList } from '@/api/home/filter'
import { useTaskStore } from '@/store/modules/task' import { useTaskStore } from '@/store/modules/task'
import emitter from '@/utils/mitt' 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()
@ -135,22 +130,22 @@ async function getshowFieldList() {
onMounted(() => { onMounted(() => {
getshowFieldList() getshowFieldList()
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)
}, 1000); }, 1000);
//filterHandler(data[0].id); //filterHandler(data[0].id);
} }
// pagination.pageNo += 1 // pagination.pageNo += 1
@ -161,8 +156,7 @@ 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}`)
@ -206,19 +200,6 @@ 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);
@ -231,14 +212,19 @@ const handleOk = (item: any) => {
</script> </script>
<template> <template>
<div class="aside" :style="asideStyle" @mouseenter="asideEnter = true" @mouseleave="asideEnter = false"> <div
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" />
@ -260,24 +246,55 @@ const handleOk = (item: any) => {
</div> </div>
</div> --> </div> -->
<!-- 高级筛选 --> <!-- 高级筛选 -->
<AdvanceFilter v-show="!showSearch" :type="2" @select="filterHandler" @update:search="setShowSearch(true)" <AdvanceFilter
@show-custom="showModal(CustomFieldModalRef)" @show-filter="showModal(filterModalRef)" ref="AdvanceFilterRef" /> v-show="!showSearch"
: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 v-model:value="search" style="flex: 1; height: 32px" placeholder="请输入你需要搜索的内容" @input="inputHandler"> <n-input
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 size="16px" style="margin-left: 6px; cursor: pointer" name="clear" @click="setShowSearch(false)" /> <SvgIcon
size="16px"
style="margin-left: 6px; cursor: pointer"
name="clear"
@click="setShowSearch(false)"
/>
</div> </div>
</div> </div>
<TaskList ref="taskListRef" :show-field-list="showFieldList" style="height: 811px" class="work-sheet-list" /> <TaskList
ref="taskListRef"
:show-field-list="showFieldList"
style="height: 811px"
class="work-sheet-list"
/>
<!-- calc(100vh - 146px) --> <!-- calc(100vh - 146px) -->
<CustomFieldModal ref="CustomFieldModalRef" :review-type="reviewType" @on-ok="getshowFieldList" /> <CustomFieldModal
ref="CustomFieldModalRef"
:review-type="reviewType"
@on-ok="getshowFieldList"
/>
<!-- 过滤列表 --> <!-- 过滤列表 -->
<FilterModalVue ref="filterModalRef" :type="2" @edit-filter="editFilter" <FilterModalVue
@show-new-filter="showModal(newFilterModalRef)" @handleOk="handleOk" /> ref="filterModalRef"
: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,11 +18,7 @@ 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'])
@ -40,7 +36,7 @@ function collapseHandler() {
const mousetrap = inject('mousetrap') as any const mousetrap = inject('mousetrap') as any
mousetrap.bind('[', collapseHandler) mousetrap.bind('[', collapseHandler)
const searchKeyword = ref(searchContent ? searchContent : '') const searchKeyword = ref('')
const asideWidth = computed(() => { const asideWidth = computed(() => {
return collapse.value ? 0 : 308 return collapse.value ? 0 : 308
@ -161,15 +157,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 class="aside" :style="asideStyle" @mouseenter="asideEnter = true" @mouseleave="asideEnter = false"> <div
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" />
@ -183,23 +179,46 @@ if (searchContent) {
<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 style="cursor: pointer; margin-left: 10px" size="18" name="magnifying-1" <SvgIcon
@click="setShowSearch(true)" /> style="cursor: pointer; margin-left: 10px"
<SvgIcon style="cursor: pointer; margin-left: 10px" size="18" name="filter" @click="showFilter" /> size="18"
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 v-model:value="searchKeyword" style="flex: 1; height: 32px" placeholder="请输入你需要搜索的内容" <n-input
@input="inputHandler"> v-model:value="searchKeyword"
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 size="16px" style="margin-left: 6px; cursor: pointer" name="clear" @click="setShowSearch(false)" /> <SvgIcon
size="16px"
style="margin-left: 6px; cursor: pointer"
name="clear"
@click="setShowSearch(false)"
/>
</div> </div>
</div> </div>
<WorkSheetList ref="packageListRef" class="work-sheet-list" :show-field-list="showFieldList" :dicts="dicts" <WorkSheetList
@approval-over="ApprovalOver" /> ref="packageListRef"
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>
@ -218,7 +237,6 @@ if (searchContent) {
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