|
@@ -22,24 +22,22 @@
|
|
|
<div>
|
|
<div>
|
|
|
<img src="@/assets/other/robot.gif" width="52" />
|
|
<img src="@/assets/other/robot.gif" width="52" />
|
|
|
<p>
|
|
<p>
|
|
|
- 信通小数<span>{{ slider[navIndex].title }}</span>
|
|
|
|
|
|
|
+ 上海电科院<span>{{ slider[navIndex].title }}</span>
|
|
|
</p>
|
|
</p>
|
|
|
<span>{{ slider[navIndex].dialog }}</span>
|
|
<span>{{ slider[navIndex].dialog }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</header>
|
|
</header>
|
|
|
<section :class="{ 'section-padding': showDialog }">
|
|
<section :class="{ 'section-padding': showDialog }">
|
|
|
- <!-- 知识问答 -->
|
|
|
|
|
- <DocumentAnswer v-if="navIndex === 0 && !showDialog" />
|
|
|
|
|
- <!-- 文档智能 -->
|
|
|
|
|
|
|
+ <!-- 报告生成 -->
|
|
|
|
|
+ <DocumentCombine v-if="navIndex === 0 && !showDialog" />
|
|
|
|
|
+ <!-- 报表合并 -->
|
|
|
<Document v-if="navIndex === 1 && !showDialog" />
|
|
<Document v-if="navIndex === 1 && !showDialog" />
|
|
|
- <!-- 文档出题 -->
|
|
|
|
|
|
|
+ <!-- 知识问答 -->
|
|
|
<DocumentQuestion v-if="navIndex === 2 && !showDialog" />
|
|
<DocumentQuestion v-if="navIndex === 2 && !showDialog" />
|
|
|
- <!-- 小数绘图 -->
|
|
|
|
|
- <PicArticle v-if="navIndex === 3 && !showDialog" />
|
|
|
|
|
- <!-- 智能数据 -->
|
|
|
|
|
- <Analysis v-if="navIndex === 4 && !showDialog" />
|
|
|
|
|
|
|
+ <!-- 文档智能 -->
|
|
|
|
|
+ <DocumentAnswer v-if="navIndex === 3 && !showDialog" />
|
|
|
<!-- 智能问答 -->
|
|
<!-- 智能问答 -->
|
|
|
- <Answer v-if="navIndex === 5 && !showDialog" />
|
|
|
|
|
|
|
+ <Answer v-if="navIndex === 4 && !showDialog" />
|
|
|
<!-- 文库详情 -->
|
|
<!-- 文库详情 -->
|
|
|
<DocumentDetail v-if="navIndex === -2" @go-back="goBack" />
|
|
<DocumentDetail v-if="navIndex === -2" @go-back="goBack" />
|
|
|
<dialog-wrap
|
|
<dialog-wrap
|
|
@@ -50,12 +48,26 @@
|
|
|
:readonly="readonly"
|
|
:readonly="readonly"
|
|
|
@setReadonly="setReadonly"
|
|
@setReadonly="setReadonly"
|
|
|
@goDocument="goDocument"
|
|
@goDocument="goDocument"
|
|
|
|
|
+ :agentId="agentIds[navIndex]"
|
|
|
:list="dialogList"
|
|
:list="dialogList"
|
|
|
/>
|
|
/>
|
|
|
</section>
|
|
</section>
|
|
|
- <footer v-if="navIndex !== -2">
|
|
|
|
|
|
|
+ <footer v-if="navIndex !== -2 && navIndex !== 0">
|
|
|
<message-input :readonly="readonly" eventName="open-dialog" />
|
|
<message-input :readonly="readonly" eventName="open-dialog" />
|
|
|
</footer>
|
|
</footer>
|
|
|
|
|
+ <footer v-if="navIndex === 0" class="upload-footer">
|
|
|
|
|
+ <p><span>标题</span></p>
|
|
|
|
|
+ <div><a-input :style="{ flex: '1' }" placeholder="请输入标题" allow-clear /></div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p><span>请上传文档</span></p>
|
|
|
|
|
+ <a-upload :style="{ width: '110px' }" action="/" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p><span>请上传中心动态</span></p>
|
|
|
|
|
+ <a-upload :style="{ width: '110px' }" action="/" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <a-button :style="{ width: '500px' }" type="primary" @click="beginCombine">开始</a-button>
|
|
|
|
|
+ </footer>
|
|
|
<a-tooltip :content="closeOthers ? '收起' : '展开'">
|
|
<a-tooltip :content="closeOthers ? '收起' : '展开'">
|
|
|
<div @click="openAll" v-if="navIndex !== -2">
|
|
<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" />
|
|
@@ -65,7 +77,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <right v-if="navIndex === 0 || navIndex === 2" />
|
|
|
|
|
|
|
+ <!-- <right v-if="navIndex === 0 || navIndex === 2" /> -->
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -76,6 +88,7 @@ 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 DocumentDetail from "./DocumentDetail.vue";
|
|
|
|
|
+import DocumentCombine from "./DocumentCombine.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";
|
|
@@ -98,7 +111,8 @@ export default defineComponent({
|
|
|
DocumentAnswer,
|
|
DocumentAnswer,
|
|
|
DocumentQuestion,
|
|
DocumentQuestion,
|
|
|
Analysis,
|
|
Analysis,
|
|
|
- DocumentDetail
|
|
|
|
|
|
|
+ DocumentDetail,
|
|
|
|
|
+ DocumentCombine
|
|
|
},
|
|
},
|
|
|
setup() {
|
|
setup() {
|
|
|
// nav对应的问答类型,4文库问答,对应的是knowledge类型
|
|
// nav对应的问答类型,4文库问答,对应的是knowledge类型
|
|
@@ -113,6 +127,7 @@ export default defineComponent({
|
|
|
const selectId = ref("");
|
|
const selectId = ref("");
|
|
|
const initDialog = ref(false);
|
|
const initDialog = ref(false);
|
|
|
const hideDialog = ref(false);
|
|
const hideDialog = ref(false);
|
|
|
|
|
+ const agentIds = ref([]);
|
|
|
const openAll = () => {
|
|
const openAll = () => {
|
|
|
closeOthers.value = !closeOthers.value;
|
|
closeOthers.value = !closeOthers.value;
|
|
|
};
|
|
};
|
|
@@ -153,7 +168,17 @@ export default defineComponent({
|
|
|
helper.$bus.emit("set-loading", false);
|
|
helper.$bus.emit("set-loading", false);
|
|
|
}, 20);
|
|
}, 20);
|
|
|
};
|
|
};
|
|
|
- onMounted(() => {
|
|
|
|
|
|
|
+ const beginCombine = () => {
|
|
|
|
|
+ dialogList.value = [];
|
|
|
|
|
+ showDialog.value = true;
|
|
|
|
|
+ initDialog.value = true;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ helper.$bus.emit("send-message", "开始");
|
|
|
|
|
+ }, 500);
|
|
|
|
|
+ };
|
|
|
|
|
+ onMounted(async () => {
|
|
|
|
|
+ const agents = await ajax.agent.getAgents();
|
|
|
|
|
+ agentIds.value = agents.map((data) => data.id);
|
|
|
helper.$bus.on("open-dialog", (value) => {
|
|
helper.$bus.on("open-dialog", (value) => {
|
|
|
dialogList.value = [];
|
|
dialogList.value = [];
|
|
|
showDialog.value = true;
|
|
showDialog.value = true;
|
|
@@ -164,10 +189,11 @@ export default defineComponent({
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
onBeforeUnmount(() => {
|
|
onBeforeUnmount(() => {
|
|
|
- helper.webSocket.close();
|
|
|
|
|
|
|
+ helper.webSocket?.close();
|
|
|
helper.$bus.off("open-dialog");
|
|
helper.$bus.off("open-dialog");
|
|
|
});
|
|
});
|
|
|
return {
|
|
return {
|
|
|
|
|
+ beginCombine,
|
|
|
selectId,
|
|
selectId,
|
|
|
navIndex,
|
|
navIndex,
|
|
|
selectNav,
|
|
selectNav,
|
|
@@ -184,13 +210,47 @@ export default defineComponent({
|
|
|
initDialog,
|
|
initDialog,
|
|
|
goDocument,
|
|
goDocument,
|
|
|
goBack,
|
|
goBack,
|
|
|
- hideDialog
|
|
|
|
|
|
|
+ hideDialog,
|
|
|
|
|
+ agentIds
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
.main {
|
|
.main {
|
|
|
|
|
+ .upload-footer {
|
|
|
|
|
+ margin-bottom: 50px;
|
|
|
|
|
+ padding: 20px;
|
|
|
|
|
+ width: 540px;
|
|
|
|
|
+ border: 1px solid #eee;
|
|
|
|
|
+ > div {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ width: 500px;
|
|
|
|
|
+ > p {
|
|
|
|
|
+ width: 150px;
|
|
|
|
|
+ margin-right: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ p {
|
|
|
|
|
+ span {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ &:after {
|
|
|
|
|
+ content: "*";
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ color: red;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ right: -10px;
|
|
|
|
|
+ top: -5px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ > p,
|
|
|
|
|
+ > div {
|
|
|
|
|
+ margin: 10px 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
display: flex;
|
|
display: flex;
|