Merge pull request 'feat: 头部数据对接接口' (#198) from feat/data_header into test

Reviewed-on: #198
pull/199/head
刘释隆 1 year ago
commit f8265a2d26

@ -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
@ -108,7 +118,7 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @param note
* @returns
*/
export async function oneClickCheckTaskPackage(params: Partial<CheckParam> = { search_history: '0' }) {
export async function oneClickCheckTaskPackage(params: Partial<CheckParam> = { search_history: '0' }) {
const notEmptyParams = pickBy(params, notEmpty)
Object.keys(notEmptyParams).forEach((key) => {
@ -131,8 +141,7 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @param note
* @returns
*/
export async function getLastCheckNo() {
export async function getLastCheckNo() {
return http.request({
url: `/ocr/checkDuplicate/getLastCheckNo`,
method: 'get',
@ -144,8 +153,7 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @param note
* @returns
*/
export async function getCheckDuplicateStatus(checkDuplicateNo) {
export async function getCheckDuplicateStatus(checkDuplicateNo) {
return http.request({
url: `/ocr/checkDuplicate/getCheckDuplicateStatus`,
method: 'get',
@ -158,8 +166,7 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @param note
* @returns
*/
export async function removeCheckDuplicate(checkDuplicateNo) {
export async function removeCheckDuplicate(checkDuplicateNo) {
return http.request({
url: `/ocr/checkDuplicate/removeCheckDuplicate`,
method: 'get',
@ -172,12 +179,11 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @param
* @returns
*/
export async function createPackage(params) {
export async function createPackage(params) {
return http.request({
url: `/ocr/ocrTaskPackage/createPackage`,
method: 'post',
params
params,
})
}
/**
@ -185,12 +191,11 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @param
* @returns
*/
export async function deletePackage(params) {
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 = [
{
link: 'count',
title: '任务总数',
count: 6399,
},
{
link: 'wait',
title: '待审批',
count: 6290,
},
{
link: 'done',
title: '已审批',
count: 109,
},
{
link: 'resolve',
title: '通过',
count: 3290,
color: '#03c984',
},
{
link: 'reject',
title: '不通过',
count: 3000,
color: '#ff8b8b',
},
{
link: 'reimg',
title: '图片重复数',
count: 230,
},
{
link: 'breakcount',
title: '小结重复数',
count: 365,
},
]
async function getData() {
const {
data: {
total,
treat,
alreadyApprove,
repeatedNodules,
repeat,
approvedCount,
notGoCount,
},
} = await gettaskToolsCount()
data.value = [
{
link: 'count',
title: '任务总数',
count: total,
},
{
link: 'wait',
title: '待审批',
count: treat,
},
{
link: 'done',
title: '已审批',
count: alreadyApprove,
},
{
link: 'resolve',
title: '通过',
count: approvedCount,
color: '#03c984',
},
{
link: 'reject',
title: '不通过',
count: notGoCount,
color: '#ff8b8b',
},
{
link: 'reimg',
title: '图片重复数',
count: repeat,
},
{
link: 'breakcount',
title: '小结重复数',
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;
@ -121,7 +138,7 @@ const data = [
}
}
}
.settingSvg{
.settingSvg {
width: 1rem !important;
height: 1rem !important;
}

Loading…
Cancel
Save