Browse Source

修改部分样式

yangg 8 months ago
parent
commit
23fb5387a9

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.683d0d7b.css


+ 0 - 0
dist/static/css/chunk-27283076.775a21e3.css → dist/static/css/chunk-05d6d838.775a21e3.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/css/chunk-ec55d346.1ea26aa2.css


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


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


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


File diff suppressed because it is too large
+ 1 - 1
dist/static/js/chunk-05d6d838.4d242ace.js


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


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


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-670724e9.3bad34ce.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-70e46098.f134baa6.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-ec55d346.f64a9496.js


+ 1 - 1
src/components/LoginModal/index.vue

@@ -111,7 +111,7 @@ export default {
                 phone: this.form.phone,
                 phone: this.form.phone,
                 code: this.form.code,
                 code: this.form.code,
               });
               });
-
+              loginResult.data.phone=this.form.phone
               // 保存用户数据到本地存储
               // 保存用户数据到本地存储
               this.saveUserData(loginResult);
               this.saveUserData(loginResult);
 
 

+ 3 - 2
src/components/ai.vue

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

+ 12 - 0
src/components/chartIcon/index.vue

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

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

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

+ 23 - 208
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>
 <template>
   <div class="pie-chart-container">
   <div class="pie-chart-container">
     <dv-charts v-if="option" :option="option" />
     <dv-charts v-if="option" :option="option" />
@@ -216,18 +15,28 @@ export default {
       data: [
       data: [
         { name: "文档", value: 70 },
         { name: "文档", value: 70 },
         { name: "模版", value: 46 },
         { name: "模版", value: 46 },
-        { name: "公式", value: 15 },
-        { name: "变量", value: 67 },
         { name: "知识库文档", value: 23 },
         { name: "知识库文档", value: 23 },
+        { name: "公式", value: 15 },
+        { name: "变量", value: 67 },    
       ],
       ],
       refreshInterval: null,
       refreshInterval: null,
+      isOnDashboard: false,
     };
     };
   },
   },
+  watch: {
+    $route: {
+      immediate: true,
+      handler(newRoute) {
+        this.isOnDashboard = newRoute.path === '/dashboard';
+        this.handleRouteChange();
+      }
+    }
+  },
   mounted() {
   mounted() {
     this.init();
     this.init();
-    this.refreshInterval = setInterval(() => {
+    /* this.refreshInterval = setInterval(() => {
       this.init();
       this.init();
-    }, 30000);
+    }, 30000); */
   },
   },
   beforeDestroy() {
   beforeDestroy() {
     // 组件销毁前清除定时器
     // 组件销毁前清除定时器
@@ -236,6 +45,11 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    handleRouteChange() {
+      if (this.isOnDashboard) {
+        this.init();
+      } 
+    },
     initChart() {
     initChart() {
       const filteredData = this.data.filter((item) => item.value > 0);
       const filteredData = this.data.filter((item) => item.value > 0);
       this.option = {
       this.option = {
@@ -268,9 +82,10 @@ export default {
       concle_count().then((res) => {
       concle_count().then((res) => {
         this.data[0].value = res.data.dc_document.non_templates;
         this.data[0].value = res.data.dc_document.non_templates;
         this.data[1].value = res.data.dc_document.templates;
         this.data[1].value = res.data.dc_document.templates;
-        this.data[2].value = res.data.dc_formula;
-        this.data[3].value = res.data.dc_params;
-        this.data[4].value = res.data.kbm_document;
+         this.data[2].value = res.data.kbm_document;
+        this.data[3].value = res.data.dc_formula;
+        this.data[4].value = res.data.dc_params;
+       
         this.$nextTick(() => {
         this.$nextTick(() => {
           this.initChart();
           this.initChart();
         });
         });

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

@@ -72,6 +72,7 @@ import BoxCard from "./components/BoxCard";
 import TagCloud from "./components/tagCloud.vue";
 import TagCloud from "./components/tagCloud.vue";
 import RecentFile from "./components/recentFile.vue";
 import RecentFile from "./components/recentFile.vue";
 import { listBuckets, structure_count } from "@/api/knowledge";
 import { listBuckets, structure_count } from "@/api/knowledge";
+import { mapState } from 'vuex';
 
 
 const lineChartData = {
 const lineChartData = {
   newVisitis: {
   newVisitis: {
@@ -130,16 +131,36 @@ export default {
       kenValue: null,
       kenValue: null,
       kenVal: {},
       kenVal: {},
       refreshInterval: null,
       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() {
   mounted() {
     this.init();
     this.init();
-    this.startRefreshInterval();
+   /*  this.startRefreshInterval(); */
   },
   },
   beforeDestroy() {
   beforeDestroy() {
     this.stopRefreshInterval();
     this.stopRefreshInterval();
   },
   },
   methods: {
   methods: {
+    handleRouteChange() {
+      if (this.isOnDashboard) {
+        this.refreshData();
+      } 
+    },
     /* 选择知识库 */
     /* 选择知识库 */
     kenChange(val) {
     kenChange(val) {
       this.kenVal = this.kenList.find((el) => el.id === 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
           <el-table-column
             prop="name"
             prop="name"
             label="文件名称"
             label="文件名称"
-            align="center"
             sortable="custom"
             sortable="custom"
             width="600"
             width="600"
           >
           >

+ 4 - 1
src/views/login/aiIndex.vue

@@ -112,9 +112,11 @@ export default {
         document: "",
         document: "",
       },
       },
       currentChat_id:'',
       currentChat_id:'',
+      phone:''
     };
     };
   },
   },
   mounted() {
   mounted() {
+    localStorage.removeItem("AIData")
     this.checkAIData();
     this.checkAIData();
     if (this.$route.name == "ai") {
     if (this.$route.name == "ai") {
       /* 外部知识库 */
       /* 外部知识库 */
@@ -129,6 +131,7 @@ export default {
         if (AIData && AIData.data) {
         if (AIData && AIData.data) {
           console.log(AIData);
           console.log(AIData);
           this.wsUrl = AIData.data.url || "";
           this.wsUrl = AIData.data.url || "";
+          this.phone=AIData.data.phone || ""
           this.tweaks = AIData.data.tweaks || {};
           this.tweaks = AIData.data.tweaks || {};
         } else {
         } else {
           console.error("Invalid AIData structure");
           console.error("Invalid AIData structure");
@@ -322,7 +325,7 @@ export default {
               /* output_type: "chat",
               /* output_type: "chat",
               input_type: "chat", */
               input_type: "chat", */
               chat_config_id:'3',//this.currentChat_id,
               chat_config_id:'3',//this.currentChat_id,
-              user_id: this.tweaks['Memory-KtRT7'].session_id,//this.tweaks.Memory-KtRT7.session_id,
+              user_id: this.phone,//this.tweaks.Memory-KtRT7.session_id,
               session_id: this.session_id || ""/* {
               session_id: this.session_id || ""/* {
                 "ChatInput-U82Vu": {},
                 "ChatInput-U82Vu": {},
                 "Prompt-b8Z1E": {},
                 "Prompt-b8Z1E": {},

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