zhangxiao
2024-08-16 a606f590dc86a848894dc9fa263a92f343e767e2
Merge branch 'master' of http://192.168.5.5:10010/r/web/flow_web
7个文件已修改
250 ■■■■■ 已修改文件
src/views/authority/role/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/authority/users/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sessionManager/components/agentSession.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sessionManager/components/chatMenu.vue 157 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sessionManager/components/historySession.vue 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sessionManager/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sessionManager/style/layout.css 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/authority/role/index.vue
@@ -142,7 +142,6 @@
              v-model:expanded-keys="expandKdysMenu"
              :checkable="true"
              :data="treeDataMenu"
              :show-line="showLineMenu"
              @check="onCheckMenu"
              :fieldNames="{
                key: 'menuId',
src/views/authority/users/index.vue
@@ -217,7 +217,9 @@
      v-model:visible="resourcevisible"
      v-if="resourcevisible"
      title="用户所有权限"
      @cancel="handleCancel(3)"
      okText="关闭"
      hide-Cancel="true"
      @ok="handleCancel(3)"
    >
      <div :style="{ 'display': 'flex', 'flex-direction': 'column' }">
        <a-card
@@ -532,6 +534,7 @@
      checkStrictlyMenu.value = [];
      checkStrictlyKnowledge.value = [];
      checkStrictlyDialog.value = [];
      checkStrictlyAgent.value = [];
      selectUser.value = record;
      let agents;
@@ -578,12 +581,7 @@
          });
        });
      }
      let dialogs;
      if (record.dialogs) {
        dialogs = record.dialogs;
      } else {
        dialogs = record.roles ? record.roles[0].dialogs : null;
      }
      let dialogs = record.roles ? record.roles[0].dialogs : null;
      if (dialogs) {
        dialogs.forEach((val) => {
          checkStrictlyDialog.value.push({
src/views/sessionManager/components/agentSession.vue
@@ -1,5 +1,12 @@
<template>
  <!--      内容-->
  <div class="header___lEPyH">
    <div class="chatHeader">
      <div class="chatHeaderBox">
        <span class="title">{{agentTitle}}</span>
      </div>
    </div>
  </div>
  <a-scrollbar
    ref="scrollbar"
    id="agentHome"
@@ -118,6 +125,7 @@
const dialogId = ref('');
const chatDis = ref(false);
const loading = ref(false);
const agentTitle = ref("未命名会话");
const currIndex = ref(0);
@@ -234,6 +242,7 @@
  if (code == 0) {
    console.log(data,'会话详情');
    sessionDetailList.value = data.dsl.messages;
    agentTitle.value = data.name || '未命名会话';
    refreshScroll(); //刷新滚动条位置
  }
};
@@ -514,4 +523,26 @@
    }
  }
}
.header___lEPyH {
  width: 100%;
  height: 46px;
  position: relative;
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(15px);
  .chatHeaderBox {
    width: auto;
    border-radius: 8px;
    padding: 4px 20px;
    transition: all var(--animation-duration) var(--animation-transition);
    display: flex;
    align-items: flex-end;
    overflow: hidden;        /* 隐藏超出的内容 */
    text-overflow: ellipsis; /* 使用省略号来代替被隐藏的文字 */
    white-space: nowrap;     /* 不换行,使内容在一行内显示 */
    max-width: 200px;
  }
}
</style>
src/views/sessionManager/components/chatMenu.vue
@@ -2,7 +2,7 @@
  <div class="layoutNavMoveCenter">
    <div class="layoutNavMove___j5ets">
      <div class="myAgent___djnd_ myAgentAnim myAgentlight___yK7Gk">
<!--        <div data-testid="msh-sidebar-main" class="myAgentHome___PG6IZ"></div>-->
        <div data-testid="msh-sidebar-main" class="myAgentHome___PG6IZ"></div>
        <div class="myAgentLine___Isl6E"></div>
        <div class="myAgentTool___Y1_mC" data-testid="msh-sidebar-new" @click="()=>{
          EventBus.emit('newChat')
@@ -32,91 +32,69 @@
            alt=""></div>
        </div>
        <div class="myAgentLine___Isl6E" style="margin-top: 4px;"></div>
        <div class="myAgentBox___zrCit">
          <div class="myAgentBoxImg___Mgu9e">
            <div class="myAgentBoxImgLayout___u69B_">
              <div class="MuiBox-root css-5nczy5"><img
                src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/academic.png" alt=""
                style="border-radius: 50%; width: 100%; height: 100%;"></div>
              <span class="myAgentBoxImgLayoutTip___xHV4m">学术搜索</span></div>
            <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">
              <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>
        <div id="myAgentBox">
          <div class="myAgentBox___zrCit">
            <div class="myAgentBoxImg___Mgu9e">
              <div class="myAgentBoxImgLayout___u69B_">
                <div class="MuiBox-root css-5nczy5"><img
                  src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/academic.png" alt=""
                  style="border-radius: 50%; width: 100%; height: 100%;"></div>
                <span class="myAgentBoxImgLayoutTip___xHV4m">学术搜索</span></div>
              <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">
                <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>
              </div>
            </div>
          </div>
          <div class="myAgentBox___zrCit">
            <div class="myAgentBoxImg___Mgu9e">
              <div class="myAgentBoxImgLayout___u69B_">
                <div class="MuiBox-root css-5nczy5"><img
                  src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/paper_rewrite.png" alt=""
                  style="border-radius: 50%; width: 100%; height: 100%;"></div>
                <span class="myAgentBoxImgLayoutTip___xHV4m">论文改写</span></div>
              <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">
                <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>
              </div>
            </div>
          </div>
          <div class="myAgentBox___zrCit">
            <div class="myAgentBoxImg___Mgu9e">
              <div class="myAgentBoxImgLayout___u69B_">
                <div class="MuiBox-root css-5nczy5"><img
                  src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/prompt.png" alt=""
                  style="border-radius: 50%; width: 100%; height: 100%;"></div>
                <span class="myAgentBoxImgLayoutTip___xHV4m">提示词专家</span></div>
              <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">
                <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>
              </div>
            </div>
          </div>
          <div class="myAgentBox___zrCit">
            <div class="myAgentBoxImg___Mgu9e">
              <div class="myAgentBoxImgLayout___u69B_">
                <div class="MuiBox-root css-5nczy5"><img
                  src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/taro.png" alt=""
                  style="border-radius: 50%; width: 100%; height: 100%;"></div>
                <span class="myAgentBoxImgLayoutTip___xHV4m">塔罗师</span></div>
              <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">
                <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>
              </div>
            </div>
          </div>
          <div class="myAgentBox___zrCit">
            <div class="myAgentBoxImg___Mgu9e">
              <div class="myAgentBoxImgLayout___u69B_">
                <div class="MuiBox-root css-5nczy5"><img
                  src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/guess.png" alt=""
                  style="border-radius: 50%; width: 100%; height: 100%;"></div>
                <span class="myAgentBoxImgLayoutTip___xHV4m">猜猜我在想谁</span></div>
              <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">
                <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>
              </div>
            </div>
          </div>
        </div>
        <div class="myAgentBox___zrCit">
          <div class="myAgentBoxImg___Mgu9e">
            <div class="myAgentBoxImgLayout___u69B_">
              <div class="MuiBox-root css-5nczy5"><img
                src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/paper_rewrite.png" alt=""
                style="border-radius: 50%; width: 100%; height: 100%;"></div>
              <span class="myAgentBoxImgLayoutTip___xHV4m">论文改写</span></div>
            <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">
              <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>
            </div>
          </div>
        </div>
        <div class="myAgentBox___zrCit">
          <div class="myAgentBoxImg___Mgu9e">
            <div class="myAgentBoxImgLayout___u69B_">
              <div class="MuiBox-root css-5nczy5"><img
                src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/prompt.png" alt=""
                style="border-radius: 50%; width: 100%; height: 100%;"></div>
              <span class="myAgentBoxImgLayoutTip___xHV4m">提示词专家</span></div>
            <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">
              <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>
            </div>
          </div>
        </div>
        <div class="myAgentBox___zrCit">
          <div class="myAgentBoxImg___Mgu9e">
            <div class="myAgentBoxImgLayout___u69B_">
              <div class="MuiBox-root css-5nczy5"><img
                src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/taro.png" alt=""
                style="border-radius: 50%; width: 100%; height: 100%;"></div>
              <span class="myAgentBoxImgLayoutTip___xHV4m">塔罗师</span></div>
            <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">
              <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>
            </div>
          </div>
        </div>
        <div class="myAgentBox___zrCit">
          <div class="myAgentBoxImg___Mgu9e">
            <div class="myAgentBoxImgLayout___u69B_">
              <div class="MuiBox-root css-5nczy5"><img
                src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/guess.png" alt=""
                style="border-radius: 50%; width: 100%; height: 100%;"></div>
              <span class="myAgentBoxImgLayoutTip___xHV4m">猜猜我在想谁</span></div>
            <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">
              <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>
            </div>
          </div>
        </div>
        <div class="myAgentBox___zrCit">
          <div class="myAgentBoxImg___Mgu9e">
            <div class="myAgentBoxImgLayout___u69B_">
              <div class="MuiBox-root css-5nczy5"><img
                src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/guess.png" alt=""
                style="border-radius: 50%; width: 100%; height: 100%;"></div>
              <span class="myAgentBoxImgLayoutTip___xHV4m">猜猜我在想谁</span></div>
            <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">
              <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>
            </div>
          </div>
        </div>
        <div class="myAgentBox___zrCit">
          <div class="myAgentBoxImg___Mgu9e">
            <div class="myAgentBoxImgLayout___u69B_">
              <div class="MuiBox-root css-5nczy5"><img
                src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/guess.png" alt=""
                style="border-radius: 50%; width: 100%; height: 100%;"></div>
              <span class="myAgentBoxImgLayoutTip___xHV4m">猜猜我在想谁</span></div>
            <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">
              <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>
            </div>
          </div>
        </div>
        <div class="myAgentLine___Isl6E" style="margin-top: 4px;"></div>
<!--        <div class="myAgentLine___Isl6E" style="margin-top: 4px;"></div>-->
      </div>
    </div>
  </div>
@@ -133,6 +111,13 @@
import { Message } from "@arco-design/web-vue";
import EventBus from '@/utils/EventBus';
</script>
<style scoped lang="less">
  @import "@/views/sessionManager/style/layout.css";
@@ -143,8 +128,10 @@
    height: calc(100vh - 160px); /* 或者指定高度 */
    position: relative;
  }
  .layoutNavMove___j5ets{
  #myAgentBox{
    //width: 100%;
    //max-height: 220px;
    //overflow: hidden;
  }
src/views/sessionManager/components/historySession.vue
@@ -56,13 +56,22 @@
                      />
                      {{ session.name }}
                    </div>
                    <div class="time"
                    >{{
                        moment(new Date(session.create_time)).format(
                          'YYYY-MM-DD HH:mm:ss'
                        )
                      }}
                    </div>
                    <a-popover position="rt">
                      <div class="time"
                      >{{
                          moment(new Date(session.create_time)).format(
                            'YYYY-MM-DD HH:mm:ss'
                          )
                        }}
                      </div>
                      <template #content>
                        <span
                          style="cursor: pointer; color: #4977ba; font-size: 12px"
                          @click="deleteSession(session)"
                        ><icon-delete style="font-size: 14px" />删除</span
                        >
                      </template>
                    </a-popover>
                  </div>
                </div>
              </a-scrollbar>
@@ -85,8 +94,10 @@
  chatApi,
  getDialogListApi,
  getSessionDetailsApi,
  deleteSessionApi,
  sessionListApi
} from "@/api/session";
import { queryCanvasList } from "@/api/Agent";
const emit = defineEmits(["querySessionDetail","changeAgentType"]);
import logo from "@/assets/images/model.png";
@@ -161,6 +172,14 @@
  }
};
//根据会话id删除会话
const deleteSession = async (session) => {
  const { code } = await deleteSessionApi([session.id]);
  if (code === 200) {
    Message.success('删除成功');
    querySessionList('');
  }
};
const querySessionDetail = async (session) => {
  console.log(session, 'session');
@@ -168,13 +187,15 @@
  emit('querySessionDetail',session);
}
onBeforeMount(()=>{
  DialogList()
  // DialogList()
  querySessionList('');
})
onMounted(() => {
  EventBus.on("history", () => {
    emit('changeAgentType','3');
    DialogList()
    // DialogList()
    querySessionList('');
  });
})
src/views/sessionManager/index.vue
@@ -755,6 +755,10 @@
    transition: all var(--animation-duration) var(--animation-transition);
    display: flex;
    align-items: flex-end;
    overflow: hidden;        /* 隐藏超出的内容 */
    text-overflow: ellipsis; /* 使用省略号来代替被隐藏的文字 */
    white-space: nowrap;     /* 不换行,使内容在一行内显示 */
    max-width: 200px;
  }
}
</style>
src/views/sessionManager/style/layout.css
@@ -1362,7 +1362,7 @@
    height: 28px;
    line-height: 28px;
    text-align: center;
    content: "\56de\5230\9996\9875";
    /*content: "\56de\5230\9996\9875";*/
    position: absolute;
    left: 64px;
    display: none;
@@ -1378,7 +1378,7 @@
.myAgent___djnd_ .myAgentHome___PG6IZ {
    width: 32px;
    height: 32px;
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABhCAYAAAApxKSdAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAUUSURBVHgB7Z29bhtH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dz0lBQkBflkMBjMU5iL13pXRb8fYAJrB/a2db0oFHthAOEUliaYFHE+aaUBdZsvvFhApyM0idYZwOCvW4JmIWdSzPmidQaYrAGZ7iX4oFUGnJ2dGdUCTRqMozeANQCLsE6nA10JG/0Mx4KmDMbBCjEWR2yxu8LAM98vXelmCA2ovVLCI8EMYODWbpbvCXtTBzQVMSAwYkBgxIDAtNKAXWdGIRADAiMpKDA0IIMQikx6QGDEgMCIAYGRMSAsMgaEhgbcQgjFa+kBYZnIGBCWWzEgLPNBOJ6Fk/aR8Y5ZCvktKwX/PJZ7xoVjfs+4chYU11tK2sE85qUBLyH4Zh5z6QHhGPOf6r2j+TEbcgdFP2RaHX5TrYQlDflj5RXE5Q1cG/lWnhYpReUGKdUewGnRmhvnCJbgmxey8sHiZ8iwF3AsUBBckKHI/SWLq6HsBc8huML4DiK80D6WnBqLzN68UFCmopheYJOVYgcU5FOVbAVfYUcUZGoaLPglCtITdg2+tZUFBTFh2+ArWEYh/7z0WIIQSiM43lt5AWAmWhLHylN4QmkNEXfAbGqEQKsHSfHLYwiSq8AnaAAKeaW3D8VbijwNW5nh3IN9FPI/jnpaPKZi2/SfFuJu4W3x9RqWL+N5C+7ruKpBAgLkAAAAAElFTkSuQmCC) no-repeat;
    background: url('../../../assets/images/icon-logo.png') no-repeat;
    background-size: 100% 100%;
    cursor: pointer;
    margin-bottom: 16px
@@ -1508,7 +1508,7 @@
}
.myAgent___djnd_ .myAgentTool___Y1_mC .myAgentToolIconSquare___Rj1o_:after {
    width: 70px;
    width: 80px;
    height: 28px;
    line-height: 28px;
    text-align: center;