Преглед на файлове

路由调整(接口);其他优化

htc преди 4 дни
родител
ревизия
ad5f0c33af

+ 2 - 8
public/index.html

@@ -36,21 +36,15 @@
   <% if (process.env.VUE_APP_NODE_ENV==='dev' ) { %>
     <script>
 
-      //window.SITE_CONFIG['apiURL'] = 'http://192.168.2.19:9011//witcarbon-admin';
-      // window.SITE_CONFIG['apiURL1'] = 'http://192.168.2.19:9014/iot';
-      window.SITE_CONFIG['apiURL'] = 'https://glt.ringzle.com:8033/witcarbon-admin';
-      // window.SITE_CONFIG['apiURL'] = 'http:///192.168.2.19:9021/witcarbon-admin';
+      // window.SITE_CONFIG['apiURL'] = 'https://glt.ringzle.com:8033/witcarbon-admin';
+      window.SITE_CONFIG['apiURL'] = 'http://192.168.2.19:9011/chuangheng-admin';
       window.SITE_CONFIG['apiURL1'] = 'http://gpu.ringzle.com:8082/iot';
-      // window.SITE_CONFIG['apiURL1'] = 'http://192.168.2.19:9014'; //李勇本地
 
 
-      // window.SITE_CONFIG['apiURL2'] = 'http://192.168.1.128:9015/witcarbon-gica';
       window.SITE_CONFIG['apiURL2'] = 'http://gpu.ringzle.com:8082/witcarbon-gica';
 
 
       // 李勇本机地址
-      //  window.SITE_CONFIG['apiURL'] = 'http://192.168.1.19:9011/witcarbon-admin';
-      //  window.SITE_CONFIG['apiURL1'] = 'http://192.168.1.19:9014/witcarbon-iot';
       // WebSocket地址
       window.SITE_CONFIG['socketURL'] = 'ws://https://s.ringzle.com/witcarbon-admin/websocket';
     </script>

+ 8 - 0
src/api/agent/index.js

@@ -0,0 +1,8 @@
+import request from '@/utils/request2'
+
+export function getContractList(query) {
+    return request({
+      url: 'core/chat/messages?query='+query,
+      method: 'get'
+    })
+  }

+ 2 - 2
src/assets/scss/common.scss

@@ -443,8 +443,8 @@ img {
 
     .el-menu-item:not(.exit):focus,
     .el-menu-item:not(.exit):hover {
-      background-color: #e9f0ff;
-      color: #2e69eb;
+      background-color: rgba(118,30,106,0.06);
+      color: #761E6A;
     }
 
     .el-submenu__title:focus,

+ 0 - 6
src/router/index.js

@@ -52,16 +52,10 @@ export const moduleRoutes = {
     //创衡智能体
     { path: '/agentDialog', component: () => import('@/views/modules/agent/dialog'), name: 'agentDialog', meta: { title: '创建新对话', isTab: false } },
     { path: '/agentDialogResult', component: () => import('@/views/modules/agent/dialogResult'), name: 'agentDialogResult', meta: { title: '对话结果', isTab: false } },
-    { path: '/agentProgram', component: () => import('@/views/modules/agent/program'), name: 'agentProgram', meta: { title: '项目管理', isTab: false } },
     { path: '/agentProgramAddTeam', component: () => import('@/views/modules/agent/program/addTeam'), name: 'agentProgramAddTeam', meta: { title: '添加团队', isTab: false } },
-    { path: '/agentKnowledge', component: () => import('@/views/modules/agent/knowledge'), name: 'agentKnowledge', meta: { title: '知识库管理', isTab: false } },
     { path: '/agentKnowledgeAdd', component: () => import('@/views/modules/agent/knowledge/add'), name: 'agentKnowledgeAdd', meta: { title: '创建知识库', isTab: false } },
     { path: '/agentKnowledgeDetail', component: () => import('@/views/modules/agent/knowledge/detail'), name: 'agentKnowledgeDetail', meta: { title: '知识库详情', isTab: false } },
     { path: '/agentKnowledgeCategory', component: () => import('@/views/modules/agent/knowledgeCategory'), name: 'agentKnowledgeCategory', meta: { title: '类目管理', isTab: false } },
-    { path: '/agentUser', component: () => import('@/views/modules/agent/user'), name: 'agentUser', meta: { title: '用户管理', isTab: false } },
-    { path: '/agentReport', component: () => import('@/views/modules/agent/report'), name: 'agentReport', meta: { title: '报告管理', isTab: false } },
-    { path: '/agentQuestionnaire', component: () => import('@/views/modules/agent/questionnaire'), name: 'agentQuestionnaire', meta: { title: '问卷管理', isTab: false } },
-    { path: '/agentQuestionnaireList', component: () => import('@/views/modules/agent/questionnaireList'), name: 'agentQuestionnaireList', meta: { title: '问卷列表', isTab: false } },
     { path: '/agentQuestionnaireSchedule', component: () => import('@/views/modules/agent/questionnaire/schedule'), name: 'agentQuestionnaireSchedule', meta: { title: '问卷作答进度', isTab: false } },
     { path: '/agentQuestionnaireReport', component: () => import('@/views/modules/agent/questionnaire/report'), name: 'agentQuestionnaireReport', meta: { title: '问卷报告', isTab: false } },
     { path: '/agentQuestionnaireDetail', component: () => import('@/views/modules/agent/questionnaire/detail'), name: 'agentQuestionnaireDetail', meta: { title: '问卷详情', isTab: false } },

+ 16 - 9
src/views/main-sidebar-sub-menu.vue

@@ -60,7 +60,6 @@ export default {
       )[0];
       if (route) {
         if (this.$router.history.current.meta.title != route.meta.title) {
-          this.$store.commit("mutationSelectTags", route);
           this.$router.push({ name: route.name });
         } else {
           this.$store.state.currentPayWorryRecord="";
@@ -78,19 +77,27 @@ export default {
   },
 };
 </script>
-
+<style>
+  .el-menu-item:hover,.el-submenu__title:hover,.el-menu-item.is-active,.aui-sidebar__menu .el-submenu.is-active > .el-submenu__title{
+    background: rgba(118,30,106,0.06) !important;
+  }
+  .el-menu-item:hover span,.el-menu-item:hover svg,.el-submenu__title:hover span,.el-submenu__title:hover svg,.el-menu-item.is-active,.aui-sidebar__menu .el-submenu.is-active > .el-submenu__title{
+    color: #761E6A !important;
+  }
+</style>
 <style lang="scss" scoped>
   ::v-deep .el-menu-item {
     padding-left: 50px!important;
   }
-.onws {
-  background-color: #e9f0ff;
-  color: #2e69eb !important;
-}
-.el-submenu__title:hover {
-  .on {
+
+  .onws {
     background-color: #e9f0ff;
     color: #2e69eb !important;
   }
-}
+  .el-submenu__title:hover {
+    .on {
+      background-color: #e9f0ff;
+      color: #2e69eb !important;
+    }
+  }
 </style>

+ 2 - 5
src/views/main-sidebar.vue

@@ -18,7 +18,7 @@
         class="aui-sidebar__menu"
       >
         <sub-menu
-          v-for="(menu, index) in testMenus"
+          v-for="(menu, index) in erjiMenu"
           :key="menu.id"
           :menu="menu"
           :index="index"
@@ -26,7 +26,7 @@
       </el-menu>
     </div>
     <div class="user_info">
-      <div class="left" @click="handleUser">
+      <div class="left" @click.self="handleUser">
         <img src="@/assets/images/agent/avatar.png">
         <div class="name">
           <span>{{ userName }}</span>
@@ -38,10 +38,7 @@
 </template>
 
 <script>
-var timer = null;
-import Cookies from "js-cookie";
 import SubMenu from './main-sidebar-sub-menu'
-import { getUUID } from "@/utils";
 export default {
   data () {
     return {

+ 5 - 0
src/views/modules/agent/dialog.vue

@@ -30,6 +30,7 @@
 </template>
 
 <script setup name="">
+    import { getContractList } from '@/api/agent/index.js'
     import { ref, getCurrentInstance } from 'vue'
     const { proxy } = getCurrentInstance();
     
@@ -43,6 +44,10 @@
     }
 
     const handleQuestion = () => {
+        getContractList(question.value).then(res=>{
+            console.log(res,'res')
+        })
+
         proxy.$router.push({
             path: '/agentDialogResult',
             query: {

+ 0 - 184
src/views/pages/login copy.vue

@@ -1,184 +0,0 @@
-<template>
-  <div
-    v-loading.fullscreen.lock="loading"
-    :element-loading-text="$t('loading')"
-    class="aui-wrapper"
-  >
-    <template v-if="!loading">
-      <main-sidebar />
-      <div
-        class="aui-content__wrapper"
-        :style="{
-          'margin-left': '240px',
-          width: 'calc(100% - 240px)',
-          'overflow-y':'auto'
-        }"
-      >
-        <div class="page">
-            <div class="box">
-                <div class="title">{{helloWord}}</div>
-                <div class="tip">{{helloTip}}</div>
-                <div class="ask">
-                    <div class="question">
-                        <el-input type="textarea" :rows="2" v-model="question" placeholder="有什么问题,您可以对我提问!" resize="none"></el-input>
-                    </div>
-                    <div class="btns">
-                        <div class="left">
-                            <div class="copy">
-                                <img src="@/assets/images/agent/link.png">
-                            </div>
-                            <div class="think" :class="{'active':deepThink}" @click="toDeepThink">
-                                <img src="@/assets/images/agent/think.png">
-                                <span>深度思考</span>
-                            </div>
-                        </div>
-                        <div class="right">
-                            <img src="@/assets/images/agent/photo.png">
-                            <img src="@/assets/images/agent/upload.png">
-                            <img src="@/assets/images/agent/input_hou.png" v-if="question" @click="handleQuestion">
-                            <img src="@/assets/images/agent/input_qian.png" v-else>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-      </div>
-    </template>
-  </div>
-</template>
-
-<script setup name="">
-  import MainSidebar from "../main-sidebar.vue";
-  import { ref, getCurrentInstance } from 'vue'
-  const { proxy } = getCurrentInstance();
-  
-  const helloWord = ref('Hi~,我是PERILL Coach')
-  const helloTip = ref('可以为你提供PERILL模型,个人教练、团队教练相关的理论、案例、分析报告等知识的查询和解答')
-  const question = ref('')
-  const deepThink = ref(false)
-
-  const toDeepThink = () => {
-      deepThink.value = !deepThink.value
-  }
-
-  const handleQuestion = () => {
-      proxy.$router.push({
-          path: '/agentDialogResult',
-          query: {
-              question: question.value,
-              deepThink: deepThink.value
-          }
-      })
-  }
-</script>
-
-<style scoped lang="scss">
-  ::v-deep .el-textarea__inner{
-      background: #FFFFFF;
-      border-radius: 10px !important;
-      border: none !important;
-      padding: 0 !important;
-  }
-
-  .page{
-      width: 100%;
-      height: 100%;
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      .box{
-          .title{
-              font-family: DingTalk, DingTalk;
-              font-weight: normal;
-              font-size: 24px;
-              color: #111111;
-              line-height: 29px;
-          }
-          .tip{
-              font-family: PingFangSC, PingFang SC;
-              font-weight: 400;
-              font-size: 14px;
-              color: #9CA3AF;
-              line-height: 20px;
-              margin-top: 11px;
-          }
-
-          .ask{
-              width: 980px;
-              height: 148px;
-              background: #FFFFFF;
-              border-radius: 10px;
-              border: 1px solid #E5E7EB;
-              padding: 20px;
-              box-sizing: border-box;
-              margin-top: 80px;
-              position: relative;
-              .btns{
-                  width: 940px;
-                  position: absolute;
-                  left: 20px;
-                  bottom: 20px;
-                  display: flex;
-                  justify-content: space-between;
-                  .left{
-                      display: flex;
-                      .copy{
-                          width: 36px;
-                          height: 36px;
-                          background: #FFFFFF;
-                          border-radius: 6px;
-                          border: 1px solid #E5E7EB;
-                          cursor: pointer;
-                          display: flex;
-                          align-items: center;
-                          justify-content: center;
-                          img{
-                              width: 14px;
-                              height: 16px;
-                          }
-                      }
-                      .think{
-                          width: 96px;
-                          height: 36px;
-                          background: #FFFFFF;
-                          border-radius: 6px;
-                          border: 1px solid #E5E7EB;
-                          margin-left: 8px;
-                          display: flex;
-                          align-items: center;
-                          justify-content: center;
-                          cursor: pointer;
-                          img{
-                              width: 14px;
-                              height: 14px;
-                          }
-                          span{
-                              font-family: PingFangSC, PingFang SC;
-                              font-weight: 400;
-                              font-size: 14px;
-                              color: #111111;
-                              line-height: 20px;
-                              margin-left: 3px;
-                          }
-                          &.active{
-                              border: 1px solid #70b2df;
-                              span{
-                                  color: #70b2df;
-                              }
-                          }
-                      }
-                  }
-                  .right{
-                      display: flex;
-                      img{
-                          width: 30px;
-                          height: 30px;
-                          margin-left: 33px;
-                          cursor: pointer;
-                      }
-                  }
-              }
-          }
-      }
-  }
-</style>

+ 4 - 5
src/views/pages/login.vue

@@ -144,8 +144,6 @@
                 setCookie("", "", -1);
             }
 
-            return proxy.$router.push('agentDialog')
-
             // 获取菜单列表, 添加并全局变量保存
             proxy.$http.get("/sys/menu/nav", {
                 params: {
@@ -168,9 +166,9 @@
                         component: null,
                         name: "index",
                         meta: {
-                        ...window.SITE_CONFIG["contentTabDefault"],
-                        menuId: menu.id,
-                        title: menu.name,
+                            ...window.SITE_CONFIG["contentTabDefault"],
+                            menuId: menu.id,
+                            title: menu.name,
                         },
                     };
                     let URL = (menu.url || "").replace(/{{([^}}]+)?}}/g,(s1, s2) => eval(s2));
@@ -218,6 +216,7 @@
             accountForm.value.password = arr2[1];
           }
         }
+        checked.value = true;
       }
     }