diff --git a/src/components/Approval/NotPassed.vue b/src/components/Approval/NotPassed.vue index 6d42cca..111b839 100644 --- a/src/components/Approval/NotPassed.vue +++ b/src/components/Approval/NotPassed.vue @@ -43,6 +43,10 @@ function showModal(value) { function closeModal() { show.value = false emit('close') + + formData.disposeTypeId='262403670085013522' + formData.failCauseId= '260402999231251188' + formData.comment= '' } defineExpose({ @@ -114,6 +118,9 @@ async function handleSumbit(e: MouseEvent) { } } }) + formData.disposeTypeId='262403670085013522' + formData.failCauseId= '260402999231251188' + formData.comment= '' } async function selectChange(id) { diff --git a/src/store/modules/task.ts b/src/store/modules/task.ts index bf83d27..f66b80c 100644 --- a/src/store/modules/task.ts +++ b/src/store/modules/task.ts @@ -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] diff --git a/src/views/task/aside/ListItem.vue b/src/views/task/aside/ListItem.vue index f81bf6e..b281bc7 100644 --- a/src/views/task/aside/ListItem.vue +++ b/src/views/task/aside/ListItem.vue @@ -1,6 +1,6 @@ diff --git a/src/views/task/aside/TaskList.vue b/src/views/task/aside/TaskList.vue index 2c39365..0e5eb93 100644 --- a/src/views/task/aside/TaskList.vue +++ b/src/views/task/aside/TaskList.vue @@ -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({ + + @click="selectHandler(item, index)" + > + + diff --git a/src/views/task/content/Content.vue b/src/views/task/content/Content.vue index 1f84c21..f65a440 100644 --- a/src/views/task/content/Content.vue +++ b/src/views/task/content/Content.vue @@ -358,9 +358,11 @@ async function handleDragEnd(event, item) { 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({ @@ -548,6 +550,7 @@ function overTaskHandelr(item: any) { overTasktwo.value = item; } function closePassno() { + console.log(notPassModalRef.value) overTask.value = null; } //const loadingx = ref(false); @@ -1389,6 +1392,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") { -->