|
|
@ -1,21 +1,24 @@
|
|
|
|
<script lang="ts" setup>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import { clone } from 'lodash-es'
|
|
|
|
import { getAllfieldList } from "@/api/home/filter"
|
|
|
|
import { useDialog, useMessage } from 'naive-ui'
|
|
|
|
|
|
|
|
import { computed, onUnmounted, reactive, ref, unref, watch } from 'vue'
|
|
|
|
|
|
|
|
import { isEmpty } from '@/utils'
|
|
|
|
|
|
|
|
import BatchModal from '../modal/BatchModal.vue'
|
|
|
|
|
|
|
|
import { audit } from '@/api/task/task'
|
|
|
|
import { audit } from '@/api/task/task'
|
|
|
|
import { getTaskDetailInfo, getTaskDetailPictureList } from '@/api/work/work'
|
|
|
|
import { getTaskDetailInfo, getTaskDetailPictureList } from '@/api/work/work'
|
|
|
|
import { useTask } from '@/store/modules/task'
|
|
|
|
import { useTask } from '@/store/modules/task'
|
|
|
|
import { useUser } from '@/store/modules/user'
|
|
|
|
import { useUser } from '@/store/modules/user'
|
|
|
|
|
|
|
|
import { isEmpty } from '@/utils'
|
|
|
|
import { hideDownload } from '@/utils/image'
|
|
|
|
import { hideDownload } from '@/utils/image'
|
|
|
|
import emitter from '@/utils/mitt'
|
|
|
|
import emitter from '@/utils/mitt'
|
|
|
|
|
|
|
|
import _ from 'lodash'
|
|
|
|
|
|
|
|
import { clone } from 'lodash-es'
|
|
|
|
|
|
|
|
import { useDialog, useMessage } from 'naive-ui'
|
|
|
|
|
|
|
|
import { computed, onUnmounted, reactive, ref, unref, watch } from 'vue'
|
|
|
|
|
|
|
|
import BatchModal from '../modal/BatchModal.vue'
|
|
|
|
import ConfrimModal from '../modal/ConfrimModal.vue'
|
|
|
|
import ConfrimModal from '../modal/ConfrimModal.vue'
|
|
|
|
import CustomSettingModal from '../modal/CustomSettingModal.vue'
|
|
|
|
import CustomSettingModal from '../modal/CustomSettingModal.vue'
|
|
|
|
import PictureTable from './PictureTable.vue'
|
|
|
|
import PictureTable from './PictureTable.vue'
|
|
|
|
import TaskTable from './TaskTable.vue'
|
|
|
|
import TaskTable from './TaskTable.vue'
|
|
|
|
import type { ApprovalParam, PictureSortParam } from '/#/api'
|
|
|
|
import type { ApprovalParam, PictureSortParam } from '/#/api'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const batch = ref(false)
|
|
|
|
const batch = ref(false)
|
|
|
|
const selectItems = ref<any[]>([])
|
|
|
|
const selectItems = ref<any[]>([])
|
|
|
|
const message = useMessage()
|
|
|
|
const message = useMessage()
|
|
|
@ -24,6 +27,7 @@ const confrimModalRef = ref(null)
|
|
|
|
const batchModalRef = ref(null)
|
|
|
|
const batchModalRef = ref(null)
|
|
|
|
const totalCount = ref(0)
|
|
|
|
const totalCount = ref(0)
|
|
|
|
const CustomSettingModalRef = ref(null)
|
|
|
|
const CustomSettingModalRef = ref(null)
|
|
|
|
|
|
|
|
const taskTableData = ref<any[]>([])
|
|
|
|
|
|
|
|
|
|
|
|
const sortBy: PictureSortParam = {
|
|
|
|
const sortBy: PictureSortParam = {
|
|
|
|
orderbyname: 'asc',
|
|
|
|
orderbyname: 'asc',
|
|
|
@ -196,25 +200,50 @@ function backHandler() {
|
|
|
|
taskStore.back()
|
|
|
|
taskStore.back()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
watch(() => [taskStore.activeId], async (newValue, oldValue) => {
|
|
|
|
watch(
|
|
|
|
const packageid = taskStore.getPackageid
|
|
|
|
() => [taskStore.activeId],
|
|
|
|
const taskId = taskStore.getActiveId
|
|
|
|
async (newValue, oldValue) => {
|
|
|
|
|
|
|
|
const packageid = taskStore.getPackageid;
|
|
|
|
if (isEmpty(taskId))
|
|
|
|
const taskId = taskStore.getActiveId;
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
if (isEmpty(taskId)) return;
|
|
|
|
taskDetailInfo.value = await getTaskDetailInfo(taskId, packageid)
|
|
|
|
|
|
|
|
|
|
|
|
let listData = [];
|
|
|
|
if (!isEmpty(packageid)) {
|
|
|
|
taskDetailInfo.value = await getTaskDetailInfo(taskId, packageid);
|
|
|
|
const { data, total } = await getTaskDetailPictureList(packageid, taskId, { ...taskpagination, ...sortBy })
|
|
|
|
const reviewType = 3; //类型
|
|
|
|
taskDetailPictureList.value = data
|
|
|
|
let res = await getAllfieldList(reviewType);
|
|
|
|
totalCount.value = total
|
|
|
|
let fieldList = (res as any)?.data;
|
|
|
|
}
|
|
|
|
console.log(taskDetailInfo.value, "taskDetailInfo");
|
|
|
|
else {
|
|
|
|
console.log(fieldList, "fieldList");
|
|
|
|
taskDetailPictureList.value.length = 0
|
|
|
|
let showFieldData = taskDetailInfo.value.ocrPicture;
|
|
|
|
totalCount.value = 0
|
|
|
|
let showFieldKeys = Object.keys(showFieldData);
|
|
|
|
|
|
|
|
for (let i in showFieldKeys) {
|
|
|
|
|
|
|
|
let key = showFieldKeys[i];
|
|
|
|
|
|
|
|
let currentData = fieldList.find((v) => v.name == key);
|
|
|
|
|
|
|
|
if (currentData) {
|
|
|
|
|
|
|
|
let item = {
|
|
|
|
|
|
|
|
label: currentData.fieldDesc,
|
|
|
|
|
|
|
|
value: taskDetailInfo.value.ocrPicture[key],
|
|
|
|
|
|
|
|
key: currentData.name,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
listData.push(item);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
taskTableData.value = _.chunk(listData,2);
|
|
|
|
|
|
|
|
if (!isEmpty(packageid)) {
|
|
|
|
|
|
|
|
const { data, total } = await getTaskDetailPictureList(
|
|
|
|
|
|
|
|
packageid,
|
|
|
|
|
|
|
|
taskId,
|
|
|
|
|
|
|
|
{ ...taskpagination, ...sortBy }
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
taskDetailPictureList.value = data;
|
|
|
|
|
|
|
|
totalCount.value = total;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
taskDetailPictureList.value.length = 0;
|
|
|
|
|
|
|
|
totalCount.value = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
const currentTaskId = computed(() => {
|
|
|
|
const currentTaskId = computed(() => {
|
|
|
|
const index = taskStore.getCurrentIndex
|
|
|
|
const index = taskStore.getCurrentIndex
|
|
|
@ -402,7 +431,7 @@ function getPercent(pictureid: string) {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<n-tabs type="line" animated>
|
|
|
|
<n-tabs type="line" animated>
|
|
|
|
<n-tab-pane name="task-info" tab="任务信息">
|
|
|
|
<n-tab-pane name="task-info" tab="任务信息">
|
|
|
|
<TaskTable :data="taskDetailInfo" />
|
|
|
|
<TaskTable :data="taskDetailInfo" :taskTableData="taskTableData"/>
|
|
|
|
</n-tab-pane>
|
|
|
|
</n-tab-pane>
|
|
|
|
<n-tab-pane name="picture-info" tab="图片信息">
|
|
|
|
<n-tab-pane name="picture-info" tab="图片信息">
|
|
|
|
<PictureTable :data="taskDetailInfo" />
|
|
|
|
<PictureTable :data="taskDetailInfo" />
|
|
|
|