fix: 合并代码处理冲突

fix/modifyStyle
zhouxiaoan 2 years ago
commit 38a43bed83

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

@ -1,13 +1,13 @@
<script lang="ts" setup>
import { dateZhCN, zhCN,NModalProvider } from "naive-ui";
import { computed, onMounted, nextTick,inject } from "vue";
import { dateZhCN, zhCN, NModalProvider } from "naive-ui";
import { computed, onMounted, nextTick, inject } from "vue";
import { AppProvider } from "@/components/Application";
import { lighten } from "@/utils/index";
import mouseTrapBind from '@/hooks/event/mouseTrapBind'
const mousetrap = inject('mousetrap') as any
onMounted(()=>{
import mouseTrapBind from "@/hooks/event/mouseTrapBind";
const mousetrap = inject("mousetrap") as any;
onMounted(() => {
mouseTrapBind(mousetrap);
})
});
const getThemeOverrides = computed(() => {
const theme = "#1980FF";
@ -49,8 +49,6 @@ const getThemeOverrides = computed(() => {
},
};
});
</script>
<template>
@ -59,10 +57,10 @@ const getThemeOverrides = computed(() => {
:date-locale="dateZhCN"
:theme-overrides="getThemeOverrides"
>
<NModalProvider>
<AppProvider>
<RouterView />
</AppProvider>
<NModalProvider>
<AppProvider>
<RouterView />
</AppProvider>
</NModalProvider>
</NConfigProvider>
</template>
@ -80,14 +78,28 @@ const getThemeOverrides = computed(() => {
color: #666666 !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;
}
.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;
justify-content: flex-end !important;
}
.n-form-item .n-form-item-label .n-form-item-label__asterisk{
transform:rotate(-90deg) !important;
.n-form-item .n-form-item-label .n-form-item-label__asterisk {
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>

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -378,7 +378,7 @@ async function tasksLoadingCloseCallback() {
async function showLoginSuccessModal() {
const modal = LoginSuccessModalRef.value as any;
modal.showModal()
modal.showModal();
}
// id
@ -623,9 +623,8 @@ const loadImgOver = (item) => {
};
defineExpose({
showLoginSuccessModal
})
showLoginSuccessModal,
});
</script>
<template>
@ -633,7 +632,7 @@ defineExpose({
<div class="wrapper-header">
<div class="left">
<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 class="flex-btn-icon">
<SvgIcon

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

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

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

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

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

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

@ -26,8 +26,11 @@ const pagination = reactive({
pageSize: 30,
})
function selectHandler(id: string, index: number) {
taskStore.setActive(index)
function selectHandler(item, index: number) {
activeId.value = item.id
console.log(activeId.value,item.id)
console.log(index)
taskStore.setActive(index,item.id)
}
useInfiniteScroll(
@ -73,10 +76,39 @@ async function fetchList() {
watch(
() => taskStore.activeId,
(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() {
pagination.pageNo = 0
pagination.pageSize = 30
@ -103,6 +135,8 @@ onMounted(() => {
await reset();
searchId.value = id;
data.value = await fetchList();
activeId.value = data.value[0].id
console.log(data.value)
})
})
@ -128,14 +162,17 @@ defineExpose({
<template>
<n-spin :show="isLoading">
<div ref="el" class="list">
<ListItem
v-for="(item, index) in data"
:key="item.id"
:show-field-list="showFieldList"
:selected="activeId === item.id"
:list-item="item"
@click="selectHandler(item.id, index)"
/>
@click="selectHandler(item, index)"
>
</ListItem>
</div>
</n-spin>
</template>

@ -1,6 +1,7 @@
<script lang="ts" setup>
import {
computed,
nextTick,
onMounted,
onUnmounted,
reactive,
@ -11,6 +12,7 @@ import {
import { chunk, clone } from 'lodash-es'
import { useDialog, useMessage } from 'naive-ui'
import { useRoute, useRouter } from 'vue-router'
import { useInfiniteScroll } from '@vueuse/core'
import BatchModal from '../modal/BatchModal.vue'
import CustomSettingModal from '../modal/CustomSettingModal.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 { TASK_STATUS_OBJ } from '@/enums/index'
import { useFinal } from '@/store/modules/final'
import {
audit,
dubiousfileyd,
@ -52,11 +53,16 @@ const taskTableData = ref<any[]>([])
const route = useRoute()
const isDetail = ref(false) //
const finalStore = useFinal()
const imgbigshow = ref(true)
const sortBy: any = {
orderType: 'desc',
orderName: 'similarityScore',
}
const el = ref<HTMLDivElement | null>(null)
const pagination = reactive({
pageNo: 0,
pageSize: 30,
})
function onCheckChange(checked: any, item: any) {
const index = selectItems.value.indexOf(item)
item.checked = checked
@ -106,6 +112,9 @@ onMounted(() => {
let lastKeyPressTime = 0
let keyPressTimer = null
function changeimgbigshow() {
imgbigshow.value = !imgbigshow.value
}
const doubleClickInterval = 300 //
//
function handleKeydown(event) {
@ -118,6 +127,10 @@ function handleKeydown(event) {
// batchModalRef.value.closeModal()
}
else if (event.keyCode === 27) {
overTask.value = null
overTasktwo.value = null
}
else if (event.key === 'p' || event.key === 'P') {
//
const now = Date.now()
@ -163,7 +176,17 @@ function handleKeydown(event) {
if (now - lastKeyPressTime < doubleClickInterval) {
//
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
modal.showModal([taskDetailInfo.value])
@ -277,12 +300,25 @@ function approvalHandler(items?: any) {
negativeText: '取消',
onPositiveClick: () => {
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) {
console.log(items)
const modal = unref(notPassModalRef)! as any
modal.showModal(items)
}
@ -329,19 +365,18 @@ async function handleDragEnd(event, item) {
getTableData()
getImgList()
}
else {
message.error(res.message)
}
taskStore.setInFile(false)
taskStore.setInFile(item.pictureId)
}
}
async function addSuspicious() {
taskStore.setInFileId(taskDetailInfo.value.ocrPicture)
console.log(taskDetailInfo.value.ocrPicture)
if (taskDetailInfo.value.ocrPicture.pictureid) {
const res = await dubiousfileyd({
pictureid: taskDetailInfo.value.ocrPicture.id,
})
console.log(res)
if (res.code === 'OK') {
message.success('加入成功')
setBatch(false)
@ -421,6 +456,7 @@ function overTaskHandle() {
function leaveTaskHandler() {
overTask.value = null
overTasktwo.value = null
}
function showActionsModal() {
@ -440,6 +476,13 @@ function immersionHandler() {
//
function toggleFullScreen() {
isFullScreen.value = !isFullScreen.value
if (isFullScreen.value) {
fetchData()
window.addEventListener('scroll', checkBottom)
}
else {
window.removeEventListener('scroll', checkBottom)
}
}
function previewHandler(event: MouseEvent) {
event.stopImmediatePropagation()
@ -471,6 +514,7 @@ async function getDetail() {
function notPassSuccess(param) {
batchModalRef.value.reload()
reloadList(param, '不通过')
overTask.value = null
}
function reloadList(param, text) {
@ -518,10 +562,108 @@ function overTaskHandelr(item: any) {
if (validate([item]) == null && batchtwo.value === false)
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>
<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="left">
<span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span>
@ -619,15 +761,49 @@ function overTaskHandelr(item: any) {
</n-button>
</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
class="left"
:style="
isFullScreen
? {
'height': '395px',
'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
}
? imgbigshow
? {
'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})`,
}
@ -738,12 +914,9 @@ function overTaskHandelr(item: any) {
size="16"
name="camera-time"
/>
<span>{{
taskDetailInfo?.ocrPicture?.photoDateTimestamp
? formatToDateHMS(
Number(taskDetailInfo.ocrPicture.photoDateTimestamp),
)
: "-"
taskDetailInfo?.ocrPicture?.photoDateTimestamp ?? "-"
}}</span>
</div>
<div class="time-item time-item2">
@ -753,6 +926,7 @@ function overTaskHandelr(item: any) {
size="16"
name="submit-time"
/>
<span>{{
taskDetailInfo?.ocrPicture?.submitDateTimestamp
? formatToDateHMS(
@ -771,7 +945,36 @@ function overTaskHandelr(item: any) {
</div>
<div class="leftback" />
</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%">
<div class="right-card">
<div v-show="!isFullScreen" class="header">
@ -963,6 +1166,7 @@ function overTaskHandelr(item: any) {
</n-tabs>
<div v-else class="imgbottom">
<div
v-show="imgbigshow"
style="
display: flex;
justify-content: space-between;
@ -991,13 +1195,13 @@ function overTaskHandelr(item: any) {
<div style="cursor: pointer" @click="sortHandler('createdate')">
<span>时间排序</span>
<SvgIcon
v-show="selectedSortName !== 'createdate'"
v-if="true"
style="margin-left: 5px"
name="sort"
size="12"
/>
<SvgIcon
v-show="selectedSortName === 'createdate'"
v-else
style="margin-left: 5px"
name="active-sort"
size="12"
@ -1009,13 +1213,13 @@ function overTaskHandelr(item: any) {
>
<span>相似度排序</span>
<SvgIcon
v-show="selectedSortName !== 'similarityScore'"
v-if="true"
style="margin-left: 5px"
name="sort"
size="12"
/>
<SvgIcon
v-show="selectedSortName === 'similarityScore'"
v-else
style="margin-left: 5px"
name="active-sort"
size="12"
@ -1023,11 +1227,107 @@ function overTaskHandelr(item: any) {
</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
v-for="(item, index) in taskDetailPictureList"
:key="index"
:class="{ 'item-selected': item === selectTask }"
class="grid-item"
@click="handleSelect(item)"
@mouseover="overTaskHandelr(item)"
@ -1086,22 +1386,30 @@ function overTaskHandelr(item: any) {
<div
v-show="overTasktwo && overTasktwo.id === item.id"
class="action"
@mouseover="overTaskHandelr"
@mouseleave="leaveTaskHandler"
>
<SvgIcon
style="cursor: pointer"
name="t1"
@click.stop="approvalHandler"
@click.stop="approvalHandlerx(item)"
/>
<SvgIcon
style="cursor: pointer; margin-left: 40px"
name="t2"
@click.stop="singleRejectHandler(item)"
@click.stop="singleRejectHandlex(item)"
/>
</div>
</div>
</div>
</div> -->
</div>
<NotPassed ref="notPassModalRef" @success="notPassSuccess" />
<NotPassed
ref="notPassModalRef"
@success="notPassSuccess"
@close="closePassno"
/>
<BatchModal
ref="batchModalRef"
@reject="rejectHandler"
@ -1113,6 +1421,7 @@ function overTaskHandelr(item: any) {
<style lang="less" scoped>
.fullscreen-container {
overflow-y: auto;
/* 可添加其他样式 */
width: 100vw;
height: 100vh;
@ -1763,4 +2072,147 @@ function overTaskHandelr(item: any) {
margin: 3px 0 10px 0;
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>

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

@ -146,7 +146,7 @@ function setShowSearch(value: boolean) {
if (value === false) {
(packageListRef.value as any).search('')
searchKeyword.value = ''
};
}
}
const inputHandler = debounce((word) => {
@ -176,7 +176,7 @@ function ApprovalOver(packageId) {
<div class="left">
<svg-icon name="all-worksheet" size="32" />
<!-- j -->
<span style="margin-left: 8px;color: #333333;">所有任务包</span>
<span style="margin-left: 8px; color: #333333">所有任务包</span>
</div>
<div class="right">
<SvgIcon

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

@ -1,10 +1,6 @@
<script lang="ts" setup>
import { audit } from '@/api/task/task'
import {
dubiousfileyd,
getPictureSimilarityList,
getTaskDetailInfo,
} from '@/api/work/work'
import { getPictureSimilarityList, getTaskDetailInfo } from '@/api/work/work'
import NotPassed from '@/components/Approval/NotPassed.vue'
import { TASK_STATUS_OBJ } from '@/enums/index'
import { useWorkOrder } from '@/store/modules/workOrder'
@ -17,7 +13,7 @@ import { format } from 'date-fns'
import imagesloaded from 'imagesloaded'
import { clone, cloneDeep, debounce, pickBy } from 'lodash-es'
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 ConfrimModal from '../modal/ConfrimModal.vue'
import type { ApprovalParam, SimilarityPictureSortParam } from '/#/api'
@ -76,7 +72,6 @@ const isFullScreen = ref(false)
const notPassModalRef = ref(null)
const mainImageModalRef = ref(null)
const wrapperListRef = ref<HTMLElement | undefined>(undefined)
let canloadMore = true
let processItems: any[] = []
@ -139,9 +134,12 @@ async function featchList() {
loading.value = true
try {
taskpagination.pageNo += 1
const { data, total, pageCount } = await getPictureSimilarityList(
{ ...taskpagination, ...sortBy, checkDuplicateId: workStore.activeId, pictureId: taskDetailInfo.value.id },
)
const { data, total, pageCount } = await getPictureSimilarityList({
...taskpagination,
...sortBy,
checkDuplicateId: workStore.activeId,
pictureId: taskDetailInfo.value.id,
})
totalCount.value = total
canloadMore = pageCount >= taskpagination.pageNo && pageCount > 0
@ -383,7 +381,7 @@ function handleApproveMainImage(items?: any) {
else { message.error(res.message) }
})
},
onNegativeClick: () => { },
onNegativeClick: () => {},
})
}
function approvalHandler(items?: any) {
@ -433,7 +431,7 @@ function approvalHandler(items?: any) {
onPositiveClick: () => {
doAudit(param)
},
onNegativeClick: () => { },
onNegativeClick: () => {},
})
}
@ -494,8 +492,20 @@ defineExpose({
批量审批
</div>
<div class="icon-wrap">
<SvgIcon 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" />
<SvgIcon
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>
@ -522,22 +532,24 @@ defineExpose({
<div class="wrapper-detail">
<!-- 左侧大图 图片信息 -->
<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"
>
<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" />
<span>{{ taskDetailInfo?.photoDateTimestamp }}</span>
<!-- <span class="time-value">{{ taskDetailInfo?.photoDateTimestamp ? format(
taskDetailInfo.photoDateTimestamp, 'yyyy-MM-dd HH:mm:ss') : '-' }} </span> -->
<span class="time-value">{{ taskDetailInfo?.photoDateTimestamp }} </span>
</div>
<div class="time">
<SvgIcon color="#FFF" size="16" name="save" />
<span class="time-value">{{
taskDetailInfo?.submitDateTimestamp ? format(taskDetailInfo?.submitDateTimestamp, 'yyyy-MM-dd HH:mm:ss')
: '-'
}} </span>
taskDetailInfo?.submitDateTimestamp
? format(taskDetailInfo?.submitDateTimestamp, "yyyy-MM-dd HH:mm:ss")
: "-"
}}
</span>
</div>
</div>
<div class="status">
@ -555,22 +567,31 @@ defineExpose({
<n-grid x-gap="12" y-gap="10" :cols="12">
<n-gi span="4" class="gi1">
<span>
<img class="icon-status" src="@/assets/images/task/status.png" alt="">
<img
class="icon-status"
src="@/assets/images/task/status.png"
alt=""
>
</span>
</n-gi>
<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>
</n-gi>
<n-gi span="4" class="gi1">
<span>
<img class="icon-status" src="@/assets/images/task/similarity.png" alt="">
<img
class="icon-status"
src="@/assets/images/task/similarity.png"
alt=""
>
</span>
</n-gi>
<n-gi span="8" class="gi2">
<span class="value num">{{
totalCount
}}<span class="unit"></span> </span>
<span class="value num">{{ totalCount }}<span class="unit"></span>
</span>
<span class="label">相似匹配</span>
</n-gi>
</n-grid>
@ -581,7 +602,11 @@ defineExpose({
</div>
<!-- 预览大图组件 -->
<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 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, 2, 3].includes(taskDetailInfo.historyStates)" style="cursor: pointer; margin-left: 30px" name="t9" @click.stop="handleRejectdubiousfileyd" />
</div>
<PictureInfo :task-detail-info="taskDetailInfo" />
</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
v-for="(item, index) in listData" :key="index" :class="{ 'item-selected': item === selectTask }"
class="grid-item" @click="handleSelect(item)" @mouseover="overTaskHandelr(item)"
@mouseleave="leaveTaskHandler"
style="display: flex; justify-content: space-between; padding: 12px 0px 3px 0"
>
<div class="img-wrapper" :style="{ 'background-image': `url(${item.imgurl})` }" />
<div class="time-wrapper">
<div class="time">
<SvgIcon color="#FFF" size="16" name="camera" />
<span class="current-time">{{ item.photoDateTimestamp ? formatToDateHMS(Number(item.photoDateTimestamp)
|| 0) : '-'
}}</span>
<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 class="time">
<SvgIcon color="#FFF" size="16" name="save" />
<span class="current-time">{{ item.submitDateTimestamp ? formatToDateHMS(Number(item.submitDateTimestamp)
|| 0) : '-'
}}</span>
<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 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="wrapper-list">
<div
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="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)}%` }}
<!-- {{ item?.maxSimilarity && Number(item?.maxSimilarity).toFixed(0) }}<span class="percent-unit">%</span> -->
<div class="time-wrapper">
<div class="time">
<SvgIcon color="#FFF" size="16" name="camera" />
<span class="current-time">{{
item.photoDateTimestamp
? 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 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">
<SvgIcon style="cursor: pointer" name="t1" @click.stop="approvalHandler" />
<SvgIcon style="cursor: pointer;margin-left: 40px;" name="t2" @click.stop="singleRejectHandler(item)" />
<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">
<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>
<n-back-top :listen-to="wrapperListRef" :bottom="220" :visibility-height="10">
<div
style="
<n-back-top :listen-to="wrapperListRef" :bottom="220" :visibility-height="10">
<div
style="
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 14px;
"
>
回到顶部
</div>
</n-back-top>
>
回到顶部
</div>
</n-back-top>
</div>
</div>
</div>
</n-spin>
@ -796,7 +868,7 @@ defineExpose({
z-index: 3;
width: 30px;
height: 30px;
background: rgba(255, 255, 255, 0.20);
background: rgba(255, 255, 255, 0.2);
border-radius: 6px;
backdrop-filter: blur(10px);
display: flex;
@ -836,7 +908,11 @@ defineExpose({
.footer-times {
width: 100%;
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;
position: absolute;
bottom: 0;
@ -888,7 +964,7 @@ defineExpose({
justify-content: center;
width: 30px;
height: 30px;
background: rgba(80, 122, 253, .1);
background: rgba(80, 122, 253, 0.1);
border-radius: 8px;
margin-left: 10px;
cursor: pointer;
@ -927,7 +1003,6 @@ defineExpose({
.unit {
font-size: 11px;
}
}
}
@ -989,18 +1064,18 @@ defineExpose({
}
.tag-submited {
color: #507AFD;
border: 1px solid #507AFD;
color: #507afd;
border: 1px solid #507afd;
}
.tag-submiting {
color: #FFB800;
border: 1px solid #FFB800;
color: #ffb800;
border: 1px solid #ffb800;
}
.tag-passed {
color: #02C984;
border: 1px solid #02C984;
color: #02c984;
border: 1px solid #02c984;
}
.tag-not-passed {
@ -1028,7 +1103,8 @@ defineExpose({
margin-right: 32px;
}
.top {}
.top {
}
.property-content {
flex: 1;
@ -1070,7 +1146,11 @@ defineExpose({
bottom: 9px;
width: calc(100% - 11px);
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;
display: flex;
flex-direction: column;
@ -1170,7 +1250,10 @@ defineExpose({
justify-content: center;
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
approvalList: any[]
immersion: boolean
inFile: boolean
inFile: boolean,
inFileId:string
}
export interface TaskEntity {

Loading…
Cancel
Save