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

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

Loading…
Cancel
Save