Compare commits

...

2 Commits

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

8
src/api/work/alarm.ts

@ -13,3 +13,11 @@ 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,6 +103,12 @@
@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>
@ -411,6 +417,63 @@
</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"
@ -424,9 +487,12 @@ 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,
@ -439,6 +505,13 @@ 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() {
@ -463,6 +536,30 @@ 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();
}); });

178
src/views/sensitivePerception/PoliceNegative.vue

@ -75,7 +75,8 @@
<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>
@ -136,7 +137,15 @@
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>
@ -420,7 +429,8 @@
type="primary" type="primary"
link link
@click="handleAction(row)" @click="handleAction(row)"
>查看详情</el-button >查看详情
</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
@ -442,6 +452,83 @@
</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"
@ -456,13 +543,87 @@ import {
listNegativeByPoliceIdCode, listNegativeByPoliceIdCode,
listNegativeMonthly, listNegativeMonthly,
} from "@/api/sensitivePerception/profilePolice"; } from "@/api/sensitivePerception/profilePolice";
import { InspectCase } from "@/enums/dictEnums"; import {HostLevel, 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,
@ -476,6 +637,7 @@ 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) => {
@ -615,6 +777,7 @@ 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;
@ -654,6 +817,7 @@ 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;
@ -702,25 +866,31 @@ 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);
} }

177
src/views/sensitivePerception/RiskClue.vue

@ -50,7 +50,8 @@
<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>
@ -88,16 +89,16 @@
<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="handleShowDetail(row)" @click="handleShowNotification(row.id)"
>查看详情</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">
@ -116,11 +117,91 @@
</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([]);
@ -141,6 +222,82 @@ 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) => {

170
src/views/sensitivePerception/RiskPersonnel.vue

@ -48,7 +48,8 @@
<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>
@ -80,7 +81,8 @@
<el-tag <el-tag
v-for="item in row.tags.split(',')" v-for="item in row.tags.split(',')"
:key="item" :key="item"
>{{ item }}</el-tag >{{ item }}
</el-tag
> >
</div> </div>
</template> </template>
@ -92,7 +94,8 @@
type="danger" type="danger"
v-for="item in row.smallTags" v-for="item in row.smallTags"
:key="item" :key="item"
>{{ item }}</el-tag >{{ item }}
</el-tag
> >
</div> </div>
</template> </template>
@ -109,8 +112,15 @@
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>
@ -192,18 +202,169 @@
</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;
@ -224,6 +385,7 @@ 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);

26
src/views/work/Alarm.vue

@ -102,7 +102,13 @@
<el-table-column <el-table-column
label="被通知单位" label="被通知单位"
prop="notificationDepartName" prop="notificationDepartName"
width="150" width="90"
show-overflow-tooltip
/>
<el-table-column
label="被通知民警"
prop="policeName"
width="90"
/> />
<el-table-column <el-table-column
label="提醒内容" label="提醒内容"
@ -176,6 +182,15 @@
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="提醒内容"
> >
@ -245,6 +260,15 @@
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