|
@@ -16,7 +16,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="wrap">
|
|
<div class="wrap">
|
|
|
<Index :number="swiperNumber" v-if="navIndex === -1" @select-nav="selectNav" />
|
|
<Index :number="swiperNumber" v-if="navIndex === -1" @select-nav="selectNav" />
|
|
|
- <div class="border-wrap" v-else>
|
|
|
|
|
|
|
+ <div :class="{ 'border-wrap': true, 'border-no-wrap': navIndex === -2 }" v-else>
|
|
|
<div>
|
|
<div>
|
|
|
<header v-if="!showDialog">
|
|
<header v-if="!showDialog">
|
|
|
<div>
|
|
<div>
|
|
@@ -40,22 +40,26 @@
|
|
|
<Analysis v-if="navIndex === 4 && !showDialog" />
|
|
<Analysis v-if="navIndex === 4 && !showDialog" />
|
|
|
<!-- 智能问答 -->
|
|
<!-- 智能问答 -->
|
|
|
<Answer v-if="navIndex === 5 && !showDialog" />
|
|
<Answer v-if="navIndex === 5 && !showDialog" />
|
|
|
|
|
+ <!-- 文库详情 -->
|
|
|
|
|
+ <DocumentDetail v-if="navIndex === -2" @go-back="goBack" />
|
|
|
<dialog-wrap
|
|
<dialog-wrap
|
|
|
v-if="showDialog && initDialog"
|
|
v-if="showDialog && initDialog"
|
|
|
|
|
+ v-show="!hideDialog"
|
|
|
:type="dialogType[navIndex]"
|
|
:type="dialogType[navIndex]"
|
|
|
:agentInfo="data"
|
|
:agentInfo="data"
|
|
|
:userInfo="userInfo"
|
|
:userInfo="userInfo"
|
|
|
:isSetting="false"
|
|
:isSetting="false"
|
|
|
:readonly="readonly"
|
|
:readonly="readonly"
|
|
|
@setReadonly="setReadonly"
|
|
@setReadonly="setReadonly"
|
|
|
|
|
+ @goDocument="goDocument"
|
|
|
:list="dialogList"
|
|
:list="dialogList"
|
|
|
/>
|
|
/>
|
|
|
</section>
|
|
</section>
|
|
|
- <footer>
|
|
|
|
|
|
|
+ <footer v-if="navIndex !== -2">
|
|
|
<message-input :readonly="readonly" eventName="open-dialog" />
|
|
<message-input :readonly="readonly" eventName="open-dialog" />
|
|
|
</footer>
|
|
</footer>
|
|
|
<a-tooltip :content="closeOthers ? '收起' : '展开'">
|
|
<a-tooltip :content="closeOthers ? '收起' : '展开'">
|
|
|
- <div @click="openAll">
|
|
|
|
|
|
|
+ <div @click="openAll" v-if="navIndex !== -2">
|
|
|
<img src="@/assets/other/open.svg" width="20" v-if="closeOthers" />
|
|
<img src="@/assets/other/open.svg" width="20" v-if="closeOthers" />
|
|
|
<img src="@/assets/other/close.svg" width="20" v-else />
|
|
<img src="@/assets/other/close.svg" width="20" v-else />
|
|
|
</div>
|
|
</div>
|
|
@@ -73,6 +77,7 @@ import DialogWrap from "../components/DialogWrap.vue";
|
|
|
import Slider from "../components/Slider.vue";
|
|
import Slider from "../components/Slider.vue";
|
|
|
import History from "../components/History.vue";
|
|
import History from "../components/History.vue";
|
|
|
import MessageInput from "../components/MessageInput.vue";
|
|
import MessageInput from "../components/MessageInput.vue";
|
|
|
|
|
+import DocumentDetail from "./DocumentDetail.vue";
|
|
|
import Index from "./Index.vue";
|
|
import Index from "./Index.vue";
|
|
|
import Answer from "./Answer.vue";
|
|
import Answer from "./Answer.vue";
|
|
|
import Document from "./Document.vue";
|
|
import Document from "./Document.vue";
|
|
@@ -94,11 +99,12 @@ export default defineComponent({
|
|
|
PicArticle,
|
|
PicArticle,
|
|
|
DocumentAnswer,
|
|
DocumentAnswer,
|
|
|
DocumentQuestion,
|
|
DocumentQuestion,
|
|
|
- Analysis
|
|
|
|
|
|
|
+ Analysis,
|
|
|
|
|
+ DocumentDetail
|
|
|
},
|
|
},
|
|
|
setup() {
|
|
setup() {
|
|
|
// nav对应的问答类型,4文库问答,对应的是knowledge类型
|
|
// nav对应的问答类型,4文库问答,对应的是knowledge类型
|
|
|
- const dialogType = ["normal", "normal", "normal", "normal", "knowledge", "normal", "normal", "normal"];
|
|
|
|
|
|
|
+ const dialogType = ["knowledge", "normal", "normal", "normal", "normal", "normal", "normal", "normal"];
|
|
|
const { config, helper } = inject("$global");
|
|
const { config, helper } = inject("$global");
|
|
|
const closeOthers = ref(false);
|
|
const closeOthers = ref(false);
|
|
|
const swiperNumber = ref(5);
|
|
const swiperNumber = ref(5);
|
|
@@ -108,6 +114,7 @@ export default defineComponent({
|
|
|
const dialogList = ref([]);
|
|
const dialogList = ref([]);
|
|
|
const selectId = ref("");
|
|
const selectId = ref("");
|
|
|
const initDialog = ref(false);
|
|
const initDialog = ref(false);
|
|
|
|
|
+ const hideDialog = ref(false);
|
|
|
const userInfo = {
|
|
const userInfo = {
|
|
|
name: "奇橙",
|
|
name: "奇橙",
|
|
|
avatar: "https://s21.ax1x.com/2024/04/18/pFzyA0O.png"
|
|
avatar: "https://s21.ax1x.com/2024/04/18/pFzyA0O.png"
|
|
@@ -138,6 +145,14 @@ export default defineComponent({
|
|
|
const setReadonly = (status) => {
|
|
const setReadonly = (status) => {
|
|
|
readonly.value = status;
|
|
readonly.value = status;
|
|
|
};
|
|
};
|
|
|
|
|
+ const goDocument = () => {
|
|
|
|
|
+ navIndex.value = -2;
|
|
|
|
|
+ hideDialog.value = true;
|
|
|
|
|
+ };
|
|
|
|
|
+ const goBack = () => {
|
|
|
|
|
+ navIndex.value = 0;
|
|
|
|
|
+ hideDialog.value = false;
|
|
|
|
|
+ };
|
|
|
const selectHistory = (id) => {
|
|
const selectHistory = (id) => {
|
|
|
showDialog.value = true;
|
|
showDialog.value = true;
|
|
|
selectId.value = id;
|
|
selectId.value = id;
|
|
@@ -182,7 +197,10 @@ export default defineComponent({
|
|
|
openAll,
|
|
openAll,
|
|
|
dialogType,
|
|
dialogType,
|
|
|
dialogList,
|
|
dialogList,
|
|
|
- initDialog
|
|
|
|
|
|
|
+ initDialog,
|
|
|
|
|
+ goDocument,
|
|
|
|
|
+ goBack,
|
|
|
|
|
+ hideDialog
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -211,6 +229,15 @@ export default defineComponent({
|
|
|
padding: 30px 16px 30px 40px;
|
|
padding: 30px 16px 30px 40px;
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
|
|
+ &.border-no-wrap {
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ > div {
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ > section.section-padding {
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
> div {
|
|
> div {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100%;
|
|
height: 100%;
|