|
|
@@ -4,12 +4,12 @@
|
|
|
|
|
|
<div class="main">
|
|
|
<div :class="{ 'history-wrap': true, 'history-wrap-open': !closeOthers && navId > -1 }">
|
|
|
- <History :list="historyList" @set-new="() => {
|
|
|
- showDialog = false;
|
|
|
- selectId = selectId;
|
|
|
- historyMode = false;
|
|
|
- }
|
|
|
- " :selectId="selectId" @handle-click="selectHistory" />
|
|
|
+ <History
|
|
|
+ :list="historyList"
|
|
|
+ :selectId="selectId"
|
|
|
+ @handle-click="selectHistory"
|
|
|
+ @set-new="handelSetNewChat"
|
|
|
+ />
|
|
|
</div>
|
|
|
|
|
|
<div class="wrap">
|
|
|
@@ -50,9 +50,19 @@
|
|
|
<!-- 文库详情 -->
|
|
|
<DocumentDetail v-if="navId === -2" @go-back="goBack" />
|
|
|
|
|
|
- <dialog-wrap v-if="showDialog && initDialog" v-show="!hideDialog" :type="dialogType[navId]"
|
|
|
- :isSetting="false" :readonly="readonly" @setReadonly="setReadonly" @changeParse="changeParse"
|
|
|
- @goDocument="goDocument" :agentId="selectId" :dialogId="dialogId" :list="dialogList" />
|
|
|
+ <dialog-wrap
|
|
|
+ v-if="showDialog && initDialog"
|
|
|
+ v-show="!hideDialog"
|
|
|
+ :type="dialogType[navId]"
|
|
|
+ :isSetting="false"
|
|
|
+ :readonly="readonly"
|
|
|
+ :agentId="selectId"
|
|
|
+ :dialogId="dialogId"
|
|
|
+ :list="dialogList"
|
|
|
+ @setReadonly="setReadonly"
|
|
|
+ @changeParse="changeParse"
|
|
|
+ @goDocument="goDocument"
|
|
|
+ />
|
|
|
</section>
|
|
|
|
|
|
<footer v-if="navId !== -2 && navId !== 0 && navId !== 3 && navId !== 6 && !historyMode">
|
|
|
@@ -408,10 +418,22 @@ export default defineComponent({
|
|
|
}, 200);
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
onBeforeUnmount(() => {
|
|
|
helper.webSocket?.close();
|
|
|
helper.$bus.off("open-dialog");
|
|
|
});
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 点击新建对话按钮
|
|
|
+ */
|
|
|
+ const handelSetNewChat = () => {
|
|
|
+ showDialog.value = false;
|
|
|
+ // selectId = selectId;
|
|
|
+ historyMode.value = false;
|
|
|
+ setReadonly(false);
|
|
|
+ };
|
|
|
+
|
|
|
return {
|
|
|
SYSTEM_NAME,
|
|
|
customChange,
|
|
|
@@ -443,7 +465,9 @@ export default defineComponent({
|
|
|
agentIds,
|
|
|
textValue,
|
|
|
parseStatus,
|
|
|
- maxLength
|
|
|
+ maxLength,
|
|
|
+
|
|
|
+ handelSetNewChat
|
|
|
};
|
|
|
}
|
|
|
});
|