From 6bdbeaf4b433859e1f14fdac96aefd255391624a Mon Sep 17 00:00:00 2001 From: dearlin <1261008090@qq.com> Date: Mon, 26 Feb 2024 11:38:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E8=BF=9B=E5=85=A5=E9=83=A8?= =?UTF-8?q?=E9=97=A8=EF=BC=8C=E5=85=81=E8=AE=B8=E8=BF=9B=E5=85=A5=E4=BA=BA?= =?UTF-8?q?=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/request/alarm_configuration.js | 6 ++++ .../components/add.vue | 30 +++++++++++++++---- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/request/alarm_configuration.js b/src/request/alarm_configuration.js index cd4326a..937c2bd 100644 --- a/src/request/alarm_configuration.js +++ b/src/request/alarm_configuration.js @@ -12,6 +12,12 @@ export const setOtherAlarmConfigurationsAdd = (params) => post("/positAlarm/electronicFenceSave", params); // 其他告警配置新增 export const setOtherAlarmConfigurationsEdit = (params) => post("/positAlarm/electronicFenceEdit", params); // 其他告警配置修改 + +export const getPsnInformationList = (params) => + post("/positAlarm/getPsnInfo", params); // 其他告警配置新增 +export const getDeptInformationList = (params) => + post("/positAlarm/getDeptList", params); // 其他告警配置修改 + export const getAlarmInformationList = (params) => post("/positAlarm/getAlArmDataList", params); // 告警信息列表 export const setAlarmInformationBatchProcessing = (params) => diff --git a/src/views/alarm_configuration/other_alarm_configurations/components/add.vue b/src/views/alarm_configuration/other_alarm_configurations/components/add.vue index 44d99bb..02296f2 100644 --- a/src/views/alarm_configuration/other_alarm_configurations/components/add.vue +++ b/src/views/alarm_configuration/other_alarm_configurations/components/add.vue @@ -91,10 +91,10 @@ @@ -181,10 +181,10 @@ @@ -305,6 +305,8 @@ import { getAssignmentTicketAreaSettingsList } from "@/request/map_settings.js"; import { setOtherAlarmConfigurationsAdd, setOtherAlarmConfigurationsEdit, + getPsnInformationList, + getDeptInformationList, } from "@/request/alarm_configuration.js"; const props = defineProps({ @@ -340,6 +342,8 @@ const alarmTypeList = [ { id: "7", label: "越界报警" }, ]; const timeList = [10, 20, 30, 60, 120, 300, 600]; +const psnList = []; +const deptList = []; const predefine = [ "#ff1900", "#ff8c00", @@ -430,6 +434,20 @@ const fnGetRegionList = async (type) => { if (type === 2) gatheringSilentAreasList.value = resData.rows; if (type === 3) clusterAlarmAreaList.value = resData.rows; }; +const fnGetPsnList = async () => { + const resData = await getPsnInformationList(); + resData.data.forEach((item) => { + psnList.push({ value: item.id, label: item.name }); + }); +}; +const fnGetDeptList = async () => { + const resData = await getDeptInformationList(); + resData.rows.forEach((item) => { + deptList.push({ value: item.deptId, label: item.deptName }); + }); +}; +fnGetPsnList(); +fnGetDeptList(); props.isGatheringAlarm === "0" && fnGetRegionList(0); props.isGatheringAlarm === "1" && fnGetRegionList(2); props.isGatheringAlarm === "1" && fnGetRegionList(3);