fix: 合并代码处理冲突

fix/modifyStyle
zhouxiaoan 2 years ago
commit 38a43bed83

@ -38,5 +38,6 @@
"json", "json",
"jsonc", "jsonc",
"yaml" "yaml"
] ],
"vue3snippets.enable-compile-vue-file-on-did-save-code": true
} }

@ -1,13 +1,13 @@
<script lang="ts" setup> <script lang="ts" setup>
import { dateZhCN, zhCN,NModalProvider } from "naive-ui"; import { dateZhCN, zhCN, NModalProvider } from "naive-ui";
import { computed, onMounted, nextTick,inject } from "vue"; import { computed, onMounted, nextTick, inject } from "vue";
import { AppProvider } from "@/components/Application"; import { AppProvider } from "@/components/Application";
import { lighten } from "@/utils/index"; import { lighten } from "@/utils/index";
import mouseTrapBind from '@/hooks/event/mouseTrapBind' import mouseTrapBind from "@/hooks/event/mouseTrapBind";
const mousetrap = inject('mousetrap') as any const mousetrap = inject("mousetrap") as any;
onMounted(()=>{ onMounted(() => {
mouseTrapBind(mousetrap); mouseTrapBind(mousetrap);
}) });
const getThemeOverrides = computed(() => { const getThemeOverrides = computed(() => {
const theme = "#1980FF"; const theme = "#1980FF";
@ -49,8 +49,6 @@ const getThemeOverrides = computed(() => {
}, },
}; };
}); });
</script> </script>
<template> <template>
@ -59,10 +57,10 @@ const getThemeOverrides = computed(() => {
:date-locale="dateZhCN" :date-locale="dateZhCN"
:theme-overrides="getThemeOverrides" :theme-overrides="getThemeOverrides"
> >
<NModalProvider> <NModalProvider>
<AppProvider> <AppProvider>
<RouterView /> <RouterView />
</AppProvider> </AppProvider>
</NModalProvider> </NModalProvider>
</NConfigProvider> </NConfigProvider>
</template> </template>
@ -80,14 +78,28 @@ const getThemeOverrides = computed(() => {
color: #666666 !important; color: #666666 !important;
font-size: 14px !important; font-size: 14px !important;
} }
::v-deep(.n-base-clear > .n-base-clear__clear){ ::v-deep(.n-base-clear > .n-base-clear__clear) {
color: #c9c9c9 !important; color: #c9c9c9 !important;
} }
.n-form-item.n-form-item--top-labelled .n-form-item-label{ .n-form-item.n-form-item--top-labelled .n-form-item-label {
flex-direction: row-reverse !important; flex-direction: row-reverse !important;
justify-content: flex-end !important; justify-content: flex-end !important;
} }
.n-form-item .n-form-item-label .n-form-item-label__asterisk{ .n-form-item .n-form-item-label .n-form-item-label__asterisk {
transform:rotate(-90deg) !important; transform: rotate(-90deg) !important;
}
.n-scrollbar-content {
padding: 0 7.97px 0 4px;
}
.n-form-item .n-form-item-label {
font-size: 14px !important;
color: #333333 !important;
}
.n-slider-dots > .n-slider-dot:nth-child(2) {
display: none !important;
}
.n-collapse-item-arrow i svg {
width: 14px !important;
height: 14px !important;
} }
</style> </style>

@ -4,7 +4,7 @@ import { useMessage } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary' import { useDictionary } from '@/store/modules/dictonary'
import { audit } from '@/api/task/task' import { audit } from '@/api/task/task'
const emit = defineEmits(['success']) const emit = defineEmits(['success','close'])
const message = useMessage() const message = useMessage()
const loading = ref(false) const loading = ref(false)
@ -42,6 +42,11 @@ function showModal(value) {
function closeModal() { function closeModal() {
show.value = false show.value = false
emit('close')
formData.disposeTypeId='262403670085013522'
formData.failCauseId= '260402999231251188'
formData.comment= ''
} }
defineExpose({ defineExpose({
@ -113,6 +118,9 @@ async function handleSumbit(e: MouseEvent) {
} }
} }
}) })
formData.disposeTypeId='262403670085013522'
formData.failCauseId= '260402999231251188'
formData.comment= ''
} }
async function selectChange(id) { async function selectChange(id) {

@ -111,11 +111,17 @@ watch(viewMode, () => {
layout() layout()
}) })
onBeforeMount(async () => {
})
let canloadMore = true let canloadMore = true
useInfiniteScroll( useInfiniteScroll(
el as any, el as any,
() => { () => {
loading = false
console.log("加载了000000000000000---------------------------");
loadMore() loadMore()
}, },
{ distance: 10, canLoadMore: () => canloadMore }, { distance: 10, canLoadMore: () => canloadMore },
@ -125,13 +131,15 @@ async function featchList() {
loading = true loading = true
try { try {
// const result = await dubiousfilelist({ ...pagination, orderbyname: timeRange.value }) // const result = await dubiousfilelist({ ...pagination, orderbyname: timeRange.value })
console.log("pagination.pageNo------------", pagination.pageNo);
const result = await dubiousfilelist({ ...pagination, ...sortObj }) const result = await dubiousfilelist({ ...pagination, ...sortObj })
// TODO // TODO
// result.data = Array.from({ length: 30 }) // result.data = Array.from({ length: 30 })
result.pageCount = 1
const { data, pageCount } = result const { data, pageCount } = result
pagination.pageNo += 1 // canloadMore = pageCount >= pagination.pageNo && pageCount > 0;
canloadMore = pageCount >= pagination.pageNo canloadMore = data.pages >= pagination.pageNo && data.pages > 0;
console.log("canloadMore------------", canloadMore);
return result.data.records return result.data.records
// const list = data.map((item) => { // const list = data.map((item) => {
// return { // return {
@ -141,18 +149,23 @@ async function featchList() {
// return list // return list
} }
catch (error) { catch (error) {
canloadMore = false;
return [] return []
} }
} }
async function loadMore() { async function loadMore() {
console.log("执行l------------------------", loading, el.value);
console.log("执行l------------------------", loading, el.value, pagination.pageNo);
if (loading || el.value == null) if (loading || el.value == null)
return return
// loading = true // loading = true
pagination.pageNo = pagination.pageNo + 1;
const more = await featchList() const more = await featchList()
console.log("more------------------------", more);
listData.value.push(...more) listData.value.push(...more)
layout()
} }
onUpdated(() => { onUpdated(() => {
@ -170,11 +183,6 @@ onUpdated(() => {
layout() layout()
}) })
onBeforeMount(async () => {
// const list = await featchList()
// listData.value = list
})
let start: { x: number, y: number } | null = null let start: { x: number, y: number } | null = null
let selectionBox: HTMLDivElement | null let selectionBox: HTMLDivElement | null
const selectIds = ref<string[]>([]) const selectIds = ref<string[]>([])
@ -308,7 +316,7 @@ function upHandler(event: MouseEvent) {
listData.value.map(item => { listData.value.map(item => {
item.checked = false; item.checked = false;
}); });
batch.value = false; // batch.value = false;
} }
} }
@ -351,7 +359,7 @@ function afterLeave() {
removeListeners() removeListeners()
} }
onMounted(() => { onMounted(async() => {
show.value && addListeners() show.value && addListeners()
removeDom() removeDom()
}) })
@ -476,7 +484,7 @@ function rejectHandler() {
function reset() { function reset() {
batch.value = false; batch.value = false;
// pagination.pageNo = 1; // pagination.pageNo = 1;
pagination.pageNo = 0; pagination.pageNo = 1;
pagination.pageSize = 20; pagination.pageSize = 20;
selectIds.value = []; selectIds.value = [];
selectedApproveItems.value.length = 0; selectedApproveItems.value.length = 0;
@ -489,13 +497,13 @@ function validate(items: any[]) {
return null; return null;
} }
function approvalHandler(items?: any) { function approvalHandler(items?: any) {
if (batch.value) { // if (batch.value) {
processItems = selectedApproveItems.value processItems = selectedApproveItems.value
} // }
// => => / // => => /
if (items !== undefined && !(items instanceof PointerEvent)) if (items !== undefined && !(items instanceof PointerEvent))
processItems = [items] processItems = [items]
console.log("batch-------------",batch.value,selectedApproveItems.value,processItems);
const msg = validate(processItems) const msg = validate(processItems)
if (msg !== null) { if (msg !== null) {
@ -553,9 +561,10 @@ function reloadList() {
async function refreshHandler(filtersearchId?: any) { async function refreshHandler(filtersearchId?: any) {
// rao start // rao start
reset() reset()
pagination.pageNo = 1;
const list = await featchList() const list = await featchList()
listData.value = list listData.value = list
// layout() layout()
// rao end // rao end
// reset(); // reset();
@ -568,6 +577,7 @@ async function refreshHandler(filtersearchId?: any) {
useInfiniteScroll( useInfiniteScroll(
el as any, el as any,
() => { () => {
console.log("加载了333333333333333333333333---------------------------");
loadMore(); loadMore();
}, },
{ distance: 10, canLoadMore: () => canloadMore } { distance: 10, canLoadMore: () => canloadMore }
@ -576,6 +586,36 @@ async function refreshHandler(filtersearchId?: any) {
}); });
} }
watch(() => show.value,
async(newVal) => {
if(show.value) {
pagination.pageNo = 1;
const list = await featchList()
listData.value = list
console.log("加载了1111111111111---------------------------", listData.value);
layout()
}
},
)
watch(() => pagination.pageNo,
(newVal, oldVal) => {
if(newVal == oldVal) {
return
}
if((newVal == 1 || newVal == 2) && canloadMore) {
setTimeout(() => {
nextTick(() => {
console.log("加载了22222222222222222---------------------------", newVal);
loading = false
loadMore();
})
}, 500)
}
},
);
</script> </script>
<template> <template>

@ -198,12 +198,10 @@ export default defineComponent({
<!-- 菜单收起 --> <!-- 菜单收起 -->
<div <div
class="ml-1 layout-header-trigger layout-header-trigger-min" class="ml-1 layout-header-trigger layout-header-trigger-min"
style="padding-top: 2px;"
@click="() => $emit('update:collapsed', !collapsed)" @click="() => $emit('update:collapsed', !collapsed)"
> >
<SvgIcon name="homepage" size="16" /> <SvgIcon name="homepage" size="16" />
</div> </div>
<div>当前位置{{ routename }}</div> <div>当前位置{{ routename }}</div>
</div> </div>
<div class="layout-header-right"> <div class="layout-header-right">
@ -229,7 +227,7 @@ export default defineComponent({
<!-- 个人中心 --> <!-- 个人中心 -->
<div class="layout-header-trigger layout-header-trigger-min"> <div class="layout-header-trigger layout-header-trigger-min">
<!-- <n-avatar :src="getImgUrl(useInfo.usericon)" round /> --> <!-- <n-avatar :src="getImgUrl(useInfo.usericon)" round /> -->
<n-avatar :src="(useInfo.usericon && getImgUrl(useInfo.usericon)) || defaultAvatarSrc" round /> <n-avatar style="width:36px;height:36px;" :src="(useInfo.usericon && getImgUrl(useInfo.usericon)) || defaultAvatarSrc" round />
</div> </div>
<!-- 设置 --> <!-- 设置 -->
<UserSettings @logout="doLogout" /> <UserSettings @logout="doLogout" />
@ -255,6 +253,7 @@ export default defineComponent({
&-left { &-left {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start;
color: #666666; color: #666666;
.logo { .logo {

@ -68,11 +68,14 @@ export default defineComponent({
return v; return v;
}); });
} }
console.log(userInfo.frontmenuTList,'frontmenuTList');
console.log(menus.value,'menus')
updateSelectedKeys(); updateSelectedKeys();
} }
// //
function clickMenuItem(key: string) { function clickMenuItem(key: string) {
console.log('clickMenuItem',key)
if (/http(s)?:/.test(key)) window.open(key); if (/http(s)?:/.test(key)) window.open(key);
else router.push({ name: key }); else router.push({ name: key });

@ -1,21 +1,17 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, unref } from 'vue' import { computed, unref } from "vue";
import { Logo } from './components/Logo' import { Logo } from "./components/Logo";
import { MainView } from './components/Main' import { MainView } from "./components/Main";
import { AsideMenu } from './components/Menu' import { AsideMenu } from "./components/Menu";
import { PageHeader } from './components/Header' import { PageHeader } from "./components/Header";
import { useProjectSetting } from '@/hooks/setting/useProjectSetting' import { useProjectSetting } from "@/hooks/setting/useProjectSetting";
const { const { menuSetting } = useProjectSetting();
menuSetting,
} = useProjectSetting()
const leftMenuWidth = computed(() => { const leftMenuWidth = computed(() => {
const { minMenuWidth } = unref(menuSetting) const { minMenuWidth } = unref(menuSetting);
return minMenuWidth return minMenuWidth;
}) });
</script> </script>
<template> <template>
@ -45,12 +41,12 @@ const leftMenuWidth = computed(() => {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex: auto; flex: auto;
background-image: url('../assets/images/bg.png'); background-image: url("../assets/images/bg.png");
background-size: cover; background-size: cover;
// height: 1100px; // height: 1100px;
// width: 1440px; // width: 1440px;
height: 100%; height: 100%;
max-height:1100px; max-height: 1100px;
overflow: hidden; overflow: hidden;
.layout-sider { .layout-sider {
min-height: 100vh; min-height: 100vh;
@ -76,7 +72,7 @@ const leftMenuWidth = computed(() => {
display: flex; display: flex;
flex: auto; flex: auto;
height: 100%; height: 100%;
padding: 0px 16px 24px 16px; // padding: 0px 16px 24px 16px;
overflow-x: hidden; overflow-x: hidden;
box-sizing: border-box; box-sizing: border-box;
} }

@ -28,7 +28,7 @@ const routes: Array<RouteRecordRaw> = [
children: [ children: [
{ {
path: 'final', path: 'final',
name: 'FinalMain', name: 'final-main',
meta: { meta: {
title: '任务终审', title: '任务终审',
keepAlive: true, keepAlive: true,

@ -1,7 +1,7 @@
import { defineStore } from 'pinia'
import type { TaskState } from '/#/task'
import { getApprovalList } from '@/api/task/task' import { getApprovalList } from '@/api/task/task'
import { store } from '@/store' import { store } from '@/store'
import { defineStore } from 'pinia'
import type { TaskState } from '/#/task'
export const useTaskStore = defineStore({ export const useTaskStore = defineStore({
id: 'task-store', id: 'task-store',
@ -12,6 +12,7 @@ export const useTaskStore = defineStore({
packageid: '', packageid: '',
immersion: false, immersion: false,
inFile: false, // 是否进入文件夹 inFile: false, // 是否进入文件夹
inFileId:"",
}), }),
getters: { getters: {
getActiveId: (state: TaskState) => state.activeId, getActiveId: (state: TaskState) => state.activeId,
@ -19,6 +20,7 @@ export const useTaskStore = defineStore({
getCurrentIndex: (state: TaskState) => state.currentIndex, getCurrentIndex: (state: TaskState) => state.currentIndex,
getApprovalList: (state: TaskState) => state.approvalList, getApprovalList: (state: TaskState) => state.approvalList,
getInFile: (state: TaskState) => state.inFile, getInFile: (state: TaskState) => state.inFile,
getInFileId: (state: TaskState) => state.inFileId,
}, },
actions: { actions: {
setApprovalList(list: any[]) { setApprovalList(list: any[]) {
@ -27,6 +29,9 @@ export const useTaskStore = defineStore({
setInFile(flag: any) { setInFile(flag: any) {
this.inFile = flag this.inFile = flag
}, },
setInFileId(id: any) {
this.inFileId = id
},
setActive(index: number, taskId?: string) { setActive(index: number, taskId?: string) {
this.currentIndex = index this.currentIndex = index
const task = this.approvalList[index] const task = this.approvalList[index]

@ -574,15 +574,13 @@ const scrollX = computed(() => {
return return
const tableEl: any = table?.$el const tableEl: any = table?.$el
const wrapper = tableEl.querySelector('.n-data-table-wrapper') const wrapper = tableEl.querySelector('.n-data-table-wrapper')
const arr = columnsRef.value.filter(item => !item.fixed) // const arr = columnsRef.value.filter(item => !item.fixed)
let width = 0 let width = 0
console.log(arr) columnsRef.value.forEach((item) => {
arr.forEach((item) => {
width += Number(item.width) || 200 width += Number(item.width) || 200
}) })
console.log(wrapper.offsetWidth + width)
console.log(arr) return width
return wrapper.offsetWidth + width
}) })
query(pagination.page, pagination.pageSize) query(pagination.page, pagination.pageSize)
@ -1196,4 +1194,8 @@ defineExpose({
:deep(.n-data-table .n-data-table-td) { :deep(.n-data-table .n-data-table-td) {
color: #666; color: #666;
} }
:deep(.n-data-table .n-data-table-base-table-header) {
overflow: hidden;
}
</style> </style>

@ -101,7 +101,8 @@ onBeforeMount(async () => {
configStore.fetchCustomConfig(); configStore.fetchCustomConfig();
}); });
configStore.$subscribe(() => { nextTick(()=>{
configStore.$subscribe(() => {
const config = configStore.getConfig; const config = configStore.getConfig;
const customConfig = configStore.getCustomConfig; const customConfig = configStore.getCustomConfig;
if ( if (
@ -122,7 +123,7 @@ configStore.$subscribe(() => {
let sortKeyList: any = []; let sortKeyList: any = [];
configStore.getFilterConfig.map((item: any) => { configStore.getFilterConfig.map((item: any) => {
sortKeyList.push(item.id); sortKeyList.push(item?.id);
}); });
const showKeys = [...sortKeyList]; const showKeys = [...sortKeyList];
@ -172,10 +173,10 @@ configStore.$subscribe(() => {
} }
// console.log("showKeys", showKeys); // console.log("showKeys", showKeys);
const items = showKeys.reduce((acc, key) => { const items = showKeys.reduce((acc, key) => {
const { render } = asideMap[key]; const currentData = asideMap[key];
const render = currentData?.render;
if (render !== false) { if (render !== false) {
const str = key.toLowerCase(); const str = key?.toLowerCase();
const o = { const o = {
key: str, key: str,
@ -191,6 +192,7 @@ configStore.$subscribe(() => {
configFilterRef.value = configStore.getFilterConfig; configFilterRef.value = configStore.getFilterConfig;
}); });
})
const asideEnter = ref(false); const asideEnter = ref(false);
const showCollapse = computed(() => { const showCollapse = computed(() => {

@ -254,13 +254,13 @@ const moveEnd = () => {
}); });
}; };
const setCurrentlySelectedAdvanced = (value:string)=>{ const setCurrentlySelectedAdvanced = (value: string) => {
currentlySelectedAdvanced.value = value; currentlySelectedAdvanced.value = value;
} };
defineExpose({ defineExpose({
setCurrentlySelectedAdvanced setCurrentlySelectedAdvanced,
}) });
</script> </script>
<template> <template>
@ -277,9 +277,15 @@ defineExpose({
> >
<template #trigger> <template #trigger>
<div class="wrapper-left-dropdown" @click="showClick"> <div class="wrapper-left-dropdown" @click="showClick">
<span style="font-size: 20px; color: #333333; font-weight: Medium;font-size:17px;font-weight:600">{{ <span
currentlySelectedAdvanced style="
}}</span> color: #333333;
font-weight: Medium;
font-size: 17px;
font-weight: 600;
"
>{{ currentlySelectedAdvanced }}</span
>
<SvgIcon <SvgIcon
:style="{ marginLeft: '5px' }" :style="{ marginLeft: '5px' }"
name="down" name="down"
@ -293,8 +299,12 @@ defineExpose({
<n-form :rules="rules" ref="ruleformRef" :model="ruleForm"> <n-form :rules="rules" ref="ruleformRef" :model="ruleForm">
<n-form-item path="keyword"> <n-form-item path="keyword">
<n-input <n-input
:style="{ '--n-border': '0px', '--n-display': 'block' }" :style="{
placeholder="请输入关键字" '--n-border': '0px',
'--n-display': 'block',
'--n-height': '40px',
}"
placeholder="请输入关键词"
@input="inputHandler" @input="inputHandler"
:value="ruleForm.keyword" :value="ruleForm.keyword"
:minlength="2" :minlength="2"
@ -304,7 +314,7 @@ defineExpose({
</template> </template>
<template #suffix> <template #suffix>
<SvgIcon <SvgIcon
size="14px" size="16"
style="cursor: pointer" style="cursor: pointer"
name="setting" name="setting"
@click="emit('show-filter')" @click="emit('show-filter')"
@ -362,13 +372,13 @@ defineExpose({
class="cursor-move draggable-li fix" class="cursor-move draggable-li fix"
:draggable="true" :draggable="true"
> >
<SvgIcon name="drag" size="18" style="margin-right: 3px" /> <SvgIcon name="drag" size="10" style="margin-right: 3px" />
<SvgIcon <SvgIcon
v-if="item.favorite && !item.isDefaultFilter" v-if="item.favorite && !item.isDefaultFilter"
name="favorite-fill" name="favorite-fill"
color="#fd9b0a" color="#fd9b0a"
width="13" width="13"
height="12" height="12"
fill="#666666" fill="#666666"
style="cursor: pointer !important; margin-right: 3px" style="cursor: pointer !important; margin-right: 3px"
@click="unFavoriteHandler($event, item)" @click="unFavoriteHandler($event, item)"
@ -377,7 +387,7 @@ defineExpose({
v-else-if="!item.favorite && !item.isDefaultFilter" v-else-if="!item.favorite && !item.isDefaultFilter"
name="favorite-unfill" name="favorite-unfill"
width="13" width="13"
height="12" height="12"
fill="#666666" fill="#666666"
style="cursor: pointer !important; margin-right: 3px" style="cursor: pointer !important; margin-right: 3px"
@click="favoriteHandler($event, item)" @click="favoriteHandler($event, item)"
@ -414,9 +424,9 @@ defineExpose({
align-items: center; align-items: center;
position: absolute; position: absolute;
left: 0; left: 0;
top: -5px; top: -10px;
width: 100%; width: 100%;
padding: 12px 16px; padding: 17px 16px;
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;
z-index: 10; z-index: 10;
background: #ffffff; background: #ffffff;
@ -457,8 +467,6 @@ defineExpose({
line-height: 22px; line-height: 22px;
padding: 8px 12px; padding: 8px 12px;
&:hover { &:hover {
background-color: #f3f8ff; background-color: #f3f8ff;
} }
@ -471,6 +479,10 @@ defineExpose({
align-items: center; align-items: center;
} }
} }
.wrapper-left-popover {
width: 248px;
height: 288px;
}
::v-deep(.wrapper-left-popover .n-form-item) { ::v-deep(.wrapper-left-popover .n-form-item) {
display: block !important; display: block !important;
} }

@ -10,12 +10,12 @@ configUseStore.$subscribe(() => {
return; return;
} }
let asideValue = configUseStore.getAsideValue; let asideValue = configUseStore.getAsideValue;
if(asideValue['izsimilarity']) { if (asideValue["izsimilarity"]) {
range.value = asideValue['izsimilarity'] range.value = asideValue["izsimilarity"];
}else { } else {
range.value = [0, 100]; range.value = [0, 100];
} }
console.log(range.value, 'range.value') console.log(range.value, "range.value");
// else { // else {
// range.value = [0, 100]; // range.value = [0, 100];
// } // }

@ -1,54 +1,53 @@
<script lang="ts" setup> <script lang="ts" setup>
import dayjs from 'dayjs'; import dayjs from "dayjs";
import { onUpdated, watch } from 'vue'; import { onUpdated, watch } from "vue";
import { onMounted, ref } from 'vue'; import { onMounted, ref } from "vue";
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from "@/store/modules/asideConfig";
const configUseStore = useConfig() const configUseStore = useConfig();
configUseStore.$subscribe(() => { configUseStore.$subscribe(() => {
if(isLoadValue.value) { if (isLoadValue.value) {
isLoadValue.value = false; isLoadValue.value = false;
return return;
} }
let asideValue = configUseStore.getAsideValue; let asideValue = configUseStore.getAsideValue;
if(asideValue['izyear']) { if (asideValue["izyear"]) {
time.value = asideValue['izyear'] time.value = asideValue["izyear"];
}else { } else {
time.value = null; time.value = null;
} }
}); });
const props = defineProps<{ const props = defineProps<{
value: [number, number] | null value: [number, number] | null;
label: string label: string;
}>() }>();
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'update:value', value: number[]): void (e: "update:value", value: number[]): void;
}>() }>();
const time = ref<[number, number] | null>(props.value) const time = ref<[number, number] | null>(props.value);
const isLoadValue = ref(false) const isLoadValue = ref(false);
function onChange(value: [number, number]) { function onChange(value: [number, number]) {
isLoadValue.value = true; isLoadValue.value = true;
emit('update:value', value) emit("update:value", value);
} }
onMounted(() => { onMounted(() => {
if(!props.value) { if (!props.value) {
// //
const currentDate = dayjs(); const currentDate = dayjs();
// //
const endDate = currentDate.toDate(); const endDate = currentDate.toDate();
const startDate = currentDate.subtract(3, 'month').toDate(); const startDate = currentDate.subtract(3, "month").toDate();
// //
time.value = [startDate.getTime(), endDate.getTime()]; time.value = [startDate.getTime(), endDate.getTime()];
console.log('time init', startDate.getTime(), endDate.getTime()); console.log("time init", startDate.getTime(), endDate.getTime());
setTimeout(() => { setTimeout(() => {
emit('update:value', [startDate.getTime(), endDate.getTime()]) emit("update:value", [startDate.getTime(), endDate.getTime()]);
},300) }, 300);
} }
}) });
</script> </script>
<template> <template>
@ -56,10 +55,14 @@ onMounted(() => {
<n-collapse :default-expanded-names="['1']" arrow-placement="right"> <n-collapse :default-expanded-names="['1']" arrow-placement="right">
<n-collapse-item :title="label" name="1"> <n-collapse-item :title="label" name="1">
<n-space> <n-space>
<n-date-picker v-model:value="time" type="daterange" :clearable="false" @update:value="onChange"> <n-date-picker
<template #separator> v-model:value="time"
type="daterange"
</template> :clearable="false"
@update:value="onChange"
placeholder="请选择"
>
<template #separator> </template>
</n-date-picker> </n-date-picker>
</n-space> </n-space>
</n-collapse-item> </n-collapse-item>
@ -79,15 +82,20 @@ onMounted(() => {
::v-deep(.n-input__separator) { ::v-deep(.n-input__separator) {
color: #999999 !important; color: #999999 !important;
} }
::v-deep(.n-collapse .n-collapse-item:not(.n-collapse-item--disabled).n-collapse-item--trigger-area-main .n-collapse-item__header .n-collapse-item__header-main){ ::v-deep(.n-collapse
.n-collapse-item:not(.n-collapse-item--disabled).n-collapse-item--trigger-area-main
.n-collapse-item__header
.n-collapse-item__header-main) {
margin-left: 10px; margin-left: 10px;
} }
::v-deep(.n-collapse .n-collapse-item:not(.n-collapse-item--disabled).n-collapse-item--trigger-area-main .n-collapse-item__header .n-collapse-item__header-main::before){ ::v-deep(.n-collapse
content: '*'; .n-collapse-item:not(.n-collapse-item--disabled).n-collapse-item--trigger-area-main
.n-collapse-item__header
.n-collapse-item__header-main::before) {
content: "*";
position: absolute; position: absolute;
left: 0; left: 0;
top: 2px; top: 2px;
color: red; color: red;
} }
</style> </style>

@ -236,7 +236,7 @@ function onCheckChange(checked: any, item: any) {
const showIds = computed(() => { const showIds = computed(() => {
return onList.value.map((item) => { return onList.value.map((item) => {
return item.id return item?.id
}) })
}) })

@ -378,7 +378,7 @@ async function tasksLoadingCloseCallback() {
async function showLoginSuccessModal() { async function showLoginSuccessModal() {
const modal = LoginSuccessModalRef.value as any; const modal = LoginSuccessModalRef.value as any;
modal.showModal() modal.showModal();
} }
// id // id
@ -623,9 +623,8 @@ const loadImgOver = (item) => {
}; };
defineExpose({ defineExpose({
showLoginSuccessModal showLoginSuccessModal,
}) });
</script> </script>
<template> <template>
@ -633,7 +632,7 @@ defineExpose({
<div class="wrapper-header"> <div class="wrapper-header">
<div class="left"> <div class="left">
<SvgIcon size="32" name="magnifying" /> <SvgIcon size="32" name="magnifying" />
<span class="font" style="margin-left: 19.2px;" >AI一键查重</span> <span class="font" style="margin-left: 19.2px">AI一键查重</span>
</div> </div>
<div class="flex-btn-icon"> <div class="flex-btn-icon">
<SvgIcon <SvgIcon

@ -1,73 +1,120 @@
<script lang="ts" setup> <script lang="ts" setup>
import { defineOptions, onMounted, ref, onBeforeUnmount } from 'vue'; import { defineOptions, onMounted, ref, onBeforeUnmount } from "vue";
import { useRouter } from 'vue-router'; import { useRouter } from "vue-router";
defineOptions({ name: 'ShortcutModal' })
defineOptions({ name: "ShortcutModal" });
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'refresh', value: any), (e: "refresh", value: any);
(e: 'cancel', value: any) (e: "cancel", value: any);
}>() }>();
const show = ref(false) const show = ref(false);
const isFold = ref(false) const isFold = ref(false);
const router = useRouter() const router = useRouter();
const cardStyle = { const cardStyle = {
'width': '29vw', width: "29vw",
'--n-padding-bottom': '10px', "--n-padding-bottom": "10px",
'--n-padding-left': '10px', "--n-padding-left": "10px",
} };
function toggle() { function toggle() {
isFold.value = !isFold.value isFold.value = !isFold.value;
} }
function showModal() { function showModal() {
show.value = true show.value = true;
} }
function closeModal() { function closeModal() {
show.value = false show.value = false;
} }
function refresh() { function refresh() {
emit('refresh', true) emit("refresh", true);
} }
function cancel() { function cancel() {
closeModal() closeModal();
emit('cancel', true) emit("cancel", true);
} }
const time = ref(); const time = ref();
onMounted(() => { onMounted(() => {
time.value = setInterval(() => { time.value = setInterval(() => {
// console.log("00000000-----------"); // console.log("00000000-----------");
show.value && refresh(); show.value && refresh();
}, 5000); }, 5000);
}); });
onBeforeUnmount(() => { onBeforeUnmount(() => {
clearInterval(time.value); clearInterval(time.value);
time.value = null; time.value = null;
}); });
defineExpose({ defineExpose({
showModal, showModal,
closeModal closeModal,
}) });
</script> </script>
<template> <template>
<div class="removeMask"> <div class="removeMask">
<!-- <n-modal v-model:show="show" :show-mask="false" :mask-closable="false" transform-origin="center" style="position: fixed;right: 0;bottom: 0;"> --> <!-- <n-modal v-model:show="show" :show-mask="false" :mask-closable="false" transform-origin="center" style="position: fixed;right: 0;bottom: 0;"> -->
<div v-if="show" style="position: fixed;right: 0;bottom: 0; float: left; z-index: 999;" > <div
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true" style="padding: 8px 8px 0 8px;"> v-if="show"
style="
position: fixed;
right: 0;
bottom: 0;
float: left;
z-index: 999;
width: 360px;
height: 157px;
"
>
<n-card
:style="cardStyle"
:bordered="false"
size="huge"
role="dialog"
aria-modal="true"
style="padding: 8px 8px 0 8px"
>
<div class="wrapper"> <div class="wrapper">
<div class="title">查重进度</div> <div class="title">查重进度</div>
<div class="icon-list"> <div class="icon-list">
<svg-icon size="20" name="refresh" @click="refresh" style="margin-right: 16px;cursor: pointer;" /> <svg-icon
<svg-icon v-show="!isFold" size="20" name="down-line" style="margin-right: 16px;cursor: pointer;" @click="toggle"/> size="16"
<svg-icon v-show="isFold" size="20" name="top-line" style="margin-right: 16px;cursor: pointer;" @click="toggle"/> name="refresh"
<svg-icon size="20" name="close-none-border" @click="cancel" style="margin-right: 16px;cursor: pointer;"/> @click="refresh"
style="margin-right: 16px; cursor: pointer"
/>
<svg-icon
v-show="!isFold"
size="16"
name="down-line"
style="margin-right: 16px; cursor: pointer"
@click="toggle"
/>
<svg-icon
v-show="isFold"
size="16"
name="top-line"
style="margin-right: 16px; cursor: pointer"
@click="toggle"
/>
<svg-icon
size="16"
name="close-none-border"
@click="cancel"
style="margin-right: 25.7px; cursor: pointer"
/>
</div> </div>
</div> </div>
<div v-show="!isFold" style="display: flex;background-color: #F9F9F9;height: 54px;margin-top: 24px;margin-bottom: 6px;"> <div
v-show="!isFold"
style="
display: flex;
background-color: #f9f9f9;
height: 54px;
margin-top: 24px;
margin-bottom: 6px;
"
>
<div><svg-icon size="40" name="robot2" /></div> <div><svg-icon size="40" name="robot2" /></div>
<div class="msg"> <div class="msg">
<div>正在查重中</div> <div>正在查重中</div>
@ -80,19 +127,22 @@ defineExpose({
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.wrapper{ .wrapper {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 357px;
border-bottom: 1px solid rgba(0, 0, 0, 0.09); border-bottom: 1px solid rgba(0, 0, 0, 0.09);
margin: 0 -18px; margin: 0 -18px;
} }
.icon-list{ .icon-list {
} }
.title { .title {
padding-left: 24px; padding-left: 24px;
padding-top: 6px;
padding-bottom: 10px; padding-bottom: 10px;
color: #333333; color: #333333;
font-size: 16px font-size: 16px;
font-weight: 500;
} }
.msg { .msg {

@ -74,7 +74,6 @@ defineExpose({
<div class="num_box">{{ 83 }}</div> <div class="num_box">{{ 83 }}</div>
<div class="title_box">重复图片</div> <div class="title_box">重复图片</div>
</div> </div>
</div> </div>
<div class="footer" @click="viewRepeat"></div> <div class="footer" @click="viewRepeat"></div>
<!-- <div class="footer"> <!-- <div class="footer">
@ -106,7 +105,7 @@ defineExpose({
left: calc(50% - 286px); left: calc(50% - 286px);
.wrapper-hearder { .wrapper-hearder {
margin-top: 80px; margin-top: 80px;
margin-left:18px; margin-left: 18px;
.wrapper-title { .wrapper-title {
text-align: center; text-align: center;
font-size: 16px; font-size: 16px;
@ -214,8 +213,9 @@ defineExpose({
position: relative; position: relative;
bottom: -30px; bottom: -30px;
left: 20px; left: 20px;
font-size: 24px; font-size: 20px;
font-weight: 400;
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei-Regular; font-family: YouSheBiaoTiHei, YouSheBiaoTiHei-Regular;
text-align: center; text-align: center;
color: #ffffff; color: #ffffff;

@ -80,7 +80,8 @@ function afterLeave() {
<span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</span> <span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</span>
</div> </div>
</div> </div>
<n-form ref="formRef" :model="model" require-mark-placement="left" style="margin-top: 8px;" :rules="rules"> <!-- require-mark-placement="left" -->
<n-form ref="formRef" :model="model" style="margin-top: 8px;" :rules="rules">
<n-form-item class="wrapper-task-package-name" path="packagename" label="任务包名称"> <n-form-item class="wrapper-task-package-name" path="packagename" label="任务包名称">
<n-input v-model:value="model.packagename" maxlength="12" @keydown.enter.prevent /> <n-input v-model:value="model.packagename" maxlength="12" @keydown.enter.prevent />
</n-form-item> </n-form-item>
@ -109,7 +110,7 @@ function afterLeave() {
.wrapper { .wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 14px 14px 0 14px ;
&-title { &-title {
font-weight: 600; font-weight: 600;
// font-weight: bold; // font-weight: bold;
@ -120,7 +121,9 @@ function afterLeave() {
&-bar { &-bar {
background-color: #f8f8f8; background-color: #f8f8f8;
width: 100%; width: 100%;
margin-top: 20px; margin-top: 24px;
font-size: 16px;
margin-bottom: 16px;
span { span {
color: #333; color: #333;
} }
@ -135,6 +138,8 @@ function afterLeave() {
&-task-package-name { &-task-package-name {
::v-deep(.n-form-item-label) { ::v-deep(.n-form-item-label) {
color: #666; color: #666;
font-weight: 500;
margin-bottom: 8px;
} }
} }
@ -157,6 +162,11 @@ function afterLeave() {
&-footer { &-footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
padding-bottom:6px ;
button{
font-size: 14px !important;
font-weight: 500 !important;
}
} }
&-info { &-info {
@ -174,4 +184,8 @@ function afterLeave() {
} }
} }
} }
::v-deep(.n-button--info-type){
}
</style> </style>

@ -1,63 +1,72 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue'; import { ref } from "vue";
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from "@/store/modules/asideConfig";
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'closeCallback', value: any), (e: "closeCallback", value: any);
}>() }>();
const show = ref(false);
const show = ref(false)
const stys = { const stys = {
'width': '424px', width: "424px",
'height': '232px', height: "232px",
'--n-padding-bottom': '20px', "--n-padding-bottom": "20px",
'--n-padding-left': '0px', "--n-padding-left": "0px",
'background': 'linear-gradient(132deg, rgba(255, 255, 255, 0.32) 21%, rgba(152, 172, 255, 0.14) 100%)', background:
'border-radius': '4px', "linear-gradient(132deg, rgba(255, 255, 255, 0.32) 21%, rgba(152, 172, 255, 0.14) 100%)",
'box-shadow': '0px 12px 48px 16px rgba(0, 0, 0, 0.03)', "border-radius": "4px",
'backdrop-filter': ' blur(10px)', "box-shadow": "0px 12px 48px 16px rgba(0, 0, 0, 0.03)",
} "backdrop-filter": " blur(10px)",
};
function showModal() { function showModal() {
show.value = true show.value = true;
} }
function closeModal() { function closeModal() {
show.value = false show.value = false;
emit('closeCallback', true) emit("closeCallback", true);
} }
function closeOnlyModal() { function closeOnlyModal() {
show.value = false show.value = false;
} }
defineExpose({ defineExpose({
showModal, showModal,
closeModal, closeModal,
closeOnlyModal, closeOnlyModal,
}) });
const configStore = useConfig() const configStore = useConfig();
const percent = ref(0); const percent = ref(0);
configStore.$subscribe(() => { configStore.$subscribe(() => {
percent.value = configStore.getTimeNum; percent.value = configStore.getTimeNum;
}); });
</script> </script>
<template> <template>
<n-modal v-model:show="show" :mask-closable="false" :show-mask="false" transform-origin="center"> <n-modal
v-model:show="show"
:mask-closable="false"
:show-mask="false"
transform-origin="center"
>
<n-card :style="stys" :bordered="false" role="dialog" aria-modal="true"> <n-card :style="stys" :bordered="false" role="dialog" aria-modal="true">
<svg-icon size="15" name="close" @click="closeModal" style="position:absolute; right:6px;top:6px;cursor: pointer;"/> <svg-icon
size="15"
name="close"
@click="closeModal"
style="position: absolute; right: 15.7px; top: 6px; cursor: pointer"
/>
<div class="wrapper"> <div class="wrapper">
<svg-icon size="90" name="robot2" /> <svg-icon size="90" name="robot2" />
<span style="margin-top: 24px;">正在查重中</span> <span style="margin-top: 24px">正在查重中</span>
</div> </div>
<div style="padding: 0 20px;"> <div style="padding: 0 20px">
<n-progress type="line" :percentage="percent" :show-indicator="false"/> <n-progress type="line" :percentage="percent" :show-indicator="false" />
</div> </div>
</n-card> </n-card>
</n-modal> </n-modal>
@ -71,5 +80,4 @@ configStore.$subscribe(() => {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
</style> </style>

@ -20,7 +20,7 @@ const showLoginModal = ()=>{
<Content ref="contentRef"/> <Content ref="contentRef"/>
<!-- 机器人 --> <!-- 机器人 -->
<Robot :canClick="true" @click="showLoginModal"/> <!-- <Robot :canClick="true" @click="showLoginModal"/> -->
</div> </div>
</template> </template>

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { format } from 'date-fns' import { format } from 'date-fns'
import { computed } from 'vue' import { computed,watch ,ref} from 'vue'
defineOptions({ name: 'ListItem' }) defineOptions({ name: 'ListItem' })
@ -18,9 +18,19 @@ const props = defineProps({
default: () => [], default: () => [],
}, },
}) })
const listItem = ref(props.listItem)
const svgName = computed(() => { const svgName = computed(() => {
return props.selected ? 'task-select' : 'task' return props.selected ? 'task-select' : 'task'
}) })
watch(
() => props.listItem,
(newVal) => {
console.log(props.listItem)
listItem.value = newVal
},
)
</script> </script>
<template> <template>

@ -26,8 +26,11 @@ const pagination = reactive({
pageSize: 30, pageSize: 30,
}) })
function selectHandler(id: string, index: number) { function selectHandler(item, index: number) {
taskStore.setActive(index) activeId.value = item.id
console.log(activeId.value,item.id)
console.log(index)
taskStore.setActive(index,item.id)
} }
useInfiniteScroll( useInfiniteScroll(
@ -73,10 +76,39 @@ async function fetchList() {
watch( watch(
() => taskStore.activeId, () => taskStore.activeId,
(newVal) => { (newVal) => {
activeId.value = newVal // activeId.value = newVal
}, },
) )
watch(
() => taskStore.inFileId,
async (newVal) => {
let newlist=[]
let filterid=newVal.taskname
console.log(filterid)
const index = data.value.findIndex(person => person.fromtaskname === filterid);
let ovelist = data.value.filter(item => item. fromtaskname !== filterid);
ovelist.map((item)=>{
newlist.push(item)
})
data.value=newlist
activeId.value = newlist[index].id
taskStore.setActive(index,newlist[index].id)
//taskStore.setActive(index)
// activeId.value = data[index+1].id
//selectHandler(data[index].id, index)
/* let ovelist = data.value.filter(item => item. fromtaskname !== filterid);
let newlist=[]
ovelist.map((item)=>{
newlist.push(item)
})
data.value=newlist
taskStore.setActive(2)
alert(1)*/
}
);
function reset() { function reset() {
pagination.pageNo = 0 pagination.pageNo = 0
pagination.pageSize = 30 pagination.pageSize = 30
@ -103,6 +135,8 @@ onMounted(() => {
await reset(); await reset();
searchId.value = id; searchId.value = id;
data.value = await fetchList(); data.value = await fetchList();
activeId.value = data.value[0].id
console.log(data.value)
}) })
}) })
@ -128,14 +162,17 @@ defineExpose({
<template> <template>
<n-spin :show="isLoading"> <n-spin :show="isLoading">
<div ref="el" class="list"> <div ref="el" class="list">
<ListItem <ListItem
v-for="(item, index) in data" v-for="(item, index) in data"
:key="item.id" :key="item.id"
:show-field-list="showFieldList" :show-field-list="showFieldList"
:selected="activeId === item.id" :selected="activeId === item.id"
:list-item="item" :list-item="item"
@click="selectHandler(item.id, index)" @click="selectHandler(item, index)"
/> >
</ListItem>
</div> </div>
</n-spin> </n-spin>
</template> </template>

@ -1,6 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { import {
computed, computed,
nextTick,
onMounted, onMounted,
onUnmounted, onUnmounted,
reactive, reactive,
@ -11,6 +12,7 @@ import {
import { chunk, clone } from 'lodash-es' import { chunk, clone } from 'lodash-es'
import { useDialog, useMessage } from 'naive-ui' import { useDialog, useMessage } from 'naive-ui'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import { useInfiniteScroll } from '@vueuse/core'
import BatchModal from '../modal/BatchModal.vue' import BatchModal from '../modal/BatchModal.vue'
import CustomSettingModal from '../modal/CustomSettingModal.vue' import CustomSettingModal from '../modal/CustomSettingModal.vue'
import PictureTable from './PictureTable.vue' import PictureTable from './PictureTable.vue'
@ -20,7 +22,6 @@ import NotPassed from '@/components/Approval/NotPassed.vue'
import { getAllfieldList, getfieldList } from '@/api/home/filter' import { getAllfieldList, getfieldList } from '@/api/home/filter'
import { TASK_STATUS_OBJ } from '@/enums/index' import { TASK_STATUS_OBJ } from '@/enums/index'
import { useFinal } from '@/store/modules/final' import { useFinal } from '@/store/modules/final'
import { import {
audit, audit,
dubiousfileyd, dubiousfileyd,
@ -52,11 +53,16 @@ const taskTableData = ref<any[]>([])
const route = useRoute() const route = useRoute()
const isDetail = ref(false) // const isDetail = ref(false) //
const finalStore = useFinal() const finalStore = useFinal()
const imgbigshow = ref(true)
const sortBy: any = { const sortBy: any = {
orderType: 'desc', orderType: 'desc',
orderName: 'similarityScore', orderName: 'similarityScore',
} }
const el = ref<HTMLDivElement | null>(null)
const pagination = reactive({
pageNo: 0,
pageSize: 30,
})
function onCheckChange(checked: any, item: any) { function onCheckChange(checked: any, item: any) {
const index = selectItems.value.indexOf(item) const index = selectItems.value.indexOf(item)
item.checked = checked item.checked = checked
@ -106,6 +112,9 @@ onMounted(() => {
let lastKeyPressTime = 0 let lastKeyPressTime = 0
let keyPressTimer = null let keyPressTimer = null
function changeimgbigshow() {
imgbigshow.value = !imgbigshow.value
}
const doubleClickInterval = 300 // const doubleClickInterval = 300 //
// //
function handleKeydown(event) { function handleKeydown(event) {
@ -118,6 +127,10 @@ function handleKeydown(event) {
// batchModalRef.value.closeModal() // batchModalRef.value.closeModal()
} }
else if (event.keyCode === 27) {
overTask.value = null
overTasktwo.value = null
}
else if (event.key === 'p' || event.key === 'P') { else if (event.key === 'p' || event.key === 'P') {
// //
const now = Date.now() const now = Date.now()
@ -163,7 +176,17 @@ function handleKeydown(event) {
if (now - lastKeyPressTime < doubleClickInterval) { if (now - lastKeyPressTime < doubleClickInterval) {
// //
clearTimeout(keyPressTimer) clearTimeout(keyPressTimer)
const item = taskDetailInfo.value
if (
item?.userapprove?.statshis === 2
|| item?.userapprove?.statshis == 3
) {
overTask.value = null
return
}
if (validate([item]) == null && batch.value === false)
overTask.value = item
// //
const modal = unref(notPassModalRef)! as any const modal = unref(notPassModalRef)! as any
modal.showModal([taskDetailInfo.value]) modal.showModal([taskDetailInfo.value])
@ -277,12 +300,25 @@ function approvalHandler(items?: any) {
negativeText: '取消', negativeText: '取消',
onPositiveClick: () => { onPositiveClick: () => {
doAudit(param) doAudit(param)
overTask.value = null
},
onNegativeClick: () => {
overTask.value = null
}, },
onNegativeClick: () => {},
}) })
} }
function approvalHandlerx(item?: any) {
console.log(item)
alert(1)
}
function singleRejectHandlex(item?: any) {
console.log(item)
const modal = unref(notPassModalRef)! as any
modal.showModal([item])
}
function rejectHandler(items?: any) { function rejectHandler(items?: any) {
console.log(items)
const modal = unref(notPassModalRef)! as any const modal = unref(notPassModalRef)! as any
modal.showModal(items) modal.showModal(items)
} }
@ -329,19 +365,18 @@ async function handleDragEnd(event, item) {
getTableData() getTableData()
getImgList() getImgList()
} }
else {
message.error(res.message)
}
taskStore.setInFile(false) taskStore.setInFile(false)
taskStore.setInFile(item.pictureId)
} }
} }
async function addSuspicious() { async function addSuspicious() {
taskStore.setInFileId(taskDetailInfo.value.ocrPicture)
console.log(taskDetailInfo.value.ocrPicture) console.log(taskDetailInfo.value.ocrPicture)
if (taskDetailInfo.value.ocrPicture.pictureid) { if (taskDetailInfo.value.ocrPicture.pictureid) {
const res = await dubiousfileyd({ const res = await dubiousfileyd({
pictureid: taskDetailInfo.value.ocrPicture.id, pictureid: taskDetailInfo.value.ocrPicture.id,
}) })
console.log(res)
if (res.code === 'OK') { if (res.code === 'OK') {
message.success('加入成功') message.success('加入成功')
setBatch(false) setBatch(false)
@ -421,6 +456,7 @@ function overTaskHandle() {
function leaveTaskHandler() { function leaveTaskHandler() {
overTask.value = null overTask.value = null
overTasktwo.value = null
} }
function showActionsModal() { function showActionsModal() {
@ -440,6 +476,13 @@ function immersionHandler() {
// //
function toggleFullScreen() { function toggleFullScreen() {
isFullScreen.value = !isFullScreen.value isFullScreen.value = !isFullScreen.value
if (isFullScreen.value) {
fetchData()
window.addEventListener('scroll', checkBottom)
}
else {
window.removeEventListener('scroll', checkBottom)
}
} }
function previewHandler(event: MouseEvent) { function previewHandler(event: MouseEvent) {
event.stopImmediatePropagation() event.stopImmediatePropagation()
@ -471,6 +514,7 @@ async function getDetail() {
function notPassSuccess(param) { function notPassSuccess(param) {
batchModalRef.value.reload() batchModalRef.value.reload()
reloadList(param, '不通过') reloadList(param, '不通过')
overTask.value = null
} }
function reloadList(param, text) { function reloadList(param, text) {
@ -518,10 +562,108 @@ function overTaskHandelr(item: any) {
if (validate([item]) == null && batchtwo.value === false) if (validate([item]) == null && batchtwo.value === false)
overTasktwo.value = item overTasktwo.value = item
} }
function closePassno() {
console.log(notPassModalRef.value)
overTask.value = null
}
// const loadingx = ref(false);
const items = ref([])
const scrollContainer = ref(null)
let debounceTimer
async function fetchData() {
if (loading.value)
return //
loading.value = true
try {
loadMore()
}
finally {
loading.value = false
}
}
// const throttledCheckScroll = throttle(checkBottom, 200);
let num = 1
//
function checkBottom() {
const container = scrollContainer.value
// console.log(1)
if (!container)
return
// const { scrollTop, clientHeight, scrollHeight } = container;
const scrollTop = window.pageYOffset || document.documentElement.scrollTop
//
const clientHeight
= window.innerHeight || document.documentElement.clientHeight
//
const scrollHeight = document.documentElement.scrollHeight
clearTimeout(debounceTimer)
debounceTimer = setTimeout(() => {
if (scrollTop + clientHeight >= scrollHeight - 10) {
num = num + 1
console.log(num)
fetchData() //
}
}, 500)
}
async function loadMore() {
console.log(loading.value)
if (loading.value) {
const more = await fetchList()
taskDetailPictureList.value.push(...more)
console.log(taskDetailPictureList)
}
}
let canloadMore = true
async function fetchList() {
try {
pagination.pageNo += 1
const { data, pageCount, total } = await getSimilarityList({
...pagination,
...sortBy,
pictureId: taskDetailInfo.value.ocrPicture.id,
})
canloadMore = pageCount >= pagination.pageNo && pageCount > 0
totalCount.value = total
return data
}
catch (error) {
canloadMore = false
return []
}
}
async function reset() {
pagination.pageNo = 0
pagination.pageSize = 30
taskDetailPictureList.value.length = 0
loading.value = false
canloadMore = true
// layout()
}
async function refreshHandler() {
getImgList()
}
function sortHandler(orderby: 'similarityScore' | 'createdate') {
sortBy.orderName = orderby
sortBy.orderType = sortBy.orderType === 'asc' ? 'desc' : 'asc'
refreshHandler()
}
</script> </script>
<template> <template>
<div class="wrapper fullscreen-container" :style="fullscreenStyles"> <div
ref="scrollContainer"
class="wrapper fullscreen-container"
:style="fullscreenStyles"
@scroll="checkBottom"
>
<div class="wrapper-header"> <div class="wrapper-header">
<div class="left"> <div class="left">
<span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span> <span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span>
@ -619,15 +761,49 @@ function overTaskHandelr(item: any) {
</n-button> </n-button>
</div> </div>
</div> </div>
<div class="wrapper-detail"> <div
class="wrapper-detail"
:style="
isFullScreen
? {
height: '596px',
}
: {}
"
>
<div
v-show="!imgbigshow"
class="aside-collapse-btn"
:style="{
position: 'fixed',
right: '0px',
top: '155px',
cursor: 'pointer',
zIndex: 100,
}"
@click="collapseHandler"
>
<SvgIcon
:name="false ? 'expand-cir' : 'collapse-cir'"
size="40"
@click="changeimgbigshow"
/>
</div>
<div <div
class="left" class="left"
:style=" :style="
isFullScreen isFullScreen
? { ? imgbigshow
'height': '395px', ? {
'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, 'position': 'relative',
} 'flex': 2,
'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
}
: {
'height': '92vh',
'flex': 2,
'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
}
: { : {
'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
} }
@ -738,12 +914,9 @@ function overTaskHandelr(item: any) {
size="16" size="16"
name="camera-time" name="camera-time"
/> />
<span>{{ <span>{{
taskDetailInfo?.ocrPicture?.photoDateTimestamp taskDetailInfo?.ocrPicture?.photoDateTimestamp ?? "-"
? formatToDateHMS(
Number(taskDetailInfo.ocrPicture.photoDateTimestamp),
)
: "-"
}}</span> }}</span>
</div> </div>
<div class="time-item time-item2"> <div class="time-item time-item2">
@ -753,6 +926,7 @@ function overTaskHandelr(item: any) {
size="16" size="16"
name="submit-time" name="submit-time"
/> />
<span>{{ <span>{{
taskDetailInfo?.ocrPicture?.submitDateTimestamp taskDetailInfo?.ocrPicture?.submitDateTimestamp
? formatToDateHMS( ? formatToDateHMS(
@ -771,7 +945,36 @@ function overTaskHandelr(item: any) {
</div> </div>
<div class="leftback" /> <div class="leftback" />
</div> </div>
<div class="right"> <div
v-show="imgbigshow"
class="right"
:style="
isFullScreen
? {
width: '320px',
borderLeft: '2px solid #507AFD',
position: 'relative',
}
: {}
"
>
<div
v-show="isFullScreen"
class="aside-collapse-btn"
:style="{
position: 'absolute',
left: '-20px',
top: '85px',
cursor: 'pointer',
}"
@click="collapseHandler"
>
<SvgIcon
:name="true ? 'expand-cir' : 'collapse-cir'"
size="40"
@click="changeimgbigshow"
/>
</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">
@ -963,6 +1166,7 @@ function overTaskHandelr(item: any) {
</n-tabs> </n-tabs>
<div v-else class="imgbottom"> <div v-else class="imgbottom">
<div <div
v-show="imgbigshow"
style=" style="
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -991,13 +1195,13 @@ function overTaskHandelr(item: any) {
<div style="cursor: pointer" @click="sortHandler('createdate')"> <div style="cursor: pointer" @click="sortHandler('createdate')">
<span>时间排序</span> <span>时间排序</span>
<SvgIcon <SvgIcon
v-show="selectedSortName !== 'createdate'" v-if="true"
style="margin-left: 5px" style="margin-left: 5px"
name="sort" name="sort"
size="12" size="12"
/> />
<SvgIcon <SvgIcon
v-show="selectedSortName === 'createdate'" v-else
style="margin-left: 5px" style="margin-left: 5px"
name="active-sort" name="active-sort"
size="12" size="12"
@ -1009,13 +1213,13 @@ function overTaskHandelr(item: any) {
> >
<span>相似度排序</span> <span>相似度排序</span>
<SvgIcon <SvgIcon
v-show="selectedSortName !== 'similarityScore'" v-if="true"
style="margin-left: 5px" style="margin-left: 5px"
name="sort" name="sort"
size="12" size="12"
/> />
<SvgIcon <SvgIcon
v-show="selectedSortName === 'similarityScore'" v-else
style="margin-left: 5px" style="margin-left: 5px"
name="active-sort" name="active-sort"
size="12" size="12"
@ -1023,11 +1227,107 @@ function overTaskHandelr(item: any) {
</div> </div>
</div> </div>
</div> </div>
<div class="wrapper-list"> <div v-show="imgbigshow" class="allview">
<div class="list">
<div
v-for="item in taskDetailPictureList"
:key="item.id"
class="item"
draggable="true"
@dragend="
(event) => {
handleDragEnd(event, item);
}
"
>
<div
class="img-wrapper"
:style="{
'background-image': `url(${item.serverThumbnailUrl})`,
}"
@mouseover="overTaskHandelr(item)"
@mouseleave="leaveTaskHandler"
>
<div
v-show="overTasktwo && overTasktwo.id === item.id && !batch"
class="action"
>
<SvgIcon
style="cursor: pointer"
name="t1"
@click.stop="approvalHandler([item])"
/>
<SvgIcon
style="cursor: pointer; margin-left: 40px"
name="t2"
@click.stop="singleRejectHandlex(item)"
/>
</div>
</div>
<div class="small-mark" />
<div class="check">
<n-checkbox
v-show="batch && item.historyStates === 1"
v-model:checked="item.checked"
@click.stop
@update:checked="onCheckChange($event, item)"
/>
</div>
<img
v-if="item.historyStates === 2"
class="tag-status"
src="@/assets/images/task/tag-pass.png"
alt=""
>
<img
v-if="item.historyStates === 3"
class="tag-status"
src="@/assets/images/task/tag-not-pass.png"
alt=""
>
<div class="time">
<div class="time-item">
<SvgIcon
class="svg-time"
color="#FFF"
size="16"
name="camera-time"
/>
<span>{{
item.photoDateTimestamp
? formatToDateHMS(Number(item.photoDateTimestamp))
: "-"
}}</span>
</div>
<div class="time-item time-item2">
<SvgIcon
class="svg-time"
color="#FFF"
size="16"
name="submit-time"
/>
<span>{{
item.submitDateTimestamp
? formatToDateHMS(Number(item.submitDateTimestamp))
: "-"
}}</span>
</div>
</div>
<div
:class="{ 'percent-red': item.similarityScore === 100 }"
class="percent"
>
{{ item.similarityScore }}<span class="percent-unit">%</span>
</div>
</div>
</div>
</div>
<!-- <div class="wrapper-list">
<div <div
v-for="(item, index) in taskDetailPictureList" v-for="(item, index) in taskDetailPictureList"
:key="index" :key="index"
:class="{ 'item-selected': item === selectTask }"
class="grid-item" class="grid-item"
@click="handleSelect(item)" @click="handleSelect(item)"
@mouseover="overTaskHandelr(item)" @mouseover="overTaskHandelr(item)"
@ -1086,22 +1386,30 @@ function overTaskHandelr(item: any) {
<div <div
v-show="overTasktwo && overTasktwo.id === item.id" v-show="overTasktwo && overTasktwo.id === item.id"
class="action" class="action"
@mouseover="overTaskHandelr"
@mouseleave="leaveTaskHandler"
> >
<SvgIcon <SvgIcon
style="cursor: pointer" style="cursor: pointer"
name="t1" name="t1"
@click.stop="approvalHandler" @click.stop="approvalHandlerx(item)"
/> />
<SvgIcon <SvgIcon
style="cursor: pointer; margin-left: 40px" style="cursor: pointer; margin-left: 40px"
name="t2" name="t2"
@click.stop="singleRejectHandler(item)" @click.stop="singleRejectHandlex(item)"
/> />
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
<NotPassed ref="notPassModalRef" @success="notPassSuccess" /> <NotPassed
ref="notPassModalRef"
@success="notPassSuccess"
@close="closePassno"
/>
<BatchModal <BatchModal
ref="batchModalRef" ref="batchModalRef"
@reject="rejectHandler" @reject="rejectHandler"
@ -1113,6 +1421,7 @@ function overTaskHandelr(item: any) {
<style lang="less" scoped> <style lang="less" scoped>
.fullscreen-container { .fullscreen-container {
overflow-y: auto;
/* 可添加其他样式 */ /* 可添加其他样式 */
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
@ -1763,4 +2072,147 @@ function overTaskHandelr(item: any) {
margin: 3px 0 10px 0; margin: 3px 0 10px 0;
max-width: 650px; max-width: 650px;
} }
.allview {
// overflow-y: auto;
//height: 400px;
flex: 0.5;
background: #f6f9fd;
border-radius: 8px;
// margin-left: 20px;
padding-top: 24px;
.action {
position: absolute;
z-index: 10;
width: 100%;
height: 100%;
display: flex;
border-radius: 8px;
align-items: center;
justify-content: center;
background-color: rgba(0, 0, 0, 0.5);
}
.right-card {
padding: 3px;
}
.header {
display: flex;
justify-content: space-between;
font-size: 17px;
font-weight: bold;
color: #333333;
margin-bottom: 16px;
}
.list {
display: flex;
flex-wrap: wrap;
flex-direction: row;
justify-content: flex-start;
flex-shrink: 0;
}
.item {
// flex-basis: calc((100% - 48px) / 3);
box-sizing: border-box;
border-radius: 8px;
position: relative;
// overflow: hidden;
margin: 0px 16px 27px 0px;
.small-mark {
width: 100%;
height: 53px;
background: linear-gradient(
180deg,
rgba(0, 0, 0, 0.01),
rgba(0, 0, 0, 0.44) 88%
);
border-radius: 0px 8px 8px 8px;
position: absolute;
left: 0;
bottom: 0;
z-index: 0;
}
.tag-status {
width: 46px;
height: 22px;
position: absolute;
left: -4px;
top: 4px;
}
.time {
position: absolute;
z-index: 3;
left: 3px;
bottom: 3px;
.time-item {
display: flex;
align-items: center;
font-size: 16px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
color: #ffffff;
margin-bottom: 2px;
line-height: 12px;
}
.time-item2 {
margin-bottom: 0;
}
.svg-time {
margin-right: 5px;
}
}
.img-wrapper {
position: relative;
width: 230px;
height: 130px;
overflow: hidden;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
border-radius: 8px;
cursor: n-resize;
}
.check {
position: absolute;
z-index: 5;
left: 6px;
top: 4px;
}
}
.percent {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
width: 35px;
height: 18px;
opacity: 0.9;
background: #6f92fd;
border-radius: 6px 0px 6px 0px;
z-index: 5;
right: 12px;
top: 2px;
color: #fff;
font-size: 14px;
}
.percent-unit {
font-size: 8px;
margin-top: 4px;
}
.percent-red {
background: #ff4e4f;
}
}
</style> </style>

@ -29,6 +29,9 @@ function setAsideItemName(text) {
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.wrapper){
top:0
}
.main { .main {
display: flex; display: flex;
flex-direction: row; flex-direction: row;

@ -146,7 +146,7 @@ function setShowSearch(value: boolean) {
if (value === false) { if (value === false) {
(packageListRef.value as any).search('') (packageListRef.value as any).search('')
searchKeyword.value = '' searchKeyword.value = ''
}; }
} }
const inputHandler = debounce((word) => { const inputHandler = debounce((word) => {
@ -176,7 +176,7 @@ function ApprovalOver(packageId) {
<div class="left"> <div class="left">
<svg-icon name="all-worksheet" size="32" /> <svg-icon name="all-worksheet" size="32" />
<!-- j --> <!-- j -->
<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

@ -1,15 +1,15 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useInfiniteScroll } from '@vueuse/core'
import { useMessage } from 'naive-ui'
import { onMounted, onUnmounted, reactive, ref, watch } from 'vue' import { onMounted, onUnmounted, reactive, ref, watch } from 'vue'
import { throttle } from 'lodash' import { throttle } from 'lodash'
import { useInfiniteScroll } from '@vueuse/core'
import { useMessage } from 'naive-ui'
import ApprovalModal from '../modal/ApprovalModal.vue' import ApprovalModal from '../modal/ApprovalModal.vue'
import ListItem from './ListItem.vue'
import { deletePackage } from '@/api/home/main' import { deletePackage } from '@/api/home/main'
import NotPassed from '@/components/NotPassed.vue'
import { useWorkOrder } from '@/store/modules/workOrder' import { useWorkOrder } from '@/store/modules/workOrder'
import { isEmpty } from '@/utils' import { isEmpty } from '@/utils'
import ListItem from './ListItem.vue'
import type { PackageListItem } from '/#/workorder' import type { PackageListItem } from '/#/workorder'
import NotPassed from '@/components/NotPassed.vue'
defineProps({ defineProps({
showFieldList: { showFieldList: {
@ -22,6 +22,8 @@ defineProps({
}, },
}) })
const emit = defineEmits(["ApprovalOver"]);
const emit = defineEmits(['ApprovalOver']) const emit = defineEmits(['ApprovalOver'])
const workStore = useWorkOrder() const workStore = useWorkOrder()
@ -76,6 +78,12 @@ async function loadMore() {
} }
} }
// onMounted(() => {
// console.log("onMounted");
// reset();
// fetchList();
// });
async function fetchList() { async function fetchList() {
try { try {
pagination.pageNo += 1 pagination.pageNo += 1

@ -1,10 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { audit } from '@/api/task/task' import { audit } from '@/api/task/task'
import { import { getPictureSimilarityList, getTaskDetailInfo } from '@/api/work/work'
dubiousfileyd,
getPictureSimilarityList,
getTaskDetailInfo,
} from '@/api/work/work'
import NotPassed from '@/components/Approval/NotPassed.vue' import NotPassed from '@/components/Approval/NotPassed.vue'
import { TASK_STATUS_OBJ } from '@/enums/index' import { TASK_STATUS_OBJ } from '@/enums/index'
import { useWorkOrder } from '@/store/modules/workOrder' import { useWorkOrder } from '@/store/modules/workOrder'
@ -17,7 +13,7 @@ import { format } from 'date-fns'
import imagesloaded from 'imagesloaded' import imagesloaded from 'imagesloaded'
import { clone, cloneDeep, debounce, pickBy } from 'lodash-es' import { clone, cloneDeep, debounce, pickBy } from 'lodash-es'
import { useDialog, useMessage } from 'naive-ui' import { useDialog, useMessage } from 'naive-ui'
import { computed, onMounted, onUnmounted, onUpdated, reactive, ref, unref, watch } from 'vue' import { computed, onUnmounted, onUpdated, reactive, ref, unref, watch } from 'vue'
import PictureInfo from '../components/PictureInfo.vue' import PictureInfo from '../components/PictureInfo.vue'
import ConfrimModal from '../modal/ConfrimModal.vue' import ConfrimModal from '../modal/ConfrimModal.vue'
import type { ApprovalParam, SimilarityPictureSortParam } from '/#/api' import type { ApprovalParam, SimilarityPictureSortParam } from '/#/api'
@ -76,7 +72,6 @@ const isFullScreen = ref(false)
const notPassModalRef = ref(null) const notPassModalRef = ref(null)
const mainImageModalRef = ref(null) const mainImageModalRef = ref(null)
const wrapperListRef = ref<HTMLElement | undefined>(undefined) const wrapperListRef = ref<HTMLElement | undefined>(undefined)
let canloadMore = true
let processItems: any[] = [] let processItems: any[] = []
@ -139,9 +134,12 @@ async function featchList() {
loading.value = true loading.value = true
try { try {
taskpagination.pageNo += 1 taskpagination.pageNo += 1
const { data, total, pageCount } = await getPictureSimilarityList( const { data, total, pageCount } = await getPictureSimilarityList({
{ ...taskpagination, ...sortBy, checkDuplicateId: workStore.activeId, pictureId: taskDetailInfo.value.id }, ...taskpagination,
) ...sortBy,
checkDuplicateId: workStore.activeId,
pictureId: taskDetailInfo.value.id,
})
totalCount.value = total totalCount.value = total
canloadMore = pageCount >= taskpagination.pageNo && pageCount > 0 canloadMore = pageCount >= taskpagination.pageNo && pageCount > 0
@ -383,7 +381,7 @@ function handleApproveMainImage(items?: any) {
else { message.error(res.message) } else { message.error(res.message) }
}) })
}, },
onNegativeClick: () => { }, onNegativeClick: () => {},
}) })
} }
function approvalHandler(items?: any) { function approvalHandler(items?: any) {
@ -433,7 +431,7 @@ function approvalHandler(items?: any) {
onPositiveClick: () => { onPositiveClick: () => {
doAudit(param) doAudit(param)
}, },
onNegativeClick: () => { }, onNegativeClick: () => {},
}) })
} }
@ -494,8 +492,20 @@ defineExpose({
批量审批 批量审批
</div> </div>
<div class="icon-wrap"> <div class="icon-wrap">
<SvgIcon v-if="isFullScreen" size="20" name="power-off" style="cursor: pointer;" @click="immersionHandler" /> <SvgIcon
<SvgIcon v-else size="20" name="immersion-model" style="cursor: pointer;" @click="immersionHandler" /> v-if="isFullScreen"
size="20"
name="power-off"
style="cursor: pointer"
@click="immersionHandler"
/>
<SvgIcon
v-else
size="20"
name="immersion-model"
style="cursor: pointer"
@click="immersionHandler"
/>
</div> </div>
</div> </div>
@ -522,22 +532,24 @@ defineExpose({
<div class="wrapper-detail"> <div class="wrapper-detail">
<!-- 左侧大图 图片信息 --> <!-- 左侧大图 图片信息 -->
<div <div
class="left" :style="{ 'background-image': `url(${taskDetailInfo?.serverThumbnailUrl || taskDetailInfo?.imgurl})` }" @click="showAction" class="left"
:style="{ 'background-image': `url(${taskDetailInfo?.imgurl})` }"
@click="showAction"
@mouseleave="leaveTaskHandler" @mouseleave="leaveTaskHandler"
> >
<div class="footer-times"> <div class="footer-times">
<div class="time" style="margin-bottom: 4px;"> <div class="time" style="margin-bottom: 4px">
<SvgIcon color="#FFF" size="16" name="camera" /> <SvgIcon color="#FFF" size="16" name="camera" />
<span>{{ taskDetailInfo?.photoDateTimestamp }}</span> <span class="time-value">{{ taskDetailInfo?.photoDateTimestamp }} </span>
<!-- <span class="time-value">{{ taskDetailInfo?.photoDateTimestamp ? format(
taskDetailInfo.photoDateTimestamp, 'yyyy-MM-dd HH:mm:ss') : '-' }} </span> -->
</div> </div>
<div class="time"> <div class="time">
<SvgIcon color="#FFF" size="16" name="save" /> <SvgIcon color="#FFF" size="16" name="save" />
<span class="time-value">{{ <span class="time-value">{{
taskDetailInfo?.submitDateTimestamp ? format(taskDetailInfo?.submitDateTimestamp, 'yyyy-MM-dd HH:mm:ss') taskDetailInfo?.submitDateTimestamp
: '-' ? format(taskDetailInfo?.submitDateTimestamp, "yyyy-MM-dd HH:mm:ss")
}} </span> : "-"
}}
</span>
</div> </div>
</div> </div>
<div class="status"> <div class="status">
@ -555,22 +567,31 @@ defineExpose({
<n-grid x-gap="12" y-gap="10" :cols="12"> <n-grid x-gap="12" y-gap="10" :cols="12">
<n-gi span="4" class="gi1"> <n-gi span="4" class="gi1">
<span> <span>
<img class="icon-status" src="@/assets/images/task/status.png" alt=""> <img
class="icon-status"
src="@/assets/images/task/status.png"
alt=""
>
</span> </span>
</n-gi> </n-gi>
<n-gi span="8" class="gi2"> <n-gi span="8" class="gi2">
<span class="value">{{ TASK_STATUS_OBJ[taskDetailInfo.historyStates] }}</span> <span class="value">{{
TASK_STATUS_OBJ[taskDetailInfo.historyStates]
}}</span>
<span class="label">审批状态</span> <span class="label">审批状态</span>
</n-gi> </n-gi>
<n-gi span="4" class="gi1"> <n-gi span="4" class="gi1">
<span> <span>
<img class="icon-status" src="@/assets/images/task/similarity.png" alt=""> <img
class="icon-status"
src="@/assets/images/task/similarity.png"
alt=""
>
</span> </span>
</n-gi> </n-gi>
<n-gi span="8" class="gi2"> <n-gi span="8" class="gi2">
<span class="value num">{{ <span class="value num">{{ totalCount }}<span class="unit"></span>
totalCount </span>
}}<span class="unit"></span> </span>
<span class="label">相似匹配</span> <span class="label">相似匹配</span>
</n-gi> </n-gi>
</n-grid> </n-grid>
@ -581,7 +602,11 @@ defineExpose({
</div> </div>
<!-- 预览大图组件 --> <!-- 预览大图组件 -->
<div style="display: none"> <div style="display: none">
<n-image ref="imageRef" :img-props="{ onClick: hideDownload }" :src="taskDetailInfo?.imgurl" /> <n-image
ref="imageRef"
:img-props="{ onClick: hideDownload }"
:src="taskDetailInfo?.imgurl"
/>
</div> </div>
<!-- 操作 --> <!-- 操作 -->
<div v-show="overTask && overTask.id === taskDetailInfo.id" class="action" @click.stop="hideAction"> <div v-show="overTask && overTask.id === taskDetailInfo.id" class="action" @click.stop="hideAction">
@ -589,93 +614,140 @@ defineExpose({
<SvgIcon v-if="[1].includes(taskDetailInfo.historyStates)" style="cursor: pointer; margin-left: 30px" name="t2" @click.stop="handleRejectMainImage" /> <SvgIcon v-if="[1].includes(taskDetailInfo.historyStates)" style="cursor: pointer; margin-left: 30px" name="t2" @click.stop="handleRejectMainImage" />
<SvgIcon v-if="[1, 2, 3].includes(taskDetailInfo.historyStates)" style="cursor: pointer; margin-left: 30px" name="t9" @click.stop="handleRejectdubiousfileyd" /> <SvgIcon v-if="[1, 2, 3].includes(taskDetailInfo.historyStates)" style="cursor: pointer; margin-left: 30px" name="t9" @click.stop="handleRejectdubiousfileyd" />
</div> </div>
<PictureInfo :task-detail-info="taskDetailInfo" />
</div> </div>
<PictureInfo :task-detail-info="taskDetailInfo" />
</div>
<div style="display: flex; justify-content: space-between; padding: 12px 0px 3px 0">
<div>
<span
style="font-size: 18px; font-weight: Medium;color: #333333;font-family: PingFang SC, PingFang SC-Medium;"
>任务包图片</span>
</div>
<div style="display: flex; align-items: center;font-size: 14px;margin-right: 25px;color:#323233">
<div style="cursor: pointer" @click="sortHandler('createdate')">
<span>时间排序</span>
<SvgIcon v-show="selectedSortName !== 'createdate'" style="margin-left: 5px" name="sort" size="12" />
<SvgIcon v-show="selectedSortName === 'createdate'" style="margin-left: 5px" name="active-sort" size="12" />
</div>
<div style="margin-left: 15px; cursor: pointer" @click="sortHandler('similarityScore')">
<span>相似度排序</span>
<SvgIcon v-show="selectedSortName !== 'similarityScore'" style="margin-left: 5px" name="sort" size="12" />
<SvgIcon
v-show="selectedSortName === 'similarityScore'" style="margin-left: 5px" name="active-sort"
size="12"
/>
</div>
</div>
</div>
<div ref="wrapperListRef" class="wrapper-list">
<div <div
v-for="(item, index) in listData" :key="index" :class="{ 'item-selected': item === selectTask }" style="display: flex; justify-content: space-between; padding: 12px 0px 3px 0"
class="grid-item" @click="handleSelect(item)" @mouseover="overTaskHandelr(item)"
@mouseleave="leaveTaskHandler"
> >
<div class="img-wrapper" :style="{ 'background-image': `url(${item.imgurl})` }" /> <div>
<div class="time-wrapper"> <span
<div class="time"> style="font-size: 18px; font-weight: Medium;color: #333333;font-family: PingFang SC, PingFang SC-Medium;"
<SvgIcon color="#FFF" size="16" name="camera" /> >任务包图片</span>
<span class="current-time">{{ item.photoDateTimestamp ? formatToDateHMS(Number(item.photoDateTimestamp) </div>
|| 0) : '-' <div
}}</span> style="
display: flex;
align-items: center;
font-size: 14px;
margin-right: 25px;
color: #323233;
"
>
<div style="cursor: pointer" @click="sortHandler('createdate')">
<span>时间排序</span>
<SvgIcon
v-show="selectedSortName !== 'createdate'"
style="margin-left: 5px"
name="sort"
size="12"
/>
<SvgIcon
v-show="selectedSortName === 'createdate'"
style="margin-left: 5px"
name="active-sort"
size="12"
/>
</div> </div>
<div class="time"> <div
<SvgIcon color="#FFF" size="16" name="save" /> style="margin-left: 15px; cursor: pointer"
<span class="current-time">{{ item.submitDateTimestamp ? formatToDateHMS(Number(item.submitDateTimestamp) @click="sortHandler('similarityScore')"
|| 0) : '-' >
}}</span> <span>相似度排序</span>
<SvgIcon
v-show="selectedSortName !== 'similarityScore'"
style="margin-left: 5px"
name="sort"
size="12"
/>
<SvgIcon
v-show="selectedSortName === 'similarityScore'"
style="margin-left: 5px"
name="active-sort"
size="12"
/>
</div> </div>
</div> </div>
<div class="check"> </div>
<n-checkbox <div class="wrapper-list">
v-show="batch && item.historyStates !== 2 && item.historyStates !== 3" <div
v-model:checked="item.checked" @click.stop @update:checked="onCheckChange($event, item)" v-for="(item, index) in listData"
:key="index"
:class="{ 'item-selected': item === selectTask }"
class="grid-item"
@click="handleSelect(item)"
@mouseover="overTaskHandelr(item)"
@mouseleave="leaveTaskHandler"
>
<div
class="img-wrapper"
:style="{ 'background-image': `url(${item.imgurl})` }"
/> />
</div> <div class="time-wrapper">
<div class="percent" :class="{ 'percent-red': item?.maxSimilarity >= 100 }"> <div class="time">
<SvgIcon size="42" :name="item.maxSimilarity == 100 ? 'error_tag' : 'tag'" /> <SvgIcon color="#FFF" size="16" name="camera" />
<div class="val"> <span class="current-time">{{
{{ `${item?.maxSimilarity && Number(item?.maxSimilarity).toFixed(0)}%` }} item.photoDateTimestamp
<!-- {{ item?.maxSimilarity && Number(item?.maxSimilarity).toFixed(0) }}<span class="percent-unit">%</span> --> ? formatToDateHMS(Number(item.photoDateTimestamp) || 0)
: "-"
}}</span>
</div>
<div class="time">
<SvgIcon color="#FFF" size="16" name="save" />
<span class="current-time">{{
item.submitDateTimestamp
? formatToDateHMS(Number(item.submitDateTimestamp) || 0)
: "-"
}}</span>
</div>
</div>
<div class="check">
<n-checkbox
v-show="batch && item.historyStates !== 2 && item.historyStates !== 3"
v-model:checked="item.checked"
@click.stop
@update:checked="onCheckChange($event, item)"
/>
</div>
<div class="percent" :class="{ 'percent-red': item?.maxSimilarity >= 100 }">
<SvgIcon size="42" :name="item.maxSimilarity == 100 ? 'error_tag' : 'tag'" />
<div class="val">
{{ item?.maxSimilarity && Number(item?.maxSimilarity).toFixed(0)
}}<span class="percent-unit">%</span>
</div>
</div> </div>
</div>
<div v-if="item.historyStates === 2" class="pass-status">
<SvgIcon name="pass-icon" style="width:52;height:24px" />
</div>
<div v-else-if="item.historyStates === 3" class="pass-status">
<SvgIcon name="no-pass-icon" style="width:52;height:24px" />
</div>
<SvgIcon v-if="[1, 2, 3].includes(taskDetailInfo.historyStates)" style="cursor: pointer; margin-left: 30px" name="t9" @click.stop="handleRejectdubiousfileyd" />
<div v-show="overTask && overTask.id === item.id" class="action"> <div v-if="item.historyStates === 2" class="pass-status">
<SvgIcon style="cursor: pointer" name="t1" @click.stop="approvalHandler" /> <SvgIcon name="pass-icon" style="width: 52; height: 24px" />
<SvgIcon style="cursor: pointer;margin-left: 40px;" name="t2" @click.stop="singleRejectHandler(item)" /> </div>
<div v-else-if="item.historyStates === 3" class="pass-status">
<SvgIcon name="no-pass-icon" style="width: 52; height: 24px" />
</div>
<SvgIcon v-if="[1, 2, 3].includes(taskDetailInfo.historyStates)" style="cursor: pointer; margin-left: 30px" name="t9" @click.stop="handleRejectdubiousfileyd" /> <SvgIcon v-if="[1, 2, 3].includes(taskDetailInfo.historyStates)" style="cursor: pointer; margin-left: 30px" name="t9" @click.stop="handleRejectdubiousfileyd" />
<div v-show="overTask && overTask.id === item.id" class="action">
<SvgIcon style="cursor: pointer" name="t1" @click.stop="approvalHandler" />
<SvgIcon
style="cursor: pointer; margin-left: 40px"
name="t2"
@click.stop="singleRejectHandler(item)"
/>
<SvgIcon v-if="[1, 2, 3].includes(taskDetailInfo.historyStates)" style="cursor: pointer; margin-left: 30px" name="t9" @click.stop="handleRejectdubiousfileyd" />
</div>
</div> </div>
</div> <n-back-top :listen-to="wrapperListRef" :bottom="220" :visibility-height="10">
<n-back-top :listen-to="wrapperListRef" :bottom="220" :visibility-height="10"> <div
<div style="
style="
width: 100px; width: 100px;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
" "
> >
回到顶部 回到顶部
</div> </div>
</n-back-top> </n-back-top>
</div>
</div> </div>
</div> </div>
</n-spin> </n-spin>
@ -796,7 +868,7 @@ defineExpose({
z-index: 3; z-index: 3;
width: 30px; width: 30px;
height: 30px; height: 30px;
background: rgba(255, 255, 255, 0.20); background: rgba(255, 255, 255, 0.2);
border-radius: 6px; border-radius: 6px;
backdrop-filter: blur(10px); backdrop-filter: blur(10px);
display: flex; display: flex;
@ -836,7 +908,11 @@ defineExpose({
.footer-times { .footer-times {
width: 100%; width: 100%;
height: 80px; height: 80px;
background: linear-gradient(180deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.71) 100%); background: linear-gradient(
180deg,
rgba(0, 0, 0, 0.01),
rgba(0, 0, 0, 0.71) 100%
);
border-radius: 0px 8px 8px 0px; border-radius: 0px 8px 8px 0px;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
@ -888,7 +964,7 @@ defineExpose({
justify-content: center; justify-content: center;
width: 30px; width: 30px;
height: 30px; height: 30px;
background: rgba(80, 122, 253, .1); background: rgba(80, 122, 253, 0.1);
border-radius: 8px; border-radius: 8px;
margin-left: 10px; margin-left: 10px;
cursor: pointer; cursor: pointer;
@ -927,7 +1003,6 @@ defineExpose({
.unit { .unit {
font-size: 11px; font-size: 11px;
} }
} }
} }
@ -989,18 +1064,18 @@ defineExpose({
} }
.tag-submited { .tag-submited {
color: #507AFD; color: #507afd;
border: 1px solid #507AFD; border: 1px solid #507afd;
} }
.tag-submiting { .tag-submiting {
color: #FFB800; color: #ffb800;
border: 1px solid #FFB800; border: 1px solid #ffb800;
} }
.tag-passed { .tag-passed {
color: #02C984; color: #02c984;
border: 1px solid #02C984; border: 1px solid #02c984;
} }
.tag-not-passed { .tag-not-passed {
@ -1028,7 +1103,8 @@ defineExpose({
margin-right: 32px; margin-right: 32px;
} }
.top {} .top {
}
.property-content { .property-content {
flex: 1; flex: 1;
@ -1070,7 +1146,11 @@ defineExpose({
bottom: 9px; bottom: 9px;
width: calc(100% - 11px); width: calc(100% - 11px);
height: 58px; height: 58px;
background: linear-gradient(180deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.71) 100%); background: linear-gradient(
180deg,
rgba(0, 0, 0, 0.01),
rgba(0, 0, 0, 0.71) 100%
);
border-radius: 8px; border-radius: 8px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -1170,7 +1250,10 @@ defineExpose({
justify-content: center; justify-content: center;
background-color: rgba(0, 0, 0, 0.48); background-color: rgba(0, 0, 0, 0.48);
} }
<<<<<<< HEAD
=======
>>>>>>> test
} }
} }
} }

3
types/task.d.ts vendored

@ -11,7 +11,8 @@ export interface TaskState {
currentIndex: number currentIndex: number
approvalList: any[] approvalList: any[]
immersion: boolean immersion: boolean
inFile: boolean inFile: boolean,
inFileId:string
} }
export interface TaskEntity { export interface TaskEntity {

Loading…
Cancel
Save