Browse Source

修改部分样式

yangg 8 months ago
parent
commit
b6c1f527ea

+ 1 - 1
.env.development

@@ -2,5 +2,5 @@
 ENV = 'development'
 port = 8080
 # base api
-VUE_APP_BASE_API = 'http://58.246.234.210:8084'
+VUE_APP_BASE_API = 'http://192.168.1.200:8084'
 #192.168.1.200

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.940e1834.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-23008ed8.4f4c8198.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-61ace01d.d85527bd.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.0990327d.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.778d7a46.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-0373f1a4.4bee0696.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-23008ed8.9411633c.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-3718fade.f12963ec.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-61ace01d.7385a321.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-b580a2ac.417eafd2.js


+ 4 - 2
src/components/ai.vue

@@ -763,6 +763,8 @@ export default {
 }
 
 .message-text {
+  font-size: 12px;
+  line-height: 20px;
   margin-top: 5px;
 }
 .messages li {
@@ -837,10 +839,10 @@ export default {
   white-space: normal; /* 确保文本会换行 */
   word-wrap: break-word; /* 长单词或 URL 会被断开以适应容器宽度 */
   overflow: auto;
-  font-size: 14px;
+  font-size: 12px;
 }
 .message-text ::v-deep p {
-  font-size: 14px !important;
+  font-size: 12px !important;
   margin: 5px 0 10px;
   padding: 0;
   font-size: inherit;

+ 14 - 2
src/components/chartIcon/index.vue

@@ -51,6 +51,18 @@ export default {
       return `calc(${this.chatHeight}px - 195px)`;
     },
   },
+  watch: {
+    '$store.state.app.showChat': {
+      handler(newValue) {
+        if (newValue) {
+          this.$nextTick(() => {
+            this.updateMessagesHeight();
+          });
+        }
+      },
+      immediate: true
+    }
+  },
   mounted() {
     window.addEventListener('resize', this.updateMessagesHeight);
     document.addEventListener('click', this.handleOutsideClick);
@@ -66,10 +78,10 @@ export default {
         this.closeChat();
       }
     },
-    toggleChat() {
+    /* toggleChat() {
       this.$store.state.app.showChat= true;
       this.showChat = true;
-    },
+    }, */
     closeChat() {
       this.$store.state.app.showChat= false;
       this.showChat = false;

+ 4 - 2
src/components/webAi/css/ChatBox.css

@@ -199,6 +199,8 @@
   }
   
   .message-text {
+    font-size: 12px;
+    line-height: 20px;
     margin-top: 5px;
   }
 .messages li {
@@ -276,10 +278,10 @@
     white-space: normal; /* 确保文本会换行 */
     word-wrap: break-word; /* 长单词或 URL 会被断开以适应容器宽度 */
     overflow: auto;
-    font-size: 14px;
+    font-size: 12px;
 }
 .message-text ::v-deep p {
-    font-size: 14px !important;
+    font-size: 12px !important;
     margin: 5px 0 10px;
     padding: 0;
     font-size: inherit;

+ 17 - 203
src/views/dashboard/admin/components/PieChart.vue

@@ -1,204 +1,3 @@
-<!-- <template>
-  <div :class="className" :style="{height:height,width:width}" />
-</template>
-
-<script>
-import echarts from 'echarts'
-require('echarts/theme/macarons') // echarts theme
-import resize from './mixins/resize'
-
-export default {
-  mixins: [resize],
-  props: {
-    className: {
-      type: String,
-      default: 'chart'
-    },
-    width: {
-      type: String,
-      default: '100%'
-    },
-    height: {
-      type: String,
-      default: '300px'
-    }
-  },
-  data() {
-    return {
-      chart: null
-    }
-  },
-  mounted() {
-    this.$nextTick(() => {
-      this.initChart()
-    })
-  },
-  beforeDestroy() {
-    if (!this.chart) {
-      return
-    }
-    this.chart.dispose()
-    this.chart = null
-  },
-  methods: {
-    initChart() {
-      this.chart = echarts.init(this.$el, 'macarons')
-
-      this.chart.setOption({
-        tooltip: {
-          trigger: 'item',
-          formatter: '{a} <br/>{b} : {c} ({d}%)'
-        },
-        legend: {
-          left: 'center',
-          bottom: '10',
-          data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts']
-        },
-        series: [
-          {
-            name: 'WEEKLY WRITE ARTICLES',
-            type: 'pie',
-            roseType: 'radius',
-            radius: [15, 95],
-            center: ['50%', '38%'],
-            data: [
-              { value: 320, name: 'Industries' },
-              { value: 240, name: 'Technology' },
-              { value: 149, name: 'Forex' },
-              { value: 100, name: 'Gold' },
-              { value: 59, name: 'Forecasts' }
-            ],
-            animationEasing: 'cubicInOut',
-            animationDuration: 2600
-          }
-        ]
-      })
-    }
-  }
-}
-</script>
- -->
-
-<!--  <template>
-  <div class="pie-chart-container">
-    <div class="pie-charts">
-      <div v-for="(item, index) in data" :key="index" class="pie-chart-item">
-        <div class="pie-chart" :style="getPieChartStyle(item.value, item.itemStyle.color)">
-          <span class="pie-chart-text">{{ item.value }}%</span>
-        </div>
-      </div>
-    </div>
-    <div class="legend">
-      <div v-for="(item, index) in data" :key="index" class="legend-item">
-        <span class="color-dot" :style="{ backgroundColor: item.itemStyle.color }"></span>
-        <span>{{ item.name }}</span>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import DataV from '@jiaminghi/data-view'
-export default {
-  name: 'PieChart',
-  components: {
-    dv: DataV,
-  },
-  data() {
-    return {
-      data: [
-        { value: 70, name: "Shopping", itemStyle: { color: "#FF9F43" } },
-        { value: 46, name: "Images", itemStyle: { color: "#5E60CE" } },
-        { value: 15, name: "Document", itemStyle: { color: "#FF6B6B" } },
-        { value: 67, name: "Audio", itemStyle: { color: "#54A0FF" } },
-        { value: 23, name: "Video", itemStyle: { color: "#FF4DFF" } },
-        { value: 88, name: "Text", itemStyle: { color: "#FF9F43" } },
-        { value: 50, name: "Other", itemStyle: { color: "#1DD1A1" } },
-      ],
-    };
-  },
-  methods: {
-    getPieChartStyle(value, color) {
-      const degree = (value / 100) * 360;
-      return {
-        background: `conic-gradient(
-          ${color} 0deg ${degree}deg,
-          rgba(0, 0, 0, 0.05) ${degree}deg 360deg
-        )`,
-      };
-    },
-  },
-};
-</script>
-
-<style scoped>
-.pie-chart-container {
-  width: 100%;
-  max-width: 800px;
-  margin: 0 auto;
-}
-
-.pie-charts {
-  display: flex;
-  flex-wrap: wrap;
-  justify-content: center;
-}
-
-.pie-chart-item {
-  width: 25%;
-  padding: 10px;
-  box-sizing: border-box;
-}
-
-.pie-chart {
-  width: 100px;
-  height: 100px;
-  border-radius: 50%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  position: relative;
-  background-color: rgba(0, 0, 0, 0.05);
-}
-
-.pie-chart::before {
-  content: '';
-  position: absolute;
-  top: 10px;
-  left: 10px;
-  right: 10px;
-  bottom: 10px;
-  background: #ccecfe;
-  border-radius: 50%;
-}
-
-.pie-chart-text {
-  position: relative;
-  font-size: 16px;
-  font-weight: bold;
-  color: #333;
-}
-
-.legend {
-  display: flex;
-  flex-wrap: wrap;
-  justify-content: center;
-  margin-top: 20px;
-}
-
-.legend-item {
-  display: flex;
-  align-items: center;
-  margin: 0 10px 10px 0;
-}
-
-.color-dot {
-  width: 10px;
-  height: 10px;
-  border-radius: 50%;
-  margin-right: 5px;
-}
-</style> -->
 <template>
   <div class="pie-chart-container">
     <dv-charts v-if="option" :option="option" />
@@ -221,13 +20,23 @@ export default {
         { name: "变量", value: 67 },    
       ],
       refreshInterval: null,
+      isOnDashboard: false,
     };
   },
+  watch: {
+    $route: {
+      immediate: true,
+      handler(newRoute) {
+        this.isOnDashboard = newRoute.path === '/dashboard';
+        this.handleRouteChange();
+      }
+    }
+  },
   mounted() {
     this.init();
-    this.refreshInterval = setInterval(() => {
+    /* this.refreshInterval = setInterval(() => {
       this.init();
-    }, 30000);
+    }, 30000); */
   },
   beforeDestroy() {
     // 组件销毁前清除定时器
@@ -236,6 +45,11 @@ export default {
     }
   },
   methods: {
+    handleRouteChange() {
+      if (this.isOnDashboard) {
+        this.init();
+      } 
+    },
     initChart() {
       const filteredData = this.data.filter((item) => item.value > 0);
       this.option = {

+ 22 - 1
src/views/dashboard/admin/index.vue

@@ -72,6 +72,7 @@ import BoxCard from "./components/BoxCard";
 import TagCloud from "./components/tagCloud.vue";
 import RecentFile from "./components/recentFile.vue";
 import { listBuckets, structure_count } from "@/api/knowledge";
+import { mapState } from 'vuex';
 
 const lineChartData = {
   newVisitis: {
@@ -130,16 +131,36 @@ export default {
       kenValue: null,
       kenVal: {},
       refreshInterval: null,
+      isOnDashboard: false,
     };
   },
+  computed: {
+    ...mapState({
+      route: state => state.tagsView.visitedViews
+    })
+  },
+  watch: {
+    $route: {
+      immediate: true,
+      handler(newRoute) {
+        this.isOnDashboard = newRoute.path === '/dashboard';
+        this.handleRouteChange();
+      }
+    }
+  },
   mounted() {
     this.init();
-    this.startRefreshInterval();
+   /*  this.startRefreshInterval(); */
   },
   beforeDestroy() {
     this.stopRefreshInterval();
   },
   methods: {
+    handleRouteChange() {
+      if (this.isOnDashboard) {
+        this.refreshData();
+      } 
+    },
     /* 选择知识库 */
     kenChange(val) {
       this.kenVal = this.kenList.find((el) => el.id === val);

+ 0 - 1
src/views/knowledgeMenu/category/knowledgeSet.vue

@@ -94,7 +94,6 @@
           <el-table-column
             prop="name"
             label="文件名称"
-            align="center"
             sortable="custom"
             width="600"
           >

Some files were not shown because too many files changed in this diff