Parcourir la source

更换logo 字样

cynthia-qin il y a 1 mois
Parent
commit
73155d409f

+ 2 - 2
.env.development

@@ -1,10 +1,10 @@
 # 页面标题
-VUE_APP_TITLE = 传染病溯源预测系统
+VUE_APP_TITLE = 病溯源预测系统
 
 # 开发环境配置
 ENV = 'development'
 
-# 传染病溯源预测系统/开发环境
+# 病溯源预测系统/开发环境
 VUE_APP_BASE_API = '/dev-api'
 
 # 路由懒加载

+ 2 - 2
.env.production

@@ -1,8 +1,8 @@
 # 页面标题
-VUE_APP_TITLE = 传染病溯源预测系统
+VUE_APP_TITLE = 病溯源预测系统
 
 # 生产环境配置
 ENV = 'production'
 
-# 传染病溯源预测系统/生产环境
+# 病溯源预测系统/生产环境
 VUE_APP_BASE_API = '/prod-api'

+ 2 - 2
.env.staging

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 传染病溯源预测系统
+VUE_APP_TITLE = 病溯源预测系统
 
 BABEL_ENV = production
 
@@ -8,5 +8,5 @@ NODE_ENV = production
 # 测试环境配置
 ENV = 'staging'
 
-# 传染病溯源预测系统/测试环境
+# 病溯源预测系统/测试环境
 VUE_APP_BASE_API = '/stage-api'

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "toid",
   "version": "3.8.9",
-  "description": "传染病溯源预测系统",
+  "description": "病溯源预测系统",
   "author": "浙大启真",
   "license": "MIT",
   "scripts": {

BIN
public/favicon.ico


BIN
src/assets/logo/logo.jpg


+ 2 - 2
src/layout/components/Sidebar/Logo.vue

@@ -14,7 +14,7 @@
 </template>
 
 <script>
-import logoImg from '@/assets/logo/logo.png'
+import logoImg from '@/assets/logo/logo.jpg'
 import variables from '@/assets/styles/variables.scss'
 
 export default {
@@ -66,7 +66,7 @@ export default {
     width: 100%;
 
     & .sidebar-logo {
-      width: 32px;
+      width: 35px;
       height: 32px;
       vertical-align: middle;
       margin-right: 12px;

+ 2 - 2
src/views/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div >
     <div class="flex-container">
-      <h2>欢迎进入传染病溯源预测系统</h2>
+      <h2>欢迎进入病溯源预测系统</h2>
     </div>
     <div class="button-container">
 
@@ -44,4 +44,4 @@ export default {
   justify-content: center;
   margin-top:-35vh;
 }
-</style>
+</style>

+ 2 - 2
src/views/statistics/popularity-prediction/index.vue

@@ -4,7 +4,7 @@
           <!-- 筛选条件 -->
     <el-card class="filter-card">
       <el-form :inline="true" :model="form" size="small">
-        
+
         <el-form-item label="病原体">
           <el-select v-model="form.pathogenId" placeholder="请选择病原体">
             <el-option v-for="item in pathogen" :key="item.id" :label="item.name" :value="item.id"></el-option>
@@ -117,7 +117,7 @@ export default {
       // 清空旧的配置
       chart.clear();
       chart.setOption({
-        title: { text: mapType === 'world' ? '全球病毒预测分布' : '中国病毒预测分布', left: 'center' },
+        title: { text: mapType === 'world' ? '全球病毒分布' : '中国病毒分布', left: 'center' },
         tooltip: {
           trigger: 'item',
           formatter: (params) => {

+ 30 - 19
src/views/statistics/sample-statistics/index.vue

@@ -194,7 +194,7 @@ export default {
     renderViolinChart(data, label) {
       const chartContainer = document.createElement('div');
       chartContainer.style.width = '100%';
-      chartContainer.style.height = '600px';
+      chartContainer.style.height = '800px';
       chartContainer.id = `violinChart_${label}`;
       chartContainer.classList.add('dynamic-chart');
       document.querySelector('.dynamic-charts').appendChild(chartContainer);
@@ -203,16 +203,13 @@ export default {
       this.dynamicChartContainers.push(chartContainer);
 
       const traces = data.map((item, index) => {
-        let name;
-        if (typeof item.hour === 'number') {
-          name = `${item.hour}小时`;
-        } else {
-          name = item.hour;
-        }
+        console.log('item', item);
+        const xValue = item.hour; // 直接使用 item.hour
         return {
           type: 'violin',
+          x: [xValue],
           y: item.y,
-          name,
+          name: xValue,
           box: {
             visible: true,
             line: {
@@ -232,6 +229,9 @@ export default {
         };
       });
 
+      // 提取所有 x 轴标签
+      const xLabels = data.map((item) => item.hour);
+
       const layout = {
         title: {
           text: label,
@@ -251,48 +251,59 @@ export default {
             }
           },
           tickfont: {
-            size: 14,
+            size: 12,
             color: '#666'
-          }
+          },
+          type: 'linear',
+          automargin: true
         },
         xaxis: {
           title: {
-            text: typeof data[0]?.hour === 'number' ? '小时' : '日期',
+            text: '日期',
             font: {
               size: 16,
               color: '#666'
             }
           },
+          tickmode: 'array',
+          tickvals: xLabels,
+          ticktext: xLabels,
           tickfont: {
-            size: 14,
+            size: 12,
             color: '#666'
           },
-          tickangle: -45
+          tickangle: -45,
+          automargin: true
         },
         violinmode: 'group',
         margin: {
           l: 80,
           r: 80,
-          b: 120,
+          b: 80,
           t: 120,
           pad: 10
         },
         legend: {
           font: {
-            size: 14,
+            size: 12,
             color: '#666'
           },
           orientation: 'h',
           yanchor: 'top',
-          y: -0.2,
+          y: -0.3,
           xanchor: 'center',
           x: 0.5
         },
         plot_bgcolor: '#fff',
-        paper_bgcolor: '#fff'
+        paper_bgcolor: '#fff',
+        dragmode: false,
+      };
+       // 直接隐藏工具栏
+      const config = {
+        displayModeBar: false
       };
 
-      Plotly.newPlot(chartContainer, traces, layout);
+      Plotly.newPlot(chartContainer, traces, layout,config);
     },
 
     renderLineChart(data, label) {
@@ -473,7 +484,7 @@ export default {
         hour, // 直接使用原始的日期字符串
         yxs: groupedData[hour].yxs,
         yxl: groupedData[hour].yxl
-      })).sort((a, b) => new Date(a.hour) - new Date(b.hour)); // 按日期排序
+      })) // 按日期排序
     },
     updateCharts() {
       const xData = this.lineData.map(item => item.hour);

+ 1 - 1
src/views/tool/build/index.vue

@@ -147,7 +147,7 @@ import { makeUpHtml, vueTemplate, vueScript, cssStyle } from '@/utils/generator/
 import { makeUpJs } from '@/utils/generator/js'
 import { makeUpCss } from '@/utils/generator/css'
 import drawingDefault from '@/utils/generator/drawingDefault'
-import logo from '@/assets/logo/logo.png'
+import logo from '@/assets/logo/logo.jpg'
 import CodeTypeDialog from './CodeTypeDialog'
 import DraggableItem from './DraggableItem'
 

+ 1 - 1
vue.config.js

@@ -7,7 +7,7 @@ function resolve(dir) {
 
 const CompressionPlugin = require('compression-webpack-plugin')
 
-const name = process.env.VUE_APP_TITLE || '传染病溯源预测系统' // 网页标题
+const name = process.env.VUE_APP_TITLE || '病溯源预测系统' // 网页标题
 
 // const baseUrl = '/' // 后端接口
 // const baseUrl = 'http://127.0.0.1:8081/' // 后端接口