Merge branch 'main' of http://61.139.16.27:26684/zy_oyj/sgxt_web
This commit is contained in:
@ -196,7 +196,14 @@ export const publicRoutes = [
|
|||||||
title: "布控预警",
|
title: "布控预警",
|
||||||
icon: "article"
|
icon: "article"
|
||||||
}
|
}
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
|
path: "/fouColorWarning",
|
||||||
|
name: "fouColorWarning",
|
||||||
|
meta: { title: "四色预警", icon: "article" },
|
||||||
|
component: () => import("@/views/backOfficeSystem/fourColorManage/warningControl/fouColorWarning/index"),
|
||||||
|
},
|
||||||
|
{
|
||||||
path: "/behaviorWarnings",
|
path: "/behaviorWarnings",
|
||||||
name: "behaviorWarnings",
|
name: "behaviorWarnings",
|
||||||
meta: { title: "行为预警", icon: "article" },
|
meta: { title: "行为预警", icon: "article" },
|
||||||
@ -681,23 +688,43 @@ export const publicRoutes = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/tacticalResearch",
|
path: "/ResearchHome",
|
||||||
name: "tacticalResearch",
|
name: "ResearchHome",
|
||||||
component: () => import("@/views/backOfficeSystem/JudgmentHome/tacticalResearch/index.vue"),
|
component: () => import("@/views/backOfficeSystem/JudgmentHome/ResearchHome/index"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "战术研判",
|
title: "战术研判",
|
||||||
icon: "article"
|
icon: "article"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/strategicResearch",
|
path: "/situationHome",
|
||||||
name: "strategicResearch",
|
name: "situationHome",
|
||||||
component: () => import("@/views/backOfficeSystem/JudgmentHome/strategicResearch/index.vue"),
|
component: () => import("@/views/backOfficeSystem/JudgmentHome/situationHome/index"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "战略研判",
|
title: "战略研判",
|
||||||
icon: "article"
|
icon: "article"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 后面写的研判
|
||||||
|
// {
|
||||||
|
// path: "/tacticalResearch",
|
||||||
|
// name: "tacticalResearch",
|
||||||
|
// component: () => import("@/views/backOfficeSystem/JudgmentHome/tacticalResearch/index.vue"),
|
||||||
|
// meta: {
|
||||||
|
// title: "战术研判",
|
||||||
|
// icon: "article"
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "/strategicResearch",
|
||||||
|
// name: "strategicResearch",
|
||||||
|
// component: () => import("@/views/backOfficeSystem/JudgmentHome/strategicResearch/index.vue"),
|
||||||
|
// meta: {
|
||||||
|
// title: "战略研判",
|
||||||
|
// icon: "article"
|
||||||
|
// }
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
path: "/judgmentCommand",
|
path: "/judgmentCommand",
|
||||||
name: "judgmentCommand",
|
name: "judgmentCommand",
|
||||||
@ -854,36 +881,19 @@ export const publicRoutes = [
|
|||||||
icon: "article"
|
icon: "article"
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
// {
|
||||||
|
// path: "/fouColorWarning",
|
||||||
|
// name: "fouColorWarning",
|
||||||
|
// meta: { title: "四色预警", icon: "article" },
|
||||||
|
// component: () => import("@/views/backOfficeSystem/fourColorManage/warningControl/fouColorWarning/index"),
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
path: "/fouColorWarning",
|
|
||||||
name: "fouColorWarning",
|
|
||||||
meta: { title: "四色预警", icon: "article" },
|
|
||||||
component: () => import("@/views/backOfficeSystem/fourColorManage/warningControl/fouColorWarning/index"),
|
|
||||||
}, {
|
|
||||||
path: "/CollectCrculate",
|
path: "/CollectCrculate",
|
||||||
name: "CollectCrculate",
|
name: "CollectCrculate",
|
||||||
component: () => import("@/views/backOfficeSystem/HumanIntelligence/CollectCrculate/index"),
|
component: () => import("@/views/backOfficeSystem/HumanIntelligence/CollectCrculate/index"),
|
||||||
meta: { title: "信息采集", icon: "article" },
|
meta: { title: "信息采集", icon: "article" },
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: "/ResearchHome",
|
|
||||||
name: "ResearchHome",
|
|
||||||
component: () => import("@/views/backOfficeSystem/JudgmentHome/ResearchHome/index"),
|
|
||||||
meta: {
|
|
||||||
title: "战术研判",
|
|
||||||
icon: "article"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
path: "/situationHome",
|
|
||||||
name: "situationHome",
|
|
||||||
component: () => import("@/views/backOfficeSystem/JudgmentHome/situationHome/index"),
|
|
||||||
meta: {
|
|
||||||
title: "战略研判",
|
|
||||||
icon: "article"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@ -161,6 +161,25 @@ const initChart = () => {
|
|||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 暴露方法给父组件,用于获取图表图片数据
|
||||||
|
defineExpose({
|
||||||
|
getChartImage: () => {
|
||||||
|
if (myChart.value) {
|
||||||
|
return myChart.value.getDataURL({
|
||||||
|
type: 'png',
|
||||||
|
pixelRatio: 2,
|
||||||
|
backgroundColor: '#fff'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
resizeChart: () => {
|
||||||
|
if (myChart.value) {
|
||||||
|
myChart.value.resize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@ -190,6 +190,25 @@ watch([
|
|||||||
], () => {
|
], () => {
|
||||||
initChart();
|
initChart();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 暴露方法给父组件,用于获取图表图片数据
|
||||||
|
defineExpose({
|
||||||
|
getChartImage: () => {
|
||||||
|
if (chartInstance.value) {
|
||||||
|
return chartInstance.value.getDataURL({
|
||||||
|
type: 'png',
|
||||||
|
pixelRatio: 2,
|
||||||
|
backgroundColor: '#fff'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
resizeChart: () => {
|
||||||
|
if (chartInstance.value) {
|
||||||
|
chartInstance.value.resize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
:deep(div) {
|
:deep(div) {
|
||||||
|
|||||||
@ -111,7 +111,10 @@
|
|||||||
|
|
||||||
<h2>2.总结分析</h2>
|
<h2>2.总结分析</h2>
|
||||||
<p style="min-height: 100px;" v-loading="loading">{{ textContent }} </p>
|
<p style="min-height: 100px;" v-loading="loading">{{ textContent }} </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<el-button style="position: fixed;bottom: 0;left: 45%;" type="primary" size="default"
|
||||||
|
@click="downloadWithStyles">下载</el-button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<AddForm ref="addForm" :dict="{ D_GS_XS_LX }" />
|
<AddForm ref="addForm" :dict="{ D_GS_XS_LX }" />
|
||||||
@ -125,6 +128,8 @@ import { getItem, setItem } from '@/utils/storage'
|
|||||||
import { fxbgDywdtj, getDictItem, fxbgJqlxtj, fxbgJqlytj, fxbgYdfx, fxbgXsfx, fxgbCljgf, fxgbCzlfx, fxbgTj } from '@/api/semanticAnalysis'
|
import { fxbgDywdtj, getDictItem, fxbgJqlxtj, fxbgJqlytj, fxbgYdfx, fxbgXsfx, fxgbCljgf, fxgbCzlfx, fxbgTj } from '@/api/semanticAnalysis'
|
||||||
import { completions } from '@/api/semanticAnalysis'
|
import { completions } from '@/api/semanticAnalysis'
|
||||||
import { reactive, ref, onMounted, getCurrentInstance, nextTick, computed, watch } from "vue";
|
import { reactive, ref, onMounted, getCurrentInstance, nextTick, computed, watch } from "vue";
|
||||||
|
import { downloadDocWithStyle } from '@/utils/export.js';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 数据
|
// 数据
|
||||||
search: {
|
search: {
|
||||||
@ -162,6 +167,11 @@ const tabHeightFn = () => {
|
|||||||
tabHeightFn();
|
tabHeightFn();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
const downloadDocWithStyle = () => {
|
||||||
|
if (!tableBox.value?.innerHTML) return;
|
||||||
|
downloadDocWithStyle(tableBox.value?.innerHTML)
|
||||||
|
}
|
||||||
|
|
||||||
const pageData = reactive({
|
const pageData = reactive({
|
||||||
parameter: {},
|
parameter: {},
|
||||||
total: 0,
|
total: 0,
|
||||||
|
|||||||
@ -13,8 +13,7 @@
|
|||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div class="tabBox">
|
<div class="tabBox">
|
||||||
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
||||||
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
|
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
|
||||||
>
|
|
||||||
<template #yjlx="{ row }">
|
<template #yjlx="{ row }">
|
||||||
<DictTag :tag="false" :value="row.yjlx" :options="dict.D_BZ_TPYJLX" />
|
<DictTag :tag="false" :value="row.yjlx" :options="dict.D_BZ_TPYJLX" />
|
||||||
</template>
|
</template>
|
||||||
@ -64,12 +63,35 @@ const showModel = ref(false)
|
|||||||
const textContent = ref('')//报告数据
|
const textContent = ref('')//报告数据
|
||||||
const SaveReport = () => {
|
const SaveReport = () => {
|
||||||
}
|
}
|
||||||
|
/** 获取原始报备内容
|
||||||
|
* @param {Array} resArr 预警信息
|
||||||
|
* @param {Array} dictArr 预警类型
|
||||||
|
* @returns {String} 原始报备内容
|
||||||
|
*/
|
||||||
|
const getOriginStr = (resArr, dictArr) => {
|
||||||
|
/** 标题前文 */
|
||||||
|
const preStr = BigTitle("林芝市公安局情指中心") + BigTitle("研判专刊(初稿)") + newTotitle({
|
||||||
|
org: "市公安局情指中心编",
|
||||||
|
time: timeValidate()
|
||||||
|
}) + fbtool(`同类事件发生${resArr.length}次以上预警`)
|
||||||
|
/** 警情内容 */
|
||||||
|
let contentStr = resArr.map((item, index) => {
|
||||||
|
const lx = dictArr.find(items => {
|
||||||
|
return items.value == item.yjlx
|
||||||
|
}).zdmc
|
||||||
|
return Subheading(`${index + 1}.警情内容`) +
|
||||||
|
textStyle(`警情内容:${item.bjnr},报警人姓名:${item.bjrmc},报警地址:${item.bjdz},报警类型:${lx},报警时间:${item.bjsj}\n`)
|
||||||
|
}).join('')
|
||||||
|
const endStr = Subheading(`解决方案`) + textStyle('加载中。。。')
|
||||||
|
return preStr + contentStr + endStr
|
||||||
|
}
|
||||||
const opneModel = (row) => {
|
const opneModel = (row) => {
|
||||||
showModel.value = true
|
showModel.value = true
|
||||||
textContent.value = ''
|
textContent.value = ''
|
||||||
mxglJqxqGetPageList({
|
mxglJqxqGetPageList({
|
||||||
yjid: row.id,
|
yjid: row.id,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
res = Array.isArray(res) ? res : []
|
||||||
let str = {
|
let str = {
|
||||||
model: "deepseek-32b",
|
model: "deepseek-32b",
|
||||||
prompt: `# 角色定位\n你是一名资深警务人员,尤其擅长对警情、案件、线索等非结构化文本数据进行阅读理解,并从中提取各种对象特征信息进行结构化,并总结各种对象之间的关联关系。\n`,
|
prompt: `# 角色定位\n你是一名资深警务人员,尤其擅长对警情、案件、线索等非结构化文本数据进行阅读理解,并从中提取各种对象特征信息进行结构化,并总结各种对象之间的关联关系。\n`,
|
||||||
@ -82,9 +104,11 @@ const opneModel = (row) => {
|
|||||||
str.prompt += `警情内容:${item.bjnr},报警人姓名:${item.bjrmc},报警地址:${item.bjdz},报警类型:${lx},报警时间:${item.bjsj}\n`
|
str.prompt += `警情内容:${item.bjnr},报警人姓名:${item.bjrmc},报警地址:${item.bjdz},报警类型:${lx},报警时间:${item.bjsj}\n`
|
||||||
})
|
})
|
||||||
str.prompt += `根据以上警情信息,总结出一个解决方案`
|
str.prompt += `根据以上警情信息,总结出一个解决方案`
|
||||||
|
textContent.value = getOriginStr(res, props.dict.D_BZ_JQLY)
|
||||||
let jsonMatch
|
let jsonMatch
|
||||||
completions(str).then(reslve => {
|
completions(str).then(reslve => {
|
||||||
jsonMatch = reslve.choices[0].text
|
jsonMatch = reslve.choices[0].text
|
||||||
|
textContent.value = '' // 重置为空
|
||||||
textContent.value += BigTitle("林芝市公安局情指中心") + BigTitle("研判专刊(初稿)") + newTotitle({
|
textContent.value += BigTitle("林芝市公安局情指中心") + BigTitle("研判专刊(初稿)") + newTotitle({
|
||||||
org: "市公安局情指中心编",
|
org: "市公安局情指中心编",
|
||||||
time: timeValidate()
|
time: timeValidate()
|
||||||
|
|||||||
@ -45,6 +45,7 @@ const initCharts = (data) => {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
|
item.count = isNaN(Number(item?.count) || 0) ? 0 : item.count;
|
||||||
if (item.yj_jb == '10') countData[0].value = item.count;
|
if (item.yj_jb == '10') countData[0].value = item.count;
|
||||||
if (item.yj_jb == '20') countData[1].value = item.count;
|
if (item.yj_jb == '20') countData[1].value = item.count;
|
||||||
if (item.yj_jb == '30') countData[2].value = item.count;
|
if (item.yj_jb == '30') countData[2].value = item.count;
|
||||||
@ -96,7 +97,11 @@ const createChartOption = (data, colors) => {
|
|||||||
},
|
},
|
||||||
formatter: (name) => {
|
formatter: (name) => {
|
||||||
const item = data.find(d => d.name === name);
|
const item = data.find(d => d.name === name);
|
||||||
let percentage = ((item.value / total) * 100).toFixed(2);
|
// 确保value是有效数字,total不为0
|
||||||
|
const value = Number(item.value) || 0;
|
||||||
|
const totalValue = Number(total) || 0;
|
||||||
|
let percentage = (totalValue > 0 && value > 0) ? ((value / totalValue) * 100).toFixed(2) : '0.00';
|
||||||
|
// let percentage = ((item.value / total) * 100).toFixed(2);
|
||||||
return `${name} ${item.value} {${item.colorType}|(${percentage}%)}`
|
return `${name} ${item.value} {${item.colorType}|(${percentage}%)}`
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user