feat: 知识图谱页面开发,语句调试开发

ocr_2.1
xiangcongshuai 5 months ago
parent 3f0d1d675c
commit 614cc5fc54

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

@ -9,7 +9,7 @@
<template>
<el-dialog
:visible.sync="dialogVisible"
width="1200px"
width="1300px"
append-to-body
:before-close="handleClose"
>
@ -34,41 +34,8 @@
</div>
</template>
<div class="conversation-content">
<div v-if="firstEnter" class="conversation-item-left">
<p class="title">案件助手</p>
<p>可通过对话咨询方式查询案件笔录证据材料以及模型指标分析结果</p>
</div>
<div
v-for="(message, index) in conversationList"
:id="'message' + index"
:key="index"
class="conversation-item"
>
<div v-if="message.type === 'user'" class="flex-row user-message">
<span>{{ message['text'] }}</span>
</div>
<div v-if="message.type === 'robot'" class="robot-message">
<div v-loading="!message.text">
<span class="robot-message-item">
<span class="label">指标名称</span>
<span class="value">{{ message.name }}</span>
</span>
<span class="robot-message-item">
<span class="label">指标结果</span>
<span class="value">{{ message.name }}</span>
</span>
<span class="robot-message-item">
<span class="point" />
<span class="label">笔录</span>
<span class="value">{{ message.name }}</span>
</span>
</div>
</div>
</div>
<!-- <el-row>
<el-col :span="24">
<el-row>
<el-col :span="16">
<div class="content-left">
<div ref="message" class="left-top" :style="{ height: height + 'px' }">
<div v-if="firstEnter" class="conversation-item">
@ -100,7 +67,7 @@
</el-collapse-item>
</el-collapse>
</span>
<span>
<!-- <span>
<p>{{ `指标名称:${message['indexName']}` }}</p>
<p>{{ `笔录结果:${message['recordResult']}` }}</p>
<p>{{ `笔录信息:${message['recordInfo']}` }}</p>
@ -114,7 +81,7 @@
{{ item.fileName }}
</a>
</div>
</span>
</span> -->
</div>
</div>
</div>
@ -152,33 +119,17 @@
:key="subItem.key"
class="index-item"
>
<el-tooltip placement="top" :content="subItem.shortName">
<!-- <el-tooltip placement="top" :content="subItem.shortName"> -->
<span :title="subItem.shortName" class="etc">{{ subItem.shortName }}</span>
</el-tooltip>
<div v-if="caseIndex !== ''|| baseForm.caseId" class="ask-button" @click="handelAsk(subItem)"></div>
<!-- </el-tooltip> -->
<!-- <div v-if="caseIndex !== ''|| baseForm.caseId" class="ask-button" @click="handelAsk(subItem)"></div> -->
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</el-col>
</el-row> -->
</div>
<div class="send-bottom">
<el-input
v-model="caseIndex"
placeholder="请输入咨询的案件指标......"
@keyup.enter.native="handleSend"
/>
<el-button
type="primary"
icon="el-icon-s-promotion"
:disabled="caseIndex === ''|| !baseForm.caseId"
@click="handleSend"
>
发送
</el-button>
</el-row>
</div>
</el-dialog>
</template>
@ -380,176 +331,114 @@ export default {
}
}
.conversation-content {
height: calc(100vh - 500px);
.flex-row {
display: flex;
}
.content-left {
.left-top {
overflow-y: auto;
overflow-x: hidden;
padding: 20px;
box-sizing: border-box;
.conversation-item {
position: relative;
padding: 0 24px;
margin-bottom: 24px;
.user-message {
display: flex;
flex-direction: row-reverse;
span {
max-width: 646px;
padding: 16px;
background: #ECF0FF;
border-radius: 16px 0px 16px 16px;font-size: 16px;
color: #333333;
margin-bottom: 20px;
.case-assistant {
font-weight: 700;
color: $base-color-default;
margin-bottom: 0;
}
}
.robot-message {
.robot-message-item {
display: flex;
.point {
width: 5px;
height: 5px;
background-color: black;
border-radius: 50%;
}
.label {
font-weight: bold;
font-size: 16px;
.conversation-item>div>img {
width: 30px;
height: 30px;
border-radius: 15px;
}
.conversation-item>div>span {
margin-left: 10px;
flex: 1;
line-height: 30px;
}
.user-message {
color: #333333;
}
.value {
font-weight: 400;
font-size: 16px;
.robot-message {
color: #333333;
>span {
background: #F2F8FF;
border-radius: 8px;
display: inline-block;
padding: 10px;
p:nth-child(1) {
margin-top: 0;
}
p:nth-child(5) {
margin-bottom: 8px;
}
}
}
.conversation-item-left {
font-size: 16px;
color: #333333;
margin: 12px 24px;
.title {
font-size: 20px;
color: #3763FF;
}
}
// .content-left {
// .left-top {
// overflow-y: auto;
// overflow-x: hidden;
// padding: 20px;
// box-sizing: border-box;
// .conversation-item {
// margin-bottom: 20px;
// .case-assistant {
// font-weight: 700;
// color: $base-color-default;
// margin-bottom: 0;
// }
// }
// .conversation-item>div>img {
// width: 30px;
// height: 30px;
// border-radius: 15px;
// }
// .conversation-item>div>span {
// margin-left: 10px;
// flex: 1;
// line-height: 30px;
// }
// .user-message {
// color: #333333;
// }
// .robot-message {
// color: #333333;
// >span {
// background: #F2F8FF;
// border-radius: 8px;
// display: inline-block;
// padding: 10px;
// p:nth-child(1) {
// margin-top: 0;
// }
// p:nth-child(5) {
// margin-bottom: 8px;
// }
// }
// }
// }
// .left-bottom {
// border-top: 1px solid rgba(0, 0, 0, 0.15);
// height: 100px;
// position: relative;
// .el-button {
// position: absolute;
// bottom: 0;
// right: 20px;
// }
// }
// }
// .content-right {
// border-left: 1px solid rgba(0, 0, 0, 0.15);
// padding: 20px;
// box-sizing: border-box;
// .right-title {
// font-weight: bold;
// color: #333333;
// }
// .index-content {
// overflow-y: auto;
// overflow-x: hidden;
// .index-item {
// position: relative;
// height: 40px;
// line-height: 40px;
// cursor: pointer;
// padding: 0 8px;
// box-sizing: border-box;
// border-radius: 5px;
// width: 380px;
// >span {
// display: inline-block;
// width: 100%;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
// vertical-align: middle;
// }
// &:hover {
// background: #F2F6FD;
// .ask-button {
// display: inline-block;
// }
// }
// .ask-button {
// position: absolute;
// right: 8px;
// bottom: 8px;
// top: 8px;
// line-height: 24px;
// border: 1px solid #999999;
// color: #999999;
// border-radius: 5px;
// padding: 0 10px;
// text-align: center;
// z-index: 99;
// box-shadow: -10px 0 #F2F6FD;
// background: #ffffff;
// display: none;
// cursor: pointer;
// }
// }
// }
// }
}
.send-bottom {
.left-bottom {
border-top: 1px solid rgba(0, 0, 0, 0.15);
display: flex;
height: 100px;
position: relative;
.el-button {
position: absolute;
bottom: 24px;
right: 24px;
bottom: 0;
right: 20px;
}
}
}
.content-right {
border-left: 1px solid rgba(0, 0, 0, 0.15);
padding: 20px;
box-sizing: border-box;
.right-title {
font-weight: bold;
color: #333333;
}
.index-content {
overflow-y: auto;
overflow-x: hidden;
.index-item {
position: relative;
height: 40px;
line-height: 40px;
cursor: pointer;
padding: 0 8px;
box-sizing: border-box;
border-radius: 5px;
width: 380px;
>span {
display: inline-block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: middle;
}
&:hover {
background: #F2F6FD;
.ask-button {
display: inline-block;
}
}
.ask-button {
position: absolute;
right: 8px;
bottom: 8px;
top: 8px;
line-height: 24px;
border: 1px solid #999999;
color: #999999;
border-radius: 5px;
padding: 0 10px;
text-align: center;
z-index: 99;
box-shadow: -10px 0 #F2F6FD;
background: #ffffff;
display: none;
cursor: pointer;
}
}
}
}
}
::v-deep {

@ -5,7 +5,7 @@ const network = {
// 默认的接口地址 如果是开发环境和生产环境走vab-mock-server当然你也可以选择自己配置成需要的接口地址
baseURL:
process.env.NODE_ENV === 'development'
? 'http://192.168.10.25:8097/fu-hsi-server'
? 'http://192.168.10.138:8097/fu-hsi-server'
: '/fuHsiApi',
// 配后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8
contentType: 'application/json;charset=UTF-8',

@ -236,7 +236,14 @@ export const asyncRoutes = [
permission: 'p_promptManagement',
component: () => import('@/views/promptManagement/PromptConfig/add/edit.vue'),
meta: { title: '编辑提示词', affix: true }
}
},
{
path: '/policeAi',
name: 'PoliceAi',
permission: 'p_promptManagement',
component: () => import('@/views/PoliceAi/index.vue'),
meta: { title: '数字民警咨询', affix: true }
},
]
},

@ -0,0 +1,238 @@
<template>
<div class="PoliceAi">
<div class="case-title">
<div class="case-item">
<span>案件名称</span>
<span>|</span>
<el-select v-model="caseId" style="width: 200px;" clearable placeholder="请选择案件" @change="selectCase">
<el-option v-for="item in caseOptions" :key="item.id" :label="item.caseName" :value="item.id" />
</el-select>
</div>
<el-input v-model="caseActorName" class="case-input" readonly placeholder="行为人" />
</div>
<div :style="{marginTop:firstEnter?'146px':''}" class="main-content">
<div class="robot">
<div class="robot-top">
<img src="../../assets/police/robot.png" alt="">
<span>数字民警</span>
</div>
<span class="robot-item">
你好本数字民警可为您提供案件分析结果查询服务您还能通过输入 @来选取特定罪与非罪指标结果以便精准获取您所需信息
</span>
</div>
<div class="nav-list">
<div class="nav-item">
<div class="nav-item-top">
<img src="../../assets/police/analysis.png" alt="">
<span>案件分析结果</span>
</div>
<span class="desc">案件分析预测入罪与出罪提示司法判定风险</span>
</div>
<div class="nav-item">
<div class="nav-item-top">
<img src="../../assets/police/case_info.png" alt="">
<span>案件概况</span>
</div>
<span class="desc">获取案件的基本情况概述</span>
</div>
<div class="nav-item">
<div class="nav-item-top">
<img src="../../assets/police/evidence.png" alt="">
<span>案件证据指引</span>
</div>
<span class="desc">为补充证据材料信息提供导向</span>
</div>
</div>
</div>
<div class="send-bottom">
<el-input
v-model="sendText"
placeholder="可咨询案件内容、输入@或# 可选择查询指标结果"
@keyup.enter.native="handleSend"
/>
<img src="@/assets/police/send.png" alt="">
</div>
</div>
</template>
<script>
import { queryCaseList, robotChat } from '@/api/caseManagement'
import { queryIndexData } from '@/api/indexRule'
import { marked } from 'marked'
export default {
name: 'PoliceAi',
data() {
return {
caseId: '',
caseActorName: '',
//
firstEnter: true,
sendText: '',
conversationList: [],
caseOptions: []
}
},
mounted() {
},
methods: {
//
fetchData() {
queryCaseList({}, 1, 99999).then(res => {
this.caseOptions = res.data.records
})
},
//
getIndexData(val) {
queryIndexData({
indexType: val
}, 1, 9999).then(res => {
this.questionlist = res.data.result
})
},
selectCase() {
},
handleSend() {
}
}
}
</script>
<style lang="scss" scoped>
.PoliceAi {
background: #FFFFFF;
height: 100%;
position: relative;
padding-top: 24px;
display: flex;
flex-direction: column;
align-items: center;
.case-title {
width: 632px;
height: 98px;
background: rgba(55,99,255,0.15);
border-radius: 21px 21px 21px 21px;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
z-index: 9;
top: 24px;
.case-item {
display: flex;background: #FFFFFF;
border-radius: 6px 6px 6px 6px;
border: 1px solid #D9D9D9;
padding: 8px 16px;
align-items: center;
justify-content: center;
span {
font-size: 16px;
color: #333333;
margin-right: 16px;
}
::v-deep {
.el-input__inner {
border: none !important;
}
}
}
.case-input {
width: 202px;
height: 50px;
background: #F4F8FF;
border-radius: 6px 6px 6px 6px;
margin-left: 16px;
::v-deep {
.el-input__inner {
height: 50px !important;
}
}
}
}
.main-content {
flex: 1;
overflow: auto;
width: 1154px;
.robot {
.robot-top {
display: flex;
align-items: center;
margin-bottom: 10px;
img {
width: 45px;
height: 45px;
margin-right: 10px;
}
span {
font-size: 20px;
color: #3763FF;
}
}
.robot-item {
background: #F5F7FF;
border-radius: 16px 0px 16px 16px;
line-height: 53px;font-size: 16px;
color: #333333;
padding: 16px;
margin-bottom: 16px;
}
}
.nav-list {
display: flex;
margin-top: 16px;
.nav-item {
background: #FFFFFF;
border-radius: 8px 8px 8px 8px;
border: 1px solid #D9D9D9;
padding: 24px;
margin-right: 24px;
.desc {
font-size: 14px;
color: #999999;
}
.nav-item-top {
display: flex;
margin-bottom: 8px;
align-items: center;
img {
width: 30px;
height: 30px;
margin-right: 10px;
}
}
}
}
}
.send-bottom {
width: 1154px;
height: 75px;
background: #FFFFFF;
border-radius: 16px 16px 16px 16px;
border: 2px solid rgba(55, 99, 255, 1);
// border-image: linear-gradient(90deg, rgba(55, 99, 255, 1), rgba(25, 166, 254, 1)) 2 2;
margin-bottom: 56px;
display: flex;
align-items: center;
position: relative;
::v-deep {
.el-input__inner {
border: none !important;
font-size: 16px;
}
}
img {
width: 60px;
height: 60px;
position: absolute;
right: 12px;
top: 12px;
cursor: pointer;
}
}
}
</style>

@ -25,7 +25,7 @@
v-model="searchName"
class="input-item"
size="lager"
placeholder="支持按模型指标查询"
placeholder="请输入"
clearable
/>
<div class="btn" @click="search"></div>
@ -75,6 +75,9 @@ export default {
this.caseAtlasOption.toolbox = {
//
show: true,
itemSize: 16,
right: '24px',
top: '24px',
feature: {
myFull: {
show: true,
@ -218,7 +221,7 @@ export default {
background: #999999;
border-radius: 4px 4px 4px 4px;
margin:0 8px 8px 0;
padding: 8px 16px;font-size: 16px;
padding: 8px 16px;font-size: 14px;
color: #FFFFFF;
cursor: pointer;
}
@ -233,12 +236,16 @@ export default {
flex-direction: column;
background: radial-gradient(circle, rgba(255, 255, 255, 0.05), rgba(66, 135, 255, 0.05));
box-shadow: inset 0px 0px 10px 0px rgba(0,0,0,0.02);
padding: 24px;
// padding: 24px;
.right-top {
.input-search {
display: flex;
position: fixed;
// top: 24px;
// left: 24px;
margin: 24px;
// width: 550px;
z-index: 9;
.input-item {
width: 500px;
}

@ -31,13 +31,13 @@
</el-tooltip>
<el-tooltip class="item" effect="dark" content="笔录分析" placement="top-start">
<svg-icon v-if="row.children.length === 0 && isEdit" class="svg-img" style="margin-left: 8px;cursor: pointer;" icon-class="recordAnalysis" title="笔录分析" @click="handleCreateAtlas(row)" />
<svg-icon v-if="row.children && isEdit" class="svg-img" style="margin-left: 8px;cursor: pointer;" icon-class="recordAnalysis" title="笔录分析" @click="handleCreateAtlas(row)" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="笔录提取" placement="top-start">
<svg-icon v-if="row.children.length === 0 && isEdit" class="svg-img" style="margin-left: 8px;margin-right: 8px; cursor: pointer;" icon-class="reset" title="笔录提取" @click="handleExtract(row)" />
<svg-icon v-if="row.children && isEdit" class="svg-img" style="margin-left: 8px;margin-right: 8px; cursor: pointer;" icon-class="reset" title="笔录提取" @click="handleExtract(row)" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<el-button v-if="row.children.length === 0" type="text" icon="el-icon-delete" :disabled="!isEdit" style="color: red" title="删除" @click="handleDel(row)" />
<el-button v-if="row.children" type="text" icon="el-icon-delete" :disabled="!isEdit" style="color: red" title="删除" @click="handleDel(row)" />
</el-tooltip>
<!-- <el-button v-if="row.children.length === 0" type="text" icon="el-icon-collection" :disabled="!isEdit" title="笔录提取" @click="handleExtract(row)" /> -->

@ -31,7 +31,7 @@
<div class="sql_btn" @click="getData"></div>
</el-form-item>
</el-form>
<div class="main-content-right">
<div v-loading="loading" class="main-content-right">
<div class="title">查询结果</div>
<div class="content">
<div class="content-top">
@ -106,6 +106,7 @@ export default {
queryLang: '',
name: ''
},
loading: false,
caseOptions: [],
//
gridOptions: {
@ -124,7 +125,7 @@ export default {
const { name, queryLang } = data
this.searchForm.name = name
this.searchForm.queryLang = queryLang
this.caseAtlasOption.toolbox = undefined
this.dialogOption.show = true
this.getCaseList()
this.getData()
@ -147,10 +148,13 @@ export default {
async getData() {
this.$refs.searchForm.validate(async valid => {
if (valid) {
this.loading = true
setTimeout(async() => {
const res = await atomicDebug({
caseId: this.searchForm.caseId,
queryLang: this.searchForm.queryLang
})
this.loading = false
if (res.code === 200) {
if (!res.data.graphNodeList) return
this.caseAtlasOption.series[0].links = res.data.graphRelList
@ -158,11 +162,13 @@ export default {
this.nodeLabels = res.data.graphNodeList
this.caseAtlasOption.series[0].data = res.data.graphNodeList
const list = []
if (res.data.recordTitleList && res.data.recordTitleList.length > 0) {
res.data.recordTitleList.forEach(e => {
list.push({
title: e, field: e
})
})
}
this.gridOptions.columns = list
this.gridOptions.columns.unshift({ title: '序号', type: 'seq', width: '80px' })
@ -173,6 +179,7 @@ export default {
}
})
}
}, 1000)
}
})
},
@ -270,7 +277,6 @@ export default {
margin:0 8px 8px 0;
padding: 8px 16px;font-size: 16px;
color: #FFFFFF;
cursor: pointer;
}
}
}

Loading…
Cancel
Save