|
|
@ -1,12 +1,12 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="PoliceAi">
|
|
|
|
<div class="PoliceAi">
|
|
|
|
<HistoricalRecords @getDetail="getDetail" />
|
|
|
|
<HistoricalRecords ref="HistoricalRecordsRef" @getDetail="getDetail" @addNew="addNew" />
|
|
|
|
<div class="PoliceAi-main">
|
|
|
|
<div class="PoliceAi-main">
|
|
|
|
<div class="case-title">
|
|
|
|
<div class="case-title">
|
|
|
|
<div class="case-item">
|
|
|
|
<div class="case-item">
|
|
|
|
<span>案件名称</span>
|
|
|
|
<span>案件名称</span>
|
|
|
|
<span>|</span>
|
|
|
|
<span>|</span>
|
|
|
|
<el-select v-model="caseId" style="width: 200px;" clearable placeholder="请选择案件" @change="selectCase">
|
|
|
|
<el-select v-model="caseId" :disabled="conversationId !==''" style="width: 200px;" clearable placeholder="请选择案件" @change="selectCase">
|
|
|
|
<el-option v-for="item in caseOptions" :key="item.id" :label="item.caseName" :value="item.id" />
|
|
|
|
<el-option v-for="item in caseOptions" :key="item.id" :label="item.caseName" :value="item.id" />
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
|
|
|
@ -50,13 +50,7 @@
|
|
|
|
<img src="../../assets/police/robot.png" alt="">
|
|
|
|
<img src="../../assets/police/robot.png" alt="">
|
|
|
|
<span>数字民警</span>
|
|
|
|
<span>数字民警</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-if="message.type === '3'">
|
|
|
|
<div v-if="index !== conversationList.length -1 || !loading">
|
|
|
|
<div>您好,您是要查询【案件名称】的分析结果吗?</div>
|
|
|
|
|
|
|
|
<div class="btns">
|
|
|
|
|
|
|
|
<div class="btn-item">是</div>
|
|
|
|
|
|
|
|
<div class="btn-item">否</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 案件分析结果 -->
|
|
|
|
<!-- 案件分析结果 -->
|
|
|
|
<div v-if="message.intentType === '1'" class="robot-item">
|
|
|
|
<div v-if="message.intentType === '1'" class="robot-item">
|
|
|
|
<span>您好,【<span>{{ message.caseName }}</span> 】的综合得分为<span :class="['score', message.totalScore >= 70 ? 'success' : 'warning']">{{ `${message.commonScore}+${message.specificCrimeScore}=${message.totalScore}` }}</span>
|
|
|
|
<span>您好,【<span>{{ message.caseName }}</span> 】的综合得分为<span :class="['score', message.totalScore >= 70 ? 'success' : 'warning']">{{ `${message.commonScore}+${message.specificCrimeScore}=${message.totalScore}` }}</span>
|
|
|
@ -133,6 +127,18 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-else class="loading">
|
|
|
|
|
|
|
|
<img src="../../assets/common/loading.gif" alt="">
|
|
|
|
|
|
|
|
<span>模型正在生成结果....</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- <div v-if="message.type === '3'">
|
|
|
|
|
|
|
|
<div>您好,您是要查询【案件名称】的分析结果吗?</div>
|
|
|
|
|
|
|
|
<div class="btns">
|
|
|
|
|
|
|
|
<div class="btn-item">是</div>
|
|
|
|
|
|
|
|
<div class="btn-item">否</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</transition>
|
|
|
|
</transition>
|
|
|
@ -193,6 +199,7 @@ export default {
|
|
|
|
navListFlag: true,
|
|
|
|
navListFlag: true,
|
|
|
|
sendText: '',
|
|
|
|
sendText: '',
|
|
|
|
indexFlag: false,
|
|
|
|
indexFlag: false,
|
|
|
|
|
|
|
|
loading: false,
|
|
|
|
conversationId: '',
|
|
|
|
conversationId: '',
|
|
|
|
conversationList: [],
|
|
|
|
conversationList: [],
|
|
|
|
indexTypeList: [
|
|
|
|
indexTypeList: [
|
|
|
@ -275,9 +282,18 @@ export default {
|
|
|
|
text: item.question
|
|
|
|
text: item.question
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.getAnswerContent(item)
|
|
|
|
this.getAnswerContent(item)
|
|
|
|
|
|
|
|
this.navListFlag = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 开启新对话
|
|
|
|
|
|
|
|
addNew() {
|
|
|
|
|
|
|
|
this.caseId = ''
|
|
|
|
|
|
|
|
this.conversationId = ''
|
|
|
|
|
|
|
|
this.caseActorName = ''
|
|
|
|
|
|
|
|
this.conversationList = []
|
|
|
|
|
|
|
|
this.navListFlag = true
|
|
|
|
|
|
|
|
},
|
|
|
|
// 请求接口数据
|
|
|
|
// 请求接口数据
|
|
|
|
fetchData() {
|
|
|
|
fetchData() {
|
|
|
|
queryCaseList({}, 1, 99999).then(res => {
|
|
|
|
queryCaseList({}, 1, 99999).then(res => {
|
|
|
@ -316,7 +332,7 @@ export default {
|
|
|
|
this.chat({
|
|
|
|
this.chat({
|
|
|
|
caseId: this.caseId,
|
|
|
|
caseId: this.caseId,
|
|
|
|
conversationId: this.conversationId,
|
|
|
|
conversationId: this.conversationId,
|
|
|
|
query: '',
|
|
|
|
query: item.name,
|
|
|
|
type: '1',
|
|
|
|
type: '1',
|
|
|
|
intentType: item.type
|
|
|
|
intentType: item.type
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -354,8 +370,12 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
chat(obj) {
|
|
|
|
chat(obj) {
|
|
|
|
|
|
|
|
this.loading = true
|
|
|
|
robotChat(obj).then(res => {
|
|
|
|
robotChat(obj).then(res => {
|
|
|
|
if (res.code === 200) {
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
|
|
|
if (this.conversationId !== res.data.conversationId) {
|
|
|
|
|
|
|
|
this.$refs.HistoricalRecordsRef.getList()
|
|
|
|
|
|
|
|
}
|
|
|
|
this.conversationId = res.data.conversationId
|
|
|
|
this.conversationId = res.data.conversationId
|
|
|
|
this.getAnswerContent(res.data)
|
|
|
|
this.getAnswerContent(res.data)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -401,6 +421,10 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
this.loading = false
|
|
|
|
|
|
|
|
}, 3000)
|
|
|
|
|
|
|
|
|
|
|
|
this.scrollToBottom()
|
|
|
|
this.scrollToBottom()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -528,6 +552,21 @@ export default {
|
|
|
|
color: #3763FF;
|
|
|
|
color: #3763FF;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.loading {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
background: #F5F7FF;
|
|
|
|
|
|
|
|
border-radius: 16px 0px 16px 16px;
|
|
|
|
|
|
|
|
line-height: 28px;font-size: 16px;
|
|
|
|
|
|
|
|
color: #333333;
|
|
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
img {
|
|
|
|
|
|
|
|
width: 38px;
|
|
|
|
|
|
|
|
height: 38px;
|
|
|
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
.robot-item {
|
|
|
|
.robot-item {
|
|
|
|
|
|
|
|
|
|
|
|
background: #F5F7FF;
|
|
|
|
background: #F5F7FF;
|
|
|
|