更新页面
This commit is contained in:
@ -85,10 +85,6 @@ const formData = ref([
|
||||
{ prop: "gapline", type: "slot",width:'100%' },
|
||||
{ prop: "scfj", type: "slot",width:'100%'},
|
||||
{ label: "线索内容", prop: "xsNr", type: "textarea",width:'100%'},
|
||||
{ label: "群体类型", prop: "qtlx", type: "select",options:props.dic.D_GS_XS_QTLX },
|
||||
{ label: "群体名称", prop: "qtmc", type: "input"},
|
||||
{ label: "涉及人数", prop: "sjrs", type: "inputNumber"},
|
||||
{ label: "线索报送单位", prop: "ssbmdm", isAll:true, type: "department"},
|
||||
]);
|
||||
const fjdz = ref()
|
||||
const listQuery = ref({}); //表单
|
||||
|
@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<div class="dialog" v-if="dialogForm">
|
||||
<div class="head_box">
|
||||
<span class="title">详情</span>
|
||||
<div>
|
||||
<el-button @click="close">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_cnt">
|
||||
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules">
|
||||
<template #gapdive>
|
||||
<div style="width: 100%;height: 10px;" class="mb20">
|
||||
<el-divider content-position="left">基础信息</el-divider>
|
||||
</div>
|
||||
</template>
|
||||
<template #gapline>
|
||||
<div style="width: 100%;height: 10px;" class="mb20">
|
||||
<el-divider content-position="left">线索内容</el-divider>
|
||||
</div>
|
||||
</template>
|
||||
<template #scfj>
|
||||
<div style="width: 100%;padding-left: 50px;">
|
||||
<div>上传附件:<span class="f12">(可附电子表格、Word文档、图像、音视频文件)</span> </div>
|
||||
<div><MOSTY.Upload :showBtn="true" disabled :limit="10" v-model="fjdz" /> </div>
|
||||
</div>
|
||||
</template>
|
||||
</FormMessage>
|
||||
<el-divider content-position="left"><span class="mr20">相关人员</span> </el-divider>
|
||||
<MyTable
|
||||
:tableData="pageForm.tableData"
|
||||
:tableColumn="pageForm.tableColumn"
|
||||
:tableHeight="pageForm.tableHeight"
|
||||
:key="pageForm.keyCount"
|
||||
:tableConfiger="pageForm.tableConfiger"
|
||||
:controlsWidth="pageForm.controlsWidth"
|
||||
>
|
||||
<template #xb="{row}">
|
||||
<DictTag :value="row.xb" :tag="false" :options="props.dic.D_BZ_XB" />
|
||||
</template>
|
||||
<template #bqList="{row}">
|
||||
<div v-if="row.bqList">
|
||||
<el-tag type="success" v-for="(it,idx) in row.bqList" :key="idx">{{ it.bqMc }}</el-tag >
|
||||
</div>
|
||||
</template>
|
||||
</MyTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import * as MOSTY from "@/components/MyComponents/index";
|
||||
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } from "vue";
|
||||
const emit = defineEmits(["change"]);
|
||||
const props = defineProps({
|
||||
dic: Object
|
||||
});
|
||||
const { proxy } = getCurrentInstance();
|
||||
const dialogForm = ref(false); //弹窗
|
||||
const rules = reactive({
|
||||
xsMc: [{ required: true, message: "请输入线索名称", trigger: "blur" }],
|
||||
xlLx: [{ required: true, message: "请选择线索类型", trigger: "change" }],
|
||||
qbLy: [{ required: true, message: "请选择情报来源", trigger: "change" }],
|
||||
});
|
||||
const formData = ref([
|
||||
{ prop: "gapdive", type: "slot",width:'100%' },
|
||||
{ label: "线索名称", prop: "xsMc", type: "input" },
|
||||
{ label: "线索类型", prop: "xlLx", type: "select", options:props.dic.D_GS_XS_LX },
|
||||
{ label: "情报来源", prop: "qbLy", type: "select", options:props.dic.D_GS_XS_LY},
|
||||
{ label: "指向开始时间", prop: "zxkssj", type: "datetime"},
|
||||
{ label: "指向结束时间", prop: "zxjssj", type: "datetime"},
|
||||
{ label: "指向地点", prop: "zxdz", type: "input"},
|
||||
{ label: "所属专题", prop: "sszt", type: "select",options:props.dic.D_BZ_SSZT},
|
||||
{ prop: "gapline", type: "slot",width:'100%' },
|
||||
{ prop: "scfj", type: "slot",width:'100%'},
|
||||
{ label: "线索内容", prop: "xsNr", type: "textarea",width:'100%'},
|
||||
]);
|
||||
const fjdz = ref()
|
||||
const listQuery = ref({}); //表单
|
||||
const loading = ref(false);
|
||||
const elform = ref();
|
||||
const title = ref("");
|
||||
const pageForm = reactive({
|
||||
tableData: [],
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
showSelectType: "checkBox",
|
||||
loading: false,
|
||||
haveControls: false,
|
||||
},
|
||||
controlsWidth: 220,
|
||||
tableColumn: [
|
||||
{ label: "姓名", prop: "xm" },
|
||||
{ label: "性别", prop: "xb",showSolt:true },
|
||||
{ label: "身份证号", prop: "sfzh" },
|
||||
{ label: "户籍地", prop: "hjdz" },
|
||||
{ label: "户籍地派出所", prop: "hjdpcs" },
|
||||
{ label: "标签", prop: "bqList",showSolt:true }
|
||||
]
|
||||
});
|
||||
onMounted(()=>{
|
||||
tabHeightFn()
|
||||
})
|
||||
|
||||
|
||||
// 初始化数据
|
||||
const init = (type, row) => {
|
||||
fjdz.value = []
|
||||
tabHeightFn()
|
||||
dialogForm.value = true;
|
||||
title.value = type == "add" ? "新增" : type == "info" ? "详情" : "编辑";
|
||||
// 初始化表单数据,并根据详情页设置禁用状态
|
||||
// if (row) getDataById(row.id);
|
||||
};
|
||||
// 根据id查询详情
|
||||
const getDataById = (id) => {
|
||||
// qcckGet({id}, "/mosty-gsxt/qbcj/selectByid").then((res) => {
|
||||
// listQuery.value = res;
|
||||
// pageForm.tableData = res.ryList || [];
|
||||
// });
|
||||
};
|
||||
|
||||
// 关闭
|
||||
const close = () => {
|
||||
fjdz.value = []
|
||||
listQuery.value = {};
|
||||
dialogForm.value = false;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
|
||||
// 表格高度计算
|
||||
const tabHeightFn = () => {
|
||||
pageForm.tableHeight = window.innerHeight - 720;
|
||||
window.onresize = function () {
|
||||
tabHeightFn();
|
||||
};
|
||||
};
|
||||
|
||||
defineExpose({ init });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/assets/css/layout.scss";
|
||||
@import "~@/assets/css/element-plus.scss";
|
||||
::v-deep .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
|
||||
color: #0072ff;
|
||||
background: rgba(0, 114, 255, 0.3);
|
||||
}
|
||||
.boxlist {
|
||||
width: 99%;
|
||||
height: 225px;
|
||||
margin-top: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
::v-deep .avatar-uploader{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
::v-deep .el-upload-list{
|
||||
margin-left: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
::v-deep .el-upload-list__item-name .el-icon{
|
||||
top: 3px;
|
||||
}
|
||||
</style>
|
@ -19,17 +19,21 @@
|
||||
:key="pageData.keyCount"
|
||||
:tableConfiger="pageData.tableConfiger"
|
||||
:controlsWidth="pageData.controlsWidth"
|
||||
@chooseData="chooseData"
|
||||
>
|
||||
<template #controls="{ row }">
|
||||
<el-link type="primary" @click="addForm('edit', row.id)">编辑</el-link>
|
||||
<el-link type="danger" @click="delDictItem(row.id)">删除</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
<div class="txetBox"></div>
|
||||
<div class="txetBox">
|
||||
{{ container }}
|
||||
</div>
|
||||
<div class="footBnt">
|
||||
<el-button type="primary" @click="showText = true">导入</el-button>
|
||||
<el-button type="primary">语义分析</el-button>
|
||||
<span class="relative ml10">
|
||||
<el-button type="primary" v-loading="btnLoading" @click="handleFx">语义分析</el-button>
|
||||
<span v-if="btnLoading" class="f12 absolute nowrap" style="color: #333333; left: 92px;bottom: 5px;">数据解析中......</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -46,11 +50,11 @@
|
||||
:tableHeight="pageData.tableHeight"
|
||||
:key="pageData.keyCount"
|
||||
:tableConfiger="pageData.tableConfigerR"
|
||||
:controlsWidth="pageData.controlsWidth"
|
||||
@chooseData="chooseData"
|
||||
:controlsWidth="pageData.controlsWidthR"
|
||||
>
|
||||
<template #controls="{ row }">
|
||||
<el-link type="primary" @click="addEdit('edit', row)">编辑</el-link>
|
||||
<el-link type="primary" @click="lookdetail('edit', row)">编辑</el-link>
|
||||
<el-link type="primary" @click="lookdetail('row', row)">详情</el-link>
|
||||
<el-link type="danger" @click="delDictItemRight(row.id)">删除</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
@ -65,6 +69,7 @@
|
||||
</div>
|
||||
<!-- 编辑详情 -->
|
||||
<EditAddForm ref="detailDiloag" @updateDate="getList" />
|
||||
<Detail ref="detailForm" v-if="isShow" :dic="{D_BZ_SF,D_BZ_XB,D_GS_XS_LY,D_BZ_SSZT,D_GS_XS_LX ,D_GS_XS_QTLX}" />
|
||||
<!-- 文字解析 -->
|
||||
<ExtractionText v-model="showText" @change="getText"></ExtractionText>
|
||||
</div>
|
||||
@ -77,12 +82,16 @@ import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||
import Pages from "@/components/aboutTable/Pages.vue";
|
||||
import Search from "@/components/aboutTable/Search.vue";
|
||||
import EditAddForm from "./components/editAddForm.vue";
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import Detail from "./components/detail.vue";
|
||||
import { qcckGet, qcckPost, ParsingText } from "@/api/qcckApi.js";
|
||||
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {D_GS_ZDQT_FXDJ,D_GS_XS_ZLLX,D_GS_XS_CZZT,D_GS_XS_LY, D_BZ_SSZT,D_BZ_SF,D_GS_XS_LX ,D_GS_XS_QTLX,D_BZ_XB,D_BZ_XSSHZT} = proxy.$dict("D_GS_ZDQT_FXDJ","D_GS_XS_ZLLX","D_GS_XS_CZZT","D_GS_XS_LY","D_BZ_SSZT","D_BZ_SF","D_GS_XS_LX","D_GS_XS_QTLX","D_BZ_XB","D_BZ_XSSHZT"); //获取字典数据
|
||||
const detailDiloag = ref();
|
||||
const detailForm = ref();
|
||||
const searchBox = ref(); //搜索框
|
||||
const showText = ref(false);
|
||||
const isShow = ref(false);
|
||||
const searchConfiger = ref([
|
||||
{
|
||||
label: "语义名称",
|
||||
@ -104,6 +113,9 @@ const searchConfiger = ref([
|
||||
}
|
||||
]);
|
||||
const queryFrom = ref({});
|
||||
const container = ref('')
|
||||
const btnLoading = ref(false)
|
||||
const prsentText = ref(null)
|
||||
const pageData = reactive({
|
||||
tableData: [], //表格数据
|
||||
keyCount: 0,
|
||||
@ -124,6 +136,7 @@ const pageData = reactive({
|
||||
pageCurrent: 1
|
||||
}, //分页
|
||||
controlsWidth: 120, //操作栏宽度
|
||||
controlsWidthR: 140, //操作栏宽度
|
||||
tableColumn: [
|
||||
{ label: "语义名称", prop: "yymc",showOverflowTooltip:true },
|
||||
{ label: "要素类型", prop: "yslx",showOverflowTooltip:true },
|
||||
@ -133,7 +146,6 @@ const pageData = reactive({
|
||||
tableColumn1: [
|
||||
{ label: "线索名称", prop: "yymc",showOverflowTooltip:true },
|
||||
{ label: "线索类型", prop: "yslx",showOverflowTooltip:true },
|
||||
{ label: "指向时间", prop: "ysmc",showOverflowTooltip:true },
|
||||
{ label: "指向地点", prop: "ysms",showOverflowTooltip:true },
|
||||
{ label: "线索内容", prop: "ysms",showOverflowTooltip:true },
|
||||
],
|
||||
@ -187,6 +199,13 @@ const delDictItemRight = (id) => {
|
||||
const addForm = (type, id) =>{
|
||||
detailDiloag.value.init(type, id);
|
||||
}
|
||||
// 新增数据 -- 左边
|
||||
const lookdetail = (type, row) =>{
|
||||
isShow.value = true;
|
||||
setTimeout(()=>{
|
||||
detailForm.value.init(type, row);
|
||||
},500)
|
||||
}
|
||||
|
||||
|
||||
const changeNo = (val) => {
|
||||
@ -205,6 +224,46 @@ const addEdit = (type, row) => {
|
||||
|
||||
};
|
||||
|
||||
// 提取数据
|
||||
const getText = (val) =>{
|
||||
prsentText.value = null; //先清空
|
||||
container.value = val.text;
|
||||
let obj = {
|
||||
"model": "deepseek-reasoner",
|
||||
"messages": [
|
||||
{
|
||||
"role": "system",
|
||||
"content": "# 角色定位\n你是一名资深警务人员,尤其擅长对警情、案件、线索等非结构化文本数据进行阅读理解,并从中提取各种对象特征信息进行结构化,并总结各种对象之间的关联关系。\n## - person:人物 - id:唯一值 - name:姓名 - enName:英文姓名 - nickName:绰号 - aliasName:别名 - screenName:网名 - idcard:身份证号码 - phoneNo:手机号码 - bankCard:银行卡号 - passporNumber:护照号码 - permanentResidenceAddress:户籍地址 - residenceAddress:现住地址 - jbxx:基本信息 - id:唯一值 - xsmc:线索名称 - xslx:线索类型 - qbly:情报来源 - kssj:开始时间 - jssj:结束时间 - qtlx:群体类型 - qtmc:群体名称 - sjrs:设计人数 - sbdw:送报单位## 注意点\n- 地址信息能够根据上下文信息按照省、市、县、街道/乡镇、路名分段补全并标准化。例如:四川省 成都市 高新区 桂溪街道 交子大道11号\n- 对象之间的关联关系由对象类型、对象id、关系类型、目标对象类型、目标对象id 5个属性组成。\n"
|
||||
},
|
||||
{
|
||||
"role": "user",
|
||||
"content": "# 任务\n根据警情信息识别对象信息,以及对象之间的关联关系。最后以json形式输出,不要做任何解释。直接给出完整的json\n## 注意\n- 各种不同类型的对象分别用对象数组存储;\n- 对象之间的关系存储在relation数组中;\n\n# 警情信息\n - "
|
||||
}
|
||||
],
|
||||
"max_tokens": 4096,
|
||||
"stream": false
|
||||
}
|
||||
obj.messages[1].content = obj.messages[1].content + val.text;
|
||||
prsentText.value = obj;
|
||||
}
|
||||
|
||||
const handleFx = () => {
|
||||
if(!prsentText.value) return proxy.$message({ type: "warning", message: "请先上传要解析的文件" });;
|
||||
btnLoading.value = true;
|
||||
ParsingText( prsentText.value,(res)=>{
|
||||
btnLoading.value = false;
|
||||
let content = res.data.choices[0].message.content;
|
||||
let message = null;
|
||||
try{
|
||||
message = content ? JSON.parse(content):''
|
||||
}catch(err){
|
||||
proxy.$message({ type: "danger", message: "解析异常,请重新上传解析" });;
|
||||
}
|
||||
if(!message) return;
|
||||
console.log(message,'=================将结果');
|
||||
})
|
||||
}
|
||||
|
||||
// 表格高度计算
|
||||
const tabHeightFn = () => {
|
||||
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 280;
|
||||
@ -226,10 +285,12 @@ const tabHeightFn = () => {
|
||||
position: absolute;
|
||||
bottom: 50px;
|
||||
height: 210px;
|
||||
width: 100%;
|
||||
width: calc(100% - 20px);
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
background: #ccc;
|
||||
border: 2px dashed #ccc;
|
||||
margin: 0 10px;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
Reference in New Issue
Block a user