feat: 头部数据对接接口

pull/198/head
刘释隆 1 year ago
parent 0816abc9c7
commit ed94b40c36

@ -5,6 +5,17 @@ import { http } from '@/utils/http/axios'
import { pickBy } from 'lodash-es'
import type { CheckParam, PageParam, QueryPictureParam, UploadParam } from '/#/api'
/**
*
* @returns
*/
export async function gettaskToolsCount(): Promise<any> {
return await http.request({
url: `/ocr/aitools/toolsTaskApprovalCount`,
method: 'get',
})
}
/**
*
* @param params
@ -79,7 +90,6 @@ export async function getToolsCount() {
})
}
/**
*
* @param note
@ -132,7 +142,6 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @returns
*/
export async function getLastCheckNo() {
return http.request({
url: `/ocr/checkDuplicate/getLastCheckNo`,
method: 'get',
@ -145,7 +154,6 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @returns
*/
export async function getCheckDuplicateStatus(checkDuplicateNo) {
return http.request({
url: `/ocr/checkDuplicate/getCheckDuplicateStatus`,
method: 'get',
@ -159,7 +167,6 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @returns
*/
export async function removeCheckDuplicate(checkDuplicateNo) {
return http.request({
url: `/ocr/checkDuplicate/removeCheckDuplicate`,
method: 'get',
@ -173,11 +180,10 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @returns
*/
export async function createPackage(params) {
return http.request({
url: `/ocr/ocrTaskPackage/createPackage`,
method: 'post',
params
params,
})
}
/**
@ -186,11 +192,10 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @returns
*/
export async function deletePackage(params) {
return http.request({
url: `/ocr/ocrTaskPackage/deletePackage`,
method: 'get',
params
params,
})
}
/**
@ -270,10 +275,9 @@ export async function getPictureList(params: any): Promise<any> {
* @returns
*/
export async function getFilterList(params) {
return http.request({
url: `/ocr/ocrUsersearch/querySearchCondition`,
method: 'get',
params
params,
})
}

@ -1,5 +1,6 @@
<script lang="ts" setup>
import { defineProps, onMounted } from 'vue'
import { defineProps, onMounted, ref } from 'vue'
import { gettaskToolsCount } from '@/api/home/main'
defineProps({
hasColor: {
@ -7,6 +8,9 @@ defineProps({
default: () => false,
},
})
const data = ref()
function initRem() {
const designWidth = 1440
const rempPx = 16
@ -15,47 +19,60 @@ function initRem() {
}
onMounted(() => {
initRem()
getData()
})
const data = [
async function getData() {
const {
data: {
total,
treat,
alreadyApprove,
repeatedNodules,
repeat,
approvedCount,
notGoCount,
},
} = await gettaskToolsCount()
data.value = [
{
link: 'count',
title: '任务总数',
count: 6399,
count: total,
},
{
link: 'wait',
title: '待审批',
count: 6290,
count: treat,
},
{
link: 'done',
title: '已审批',
count: 109,
count: alreadyApprove,
},
{
link: 'resolve',
title: '通过',
count: 3290,
count: approvedCount,
color: '#03c984',
},
{
link: 'reject',
title: '不通过',
count: 3000,
count: notGoCount,
color: '#ff8b8b',
},
{
link: 'reimg',
title: '图片重复数',
count: 230,
count: repeat,
},
{
link: 'breakcount',
title: '小结重复数',
count: 365,
count: repeatedNodules,
},
]
}
</script>
<template>
@ -96,7 +113,7 @@ const data = [
height: 2.75rem !important;
}
.data_wrap {
margin-left: .8125rem;
margin-left: 0.8125rem;
.data_title {
font-size: 1.125rem;
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold;
@ -109,7 +126,7 @@ const data = [
}
.data_content {
opacity: 0.6;
font-size: .75rem;
font-size: 0.75rem;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 500;
text-align: center;

Loading…
Cancel
Save