允许进入部门,允许进入人员

pull/1/head
dearlin 2024-02-26 11:38:17 +08:00
parent 97b43e070f
commit 6bdbeaf4b4
2 changed files with 30 additions and 6 deletions

View File

@ -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) =>

View File

@ -91,10 +91,10 @@
<el-form-item label="允许进入人员" prop="eleCrossed">
<el-select v-model="form.eleCrossed" multiple>
<el-option
v-for="item in timeList"
v-for="item in psnList"
:key="item"
:label="item"
:value="item"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
@ -181,10 +181,10 @@
<el-form-item label="允许进入部门" prop="eleDept">
<el-select v-model="form.eleDept" multiple>
<el-option
v-for="item in timeList"
v-for="item in deptList"
:key="item"
:label="item"
:value="item"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
@ -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);