liudong
2024-08-23 1cf5e0094e4faffcaf188cca4ae98969f558d168
名称修改
1个文件已修改
15 ■■■■■ 已修改文件
src/views/sessionManager/index.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sessionManager/index.vue
@@ -30,7 +30,7 @@
                      overflow: hidden;
                      text-overflow: ellipsis;
                      white-space: nowrap;
                    ">{{ agentTitle }}</span>
                    ">{{ from.name }}</span>
                    <icon-down style="margin-left: 4px" />
                  </a-button>
                  <template #content>
@@ -392,11 +392,11 @@
      <a-form
        ref="formRef"
        :rules="rules"
        :model="chatObj"
        :model="from"
        @submit="handleSubmit"
      >
        <a-form-item field="name" label="名称">
          <a-input v-model="agentTitle" placeholder="请输入名称" />
          <a-input v-model="from.name" placeholder="请输入名称" />
        </a-form-item>
        <a-form-item>
          <div style="width: 100%; text-align: right">
@@ -471,6 +471,9 @@
  const agentType = ref('1');
  const agentTitle = ref('未命名会话');
  let chatObj = reactive({});
  let from = reactive({
    name:'未命名会话',
  });
  const isStopChat = ref(false);
  const currIndex = ref(0);
  const displayedText = ref(''); // 正在显示的文字
@@ -505,12 +508,10 @@
  const handleSubmit = async ({ values, errors }) => {
    if (errors) return;
    // chatObj.name = agentTitle.value;
    // chatObj.conversation_id = chatObj.id;
    let chatData = {
      id: chatObj.id,
      conversation_id: chatObj.id,
      name: agentTitle.value,
      name: from.name,
    };
    const { code, data } = await addSessionApi(chatData);
    if (data) {
@@ -896,6 +897,7 @@
      sessionDetailList.value = data.message;
      messagenList.value = data;
      agentTitle.value = data.name;
      from.name = data.name;
      refreshScroll(); //刷新滚动条位置
      isStopChat.value = false;
    }
@@ -909,6 +911,7 @@
  const querySessionDetail = async (session) => {
    sectionList.value = session;
    activeSessionId.value = session.id;
    from.name = session.name;
    const { code, data } = await getSessionDetailsApi(session.id);
    if (code === 200) {
      sessionDetailList.value = data.message;