Merge pull request 'feat: 修改查重问题' (#300) from fix/updatesyspic into test

Reviewed-on: #300
pull/304/head
yaoshuli 1 year ago
commit b953b159ec

@ -226,11 +226,12 @@ export async function queryPageListByCheckNo(params: any): Promise<any> {
headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, headers: { 'Content-Type': ContentTypeEnum.FORM_DATA },
}) })
const { data: { records, pages, total } } = res const { data: { records, pages, total, current } } = res
return { return {
pageCount: pages, pageCount: pages,
data: records, data: records,
total, total,
current,
} }
} }
/** /**
@ -288,7 +289,7 @@ export async function getFilterList(params) {
* @param * @param
* @returns * @returns
*/ */
export async function getLastCheckNox() { export async function getLastCheckNox() {
return http.request({ return http.request({
url: `/ocr/checkDuplicate/getLastCheckNo`, url: `/ocr/checkDuplicate/getLastCheckNo`,
method: 'get', method: 'get',
@ -301,10 +302,10 @@ export async function getFilterList(params) {
* @param * @param
* @returns * @returns
*/ */
export async function getCheckDuplicateStatusx(params) { export async function getCheckDuplicateStatusx(params) {
return http.request({ return http.request({
url: `/ocr/checkDuplicate/getCheckDuplicateStatus`, url: `/ocr/checkDuplicate/getCheckDuplicateStatus`,
method: 'get', method: 'get',
params params,
}) })
} }

@ -1,75 +1,74 @@
<script lang="ts" setup> <script lang="ts" setup>
import { defineProps, onMounted, ref,watch,onBeforeMount } from "vue"; import { defineProps, onBeforeMount, onMounted, ref, watch } from 'vue'
import { gettaskToolsCount } from "@/api/home/main"; import { gettaskToolsCount } from '@/api/home/main'
import { useDataHeaderStore } from '@/store/modules/DataHeader' import { useDataHeaderStore } from '@/store/modules/DataHeader'
defineProps({ defineProps({
hasColor: { hasColor: {
type: Boolean, type: Boolean,
default: () => false, default: () => false,
}, },
}); })
const headerstore=useDataHeaderStore() const headerstore = useDataHeaderStore()
const datalist = ref([ const datalist = ref([
{ {
link: "count", link: 'count',
title: "任务总数", title: '任务总数',
count: 0, count: 0,
}, },
{ {
link: "wait", link: 'wait',
title: "待审批", title: '待审批',
count: 0, count: 0,
}, },
{ {
link: "done", link: 'done',
title: "已审批", title: '已审批',
count: 0, count: 0,
}, },
{ {
link: "resolve", link: 'resolve',
title: "通过", title: '通过',
count: 0, count: 0,
color: "#03c984", color: '#03c984',
}, },
{ {
link: "reject", link: 'reject',
title: "不通过", title: '不通过',
count: 0, count: 0,
color: "#ff8b8b", color: '#ff8b8b',
}, },
{ {
link: "reimg", link: 'reimg',
title: "图片重复数", title: '图片重复数',
count: 0, count: 0,
}, },
{ {
link: "breakcount", link: 'breakcount',
title: "小结重复数", title: '小结重复数',
count: 0, count: 0,
}, },
]); ])
function initRem() { function initRem() {
const designWidth = 1440; const designWidth = 1440
const rempPx = 16; const rempPx = 16
const scale = window.innerWidth / designWidth; const scale = window.innerWidth / designWidth
document.documentElement.style.fontSize = `${scale * rempPx}px`; document.documentElement.style.fontSize = `${scale * rempPx}px`
} }
onMounted(() => { onMounted(() => {
initRem()
initRem(); getData()
getData();
setTimeout(() => { setTimeout(() => {
headerstore.setDataConfig(false) headerstore.setDataConfig(false)
// alert(headerstore.DataConfig) // alert(headerstore.DataConfig)
}, 500); }, 500)
// headerstore.setDataConfig(false) // headerstore.setDataConfig(false)
}); })
async function getData() { async function getData() {
const { data } = await gettaskToolsCount(); const { data } = await gettaskToolsCount()
if (data) { if (data) {
const { const {
total, total,
@ -79,67 +78,65 @@ async function getData() {
repeat, repeat,
approvedCount, approvedCount,
notGoCount, notGoCount,
} = data; } = data
let newdata=[ const newdata = [
{ {
link: "count", link: 'count',
title: "任务总数", title: '任务总数',
count: total, count: total,
}, },
{ {
link: "wait", link: 'wait',
title: "待审批", title: '待审批',
count: treat, count: treat,
}, },
{ {
link: "done", link: 'done',
title: "已审批", title: '已审批',
count: alreadyApprove, count: alreadyApprove,
}, },
{ {
link: "resolve", link: 'resolve',
title: "通过", title: '通过',
count: approvedCount, count: approvedCount,
color: "#03c984", color: '#03c984',
}, },
{ {
link: "reject", link: 'reject',
title: "不通过", title: '不通过',
count: notGoCount, count: notGoCount,
color: "#ff8b8b", color: '#ff8b8b',
}, },
{ {
link: "reimg", link: 'reimg',
title: "图片重复数", title: '图片重复数',
count: repeat, count: repeat,
}, },
{ {
link: "breakcount", link: 'breakcount',
title: "小结重复数", title: '小结重复数',
count: repeatedNodules, count: repeatedNodules,
}, },
] ]
datalist.value =newdata ; datalist.value = newdata
} }
} }
watch( watch(
() => headerstore.DataConfig, () => headerstore.DataConfig,
(newval) => { (newval) => {
if (headerstore.DataConfig) {
if(headerstore.DataConfig){ getData()
getData();
headerstore.setDataConfig(false) headerstore.setDataConfig(false)
} }
}, },
) )
defineExpose({ defineExpose({
getData, getData,
}); })
</script> </script>
<template> <template>
<div class="header_wrap" :style="hasColor ? '' : 'margin-top: 7.375rem;'"> <div class="header_wrap" :style="hasColor ? '' : 'margin-top: 7.375rem;'">
<div v-for="(item, index) in datalist" :key="index" class="header_box"> <div v-for="(item, index) in datalist" :key="index" class="header_box">
<div class="header_item"> <div class="header_item">
<SvgIcon :name="item.link" :style="index == 0 ? 'margin-left:0.5rem' : ''" /> <SvgIcon :name="item.link" :style="index == 0 ? 'margin-left:0.5rem' : ''" />

@ -27,7 +27,8 @@ const inputHandler = debounce((keyword) => {
// //
async function handlerSearch(value) { async function handlerSearch(value) {
// //
if(value === '/') return if (value === '/')
return
const res = await getSearchList({ const res = await getSearchList({
search: value, search: value,
}) })

@ -1,4 +1,4 @@
import { defineAsyncComponent } from "vue" import { defineAsyncComponent } from 'vue'
import type { AsideEntity } from './aside' import type { AsideEntity } from './aside'
export interface RowData { export interface RowData {
@ -72,7 +72,9 @@ export const ColumnsMap: Recordable<ColumnEntity> = {
export const headRules = ['任务Id', '任务名称', '审批节点', '审批状态', '图片相似度', '提报时间', '更新时间'] export const headRules = ['任务Id', '任务名称', '审批节点', '审批状态', '图片相似度', '提报时间', '更新时间']
export function findKey(columns: any[], header: string) { export function findKey(columns: any[], header: string) {
const item = columns.find((column) => { return (column as any).title === header }) const item = columns.find((column) => {
return (column as any).title === header
})
return (item as any).key return (item as any).key
} }
@ -84,7 +86,7 @@ export const asideMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izupuser', key: 'izupuser',
// component: ReportUserVue, // component: ReportUserVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/ReportUser.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/ReportUser.vue')),
}, },
izproject: { izproject: {
label: '所属项目', label: '所属项目',
@ -92,7 +94,7 @@ export const asideMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izproject', key: 'izproject',
// component: IzProjectVue, // component: IzProjectVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzProject.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/IzProject.vue')),
}, },
izplan: { izplan: {
label: '所属计划', label: '所属计划',
@ -100,7 +102,7 @@ export const asideMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izplan', key: 'izplan',
// component: PlanVue, // component: PlanVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Plan.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/Plan.vue')),
}, },
izstatus: { izstatus: {
label: '审批状态', label: '审批状态',
@ -108,7 +110,7 @@ export const asideMap: Recordable<AsideEntity> = {
isDefaultFilter: false, isDefaultFilter: false,
key: 'izstatus', key: 'izstatus',
// component: IzStatus, // todo // component: IzStatus, // todo
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzStatus.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/IzStatus.vue')),
}, },
izyear: { izyear: {
label: '提报时间', label: '提报时间',
@ -116,7 +118,7 @@ export const asideMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izyear', key: 'izyear',
// component: TimeVue, // component: TimeVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Time.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/Time.vue')),
}, },
iztaskrrom: { iztaskrrom: {
label: '任务来源', label: '任务来源',
@ -124,7 +126,7 @@ export const asideMap: Recordable<AsideEntity> = {
isDefaultFilter: false, isDefaultFilter: false,
key: 'iztaskrrom', key: 'iztaskrrom',
// component: IztaskrromVue, // component: IztaskrromVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Iztaskrrom.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/Iztaskrrom.vue')),
}, },
izshowall: { izshowall: {
label: '显示全部任务数据', label: '显示全部任务数据',
@ -132,7 +134,7 @@ export const asideMap: Recordable<AsideEntity> = {
isDefaultFilter: false, isDefaultFilter: false,
key: 'izshowall', key: 'izshowall',
// component: IzShowAll, // component: IzShowAll,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzShowAll.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/IzShowAll.vue')),
inFilterList: false, inFilterList: false,
}, },
} }
@ -145,7 +147,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izApprovalStatus', key: 'izApprovalStatus',
// component: IzApprovalStatus, // todo // component: IzApprovalStatus, // todo
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzApprovalStatus.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/IzApprovalStatus.vue')),
}, },
izuptime: { izuptime: {
label: '提报时间', label: '提报时间',
@ -153,7 +155,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izuptime', key: 'izuptime',
// component: TimeVue, // component: TimeVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Time.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/Time.vue')),
}, },
izupuser: { izupuser: {
label: '提报人', label: '提报人',
@ -161,7 +163,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izupuser', key: 'izupuser',
// component: ReportUserVue, // component: ReportUserVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/ReportUser.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/ReportUser.vue')),
}, },
iztaskrrom: { iztaskrrom: {
label: '任务来源', label: '任务来源',
@ -169,7 +171,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'iztaskrrom', key: 'iztaskrrom',
// component: IztaskrromVue, // component: IztaskrromVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Iztaskrrom.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/Iztaskrrom.vue')),
}, },
izcustomname: { izcustomname: {
label: '拜访客户', label: '拜访客户',
@ -177,7 +179,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izcustomname', key: 'izcustomname',
// component: IzCustomname, // component: IzCustomname,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzCustomname.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/IzCustomname.vue')),
}, },
izcustomtype: { izcustomtype: {
label: '客户类型', label: '客户类型',
@ -185,7 +187,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izcustomtype', key: 'izcustomtype',
// component: IzCustomtype, // component: IzCustomtype,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzCustomtype.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/IzCustomtype.vue')),
}, },
izproject: { izproject: {
label: '所属项目', label: '所属项目',
@ -193,7 +195,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izproject', key: 'izproject',
// component: IzProjectVue, // component: IzProjectVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzProject.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/IzProject.vue')),
}, },
izplan: { izplan: {
label: '所属计划', label: '所属计划',
@ -201,7 +203,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izplan', key: 'izplan',
// component: PlanVue, // component: PlanVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Plan.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/Plan.vue')),
}, },
izvisitpro: { izvisitpro: {
label: '拜访省份/直辖市', label: '拜访省份/直辖市',
@ -209,7 +211,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izvisitpro', key: 'izvisitpro',
// component: IzVisitcity, // component: IzVisitcity,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzVisitcity.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/IzVisitcity.vue')),
}, },
izcustomlevel: { izcustomlevel: {
label: '客户级别', label: '客户级别',
@ -217,7 +219,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izcustomlevel', key: 'izcustomlevel',
// component: IzCustomlevel, // component: IzCustomlevel,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzCustomlevel.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/IzCustomlevel.vue')),
}, },
izprojecttype: { izprojecttype: {
label: '项目类别', label: '项目类别',
@ -225,7 +227,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izprojecttype', key: 'izprojecttype',
// component: IzProjecttype, // component: IzProjecttype,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzProjecttype.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/IzProjecttype.vue')),
}, },
izproductname: { izproductname: {
label: '产品名称', label: '产品名称',
@ -233,7 +235,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izproductname', key: 'izproductname',
// component: IzProductVue, // component: IzProductVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzProduct.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/IzProduct.vue')),
}, },
izvisitcity: { izvisitcity: {
label: '拜访城市', label: '拜访城市',
@ -241,7 +243,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izvisitcity', key: 'izvisitcity',
// component: IzvisitproVue, // component: IzvisitproVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Izvisitpro.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/Izvisitpro.vue')),
}, },
izfirm: { izfirm: {
label: '厂商', label: '厂商',
@ -249,6 +251,6 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izfirm', key: 'izfirm',
// component: IzfirmVue, // component: IzfirmVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Izfirm.vue")), component: defineAsyncComponent(() => import('@/views/home/aside/comp/items/Izfirm.vue')),
}, },
} }

@ -1,5 +1,5 @@
import { store } from '@/store'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { store } from '@/store'
export interface ConfigState { export interface ConfigState {
@ -15,7 +15,7 @@ export const useDataHeaderStore = defineStore({
}), }),
getters: { getters: {
getDataConfig():boolean { getDataConfig(): boolean {
return this.DataConfig return this.DataConfig
}, },
@ -23,7 +23,6 @@ export const useDataHeaderStore = defineStore({
actions: { actions: {
setDataConfig(value) { setDataConfig(value) {
this.DataConfig = value this.DataConfig = value
}, },

@ -357,18 +357,18 @@ useKeydown('s', () => setShowSearch(true))
<!-- 搜索跳转模块 --> <!-- 搜索跳转模块 -->
<Search <Search
v-show="showSearch" v-show="showSearch"
toolipvalue="请输入任务id、任务名称、提报人"
@select="scrollHandler" @select="scrollHandler"
@close="setShowSearch(false)" @close="setShowSearch(false)"
@input-change="inputChange" @input-change="inputChange"
@show-search="setShowSearch(true)" @show-search="setShowSearch(true)"
:toolipvalue="'请输入任务id、任务名称、提报人'"
/> />
<!-- 高级筛选 --> <!-- 高级筛选 -->
<AdvanceFilter <AdvanceFilter
v-show="!showSearch" v-show="!showSearch"
ref="AdvanceFilterRef" ref="AdvanceFilterRef"
:type="1" :type="1"
:toolipvalue="'请输入任务id、任务名称、提报人'" toolipvalue="请输入任务id、任务名称、提报人"
@select="filterHandler" @select="filterHandler"
@update:search="setShowSearch(true)" @update:search="setShowSearch(true)"
@show-custom="showModal(customModalRef)" @show-custom="showModal(customModalRef)"

@ -38,7 +38,7 @@ const izstatusList = ref([])
const dialog = useDialog() const dialog = useDialog()
const checkedRowKeys = ref([]) const checkedRowKeys = ref([])
const router = useRouter() const router = useRouter()
const haeaderstore=useDataHeaderStore() const haeaderstore = useDataHeaderStore()
onBeforeMount(() => { onBeforeMount(() => {
dicStore.fetchizstatusListt() dicStore.fetchizstatusListt()
@ -330,7 +330,6 @@ function doAudit(param: any) {
audit(param).then((res) => { audit(param).then((res) => {
const { code } = res const { code } = res
if (code === 'OK') { if (code === 'OK') {
message.success(res.message) message.success(res.message)
reload() reload()
haeaderstore.setDataConfig(true) haeaderstore.setDataConfig(true)

@ -61,7 +61,7 @@ const emit = defineEmits(['changeShow'])
function changeContent() { function changeContent() {
emit('changeShow') emit('changeShow')
} }
const headerref=ref(null) const headerref = ref(null)
const checkedRowKeys = ref([]) const checkedRowKeys = ref([])
const dicStore = useDictionary() const dicStore = useDictionary()
const izstatusList = ref([]) const izstatusList = ref([])
@ -88,7 +88,7 @@ const actionsColumns = {
}, },
} }
const columnsRef = ref<DataTableColumns<RowData>>([]) const columnsRef = ref<DataTableColumns<RowData>>([])
const haeaderstore=useDataHeaderStore() const haeaderstore = useDataHeaderStore()
async function getColumns() { async function getColumns() {
columnsRef.value = [ columnsRef.value = [
@ -730,7 +730,6 @@ function doAudit(param: any) {
audit(param).then((res) => { audit(param).then((res) => {
const { code } = res const { code } = res
if (code === 'OK') { if (code === 'OK') {
message.success(res.message) message.success(res.message)
reload() reload()
modal.getData() modal.getData()
@ -760,7 +759,7 @@ function reload() {
) as PaginationProps ) as PaginationProps
query(page!, pageSize!, {}, props.taskvalue) query(page!, pageSize!, {}, props.taskvalue)
modal.getData() modal.getData()
//haeaderstore.setDataConfig(true) // haeaderstore.setDataConfig(true)
} }
watch( watch(
@ -889,7 +888,7 @@ defineExpose({
<div v-show="!showActions" style="display: flex; align-items: center"> <div v-show="!showActions" style="display: flex; align-items: center">
<div class="btn"> <div class="btn">
<!-- <SvgIcon style="margin-right: 6px" size="22" name="batch" /> <!-- <SvgIcon style="margin-right: 6px" size="22" name="batch" />
批量审批--> 批量审批 -->
</div> </div>
</div> </div>
<div v-show="showActions" class="batch"> <div v-show="showActions" class="batch">
@ -955,7 +954,9 @@ defineExpose({
</div> </div>
<div class="wrapper-settings"> <div class="wrapper-settings">
<div class="sltedtext">已选<span style="width:20px;margin-left:10px;margin-right:10px;color:#507AFD">{{checkedRowKeys.length}}</span></div> <div class="sltedtext">
已选<span style="width:20px;margin-left:10px;margin-right:10px;color:#507AFD">{{ checkedRowKeys.length }}</span>
</div>
<SvgIcon <SvgIcon
style="cursor: pointer" style="cursor: pointer"
size="18" size="18"

@ -1,102 +1,103 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref, reactive, unref, computed,watch } from "vue"; import { computed, onMounted, reactive, ref, unref, watch } from 'vue'
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from 'vue-router'
import testImg from "@/assets/images/test.png"; import { chunk } from 'lodash-es'
import { chunk } from "lodash-es"; import { useDialog, useMessage } from 'naive-ui'
import type { RowData } from "@/config/final"; import { RepeatModal, RepeatTaskTableModal } from '../comp'
import { getFinalList } from "@/api/final"; import testImg from '@/assets/images/test.png'
import { useFinal } from "@/store/modules/final"; import type { RowData } from '@/config/final'
import { formatToDateHMS } from "@/utils/dateUtil"; import { getFinalList } from '@/api/final'
import { useMessage, useDialog } from "naive-ui"; import { useFinal } from '@/store/modules/final'
import { audit } from "@/api/task/task"; import { formatToDateHMS } from '@/utils/dateUtil'
import NotPassed from "@/components/Approval/NotPassed.vue"; import { audit } from '@/api/task/task'
import { RepeatModal, RepeatTaskTableModal } from "../comp"; import NotPassed from '@/components/Approval/NotPassed.vue'
const dialog = useDialog();
const message = useMessage(); const emit = defineEmits(['changeShow'])
const router = useRouter(); const dialog = useDialog()
const notPassModalRef = ref(null); // const message = useMessage()
const sortorder = ref("asc"); const router = useRouter()
const sortname = ref("states"); const notPassModalRef = ref(null) //
const loading = ref(true); const sortorder = ref('asc')
const total = ref(0); const sortname = ref('states')
const scrollContainer = ref(null); const loading = ref(true)
const tableData = ref<any>([]); const total = ref(0)
const finalStore = useFinal(); const scrollContainer = ref(null)
const tableData = ref<any>([])
let num = 1; const finalStore = useFinal()
let num = 1
const pagination = reactive({ const pagination = reactive({
page: 1, page: 1,
pageCount: 20, pageCount: 20,
pageSize: 20, pageSize: 20,
}); })
const repeatModalRef = ref(null); const repeatModalRef = ref(null)
const repeatTaskTableModalRef = ref(null); const repeatTaskTableModalRef = ref(null)
const selectionIds = ref([]); const selectionIds = ref([])
const showActions = computed(() => { const showActions = computed(() => {
return selectionIds.value.length; return selectionIds.value.length
}); })
const emit = defineEmits(["changeShow"]);
function handleCheck(row: any, showcheck: any) { function handleCheck(row: any, showcheck: any) {
if (showcheck == false) { if (showcheck == false) {
console.log(tableData.value); console.log(tableData.value)
tableData.value.map((item) => { tableData.value.forEach((item) => {
if (item.length > 0) { if (item.length > 0) {
item.map((itemx, index) => { item.forEach((itemx, index) => {
if (row.id == itemx.id) { if (row.id == itemx.id)
itemx.showcheck = true; itemx.showcheck = true
// newlistx.push(itemx)
})
} }
//newlistx.push(itemx) })
}); selectionIds.value.push(row)
} }
}); else {
selectionIds.value.push(row); tableData.value.forEach((item) => {
} else {
tableData.value.map((item) => {
if (item.length > 0) { if (item.length > 0) {
item.map((itemx, index) => { item.forEach((itemx, index) => {
if (row.id == itemx.id) { if (row.id == itemx.id)
itemx.showcheck = false; itemx.showcheck = false
}
//newlistx.push(itemx) // newlistx.push(itemx)
}); })
} }
}); })
selectionIds.value.pop(row); selectionIds.value.pop(row)
} }
} }
function switchBatch() { function switchBatch() {
tableData.value.map((item) => { tableData.value.forEach((item) => {
item.map((itemx, index) => { item.forEach((itemx, index) => {
itemx.showcheck = false; itemx.showcheck = false
}); })
}); })
selectionIds.value = []; selectionIds.value = []
} }
function changeContent() { function changeContent() {
emit("changeShow"); emit('changeShow')
}
function initRem() {
const designWidth = 1440
const rempPx = 16
const scale = window.innerWidth / designWidth
document.documentElement.style.fontSize = `${scale * rempPx}px`
} }
const initRem = () => {
const designWidth = 1440;
const rempPx = 16;
const scale = window.innerWidth / designWidth;
document.documentElement.style.fontSize = scale * rempPx + "px";
};
async function initData( async function initData(
page: number, page: number,
pageSize: number, pageSize: number,
filterId?: any, filterId?: any,
taskName?: string taskName?: string,
) { ) {
const asideParmas = unref(finalStore.getAsideValue)
const asideParmas = unref(finalStore.getAsideValue);
// 使使 // 使使
// let params = filterId ? { userSearchId: filterId } : asideParmas // let params = filterId ? { userSearchId: filterId } : asideParmas
let params = asideParmas; let params = asideParmas
if(params?.izshowall==false){ if (params?.izshowall == false)
params.isFail=false params.isFail = false
}
params = params?.izshowall ? {isFail:true} : params; params = params?.izshowall ? { isFail: true } : params
const result = await getFinalList({ const result = await getFinalList({
sortorder: sortorder.value, sortorder: sortorder.value,
@ -106,194 +107,195 @@ async function initData(
taskName, taskName,
...params, ...params,
}); })
const { data, pageCount, totalCount } = result; const { data, pageCount, totalCount } = result
console.log(data, pageCount, totalCount); console.log(data, pageCount, totalCount)
//tableData.value = tableData.value.concat(data); // tableData.value = tableData.value.concat(data);
tableData.value = data; tableData.value = data
console.log(tableData.value); console.log(tableData.value)
total.value = totalCount; total.value = totalCount
pagination.page = page; pagination.page = page
pagination.pageCount = Math.ceil(totalCount / pageSize); pagination.pageCount = Math.ceil(totalCount / pageSize)
loading.value = false; loading.value = false
tableData.value.map((item) => { tableData.value.forEach((item) => {
item.showcheck = false; item.showcheck = false
if (isValidTimestamp(item.fromuptime)) { if (isValidTimestamp(item.fromuptime))
item.fromuptime = formatToDateHMS(item.fromuptime); item.fromuptime = formatToDateHMS(item.fromuptime)
} })
});
tableData.value = chunk(tableData.value, 4)
tableData.value = chunk(tableData.value, 4);
} }
async function query( async function query(
page: number, page: number,
pageSize: number, pageSize: number,
filterId?: any, filterId?: any,
taskName?: string taskName?: string,
) { ) {
console.log("query", taskName); console.log('query', taskName)
const asideParmas = unref(finalStore.getAsideValue); const asideParmas = unref(finalStore.getAsideValue)
// 使使 // 使使
// let params = filterId ? { userSearchId: filterId } : asideParmas // let params = filterId ? { userSearchId: filterId } : asideParmas
let params = asideParmas; let params = asideParmas
if(params?.izshowall==false){ if (params?.izshowall == false)
params.isFail=false params.isFail = false
}
params = params?.izshowall ? {isFail:true} : params; params = params?.izshowall ? { isFail: true } : params
const result = await getFinalList({ const result = await getFinalList({
sortorder: sortorder.value, sortorder: sortorder.value,
pageSize, pageSize,
currPage: page, currPage: page,
sortname: sortname.value, sortname: sortname.value,
taskName, taskName,
//isFail: true, // isFail: true,
...params, ...params,
}); })
const { data, pageCount, totalCount } = result; const { data, pageCount, totalCount } = result
//console.log(data, pageCount, totalCount); // console.log(data, pageCount, totalCount);
let newlist = []; const newlist = []
let oldlist = tableData.value; const oldlist = tableData.value
if (oldlist.length > 0) { if (oldlist.length > 0) {
oldlist.map((item) => { oldlist.forEach((item) => {
// console.log(item); // console.log(item);
if (item.length > 0) { if (item.length > 0) {
item.map((itemx: any) => { item.forEach((itemx: any) => {
itemx.showcheck = false; itemx.showcheck = false
newlist.push(itemx); newlist.push(itemx)
}); })
} }
}); })
data.map((item) => { data.forEach((item) => {
item.showcheck = false; item.showcheck = false
newlist.push(item); newlist.push(item)
}); })
} else { }
data.map((item) => { else {
item.showcheck = false; data.forEach((item) => {
newlist.push(item); item.showcheck = false
}); newlist.push(item)
} })
//tableData.value = tableData.value.concat(data); }
tableData.value = newlist; // tableData.value = tableData.value.concat(data);
tableData.value = newlist
// console.log(tableData.value); // console.log(tableData.value);
total.value = totalCount; total.value = totalCount
pagination.page = page; pagination.page = page
pagination.pageCount = Math.ceil(totalCount / pageSize); pagination.pageCount = Math.ceil(totalCount / pageSize)
loading.value = false; loading.value = false
tableData.value.map((item) => { tableData.value.forEach((item) => {
if (isValidTimestamp(item.fromuptime)) { if (isValidTimestamp(item.fromuptime))
item.fromuptime = formatToDateHMS(item.fromuptime); item.fromuptime = formatToDateHMS(item.fromuptime)
} })
});
tableData.value = chunk(tableData.value, 4)
tableData.value = chunk(tableData.value, 4);
} }
function isValidTimestamp(value) { function isValidTimestamp(value) {
if (typeof value !== "number" || !Number.isInteger(value)) { if (typeof value !== 'number' || !Number.isInteger(value))
return false; // return false //
}
const date = new Date(value); const date = new Date(value)
return !isNaN(date.getTime()); // return !Number.isNaN(date.getTime()) //
} }
// //
function goDetail(row) { function goDetail(row) {
router.push({ router.push({
name: "final-detail", name: 'final-detail',
query: { id: row.id, packageid: row.packageid }, query: { id: row.id, packageid: row.packageid },
}); })
} }
// //
function repeatBatchReject(items) { function repeatBatchReject(items) {
console.log(items); console.log(items)
rejectHandler(items); rejectHandler(items)
} }
// //
function rejectHandler(list) { function rejectHandler(list) {
console.log(list); console.log(list)
const msg = validate(list); const msg = validate(list)
if (msg !== null) { if (msg !== null) {
message.error(msg); message.error(msg)
return; return
} }
function validate(items: any[]) { function validate(items: any[]) {
if (items.length === 0) return "至少选中一个任务"; if (items.length === 0)
return null; return '至少选中一个任务'
return null
} }
console.log(notPassModalRef); console.log(notPassModalRef)
const modal = unref(notPassModalRef)! as any; const modal = unref(notPassModalRef)! as any
modal.showModal(list); modal.showModal(list)
} }
function showModal(modalRef: any) { function showModal(modalRef: any) {
const modal = unref(modalRef)! as any; const modal = unref(modalRef)! as any
modal.showModal(); modal.showModal()
} }
onMounted(() => { onMounted(() => {
initRem(); initRem()
initData(1, 20); initData(1, 20)
}); })
const item = { const item = {
img: testImg, img: testImg,
checked: false, checked: false,
title: "YP45678", title: 'YP45678',
date: "2023-12-19 12:09:18", date: '2023-12-19 12:09:18',
}; }
const data = ref<any[]>([]); const data = ref<any[]>([])
function actionHandler(action: any, row: any) { function actionHandler(action: any, row: any) {
const { key } = action; const { key } = action
switch (key) { switch (key) {
case "view": case 'view':
goDetail(row); goDetail(row)
break; break
case "reset": case 'reset':
// resetHandler() // resetHandler()
break; break
case "approval": case 'approval':
singleApproval(row); singleApproval(row)
break; break
case "reject": case 'reject':
rejectHandler(row); rejectHandler(row)
break; break
default: default:
break; break
} }
} }
// //
function doAudit(param: any, row: any) { function doAudit(param: any, row: any) {
dialog.info({ dialog.info({
title: "确认提示", title: '确认提示',
content: "确认给该任务审批为【通过】吗?", content: '确认给该任务审批为【通过】吗?',
positiveText: "确定", positiveText: '确定',
negativeText: "取消", negativeText: '取消',
onPositiveClick: () => { onPositiveClick: () => {
audit(param).then((res) => { audit(param).then((res) => {
const { code } = res; const { code } = res
if (code === "OK") { if (code === 'OK') {
message.success(res.message); message.success(res.message)
//changecardstatus(3, row); // changecardstatus(3, row);
initData(1, 20); initData(1, 20)
num = 1; num = 1
reload(); reload()
} else { }
message.error(res.message); else {
} message.error(res.message)
}); }
})
}, },
onNegativeClick: () => {}, onNegativeClick: () => {},
}); })
} }
// //
function singleApproval(row) { function singleApproval(row) {
console.log(row); console.log(row)
const param = { const param = {
result: true, result: true,
comment: "", comment: '',
disposeType: "", disposeType: '',
disposeTypeId: "", disposeTypeId: '',
failCauseId: "", failCauseId: '',
failCauseName: "", failCauseName: '',
flowTaskInfoList: [ flowTaskInfoList: [
{ {
formId: row.id, formId: row.id,
@ -301,137 +303,144 @@ function singleApproval(row) {
taskName: row.fromTaskName, taskName: row.fromTaskName,
}, },
], ],
}; }
doAudit(param, row); doAudit(param, row)
} }
// //
function batchApproval() { function batchApproval() {
const items: any = selectionIds.value; const items: any = selectionIds.value
const msg = validate(items); const msg = validate(items)
function validate(items: any[]) { function validate(items: any[]) {
if (items.length === 0) return "至少选中一个任务"; if (items.length === 0)
return null; return '至少选中一个任务'
return null
} }
if (msg !== null) { if (msg !== null) {
message.error(msg); message.error(msg)
return; return
} }
console.log(items); console.log(items)
const list: any = []; const list: any = []
items.forEach((item) => { items.forEach((item) => {
list.push({ list.push({
formId: item.id, formId: item.id,
taskId: item.taskId, taskId: item.taskId,
taskName: item.fromtaskname, taskName: item.fromtaskname,
}); })
}); })
const param = { const param = {
result: true, result: true,
comment: "", comment: '',
disposeType: "", disposeType: '',
disposeTypeId: "", disposeTypeId: '',
failCauseId: "", failCauseId: '',
failCauseName: "", failCauseName: '',
flowTaskInfoList: list, flowTaskInfoList: list,
}; }
doAudit(param, {}); doAudit(param, {})
selectionIds.value = []; selectionIds.value = []
num = 1; num = 1
} }
// //
function batchReject() { function batchReject() {
const items: any = selectionIds.value; const items: any = selectionIds.value
rejectHandler(items); rejectHandler(items)
selectionIds.value = []; selectionIds.value = []
num = 1; num = 1
} }
// //
function changecardstatus(states, item) { function changecardstatus(states, item) {
//let index = tableData.value.findIndex(itemx => itemx.id === item.id); // let index = tableData.value.findIndex(itemx => itemx.id === item.id);
let newlist = []; const newlist = []
tableData.value.map((itemarr, indexarr) => { tableData.value.forEach((itemarr, indexarr) => {
itemarr.map((itemobj, indexobj) => { itemarr.forEach((itemobj, indexobj) => {
if (item.id == itemobj.id) { if (item.id == itemobj.id)
itemobj.states = states; itemobj.states = states
}
newlist.push(itemobj); newlist.push(itemobj)
}); })
}); })
tableData.value = chunk(newlist, 4); tableData.value = chunk(newlist, 4)
} }
function reload() { function reload() {
//query(1, 20) // query(1, 20)
//num=1 // num=1
//selectionIds.value = [] // selectionIds.value = []
//checkedRowKeys.value = [] // checkedRowKeys.value = []
// const { page, pageSize } = unref(tableRef.value?.pagination) as PaginationProps // const { page, pageSize } = unref(tableRef.value?.pagination) as PaginationProps
// query(page!, pageSize!) // query(page!, pageSize!)
} }
let debounceTimer; let debounceTimer
// //
function checkBottom() { function checkBottom() {
const container = scrollContainer.value; const container = scrollContainer.value
// console.log(1) // console.log(1)
if (!container) return; if (!container)
return
// const { scrollTop, clientHeight, scrollHeight } = container; // const { scrollTop, clientHeight, scrollHeight } = container;
const scrollTop = window.pageYOffset || document.documentElement.scrollTop; const scrollTop = window.pageYOffset || document.documentElement.scrollTop
// //
const clientHeight = const clientHeight
window.innerHeight || document.documentElement.clientHeight; = window.innerHeight || document.documentElement.clientHeight
// //
const scrollHeight = document.documentElement.scrollHeight; const scrollHeight = document.documentElement.scrollHeight
clearTimeout(debounceTimer); clearTimeout(debounceTimer)
debounceTimer = setTimeout(() => { debounceTimer = setTimeout(() => {
if (scrollTop + clientHeight >= scrollHeight - 10) { if (scrollTop + clientHeight >= scrollHeight - 10) {
num = num + 1; num = num + 1
console.log(num); console.log(num)
query(num, 20); query(num, 20)
// fetchData(); // // fetchData(); //
} }
}, 500); }, 500)
} }
function changesort(sortnamex) { function changesort(sortnamex) {
if (sortorder.value == "asc" && sortnamex == "submit_date_timestamp") { if (sortorder.value == 'asc' && sortnamex == 'submit_date_timestamp') {
sortorder.value = "desc"; sortorder.value = 'desc'
sortname.value = "submit_date_timestamp"; sortname.value = 'submit_date_timestamp'
}else if (sortorder.value == "desc" && sortnamex == "submit_date_timestamp") { }
sortorder.value = "asc"; else if (sortorder.value == 'desc' && sortnamex == 'submit_date_timestamp') {
sortname.value = "submit_date_timestamp"; sortorder.value = 'asc'
} else if (sortorder.value == "desc" && sortnamex == "similarity_score") { sortname.value = 'submit_date_timestamp'
sortorder.value = "asc"; }
sortname.value = "similarity_score"; else if (sortorder.value == 'desc' && sortnamex == 'similarity_score') {
} else if (sortorder.value == "asc" && sortnamex == "similarity_score") { sortorder.value = 'asc'
sortorder.value = "desc"; sortname.value = 'similarity_score'
sortname.value = "similarity_score"; }
} else if (sortorder.value == "asc" && sortnamex == "field1") { else if (sortorder.value == 'asc' && sortnamex == 'similarity_score') {
sortorder.value = "desc"; sortorder.value = 'desc'
sortname.value = "field1"; sortname.value = 'similarity_score'
} else if (sortorder.value == "desc" && sortnamex == "field1") { }
sortorder.value = "asc"; else if (sortorder.value == 'asc' && sortnamex == 'field1') {
sortname.value = "field1"; sortorder.value = 'desc'
} sortname.value = 'field1'
initData(1, 20); }
num=1 else if (sortorder.value == 'desc' && sortnamex == 'field1') {
sortorder.value = 'asc'
sortname.value = 'field1'
}
initData(1, 20)
num = 1
} }
watch( watch(
() => finalStore.asideValue, () => finalStore.asideValue,
(newVal, oldVal) => { (newVal, oldVal) => {
initData(1, 20); initData(1, 20)
}, },
{ deep: true } { deep: true },
); )
defineExpose({ defineExpose({
initData, initData,
}); })
</script> </script>
<template> <template>
@ -476,18 +485,17 @@ defineExpose({
src="@/assets/images/task/btn-not-pass.png" src="@/assets/images/task/btn-not-pass.png"
alt="" alt=""
@click.stop="batchReject" @click.stop="batchReject"
/> >
<SvgIcon size="24" name="vs" /> <SvgIcon size="24" name="vs" />
<img <img
class="btn-approval" class="btn-approval"
src="@/assets/images/task/btn-pass.png" src="@/assets/images/task/btn-pass.png"
alt="" alt=""
@click.stop="batchApproval" @click.stop="batchApproval"
/> >
</div> </div>
<n-popover <n-popover
ref="popover"
:style="{ padding: '0px' }" :style="{ padding: '0px' }"
style="width: 148px" style="width: 148px"
:show-arrow="false" :show-arrow="false"
@ -501,26 +509,20 @@ defineExpose({
</template> </template>
<ul class="wrapper-header-action"> <ul class="wrapper-header-action">
<li @click="importHandler"> <li @click="importHandler">
<SvgIcon size="20" name="import" /><span style="margin-left: 5px" <SvgIcon size="20" name="import" /><span style="margin-left: 5px">批量导入数据</span>
>批量导入数据</span
>
</li> </li>
<li @click="exportHandler"> <li @click="exportHandler">
<SvgIcon size="20" name="download" /><span <SvgIcon size="20" name="download" /><span
style="margin-left: 5px" style="margin-left: 5px"
>导出待审数据</span >导出待审数据</span>
>
</li> </li>
<li> <li>
<SvgIcon size="20" name="download" /><span <SvgIcon size="20" name="download" /><span
style="margin-left: 5px" style="margin-left: 5px"
>导出全部数据</span >导出全部数据</span>
>
</li> </li>
<li> <li>
<SvgIcon size="20" name="look" /><span style="margin-left: 5px" <SvgIcon size="20" name="look" /><span style="margin-left: 5px">查看导入记录</span>
>查看导入记录</span
>
</li> </li>
</ul> </ul>
</n-popover> </n-popover>
@ -528,21 +530,18 @@ defineExpose({
</div> </div>
<div class="header_data"> <div class="header_data">
<DataHeader :hasColor="true" /> <DataHeader :has-color="true" />
</div> </div>
<div class="wrapper-settings"> <div class="wrapper-settings">
<div> <div>
<div @click="changesort('submit_date_timestamp')"> <div @click="changesort('submit_date_timestamp')">
<span>提报时间排序</span <span>提报时间排序</span><SvgIcon style="margin-left: 6px" name="sort" size="13" />
><SvgIcon style="margin-left: 6px" name="sort" size="13" />
</div> </div>
<div @click="changesort('similarity_score')"> <div @click="changesort('similarity_score')">
<span>相似度排序</span <span>相似度排序</span><SvgIcon style="margin-left: 6px" name="sort" size="13" />
><SvgIcon style="margin-left: 6px" name="sort" size="13" />
</div> </div>
<div @click="changesort('field1')"> <div @click="changesort('field1')">
<span>提报人排序</span <span>提报人排序</span><SvgIcon style="margin-left: 6px" name="sort" size="13" />
><SvgIcon style="margin-left: 6px" name="sort" size="13" />
</div> </div>
</div> </div>
<div style="width: 3vw"> <div style="width: 3vw">
@ -555,12 +554,11 @@ defineExpose({
/> />
</div> </div>
</div> </div>
<div :class="tableData.length>4?'cotnet_wrapeer':'cotnet_wrapeertwo'" @scroll="checkBottom" ref="scrollContainer"> <div ref="scrollContainer" :class="tableData.length > 4 ? 'cotnet_wrapeer' : 'cotnet_wrapeertwo'" @scroll="checkBottom">
<div <div
class="data_wrapper"
v-for="(sitem, sindex) in tableData" v-for="(sitem, sindex) in tableData"
:key="sindex" :key="sindex"
class="data_wrapper"
:style=" :style="
sitem.length == 1 sitem.length == 1
? { width: '25%' } ? { width: '25%' }
@ -572,9 +570,9 @@ defineExpose({
" "
> >
<div <div
class="item"
v-for="(item, index) in sitem" v-for="(item, index) in sitem"
:key="index" :key="index"
class="item"
:style=" :style="
sitem.length == 1 sitem.length == 1
? { margin: '0 4% 0 4%' } ? { margin: '0 4% 0 4%' }
@ -587,25 +585,27 @@ defineExpose({
> >
<div class="top"> <div class="top">
<div <div
@click="goDetail(item)"
class="img" class="img"
:style=" :style="
item.serverThumbnailUrl != null item.serverThumbnailUrl != null
? `background:url(${item.serverThumbnailUrl});background-size:100% 100%;background-repeat: no-repeat;` ? `background:url(${item.serverThumbnailUrl});background-size:100% 100%;background-repeat: no-repeat;`
: `background:url(${item.imgUrl});background-size:100% 100%;background-repeat: no-repeat;` : `background:url(${item.imgUrl});background-size:100% 100%;background-repeat: no-repeat;`
" "
> <div class="percent" v-if="item.similarityscore != -1"> @click="goDetail(item)"
>
<div v-if="item.similarityscore != -1" class="percent">
<SvgIcon size="30" :name="item.similarityscore == 100 ? 'error_tag' : 'tag'" /> <SvgIcon size="30" :name="item.similarityscore == 100 ? 'error_tag' : 'tag'" />
<div class="val"> <div class="val">
{{ `${item.similarityscore}%` }} {{ `${item.similarityscore}%` }}
</div> </div>
</div></div> </div>
<div class="check_box" v-show="item.states == 2"> </div>
<div v-show="item.states == 2" class="check_box">
<n-checkbox <n-checkbox
size="medium" size="medium"
label=" " label=" "
@click="handleCheck(item, item.showcheck)"
:checked="item.showcheck" :checked="item.showcheck"
@click="handleCheck(item, item.showcheck)"
/> />
</div> </div>
@ -616,15 +616,15 @@ defineExpose({
</n-ellipsis> </n-ellipsis>
</div> </div>
<div class="date"> <div class="date">
<n-ellipsis style="max-width: 100%" <n-ellipsis style="max-width: 100%">
>{{ item.fromuptime }} {{ item.fromuptime }}
</n-ellipsis> </n-ellipsis>
</div> </div>
<div class="tag_box"> <div class="tag_box">
<div <div
class="tag_item"
v-for="index in 2" v-for="index in 2"
:key="index" :key="index"
class="tag_item"
:style=" :style="
index == 2 || item.states == 3 index == 2 || item.states == 3
? 'color:#02C984' ? 'color:#02C984'
@ -651,24 +651,24 @@ defineExpose({
</div> </div>
</div> </div>
<div class="bottom"> <div class="bottom">
<!-- <div class="reset_action">重置审批</div>--> <!-- <div class="reset_action">重置审批</div> -->
<div <div
class="resovle_action"
v-show="item.states != 2" v-show="item.states != 2"
class="resovle_action"
@click="goDetail(item)" @click="goDetail(item)"
> >
查看 查看
</div> </div>
<div <div
class="resovle_action"
v-show="item.states == 2" v-show="item.states == 2"
class="resovle_action"
@click="actionHandler({ key: 'approval' }, item)" @click="actionHandler({ key: 'approval' }, item)"
> >
通过 通过
</div> </div>
<div <div
class="reject_action"
v-show="item.states == 2" v-show="item.states == 2"
class="reject_action"
@click="actionHandler({ key: 'reject' }, [item])" @click="actionHandler({ key: 'reject' }, [item])"
> >
不通过 不通过

@ -23,9 +23,9 @@ const props = defineProps({
}, },
}) })
const emit = defineEmits(['changeShow']) const emit = defineEmits(['changeShow'])
const aa=ref(true) const aa = ref(true)
const haeaderstore=useDataHeaderStore() const haeaderstore = useDataHeaderStore()
const headerref=ref(null) const headerref = ref(null)
const dialog = useDialog() const dialog = useDialog()
const message = useMessage() const message = useMessage()
const router = useRouter() const router = useRouter()
@ -312,9 +312,7 @@ function doAudit(param: any, row: any) {
positiveText: '确定', positiveText: '确定',
negativeText: '取消', negativeText: '取消',
onPositiveClick: () => { onPositiveClick: () => {
audit(param).then((res) => {
audit(param).then((res) => {
const { code } = res const { code } = res
if (code === 'OK') { if (code === 'OK') {
message.success(res.message) message.success(res.message)
@ -332,12 +330,10 @@ audit(param).then((res) => {
}) })
// alert("X") // alert("X")
// haeaderstore.setDataConfig(true) // haeaderstore.setDataConfig(true)
}, },
onNegativeClick: () => {}, onNegativeClick: () => {},
}) })
} }
// //
function singleApproval(row) { function singleApproval(row) {
@ -489,11 +485,9 @@ function notpass() {
const modal = unref(headerref)! as any const modal = unref(headerref)! as any
initData(1, 20, {}, props.taskvalue) initData(1, 20, {}, props.taskvalue)
selectionIds.value = [] selectionIds.value = []
modal.getData() modal.getData()
// haeaderstore.setDataConfig(true) // haeaderstore.setDataConfig(true)
} }
watch( watch(
() => finalStore.asideValue, () => finalStore.asideValue,
@ -535,7 +529,7 @@ defineExpose({
<div v-show="!showActions" style="display: flex; align-items: center"> <div v-show="!showActions" style="display: flex; align-items: center">
<div class="btn"> <div class="btn">
<!-- <SvgIcon style="margin-right: 6px" size="22" name="batch" /> <!-- <SvgIcon style="margin-right: 6px" size="22" name="batch" />
批量审批--> 批量审批 -->
</div> </div>
</div> </div>
<div v-show="showActions" class="batch"> <div v-show="showActions" class="batch">
@ -597,7 +591,7 @@ defineExpose({
</div> </div>
<div class="header_data"> <div class="header_data">
<DataHeader ref="headerref" :has-color="true" v-if="aa"/> <DataHeader v-if="aa" ref="headerref" :has-color="true" />
</div> </div>
<div class="wrapper-settings"> <div class="wrapper-settings">
<div> <div>

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref , onMounted} from 'vue' import { onMounted, ref } from 'vue'
import Aside from './aside/Aside.vue' import Aside from './aside/Aside.vue'
import Content from './content/Content.vue' import Content from './content/Content.vue'
import ListContent from './content/ListContent.vue' import ListContent from './content/ListContent.vue'
@ -11,29 +11,28 @@ defineOptions({
const showList = ref(true) const showList = ref(true)
const contentRef: any = ref(null) const contentRef: any = ref(null)
const ListRef: any = ref(null) const ListRef: any = ref(null)
const asideref=ref(null) const asideref = ref(null)
const taskvalue=ref("") const taskvalue = ref('')
function inputChange(keyword) { function inputChange(keyword) {
if(asideref.value?.showSearch){ if (asideref.value?.showSearch)
taskvalue.value=keyword taskvalue.value = keyword
}else{
taskvalue.value="" else
} taskvalue.value = ''
if (ListRef.value!=null) {
ListRef.value.initData(1,20,{},keyword);
} else {
contentRef.value.filterTableData(keyword);
}
if (ListRef.value != null)
ListRef.value.initData(1, 20, {}, keyword)
else
contentRef.value.filterTableData(keyword)
} }
onMounted(()=>{ onMounted(() => {
const searchParams = new URLSearchParams(window.location.search); const searchParams = new URLSearchParams(window.location.search)
const type = searchParams.get('type'); const type = searchParams.get('type')
if(type=='table'){ if (type == 'table')
showList.value=false showList.value = false
}else{
showList.value=true else
} showList.value = true
}) })
</script> </script>
@ -44,10 +43,10 @@ onMounted(()=>{
<!-- 任务管理 --> <!-- 任务管理 -->
<!-- TODO:本地演示即可 上传注释注释 --> <!-- TODO:本地演示即可 上传注释注释 -->
<ListContent v-if="showList" ref="ListRef" @change-show="showList = false" :taskvalue="taskvalue"/> <ListContent v-if="showList" ref="ListRef" :taskvalue="taskvalue" @change-show="showList = false" />
<!-- 内容 --> <!-- 内容 -->
<Content v-if="!showList" ref="contentRef" @change-show="showList = true" :taskvalue="taskvalue"/> <Content v-if="!showList" ref="contentRef" :taskvalue="taskvalue" @change-show="showList = true" />
<!-- 机器人 --> <!-- 机器人 -->
<Robot /> <Robot />

@ -311,9 +311,9 @@ useKeydown('s', () => setShowSearch(true))
<!-- 搜索跳转模块 --> <!-- 搜索跳转模块 -->
<Search <Search
v-show="showSearch" v-show="showSearch"
toolipvalue="请输入提报人搜索"
@select="scrollHandler" @select="scrollHandler"
@close="setShowSearch(false)" @close="setShowSearch(false)"
:toolipvalue="'请输入提报人搜索'"
/> />
<!-- 高级筛选 --> <!-- 高级筛选 -->
<AdvanceFilter <AdvanceFilter

@ -16,11 +16,11 @@ const props = defineProps({
default: 0, default: 0,
required: true, required: true,
}, },
toolipvalue:{ toolipvalue: {
type: String, type: String,
default: "", default: '',
required: true, required: true,
} },
}) })
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'show-filter'): void (e: 'show-filter'): void
@ -411,7 +411,6 @@ defineExpose({
</n-popover> </n-popover>
</div> </div>
<div class="wrapper-right"> <div class="wrapper-right">
<SvgIcon <SvgIcon
style="display: block; cursor: pointer" style="display: block; cursor: pointer"
size="18" size="18"

@ -7,16 +7,15 @@ import type { SearchEntity } from '/#/home'
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final' import { useFinal } from '@/store/modules/final'
defineOptions({ name: 'Search' })
const props = defineProps({ const props = defineProps({
toolipvalue:{ toolipvalue: {
type: String, type: String,
default: "", default: '',
required: true, required: true,
} },
}) })
defineOptions({ name: 'Search' })
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'close'): void (e: 'close'): void
(e: 'select', key: string): void (e: 'select', key: string): void

@ -44,14 +44,15 @@ import avatar from '@/assets/images/avatar.jpg'
import { import {
createPackage, createPackage,
getCheckDuplicateStatus, getCheckDuplicateStatus,
getCheckDuplicateStatusx,
getLastCheckNo, getLastCheckNo,
getLastCheckNox,
getPictureList, getPictureList,
oneClickCheckTaskPackage, oneClickCheckTaskPackage,
queryPageListByCheckNo, queryPageListByCheckNo
removeCheckDuplicate, , removeCheckDuplicate,
getCheckDuplicateStatusx
} from '@/api/home/main' } from '@/api/home/main'
import {getLastCheckNox} from "@/api/home/main"
import bgLoading from '@/assets/images/bg-loading.png' import bgLoading from '@/assets/images/bg-loading.png'
const listData = ref<any[]>([]) const listData = ref<any[]>([])
@ -78,7 +79,7 @@ const finishPackageModal = 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 loadref=ref(true) const loadref = ref(true)
const sortBy: PictureSortParam = { const sortBy: PictureSortParam = {
orderbyname: 'desc', orderbyname: 'desc',
orderbyvalue: 'pictureResult', orderbyvalue: 'pictureResult',
@ -108,14 +109,14 @@ const listStyle = computed(() => {
} }
}) })
async function inittask() { async function inittask() {
let result = await getLastCheckNox() const result = await getLastCheckNox()
console.log(result.data) console.log(result.data)
if(result.data){ if (result.data) {
let res=await getCheckDuplicateStatusx({checkDuplicateNo:result.data}) const res = await getCheckDuplicateStatusx({ checkDuplicateNo: result.data })
if(res.data.status==1){ if (res.data.status == 1) {
const checkingTaskModal = checkingTaskModalRef.value as any const checkingTaskModal = checkingTaskModalRef.value as any
checkingTaskModal.showModal() checkingTaskModal.showModal()
loadref.value=false loadref.value = false
} }
checkTaskStatus.value = res.data.status // 1. 2. checkTaskStatus.value = res.data.status // 1. 2.
} }
@ -171,8 +172,6 @@ onBeforeMount(async () => {
cols.value = 5 cols.value = 5
}) })
const timeRange = ref('') const timeRange = ref('')
const timeLabel = computed(() => { const timeLabel = computed(() => {
const item = timeOptions.find((option) => { const item = timeOptions.find((option) => {
@ -321,7 +320,7 @@ async function featchList(userSearchId?: string) {
}) })
} }
const { data, pageCount, total, current } = result const { data, pageCount, total, current } = result
pagination.pageNo = current pagination.pageNo = current || 1
totalCount.value = total totalCount.value = total
canloadMore = pageCount >= pagination.pageNo && pageCount > 0 canloadMore = pageCount >= pagination.pageNo && pageCount > 0
@ -337,6 +336,7 @@ async function featchList(userSearchId?: string) {
similar: item.similarityscore || -1, similar: item.similarityscore || -1,
imgName: item.imgname, imgName: item.imgname,
states: item.states, states: item.states,
isRepeatHis: item.isRepeatHis,
wide: item.wide, wide: item.wide,
high: item.high, high: item.high,
loadOver: false, loadOver: false,
@ -353,7 +353,7 @@ async function featchList(userSearchId?: string) {
} }
async function loadMore() { async function loadMore() {
// console.log('loading.value', loading.value, el.value) console.log('loadMore加兹安pagination.pageNo----------------', pagination.pageNo)
if (loading.value || el.value == null) if (loading.value || el.value == null)
return return
canloadMore = false canloadMore = false
@ -361,18 +361,19 @@ async function loadMore() {
more.forEach((item) => { more.forEach((item) => {
item.calHeight = 182 * item.high / item.wide item.calHeight = 182 * item.high / item.wide
}) })
console.log('loadMore加载后的pagination.pageNo----------------', pagination.pageNo)
// listData.value.push(...more) // listData.value.push(...more)
if (pagination.pageNo == 1) { if (pagination.pageNo <= 1) {
listData.value = [] listData.value = []
listData.value = listData.value.concat(more) listData.value = listData.value.concat(more)
console.log('listData.value出来了', listData.value) console.log('listData.value首页出来了1111', listData.value)
waterfallRef.value?.resize() waterfallRef.value?.resize()
if (listData.value.length == 0) if (listData.value.length == 0)
waterfallRef.value?.clear() waterfallRef.value?.clear()
} }
else { else {
listData.value = listData.value.concat(more) listData.value = listData.value.concat(more)
console.log('listData.value出来了', listData.value) console.log('listData.value首页出来了2222', listData.value)
waterfallRef.value?.mix() waterfallRef.value?.mix()
} }
} }
@ -407,7 +408,7 @@ const gridMinHeight = computed(() => {
}) })
async function oneCheck() { async function oneCheck() {
loadref.value=false loadref.value = false
const asideVal = cloneDeep(configStore.getAsideValue) const asideVal = cloneDeep(configStore.getAsideValue)
asideVal.upUserName = searchValue.value asideVal.upUserName = searchValue.value
@ -435,12 +436,16 @@ async function oneCheck() {
configStore.setTimeNum(calNum.value) configStore.setTimeNum(calNum.value)
if (checkTaskStatus.value === 2 || checkTaskStatus.value === 3) { if (checkTaskStatus.value === 2 || checkTaskStatus.value === 3) {
if (checkTaskStatus.value === 2) if (checkTaskStatus.value === 2) {
{ message.success('任务执行完毕,正在刷新数据...') message.success('任务执行完毕,正在刷新数据...')
loadref.value=true loadref.value = true
}else{ message.error('查询异常') }
loadref.value=true else {
message.error('查询异常')
loadref.value = true
} }
reset()
loadMore()
tasksLoadingModal.closeOnlyModal() tasksLoadingModal.closeOnlyModal()
configStore.setTimeNum(100) configStore.setTimeNum(100)
if (timer.value) if (timer.value)
@ -449,8 +454,8 @@ async function oneCheck() {
setTimeout(() => { setTimeout(() => {
configStore.setTimeNum(0) configStore.setTimeNum(0)
}, 1000) }, 1000)
reset() // reset()
loadMore() // loadMore()
} }
waterfallRef.value?.resize() waterfallRef.value?.resize()
} }
@ -531,6 +536,7 @@ async function commitHandler(settingParam) {
const finalParam = { ...asideVal } const finalParam = { ...asideVal }
finalParam.buessinessno = settingParam.packagename finalParam.buessinessno = settingParam.packagename
finalParam.search_history = settingParam.comparehistory ? 1 : 0 finalParam.search_history = settingParam.comparehistory ? 1 : 0
waterfallRef.value?.resize()
} }
onMounted(() => { onMounted(() => {
@ -684,19 +690,26 @@ function refresh(val?: any) {
configStore.setTimeNum(100) configStore.setTimeNum(100)
checkingTaskModal.closeModal() checkingTaskModal.closeModal()
isRefresh.value = false isRefresh.value = false
if (checkTaskStatus.value === 2) if (checkTaskStatus.value === 2) {
{
message.success('任务执行完毕,正在刷新数据...') message.success('任务执行完毕,正在刷新数据...')
loadref.value=true loadref.value = true
}
else {
message.error('查询异常')
loadref.value = true
} }
else{ message.error('查询异常') if (timer.value)
loadref.value=true
}if (timer.value)
clearInterval(timer.value) clearInterval(timer.value)
reset() reset()
loadMore() loadMore()
if (timer.value)
clearInterval(timer.value)
// reset()
// loadMore()
configStore.setTimeNum(0) configStore.setTimeNum(0)
} }
waterfallRef.value?.resize()
// else if (checkTaskStatus.value === 1) { // else if (checkTaskStatus.value === 1) {
// return; // return;
// } // }
@ -714,7 +727,7 @@ function cancel() {
checkDuplicateNo.value = '' checkDuplicateNo.value = ''
checkTaskStatus.value = null checkTaskStatus.value = null
message.success('查重任务取消成功') message.success('查重任务取消成功')
loadref.value=true loadref.value = true
} }
}) })
} }
@ -789,18 +802,17 @@ defineExpose({
</div> </div>
<div class="flex-btn-icon"> <div class="flex-btn-icon">
<SvgIcon <SvgIcon
v-show="checkTaskStatus !== 2&& loadref" v-show="checkTaskStatus !== 2 && loadref"
style="cursor: pointer" style="cursor: pointer"
size="105" size="105"
name="yijianchachong" name="yijianchachong"
@click="oneCheck" @click="oneCheck"
/> />
<SvgIcon <SvgIcon
v-show="checkTaskStatus !== 2&& !loadref" v-show="checkTaskStatus !== 2 && !loadref"
style="cursor:not-allowed" style="cursor:not-allowed"
size="105" size="105"
name="yijianchachong" name="yijianchachong"
/> />
<SvgIcon <SvgIcon
v-show="checkTaskStatus === 2" v-show="checkTaskStatus === 2"
@ -818,7 +830,7 @@ defineExpose({
</n-dropdown> </n-dropdown>
</div> </div>
</div> </div>
<div class="wrapper-content" > <div class="wrapper-content">
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
<div class="form"> <div class="form">
<n-popselect v-model:value="viewMode" :options="viewOptions" trigger="click"> <n-popselect v-model:value="viewMode" :options="viewOptions" trigger="click">
@ -900,7 +912,19 @@ defineExpose({
src="@/assets/images/task/tag-not-pass.png" src="@/assets/images/task/tag-not-pass.png"
alt="" alt=""
> >
<img
v-if="(item.states != 3 && item.states != 5) && item.isRepeatHis"
class="tag-status"
src="@/assets/images/reset.png"
alt=""
>
<img
v-if="(item.states == 3 || item.states == 5) && item.isRepeatHis"
style="top:35px"
class="tag-status"
src="@/assets/images/reset.png"
alt=""
>
<div v-if="item.similar != -1" class="percent"> <div v-if="item.similar != -1" class="percent">
<SvgIcon size="42" :name="item.similar == 100 ? 'error_tag' : 'tag'" /> <SvgIcon size="42" :name="item.similar == 100 ? 'error_tag' : 'tag'" />
<div class="val"> <div class="val">
@ -1008,7 +1032,19 @@ defineExpose({
src="@/assets/images/task/tag-not-pass.png" src="@/assets/images/task/tag-not-pass.png"
alt="" alt=""
> >
<img
v-if="(item.states != 3 && item.states != 5) && item.isRepeatHis"
class="tag-status"
src="@/assets/images/reset.png"
alt=""
>
<img
v-if="(item.states == 3 || item.states == 5) && item.isRepeatHis"
style="top:35px"
class="tag-status"
src="@/assets/images/reset.png"
alt=""
>
<div v-if="item.similar != -1" class="percent"> <div v-if="item.similar != -1" class="percent">
<SvgIcon size="42" :name="item.similar == 100 ? 'error_tag' : 'tag'" /> <SvgIcon size="42" :name="item.similar == 100 ? 'error_tag' : 'tag'" />
<div class="val"> <div class="val">

@ -1,55 +1,55 @@
<script lang="ts" setup> <script lang="ts" setup>
import { defineOptions, onMounted, ref, onBeforeUnmount } from "vue"; import { defineOptions, onBeforeUnmount, onMounted, ref } from 'vue'
import { useRouter } from "vue-router"; import { useRouter } from 'vue-router'
defineOptions({ name: "ShortcutModal" }); defineOptions({ name: 'ShortcutModal' })
const emit = defineEmits<{ const emit = defineEmits<{
(e: "refresh", value: any); (e: 'refresh', value: any)
(e: "cancel", value: any); (e: 'cancel', value: any)
}>(); }>()
const show = ref(false); const show = ref(false)
const isFold = ref(false); const isFold = ref(false)
const router = useRouter(); const router = useRouter()
const cardStyle = { const cardStyle = {
width: "357px", 'width': '357px',
"--n-padding-bottom": "10px", '--n-padding-bottom': '10px',
"--n-padding-left": "10px", '--n-padding-left': '10px',
}; }
function toggle() { function toggle() {
isFold.value = !isFold.value; isFold.value = !isFold.value
} }
function showModal() { function showModal() {
show.value = true; show.value = true
} }
function closeModal() { function closeModal() {
show.value = false; show.value = false
} }
function refresh() { function refresh() {
emit("refresh", true); emit('refresh', true)
} }
function cancel() { function cancel() {
closeModal(); closeModal()
emit("cancel", true); emit('cancel', true)
isFold.value=false isFold.value = false
} }
const time = ref(); const time = ref()
onMounted(() => { onMounted(() => {
time.value = setInterval(() => { time.value = setInterval(() => {
// console.log("00000000-----------"); // console.log("00000000-----------");
show.value && refresh(); show.value && refresh()
}, 5000); }, 5000)
}); })
onBeforeUnmount(() => { onBeforeUnmount(() => {
clearInterval(time.value); clearInterval(time.value)
time.value = null; time.value = null
}); })
defineExpose({ defineExpose({
showModal, showModal,
closeModal, closeModal,
}); })
</script> </script>
<template> <template>
@ -57,9 +57,9 @@ defineExpose({
<!-- <n-modal v-model:show="show" :show-mask="false" :mask-closable="false" transform-origin="center" style="position: fixed;right: 0;bottom: 0;"> --> <!-- <n-modal v-model:show="show" :show-mask="false" :mask-closable="false" transform-origin="center" style="position: fixed;right: 0;bottom: 0;"> -->
<div <div
v-if="show" v-if="show"
:style="!isFold? :style="!isFold
'position: fixed; right: 16px;bottom: 16px;float: left;z-index: 1002;width: 360px;height: 157px;': ? 'position: fixed; right: 16px;bottom: 16px;float: left;z-index: 1002;width: 360px;height: 157px;'
'position: fixed; right: 16px;bottom: -70px;float: left;z-index: 1002;width: 360px;height: 157px;'" : 'position: fixed; right: 16px;bottom: -70px;float: left;z-index: 1002;width: 360px;height: 157px;'"
> >
<n-card <n-card
:style="cardStyle" :style="cardStyle"
@ -70,13 +70,15 @@ defineExpose({
style="padding: 8px 8px 0 8px" style="padding: 8px 8px 0 8px"
> >
<div class="wrapper"> <div class="wrapper">
<div class="title">查重进度</div> <div class="title">
查重进度
</div>
<div class="icon-list"> <div class="icon-list">
<svg-icon <svg-icon
size="16" size="16"
name="refresh" name="refresh"
@click="refresh"
style="margin-right: 16px; cursor: pointer" style="margin-right: 16px; cursor: pointer"
@click="refresh"
/> />
<svg-icon <svg-icon
v-show="!isFold" v-show="!isFold"
@ -95,8 +97,8 @@ defineExpose({
<svg-icon <svg-icon
size="16" size="16"
name="close-none-border" name="close-none-border"
@click="cancel"
style="margin-right: 25.7px; cursor: pointer" style="margin-right: 25.7px; cursor: pointer"
@click="cancel"
/> />
</div> </div>
</div> </div>

@ -1,81 +1,103 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref } from "vue"; import { onMounted, ref } from 'vue'
import { getToolsCount } from "@/api/home/main"; import { getToolsCount } from '@/api/home/main'
const emit = defineEmits<{ const emit = defineEmits<{
(e: "reject", params: any); (e: 'reject', params: any)
(e: "viewrepeat"); (e: 'viewrepeat')
}>(); }>()
const show = ref(false); const show = ref(false)
const toolsData = ref({} as any); const toolsData = ref({} as any)
async function getData() { async function getData() {
const res = await getToolsCount(); const res = await getToolsCount()
toolsData.value = res.data || {}; toolsData.value = res.data || {}
if (res.code == "OK") { if (res.code == 'OK')
showModal(); showModal()
}
} }
onMounted(() => { onMounted(() => {
getData(); getData()
}); })
function showModal() { function showModal() {
show.value = true; show.value = true
} }
function closeModal() { function closeModal() {
show.value = false; show.value = false
} }
async function reject() { async function reject() {
emit("reject", { a: "todo" }); emit('reject', { a: 'todo' })
closeModal(); closeModal()
} }
async function viewRepeat(e: MouseEvent) { async function viewRepeat(e: MouseEvent) {
emit("viewrepeat"); emit('viewrepeat')
e.preventDefault(); e.preventDefault()
closeModal(); closeModal()
} }
defineExpose({ defineExpose({
showModal,closeModal showModal,
}); closeModal,
})
</script> </script>
<template> <template>
<n-modal v-model:show="show" transform-origin="center" class="modal_wrap"> <n-modal v-model:show="show" transform-origin="center" class="modal_wrap">
<div class="wrapper"> <div class="wrapper">
<div class="wrapper-hearder"> <div class="wrapper-hearder">
<div class="wrapper-title">欢迎登录智能AI审批工具</div> <div class="wrapper-title">
<div class="wrapper-mark">某某有限公司-某某事业部-张小凡</div> 欢迎登录智能AI审批工具
</div>
<div class="wrapper-mark">
某某有限公司-某某事业部-张小凡
</div>
</div> </div>
<div class="wrapper-content"> <div class="wrapper-content">
<div class="flex_box"> <div class="flex_box">
<div class="item"> <div class="item">
<SvgIcon name="task_count" width="48" height="48" /> <SvgIcon name="task_count" width="48" height="48" />
<div class="num_box">{{ toolsData?.total || 0 }}</div> <div class="num_box">
<div class="title_box">任务总数</div> {{ toolsData?.total || 0 }}
</div>
<div class="title_box">
任务总数
</div>
</div> </div>
<div class="item"> <div class="item">
<SvgIcon name="task_wait" width="48" height="48" /> <SvgIcon name="task_wait" width="48" height="48" />
<div class="num_box">{{ toolsData?.treat || 0 }}</div> <div class="num_box">
<div class="title_box">待审批</div> {{ toolsData?.treat || 0 }}
</div>
<div class="title_box">
待审批
</div>
</div> </div>
<div class="item"> <div class="item">
<SvgIcon name="task_over" width="48" height="48" /> <SvgIcon name="task_over" width="48" height="48" />
<div class="num_box">{{ toolsData?.approvedCount || 0 }}</div> <div class="num_box">
<div class="title_box">已审批</div> {{ toolsData?.approvedCount || 0 }}
</div>
<div class="title_box">
已审批
</div>
</div> </div>
<div class="item"> <div class="item">
<SvgIcon name="modal_reImg" width="48" height="48" /> <SvgIcon name="modal_reImg" width="48" height="48" />
<div class="num_box" >{{ toolsData?.repeat }}</div> <div class="num_box">
<div class="title_box">重复图片</div> {{ toolsData?.repeat }}
</div>
<div class="title_box">
重复图片
</div>
</div>
</div> </div>
<div class="footer" @click="viewRepeat">
我知道了
</div> </div>
<div class="footer" @click="viewRepeat"></div>
<!-- <div class="footer"> <!-- <div class="footer">
<SvgIcon <SvgIcon
@click="viewRepeat" @click="viewRepeat"

@ -1,16 +1,17 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue'
import Aside from './aside/Aside.vue' import Aside from './aside/Aside.vue'
import Content from './content/Content.vue' import Content from './content/Content.vue'
import Robot from '@/components/Robot/index.vue' import Robot from '@/components/Robot/index.vue'
import {ref} from 'vue';
import { useKeydown } from '@/hooks/event/useKeydown' import { useKeydown } from '@/hooks/event/useKeydown'
const contentRef:any = ref(null)
const showLoginModal = ()=>{ const contentRef: any = ref(null)
contentRef.value.showLoginSuccessModal();
function showLoginModal() {
contentRef.value.showLoginSuccessModal()
} }
const closeLoginModal = ()=>{ function closeLoginModal() {
contentRef.value.closeLoginSuccessModal(); contentRef.value.closeLoginSuccessModal()
} }
useKeydown('m m', showLoginModal) useKeydown('m m', showLoginModal)
useKeydown('enter', closeLoginModal) useKeydown('enter', closeLoginModal)
@ -22,10 +23,10 @@ useKeydown('enter', closeLoginModal)
<Aside /> <Aside />
<!-- 内容 --> <!-- 内容 -->
<Content ref="contentRef"/> <Content ref="contentRef" />
<!-- 机器人 --> <!-- 机器人 -->
<Robot :canClick="true" @click="showLoginModal"/> <Robot :can-click="true" @click="showLoginModal" />
</div> </div>
</template> </template>
@ -37,5 +38,4 @@ useKeydown('enter', closeLoginModal)
width: 100%; width: 100%;
margin-bottom: 16px margin-bottom: 16px
} }
</style> </style>

@ -1,71 +1,71 @@
<script> <script>
import { reactive, toRefs, onMounted } from "vue"; import { onMounted, reactive, toRefs } from 'vue'
export default { export default {
components: {},
props: { props: {
obj: { obj: {
type: Object, type: Object,
default: {}, default: () => {},
}, },
}, },
setup(props) { setup(props) {
let state = reactive({}); const state = reactive({})
let methods = { const methods = {
init(item) { init(item) {
let queryParamsNew =item const queryParamsNew = item
const lng = queryParamsNew.lng; // const lng = queryParamsNew.lng //
const lat = queryParamsNew.lat; // const lat = queryParamsNew.lat //
// //
const center = new qq.maps.LatLng(lat, lng); const center = new qq.maps.LatLng(lat, lng)
const map = new qq.maps.Map(document.getElementById("map-container"), { const map = new qq.maps.Map(document.getElementById('map-container'), {
center, center,
zoom: 15, zoom: 15,
}); })
// //
const marker = new qq.maps.Marker({ const marker = new qq.maps.Marker({
position: center, position: center,
map: map, map,
}); })
// //
const infoWin = new qq.maps.InfoWindow({ const infoWin = new qq.maps.InfoWindow({
map: map, map,
position: center, position: center,
}); })
infoWin.setContent( infoWin.setContent(
`<div class="detailshow" >${queryParamsNew.name}</div>` `<div class="detailshow" >${queryParamsNew.name}</div>`,
); )
infoWin.open(); infoWin.open()
qq.maps.event.addListener(marker, "click", function () { qq.maps.event.addListener(marker, 'click', () => {
infoWin.open(); infoWin.open()
infoWin.setContent( infoWin.setContent(
`<div class="detailshow" >${queryParamsNew.name}</div>` `<div class="detailshow" >${queryParamsNew.name}</div>`,
); )
infoWin.setPosition(centerLatLng); infoWin.setPosition(centerLatLng)
}); })
}, },
}; }
onMounted(() => { onMounted(() => {
methods.init(props.obj); methods.init(props.obj)
}); })
return { return {
...toRefs(state), ...toRefs(state),
...methods, ...methods,
}; }
}, },
components: {}, }
};
</script> </script>
<template> <template>
<div class="mapmain"> <div class="mapmain">
<div id="map-container" style="width: 100%; height: 100%"></div> <div id="map-container" style="width: 100%; height: 100%" />
</div> </div>
</template> </template>
<style > <style>
.mapmain { .mapmain {
height: 100%; height: 100%;
width: 100%; width: 100%;

@ -277,7 +277,7 @@ function handleOk(item: any) {
v-show="!showSearch" v-show="!showSearch"
ref="AdvanceFilterRef" ref="AdvanceFilterRef"
:type="2" :type="2"
:toolipvalue="'请输入任务id、任务名称、提报人'" toolipvalue="请输入任务id、任务名称、提报人"
@select="filterHandler" @select="filterHandler"
@update:search="setShowSearch(true)" @update:search="setShowSearch(true)"
@show-custom="showModal(CustomFieldModalRef)" @show-custom="showModal(CustomFieldModalRef)"

@ -14,8 +14,8 @@ import { useRoute, useRouter } from 'vue-router'
import { useInfiniteScroll } from '@vueuse/core' import { useInfiniteScroll } from '@vueuse/core'
import BatchModal from '../modal/BatchModal.vue' import BatchModal from '../modal/BatchModal.vue'
import CustomSettingModal from '../modal/CustomSettingModal.vue' import CustomSettingModal from '../modal/CustomSettingModal.vue'
import ImgDetailModal from "../modal/ImgDetailModal.vue" import ImgDetailModal from '../modal/ImgDetailModal.vue'
import MapModal from "../modal/MapModal.vue" import MapModal from '../modal/MapModal.vue'
import PictureTable from './PictureTable.vue' import PictureTable from './PictureTable.vue'
import TaskTable from './TaskTable.vue' import TaskTable from './TaskTable.vue'
import History from './History.vue' import History from './History.vue'
@ -38,11 +38,11 @@ import { hideDownload } from '@/utils/image'
import bgLoading from '@/assets/images/bg-loading.png' import bgLoading from '@/assets/images/bg-loading.png'
import { useKeydown } from '@/hooks/event/useKeydown' import { useKeydown } from '@/hooks/event/useKeydown'
import CheckingTaskModal from '@/views/home/content/modal/CheckingTaskModal.vue' import CheckingTaskModal from '@/views/home/content/modal/CheckingTaskModal.vue'
import {getLastCheckNox,removeCheckDuplicate,getCheckDuplicateStatus,getCheckDuplicateStatusx} from "@/api/home/main" import { getCheckDuplicateStatus, getCheckDuplicateStatusx, getLastCheckNox, removeCheckDuplicate } from '@/api/home/main'
const timer = ref()
const emit = defineEmits(['setAsideItemName']) const emit = defineEmits(['setAsideItemName'])
const HeaderStore=useDataHeaderStore() const timer = ref()
const HeaderStore = useDataHeaderStore()
const router = useRouter() const router = useRouter()
const loading = ref(false) const loading = ref(false)
const batch = ref(false) const batch = ref(false)
@ -51,7 +51,7 @@ const selectItems = ref<any[]>([])
const message = useMessage() const message = useMessage()
const dialog = useDialog() const dialog = useDialog()
const notPassModalRef = ref(null) const notPassModalRef = ref(null)
const MapModalRef= ref(null) const MapModalRef = ref(null)
const batchModalRef: any = ref(null) const batchModalRef: any = ref(null)
const totalCount = ref(0) const totalCount = ref(0)
const taskId: any = ref('') // id const taskId: any = ref('') // id
@ -63,7 +63,7 @@ const route = useRoute()
const isDetail = ref(false) // const isDetail = ref(false) //
const finalStore = useFinal() const finalStore = useFinal()
const imgbigshow = ref(true) const imgbigshow = ref(true)
const imgdetailref=ref(null) const imgdetailref = ref(null)
const checkingTaskModalRef = ref(null) const checkingTaskModalRef = ref(null)
const checkTaskStatus = ref(null) // 1. 2. 3. const checkTaskStatus = ref(null) // 1. 2. 3.
const checkDuplicateNo = ref('') const checkDuplicateNo = ref('')
@ -123,23 +123,24 @@ const fullscreenStylestwo = computed<any>(() => ({
zIndex: isFullScreen.value ? '160' : '', zIndex: isFullScreen.value ? '160' : '',
})) }))
async function init() { async function init() {
let result = await getLastCheckNox() const result = await getLastCheckNox()
if(result.data){ if (result.data) {
const resx = await getCheckDuplicateStatusx({ checkDuplicateNo: result.data })
let resx=await getCheckDuplicateStatusx({checkDuplicateNo:result.data}) if (resx.data.status == 1) {
if(resx.data.status==1){ timer.value = setInterval(async () => {
timer.value = setInterval(async() => { const res = await getCheckDuplicateStatusx({ checkDuplicateNo: result.data })
let res=await getCheckDuplicateStatusx({checkDuplicateNo:result.data}) if (res.data.status != 1) {
if(res.data.status!=1){
if (res.data.status === 2) if (res.data.status === 2)
{ message.success('任务执行完毕,正在刷新数据...') message.success('任务执行完毕,正在刷新数据...')
}else{ message.error('查询异常') else
message.error('查询异常')
}
clearInterval(timer.value) clearInterval(timer.value)
} }
}, 1000)}} }, 1000)
}
}
} }
onMounted(() => { onMounted(() => {
if (route.query.id) { if (route.query.id) {
@ -231,7 +232,6 @@ function validate(items: any[]) {
} }
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
@ -354,7 +354,7 @@ async function handleDragEnd(event, item) {
} }
async function addSuspicious() { async function addSuspicious() {
taskStore.setInFileId(taskDetailInfo.value.ocrPicture) taskStore.setInFileId(taskDetailInfo.value.ocrPicture)
// console.log(taskDetailInfo.value.ocrPicture) // console.log(taskDetailInfo.value.ocrPicture)
if (taskDetailInfo.value.ocrPicture.pictureid) { if (taskDetailInfo.value.ocrPicture.pictureid) {
const res = await dubiousfileyd({ const res = await dubiousfileyd({
pictureid: taskDetailInfo.value.ocrPicture.id, pictureid: taskDetailInfo.value.ocrPicture.id,
@ -566,12 +566,12 @@ function switchBatch() {
function getrowValue(e) { function getrowValue(e) {
if (e.key == 'location') { if (e.key == 'location') {
const modal = unref(MapModalRef)! as any const modal = unref(MapModalRef)! as any
console.log(modal) console.log(modal)
const locationobj = JSON.parse(taskDetailInfo.value.ocrPicture.location) const locationobj = JSON.parse(taskDetailInfo.value.ocrPicture.location)
const lat = locationobj.lat.$numberDecimal const lat = locationobj.lat.$numberDecimal
const lng = locationobj.lng.$numberDecimal const lng = locationobj.lng.$numberDecimal
const name = e.value const name = e.value
modal.showModal({name,lat,lng}) modal.showModal({ name, lat, lng })
} }
} }
function overTaskHandelr(item: any) { function overTaskHandelr(item: any) {
@ -676,22 +676,16 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
function nodrage() { function nodrage() {
message.error('已审批无法移入可疑文件夹中!') message.error('已审批无法移入可疑文件夹中!')
} }
function getDetailImg(event, item){ function getDetailImg(event, item) {
const modal = unref(imgdetailref)! as any const modal = unref(imgdetailref)! as any
modal.showModal(item, packageId.value, taskIndex.value) modal.showModal(item, packageId.value, taskIndex.value)
} }
function passfun(e){ function passfun(e) {
approvalHandler([imgdetailref.value?.taskDetailInfo]) approvalHandler([imgdetailref.value?.taskDetailInfo])
} }
function nopassfun(e){ function nopassfun(e) {
singleRejectHandlex([imgdetailref.value?.taskDetailInfo]) singleRejectHandlex([imgdetailref.value?.taskDetailInfo])
} }
/** /**
* 检查查重状态 * 检查查重状态
@ -1346,9 +1340,8 @@ function cancel() {
<NotPassed ref="notPassModalRef" @success="notPassSuccess" @close="closePassno" /> <NotPassed ref="notPassModalRef" @success="notPassSuccess" @close="closePassno" />
<BatchModal ref="batchModalRef" @reject="rejectHandler" @approval="approvalHandler" /> <BatchModal ref="batchModalRef" @reject="rejectHandler" @approval="approvalHandler" />
<CustomSettingModal ref="CustomSettingModalRef" @on-ok="getDetail" /> <CustomSettingModal ref="CustomSettingModalRef" @on-ok="getDetail" />
<img-detail-modal ref="imgdetailref" @passfun="passfun" @nopassfun="nopassfun"/> <ImgDetailModal ref="imgdetailref" @passfun="passfun" @nopassfun="nopassfun" />
<MapModal ref="MapModalRef"/> <MapModal ref="MapModalRef" />
</div> </div>
</template> </template>

@ -1,7 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { difference } from 'lodash-es' import { chunk, clone, difference } from 'lodash-es'
import { chunk, clone } from 'lodash-es'
import { hideDownload } from '@/utils/image'
import { import {
computed, computed,
defineEmits, defineEmits,
@ -12,6 +11,7 @@ import {
watch, watch,
} from 'vue' } from 'vue'
import { VueDraggable } from 'vue-draggable-plus' import { VueDraggable } from 'vue-draggable-plus'
import { hideDownload } from '@/utils/image'
import { workPackageMap } from '@/config/workorder' import { workPackageMap } from '@/config/workorder'
import { useUser } from '@/store/modules/user' import { useUser } from '@/store/modules/user'
import { TASK_STATUS_OBJ } from '@/enums/index' import { TASK_STATUS_OBJ } from '@/enums/index'
@ -29,18 +29,18 @@ const props = defineProps({
require: true, require: true,
}, },
}) })
const emit = defineEmits(['passfun', 'nopassfun'])
const imageRef = ref<ComponentElRef | null>() const imageRef = ref<ComponentElRef | null>()
const show = ref(false) const show = ref(false)
const detailobj=ref(null) const detailobj = ref(null)
const taskDetailInfo = ref<any>({}) const taskDetailInfo = ref<any>({})
const taskTableData = ref<any[]>([]) const taskTableData = ref<any[]>([])
const userStore = useUser() const userStore = useUser()
const emit = defineEmits(['passfun','nopassfun']) async function showModal(item: any, packid, imgid) {
async function showModal(item:any,packid,imgid){
getTableData() getTableData()
taskDetailInfo.value = await getTaskDetailInfo(item.id,packid, imgid) taskDetailInfo.value = await getTaskDetailInfo(item.id, packid, imgid)
detailobj.value=item detailobj.value = item
show.value=true show.value = true
} }
function previewHandler(event: MouseEvent) { function previewHandler(event: MouseEvent) {
event.stopImmediatePropagation() event.stopImmediatePropagation()
@ -93,16 +93,16 @@ async function getTableData() {
taskTableData.value = chunk(listData, 2) taskTableData.value = chunk(listData, 2)
console.log(taskDetailInfo) console.log(taskDetailInfo)
} }
function closeModal(){ function closeModal() {
show.value=false show.value = false
} }
function passfun(e= taskDetailInfo.value ){ function passfun(e = taskDetailInfo.value) {
emit('passfun', e); emit('passfun', e)
// closeModal() // closeModal()
} }
function nopassfun(e= taskDetailInfo.value){ function nopassfun(e = taskDetailInfo.value) {
emit('nopassfun', e); emit('nopassfun', e)
// closeModal() // closeModal()
} }
@ -114,14 +114,15 @@ onUnmounted(() => {
}) })
defineExpose({ defineExpose({
showModal, showModal,
closeModal,passfun,nopassfun,taskDetailInfo closeModal,
passfun,
nopassfun,
taskDetailInfo,
}) })
</script> </script>
<template> <template>
<n-modal v-model:show="show" transform-origin="center"> <n-modal v-model:show="show" transform-origin="center">
<n-card <n-card
class="cardstyle" class="cardstyle"
:bordered="false" :bordered="false"
@ -129,19 +130,22 @@ defineExpose({
role="dialog" role="dialog"
aria-modal="true" aria-modal="true"
> >
<div class="topline"></div> <div class="topline" />
<div class="bottomline" ></div> <div class="bottomline" />
<div class="wrapper"> <div class="wrapper">
<div class="wrapper-title" style="color: #333;font-size:20px">任务ID:{{detailobj.fromTaskName}}</div> <div class="wrapper-title" style="color: #333;font-size:20px">
<div @click="closeModal" class="close"> 任务ID:{{ detailobj.fromTaskName }}
<SvgIcon size="20" class="icon" name="close-none-border" /></div> </div>
<div class="close" @click="closeModal">
<SvgIcon size="20" class="icon" name="close-none-border" />
</div>
</div> </div>
<div style="display:flex;margin-top:25px"> <div style="display:flex;margin-top:25px">
<div <div
class="left" class="left"
:style=" :style="
{ {
backgroundImage: `url(${detailobj?.imgUrl })`, backgroundImage: `url(${detailobj?.imgUrl})`,
} }
" "
@ -223,13 +227,12 @@ defineExpose({
</div> </div>
</div> </div>
<n-divider class="divider-line" /> <n-divider class="divider-line" />
<div :style="{ width: '90%',marginLeft:'16px',marginTop:'-6px' }"> <div :style="{ width: '90%', marginLeft: '16px', marginTop: '-6px' }">
<div <div
v-for="(item, index) in taskTableData" v-for="(item, index) in taskTableData"
:key="index" :key="index"
:style="{ width: '100%', fontWeight: '450', }" :style="{ width: '100%', fontWeight: '450' }"
> >
<div <div
v-if="item[0].label == '拜访终端名称'" v-if="item[0].label == '拜访终端名称'"
:style="{ display: 'flex', height: '100%', width: '100%' }" :style="{ display: 'flex', height: '100%', width: '100%' }"
@ -239,7 +242,7 @@ defineExpose({
width: '115px', width: '115px',
borderRight: '2px solid', borderRight: '2px solid',
marginTop: '4px', marginTop: '4px',
color:'#333333', color: '#333333',
fontWeight: 'bold', fontWeight: 'bold',
}" }"
> >
@ -251,12 +254,14 @@ defineExpose({
fontSize: '16px', fontSize: '16px',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
paddingTop: '2px', paddingTop: '2px',
color:'#333333' , color: '#333333',
fontWeight: 'bold', fontWeight: 'bold',
overflow:'hidden' overflow: 'hidden',
}" }"
> >
<n-ellipsis style="font-weight:550"> {{ item[0].value }}</n-ellipsis> <n-ellipsis style="font-weight:550">
{{ item[0].value }}
</n-ellipsis>
</div> </div>
</div> </div>
@ -285,26 +290,34 @@ defineExpose({
</div> </div>
<n-divider class="divider-line" /> <n-divider class="divider-line" />
<div class="btnlist"> <div class="btnlist">
<n-button type="info" @click="passfun" <n-button
v-if="!(detailobj?.historyStates == 2 || detailobj?.historyStates == 3)" type="info"
style=" style="
width:72px; width:72px;
height:38px; " height:38px; "
v-if="!(detailobj?.historyStates == 2|| detailobj?.historyStates == 3)" > @click="passfun"
>
通过 通过
</n-button> </n-button>
<n-button type="error" @click="nopassfun" <n-button
v-if="!(detailobj?.historyStates == 2 || detailobj?.historyStates == 3)" type="error"
style=" style="
width:72px; width:72px;
height:38px; height:38px;
background-color: #FF4E4F;" background-color: #FF4E4F;"
v-if="!(detailobj?.historyStates == 2|| detailobj?.historyStates == 3)"> @click="nopassfun"
>
不通过 不通过
</n-button> </n-button>
<n-button @click="closeModal" style=" <n-button
style="
width:72px; width:72px;
height:38px; height:38px;
position: absolute; position: absolute;
right: 36px;">取消</n-button> right: 36px;" @click="closeModal"
>
取消
</n-button>
</div> </div>
</n-card> </n-card>
</n-modal> </n-modal>
@ -457,7 +470,6 @@ defineExpose({
::v-deep(.n-divider .n-divider__line){ ::v-deep(.n-divider .n-divider__line){
background-color: #E8E8E8 !important; background-color: #E8E8E8 !important;
} }
.viewlabel { .viewlabel {
margin-top: 10px; margin-top: 10px;

@ -10,9 +10,9 @@ import {
watch, watch,
} from 'vue' } from 'vue'
import { VueDraggable } from 'vue-draggable-plus' import { VueDraggable } from 'vue-draggable-plus'
import MapDetail from '../../map/index.vue'
import { workPackageMap } from '@/config/workorder' import { workPackageMap } from '@/config/workorder'
import { useKeydown } from '@/hooks/event/useKeydown' import { useKeydown } from '@/hooks/event/useKeydown'
import MapDetail from "../../map/index.vue"
const props = defineProps({ const props = defineProps({
reviewType: { reviewType: {
@ -22,22 +22,18 @@ const props = defineProps({
}, },
}) })
const show = ref(false) const show = ref(false)
const detailobj=ref(null) const detailobj = ref(null)
const objdetail=ref({}) const objdetail = ref({})
async function showModal(item){
objdetail.value=item
show.value=true
async function showModal(item) {
objdetail.value = item
show.value = true
} }
function closeModal() {
show.value = false
function closeModal(){
show.value=false
} }
onMounted(async () => { onMounted(async () => {
}) })
@ -48,12 +44,10 @@ defineExpose({
showModal, showModal,
closeModal, closeModal,
}) })
</script> </script>
<template> <template>
<n-modal v-model:show="show" transform-origin="center" > <n-modal v-model:show="show" transform-origin="center">
<n-card <n-card
class="cardstyle" class="cardstyle"
:bordered="false" :bordered="false"
@ -62,14 +56,18 @@ defineExpose({
aria-modal="true" aria-modal="true"
> >
<div class="wrapper"> <div class="wrapper">
<div class="wrapper-title" style="color: #333;font-weight:550;font-size:18px">定位信息</div> <div class="wrapper-title" style="color: #333;font-weight:550;font-size:18px">
<div @click="closeModal" class="close"> 定位信息
<SvgIcon size="20" class="icon" name="close-none-border" /></div> </div>
<div class="close" @click="closeModal">
<SvgIcon size="20" class="icon" name="close-none-border" />
</div> </div>
<div class="topline"></div> </div>
<div class="topline" />
<div class="mapmain"> <div class="mapmain">
<div id="map-container" style="width: 100%; height: 100%"><MapDetail :obj="objdetail"/></div> <div id="map-container" style="width: 100%; height: 100%">
<MapDetail :obj="objdetail" />
</div>
</div> </div>
</n-card> </n-card>
</n-modal> </n-modal>

@ -207,7 +207,6 @@ if (searchContent) {
<span style="margin-left: 8px; color: #333333">所有任务包</span> <span style="margin-left: 8px; color: #333333">所有任务包</span>
</div> </div>
<div class="right"> <div class="right">
<SvgIcon <SvgIcon
style="cursor: pointer; margin-left: 10px" style="cursor: pointer; margin-left: 10px"
size="18" size="18"

@ -31,7 +31,7 @@ import bgLoading from '@/assets/images/bg-loading.png'
import { useKeydown } from '@/hooks/event/useKeydown' import { useKeydown } from '@/hooks/event/useKeydown'
import { useDataHeaderStore } from '@/store/modules/DataHeader' import { useDataHeaderStore } from '@/store/modules/DataHeader'
import CheckingTaskModal from '@/views/home/content/modal/CheckingTaskModal.vue' import CheckingTaskModal from '@/views/home/content/modal/CheckingTaskModal.vue'
import {getLastCheckNox,removeCheckDuplicate,getCheckDuplicateStatus,getCheckDuplicateStatusx} from "@/api/home/main" import { getCheckDuplicateStatus, getCheckDuplicateStatusx, getLastCheckNox, removeCheckDuplicate } from '@/api/home/main'
const batch = ref(false) // const batch = ref(false) //
const selectItems = ref<any[]>([]) const selectItems = ref<any[]>([])
@ -42,7 +42,7 @@ let _imagesload: any
const bgLoadingImg = ref(bgLoading) const bgLoadingImg = ref(bgLoading)
const imgbigshow = ref(true) const imgbigshow = ref(true)
const isInitLoading = ref(0) const isInitLoading = ref(0)
const haeaderstore=useDataHeaderStore() const haeaderstore = useDataHeaderStore()
const checkingTaskModalRef = ref(null) const checkingTaskModalRef = ref(null)
const checkTaskStatus = ref(null) // 1. 2. 3. const checkTaskStatus = ref(null) // 1. 2. 3.
const checkDuplicateNo = ref('') const checkDuplicateNo = ref('')
@ -318,7 +318,6 @@ function leaveTaskHandler() {
overTask.value = null overTask.value = null
} }
function onEsc(event: KeyboardEvent) { function onEsc(event: KeyboardEvent) {
const eles = ['INPUT', 'TEXTAREA'] const eles = ['INPUT', 'TEXTAREA']
const keys = ['KeyC', 'KeyP', 'KeyX'] const keys = ['KeyC', 'KeyP', 'KeyX']
const code = event.code const code = event.code
@ -381,23 +380,24 @@ useKeydown('k k', () => {
useKeydown('right', forwardHandler) useKeydown('right', forwardHandler)
useKeydown('left', backHandler) useKeydown('left', backHandler)
async function init() { async function init() {
let result = await getLastCheckNox() const result = await getLastCheckNox()
if(result.data){ if (result.data) {
const resx = await getCheckDuplicateStatusx({ checkDuplicateNo: result.data })
let resx=await getCheckDuplicateStatusx({checkDuplicateNo:result.data}) if (resx.data.status == 1) {
if(resx.data.status==1){ timer.value = setInterval(async () => {
timer.value = setInterval(async() => { const res = await getCheckDuplicateStatusx({ checkDuplicateNo: result.data })
let res=await getCheckDuplicateStatusx({checkDuplicateNo:result.data}) if (res.data.status != 1) {
if(res.data.status!=1){
if (res.data.status === 2) if (res.data.status === 2)
{ message.success('任务执行完毕,正在刷新数据...') message.success('任务执行完毕,正在刷新数据...')
}else{ message.error('查询异常') else
message.error('查询异常')
}
clearInterval(timer.value) clearInterval(timer.value)
} }
}, 1000)}} }, 1000)
}
}
} }
onUnmounted(() => { onUnmounted(() => {
workStore.reset() workStore.reset()
@ -515,11 +515,9 @@ function handleApproveMainImage(items?: any) {
audit(param).then(async (res) => { audit(param).then(async (res) => {
const { code } = res const { code } = res
if (code === 'OK') { if (code === 'OK') {
message.info(res.message) message.info(res.message)
const packageid = workStore.getActiveId const packageid = workStore.getActiveId
taskDetailInfo.value = await getTaskDetailInfo(packageid) taskDetailInfo.value = await getTaskDetailInfo(packageid)
} }
else { else {
message.error(res.message) message.error(res.message)
@ -591,7 +589,6 @@ function doAudit(param: any) {
emitter.emit('refresh') emitter.emit('refresh')
refreshHandler() refreshHandler()
haeaderstore.setDataConfig(true) haeaderstore.setDataConfig(true)
} }
else { else {
message.error(res.message) message.error(res.message)
@ -812,7 +809,7 @@ defineExpose({
<div <div
v-show="overTask && overTask.id === taskDetailInfo.id" v-show="overTask && overTask.id === taskDetailInfo.id"
class="action" class="action"
:style="taskDetailInfo?.historyStates === 2||taskDetailInfo?.historyStates ===3?'background:transparent':''" :style="taskDetailInfo?.historyStates === 2 || taskDetailInfo?.historyStates === 3 ? 'background:transparent' : ''"
@click.stop="hideAction" @click.stop="hideAction"
> >
<SvgIcon <SvgIcon
@ -984,8 +981,10 @@ defineExpose({
<SvgIcon name="no-pass-icon" style="width: 52; height: 24px" /> <SvgIcon name="no-pass-icon" style="width: 52; height: 24px" />
</div> </div>
<div v-show="overTask && overTask.id === item.id" class="action" <div
:style="item?.historyStates === 2||item?.historyStates ===3?'background:transparent':''"> v-show="overTask && overTask.id === item.id" class="action"
:style="item?.historyStates === 2 || item?.historyStates === 3 ? 'background:transparent' : ''"
>
<SvgIcon <SvgIcon
v-if="item.historyStates === 1" v-if="item.historyStates === 1"
@ -1029,12 +1028,10 @@ defineExpose({
@show="onRejectDialog" @show="onRejectDialog"
@success="reloadDetailInfo" @success="reloadDetailInfo"
/> />
</div> </div>
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.fullscreen-container { .fullscreen-container {
/* 可添加其他样式 */ /* 可添加其他样式 */
width: 100vw; width: 100vw;
@ -1550,7 +1547,8 @@ defineExpose({
margin-bottom: 12px; margin-bottom: 12px;
} }
</style> </style>
<style >
<style>
.n-back-top{ .n-back-top{
z-index: 5 !important; z-index: 5 !important;
} }

@ -21,7 +21,7 @@ function ApprovalOver(packageId) {
</div> </div>
<div class="main"> <div class="main">
<!-- 侧边 --> <!-- 侧边 -->
<Aside @approval-over="ApprovalOver" style="margin-right:16px"/> <Aside style="margin-right:16px" @approval-over="ApprovalOver" />
<!-- 内容 --> <!-- 内容 -->
<Content ref="contentRef" /> <Content ref="contentRef" />

@ -1,54 +1,53 @@
<script lang="ts" setup> <script lang="ts" setup>
import { nextTick, onDeactivated, onMounted, reactive, ref, toRefs } from "vue"; import { nextTick, onDeactivated, onMounted, reactive, ref, toRefs } from 'vue'
import { format } from "date-fns"; import { format } from 'date-fns'
import { NButton, NDataTable, useDialog, useMessage } from "naive-ui"; import { NButton, NDataTable, useDialog, useMessage } from 'naive-ui'
import { aiApprovaltools, aiApprovaltoolsClearmark, setTF } from "@/api/work/work"; import { aiApprovaltools, aiApprovaltoolsClearmark, setTF } from '@/api/work/work'
import { audit } from "@/api/task/task"; import { audit } from '@/api/task/task'
import { getToolsCount } from "@/api/home/main"; import { getToolsCount } from '@/api/home/main'
import { storage } from "@/utils/Storage"; import { storage } from '@/utils/Storage'
import { CURRENT_USER } from "@/store/mutation-types"; import { CURRENT_USER } from '@/store/mutation-types'
import { useDataHeaderStore } from '@/store/modules/DataHeader' import { useDataHeaderStore } from '@/store/modules/DataHeader'
const emit = defineEmits<{ const emit = defineEmits<{
(e: "reject", params?: any); (e: 'reject', params?: any)
(e: "notPass", params: any); (e: 'notPass', params: any)
}>(); }>()
const message = useMessage() const message = useMessage()
const haeaderstore=useDataHeaderStore() const haeaderstore = useDataHeaderStore()
const dialog = useDialog(); const dialog = useDialog()
const state: any = reactive({ const state: any = reactive({
detail: {}, detail: {},
packageid: "", packageid: '',
}); })
const { detail } = toRefs(state); const { detail } = toRefs(state)
const cardStyle = { const cardStyle = {
width: "450px", 'width': '450px',
"--n-padding-bottom": "10px", '--n-padding-bottom': '10px',
"--n-padding-left": "0px", '--n-padding-left': '0px',
}; }
const show = ref(false); const show = ref(false)
function showModal(id) { function showModal(id) {
state.packageid = id; state.packageid = id
getDetail(id); getDetail(id)
} }
async function getDetail(id) { async function getDetail(id) {
// const userInfo = storage.get(CURRENT_USER); // const userInfo = storage.get(CURRENT_USER);
// const nodeType = userInfo.nodeType; // const nodeType = userInfo.nodeType;
// id = "264627119490116380"; // id = "264627119490116380";
const res = await aiApprovaltools({ taskid: id }); const res = await aiApprovaltools({ taskid: id })
if (res.code === "OK") { if (res.code === 'OK') {
state.detail = res.data; state.detail = res.data
if(Number(res.data.pendingApprovaCount) > 0){ if (Number(res.data.pendingApprovaCount) > 0)
show.value = true; show.value = true
}
} }
} }
const handleReject = async () => { async function handleReject() {
const param = { const param = {
result: false, result: false,
comment: '', comment: '',
@ -59,72 +58,74 @@ const handleReject = async () => {
flowTaskInfoList: state.detail.flowTaskInfoList, flowTaskInfoList: state.detail.flowTaskInfoList,
} }
const res = await audit(param) const res = await audit(param)
if(res.code == 'OK'){ if (res.code == 'OK') {
haeaderstore.setDataConfig(true) haeaderstore.setDataConfig(true)
message.success(res.message) message.success(res.message)
}else{ }
else {
message.error(res.message) message.error(res.message)
} }
emit('reject',state.packageid) emit('reject', state.packageid)
closeModal(); closeModal()
}; }
async function clearMark() { async function clearMark() {
const res = await aiApprovaltoolsClearmark({ taskid: state.packageid }); const res = await aiApprovaltoolsClearmark({ taskid: state.packageid })
if (res.code === "OK") closeModal(); if (res.code === 'OK')
closeModal()
} }
function closeModal() { function closeModal() {
show.value = false; show.value = false
} }
async function reject() { async function reject() {
// emit('reject', { a: 'todo' }) // emit('reject', { a: 'todo' })
// closeModal() // closeModal()
dialog.info({ dialog.info({
title: "确认提示", title: '确认提示',
content: "确认设置成假吗?", content: '确认设置成假吗?',
positiveText: "确定", positiveText: '确定',
negativeText: "取消", negativeText: '取消',
onPositiveClick: async () => { onPositiveClick: async () => {
// TODO // TODO
// const result = await resetApproval() // const result = await resetApproval()
clearMark(); clearMark()
}, },
onNegativeClick: () => {}, onNegativeClick: () => {},
}); })
} }
async function viewRepeat(e: MouseEvent) { async function viewRepeat(e: MouseEvent) {
emit("notPass", { emit('notPass', {
id: state.packageid, id: state.packageid,
detail: state.detail, detail: state.detail,
}); })
e.preventDefault(); e.preventDefault()
closeModal(); closeModal()
} }
const initRem = () => { function initRem() {
const designWidth = 1440; const designWidth = 1440
const rempPx = 16; const rempPx = 16
const scale = window.innerWidth / designWidth; const scale = window.innerWidth / designWidth
document.documentElement.style.fontSize = scale * rempPx + "px"; document.documentElement.style.fontSize = `${scale * rempPx}px`
}; }
onMounted(() => { onMounted(() => {
nextTick(() => { nextTick(() => {
initRem(); initRem()
}); })
window.addEventListener("resize", () => { window.addEventListener('resize', () => {
initRem(); initRem()
}); })
}); })
onDeactivated(() => { onDeactivated(() => {
window.removeEventListener("resize", () => {}); window.removeEventListener('resize', () => {})
}); })
defineExpose({ defineExpose({
showModal, showModal,
}); })
</script> </script>
<template> <template>
@ -134,7 +135,9 @@ defineExpose({
<SvgIcon style="cursor: pointer" name="cut-down" width="32" @click="closeModal" /> <SvgIcon style="cursor: pointer" name="cut-down" width="32" @click="closeModal" />
</div> </div>
<div class="wrapper-hearder"> <div class="wrapper-hearder">
<div class="wrapper-title">智能AI审批工具</div> <div class="wrapper-title">
智能AI审批工具
</div>
<div class="wrapper-mark"> <div class="wrapper-mark">
{{ detail.tenantUserName || "部门信息" }} {{ detail.tenantUserName || "部门信息" }}
</div> </div>
@ -142,14 +145,20 @@ defineExpose({
<div class="wrapper-content"> <div class="wrapper-content">
<div class="item"> <div class="item">
<div class="imgwrapper" /> <div class="imgwrapper" />
<div class="back1">1</div> <div class="back1">
<div class="back2">2</div> 1
</div>
<div class="back2">
2
</div>
<div class="content"> <div class="content">
<div class="task_id">{{ detail.packageName }}</div> <div class="task_id">
{{ detail.packageName }}
</div>
<div class="tag_box"> <div class="tag_box">
<div class="tag_item error"> <div class="tag_item error">
<span style="color: red"><SvgIcon name="error_icon" size="14"/></span> 重复图片({{ <span style="color: red"><SvgIcon name="error_icon" size="14" /></span> 重复图片({{
detail.similarComplete || 0 detail.similarComplete || 0
}}) }})
</div> </div>
@ -161,8 +170,11 @@ defineExpose({
</div> </div>
</div> </div>
<div class="mark_text"> <div class="mark_text">
<div style=" width: 100px;"> 智能提示</div> <div style=" width: 100px;">
<div>{{ detail?.similarComplete || 0 }} 张图片相似度为100%重复图片{{ 智能提示
</div>
<div>
{{ detail?.similarComplete || 0 }} 张图片相似度为100%重复图片{{
detail?.passCount || 0 detail?.passCount || 0
}}张审批状态为<span style="color: #02c984">通过</span>剩余{{ }}张审批状态为<span style="color: #02c984">通过</span>剩余{{
detail?.pendingApprovaCount || 0 detail?.pendingApprovaCount || 0

Loading…
Cancel
Save