地图上报警信息

pull/1/head
dearlin 2024-02-21 09:04:28 +08:00
parent 2bb72fc628
commit 480013c3d2
7 changed files with 191 additions and 208 deletions

View File

@ -15,6 +15,7 @@
:is-crop="false" :is-crop="false"
:line-width="6" :line-width="6"
line-color="#000" line-color="#000"
bg-color="#FFFFFF"
/> />
<template #footer> <template #footer>
<el-button @click="fnReset"></el-button> <el-button @click="fnReset"></el-button>

View File

@ -4,6 +4,10 @@ export const getPersonnelTypeCount = (params) =>
post("/map/getPersonnelTypeCount", params); // 人员类型统计 post("/map/getPersonnelTypeCount", params); // 人员类型统计
export const getAlarmTypeCount = (params) => export const getAlarmTypeCount = (params) =>
post("/map/getAlarmTypeCount", params); // 告警类型统计 post("/map/getAlarmTypeCount", params); // 告警类型统计
export const getAlArmDataList = (params) =>
post("/map/getAlArmDataList", params); // 告警类型统计
export const getPersonnelPositioningCount = (params) => export const getPersonnelPositioningCount = (params) =>
post("/map/getPersonnelPositioningCount", params); // 人员定位情况 post("/map/getPersonnelPositioningCount", params); // 人员定位情况
// 八项作业 // 八项作业

View File

@ -0,0 +1,147 @@
<template>
<el-dialog v-model="visible" title="告警信息" width="70%">
<table class="print_table">
<el-card>
<el-form
:model="searchForm"
label-width="100px"
@submit.prevent="fnResetPagination"
>
<el-row>
<el-col :span="6">
<el-form-item label="报警类型" prop="eleType" label-width="80px">
<el-select v-model="searchForm.eleType">
<el-option
v-for="item in eleType"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="处理状态" prop="status" label-width="80px">
<el-select v-model="searchForm.status">
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="30px">
<el-button type="primary" native-type="submit">搜索</el-button>
<el-button native-type="reset" @click="fnResetPagination">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<layout-card>
<layout-table
ref="tableRef"
:data="list"
v-model:pagination="pagination"
@get-data="fnGetData"
>
<el-table-column reserve-selection type="selection" width="55" />
<el-table-column label="序号" width="70">
<template v-slot="{ $index }">
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column property="status" label="状态" >
<template v-slot="{ row }">
{{ row.status === 0 ? "未处理" : "已处理" }}
</template>
</el-table-column>
<el-table-column property="eleType" label="告警类型" >
<template v-slot="{ row }">
{{ typeList[row.eleType] }}
</template>
</el-table-column>
<el-table-column property="eleName" label="告警名称" />
<el-table-column property="name" label="触发人员" />
<el-table-column property="layerGroup" label="触发地点" />
<el-table-column property="alarmTime" label="触发时间" />
<el-table-column property="disposeTime" label="处理时间" />
<el-table-column property="disposeStr" label="处理方式" />
<el-table-column property="disposeBy" label="处理人" />
<el-table-column property="regName" label="备注" />
</layout-table>
</layout-card>
</table>
<template #footer>
<el-button @click="fnClose"></el-button>
</template>
</el-dialog>
</template>
<script setup>
import { useVModels } from "@vueuse/core";
import useListData from "@/assets/js/useListData.js";
import { getAlArmDataList } from "@/request/bi/mapApi.js";
import { serialNumber } from "@/assets/js/utils.js";
const typeList = {
1: "滞留报警",
2: "串岗报警",
3: "超员报警",
4: "缺员报警",
5: "静止报警",
6: "一键报警",
7: "越界报警",
8: "聚集告警",
};
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
useListData(getAlArmDataList);
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
pd: {
type: Object,
required: false,
default: () => ({}),
},
});
const statusList = [
{
label: "未处理",
value: 0,
},
{ label: "已处理", value: 1 },
];
const eleType = [
// 1:,2:,3:,4:,5:
{ label: "越界报警", value: 7 },
{ label: "滞留报警", value: 1 },
{ label: "串岗报警", value: 2 },
{ label: "超员报警", value: 3 },
{ label: "缺员报警", value: 4 },
{ label: "静止报警", value: 5 },
{ label: "一键报警", value: 6 },
{ label: "聚集报警", value: 8 },
];
const emits = defineEmits(["update:visible"]);
const { visible } = useVModels(props, emits);
const fnClose = () => {
visible.value = false;
};
</script>
<style lang="scss" scoped>
.video {
width: 100%;
height: 500px;
border: 2px solid #11acd7;
border-radius: 4px;
}
</style>

View File

@ -24,9 +24,11 @@
v-for="(item, index) in data.block2OptionsList" v-for="(item, index) in data.block2OptionsList"
:key="index" :key="index"
> >
<div class="name">{{ item.label }}</div> <div @click="fnAlarmTypeClick(item)">
<div class="num"> <div class="name">{{ item.label }}</div>
<count-up :end-val="item.total"></count-up> <div class="num">
<count-up :end-val="item.total"></count-up>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -48,18 +50,33 @@
</div> </div>
</div> </div>
</div> </div>
<el-dialog v-model="dialogVisible" title="Tips" width="500">
<span>This is a message</span>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">Cancel</el-button>
<el-button type="primary" @click="dialogVisible = false">
Confirm
</el-button>
</div>
</template>
</el-dialog>
<AlarmDialog
v-model:visible="data.drawer"
v-model:pd="data.form"
></AlarmDialog>
</div> </div>
</template> </template>
<script setup> <script setup>
import LayoutTitle from "./title.vue"; import LayoutTitle from "./title.vue";
import AlarmDialog from "../components/dialog/alarm_dialog.vue";
import CountUp from "vue-countup-v3"; import CountUp from "vue-countup-v3";
import { nextTick, reactive } from "vue"; import { nextTick, reactive, ref } from "vue";
import { import {
getPersonnelTypeCount, getPersonnelTypeCount,
getAlarmTypeCount, getAlarmTypeCount,
getPersonnelPositioningCount, getPersonnelPositioningCount,
} from "@/request/bi/mapApi.js"; } from "@/request/bi/mapApi.js";
const data = reactive({ const data = reactive({
block1OptionsList: [ block1OptionsList: [
{ {
@ -148,6 +165,8 @@ const data = reactive({
electricity: "30%", electricity: "30%",
}, },
], ],
form: {},
drawer: false,
}); });
const getPersonnelData = async () => { const getPersonnelData = async () => {
const resData = await getPersonnelTypeCount(); const resData = await getPersonnelTypeCount();
@ -157,6 +176,12 @@ const getPersonnelData = async () => {
}); });
}); });
}; };
const dialogVisible = ref(false);
const fnAlarmTypeClick = (e) => {
data.drawer = true;
data.form.title = e.label;
data.form.type = e.type;
};
const getAlarmTypeData = async () => { const getAlarmTypeData = async () => {
const resData = await getAlarmTypeCount(); const resData = await getAlarmTypeCount();
const dataList = resData.data.data.data; const dataList = resData.data.data.data;

View File

@ -1,99 +0,0 @@
<template>
<el-dialog v-model="visible" title="选择模板">
<el-form
:model="searchForm"
label-width="90px"
@submit.prevent="fnResetPagination"
>
<el-row>
<el-col :span="8">
<el-form-item label="承诺书名称" prop="KEYWORDS">
<el-input v-model="searchForm.KEYWORDS" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="10px">
<el-button type="primary" native-type="submit">搜索</el-button>
<el-button native-type="reset" @click="fnResetPagination">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<layout-table
:data="list"
@get-data="fnGetData"
v-model:pagination="pagination"
>
<el-table-column label="序号" width="60">
<template #default="{ $index }">
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column prop="PROMISE_NAME" label="承诺书名称" />
<el-table-column label="类型">
<template v-slot="{ row }">
{{ row.TYPE === "0" ? "承诺书" : "责任状" }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200">
<template v-slot="{ row }">
<el-button type="primary" text link @click="fnCheck(row)">
选择
</el-button>
</template>
</el-table-column>
</layout-table>
<template #footer>
<el-button @click="fnClose"></el-button>
</template>
</el-dialog>
</template>
<script setup>
import { useVModel } from "@vueuse/core";
import useListData from "@/assets/js/useListData.js";
import {
getAdministrationSelectTemplateCheck,
getAdministrationSelectTemplateList,
} from "@/request/security_commitment_pro.js";
import { serialNumber } from "@/assets/js/utils.js";
import { watch } from "vue";
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
});
const emits = defineEmits(["update:visible", "check"]);
const visible = useVModel(props, "visible", emits);
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getAdministrationSelectTemplateList, {
immediate: false,
});
const fnClose = () => {
visible.value = false;
};
const fnCheck = async (row) => {
const resData = await getAdministrationSelectTemplateCheck({
PROMISE_ID: row.PROMISE_ID,
});
const DETAIL = resData.varList.map((item) => ({
value: item.COLLATERAL,
id: item.PROMISEDETAIL_ID,
}));
fnClose();
emits("check", { DETAIL, TEXT: row.TEXT, TYPE: row.TYPE });
};
const stop = watch(visible, (val) => {
if (val) {
fnGetData();
stop && stop();
}
});
</script>
<style scoped lang="scss"></style>

View File

@ -1,85 +0,0 @@
<template>
<layout-card>
<layout-table
:data="list"
@get-data="fnGetData"
v-model:pagination="pagination"
>
<el-table-column label="序号" width="60">
<template #default="{ $index }">
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column prop="DEPTNAME" label="部门" />
<el-table-column prop="POST_NAME" label="岗位" />
<el-table-column prop="USERNAME" label="人员" />
<el-table-column prop="SIGNTIME" label="签署时间" />
<el-table-column label="状态">
<template v-slot="{ row }">
{{ row.ISSIGN === 0 ? "未签署" : "已签署" }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template v-slot="{ row }">
<el-button
type="primary"
text
link
@click="fnView(row.PROMISEPEOPLE_ID)"
>
查看
</el-button>
</template>
</el-table-column>
</layout-table>
<view-info
v-model:visible="data.viewDialog.visible"
:info="data.viewDialog.info"
/>
</layout-card>
</template>
<script setup>
import { useRoute } from "vue-router";
import useListData from "@/assets/js/useListData.js";
import {
getAdministrationDetailsList,
getAdministrationDetailsView,
} from "@/request/security_commitment_pro.js";
import { serialNumber } from "@/assets/js/utils.js";
import { reactive } from "vue";
import ViewInfo from "./view.vue";
const route = useRoute();
const { PROMISE_ID } = route.query;
const { list, pagination, fnGetData } = useListData(
getAdministrationDetailsList,
{ otherParams: { PROMISE_ID } }
);
const data = reactive({
viewDialog: {
visible: false,
info: {},
},
});
const fnView = async (PROMISEPEOPLE_ID) => {
const resData = await getAdministrationDetailsView({
PROMISEPEOPLE_ID,
PROMISE_ID,
});
const DETAIL = resData.COLLATERAL.map((item) => ({
value: item.COLLATERAL,
id: item.PROMISEDETAIL_ID,
}));
data.viewDialog.info = {
...resData.varList,
DETAIL,
FILEPATH: resData.ISGN.FILEPATH,
SIGNTIME: resData.ISGN.SIGNTIME,
COVERPEOPLE: resData.COVERPEOPLE[0].USERNAME,
};
data.viewDialog.visible = true;
};
</script>
<style scoped lang="scss"></style>

View File

@ -50,9 +50,9 @@
</el-descriptions> </el-descriptions>
<el-divider content-position="left">反馈情况</el-divider> <el-divider content-position="left">反馈情况</el-divider>
<div class="print_no_use"> <div class="print_no_use">
<layout-table :data="inspectionList" :show-pagination="false" border> <layout-table :data="data.feedbackList" :show-pagination="false" border>
<el-table-column label="序号" type="index" /> <el-table-column label="序号" type="index" />
<el-table-column prop="CHECK_CATEGORY_NAME" label="反馈人" /> <el-table-column prop="NAME" label="反馈人" />
<el-table-column label="是否反馈"> <el-table-column label="是否反馈">
<template v-slot="{ row }"> <template v-slot="{ row }">
<span>{{ row.FEED_BACK ? "是" : "否" }}</span> <span>{{ row.FEED_BACK ? "是" : "否" }}</span>
@ -81,9 +81,9 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(item, index) in inspectionList" :key="index"> <tr v-for="(item, index) in data.feedbackList" :key="index">
<td>{{ index + 1 }}</td> <td>{{ index + 1 }}</td>
<td>{{ item.CHECK_CATEGORY_NAME }}</td> <td>{{ item.NAME }}</td>
<td>{{ item.FEED_BACK ? "是" : "否" }}</td> <td>{{ item.FEED_BACK ? "是" : "否" }}</td>
<td>{{ item.FEED_BACK }}</td> <td>{{ item.FEED_BACK }}</td>
<td> <td>
@ -111,26 +111,13 @@ import { reactive } from "vue";
const route = useRoute(); const route = useRoute();
const FILE_URL = import.meta.env.VITE_FILE_URL; const FILE_URL = import.meta.env.VITE_FILE_URL;
const { SAFETY_MEETING_ID } = route.query; const { SAFETY_MEETING_ID } = route.query;
const inspectionList = [
{
CHECK_CATEGORY_NAME: "123",
FEED_BACK: "FEED_BACK1",
FILEPATH:
"/uploadFiles/file/13cf0f4ec77e4d98ae8cdd9c3386ae0c/20240126/a244a5ed273d4e77b466aa29c4361820.jpg",
},
{
CHECK_CATEGORY_NAME: "123",
FEED_BACK: "FEED_BACK1",
},
{
CHECK_CATEGORY_NAME: "132",
},
];
const data = reactive({ const data = reactive({
form: { form: {
people: [], people: [],
file: [], file: [],
}, },
feedbackList: [],
}); });
const fnGetData = async () => { const fnGetData = async () => {
const resData = await getSafetyMeetingView({ SAFETY_MEETING_ID }); const resData = await getSafetyMeetingView({ SAFETY_MEETING_ID });
@ -141,6 +128,9 @@ const fnGetData = async () => {
if (resData.imgs) { if (resData.imgs) {
data.form.file = addingPrefixToFile(resData.imgs); data.form.file = addingPrefixToFile(resData.imgs);
} }
if (resData.feedbackList) {
data.feedbackList = resData.feedbackList;
}
}; };
fnGetData(); fnGetData();
</script> </script>