From 93f8a828f583f0cb0329c66e8f6f5a50874565a6 Mon Sep 17 00:00:00 2001 From: siontion Date: Fri, 5 Apr 2024 22:20:37 +0800 Subject: [PATCH] =?UTF-8?q?dashboard=20=E4=B8=B4=E6=9C=9F=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/gw/dashborad/index.ts | 15 ++++++++++++++- src/views/Gw/Home.vue | 35 +++++++++++++++++++++++------------ 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/src/api/gw/dashborad/index.ts b/src/api/gw/dashborad/index.ts index d719fe5..33210f0 100644 --- a/src/api/gw/dashborad/index.ts +++ b/src/api/gw/dashborad/index.ts @@ -8,4 +8,17 @@ export const getDashboardChart = async () => { // 获取Dashborad图表数据 export const getDashboardData = async () => { return await request.post({ url: `/DistributionBoxTesting/GetDashboardData` }) -} \ No newline at end of file +} + +// 获取采购订单临期数据 +export const GetOrderAdventList = async () => { + return await request.post({ url: `/DistributionBoxTesting/GetOrderAdventList` }) +} +// 获取生产订单临期数据 +export const GetIpoAdventList = async () => { + return await request.post({ url: `/DistributionBoxTesting/GetIpoAdventList` }) +} +// 获取生产工单临期数据 +export const GetWoAdventList = async () => { + return await request.post({ url: `/DistributionBoxTesting/GetWoAdventList` }) +} diff --git a/src/views/Gw/Home.vue b/src/views/Gw/Home.vue index 4cca063..40a3590 100644 --- a/src/views/Gw/Home.vue +++ b/src/views/Gw/Home.vue @@ -70,7 +70,15 @@ - + @@ -129,11 +137,12 @@ const dashboardChart: any = ref( }) const gridOptionsA: any = reactive({ columns: [ - { field: 'BuyName', title: '采购方公司名称' }, + { field: 'BuyName', title: '采购方公司' }, { field: 'BuyNo', title: '采购订单编号' }, { field: 'Amount', title: '采购数量' }, { field: 'DlvTime', title: '计划完成日期' }, - { field: 'Span', title: '距离到期/天' }, + { field: 'Span', title: '距离到期/天' + }, ], proxyConfig: { @@ -145,7 +154,8 @@ const gridOptionsA: any = reactive({ ajax: { // 当点击工具栏查询按钮或者手动提交指令 query或reload 时会被触发 query: async () => { - const data = await MuPaiApi.getMuPaiPaging(queryParamsA) + const data = await dashboradApi.GetOrderAdventList() + aTitle.value = "临期采购订单:"+data.length+"条" return data }, } @@ -153,7 +163,7 @@ const gridOptionsA: any = reactive({ }) const gridOptionsB: any = reactive({ columns: [ - { field: 'BuyName', title: '采购方公司名称' }, + { field: 'BuyName', title: '采购方公司' }, { field: 'PoNo', title: '生产订单编号' }, { field: 'Amount', title: '生产数量' }, { field: 'DlvTime', title: '计划完成日期' }, @@ -169,7 +179,8 @@ const gridOptionsB: any = reactive({ ajax: { // 当点击工具栏查询按钮或者手动提交指令 query或reload 时会被触发 query: async () => { - const data = await MuPaiApi.getMuPaiPaging(queryParamsA) + const data = await dashboradApi.GetIpoAdventList() + bTitle.value = "临期采购订单:"+data.length+"条" return data }, } @@ -177,7 +188,7 @@ const gridOptionsB: any = reactive({ }) const gridOptionsC: any = reactive({ columns: [ - { field: 'BuyName', title: '采购方公司名称' }, + { field: 'BuyName', title: '采购方公司' }, { field: 'WoNo', title: '生产工单编号' }, { field: 'DlvTime', title: '计划完成日期' }, { field: 'Span', title: '距离到期/天' }, @@ -192,21 +203,21 @@ const gridOptionsC: any = reactive({ ajax: { // 当点击工具栏查询按钮或者手动提交指令 query或reload 时会被触发 query: async () => { - const data = await MuPaiApi.getMuPaiPaging(queryParamsA) + const data = await dashboradApi.GetWoAdventList() + cTitle.value = "临期采购订单:"+data.length+"条" return data }, } } }) + // 挂载 onMounted(() => { fnGetDashboardData() fnGetDashboardChart() - - aTitle.value = "临期采购订单:99条" - bTitle.value = "临期生产订单:99条" - cTitle.value = "临期生产工单:99条" }) + + // 获取Dashboard数据 const fnGetDashboardData = async () => { let res = await dashboradApi.getDashboardData()