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
@ -108,7 +118,7 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @param note * @param note
* @returns * @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) const notEmptyParams = pickBy(params, notEmpty)
Object.keys(notEmptyParams).forEach((key) => { Object.keys(notEmptyParams).forEach((key) => {
@ -131,8 +141,7 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @param note * @param note
* @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',
@ -144,8 +153,7 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @param note * @param note
* @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',
@ -158,8 +166,7 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @param note * @param note
* @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',
@ -169,33 +176,31 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
} }
/** /**
* *
* @param * @param
* @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,
}) })
} }
/** /**
* *
* @param * @param
* @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,
}) })
} }
/** /**
* *
* @param * @param
* @returns * @returns
*/ */
export async function queryPageListByCheckNo(params: any): Promise<any> { export async function queryPageListByCheckNo(params: any): Promise<any> {
@ -266,14 +271,13 @@ export async function getPictureList(params: any): Promise<any> {
/** /**
* *
* @param * @param
* @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: {
link: 'count', total,
title: '任务总数', treat,
count: 6399, alreadyApprove,
}, repeatedNodules,
{ repeat,
link: 'wait', approvedCount,
title: '待审批', notGoCount,
count: 6290, },
}, } = await gettaskToolsCount()
{ data.value = [
link: 'done', {
title: '已审批', link: 'count',
count: 109, title: '任务总数',
}, count: total,
{ },
link: 'resolve', {
title: '通过', link: 'wait',
count: 3290, title: '待审批',
color: '#03c984', count: treat,
}, },
{ {
link: 'reject', link: 'done',
title: '不通过', title: '已审批',
count: 3000, count: alreadyApprove,
color: '#ff8b8b', },
}, {
{ link: 'resolve',
link: 'reimg', title: '通过',
title: '图片重复数', count: approvedCount,
count: 230, color: '#03c984',
}, },
{ {
link: 'breakcount', link: 'reject',
title: '小结重复数', title: '不通过',
count: 365, count: notGoCount,
}, color: '#ff8b8b',
] },
{
link: 'reimg',
title: '图片重复数',
count: repeat,
},
{
link: 'breakcount',
title: '小结重复数',
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;
@ -121,7 +138,7 @@ const data = [
} }
} }
} }
.settingSvg{ .settingSvg {
width: 1rem !important; width: 1rem !important;
height: 1rem !important; height: 1rem !important;
} }

Loading…
Cancel
Save