feat: 修改bug

pull/173/head
raofuzi 1 year ago
commit 39e4d383fe

8
components.d.ts vendored

@ -11,6 +11,7 @@ declare module 'vue' {
BasicModal: typeof import('./src/components/Modal/BasicModal.vue')['default'] BasicModal: typeof import('./src/components/Modal/BasicModal.vue')['default']
DataHeader: typeof import('./src/components/DataHeader/index.vue')['default'] DataHeader: typeof import('./src/components/DataHeader/index.vue')['default']
NAvatar: typeof import('naive-ui')['NAvatar'] NAvatar: typeof import('naive-ui')['NAvatar']
NBackTop: typeof import('naive-ui')['NBackTop']
NButton: typeof import('naive-ui')['NButton'] NButton: typeof import('naive-ui')['NButton']
NCard: typeof import('naive-ui')['NCard'] NCard: typeof import('naive-ui')['NCard']
NCheckbox: typeof import('naive-ui')['NCheckbox'] NCheckbox: typeof import('naive-ui')['NCheckbox']
@ -21,6 +22,8 @@ declare module 'vue' {
NDialogProvider: typeof import('naive-ui')['NDialogProvider'] NDialogProvider: typeof import('naive-ui')['NDialogProvider']
NDivider: typeof import('naive-ui')['NDivider'] NDivider: typeof import('naive-ui')['NDivider']
NDropdown: typeof import('naive-ui')['NDropdown'] NDropdown: typeof import('naive-ui')['NDropdown']
NEllipsis: typeof import('naive-ui')['NEllipsis']
NEmpty: typeof import('naive-ui')['NEmpty']
NForm: typeof import('naive-ui')['NForm'] NForm: typeof import('naive-ui')['NForm']
NFormItem: typeof import('naive-ui')['NFormItem'] NFormItem: typeof import('naive-ui')['NFormItem']
NGi: typeof import('naive-ui')['NGi'] NGi: typeof import('naive-ui')['NGi']
@ -32,6 +35,7 @@ declare module 'vue' {
NModal: typeof import('naive-ui')['NModal'] NModal: typeof import('naive-ui')['NModal']
NNotificationProvider: typeof import('naive-ui')['NNotificationProvider'] NNotificationProvider: typeof import('naive-ui')['NNotificationProvider']
NotPassed: typeof import('./src/components/NotPassed.vue')['default'] NotPassed: typeof import('./src/components/NotPassed.vue')['default']
NPopconfirm: typeof import('naive-ui')['NPopconfirm']
NPopover: typeof import('naive-ui')['NPopover'] NPopover: typeof import('naive-ui')['NPopover']
NPopselect: typeof import('naive-ui')['NPopselect'] NPopselect: typeof import('naive-ui')['NPopselect']
NProgress: typeof import('naive-ui')['NProgress'] NProgress: typeof import('naive-ui')['NProgress']
@ -41,7 +45,11 @@ declare module 'vue' {
NSpace: typeof import('naive-ui')['NSpace'] NSpace: typeof import('naive-ui')['NSpace']
NSpin: typeof import('naive-ui')['NSpin'] NSpin: typeof import('naive-ui')['NSpin']
NSwitch: typeof import('naive-ui')['NSwitch'] NSwitch: typeof import('naive-ui')['NSwitch']
NTabPane: typeof import('naive-ui')['NTabPane']
NTabs: typeof import('naive-ui')['NTabs']
NTag: typeof import('naive-ui')['NTag'] NTag: typeof import('naive-ui')['NTag']
NTimeline: typeof import('naive-ui')['NTimeline']
NTimelineItem: typeof import('naive-ui')['NTimelineItem']
NTooltip: typeof import('naive-ui')['NTooltip'] NTooltip: typeof import('naive-ui')['NTooltip']
NUpload: typeof import('naive-ui')['NUpload'] NUpload: typeof import('naive-ui')['NUpload']
NUploadDragger: typeof import('naive-ui')['NUploadDragger'] NUploadDragger: typeof import('naive-ui')['NUploadDragger']

@ -72,7 +72,10 @@ async function getHistory() {
getHistory() getHistory()
function goPath(item, id) { function goPath(item, id) {
router.push({ name: item.path, query: { id } }) const desiredObject = item.data.find(function (item) {
return item.id === id;
});
router.push({ name: item.path, query: { id, searchContent: desiredObject.name } })
emit('close') emit('close')
} }
@ -94,42 +97,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 +139,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 +162,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 +170,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 +180,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 +190,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 +227,11 @@ function highlightText(text, query) {
} }
} }
.icon-delete{ .icon-delete {
cursor: pointer; cursor: pointer;
} }
.highlight{ .highlight {
color: #507AFD; color: #507AFD;
} }
</style> </style>

@ -49,7 +49,7 @@ export const useTaskStore = defineStore({
back() { back() {
if (this.currentIndex === 0) if (this.currentIndex === 0)
return return
this.setActive(--this.currentIndex) this.setActive(--this.currentIndex)
}, },
async fetchApprovalList(pagination) { async fetchApprovalList(pagination) {

@ -344,6 +344,7 @@ function updateComponent(key, e) {
@select="scrollHandler" @select="scrollHandler"
@close="setShowSearch(false)" @close="setShowSearch(false)"
@inputChange="inputChange" @inputChange="inputChange"
@showSearch="setShowSearch(true)"
/> />
<!-- 高级筛选 --> <!-- 高级筛选 -->
<AdvanceFilter <AdvanceFilter

@ -1,16 +1,21 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue' import { nextTick, onMounted, ref } from 'vue'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import { asideMap } from '@/config/aside' import { asideMap } from '@/config/aside'
import type { SearchEntity } from '/#/home' import type { SearchEntity } from '/#/home'
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from '@/store/modules/asideConfig'
import { useRoute } from 'vue-router'
const route = useRoute()
const searchContent = route.query.searchContent as string;
defineOptions({ name: 'Search' }) defineOptions({ name: 'Search' })
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'close'): void (e: 'close'): void
(e: 'select', key: string): void (e: 'select', key: string): void
(e: 'inputChange', value: string): void (e: 'inputChange', value: string): void
(e: 'showSearch'): void
}>() }>()
const data = ref<SearchEntity[]>([]) const data = ref<SearchEntity[]>([])
@ -20,7 +25,7 @@ const searchKeyword = ref('')
const inputHandler = debounce((keyword) => { const inputHandler = debounce((keyword) => {
searchKeyword.value = keyword; searchKeyword.value = keyword;
emit('inputChange',keyword) emit('inputChange', keyword)
}, 300) }, 300)
configStore.$subscribe(() => { configStore.$subscribe(() => {
@ -54,7 +59,7 @@ function selectHandler(item: SearchEntity) {
// //
const searchName = () => { const searchName = () => {
configStore.setSearchValue(searchKeyword.value); configStore.setSearchValue(searchKeyword.value);
emit('inputChange',searchKeyword.value); emit('inputChange', searchKeyword.value);
} }
const close = () => { const close = () => {
@ -63,16 +68,29 @@ const close = () => {
emit('close'); emit('close');
} }
const initSerach = () => {
if (searchContent) {
emit('showSearch')
const id_param = searchContent.match(/-\d+-/);
if (id_param) {
searchKeyword.value = id_param[0].slice(1, -1);
emit('inputChange', searchKeyword.value)
}
}
}
onMounted(() => {
initSerach()
})
</script> </script>
<template> <template>
<div class="wrapper"> <div class="wrapper">
<n-popover <n-popover ref="popover" :style="{ padding: '0px' }" style="width: 248px" :show-arrow="false"
ref="popover" :style="{ padding: '0px' }" style="width: 248px" :show-arrow="false" placement="bottom-start" placement="bottom-start" trigger="focus">
trigger="focus"
>
<template #trigger> <template #trigger>
<n-input v-model:value="searchKeyword" style="width: 260px;height: 32px;" placeholder="请输入你需要搜索的内容" @input="inputHandler"> <n-input v-model:value="searchKeyword" style="width: 260px;height: 32px;" placeholder="请输入你需要搜索的内容"
@input="inputHandler">
<template #suffix> <template #suffix>
<SvgIcon size="14px" name="magnifying-1" @click="searchName" style="cursor: pointer;" /> <SvgIcon size="14px" name="magnifying-1" @click="searchName" style="cursor: pointer;" />
</template> </template>

@ -47,26 +47,24 @@ 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) => { item.tag = JSON.parse(item.busJson);
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 {
@ -127,6 +125,8 @@ function getMore() {
state.pageNo += 1; state.pageNo += 1;
getList("more"); getList("more");
} }
console.log(tabList);
</script> </script>
<template> <template>
@ -140,39 +140,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") }}
@ -190,8 +172,8 @@ function getMore() {
{{ item.titile }} {{ item.titile }}
</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.sendUserName }}</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 +238,7 @@ function getMore() {
.content { .content {
display: flex; display: flex;
.slider { .slider {
.icon { .icon {
width: 17px; width: 17px;
@ -276,6 +259,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 +275,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 +457,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>

@ -21,8 +21,13 @@ 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()
@ -130,25 +135,25 @@ 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
} catch (error) { } catch (error) {
return []; return [];
} finally { } finally {
@ -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,18 @@ defineExpose({
setAsideItemName, setAsideItemName,
}) })
const initSerach = () => {
if (searchContent) {
setShowSearch(true);
const id_param = searchContent.match(/-\d+-/);
if (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 +230,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 +259,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>

@ -76,7 +76,7 @@ async function fetchList() {
watch( watch(
() => taskStore.activeId, () => taskStore.activeId,
(newVal) => { (newVal) => {
// activeId.value = newVal activeId.value = newVal
}, },
) )

@ -760,6 +760,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
isFullScreen isFullScreen
? { ? {
height: '596px', height: '596px',
} }
: {} : {}
" "
@ -803,13 +804,15 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
? imgbigshow ? imgbigshow
? { ? {
position: 'relative', position: 'relative',
flex: 0.75, //width: '70vw',
flex: 1,
// flex: 0.75,
'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
} }
: { : {
height: '92vh', height: '92vh',
flex: 1, //flex: 1,
'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
} }
: { : {
@ -820,7 +823,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
@mouseleave="leaveTaskHandler" @mouseleave="leaveTaskHandler"
@click="previewHandler" @click="previewHandler"
> >
<div v-show="overTask" class="action"> <div v-show="overTask" class="action" style="z-index: 100">
<SvgIcon <SvgIcon
style="cursor: pointer" style="cursor: pointer"
name="t1" name="t1"
@ -959,13 +962,15 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
class="right" class="right"
:style=" :style="
isFullScreen isFullScreen
? { ? {flex: 0.3,
flex: '0.25', // flex: 0,
//width: '30vw',
borderLeft: '2px solid #507AFD', borderLeft: '2px solid #507AFD',
position: 'relative', position: 'relative',
borderRadius: 0, borderRadius: 0,
height:'596px'
} }
: {} : { flex: 0.5}
" "
> >
<div <div
@ -986,8 +991,8 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
/> />
</div> </div>
<n-scrollbar v-if="totalCount > 0" style="max-height: 100%"> <n-scrollbar v-if="totalCount > 0" style="max-height: 100%">
<div class="right-card"> <div class="right-card">
<div v-show="!isFullScreen" class="header"> <div v-show="!isFullScreen" class="header">
<span>相似图片({{ totalCount }})</span> <span>相似图片({{ totalCount }})</span>
<SvgIcon <SvgIcon
style="margin-right: 20px; cursor: pointer" style="margin-right: 20px; cursor: pointer"
@ -1073,12 +1078,12 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
</div> </div>
</div> </div>
<n-scrollbar v-else style="max-height: 100%"> <n-scrollbar v-else style="max-height: 100%">
<n-ellipsis <div
:style="{ fontSize: '22px', fontWeight: 500, color: '#0D0B22' }" :style="{ fontSize: '22px', fontWeight: 500, color: '#0D0B22' }"
> >
{{ taskDetailInfo.fromtaskname }} {{ taskDetailInfo.fromtaskname }}
</n-ellipsis> </div>
<div class="tags"> <div class="tags">
<div <div
v-if="taskDetailInfo?.userapprove?.statshis == 1" v-if="taskDetailInfo?.userapprove?.statshis == 1"
class="tag tag-submiting" class="tag tag-submiting"

@ -42,10 +42,10 @@ function getrowvalue(row) {
:class="item[0].blue ? 'blue' : ''" :class="item[0].blue ? 'blue' : ''"
@click="getrowvalue(item[0])" @click="getrowvalue(item[0])"
> >
<span v-show="item[0].label == '定位信息'"> <span :style="item[0].label == '定位信息'?{cursor:'pointer'}:{}" v-show="item[0].label == '定位信息'">
<SvgIcon class="icon" size="16" name="lctname" <SvgIcon class="icon" size="16" name="lctname"
/></span> /></span>
{{ item[0].value }} <span :style="item[0].label == '定位信息'?{cursor:'pointer'}:{}"> {{ item[0].value }}</span>
</td> </td>
<th v-if="item && item.length > 1"> <th v-if="item && item.length > 1">
{{ item[1].label }} {{ item[1].label }}
@ -55,10 +55,10 @@ function getrowvalue(row) {
:class="item[1].blue ? 'blue' : ''" :class="item[1].blue ? 'blue' : ''"
@click="getrowvalue(item[1])" @click="getrowvalue(item[1])"
> >
<span v-show="item[1].label == '定位信息'"> <span :style="item[0].label == '定位信息'?{cursor:'pointer'}:{}" v-show="item[1].label == '定位信息'">
<SvgIcon class="icon" size="16" name="lctname" /> <SvgIcon class="icon" size="16" name="lctname" />
</span> </span>
{{ item[1].value }} <span :style="item[1].label == '定位信息'?{cursor:'pointer'}:{}"> {{ item[1].value }}</span>
</td> </td>
</tr> </tr>
</table> </table>

@ -33,7 +33,7 @@ function setAsideItemName(text) {
top:0 top:0
} }
:deep(.ip_box){ :deep(.ip_box){
z-index: 105; z-index: 50;
} }
.main { .main {
display: flex; display: flex;

@ -163,11 +163,12 @@ function onCheckAllChange(value) {
function onCheckChange(checked: any, item: any) { function onCheckChange(checked: any, item: any) {
const index = selectIds.value.indexOf(item.id); const index = selectIds.value.indexOf(item.id);
if (index == -1 && selectIds.value.length >= 6) { // TODO
item.checked = false; // if (index == -1 && selectIds.value.length >= 6) {
message.error("自定义任务卡片字段一共勾选数量不能超过6个"); // item.checked = false;
return; // message.error("6");
} // return;
// }
item.checked = checked; item.checked = checked;
const currentIndex = offList.value.findIndex((v) => v.id == item.id); const currentIndex = offList.value.findIndex((v) => v.id == item.id);
offList.value[currentIndex].checked = checked; offList.value[currentIndex].checked = checked;
@ -355,6 +356,10 @@ function queryData(value, type) {
} }
} }
} }
const moreThanSix = computed(() => {
return selectIds.value.length >= 6;
});
</script> </script>
<template> <template>
@ -411,7 +416,7 @@ function queryData(value, type) {
<n-checkbox <n-checkbox
v-model:checked="item.checked" v-model:checked="item.checked"
:label="item.name" :label="item.name"
:disabled="item.fix" :disabled="item.fix || (!item.checked && moreThanSix)"
@update:checked="onCheckChange($event, item)" @update:checked="onCheckChange($event, item)"
/> />
</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;

@ -905,7 +905,7 @@ defineExpose({
.left { .left {
flex: 0.6; flex: 0.6;
background-size: 632px 346px; background-size: auto 346px;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;

Loading…
Cancel
Save