Compare commits

..

No commits in common. '26d925e11c84af82c791195178e63fd636393136' and '8401a799cd8cec1025dc225d98771ad5901c469c' have entirely different histories.

  1. 8
      src/api/work/alarm.ts
  2. 97
      src/views/sensitivePerception/DepartNegative.vue
  3. 216
      src/views/sensitivePerception/PoliceNegative.vue
  4. 207
      src/views/sensitivePerception/RiskClue.vue
  5. 200
      src/views/sensitivePerception/RiskPersonnel.vue
  6. 26
      src/views/work/Alarm.vue

8
src/api/work/alarm.ts

@ -13,11 +13,3 @@ export function alarmNotificationReply(data) {
body: data body: data
}); });
} }
export function alarmNotificationCommit(data) {
return request.post({
url: `/alarm/notification/commit`,
body: data
});
}

97
src/views/sensitivePerception/DepartNegative.vue

@ -103,12 +103,6 @@
@click="handleShowProfile(row)" @click="handleShowProfile(row)"
>问题详情</el-button >问题详情</el-button
> >
<el-button
type="primary"
link
@click="handleShowNotification"
>预警提醒</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -417,63 +411,6 @@
</el-scrollbar> </el-scrollbar>
</el-dialog> </el-dialog>
<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) =>
(formData2.involveDepartName =
row.shortName)
"
/>
</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>
<negative-dialog <negative-dialog
v-model="negativeShow" v-model="negativeShow"
:id="activeNegativeId" :id="activeNegativeId"
@ -487,12 +424,9 @@ import {
getDepartProfile, getDepartProfile,
listNegativeMonthly, listNegativeMonthly,
} from "@/api/sensitivePerception/profileDepart"; } from "@/api/sensitivePerception/profileDepart";
import {alarmNotificationCommit, alarmNotificationReply} from "@/api/work/alarm"
import { listNegative } from "@/api/work/negative"; import { listNegative } from "@/api/work/negative";
import { InspectCase } from "@/enums/dictEnums"; import { InspectCase } from "@/enums/dictEnums";
import moment from "moment"; import moment from "moment";
import {ref} from "vue";
import feedback from "~/utils/feedback";
const query = ref({ const query = ref({
current: 1, current: 1,
@ -505,13 +439,6 @@ const query = ref({
}); });
const list = ref<any[]>([]); const list = ref<any[]>([]);
const total = ref(0); const total = ref(0);
let showNotification = ref(false)
let formData2 = ref({
alarmTypeId: 1,
involveDepartId: '',
involveDepartName: '',
alarmContent: ''
})
const mainLoading = ref(false); const mainLoading = ref(false);
function getList() { function getList() {
@ -536,30 +463,6 @@ function reset() {
getList(); getList();
} }
const handleShowNotification = () => {
showNotification.value = true
}
const handleNotification = async () => {
if(formData2.value.involveDepartId == '') {
feedback.msgWarning("请选择被提醒单位");
return;
}
if(formData2.value.alarmContent == '') {
feedback.msgWarning("请填写提醒内容");
return;
}
let data = {
alarmTypeId: formData2.value.alarmTypeId,
notificationDepartCode: formData2.value.involveDepartId,
notificationDepartName: formData2.value.involveDepartName,
alarmContent: formData2.value.alarmContent
}
await alarmNotificationCommit(data);
showNotification.value = false;
feedback.msgSuccess("操作成功");
}
onMounted(() => { onMounted(() => {
getList(); getList();
}); });

216
src/views/sensitivePerception/PoliceNegative.vue

@ -73,10 +73,9 @@
<div> <div>
<el-button type="primary" @click="getList"> <el-button type="primary" @click="getList">
<template #icon> <template #icon>
<icon name="el-icon-Search"/> <icon name="el-icon-Search" />
</template> </template>
查询 查询</el-button
</el-button
> >
<el-button @click="reset">重置</el-button> <el-button @click="reset">重置</el-button>
</div> </div>
@ -84,7 +83,7 @@
</header> </header>
<div class="table-container" v-loading="mainLoading"> <div class="table-container" v-loading="mainLoading">
<el-table :data="list"> <el-table :data="list">
<el-table-column label="姓名" prop="name" width="120"/> <el-table-column label="姓名" prop="name" width="120" />
<el-table-column label="性别" width="100" align="center"> <el-table-column label="性别" width="100" align="center">
<template #default="{ row }"> <template #default="{ row }">
<span>{{ getGenderFromIdCode(row.idCode) }}</span> <span>{{ getGenderFromIdCode(row.idCode) }}</span>
@ -98,7 +97,7 @@
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="警号" prop="empNo" width="160"/> <el-table-column label="警号" prop="empNo" width="160" />
<el-table-column <el-table-column
label="入职时间" label="入职时间"
prop="employmentDate" prop="employmentDate"
@ -137,15 +136,7 @@
type="primary" type="primary"
link link
@click="handleShowProfile(row)" @click="handleShowProfile(row)"
>问题详情 >问题详情</el-button
</el-button
>
<el-button
type="primary"
link
@click="handleShowNotification"
>预警提醒
</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
@ -196,7 +187,7 @@
<h5>民警基本情况</h5> <h5>民警基本情况</h5>
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<icon name="local-icon-police" :size="120"/> <icon name="local-icon-police" :size="120" />
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<div class="row"> <div class="row">
@ -410,9 +401,9 @@
<div></div> <div></div>
<h5>问题清单</h5> <h5>问题清单</h5>
<el-table :data="negativeList"> <el-table :data="negativeList">
<el-table-column label="发现时间" prop="discoveryTime"/> <el-table-column label="发现时间" prop="discoveryTime" />
<el-table-column label="问题来源" prop="problemSources"/> <el-table-column label="问题来源" prop="problemSources" />
<el-table-column label="业务类别" prop="businessTypeName"/> <el-table-column label="业务类别" prop="businessTypeName" />
<el-table-column <el-table-column
label="涉及单位" label="涉及单位"
prop="involveDepartName" prop="involveDepartName"
@ -429,8 +420,7 @@
type="primary" type="primary"
link link
@click="handleAction(row)" @click="handleAction(row)"
>查看详情 >查看详情</el-button
</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
@ -452,83 +442,6 @@
</el-scrollbar> </el-scrollbar>
</el-dialog> </el-dialog>
<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>
<negative-dialog <negative-dialog
v-model="negativeShow" v-model="negativeShow"
:id="activeNegativeId" :id="activeNegativeId"
@ -543,87 +456,13 @@ import {
listNegativeByPoliceIdCode, listNegativeByPoliceIdCode,
listNegativeMonthly, listNegativeMonthly,
} from "@/api/sensitivePerception/profilePolice"; } from "@/api/sensitivePerception/profilePolice";
import {HostLevel, InspectCase} from "@/enums/dictEnums"; import { InspectCase } from "@/enums/dictEnums";
import {getDictLable, getGenderFromIdCode} from "@/utils/util"; import { getDictLable, getGenderFromIdCode } from "@/utils/util";
import moment from "moment"; import moment from "moment";
import useCatchStore from "@/stores/modules/catch"; import useCatchStore from "@/stores/modules/catch";
import {ref} from "vue";
import {alarmNotificationCommit} from "~/api/work/alarm";
import feedback from "~/utils/feedback";
import {listPoliceAll, listPoliceLeader} from "~/api/system/police";
const catchStore = useCatchStore(); const catchStore = useCatchStore();
const dict = catchStore.getDicts(["personType"]); const dict = catchStore.getDicts(["personType"]);
let showNotification = ref(false)
let formData2 = ref({
alarmTypeId: 1,
involveDepartId: '',
involveDepartName: '',
alarmContent: '',
blameName: '',
blameIdCode: '',
blameEmpNo: '',
blames: {},
level: -1
})
let police = ref({})
let polices = ref([])
const handleShowNotification = () => {
showNotification.value = true
}
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
}
await alarmNotificationCommit(data);
showNotification.value = false;
feedback.msgSuccess("操作成功");
}
const changeDepart = (row) => {
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
}
}
function getPolices(departId) {
if(departId=='') {
return;
}
listPoliceLeader(departId).then(res => {
polices.value = res
})
}
const query = ref({ const query = ref({
current: 1, current: 1,
@ -637,7 +476,6 @@ const list = ref<any[]>([]);
const total = ref(0); const total = ref(0);
const mainLoading = ref(false); const mainLoading = ref(false);
function getList() { function getList() {
mainLoading.value = true; mainLoading.value = true;
listPoliceNegative(query.value).then((data) => { listPoliceNegative(query.value).then((data) => {
@ -743,14 +581,14 @@ const radarOption = ref({
}, },
radar: { radar: {
indicator: [ indicator: [
{name: "110接处警", max: 100}, { name: "110接处警", max: 100 },
{name: "122接处警", max: 100}, { name: "122接处警", max: 100 },
{name: "人境窗口服务", max: 100}, { name: "人境窗口服务", max: 100 },
{name: "车驾管服务", max: 100}, { name: "车驾管服务", max: 100 },
{name: "交警执法", max: 100}, { name: "交警执法", max: 100 },
{name: "执法办案", max: 100}, { name: "执法办案", max: 100 },
{name: "专项工作", max: 100}, { name: "专项工作", max: 100 },
{name: "安保维稳", max: 100}, { name: "安保维稳", max: 100 },
], ],
}, },
series: [ series: [
@ -777,7 +615,6 @@ const radarOption = ref({
}); });
const score = ref(0); const score = ref(0);
async function getProfileData() { async function getProfileData() {
loading.value = true; loading.value = true;
negativeQuery.value.idCode = activeRow.value.idCode; negativeQuery.value.idCode = activeRow.value.idCode;
@ -817,16 +654,15 @@ function getNegativeList() {
const negativeShow = ref(false); const negativeShow = ref(false);
const activeNegativeId = ref(""); const activeNegativeId = ref("");
function handleAction(row) { function handleAction(row) {
negativeShow.value = true; negativeShow.value = true;
activeNegativeId.value = row.id; activeNegativeId.value = row.id;
} }
const colors = [ const colors = [
{color: "var(--success-color)", percentage: 60}, { color: "var(--success-color)", percentage: 60 },
{color: "#DC6231", percentage: 80}, { color: "#DC6231", percentage: 80 },
{color: "var(--danger-color)", percentage: 100}, { color: "var(--danger-color)", percentage: 100 },
]; ];
function getType(val) { function getType(val) {
@ -866,31 +702,25 @@ function getScoreLabel() {
.col { .col {
--label-width: 60px; --label-width: 60px;
} }
.score-progress-body { .score-progress-body {
text-align: center; text-align: center;
font-size: 18px; font-size: 18px;
.score-progress_score { .score-progress_score {
font-size: 60px; font-size: 60px;
line-height: 84px; line-height: 84px;
} }
.score-progress_title { .score-progress_title {
font-size: 26px; font-size: 26px;
line-height: 22px; line-height: 22px;
} }
} }
.score-theme { .score-theme {
&[type="success"] { &[type="success"] {
color: var(--success-color); color: var(--success-color);
} }
&[type="warning"] { &[type="warning"] {
color: #e87749; color: #e87749;
} }
&[type="danger"] { &[type="danger"] {
color: var(--danger-color); color: var(--danger-color);
} }

207
src/views/sensitivePerception/RiskClue.vue

@ -2,7 +2,7 @@
<div class="container h100"> <div class="container h100">
<el-row :gutter="20" class="h100"> <el-row :gutter="20" class="h100">
<el-col :span="6" class="h100"> <el-col :span="6" class="h100">
<model-risk-tree v-model="query.riskScoreRuleId"/> <model-risk-tree v-model="query.riskScoreRuleId" />
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<header> <header>
@ -48,10 +48,9 @@
<div> <div>
<el-button type="primary" @click="getList"> <el-button type="primary" @click="getList">
<template #icon> <template #icon>
<icon name="el-icon-Search"/> <icon name="el-icon-Search" />
</template> </template>
查询 查询</el-button
</el-button
> >
<el-button @click="reset">重置</el-button> <el-button @click="reset">重置</el-button>
</div> </div>
@ -86,19 +85,19 @@
show-overflow-tooltip show-overflow-tooltip
> >
<template #default="{ row }"> <template #default="{ row }">
<span style="white-space: pre-wrap;">{{ row.data }}</span> <span style="white-space: pre-wrap;">{{row.data}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="180"> <!-- <el-table-column label="操作" width="180">-->
<template #default="{ row }"> <!-- <template #default="{ row }">-->
<el-button <!-- <el-button
type="primary" type="primary"
link link
@click="handleShowNotification(row.id)" @click="handleShowDetail(row)"
>预警提醒 >查看详情</el-button
</el-button> > -->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
</el-table> </el-table>
</div> </div>
<div class="flex end mt-8"> <div class="flex end mt-8">
@ -117,91 +116,11 @@
</div> </div>
</el-col> </el-col>
</el-row> </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> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {listRiskClues} from "@/api/sensitivePerception/riskClue"; 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({}); const query = ref({});
const list = ref([]); const list = ref([]);
@ -222,82 +141,6 @@ watch(
); );
const loading = ref(false) const loading = 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)
const handleShowNotification = (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("操作成功");
}
const changeDepart = (row) => {
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
}
}
function getPolices(departId) {
if(departId=='') {
return;
}
listPoliceAll(departId).then(res => {
polices.value = res
})
}
function getList() { function getList() {
loading.value = true loading.value = true
listRiskClues(query.value).then((data) => { listRiskClues(query.value).then((data) => {
@ -308,37 +151,37 @@ function getList() {
} }
const filterJsonData = (row) => { const filterJsonData = (row) => {
if (row.data == undefined) { if(row.data == undefined) {
return '' return ''
} }
let j = JSON.parse(row.data) let j = JSON.parse(row.data)
let str = '' let str = ''
if (j instanceof Array) { if(j instanceof Array) {
j.forEach(item => { j.forEach(item => {
str += JSON.stringify(item) + "\n"; str += JSON.stringify(item)+"\n";
}) })
} }
if (j.sourceData != undefined) { if(j.sourceData != undefined) {
j = JSON.parse(row.sourceData) j = JSON.parse(row.sourceData)
} }
for (let key in j) { for(let key in j) {
if (key == 'eventTime') { if(key == 'eventTime') {
continue continue
} }
if (key == 'idCode') { if(key == 'idCode') {
continue continue
} }
if (key == 'departId') { if(key == 'departId') {
continue continue
} }
if (key == 'personId') { if(key == 'personId') {
continue continue
} }
if (key == 'name') { if(key == 'name') {
continue continue
} }
str += j[key] + '\n' str += j[key]+'\n'
} }
} }

200
src/views/sensitivePerception/RiskPersonnel.vue

@ -46,10 +46,9 @@
<div> <div>
<el-button type="primary" @click="getList"> <el-button type="primary" @click="getList">
<template #icon> <template #icon>
<icon name="el-icon-Search"/> <icon name="el-icon-Search" />
</template> </template>
查询 查询</el-button
</el-button
> >
<el-button @click="reset">重置</el-button> <el-button @click="reset">重置</el-button>
</div> </div>
@ -57,7 +56,7 @@
</header> </header>
<div class="table-container"> <div class="table-container">
<el-table :data="list"> <el-table :data="list">
<el-table-column label="姓名" prop="name" width="100"/> <el-table-column label="姓名" prop="name" width="100" />
<el-table-column <el-table-column
label="性别" label="性别"
prop="gender" prop="gender"
@ -68,8 +67,8 @@
<span>{{ getGender(row.gender) }}</span> <span>{{ getGender(row.gender) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="年龄" prop="age" width="60"/> <el-table-column label="年龄" prop="age" width="60" />
<el-table-column label="身份证号" prop="idCode" width="180"/> <el-table-column label="身份证号" prop="idCode" width="180" />
<el-table-column <el-table-column
label="手机号" label="手机号"
prop="mobileNumber" prop="mobileNumber"
@ -81,8 +80,7 @@
<el-tag <el-tag
v-for="item in row.tags.split(',')" v-for="item in row.tags.split(',')"
:key="item" :key="item"
>{{ item }} >{{ item }}</el-tag
</el-tag
> >
</div> </div>
</template> </template>
@ -94,8 +92,7 @@
type="danger" type="danger"
v-for="item in row.smallTags" v-for="item in row.smallTags"
:key="item" :key="item"
>{{ item }} >{{ item }}</el-tag
</el-tag
> >
</div> </div>
</template> </template>
@ -112,15 +109,8 @@
type="primary" type="primary"
link link
@click="handleShowDesc(row)" @click="handleShowDesc(row)"
>查看详情 >查看详情</el-button
</el-button
> >
<el-button
type="primary"
link
@click="handleShowNotification"
>预警提醒
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -194,177 +184,26 @@
show-overflow-tooltip show-overflow-tooltip
> >
<template #default="{ row }"> <template #default="{ row }">
<span style="white-space: pre-wrap;">{{ row.data }}</span> <span style="white-space: pre-wrap;">{{row.data}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="80" label="分值" prop="score"/> <el-table-column width="80" label="分值" prop="score" />
</el-table> </el-table>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<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>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { import {
listRiskPersonnel, listRiskPersonnel,
getRiskPersonnel, getRiskPersonnel,
} from "@/api/sensitivePerception/riskPersonnel"; } from "@/api/sensitivePerception/riskPersonnel";
import {ref} from "vue";
import {alarmNotificationCommit} from "~/api/work/alarm";
import feedback from "~/utils/feedback";
import {listPoliceAll} from "~/api/system/police";
const query = ref({}); const query = ref({});
const list = ref<any[]>([]); const list = ref<any[]>([]);
const total = ref(0); const total = ref(0);
const show = ref(false); const show = 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([])
const handleShowNotification = () => {
showNotification.value = true
}
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
}
await alarmNotificationCommit(data);
showNotification.value = false;
feedback.msgSuccess("操作成功");
}
const changeDepart = (row) => {
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
}
}
function getPolices(departId) {
if(departId=='') {
return;
}
listPoliceAll(departId).then(res => {
polices.value = res
})
}
function getList() { function getList() {
listRiskPersonnel(query.value).then((data) => { listRiskPersonnel(query.value).then((data) => {
list.value = data.records; list.value = data.records;
@ -385,7 +224,6 @@ const activeRow = ref({});
const personal = ref({ const personal = ref({
riskClueList: [], riskClueList: [],
}); });
async function handleShowDesc(row) { async function handleShowDesc(row) {
activeRow.value = row; activeRow.value = row;
const data = await getRiskPersonnel(row.id); const data = await getRiskPersonnel(row.id);
@ -394,32 +232,32 @@ async function handleShowDesc(row) {
} }
const filterJsonData = (row) => { const filterJsonData = (row) => {
if (row.data == undefined) { if(row.data == undefined) {
return '' return ''
} }
try { try {
let j = JSON.parse(row.data) let j = JSON.parse(row.data)
if (j.sourceData != undefined) { if(j.sourceData != undefined) {
j = JSON.parse(row.sourceData) j = JSON.parse(row.sourceData)
} }
let str = '' let str = ''
for (let key in j) { for(let key in j) {
if (key == 'eventTime') { if(key == 'eventTime') {
continue continue
} }
if (key == 'idCode') { if(key == 'idCode') {
continue continue
} }
if (key == 'departId') { if(key == 'departId') {
continue continue
} }
if (key == 'personId') { if(key == 'personId') {
continue continue
} }
if (key == 'name') { if(key == 'name') {
continue continue
} }
str += j[key] + '\n' str += j[key]+'\n'
} }
return str return str
} catch (e) { } catch (e) {

26
src/views/work/Alarm.vue

@ -102,13 +102,7 @@
<el-table-column <el-table-column
label="被通知单位" label="被通知单位"
prop="notificationDepartName" prop="notificationDepartName"
width="90" width="150"
show-overflow-tooltip
/>
<el-table-column
label="被通知民警"
prop="policeName"
width="90"
/> />
<el-table-column <el-table-column
label="提醒内容" label="提醒内容"
@ -182,15 +176,6 @@
style="width: 280px" style="width: 280px"
/> />
</el-form-item> </el-form-item>
<el-form-item
label="被通知单位"
>
<el-input
v-model="formData.policeName"
disabled
style="width: 280px"
/>
</el-form-item>
<el-form-item <el-form-item
label="提醒内容" label="提醒内容"
> >
@ -260,15 +245,6 @@
style="width: 280px" style="width: 280px"
/> />
</el-form-item> </el-form-item>
<el-form-item
label="被通知单位"
>
<el-input
v-model="showData.policeName"
disabled
style="width: 280px"
/>
</el-form-item>
<el-form-item <el-form-item
label="提醒内容" label="提醒内容"
> >

Loading…
Cancel
Save