Merge branch 'main' into shen

bak
Dragon 1 year ago
commit c6e71a100b

@ -145,7 +145,7 @@ function editFilter(filter: any) {
watch(asideValue, (newVal) => { watch(asideValue, (newVal) => {
configStore.setAsideValue(newVal) configStore.setAsideValue(newVal)
}) }, { deep: true })
</script> </script>
<template> <template>

@ -35,6 +35,7 @@ const LoginSuccessModalRef = ref(null)
const loading = ref(false) const loading = ref(false)
const message = useMessage() const message = useMessage()
const totalCount = ref(0) const totalCount = ref(0)
const sortBy = ref<'asc' | 'desc'>('desc')
let canloadMore = true let canloadMore = true
let filterId = null let filterId = null
@ -74,10 +75,6 @@ const layout = debounce(() => {
(_masonry as any).layout() (_masonry as any).layout()
if (!el.value) if (!el.value)
return return
// const scrollHeight = el.value!.scrollHeight
// const clientHeight = el.value!.clientHeight
// const top = scrollHeight - clientHeight - 100
// el.value!.scrollTo({ top, behavior: 'instant' })
loading.value = false loading.value = false
}) })
@ -130,7 +127,7 @@ async function featchList() {
const asideParams = unref(configStore.getAsideValue) const asideParams = unref(configStore.getAsideValue)
const params = filterId ? { userSearchId: filterId } : asideParams const params = filterId ? { userSearchId: filterId } : asideParams
const result = await getPictureList({ ...pagination, ...contentParams, ...params }) const result = await getPictureList({ ...pagination, ...contentParams, ...params, ordertype: sortBy.value })
const { data, pageCount, total } = result const { data, pageCount, total } = result
totalCount.value = total totalCount.value = total
canloadMore = pageCount >= pagination.pageNo && pageCount > 0 canloadMore = pageCount >= pagination.pageNo && pageCount > 0
@ -142,6 +139,7 @@ async function featchList() {
upname: item.upname, upname: item.upname,
ocrPictureclass: item.ocrPictureclass, ocrPictureclass: item.ocrPictureclass,
uphead: item.uphead, uphead: item.uphead,
similar: item.similarityscore || 0,
} }
}) })
@ -224,6 +222,7 @@ function reset() {
loading.value = false loading.value = false
canloadMore = true canloadMore = true
filterId = null filterId = null
layout() layout()
} }
@ -234,19 +233,26 @@ async function refreshHandler(filtersearchId?: any) {
filterId = filtersearchId filterId = filtersearchId
nextTick(() => { nextTick(() => {
useInfiniteScroll( setTimeout(() => {
el as any, useInfiniteScroll(
() => { el as any,
loadMore() () => {
}, loadMore()
{ distance: 10, canLoadMore: () => canloadMore }, },
) { distance: 10, canLoadMore: () => canloadMore },
)
}, 500)
}) })
} }
function getAvatar(url: string): string { function getAvatar(url: string): string {
return url ? getImgUrl(url) : avatar return url ? getImgUrl(url) : avatar
} }
function sortHandler() {
sortBy.value = sortBy.value === 'asc' ? 'desc' : 'asc'
refreshHandler()
}
</script> </script>
<template> <template>
@ -273,6 +279,10 @@ function getAvatar(url: string): string {
<SvgIcon class="gap" name="arrow-botton" size="14" /> <SvgIcon class="gap" name="arrow-botton" size="14" />
</div> </div>
</n-popselect> </n-popselect>
<div style="margin-left: 15px;cursor: pointer" @click="sortHandler()">
<span>相似度排序</span>
<SvgIcon style="margin-left: 8px;" name="sort" size="12" />
</div>
</div> </div>
<span>{{ totalCount }}</span> <span>{{ totalCount }}</span>
</div> </div>
@ -290,6 +300,12 @@ function getAvatar(url: string): string {
class="img" :img-props="{ onClick: hideDownload }" :class="{ 'img-fit': viewMode !== 'masonry' }" class="img" :img-props="{ onClick: hideDownload }" :class="{ 'img-fit': viewMode !== 'masonry' }"
:src="item.thumburl" :src="item.thumburl"
/> />
<div class="percent">
<SvgIcon size="42" name="tag" />
<div class="val">
{{ `${item.similar}%` }}
</div>
</div>
<div class="info"> <div class="info">
<div class="left"> <div class="left">
<n-avatar :src="getAvatar(item.uphead)" class="avatar" round /> <n-avatar :src="getAvatar(item.uphead)" class="avatar" round />
@ -411,8 +427,30 @@ function getAvatar(url: string): string {
border-radius: 7px; border-radius: 7px;
margin-bottom: 10px; margin-bottom: 10px;
overflow: hidden; overflow: hidden;
position: relative;
} }
.percent {
position: absolute;
text-align: center;
z-index: 3;
right: 0px;
top: -6px;
color: #FFF;
.val {
position: absolute;
left: 0;
top: 0;
display: block;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
}
.scroll { .scroll {
overflow-y: scroll; overflow-y: scroll;
} }

@ -1,8 +1,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import { format } from 'date-fns'; import { format } from "date-fns";
import { computed } from 'vue'; import { computed } from "vue";
defineOptions({ name: 'ListItem' }) defineOptions({ name: "ListItem" });
const props = defineProps({ const props = defineProps({
selected: { selected: {
@ -13,30 +13,46 @@ const props = defineProps({
type: Object as PropType<any>, type: Object as PropType<any>,
required: true, required: true,
}, },
}) });
const svgName = computed(() => { const svgName = computed(() => {
return props.selected ? 'task-select' : 'task' return props.selected ? "task-select" : "task";
}) });
</script> </script>
<template> <template>
<div class="list-item" :class="{ 'list-item-selected': selected }"> <div class="list-item" :class="{ 'list-item-selected': selected }">
<div class="list-item-header"> <div class="list-item-header">
<div style="display: flex;"> <div style="display: flex">
<SvgIcon :name="svgName" size="28" /> <SvgIcon :name="svgName" size="28" />
<span class="list-item-header-name" :class="{ 'list-item-header-selected': selected }"> <span
class="list-item-header-name"
:class="{ 'list-item-header-selected': selected }"
>
任务ID:{{ listItem.fromtaskname }} 任务ID:{{ listItem.fromtaskname }}
</span> </span>
</div> </div>
<SvgIcon v-show="selected" size="14" name="more-ver" /> <SvgIcon v-show="selected" size="14" name="more-ver" />
</div> </div>
<ul class="list-item-detail"> <ul class="list-item-detail">
<li>审批状态<span class="list-item-status">{{ listItem.statshisText }}</span></li> <li>
审批状态<span
class="list-item-status"
:class="
listItem.statshisText == '通过'
? 'list-item-success'
: listItem.statshisText == '不通过'
? 'list-item-error'
: 'list-item-watting'
"
>{{ listItem.statshisText }}</span
>
</li>
<li>审批节点{{ listItem.tasknamehis }}</li> <li>审批节点{{ listItem.tasknamehis }}</li>
<li>提交时间{{ format(new Date(), 'yyyy-MM-dd HH:mm:ss') }}</li> <li>
提交时间{{ format(listItem.createdate, "yyyy-MM-dd HH:mm:ss") }}
</li>
<li>提报人{{ listItem.fromUserName }}</li> <li>提报人{{ listItem.fromUserName }}</li>
</ul> </ul>
<div class="list-item-divider" /> <div class="list-item-divider" />
</div> </div>
@ -60,7 +76,7 @@ const svgName = computed(() => {
} }
&-selected { &-selected {
color: #507AFD; color: #507afd;
} }
} }
@ -72,12 +88,37 @@ const svgName = computed(() => {
display: inline-block; display: inline-block;
display: flex; display: flex;
align-items: center; align-items: center;
}
&-error {
&:before {
content: "";
width: 6px;
height: 6px;
background: #e45656;
border-radius: 50%;
display: inline-block;
margin-left: 8px;
margin-right: 4px;
}
}
&-success {
&:before { &:before {
content: ''; content: "";
width: 6px; width: 6px;
height: 6px; height: 6px;
background: #fe9800; background: #53c21d;
border-radius: 50%;
display: inline-block;
margin-left: 8px;
margin-right: 4px;
}
}
&-watting {
&:before {
content: "";
width: 6px;
height: 6px;
background: #398ade;
border-radius: 50%; border-radius: 50%;
display: inline-block; display: inline-block;
margin-left: 8px; margin-left: 8px;
@ -104,7 +145,6 @@ const svgName = computed(() => {
position: absolute; position: absolute;
bottom: 0px; bottom: 0px;
} }
} }
</style> </style>
../types ../types

@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useTaskStore } from '@/store/modules/task'
import emitter from '@/utils/mitt'
import { useInfiniteScroll } from '@vueuse/core' import { useInfiniteScroll } from '@vueuse/core'
import { onMounted, onUnmounted, reactive, ref, watch } from 'vue' import { onMounted, onUnmounted, reactive, ref, watch } from 'vue'
import ListItem from './ListItem.vue' import ListItem from './ListItem.vue'
import emitter from '@/utils/mitt'
import { useTaskStore } from '@/store/modules/task'
const taskStore = useTaskStore() const taskStore = useTaskStore()
const data = ref<any[]>([]) const data = ref<any[]>([])
@ -14,7 +14,7 @@ const canloadMore = ref(true)
const pagination = reactive({ const pagination = reactive({
pageNo: 0, pageNo: 0,
pageSize: 30, pageSize: 100,
}) })
function selectHandler(id: string, index: number) { function selectHandler(id: string, index: number) {
@ -26,7 +26,7 @@ const { isLoading } = useInfiniteScroll(
() => { () => {
loadMore() loadMore()
}, },
{ distance: 10, interval: 300, canLoadMore: () => canloadMore.value }, { distance: 10, interval: 1500, canLoadMore: () => canloadMore.value },
) )
async function loadMore() { async function loadMore() {
@ -57,7 +57,7 @@ watch(() => taskStore.activeId, (newVal) => {
function reset() { function reset() {
pagination.pageNo = 0 pagination.pageNo = 0
pagination.pageSize = 30 pagination.pageSize = 100
canloadMore.value = true canloadMore.value = true
data.value.length = 0 data.value.length = 0

@ -5,10 +5,10 @@ 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 { isEmpty } from '@/utils'
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 _ from 'lodash' import { chunk, clone } from 'lodash-es'
import { clone } from 'lodash-es'
import { useDialog, useMessage } from 'naive-ui' import { useDialog, useMessage } from 'naive-ui'
import { computed, onUnmounted, reactive, ref, unref, watch } from 'vue' import { computed, onUnmounted, reactive, ref, unref, watch } from 'vue'
import BatchModal from '../modal/BatchModal.vue' import BatchModal from '../modal/BatchModal.vue'
@ -16,17 +16,7 @@ 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 { getAllfieldList } from '@/api/home/filter'
import { audit } from '@/api/task/task'
import { getTaskDetailInfo, getTaskDetailPictureList } from '@/api/work/work'
import { useTask } from '@/store/modules/task'
import { useUser } from '@/store/modules/user'
import { isEmpty } from '@/utils'
import { hideDownload } from '@/utils/image'
import emitter from '@/utils/mitt'
import type { ApprovalParam, PictureSortParam } from '/#/api' import type { ApprovalParam, PictureSortParam } from '/#/api'
import { formatToDateHMS } from '@/utils/dateUtil'
const batch = ref(false) const batch = ref(false)
const selectItems = ref<any[]>([]) const selectItems = ref<any[]>([])
@ -39,47 +29,54 @@ const CustomSettingModalRef = ref(null)
const taskTableData = ref<any[]>([]) const taskTableData = ref<any[]>([])
const sortBy: PictureSortParam = { const sortBy: PictureSortParam = {
orderbyname: "asc", orderbyname: 'desc',
orderbyvalue: "fromuptime", orderbyvalue: 'pictureResult',
}; }
function setBatch(value: boolean) { function setBatch(value: boolean) {
if (totalCount.value === 0) return; if (totalCount.value === 0)
return
batch.value = value
batch.value = value;
if (value === false) { if (value === false) {
selectItems.value.forEach((item) => (item.checked = false)); selectItems.value.forEach(item => (item.checked = false))
selectItems.value.length = 0; selectItems.value.length = 0
selectItems.value.length = 0
} }
} }
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
if (index === -1 && checked) selectItems.value.push(item); if (index === -1 && checked)
else selectItems.value.splice(index, 1); selectItems.value.push(item)
else selectItems.value.splice(index, 1)
console.log(selectItems.value.map(item => item.id))
} }
const showActions = computed(() => { const showActions = computed(() => {
return selectItems.value.length > 0 && batch; return selectItems.value.length > 0 && batch
}); })
const taskpagination = reactive({ const taskpagination = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
}); })
const taskStore = useTask(); const taskStore = useTask()
const overTask = ref<any>(null); const overTask = ref<any>(null)
const taskDetailInfo = ref<any>({}); const taskDetailInfo = ref<any>({})
const taskDetailPictureList = ref<any[]>([]); const taskDetailPictureList = ref<any[]>([])
const userStore = useUser(); const userStore = useUser()
const imageRef = ref<ComponentElRef | null>(); const imageRef = ref<ComponentElRef | null>()
let processItems: any[] = []; let processItems: any[] = []
// states:1234 // states:1234
function validate(items: any[]) { function validate(items: any[]) {
if (items.length === 0) return "至少选中一个任务"; if (items.length === 0)
return '至少选中一个任务'
// const useInfo = userStore.getUserInfo // const useInfo = userStore.getUserInfo
// const username = useInfo.loginname // const username = useInfo.loginname
@ -96,115 +93,140 @@ function validate(items: any[]) {
// return '' // return ''
// } // }
return null; return null
} }
function approvalHandler(items?: any) { function approvalHandler(items?: any) {
let cloneItem: any; let cloneItem: any
if (batch.value) { if (batch.value) {
processItems = selectItems.value; processItems = selectItems.value
} else if (overTask.value) { }
cloneItem = clone(overTask.value); else if (overTask.value) {
processItems = [cloneItem]; cloneItem = clone(overTask.value)
processItems = [cloneItem]
} }
if (items !== undefined && !(items instanceof PointerEvent)) if (items !== undefined && !(items instanceof PointerEvent))
processItems = items; processItems = items
const msg = validate(processItems); const msg = validate(processItems)
if (msg !== null) { if (msg !== null) {
message.error(msg); message.error(msg)
return; return
} }
dialog.info({ dialog.info({
title: "确认提示", title: '确认提示',
content: "确认给该任务审批为【通过】吗?", content: '确认给该任务审批为【通过】吗?',
positiveText: "确定", positiveText: '确定',
negativeText: "取消", negativeText: '取消',
onPositiveClick: () => { onPositiveClick: () => {
approval(); approval()
}, },
onNegativeClick: () => {}, onNegativeClick: () => {},
}); })
} }
function rejectHandler(items?: any) { function rejectHandler(items?: any) {
let cloneItem: any; let cloneItem: any
if (batch.value) { if (batch.value) {
processItems = selectItems.value; processItems = selectItems.value
} else if (overTask.value) { }
cloneItem = clone(overTask.value); else if (overTask.value) {
processItems = [cloneItem]; cloneItem = clone(overTask.value)
processItems = [cloneItem]
} }
if (items !== undefined && !(items instanceof PointerEvent)) if (items !== undefined && !(items instanceof PointerEvent))
processItems = items; processItems = items
const msg = validate(processItems); const msg = validate(processItems)
if (msg !== null) { if (msg !== null) {
message.error(msg); message.error(msg)
return; return
} }
const modal = unref(confrimModalRef)! as any; const modal = unref(confrimModalRef)! as any
modal.showModal(); modal.showModal()
} }
function approval() { function approval() {
const formIds: string[] = processItems.map((item) => item.id); const formIds: string[] = processItems.map(item => item.id)
const taskIds: string[] = processItems.map((item) => item.taskId); const taskIds: string[] = processItems.map(item => item.taskId)
const tasknames: string[] = processItems.map((item) => item.taskname); const tasknames: string[] = processItems.map(item => item.taskname)
const param: ApprovalParam = { const param: ApprovalParam = {
formid: formIds, formid: formIds,
taskId: taskIds, taskId: taskIds,
approvd: true, approvd: true,
taskComment: "approval", taskComment: 'approval',
taskname: tasknames, taskname: tasknames,
}; }
doAudit(param); doAudit(param)
} }
function doAudit(param: any) { function doAudit(param: any) {
audit(param).then((res) => { audit(param).then((res) => {
const { code } = res; const { code } = res
processItems.length = 0; setBatch(false)
if (code === "OK") emitter.emit("refresh"); if (code === 'OK')
else message.error(res.message); emitter.emit('refresh')
}); else message.error(res.message)
})
} }
function reject(idOrDesc: string, backId: string, isOther: boolean) { function reject(idOrDesc: string, backId: string, isOther: boolean) {
const formIds: string[] = processItems.map((item) => item.id); const formIds: string[] = processItems.map(item => item.id)
const taskIds: string[] = processItems.map((item) => item.taskId); const taskIds: string[] = processItems.map(item => item.taskId)
const tasknames: string[] = processItems.map((item) => item.taskname); const tasknames: string[] = processItems.map(item => item.taskname)
const param: ApprovalParam = { const param: ApprovalParam = {
formid: formIds, formid: formIds,
taskId: taskIds, taskId: taskIds,
approvd: false, approvd: false,
taskComment: idOrDesc, taskComment: idOrDesc,
taskname: isOther ? tasknames : ["其他"], taskname: isOther ? tasknames : ['其他'],
}; }
doAudit(param); doAudit(param)
} }
function showModal(modalRef: any) { function showModal(modalRef: any) {
const modal = unref(modalRef)! as any; const modal = unref(modalRef)! as any
modal.showModal(); modal.showModal()
} }
function forwardHandler() { function forwardHandler() {
taskStore.forward(); taskStore.forward()
} }
function backHandler() { function backHandler() {
taskStore.back(); taskStore.back()
}
async function getTableData() {
const useInfo = userStore.getUserInfo
const listData = []
const reviewType = 3 //
let res = await getAllfieldList(reviewType)
const fieldList = (res as any)?.data
res = await getfieldList(reviewType, useInfo.id)
const userFieldList = (res as any)?.data.userFieldFixed
console.log(userFieldList, 'userFieldList')
fieldList.map((v) => {
if (userFieldList.includes(v.name)) {
const item = {
label: v.fieldDesc,
value: taskDetailInfo.value.ocrPicture[v.name],
key: v.name,
}
listData.push(item)
}
})
taskTableData.value = chunk(listData, 2)
} }
watch( watch(
@ -213,27 +235,10 @@ watch(
const packageid = taskStore.getPackageid const packageid = taskStore.getPackageid
const taskId = taskStore.getActiveId const taskId = taskStore.getActiveId
if (isEmpty(taskId)) return; if (isEmpty(taskId))
const useInfo = userStore.getUserInfo; return
taskDetailInfo.value = await getTaskDetailInfo(taskId, packageid)
let listData = []; getTableData()
taskDetailInfo.value = await getTaskDetailInfo(taskId, packageid);
const reviewType = 3; //
let res = await getAllfieldList(reviewType);
let fieldList = (res as any)?.data;
res = await getfieldList(reviewType, useInfo.id);
let userFieldList = (res as any)?.data.userFieldFixed;
console.log(userFieldList,'userFieldList')
fieldList.map((v) => {
if (userFieldList.indexOf(v.name) > -1) {
let item = {
label: v.fieldDesc,
value: taskDetailInfo.value.ocrPicture[v.name],
key: v.name,
};
listData.push(item);
}
});
// TODO mock // TODO mock
// let showFieldData = taskDetailInfo.value.ocrPicture; // let showFieldData = taskDetailInfo.value.ocrPicture;
// let showFieldKeys = Object.keys(showFieldData); // let showFieldKeys = Object.keys(showFieldData);
@ -254,7 +259,6 @@ watch(
// } // }
// } // }
// } // }
taskTableData.value = _.chunk(listData, 2);
if (!isEmpty(packageid)) { if (!isEmpty(packageid)) {
const { data, total } = await getTaskDetailPictureList( const { data, total } = await getTaskDetailPictureList(
packageid, packageid,
@ -264,56 +268,57 @@ watch(
taskDetailPictureList.value = data taskDetailPictureList.value = data
totalCount.value = total totalCount.value = total
} }
} },
); )
const currentTaskId = computed(() => { const currentTaskId = computed(() => {
const index = taskStore.getCurrentIndex; const index = taskStore.getCurrentIndex
return taskStore.getApprovalList[index]?.formid || ""; return taskStore.getApprovalList[index]?.formid || ''
}); })
function overTaskHandle() { function overTaskHandle() {
const item = taskDetailInfo.value; const item = taskDetailInfo.value
if (validate([item]) == null && batch.value === false) overTask.value = item; if (validate([item]) == null && batch.value === false)
overTask.value = item
} }
function leaveTaskHandler() { function leaveTaskHandler() {
overTask.value = null; overTask.value = null
} }
function showActionsModal() { function showActionsModal() {
const modal = unref(CustomSettingModalRef)! as any; const modal = unref(CustomSettingModalRef)! as any
modal.showModal(); modal.showModal()
} }
onUnmounted(() => { onUnmounted(() => {
taskStore.reset(); taskStore.reset()
}); })
const mark = computed(() => { const mark = computed(() => {
return taskDetailInfo.value.iztrueorfalse === null ? "未标记" : "已标记"; return taskDetailInfo.value.iztrueorfalse === null ? '未标记' : '已标记'
}); })
function immersionHandler() { function immersionHandler() {
taskStore.updateImmersion(); taskStore.updateImmersion()
} }
function previewHandler(event: MouseEvent) { function previewHandler(event: MouseEvent) {
event.stopImmediatePropagation(); event.stopImmediatePropagation()
event.stopPropagation(); event.stopPropagation()
if (imageRef.value && (imageRef.value as any).src) if (imageRef.value && (imageRef.value as any).src)
(imageRef.value as any).mergedOnClick() (imageRef.value as any).mergedOnClick()
} }
function getPercent(pictureid: string) { function getPercent(pictureid: string) {
const { ocpictureid, pictureresult } = taskDetailInfo.value; const { ocpictureid, pictureresult } = taskDetailInfo.value
const index = ocpictureid.split(",").indexOf(String(pictureid)); const index = ocpictureid.split(',').indexOf(String(pictureid))
const results = pictureresult.split(","); const results = pictureresult.split(',')
const percent = results[index] || "0"; const percent = results[index] || '0'
const val = Number.parseFloat(percent); const val = Number.parseFloat(percent)
return `${val}%`; return `${val}%`
} }
</script> </script>
@ -501,7 +506,9 @@ function getPercent(pictureid: string) {
<div class="info-header"> <div class="info-header">
<div class="left_box"> <div class="left_box">
<div class="title">填报信息</div> <div class="title">
填报信息
</div>
<SvgIcon size="12" name="collapse" /> <SvgIcon size="12" name="collapse" />
</div> </div>
<div class="right_box" @click="showActionsModal"> <div class="right_box" @click="showActionsModal">
@ -511,7 +518,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" :taskTableData="taskTableData" /> <TaskTable :data="taskDetailInfo" :task-table-data="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" />
@ -524,7 +531,7 @@ function getPercent(pictureid: string) {
@reject="rejectHandler" @reject="rejectHandler"
@approval="approvalHandler" @approval="approvalHandler"
/> />
<CustomSettingModal ref="CustomSettingModalRef" :review-type="3" /> <CustomSettingModal ref="CustomSettingModalRef" :review-type="3" @on-ok="getTableData" />
</div> </div>
</template> </template>

@ -2,7 +2,7 @@
import { getAllfieldList, getfieldList, savefield } from "@/api/home/filter"; import { getAllfieldList, getfieldList, savefield } from "@/api/home/filter";
import { ReportInfoConfig } from "@/config/workorder"; import { ReportInfoConfig } from "@/config/workorder";
import { useUser } from "@/store/modules/user"; import { useUser } from "@/store/modules/user";
import { defineProps, onMounted, ref } from "vue"; import { defineEmits, defineProps, onMounted, ref } from "vue";
const props = defineProps({ const props = defineProps({
reviewType: { reviewType: {
@ -95,6 +95,7 @@ function showModal() {
function closeModal() { function closeModal() {
show.value = false; show.value = false;
} }
const emit = defineEmits(['onOk'])
async function handleSumbit(e: MouseEvent) { async function handleSumbit(e: MouseEvent) {
const userStore = useUser(); const userStore = useUser();
@ -109,9 +110,8 @@ async function handleSumbit(e: MouseEvent) {
savefield(props.reviewType, userInfo.id, userField); savefield(props.reviewType, userInfo.id, userField);
e.preventDefault(); e.preventDefault();
closeModal(); closeModal();
setTimeout(()=>{ emit('onOk')
window.location.reload();
},3000)
} }
defineExpose({ defineExpose({

Loading…
Cancel
Save