+
小结查重
diff --git a/src/views/task/content/Content.vue b/src/views/task/content/Content.vue
index e0c9fe3..488edf8 100644
--- a/src/views/task/content/Content.vue
+++ b/src/views/task/content/Content.vue
@@ -2,7 +2,7 @@
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 { useRoute, useRouter } from 'vue-router'
import BatchModal from '../modal/BatchModal.vue'
import CustomSettingModal from '../modal/CustomSettingModal.vue'
import PictureTable from './PictureTable.vue'
@@ -25,6 +25,9 @@ import { formatToDateHMS } from '@/utils/dateUtil'
import { hideDownload } from '@/utils/image'
const emit = defineEmits(['setAsideItemName'])
+
+const router = useRouter()
+
const batch = ref(false)
const selectItems = ref
([])
const message = useMessage()
@@ -37,22 +40,12 @@ const packageId: any = ref('') // 包id
const CustomSettingModalRef = ref(null)
const taskTableData = ref([])
const route = useRoute()
-
+const isDetail = ref(false) // 是否是详情
const sortBy: any = {
orderType: 'desc',
orderName: 'similarityScore',
}
-function setBatch(value: boolean) {
- if (totalCount.value === 0)
- return
-
- batch.value = value
-
- if (value === false)
- selectItems.value = []
-}
-
function onCheckChange(checked: any, item: any) {
const index = selectItems.value.indexOf(item)
item.checked = checked
@@ -77,23 +70,23 @@ const taskDetailPictureList = ref([])
const userStore = useUser()
const imageRef = ref()
let processItems: any[] = []
-const isFullScreen = ref(false);
+const isFullScreen = ref(false)
const fullscreenStyles = computed(() => ({
- 'width': isFullScreen.value ? '100vw' : '',
- 'height': isFullScreen.value ? '100vh' : '',
- 'position': isFullScreen.value ? 'fixed' : '',
- 'top': isFullScreen.value ? '0' : '',
- 'left': isFullScreen.value ? '0' : '',
- 'zIndex': isFullScreen.value ? '9999' : '',
-}));
-
+ width: isFullScreen.value ? '100vw' : '',
+ height: isFullScreen.value ? '100vh' : '',
+ position: isFullScreen.value ? 'fixed' : '',
+ top: isFullScreen.value ? '0' : '',
+ left: isFullScreen.value ? '0' : '',
+ zIndex: isFullScreen.value ? '9999' : '',
+}))
onMounted(() => {
window.addEventListener('keydown', handleKeydown)
if (route.query.id) {
taskId.value = route.query.id
packageId.value = route.query.packageid
+ isDetail.value = true
getDetail()
}
})
@@ -108,6 +101,21 @@ function handleKeydown(event) {
// 在这里执行右箭头的逻辑
}
+function setBatch(value: boolean) {
+ // if (totalCount.value === 0)
+ // return
+
+ batch.value = value
+
+ if (value === false) {
+ taskDetailInfo.value.checked = false
+ selectItems.value = []
+ taskDetailPictureList.value.forEach((item) => {
+ item.checked = false
+ })
+ }
+}
+
// 从store里面获取任务id
function currentTaskId() {
const index = taskStore.getCurrentIndex
@@ -202,7 +210,7 @@ function doAudit(param: any) {
audit(param).then((res) => {
const { code } = res
if (code === 'OK') {
- message.success('审核成功')
+ message.success(res.message)
setBatch(false)
reloadList(param, '通过')
}
@@ -311,12 +319,12 @@ onUnmounted(() => {
function immersionHandler() {
// taskStore.updateImmersion()
- toggleFullScreen();
+ toggleFullScreen()
}
// 切换全屏状态
-const toggleFullScreen = () => {
- isFullScreen.value = !isFullScreen.value;
-};
+function toggleFullScreen() {
+ isFullScreen.value = !isFullScreen.value
+}
function previewHandler(event: MouseEvent) {
event.stopImmediatePropagation()
event.stopPropagation()
@@ -354,6 +362,14 @@ function reloadList(param, text) {
getDetail()
}
+
+function goBack() {
+ router.back()
+}
+
+function switchBatch() {
+ setBatch(!batch.value)
+}
@@ -361,12 +377,14 @@ function reloadList(param, text) {