Explorar o código

fix:数据大屏优化

liziliang hai 3 meses
pai
achega
84debd511b

+ 11 - 2
src/api/screens/index.ts

@@ -19,6 +19,15 @@ export function dailyProduction(num: number) {
   });
 }
 
+// 每日产量统计
+
+export function stationProduction() {
+  return request({
+    url: `/data/station/list`,
+    method: "get",
+  });
+}
+
 // 不合格产品分布
 export function unqualifiedProduct() {
   return request({
@@ -38,8 +47,8 @@ export function defectDistribution() {
 //订单信息-生产计划完成情况
 export function productionPlan() {
   return request({
-    url: "/data/order",
-    method: "POST",
+    url: "/data/production/plan/list",
+    method: "GET",
   });
 }
 

+ 4 - 4
src/views/screens/screen-components/ProductionSituation.vue

@@ -8,14 +8,14 @@
 <script lang="ts" setup>
 import ScreenComHeader from "@/views/screens/configs/screenComHeader.vue";
 import * as echarts from "echarts";
-import { dailyProduction } from "@/api/screens";
+import {dailyProduction, stationProduction} from "@/api/screens";
 import { allChartColors } from "@/views/screens/configs/chartsConfig";
 const bigScreenData: any = inject("bigScreenData");
 const chartRef = ref(null);
 
 onMounted(async () => {
   const chart = echarts.init(chartRef.value, "dark");
-  let res: any = await dailyProduction(7);
+  let res: any = await stationProduction();
   const option = {
     grid: {
       left: "10%",
@@ -27,7 +27,7 @@ onMounted(async () => {
     backgroundColor: "transparent",
     xAxis: {
       type: "category",
-      data: res?.data?.map((item: any) => item.dateStr),
+      data: res?.data?.map((item: any) => item.stationName),
       axisLabel: {
         fontSize: bigScreenData.value.fontSize * 2,
       },
@@ -40,7 +40,7 @@ onMounted(async () => {
     },
     series: [
       {
-        data: res?.data?.map((item: any) => item.count),
+        data: res?.data?.map((item: any) => item.number),
         type: "bar",
       },
     ],

+ 2 - 0
src/views/screens/screen-components/ShengChanJiHuaQingKuang.vue

@@ -30,6 +30,7 @@ onMounted(async () => {
       workOrderCode: `<span style='font-size:${bigScreenData.value.fontSize * 2.3}px'>生产批号</span>`,
       materialName: `<span style='font-size:${bigScreenData.value.fontSize * 2.3}px'>物料名称</span>`,
       materialCode: `<span style='font-size:${bigScreenData.value.fontSize * 2.3}px'>物料编号</span>`,
+      number: `<span style='font-size:${bigScreenData.value.fontSize * 2.3}px'>生产数量</span>`,
       operationName: `<span style='font-size:${bigScreenData.value.fontSize * 2.3}px'>工序名称</span>`,
       stationName: `<span style='font-size:${bigScreenData.value.fontSize * 2.3}px'>工位名称</span>`,
     };
@@ -40,6 +41,7 @@ onMounted(async () => {
         `<span style='font-size:${bigScreenData.value.fontSize * 2}px'>${item.workOrderCode}</span>`,
         `<span style='font-size:${bigScreenData.value.fontSize * 2}px'>${item.materialName}</span>`,
         `<span style='font-size:${bigScreenData.value.fontSize * 2}px'>${item.materialCode}</span>`,
+        `<span style='font-size:${bigScreenData.value.fontSize * 2}px'>${item.number}</span>`,
         `<span style='font-size:${bigScreenData.value.fontSize * 2}px'>${item.operationName}</span>`,
         `<span style='font-size:${bigScreenData.value.fontSize * 2}px'>${item.stationName}</span>`,
       ];

+ 2 - 2
src/views/screens/screen-components/WeiDianZiCheJianGongGao.vue

@@ -34,8 +34,8 @@ onMounted(async () => {
       let row = [
         `<div  style='font-size:${bigScreenData.value.fontSize * 2}px;width: 100%;height: 100%;'>
             <div style="display: flex;align-items: center;justify-content: space-between;height: 60px">
-                <span >${item.title}</span>
-                <span >${item.updateTime}</span>
+                <span style="color: blue;font-size:150%;">${item.title}</span>
+            <span>${item.updated}</span>
             </div>
             <div style="word-break: break-all;white-space: normal;display: flex;align-items: start;justify-content: start;width: 100%;height: 100%;overflow: hidden;line-height: ${bigScreenData.value.fontSize * 2 + 5}px">
                 ${item.content}