|
|
|
@ -1,5 +1,11 @@
|
|
|
|
<script lang="ts" setup>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
|
|
|
import { computed, onMounted, onUnmounted, reactive, ref, unref, watch } from 'vue'
|
|
|
|
|
|
|
|
import { chunk, clone } from 'lodash-es'
|
|
|
|
|
|
|
|
import { useDialog, useMessage } from 'naive-ui'
|
|
|
|
|
|
|
|
import { useRoute } from 'vue-router'
|
|
|
|
|
|
|
|
import BatchModal from '../modal/BatchModal.vue'
|
|
|
|
import { getAllfieldList, getfieldList } from '@/api/home/filter'
|
|
|
|
import { getAllfieldList, getfieldList } from '@/api/home/filter'
|
|
|
|
|
|
|
|
|
|
|
|
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'
|
|
|
|
@ -8,10 +14,6 @@ import { isEmpty } from '@/utils'
|
|
|
|
import { formatToDateHMS } from '@/utils/dateUtil'
|
|
|
|
import { formatToDateHMS } from '@/utils/dateUtil'
|
|
|
|
import { hideDownload } from '@/utils/image'
|
|
|
|
import { hideDownload } from '@/utils/image'
|
|
|
|
import emitter from '@/utils/mitt'
|
|
|
|
import emitter from '@/utils/mitt'
|
|
|
|
import { chunk, 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'
|
|
|
|
@ -28,6 +30,7 @@ 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 taskTableData = ref<any[]>([])
|
|
|
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
|
|
|
|
|
|
|
const sortBy: PictureSortParam = {
|
|
|
|
const sortBy: PictureSortParam = {
|
|
|
|
orderbyname: 'asc',
|
|
|
|
orderbyname: 'asc',
|
|
|
|
@ -74,6 +77,29 @@ const userStore = useUser()
|
|
|
|
const imageRef = ref<ComponentElRef | null>()
|
|
|
|
const imageRef = ref<ComponentElRef | null>()
|
|
|
|
let processItems: any[] = []
|
|
|
|
let processItems: any[] = []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
|
|
if (route.query.id)
|
|
|
|
|
|
|
|
getDetail(route.query.id, route.query.packageid)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 从任务终审列表跳转过来的
|
|
|
|
|
|
|
|
async function getDetail(taskId, packageid) {
|
|
|
|
|
|
|
|
taskDetailInfo.value = await getTaskDetailInfo(taskId, packageid)
|
|
|
|
|
|
|
|
getTableData()
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
// states:1未提交,2待审批,3通过,4不通过
|
|
|
|
// states:1未提交,2待审批,3通过,4不通过
|
|
|
|
function validate(items: any[]) {
|
|
|
|
function validate(items: any[]) {
|
|
|
|
if (items.length === 0)
|
|
|
|
if (items.length === 0)
|
|
|
|
@ -234,11 +260,12 @@ watch(
|
|
|
|
async (newValue, oldValue) => {
|
|
|
|
async (newValue, oldValue) => {
|
|
|
|
const packageid = taskStore.getPackageid
|
|
|
|
const packageid = taskStore.getPackageid
|
|
|
|
const taskId = taskStore.getActiveId
|
|
|
|
const taskId = taskStore.getActiveId
|
|
|
|
|
|
|
|
console.log(packageid)
|
|
|
|
|
|
|
|
console.log(taskId)
|
|
|
|
|
|
|
|
|
|
|
|
if (isEmpty(taskId))
|
|
|
|
if (isEmpty(taskId))
|
|
|
|
return
|
|
|
|
return
|
|
|
|
taskDetailInfo.value = await getTaskDetailInfo(taskId, packageid)
|
|
|
|
taskDetailInfo.value = await getTaskDetailInfo(taskId, packageid)
|
|
|
|
console.log(taskDetailInfo.value,'taskDetailInfo')
|
|
|
|
|
|
|
|
getTableData()
|
|
|
|
getTableData()
|
|
|
|
// TODO mock备份 确认逻辑无误后删除
|
|
|
|
// TODO mock备份 确认逻辑无误后删除
|
|
|
|
// let showFieldData = taskDetailInfo.value.ocrPicture;
|
|
|
|
// let showFieldData = taskDetailInfo.value.ocrPicture;
|
|
|
|
@ -283,10 +310,6 @@ const currentTaskId = computed(() => {
|
|
|
|
|
|
|
|
|
|
|
|
function overTaskHandle() {
|
|
|
|
function overTaskHandle() {
|
|
|
|
const item = taskDetailInfo.value
|
|
|
|
const item = taskDetailInfo.value
|
|
|
|
if(item?.userapprove?.statshis == 2 || item?.userapprove?.statshis == 3){
|
|
|
|
|
|
|
|
overTask.value = null;
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (validate([item]) == null && batch.value === false)
|
|
|
|
if (validate([item]) == null && batch.value === false)
|
|
|
|
overTask.value = item
|
|
|
|
overTask.value = item
|
|
|
|
|