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 },
})
const { data: { records, pages, total } } = res
const { data: { records, pages, total, current } } = res
return {
pageCount: pages,
data: records,
total,
current,
}
}
/**
@ -288,11 +289,11 @@ export async function getFilterList(params) {
* @param
* @returns
*/
export async function getLastCheckNox() {
export async function getLastCheckNox() {
return http.request({
url: `/ocr/checkDuplicate/getLastCheckNo`,
method: 'get',
})
}
@ -301,10 +302,10 @@ export async function getFilterList(params) {
* @param
* @returns
*/
export async function getCheckDuplicateStatusx(params) {
export async function getCheckDuplicateStatusx(params) {
return http.request({
url: `/ocr/checkDuplicate/getCheckDuplicateStatus`,
method: 'get',
params
params,
})
}
}

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

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

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

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

@ -38,7 +38,7 @@ const izstatusList = ref([])
const dialog = useDialog()
const checkedRowKeys = ref([])
const router = useRouter()
const haeaderstore=useDataHeaderStore()
const haeaderstore = useDataHeaderStore()
onBeforeMount(() => {
dicStore.fetchizstatusListt()
@ -330,11 +330,10 @@ function doAudit(param: any) {
audit(param).then((res) => {
const { code } = res
if (code === 'OK') {
message.success(res.message)
reload()
haeaderstore.setDataConfig(true)
}
}
else { message.error(res.message) }
})
},
@ -364,7 +363,7 @@ function reload() {
selectionIds.value = []
checkedRowKeys.value = []
query(pagination.page, pagination.pageSize)
haeaderstore.setDataConfig(true)
haeaderstore.setDataConfig(true)
}
function goDetail(row) {

@ -61,7 +61,7 @@ const emit = defineEmits(['changeShow'])
function changeContent() {
emit('changeShow')
}
const headerref=ref(null)
const headerref = ref(null)
const checkedRowKeys = ref([])
const dicStore = useDictionary()
const izstatusList = ref([])
@ -88,7 +88,7 @@ const actionsColumns = {
},
}
const columnsRef = ref<DataTableColumns<RowData>>([])
const haeaderstore=useDataHeaderStore()
const haeaderstore = useDataHeaderStore()
async function getColumns() {
columnsRef.value = [
@ -145,7 +145,7 @@ async function getColumns() {
return v
})
}
columnsRef.value.push(actionsColumns as any)
formatColumns()
}
@ -720,7 +720,7 @@ function rejectHandler(list) {
//
function doAudit(param: any) {
const modal = unref(headerref)! as any
const modal = unref(headerref)! as any
dialog.info({
title: '确认提示',
content: '确认给该任务审批为【通过】吗?',
@ -730,10 +730,9 @@ function doAudit(param: any) {
audit(param).then((res) => {
const { code } = res
if (code === 'OK') {
message.success(res.message)
reload()
modal.getData()
modal.getData()
// haeaderstore.setDataConfig(true)
}
else {
@ -751,7 +750,7 @@ function switchBatch() {
}
function reload() {
const modal = unref(headerref)! as any
const modal = unref(headerref)! as any
selectionIds.value = []
checkedRowKeys.value = []
@ -759,8 +758,8 @@ function reload() {
tableRef.value?.pagination,
) as PaginationProps
query(page!, pageSize!, {}, props.taskvalue)
modal.getData()
//haeaderstore.setDataConfig(true)
modal.getData()
// haeaderstore.setDataConfig(true)
}
watch(
@ -888,8 +887,8 @@ defineExpose({
<div v-show="!showActions" style="display: flex; align-items: center">
<div class="btn">
<!-- <SvgIcon style="margin-right: 6px" size="22" name="batch" />
批量审批-->
<!-- <SvgIcon style="margin-right: 6px" size="22" name="batch" />
批量审批 -->
</div>
</div>
<div v-show="showActions" class="batch">
@ -908,7 +907,7 @@ defineExpose({
>
<SvgIcon size="24" name="vs" />
<img
style="margin-right: 5px;"
style="margin-right: 5px;"
class="btn-approval"
src="@/assets/images/task/btn-pass.png"
alt=""
@ -953,9 +952,11 @@ defineExpose({
<div class="header_data">
<DataHeader ref="headerref" :has-color="true" />
</div>
<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
style="cursor: pointer"
size="18"
@ -963,7 +964,7 @@ defineExpose({
@click="showModal(customTabelRef)"
/>
</div>
<div class="wrapper-content">
<NDataTable
id="table"
@ -1085,7 +1086,7 @@ defineExpose({
align-items: center;
justify-content: center;
color: #fff;
margin-right: 16px;
margin-right: 16px;
cursor: pointer;
}

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

@ -23,9 +23,9 @@ const props = defineProps({
},
})
const emit = defineEmits(['changeShow'])
const aa=ref(true)
const haeaderstore=useDataHeaderStore()
const headerref=ref(null)
const aa = ref(true)
const haeaderstore = useDataHeaderStore()
const headerref = ref(null)
const dialog = useDialog()
const message = useMessage()
const router = useRouter()
@ -312,32 +312,28 @@ function doAudit(param: any, row: any) {
positiveText: '确定',
negativeText: '取消',
onPositiveClick: () => {
audit(param).then((res) => {
audit(param).then((res) => {
const { code } = res
if (code === 'OK') {
message.success(res.message)
// changecardstatus(3, row);
initData(1, 20, {}, props.taskvalue)
num = 1
reload()
reload()
selectionIds.value = []
modal.getData()
modal.getData()
}
else {
message.error(res.message)
selectionIds.value = []
}
})
// alert("X")
// alert("X")
// haeaderstore.setDataConfig(true)
// haeaderstore.setDataConfig(true)
},
onNegativeClick: () => {},
})
}
//
function singleApproval(row) {
@ -489,11 +485,9 @@ function notpass() {
const modal = unref(headerref)! as any
initData(1, 20, {}, props.taskvalue)
selectionIds.value = []
selectionIds.value = []
modal.getData()
// haeaderstore.setDataConfig(true)
}
watch(
() => finalStore.asideValue,
@ -534,8 +528,8 @@ defineExpose({
<div v-show="!showActions" style="display: flex; align-items: center">
<div class="btn">
<!-- <SvgIcon style="margin-right: 6px" size="22" name="batch" />
批量审批-->
<!-- <SvgIcon style="margin-right: 6px" size="22" name="batch" />
批量审批 -->
</div>
</div>
<div v-show="showActions" class="batch">
@ -554,7 +548,7 @@ defineExpose({
>
<SvgIcon size="24" name="vs" />
<img
style="margin-right:16px"
style="margin-right:16px"
class="btn-approval"
src="@/assets/images/task/btn-pass.png"
alt=""
@ -597,7 +591,7 @@ defineExpose({
</div>
<div class="header_data">
<DataHeader ref="headerref" :has-color="true" v-if="aa"/>
<DataHeader v-if="aa" ref="headerref" :has-color="true" />
</div>
<div class="wrapper-settings">
<div>
@ -818,7 +812,7 @@ defineExpose({
align-items: center;
justify-content: center;
color: #fff;
margin-right: 16px;
margin-right: 16px;
cursor: pointer;
}

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { ref , onMounted} from 'vue'
import { onMounted, ref } from 'vue'
import Aside from './aside/Aside.vue'
import Content from './content/Content.vue'
import ListContent from './content/ListContent.vue'
@ -11,29 +11,28 @@ defineOptions({
const showList = ref(true)
const contentRef: any = ref(null)
const ListRef: any = ref(null)
const asideref=ref(null)
const taskvalue=ref("")
const asideref = ref(null)
const taskvalue = ref('')
function inputChange(keyword) {
if(asideref.value?.showSearch){
taskvalue.value=keyword
}else{
taskvalue.value=""
}
if (ListRef.value!=null) {
ListRef.value.initData(1,20,{},keyword);
} else {
contentRef.value.filterTableData(keyword);
}
if (asideref.value?.showSearch)
taskvalue.value = keyword
else
taskvalue.value = ''
if (ListRef.value != null)
ListRef.value.initData(1, 20, {}, keyword)
else
contentRef.value.filterTableData(keyword)
}
onMounted(()=>{
const searchParams = new URLSearchParams(window.location.search);
const type = searchParams.get('type');
if(type=='table'){
showList.value=false
}else{
showList.value=true
}
onMounted(() => {
const searchParams = new URLSearchParams(window.location.search)
const type = searchParams.get('type')
if (type == 'table')
showList.value = false
else
showList.value = true
})
</script>
@ -44,10 +43,10 @@ onMounted(()=>{
<!-- 任务管理 -->
<!-- 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 />

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

@ -16,11 +16,11 @@ const props = defineProps({
default: 0,
required: true,
},
toolipvalue:{
type: String,
default: "",
toolipvalue: {
type: String,
default: '',
required: true,
}
},
})
const emit = defineEmits<{
(e: 'show-filter'): void
@ -411,14 +411,13 @@ defineExpose({
</n-popover>
</div>
<div class="wrapper-right">
<SvgIcon
style="display: block; cursor: pointer"
size="18"
name="magnifying-1"
@click="emit('update:search')"
/>
<SvgIcon
style="display: block; cursor: pointer; margin-left: 10px"
size="18"

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

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

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

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

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

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

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

@ -14,8 +14,8 @@ import { useRoute, useRouter } from 'vue-router'
import { useInfiniteScroll } from '@vueuse/core'
import BatchModal from '../modal/BatchModal.vue'
import CustomSettingModal from '../modal/CustomSettingModal.vue'
import ImgDetailModal from "../modal/ImgDetailModal.vue"
import MapModal from "../modal/MapModal.vue"
import ImgDetailModal from '../modal/ImgDetailModal.vue'
import MapModal from '../modal/MapModal.vue'
import PictureTable from './PictureTable.vue'
import TaskTable from './TaskTable.vue'
import History from './History.vue'
@ -38,11 +38,11 @@ import { hideDownload } from '@/utils/image'
import bgLoading from '@/assets/images/bg-loading.png'
import { useKeydown } from '@/hooks/event/useKeydown'
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 HeaderStore=useDataHeaderStore()
const timer = ref()
const HeaderStore = useDataHeaderStore()
const router = useRouter()
const loading = ref(false)
const batch = ref(false)
@ -51,7 +51,7 @@ const selectItems = ref<any[]>([])
const message = useMessage()
const dialog = useDialog()
const notPassModalRef = ref(null)
const MapModalRef= ref(null)
const MapModalRef = ref(null)
const batchModalRef: any = ref(null)
const totalCount = ref(0)
const taskId: any = ref('') // id
@ -63,7 +63,7 @@ const route = useRoute()
const isDetail = ref(false) //
const finalStore = useFinal()
const imgbigshow = ref(true)
const imgdetailref=ref(null)
const imgdetailref = ref(null)
const checkingTaskModalRef = ref(null)
const checkTaskStatus = ref(null) // 1. 2. 3.
const checkDuplicateNo = ref('')
@ -122,25 +122,26 @@ const fullscreenStylestwo = computed<any>(() => ({
left: isFullScreen.value ? '0' : '',
zIndex: isFullScreen.value ? '160' : '',
}))
async function init() {
let result = await getLastCheckNox()
if(result.data){
let resx=await getCheckDuplicateStatusx({checkDuplicateNo:result.data})
if(resx.data.status==1){
timer.value = setInterval(async() => {
let res=await getCheckDuplicateStatusx({checkDuplicateNo:result.data})
if(res.data.status!=1){
if (res.data.status === 2)
{ message.success('任务执行完毕,正在刷新数据...')
}else{ message.error('查询异常')
}
clearInterval(timer.value)
async function init() {
const result = await getLastCheckNox()
if (result.data) {
const resx = await getCheckDuplicateStatusx({ checkDuplicateNo: result.data })
if (resx.data.status == 1) {
timer.value = setInterval(async () => {
const res = await getCheckDuplicateStatusx({ checkDuplicateNo: result.data })
if (res.data.status != 1) {
if (res.data.status === 2)
message.success('任务执行完毕,正在刷新数据...')
else
message.error('查询异常')
clearInterval(timer.value)
}
}, 1000)
}
}
}, 1000)}}
}
}
onMounted(() => {
if (route.query.id) {
taskId.value = route.query.id
@ -149,8 +150,8 @@ onMounted(() => {
isDetail.value = true
getDetail()
}
init()
window.addEventListener('keydown', onEsc)
init()
window.addEventListener('keydown', onEsc)
})
function changeimgbigshow() {
@ -231,7 +232,6 @@ function validate(items: any[]) {
}
function approvalHandler(items?: any) {
let cloneItem: any
if (batch.value) {
processItems = selectItems.value
@ -305,7 +305,7 @@ function singleRejectHandler() {
function doAudit(param: any) {
const modal = unref(imgdetailref)! as any
audit(param).then((res) => {
const { code } = res
if (code === 'OK') {
@ -313,8 +313,8 @@ function doAudit(param: any) {
setBatch(false)
reloadList(param, '通过')
batchModalRef.value.reload()
modal.closeModal()
HeaderStore.setDataConfig(true)
modal.closeModal()
HeaderStore.setDataConfig(true)
}
})
}
@ -354,7 +354,7 @@ async function handleDragEnd(event, item) {
}
async function addSuspicious() {
taskStore.setInFileId(taskDetailInfo.value.ocrPicture)
// console.log(taskDetailInfo.value.ocrPicture)
// console.log(taskDetailInfo.value.ocrPicture)
if (taskDetailInfo.value.ocrPicture.pictureid) {
const res = await dubiousfileyd({
pictureid: taskDetailInfo.value.ocrPicture.id,
@ -460,13 +460,13 @@ function showActionsModal() {
}
function onEsc(event: KeyboardEvent) {
if (event.code === 'KeyC') {
const modal = unref(MapModalRef)! as any
const modal2 = unref(imgdetailref)! as any
const modal = unref(MapModalRef)! as any
const modal2 = unref(imgdetailref)! as any
modal?.closeModal()
modal2?.closeModal()
imgbigshow.value = true
modal2?.closeModal()
imgbigshow.value = true
isFullScreen.value = false
isFullScreen.value = false
}
}
onUnmounted(() => {
@ -533,8 +533,8 @@ function notPassSuccess(param) {
batchModalRef.value.reload()
reloadList(param, '不通过')
const modal = unref(imgdetailref)! as any
modal.closeModal()
HeaderStore.setDataConfig(true)
modal.closeModal()
HeaderStore.setDataConfig(true)
overTask.value = null
}
@ -565,13 +565,13 @@ function switchBatch() {
function getrowValue(e) {
if (e.key == 'location') {
const modal = unref(MapModalRef)! as any
console.log(modal)
const locationobj = JSON.parse(taskDetailInfo.value.ocrPicture.location)
const modal = unref(MapModalRef)! as any
console.log(modal)
const locationobj = JSON.parse(taskDetailInfo.value.ocrPicture.location)
const lat = locationobj.lat.$numberDecimal
const lng = locationobj.lng.$numberDecimal
const name = e.value
modal.showModal({name,lat,lng})
modal.showModal({ name, lat, lng })
}
}
function overTaskHandelr(item: any) {
@ -676,22 +676,16 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
function nodrage() {
message.error('已审批无法移入可疑文件夹中!')
}
function getDetailImg(event, item){
const modal = unref(imgdetailref)! as any
modal.showModal(item, packageId.value, taskIndex.value)
function getDetailImg(event, item) {
const modal = unref(imgdetailref)! as any
modal.showModal(item, packageId.value, taskIndex.value)
}
function passfun(e){
approvalHandler([imgdetailref.value?.taskDetailInfo])
function passfun(e) {
approvalHandler([imgdetailref.value?.taskDetailInfo])
}
function nopassfun(e){
singleRejectHandlex([imgdetailref.value?.taskDetailInfo])
function nopassfun(e) {
singleRejectHandlex([imgdetailref.value?.taskDetailInfo])
}
/**
* 检查查重状态
@ -868,7 +862,7 @@ function cancel() {
: {
height: '92vh',
flex: 1,
backgroundSize: 'cover',
backgroundSize: 'cover',
backgroundImage: `url(${taskDetailInfo?.ocrPicture?.imgurl ? taskDetailInfo?.ocrPicture?.imgurl : bgLoadingImg})`,
}
: {
@ -1270,7 +1264,7 @@ function cancel() {
item.historyStates === 1 ? handleDragEnd(event, item) : nodrage()
"
@click="getDetailImg(event, item)"
@click="getDetailImg(event, item)"
>
<div
class="img-wrapper"
@ -1346,9 +1340,8 @@ function cancel() {
<NotPassed ref="notPassModalRef" @success="notPassSuccess" @close="closePassno" />
<BatchModal ref="batchModalRef" @reject="rejectHandler" @approval="approvalHandler" />
<CustomSettingModal ref="CustomSettingModalRef" @on-ok="getDetail" />
<img-detail-modal ref="imgdetailref" @passfun="passfun" @nopassfun="nopassfun"/>
<MapModal ref="MapModalRef"/>
<ImgDetailModal ref="imgdetailref" @passfun="passfun" @nopassfun="nopassfun" />
<MapModal ref="MapModalRef" />
</div>
</template>

@ -50,6 +50,6 @@ function setAsideItemName(text) {
flex-direction: row;
box-sizing: border-box;
width: 100%;
}
</style>

@ -1,7 +1,6 @@
<script lang="ts" setup>
import { difference } from 'lodash-es'
import { chunk, clone } from 'lodash-es'
import { hideDownload } from '@/utils/image'
import { chunk, clone, difference } from 'lodash-es'
import {
computed,
defineEmits,
@ -12,6 +11,7 @@ import {
watch,
} from 'vue'
import { VueDraggable } from 'vue-draggable-plus'
import { hideDownload } from '@/utils/image'
import { workPackageMap } from '@/config/workorder'
import { useUser } from '@/store/modules/user'
import { TASK_STATUS_OBJ } from '@/enums/index'
@ -29,18 +29,18 @@ const props = defineProps({
require: true,
},
})
const emit = defineEmits(['passfun', 'nopassfun'])
const imageRef = ref<ComponentElRef | null>()
const show = ref(false)
const detailobj=ref(null)
const detailobj = ref(null)
const taskDetailInfo = ref<any>({})
const taskTableData = ref<any[]>([])
const userStore = useUser()
const emit = defineEmits(['passfun','nopassfun'])
async function showModal(item:any,packid,imgid){
getTableData()
taskDetailInfo.value = await getTaskDetailInfo(item.id,packid, imgid)
detailobj.value=item
show.value=true
async function showModal(item: any, packid, imgid) {
getTableData()
taskDetailInfo.value = await getTaskDetailInfo(item.id, packid, imgid)
detailobj.value = item
show.value = true
}
function previewHandler(event: MouseEvent) {
event.stopImmediatePropagation()
@ -93,35 +93,36 @@ async function getTableData() {
taskTableData.value = chunk(listData, 2)
console.log(taskDetailInfo)
}
function closeModal(){
show.value=false
function closeModal() {
show.value = false
}
function passfun(e= taskDetailInfo.value ){
emit('passfun', e);
function passfun(e = taskDetailInfo.value) {
emit('passfun', e)
// closeModal()
// closeModal()
}
function nopassfun(e= taskDetailInfo.value){
emit('nopassfun', e);
// closeModal()
function nopassfun(e = taskDetailInfo.value) {
emit('nopassfun', e)
// closeModal()
}
onMounted(async () => {
})
onUnmounted(() => {
})
defineExpose({
showModal,
closeModal,passfun,nopassfun,taskDetailInfo
closeModal,
passfun,
nopassfun,
taskDetailInfo,
})
</script>
<template>
<n-modal v-model:show="show" transform-origin="center">
<n-card
class="cardstyle"
:bordered="false"
@ -129,57 +130,60 @@ defineExpose({
role="dialog"
aria-modal="true"
>
<div class="topline"></div>
<div class="bottomline" ></div>
<div class="topline" />
<div class="bottomline" />
<div class="wrapper">
<div class="wrapper-title" style="color: #333;font-size:20px">任务ID:{{detailobj.fromTaskName}}</div>
<div @click="closeModal" class="close">
<SvgIcon size="20" class="icon" name="close-none-border" /></div>
<div class="wrapper-title" style="color: #333;font-size:20px">
任务ID:{{ detailobj.fromTaskName }}
</div>
<div class="close" @click="closeModal">
<SvgIcon size="20" class="icon" name="close-none-border" />
</div>
</div>
<div style="display:flex;margin-top:25px">
<div
class="left"
:style="
{
backgroundImage: `url(${detailobj?.imgUrl })`,
}
"
>
<div class="preview" style="z-index: 5" @click="previewHandler">
<SvgIcon size="16" name="zoom-out" />
</div>
<div class="big-mark" />
<div class="time">
<div class="time-item">
<SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
class="left"
:style="
{
backgroundImage: `url(${detailobj?.imgUrl})`,
}
<span>{{ detailobj?.photoDateTimestamp ?? "- -" }}</span>
"
>
<div class="preview" style="z-index: 5" @click="previewHandler">
<SvgIcon size="16" name="zoom-out" />
</div>
<div class="time-item time-item2">
<SvgIcon class="svg-time" color="#FFF" size="16" name="submit-time" />
<span>{{
detailobj?.submitDateTimestamp
? formatToDateHMS(Number(detailobj.submitDateTimestamp))
: "- -"
}}</span>
<div class="big-mark" />
<div class="time">
<div class="time-item">
<SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
<span>{{ detailobj?.photoDateTimestamp ?? "- -" }}</span>
</div>
<div class="time-item time-item2">
<SvgIcon class="svg-time" color="#FFF" size="16" name="submit-time" />
<span>{{
detailobj?.submitDateTimestamp
? formatToDateHMS(Number(detailobj.submitDateTimestamp))
: "- -"
}}</span>
</div>
</div>
</div>
<div style="display: none">
<n-image
ref="imageRef"
:img-props="{ onClick: hideDownload }"
:src="detailobj?.imgUrl"
/>
<n-image
ref="imageRef"
:img-props="{ onClick: hideDownload }"
:src="detailobj?.imgUrl"
/>
</div>
</div>
</div>
<div
class="right"
>
<n-scrollbar style="max-height: 100%">
<div
style="
<div
class="right"
>
<n-scrollbar style="max-height: 100%">
<div
style="
font-size: 22px;
font-weight: 500;
color: #0d0b22;
@ -188,124 +192,133 @@ defineExpose({
text-overflow: ellipsis;
padding-left: 10px;
"
>
<n-ellipsis style="font-size:22px;font-weight:550">
{{ detailobj.fromTaskName }}
</n-ellipsis>
</div>
<div class="tags">
<div
v-if="detailobj?.historyStates == 1"
class="tag tag-submiting"
>
<n-ellipsis style="font-size:22px;font-weight:550">
{{ detailobj.fromTaskName }}
</n-ellipsis>
待审批
</div>
<div class="tags">
<div
v-if="detailobj?.historyStates == 1"
class="tag tag-submiting"
>
待审批
</div>
<div
v-else-if="
detailobj?.historyStates == 2
|| detailobj?.historyStates == 3
"
class="tag tag-submited"
>
已审批
</div>
<div
v-if="detailobj?.historyStates == 2"
class="tag tag-passed"
>
{{ TASK_STATUS_OBJ[detailobj.historyStates] }}
</div>
<div
v-else-if="taskDetailInfo?.userapprove?.historyStates == 3"
class="tag tag-not-passed"
>
{{ TASK_STATUS_OBJ[detailobj?.historyStates] }}
</div>
<div
v-else-if="
detailobj?.historyStates == 2
|| detailobj?.historyStates == 3
"
class="tag tag-submited"
>
已审批
</div>
<div
v-if="detailobj?.historyStates == 2"
class="tag tag-passed"
>
{{ TASK_STATUS_OBJ[detailobj.historyStates] }}
</div>
<n-divider class="divider-line" />
<div :style="{ width: '90%',marginLeft:'16px',marginTop:'-6px' }">
<div
v-for="(item, index) in taskTableData"
:key="index"
:style="{ width: '100%', fontWeight: '450', }"
<div
v-else-if="taskDetailInfo?.userapprove?.historyStates == 3"
class="tag tag-not-passed"
>
{{ TASK_STATUS_OBJ[detailobj?.historyStates] }}
</div>
</div>
<n-divider class="divider-line" />
<div :style="{ width: '90%', marginLeft: '16px', marginTop: '-6px' }">
<div
v-for="(item, index) in taskTableData"
:key="index"
:style="{ width: '100%', fontWeight: '450' }"
>
<div
v-if="item[0].label == '拜访终端名称'"
:style="{ display: 'flex', height: '100%', width: '100%' }"
>
<div
v-if="item[0].label == '拜访终端名称'"
:style="{ display: 'flex', height: '100%', width: '100%' }"
:style="{
width: '115px',
borderRight: '2px solid',
marginTop: '4px',
color: '#333333',
fontWeight: 'bold',
}"
>
<div
:style="{
width: '115px',
borderRight: '2px solid',
marginTop: '4px',
color:'#333333',
fontWeight: 'bold',
}"
>
{{ item[0].label }}
</div>
<div
:style="{
marginLeft: '15px',
fontSize: '16px',
textOverflow: 'ellipsis',
paddingTop: '2px',
color:'#333333' ,
fontWeight: 'bold',
overflow:'hidden'
}"
>
<n-ellipsis style="font-weight:550"> {{ item[0].value }}</n-ellipsis>
</div>
</div>
<div v-if="!(item[0].label == '拜访终端名称')" class="viewlabel">
{{ item[0].label }}
</div>
<div v-if="!(item[0].label == '拜访终端名称')" class="viewvalue">
{{ item[0].value }}
</div>
<div
v-if="item[1] && !(item[1].label == '拜访终端名称')"
class="viewlabel"
:style="{
marginLeft: '15px',
fontSize: '16px',
textOverflow: 'ellipsis',
paddingTop: '2px',
color: '#333333',
fontWeight: 'bold',
overflow: 'hidden',
}"
>
{{ item[1].label }}
</div>
<div
v-if="item[1] && !(item[1].label == '拜访终端名称')"
class="viewvalue"
>
{{ item[1].value }}
<n-ellipsis style="font-weight:550">
{{ item[0].value }}
</n-ellipsis>
</div>
</div>
<div v-if="!(item[0].label == '拜访终端名称')" class="viewlabel">
{{ item[0].label }}
</div>
<div v-if="!(item[0].label == '拜访终端名称')" class="viewvalue">
{{ item[0].value }}
</div>
<div
v-if="item[1] && !(item[1].label == '拜访终端名称')"
class="viewlabel"
>
{{ item[1].label }}
</div>
<div
v-if="item[1] && !(item[1].label == '拜访终端名称')"
class="viewvalue"
>
{{ item[1].value }}
</div>
</div>
</n-scrollbar>
</div>
</div>
</n-scrollbar>
</div>
</div>
<n-divider class="divider-line" />
<div class="btnlist">
<n-button type="info" @click="passfun"
style="
<n-divider class="divider-line" />
<div class="btnlist">
<n-button
v-if="!(detailobj?.historyStates == 2 || detailobj?.historyStates == 3)" type="info"
style="
width:72px;
height:38px; "
v-if="!(detailobj?.historyStates == 2|| detailobj?.historyStates == 3)" >
通过
</n-button>
<n-button type="error" @click="nopassfun"
style="
@click="passfun"
>
通过
</n-button>
<n-button
v-if="!(detailobj?.historyStates == 2 || detailobj?.historyStates == 3)" type="error"
style="
width:72px;
height:38px;
height:38px;
background-color: #FF4E4F;"
v-if="!(detailobj?.historyStates == 2|| detailobj?.historyStates == 3)">
不通过
</n-button>
<n-button @click="closeModal" style="
@click="nopassfun"
>
不通过
</n-button>
<n-button
style="
width:72px;
height:38px;
height:38px;
position: absolute;
right: 36px;">取消</n-button>
</div>
right: 36px;" @click="closeModal"
>
取消
</n-button>
</div>
</n-card>
</n-modal>
</template>
@ -457,7 +470,6 @@ defineExpose({
::v-deep(.n-divider .n-divider__line){
background-color: #E8E8E8 !important;
}
.viewlabel {
margin-top: 10px;

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

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

@ -31,7 +31,7 @@ import bgLoading from '@/assets/images/bg-loading.png'
import { useKeydown } from '@/hooks/event/useKeydown'
import { useDataHeaderStore } from '@/store/modules/DataHeader'
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 selectItems = ref<any[]>([])
@ -42,7 +42,7 @@ let _imagesload: any
const bgLoadingImg = ref(bgLoading)
const imgbigshow = ref(true)
const isInitLoading = ref(0)
const haeaderstore=useDataHeaderStore()
const haeaderstore = useDataHeaderStore()
const checkingTaskModalRef = ref(null)
const checkTaskStatus = ref(null) // 1. 2. 3.
const checkDuplicateNo = ref('')
@ -318,8 +318,7 @@ function leaveTaskHandler() {
overTask.value = null
}
function onEsc(event: KeyboardEvent) {
const eles = ['INPUT', 'TEXTAREA']
const eles = ['INPUT', 'TEXTAREA']
const keys = ['KeyC', 'KeyP', 'KeyX']
const code = event.code
if (!(event.target instanceof Element))
@ -380,29 +379,30 @@ useKeydown('k k', () => {
})
useKeydown('right', forwardHandler)
useKeydown('left', backHandler)
async function init() {
let result = await getLastCheckNox()
if(result.data){
let resx=await getCheckDuplicateStatusx({checkDuplicateNo:result.data})
if(resx.data.status==1){
timer.value = setInterval(async() => {
let res=await getCheckDuplicateStatusx({checkDuplicateNo:result.data})
if(res.data.status!=1){
if (res.data.status === 2)
{ message.success('任务执行完毕,正在刷新数据...')
}else{ message.error('查询异常')
}
clearInterval(timer.value)
async function init() {
const result = await getLastCheckNox()
if (result.data) {
const resx = await getCheckDuplicateStatusx({ checkDuplicateNo: result.data })
if (resx.data.status == 1) {
timer.value = setInterval(async () => {
const res = await getCheckDuplicateStatusx({ checkDuplicateNo: result.data })
if (res.data.status != 1) {
if (res.data.status === 2)
message.success('任务执行完毕,正在刷新数据...')
else
message.error('查询异常')
clearInterval(timer.value)
}
}, 1000)
}
}
}, 1000)}}
}
}
onUnmounted(() => {
workStore.reset()
document.removeEventListener('keydown', onEsc)
clearInterval(timer.value)
clearInterval(timer.value)
})
onMounted(() => {
document.addEventListener('keydown', onEsc)
@ -468,7 +468,7 @@ function handleRejectMainImage() {
async function reloadDetailInfo() {
const packageid = workStore.getActiveId
taskDetailInfo.value = await getTaskDetailInfo(packageid)
haeaderstore.setDataConfig(true)
haeaderstore.setDataConfig(true)
}
function handleApproveMainImage(items?: any) {
const currentValue = overTask.value || taskDetailInfo.value
@ -515,11 +515,9 @@ function handleApproveMainImage(items?: any) {
audit(param).then(async (res) => {
const { code } = res
if (code === 'OK') {
message.info(res.message)
const packageid = workStore.getActiveId
taskDetailInfo.value = await getTaskDetailInfo(packageid)
}
else {
message.error(res.message)
@ -590,8 +588,7 @@ function doAudit(param: any) {
message.info(res.message)
emitter.emit('refresh')
refreshHandler()
haeaderstore.setDataConfig(true)
haeaderstore.setDataConfig(true)
}
else {
message.error(res.message)
@ -602,7 +599,7 @@ function doAudit(param: any) {
function reloadList() {
setBatch(false)
refreshHandler()
haeaderstore.setDataConfig(true)
haeaderstore.setDataConfig(true)
}
function handleRejectdubiousfileyd(pictureid) {
dialog.info({
@ -722,7 +719,7 @@ defineExpose({
'background-image': `url(${taskDetailInfo?.imgurl})`,
'flex': imgbigshow ? '0.6' : '0.98',
'height': imgbigshow ? ' 100%' : '80vh',
'background-size': imgbigshow ? 'auto 100%' : 'cover',
'background-size': imgbigshow ? 'auto 100%' : 'cover',
}"
@mouseover="showAction"
@ -812,12 +809,12 @@ defineExpose({
<div
v-show="overTask && overTask.id === taskDetailInfo.id"
class="action"
:style="taskDetailInfo?.historyStates === 2||taskDetailInfo?.historyStates ===3?'background:transparent':''"
:style="taskDetailInfo?.historyStates === 2 || taskDetailInfo?.historyStates === 3 ? 'background:transparent' : ''"
@click.stop="hideAction"
>
<SvgIcon
v-if="[1].includes(taskDetailInfo.historyStates)"
style="cursor: pointer;"
style="cursor: pointer;"
name="t1"
@click.stop="handleApproveMainImage"
/>
@ -829,7 +826,7 @@ defineExpose({
/>
<SvgIcon
v-if="[1].includes(taskDetailInfo.historyStates)"
style="cursor: pointer; "
style="cursor: pointer; "
name="t9"
@click.stop="handleRejectdubiousfileyd(taskDetailInfo.id)"
/>
@ -984,10 +981,12 @@ defineExpose({
<SvgIcon name="no-pass-icon" style="width: 52; height: 24px" />
</div>
<div v-show="overTask && overTask.id === item.id" class="action"
:style="item?.historyStates === 2||item?.historyStates ===3?'background:transparent':''">
<div
v-show="overTask && overTask.id === item.id" class="action"
:style="item?.historyStates === 2 || item?.historyStates === 3 ? 'background:transparent' : ''"
>
<SvgIcon
v-if="item.historyStates === 1"
style="cursor: pointer;width:50px;height:50px"
name="t1"
@ -1029,12 +1028,10 @@ defineExpose({
@show="onRejectDialog"
@success="reloadDetailInfo"
/>
</div>
</template>
<style lang="less" scoped>
.fullscreen-container {
/* 可添加其他样式 */
width: 100vw;
@ -1550,8 +1547,9 @@ defineExpose({
margin-bottom: 12px;
}
</style>
<style >
<style>
.n-back-top{
z-index: 5 !important;
}
</style>
</style>

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

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

Loading…
Cancel
Save