|
|
|
|
@ -1,206 +1,192 @@
|
|
|
|
|
<template> |
|
|
|
|
<div class="container h100"> |
|
|
|
|
<el-row :gutter="20" class="h100"> |
|
|
|
|
<el-col :span="6" class="h100"> |
|
|
|
|
<model-risk-tree v-model="query.riskScoreRuleId"/> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="18"> |
|
|
|
|
<header> |
|
|
|
|
<el-form :label-width="140"> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-form-item label="发生时间"> |
|
|
|
|
<date-time-range-picker-ext |
|
|
|
|
v-model="query.eventTime" |
|
|
|
|
/> |
|
|
|
|
<div class="container h100"> |
|
|
|
|
<el-row :gutter="20" class="h100"> |
|
|
|
|
<el-col :span="6" class="h100"> |
|
|
|
|
<model-risk-tree v-model="query.riskScoreRuleId" /> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="18"> |
|
|
|
|
<header> |
|
|
|
|
<el-form :label-width="140"> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-form-item label="发生时间"> |
|
|
|
|
<date-time-range-picker-ext |
|
|
|
|
v-model="query.eventTime" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-form-item label="姓名"> |
|
|
|
|
<el-input |
|
|
|
|
placeholder="请输入" |
|
|
|
|
v-model="query.name" |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-form-item label="身份证号"> |
|
|
|
|
<el-input |
|
|
|
|
placeholder="请输入" |
|
|
|
|
v-model="query.idCode" |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-form-item label="风险内容"> |
|
|
|
|
<el-input |
|
|
|
|
placeholder="请输入" |
|
|
|
|
v-model="query.thingDesc" |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
</el-form> |
|
|
|
|
<div class="flex end mb-20"> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" @click="getList"> |
|
|
|
|
<template #icon> |
|
|
|
|
<icon name="el-icon-Search" /> |
|
|
|
|
</template> |
|
|
|
|
查询 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button @click="reset">重置</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</header> |
|
|
|
|
<div class="table-container" v-loading="loading"> |
|
|
|
|
<el-table :data="list"> |
|
|
|
|
<el-table-column |
|
|
|
|
label="发生时间" |
|
|
|
|
prop="eventTime" |
|
|
|
|
width="160" |
|
|
|
|
/> |
|
|
|
|
<el-table-column label="姓名" prop="name" width="120" /> |
|
|
|
|
<el-table-column |
|
|
|
|
label="身份证号码" |
|
|
|
|
prop="idCode" |
|
|
|
|
width="170" |
|
|
|
|
show-overflow-tooltip |
|
|
|
|
/> |
|
|
|
|
<el-table-column |
|
|
|
|
label="风险因素" |
|
|
|
|
prop="riskReason" |
|
|
|
|
width="100" |
|
|
|
|
show-overflow-tooltip |
|
|
|
|
/> |
|
|
|
|
<el-table-column label="风险内容" show-overflow-tooltip> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<span style="white-space: pre-wrap">{{ |
|
|
|
|
row.data |
|
|
|
|
}}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" width="180"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
link |
|
|
|
|
@click="handleShowNotification(row.id)" |
|
|
|
|
>预警提醒 |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex end mt-8"> |
|
|
|
|
<el-pagination |
|
|
|
|
@size-change="getList" |
|
|
|
|
@current-change="getList" |
|
|
|
|
:current-page="query.current" |
|
|
|
|
:page-sizes="[9, 18, 36]" |
|
|
|
|
v-model:page-size="query.size" |
|
|
|
|
v-model:current-page="query.current" |
|
|
|
|
layout="total, sizes, prev, pager, next" |
|
|
|
|
:total="total" |
|
|
|
|
v-if="list.length" |
|
|
|
|
> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<el-dialog v-model="showNotification" title="创建提醒" width="700px"> |
|
|
|
|
<el-form |
|
|
|
|
label-width="148" |
|
|
|
|
:model="formData2" |
|
|
|
|
ref="formRef" |
|
|
|
|
class="mr-40" |
|
|
|
|
> |
|
|
|
|
<el-form-item label="提醒类型"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="formData2.alarmTypeId" |
|
|
|
|
style="width: 280px" |
|
|
|
|
> |
|
|
|
|
<el-option :value="1" label="预警问题" /> |
|
|
|
|
<el-option :value="2" label="风险问题" /> |
|
|
|
|
<el-option :value="3" label="提醒通知" /> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-form-item label="姓名"> |
|
|
|
|
<el-input |
|
|
|
|
placeholder="请输入" |
|
|
|
|
v-model="query.name" |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
|
<el-form-item |
|
|
|
|
label="被通知单位" |
|
|
|
|
prop="involveDepartId" |
|
|
|
|
:rules="{ |
|
|
|
|
message: '请选择问题涉及单位', |
|
|
|
|
trigger: ['blur'], |
|
|
|
|
}" |
|
|
|
|
> |
|
|
|
|
<div> |
|
|
|
|
<depart-tree-select |
|
|
|
|
v-model="formData2.involveDepartId" |
|
|
|
|
:check-strictly="true" |
|
|
|
|
@node-click="(row) => changeDepart(row)" |
|
|
|
|
style="width: 280px" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-form-item label="身份证号"> |
|
|
|
|
<el-input |
|
|
|
|
placeholder="请输入" |
|
|
|
|
v-model="query.idCode" |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
|
<el-form-item label="提醒内容"> |
|
|
|
|
<el-input |
|
|
|
|
type="textarea" |
|
|
|
|
v-model="formData2.alarmContent" |
|
|
|
|
:autosize="{ minRows: 6 }" |
|
|
|
|
:rules="{ |
|
|
|
|
message: '请填写提醒内容', |
|
|
|
|
trigger: ['blur'], |
|
|
|
|
}" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-form-item label="风险内容"> |
|
|
|
|
<el-input |
|
|
|
|
placeholder="请输入" |
|
|
|
|
v-model="query.thingDesc" |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
|
<el-form-item label="是否要求回复"> |
|
|
|
|
<el-switch |
|
|
|
|
v-model="formData2.requestReply" |
|
|
|
|
inline-prompt |
|
|
|
|
active-text="必须回复" |
|
|
|
|
inactive-text="无需回复" |
|
|
|
|
:active-value="true" |
|
|
|
|
:inactive-value="false" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
</el-form> |
|
|
|
|
<div class="flex end mb-20"> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" @click="getList"> |
|
|
|
|
<template #icon> |
|
|
|
|
<icon name="el-icon-Search"/> |
|
|
|
|
</template> |
|
|
|
|
查询 |
|
|
|
|
</el-button |
|
|
|
|
> |
|
|
|
|
<el-button @click="reset">重置</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</header> |
|
|
|
|
<div class="table-container" v-loading="loading"> |
|
|
|
|
<el-table :data="list"> |
|
|
|
|
<el-table-column |
|
|
|
|
label="发生时间" |
|
|
|
|
prop="eventTime" |
|
|
|
|
width="160" |
|
|
|
|
/> |
|
|
|
|
<el-table-column |
|
|
|
|
label="姓名" |
|
|
|
|
prop="name" |
|
|
|
|
width="120" |
|
|
|
|
/> |
|
|
|
|
<el-table-column |
|
|
|
|
label="身份证号码" |
|
|
|
|
prop="idCode" |
|
|
|
|
width="170" |
|
|
|
|
show-overflow-tooltip |
|
|
|
|
/> |
|
|
|
|
<el-table-column |
|
|
|
|
label="风险因素" |
|
|
|
|
prop="riskReason" |
|
|
|
|
width="100" |
|
|
|
|
show-overflow-tooltip |
|
|
|
|
/> |
|
|
|
|
<el-table-column |
|
|
|
|
label="风险内容" |
|
|
|
|
show-overflow-tooltip |
|
|
|
|
> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<span style="white-space: pre-wrap;">{{ row.data }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" width="180"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
</el-form> |
|
|
|
|
<footer class="flex end"> |
|
|
|
|
<el-button @click="showNotification = false" size="large" |
|
|
|
|
>取消</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
link |
|
|
|
|
@click="handleShowNotification(row.id)" |
|
|
|
|
>预警提醒 |
|
|
|
|
@click="handleNotification" |
|
|
|
|
size="large" |
|
|
|
|
>提交 |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex end mt-8"> |
|
|
|
|
<el-pagination |
|
|
|
|
@size-change="getList" |
|
|
|
|
@current-change="getList" |
|
|
|
|
:current-page="query.current" |
|
|
|
|
:page-sizes="[9, 18, 36]" |
|
|
|
|
v-model:page-size="query.size" |
|
|
|
|
v-model:current-page="query.current" |
|
|
|
|
layout="total, sizes, prev, pager, next" |
|
|
|
|
:total="total" |
|
|
|
|
v-if="list.length" |
|
|
|
|
> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<el-dialog v-model="showNotification" title="创建提醒" width="600px"> |
|
|
|
|
<el-form label-width="148" :model="formData2" ref="formRef"> |
|
|
|
|
<el-form-item label="提醒类型"> |
|
|
|
|
<div class="flex gap"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="formData2.alarmTypeId" |
|
|
|
|
style="min-width: 185px" |
|
|
|
|
> |
|
|
|
|
<el-option :value="1" label="预警问题"/> |
|
|
|
|
<el-option :value="2" label="风险问题"/> |
|
|
|
|
<el-option :value="3" label="提醒通知"/> |
|
|
|
|
</el-select> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
style="width: 333px" |
|
|
|
|
label="被通知单位" |
|
|
|
|
prop="involveDepartId" |
|
|
|
|
:rules="{ |
|
|
|
|
message: '请选择问题涉及单位', |
|
|
|
|
trigger: ['blur'], |
|
|
|
|
}" |
|
|
|
|
> |
|
|
|
|
<depart-tree-select |
|
|
|
|
v-model="formData2.involveDepartId" |
|
|
|
|
:check-strictly="true" |
|
|
|
|
@node-click=" (row) => changeDepart(row)" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="被提醒民警" |
|
|
|
|
prop="blameEmpNo" |
|
|
|
|
:rules="{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请选择提醒民警', |
|
|
|
|
trigger: ['blur'], |
|
|
|
|
}" |
|
|
|
|
> |
|
|
|
|
<el-select |
|
|
|
|
v-model="police" |
|
|
|
|
value-key="idCode" |
|
|
|
|
placeholder="请选择提醒民警" |
|
|
|
|
@change="changePolice" |
|
|
|
|
style="width: 240px" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in polices" |
|
|
|
|
:key="item.idCode" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="提醒内容" |
|
|
|
|
> |
|
|
|
|
<el-input |
|
|
|
|
type="textarea" |
|
|
|
|
v-model="formData2.alarmContent" |
|
|
|
|
:autosize="{ minRows: 12 }" |
|
|
|
|
:rules="{ |
|
|
|
|
message: '请填写提醒内容', |
|
|
|
|
trigger: ['blur'], |
|
|
|
|
}" |
|
|
|
|
style="width: 280px" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<footer class="flex end"> |
|
|
|
|
<el-button @click="showNotification = false" size="large">取消</el-button> |
|
|
|
|
<el-button type="primary" @click="handleNotification" size="large" |
|
|
|
|
>提交 |
|
|
|
|
</el-button |
|
|
|
|
> |
|
|
|
|
</footer> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
</footer> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script lang="ts" setup> |
|
|
|
|
import {listRiskClues} from "@/api/sensitivePerception/riskClue"; |
|
|
|
|
import {listPoliceAll} from "~/api/system/police"; |
|
|
|
|
import {ref} from "vue"; |
|
|
|
|
import {alarmNotificationCommit} from "~/api/work/alarm"; |
|
|
|
|
import { listRiskClues } from "@/api/sensitivePerception/riskClue"; |
|
|
|
|
import { listPoliceAll } from "~/api/system/police"; |
|
|
|
|
import { ref } from "vue"; |
|
|
|
|
import { alarmNotificationCommit } from "~/api/work/alarm"; |
|
|
|
|
import feedback from "~/utils/feedback"; |
|
|
|
|
const query = ref({}); |
|
|
|
|
|
|
|
|
|
@ -208,160 +194,163 @@ const list = ref([]);
|
|
|
|
|
const total = ref(0); |
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
getList(); |
|
|
|
|
getList(); |
|
|
|
|
}); |
|
|
|
|
watch(() => query.value.riskScoreRuleId, () => { |
|
|
|
|
getList() |
|
|
|
|
}) |
|
|
|
|
watch( |
|
|
|
|
() => query.value.riskScoreRuleId, |
|
|
|
|
() => { |
|
|
|
|
getList(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
const route = useRoute(); |
|
|
|
|
watch( |
|
|
|
|
() => route.query.riskScoreRuleId, |
|
|
|
|
(val) => { |
|
|
|
|
query.value.riskScoreRuleId = [val]; |
|
|
|
|
query.value.riskScoreRuleId = [val]; |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
const loading = ref(false) |
|
|
|
|
const loading = ref(false); |
|
|
|
|
|
|
|
|
|
let showNotification = ref(false) |
|
|
|
|
let showNotification = ref(false); |
|
|
|
|
let formData2 = ref({ |
|
|
|
|
alarmTypeId: 1, |
|
|
|
|
involveDepartId: '', |
|
|
|
|
involveDepartName: '', |
|
|
|
|
alarmContent: '', |
|
|
|
|
blameName: '', |
|
|
|
|
blameIdCode: '', |
|
|
|
|
blameEmpNo: '', |
|
|
|
|
blames: {}, |
|
|
|
|
level: -1 |
|
|
|
|
}) |
|
|
|
|
let police = ref({}) |
|
|
|
|
let polices = ref([]) |
|
|
|
|
let currentClueId = ref(-1) |
|
|
|
|
alarmTypeId: 1, |
|
|
|
|
involveDepartId: "", |
|
|
|
|
involveDepartName: "", |
|
|
|
|
alarmContent: "", |
|
|
|
|
blameName: "", |
|
|
|
|
blameIdCode: "", |
|
|
|
|
blameEmpNo: "", |
|
|
|
|
blames: {}, |
|
|
|
|
level: -1, |
|
|
|
|
requestReply: true |
|
|
|
|
}); |
|
|
|
|
let police = ref({}); |
|
|
|
|
let polices = ref([]); |
|
|
|
|
let currentClueId = ref(-1); |
|
|
|
|
|
|
|
|
|
const handleShowNotification = (id) => { |
|
|
|
|
showNotification.value = true |
|
|
|
|
currentClueId.value = id |
|
|
|
|
} |
|
|
|
|
showNotification.value = true; |
|
|
|
|
currentClueId.value = id; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const handleNotification = async () => { |
|
|
|
|
if(formData2.value.involveDepartId == '') { |
|
|
|
|
feedback.msgWarning("请选择被提醒单位"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if(formData2.value.alarmContent == '') { |
|
|
|
|
feedback.msgWarning("请填写提醒内容"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if(formData2.value.policeIdCode == '') { |
|
|
|
|
feedback.msgWarning("请选择被提醒民警"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
let data = { |
|
|
|
|
alarmTypeId: formData2.value.alarmTypeId, |
|
|
|
|
notificationDepartCode: formData2.value.involveDepartId, |
|
|
|
|
notificationDepartName: formData2.value.involveDepartName, |
|
|
|
|
alarmContent: formData2.value.alarmContent, |
|
|
|
|
policeName: police.value.name, |
|
|
|
|
policeIdCode: police.value.idCode, |
|
|
|
|
policeNo: police.value.empNo |
|
|
|
|
} |
|
|
|
|
if(currentClueId.value != -1) { |
|
|
|
|
data['clueId'] = currentClueId.value |
|
|
|
|
} |
|
|
|
|
await alarmNotificationCommit(data); |
|
|
|
|
showNotification.value = false; |
|
|
|
|
feedback.msgSuccess("操作成功"); |
|
|
|
|
initFormData2(); |
|
|
|
|
} |
|
|
|
|
if (formData2.value.involveDepartId == "") { |
|
|
|
|
feedback.msgWarning("请选择被提醒单位"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (formData2.value.alarmContent == "") { |
|
|
|
|
feedback.msgWarning("请填写提醒内容"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (formData2.value.policeIdCode == "") { |
|
|
|
|
feedback.msgWarning("请选择被提醒民警"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
let data = { |
|
|
|
|
alarmTypeId: formData2.value.alarmTypeId, |
|
|
|
|
notificationDepartId: formData2.value.involveDepartId, |
|
|
|
|
notificationDepartName: formData2.value.involveDepartName, |
|
|
|
|
alarmContent: formData2.value.alarmContent, |
|
|
|
|
policeName: police.value.name, |
|
|
|
|
policeIdCode: police.value.idCode, |
|
|
|
|
policeNo: police.value.empNo, |
|
|
|
|
}; |
|
|
|
|
if (currentClueId.value != -1) { |
|
|
|
|
data["clueId"] = currentClueId.value; |
|
|
|
|
} |
|
|
|
|
await alarmNotificationCommit(data); |
|
|
|
|
showNotification.value = false; |
|
|
|
|
feedback.msgSuccess("操作成功"); |
|
|
|
|
initFormData2(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const initFormData2 = () => { |
|
|
|
|
formData2.value = { |
|
|
|
|
alarmTypeId: 1, |
|
|
|
|
involveDepartId: '', |
|
|
|
|
involveDepartName: '', |
|
|
|
|
alarmContent: '', |
|
|
|
|
blameName: '', |
|
|
|
|
blameIdCode: '', |
|
|
|
|
blameEmpNo: '', |
|
|
|
|
blames: {}, |
|
|
|
|
level: -1 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
formData2.value = { |
|
|
|
|
alarmTypeId: 1, |
|
|
|
|
involveDepartId: "", |
|
|
|
|
involveDepartName: "", |
|
|
|
|
alarmContent: "", |
|
|
|
|
blameName: "", |
|
|
|
|
blameIdCode: "", |
|
|
|
|
blameEmpNo: "", |
|
|
|
|
blames: {}, |
|
|
|
|
level: -1, |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const changeDepart = (row) => { |
|
|
|
|
formData2.value.involveDepartName = row.shortName; |
|
|
|
|
formData2.value.level = row.level |
|
|
|
|
police.value = {} |
|
|
|
|
getPolices(row.id); |
|
|
|
|
} |
|
|
|
|
formData2.value.involveDepartName = row.shortName; |
|
|
|
|
formData2.value.level = row.level; |
|
|
|
|
police.value = {}; |
|
|
|
|
getPolices(row.id); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const changePolice = (data) => { |
|
|
|
|
police.value = { |
|
|
|
|
idCode: data.idCode, |
|
|
|
|
empNo: data.empNo, |
|
|
|
|
name: data.name |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
const changePolice = (data) => { |
|
|
|
|
police.value = { |
|
|
|
|
idCode: data.idCode, |
|
|
|
|
empNo: data.empNo, |
|
|
|
|
name: data.name, |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
function getPolices(departId) { |
|
|
|
|
if(departId=='') { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
listPoliceAll(departId).then(res => { |
|
|
|
|
polices.value = res |
|
|
|
|
}) |
|
|
|
|
if (departId == "") { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
listPoliceAll(departId).then((res) => { |
|
|
|
|
polices.value = res; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function getList() { |
|
|
|
|
loading.value = true |
|
|
|
|
listRiskClues(query.value).then((data) => { |
|
|
|
|
list.value = data.records; |
|
|
|
|
total.value = data.total; |
|
|
|
|
loading.value = false |
|
|
|
|
}); |
|
|
|
|
loading.value = true; |
|
|
|
|
listRiskClues(query.value).then((data) => { |
|
|
|
|
list.value = data.records; |
|
|
|
|
total.value = data.total; |
|
|
|
|
loading.value = false; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const filterJsonData = (row) => { |
|
|
|
|
if (row.data == undefined) { |
|
|
|
|
return '' |
|
|
|
|
} |
|
|
|
|
let j = JSON.parse(row.data) |
|
|
|
|
let str = '' |
|
|
|
|
if (j instanceof Array) { |
|
|
|
|
j.forEach(item => { |
|
|
|
|
str += JSON.stringify(item) + "\n"; |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if (j.sourceData != undefined) { |
|
|
|
|
j = JSON.parse(row.sourceData) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (let key in j) { |
|
|
|
|
if (key == 'eventTime') { |
|
|
|
|
continue |
|
|
|
|
} |
|
|
|
|
if (key == 'idCode') { |
|
|
|
|
continue |
|
|
|
|
if (row.data == undefined) { |
|
|
|
|
return ""; |
|
|
|
|
} |
|
|
|
|
if (key == 'departId') { |
|
|
|
|
continue |
|
|
|
|
let j = JSON.parse(row.data); |
|
|
|
|
let str = ""; |
|
|
|
|
if (j instanceof Array) { |
|
|
|
|
j.forEach((item) => { |
|
|
|
|
str += JSON.stringify(item) + "\n"; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (key == 'personId') { |
|
|
|
|
continue |
|
|
|
|
if (j.sourceData != undefined) { |
|
|
|
|
j = JSON.parse(row.sourceData); |
|
|
|
|
} |
|
|
|
|
if (key == 'name') { |
|
|
|
|
continue |
|
|
|
|
|
|
|
|
|
for (let key in j) { |
|
|
|
|
if (key == "eventTime") { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
if (key == "idCode") { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
if (key == "departId") { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
if (key == "personId") { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
if (key == "name") { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
str += j[key] + "\n"; |
|
|
|
|
} |
|
|
|
|
str += j[key] + '\n' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
function reset() { |
|
|
|
|
query.value = {}; |
|
|
|
|
getList(); |
|
|
|
|
query.value = {}; |
|
|
|
|
getList(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
</style> |
|
|
|
|
|