From 2d55e51aa2a6349e4c5daff674e9c101e00951d6 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Mon, 31 Mar 2025 17:45:21 +0800
Subject: [PATCH] Merge branch 'master' of http://139.196.74.78:10010/r/drone/command-center-dashboard

---
 Dockerfile.test                                              |    4 --
 /dev/null                                                    |   28 --------------
 public/fonts/SourceHanSansCN-Bold.otf                        |    0 
 public/fonts/font.css                                        |   28 ++++++++++++++
 index.html                                                   |    1 
 public/fonts/SourceHanSansCN-Medium.otf                      |    0 
 src/views/Home/components/HomeLeft/InspectionRaskDetails.vue |   27 +++++++++----
 public/fonts/YouSheBiaoTiHei.TTF                             |    0 
 src/api/home/index.js                                        |    8 ++++
 src/styles/common.scss                                       |    2 -
 public/fonts/SourceHanSansCN-Regular.otf                     |    0 
 11 files changed, 56 insertions(+), 42 deletions(-)

diff --git a/Dockerfile.test b/Dockerfile.test
index e0da8e1..70bfabd 100644
--- a/Dockerfile.test
+++ b/Dockerfile.test
@@ -6,12 +6,8 @@
 
 # 将当前目录(Vue 项目目录)的内容复制到 /app 目录中
 COPY . .
-
 # 安装项目依赖
 RUN rm -rf node_modules package-lock.json && npm install --registry=https://registry.npmmirror.com
-
-# 验证字体文件是否被正确复制
-RUN ls -la src/assets/fonts/YouSheBiaoTiHei.ttf || echo "检查字体文件路径"
 
 # 构建项目
 RUN npm run build:dev
diff --git a/index.html b/index.html
index f96ee63..2605252 100644
--- a/index.html
+++ b/index.html
@@ -12,6 +12,7 @@
   <meta name='apple-mobile-web-app-status-bar-style' content='black'>
   <meta name='format-detection' content='telephone=no'>
   <link rel='icon' href='/favicon.png' />
+  <link rel='stylesheet' href='/fonts/font.css'>
   <link rel='stylesheet' href='/iconfont/index.css'>
   <link rel='stylesheet' href='/iconfont/avue/iconfont.css'>
   <link rel='stylesheet' href='/iconfont/saber/iconfont.css'>
diff --git a/src/assets/fonts/SourceHanSansCN-Bold.otf b/public/fonts/SourceHanSansCN-Bold.otf
similarity index 100%
rename from src/assets/fonts/SourceHanSansCN-Bold.otf
rename to public/fonts/SourceHanSansCN-Bold.otf
Binary files differ
diff --git a/src/assets/fonts/SourceHanSansCN-Medium.otf b/public/fonts/SourceHanSansCN-Medium.otf
similarity index 100%
rename from src/assets/fonts/SourceHanSansCN-Medium.otf
rename to public/fonts/SourceHanSansCN-Medium.otf
Binary files differ
diff --git a/src/assets/fonts/SourceHanSansCN-Regular.otf b/public/fonts/SourceHanSansCN-Regular.otf
similarity index 100%
rename from src/assets/fonts/SourceHanSansCN-Regular.otf
rename to public/fonts/SourceHanSansCN-Regular.otf
Binary files differ
diff --git a/src/assets/fonts/YouSheBiaoTiHei.TTF b/public/fonts/YouSheBiaoTiHei.TTF
similarity index 100%
rename from src/assets/fonts/YouSheBiaoTiHei.TTF
rename to public/fonts/YouSheBiaoTiHei.TTF
Binary files differ
diff --git a/public/fonts/font.css b/public/fonts/font.css
new file mode 100644
index 0000000..26bb6c5
--- /dev/null
+++ b/public/fonts/font.css
@@ -0,0 +1,28 @@
+@font-face {
+  font-family: "Source Han Sans CN";
+  src: url("SourceHanSansCN-Regular.otf") format("opentype");
+  font-weight: 400;
+  font-style: normal;
+}
+
+@font-face {
+  font-family: "Source Han Sans CN";
+  src: url("SourceHanSansCN-Medium.otf") format("opentype");
+  font-weight: 500;
+  font-style: normal;
+}
+
+@font-face {
+  font-family: "Source Han Sans CN";
+  src: url("SourceHanSansCN-Bold.otf") format("opentype") ;
+  font-weight: 700;
+  font-style: normal;
+}
+
+/* 额外的标题字体 */
+@font-face {
+  font-family: "YouSheBiaoTiHei";
+  src: url("YouSheBiaoTiHei.TTF") format("truetype");
+  font-weight: normal;
+  font-style: normal;
+}
diff --git a/src/api/home/index.js b/src/api/home/index.js
index 412182e..318eb8e 100644
--- a/src/api/home/index.js
+++ b/src/api/home/index.js
@@ -15,3 +15,11 @@
     method: 'post',
   });
 };
+
+// 巡检任务柱状图数据
+export const getJobNumBar = () => {
+  return request({
+    url: '/drone-device-core/wayline/waylineJobInfo/jobNumBar',
+    method: 'post',
+  });
+};
diff --git a/src/styles/common.scss b/src/styles/common.scss
index bed1aad..385d5ad 100644
--- a/src/styles/common.scss
+++ b/src/styles/common.scss
@@ -23,8 +23,6 @@
 @use "./login.scss";
 //适配
 @use './media.scss';
-//字体
-@use './font.scss';
 //滚动条样式
 @include scrollBar;
 
diff --git a/src/styles/font.scss b/src/styles/font.scss
deleted file mode 100644
index 889fede..0000000
--- a/src/styles/font.scss
+++ /dev/null
@@ -1,28 +0,0 @@
-@font-face {
-  font-family: "Source Han Sans CN";
-  src: url("@/assets/fonts/SourceHanSansCN-Regular.otf") format("opentype");
-  font-weight: 400;
-  font-style: normal;
-}
-
-@font-face {
-  font-family: "Source Han Sans CN";
-  src: url("@/assets/fonts/SourceHanSansCN-Medium.otf") format("opentype");
-  font-weight: 500;
-  font-style: normal;
-}
-
-@font-face {
-  font-family: "Source Han Sans CN";
-  src: url("@/assets/fonts/SourceHanSansCN-Bold.otf") format("opentype");
-  font-weight: 700;
-  font-style: normal;
-}
-
-/* 额外的标题字体 */
-@font-face {
-  font-family: "YouSheBiaoTiHei";
-  src: url("@/assets/fonts/YouSheBiaoTiHei.ttf") format("truetype");
-  font-weight: normal;
-  font-style: normal;
-}
diff --git a/src/views/Home/components/HomeLeft/InspectionRaskDetails.vue b/src/views/Home/components/HomeLeft/InspectionRaskDetails.vue
index cd0c7c9..e061d39 100644
--- a/src/views/Home/components/HomeLeft/InspectionRaskDetails.vue
+++ b/src/views/Home/components/HomeLeft/InspectionRaskDetails.vue
@@ -14,7 +14,7 @@
       </div>
       <div class="status">
         <div v-for="item in list">
-          <div :style="{ color: item.color }" class="value">{{ item.value }}</div>
+          <div :style="{ color: item.color }" class="value">{{ jobStatistics[item.field] }}</div>
           <div class="name">{{ item.name }}</div>
         </div>
       </div>
@@ -29,14 +29,14 @@
 import { pxToRem } from '@/utils/rem';
 import CommonTitle from '@/components/CommonTitle.vue';
 import CommonDateTime from '@/components/CommonDateTime.vue';
-import { getJobStatistics, getTotalJobNum } from '@/api/home';
+import { getJobNumBar, getJobStatistics, getTotalJobNum } from '@/api/home';
 
 const list = ref([
-  { name: '计划执行', value: 89, color: '#FFFFFF' },
-  { name: '执行中', value: 100, color: '#FFA768' },
-  { name: '待执行', value: 66, color: '#FFE17E' },
-  { name: '已执行', value: 10, color: '#8EFFAC' },
-  { name: '执行失败', value: 10, color: '#FF8E8E' },
+  { name: '计划执行', value: 89, color: '#FFFFFF',field:'planned_executions' },
+  { name: '执行中', value: 100, color: '#FFA768',field:'running_num' },
+  { name: '待执行', value: 66, color: '#FFE17E',field:'pending_executions' },
+  { name: '已执行', value: 10, color: '#8EFFAC',field:'executed' },
+  { name: '执行失败', value: 10, color: '#FF8E8E',field:'failed_executions' },
 ]);
 const option = {
   grid: {
@@ -145,12 +145,23 @@
 
 const chartRef = ref(null);
 const total = ref(0);
+const jobStatistics = ref({
+  "planned_executions": 0,
+  "executed": 0,
+  "running_num": 0,
+  "failed_executions": 0,
+  "pending_executions": 0
+})
+
 onMounted(() => {
   getTotalJobNum().then(res => {
     total.value = res.data?.data || 0
   })
   getJobStatistics().then(res => {
-
+    jobStatistics.value = res.data?.data || {}
+  })
+  getJobNumBar().then(res => {
+    console.log(res.data.data);
   })
   const chart = echarts.init(chartRef.value);
   chart.setOption(option);

--
Gitblit v1.9.3