提交 ebb214c2 authored 作者: coderBryanFu's avatar coderBryanFu

update

上级 d39785ae
...@@ -50,6 +50,10 @@ import WrittingAsstaint from '@/views/writtingAsstaint/index.vue' ...@@ -50,6 +50,10 @@ import WrittingAsstaint from '@/views/writtingAsstaint/index.vue'
import Portal1 from '@/views/portals/portal1/index.vue'; import Portal1 from '@/views/portals/portal1/index.vue';
import Portal2 from '@/views/portals/portal2/index.vue'; import Portal2 from '@/views/portals/portal2/index.vue';
// 综合搜索
import ComprehensiveSearch from '@/views/comprehensiveSearch/index.vue'
import SearchResults from '@/views/comprehensiveSearch/searchResults/index.vue'
const routes = [ const routes = [
// 智能写报 // 智能写报
{ {
...@@ -398,7 +402,7 @@ const routes = [ ...@@ -398,7 +402,7 @@ const routes = [
} }
}, },
// 门户路由放在这块 // 门户
{ {
path: "/portal1", path: "/portal1",
name: "portal1", name: "portal1",
...@@ -416,6 +420,23 @@ const routes = [ ...@@ -416,6 +420,23 @@ const routes = [
} }
}, },
// 综合搜索
{
path: "/comprehensiveSearch",
name: "comprehensiveSearch",
component: ComprehensiveSearch,
meta: {
title: "综合搜索"
}
},
{
path: "/searchResults",
name: "searchResults",
component: SearchResults,
meta: {
title: "搜索结果"
}
},
]; ];
const router = createRouter({ const router = createRouter({
......
差异被折叠。
const getWordCloudChart = (data) => {
const option = {
grid: {
left: 0,
top: 0,
right: 0,
bottom: 0,
},
series: [
{
type: "wordCloud",
shape: "rect", //
// 其他形状你可以使用形状路径
// 或者自定义路径
// shape: 'circle' // 圆形(默认)
// shape: 'rect' // 矩形
// shape: 'roundRect' // 圆角矩形
// shape: 'triangle' // 三角形
// shape: 'diamond' // 菱形
// shape: 'pentagon' // 五边形
// shape: 'star' // 星形
// shape: 'cardioid' // 心形
gridSize: 5, // 网格大小,影响词间距。
sizeRange: [10, 30], // 定义词云中文字大小的范围
rotationRange: [0, 0],
rotationStep: 10,
drawOutOfBound: false, // 是否超出画布
// 字体
textStyle: {
// normal: {
// color: function () {
// return 'rgb(' + [
// Math.round(Math.random() * 160),
// Math.round(Math.random() * 160),
// Math.round(Math.random() * 160)
// ].join(',') + ')';
// }
// },
color: function () {
let colors = [
"rgba(189, 33, 33, 1)",
"rgba(232, 151, 21, 1)",
"rgba(220, 190, 68, 1)",
"rgba(96, 58, 186, 1)",
"rgba(32, 121, 69, 1)",
"rgba(22, 119, 255, 1)",
];
return colors[parseInt(Math.random() * colors.length)];
},
emphasis: {
shadowBlur: 5,
shadowColor: "#333",
},
},
// 设置词云数据
data: data,
},
],
}
return option
}
export default getWordCloudChart
\ No newline at end of file
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
</div> </div>
<div class="btn" @click="handleSwitchMode"> <div class="btn" @click="handleSwitchMode">
<div class="icon"> <div class="icon">
<img src="./assets/images/preview-icon.png" alt="" /> <img v-if="isEditMode" src="./assets/images/preview-icon.png" alt="" />
<img v-else src="./assets/images/edit.png" alt="" />
</div> </div>
<div class="text">{{ isEditMode ? "预览" : "编辑" }}</div> <div class="text">{{ isEditMode ? "预览" : "编辑" }}</div>
</div> </div>
...@@ -92,6 +93,62 @@ ...@@ -92,6 +93,62 @@
<div class="submit-text">生成报文</div> <div class="submit-text">生成报文</div>
</div> </div>
</div> </div>
<!-- <div class="process-box">
<div class="back">
{{ "< 返回" }}
</div>
<div class="process-main-box">
<div class="analysis-box">
<div class="analysis-header">
<div class="icon">
<img src="./assets/images/right-arrow.png" alt="" />
</div>
<div class="text">{{ "任务分析:" }}</div>
</div>
<div class="analysis-content">
{{
"用户需求属于态势要图制图任务,需要围绕“伊以冲突”主题生成关键词、搜索相关新闻、抽取并聚类事件、获取地理位置信息,最终完成事件和地点的可视化标绘"
}}
</div>
</div>
<div class="steps-box">
<div class="steps-header">
<div class="icon">
<img src="./assets/images/right-arrow.png" alt="" />
</div>
<div class="text">{{ "执行步骤:" }}</div>
</div>
<div class="steps-content">
<div class="steps" v-for="(step, index) in steps" :key="index">
<div class="steps-id">{{ step.id }}</div>
<div class="steps-content">{{ step.content }}</div>
</div>
</div>
</div>
<div class="doing-box">
{{ "正在执行步骤1/7:根据制图主题生成关键词" }}
</div>
<div class="tool-box">
<div class="tool-header">{{ '工具调用' }}</div>
<div class="tool-main"></div>
</div>
</div>
<div class="process-tips-box">
<div class="tips-icon">
<img src="./assets/images/tips-icon.png" alt="" />
</div>
<div class="tips-text">内容由AI生成,无法确保真实准确,仅供参考</div>
</div>
<div class="process-footer-box">
<div class="footer-left">
{{ "报文生成中..." }}
</div>
<div class="footer-right">
<div class="icon"></div>
<div class="text">{{ "停止" }}</div>
</div>
</div>
</div> -->
<div class="main-box"> <div class="main-box">
<div v-if="isEditMode" class="edit-panel"> <div v-if="isEditMode" class="edit-panel">
<v-md-editor <v-md-editor
...@@ -127,6 +184,37 @@ VMdEditor.use(vuepressTheme, { ...@@ -127,6 +184,37 @@ VMdEditor.use(vuepressTheme, {
Prism Prism
}); });
const steps = [
{
id: 1,
content: "111111111111111111111111111"
},
{
id: 2,
content: "111111111111111111111111111"
},
{
id: 3,
content: "111111111111111111111111111222222222222222222222222222222222233333333333333333333333333"
},
{
id: 4,
content: "111111111111111111111111111"
},
{
id: 5,
content: "111111111111111111111111111"
},
{
id: 6,
content: "111111111111111111111111111"
},
{
id: 7,
content: "111111111111111111111111111"
}
];
const isEditMode = ref(false); const isEditMode = ref(false);
const handleSwitchMode = () => { const handleSwitchMode = () => {
...@@ -162,9 +250,13 @@ const { renderedContent, updateContent } = useMarkdownStream(); ...@@ -162,9 +250,13 @@ const { renderedContent, updateContent } = useMarkdownStream();
const reportContent = ref(""); const reportContent = ref("");
const curTempTitle = ref("法案");
const getStreamChat = async (search, inputValue) => { const getStreamChat = async (search, inputValue) => {
const params = { const params = {
query: "输出一篇报文" query: writtingTitle.value, // "输出一篇报文"
desc: descText.value,
topic: curTempTitle.value // 政令、智库、法案、清单
}; };
abortController.value = new AbortController(); abortController.value = new AbortController();
...@@ -185,8 +277,12 @@ const getStreamChat = async (search, inputValue) => { ...@@ -185,8 +277,12 @@ const getStreamChat = async (search, inputValue) => {
console.log("resss", msgData.content); console.log("resss", msgData.content);
let str = msgData.content; let str = msgData.content;
if (str !== "[DONE]") { if (str !== "[DONE]") {
reportContent.value += str; reportContent.value += str;
updateContent(reportContent.value, scrollContainer.value); if (reportContent.value.includes("./out/img")) {
reportContent.value = reportContent.value.replaceAll("./out/img", "http://192.168.26.70:8000/out/img");
console.log(111, reportContent.value);
}
updateContent(reportContent.value, scrollContainer.value);
} else { } else {
ElMessage.success("报文生成结束"); ElMessage.success("报文生成结束");
abortController.value.abort(); abortController.value.abort();
...@@ -231,12 +327,20 @@ const tabList = ref([ ...@@ -231,12 +327,20 @@ const tabList = ref([
]); ]);
const tempList = ref([ const tempList = ref([
{ {
title: "主题报", title: "法案",
desc: "基于特定主题生成各维度的综合分析报告" desc: "基于法案内容生成各维度的综合分析报告"
},
{
title: "智库",
desc: "基于智库内容生成各维度的综合分析报告"
},
{
title: "政令",
desc: "基于政令内容生成各维度的综合分析报告"
}, },
{ {
title: "统计速报", title: "清单",
desc: "基于定期更新的数据源生成各关键指标统计" desc: "基于清单内容生成各维度的综合分析报告"
} }
]); ]);
...@@ -244,6 +348,7 @@ const tempActiveIndex = ref(0); ...@@ -244,6 +348,7 @@ const tempActiveIndex = ref(0);
const handleClickTemp = (item, index) => { const handleClickTemp = (item, index) => {
tempActiveIndex.value = index; tempActiveIndex.value = index;
curTempTitle.value = item.title;
}; };
// 导出 // 导出
...@@ -352,6 +457,217 @@ onUnmounted(() => { ...@@ -352,6 +457,217 @@ onUnmounted(() => {
.writting-main { .writting-main {
display: flex; display: flex;
height: calc(100% - 60px); height: calc(100% - 60px);
position: relative;
.process-box {
position: absolute;
left: 0;
top: 0;
width: 520px;
height: 100%;
z-index: 9999;
background: #fff;
.back {
margin-top: 21px;
height: 24px;
line-height: 24px;
margin-left: 22px;
color: var(--color-main-active);
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
}
.process-main-box {
margin-top: 20px;
margin-left: 22px;
width: 476px;
height: 900px;
// background: orange;
.analysis-box {
.analysis-header {
display: flex;
.icon {
margin-top: 5px;
width: 20px;
height: 20px;
img {
width: 100%;
height: 100%;
}
}
.text {
height: 30px;
line-height: 30px;
font-family: Microsoft YaHei;
color: #333;
font-size: 20px;
font-weight: 700;
margin-left: 5px;
}
}
.analysis-content {
height: 90px;
line-height: 30px;
color: #555;
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
text-indent: 32px;
}
}
.steps-box {
margin-top: 20px;
.steps-header {
display: flex;
.icon {
margin-top: 5px;
width: 20px;
height: 20px;
img {
width: 100%;
height: 100%;
}
}
.text {
height: 30px;
line-height: 30px;
font-family: Microsoft YaHei;
color: #333;
font-size: 20px;
font-weight: 700;
margin-left: 5px;
}
}
.steps-content {
max-height: 500px;
width: 100%;
background: skyblue;
overflow-x: hidden;
overflow-y: auto;
.steps {
display: flex;
width: 410px;
margin-left: 40px;
color: #555;
font-family: Microsoft YaHei;
line-height: 35px;
.steps-id {
width: 20px;
font-size: 18px;
font-weight: 700;
}
.steps-content {
font-size: 16px;
font-weight: 400;
width: 430px;
word-wrap: break-word;
}
}
}
}
.doing-box {
height: 40px;
line-height: 40px;
color: #555;
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
margin-left: 20px;
}
.tool-box {
width: 440px;
height: 160px;
margin: 10px auto;
background: #f6f9fe;
border-radius: 10px;
.tool-header {
height: 30px;
line-height: 30px;
margin-left: 20px;
color: var(--color-main-active);
}
.tool-main {
height: 110px;
width: 400px;
margin: 0 auto;
background: #fff;
}
}
}
.process-tips-box {
position: absolute;
left: 22px;
bottom: 81px;
height: 22px;
display: flex;
.tips-icon {
width: 14px;
height: 16px;
margin-top: 3px;
img {
width: 100%;
height: 100%;
}
}
.tips-text {
margin-left: 8px;
color: rgba(132, 136, 142, 1);
font-family: Microsoft YaHei;
font-size: 14px;
font-weight: 400;
line-height: 22px;
}
}
.process-footer-box {
height: 36px;
display: flex;
position: absolute;
left: 22px;
bottom: 29px;
.footer-left {
width: 348px;
height: 36px;
border-radius: 4px;
background: rgba(234, 236, 238, 1);
color: rgba(132, 136, 142, 1);
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
text-align: center;
line-height: 36px;
}
.footer-right {
margin-left: 8px;
display: flex;
width: 120px;
height: 36px;
box-sizing: border-box;
border: 1px solid var(--color-main-active);
border-radius: 4px;
background: rgba(246, 250, 255, 1);
justify-content: center;
align-items: center;
gap: 8px;
cursor: pointer;
.icon {
width: 8px;
height: 8px;
border-radius: 2px;
background: var(--color-main-active);
}
.text {
color: var(--color-main-active);
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
line-height: 24px;
}
}
}
}
.sider { .sider {
width: 520px; width: 520px;
box-sizing: border-box; box-sizing: border-box;
...@@ -411,10 +727,10 @@ onUnmounted(() => { ...@@ -411,10 +727,10 @@ onUnmounted(() => {
} }
.template-box { .template-box {
margin-top: 19px; margin-top: 19px;
height: 120px; height: 260px;
display: flex; display: flex;
flex-wrap: wrap;
gap: 16px; gap: 16px;
.template { .template {
width: 230px; width: 230px;
height: 120px; height: 120px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论