forked from integrated_whb/integrated_whb_vue
定位管理
parent
dd513a4120
commit
ff65a74e6d
|
@ -406,3 +406,7 @@
|
|||
--el-notification-close-hover-color: #000 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.el-color-predefine__color-selector.selected {
|
||||
--el-color-primary: #fff !important;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<index-view type="3" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import IndexView from "@/views/map_settings/assignment_ticket_area_settings/index.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<index-view is-gathering-alarm="1" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import IndexView from "@/views/alarm_configuration/other_alarm_configurations/index.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<index-view type="2" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import IndexView from "@/views/map_settings/assignment_ticket_area_settings/index.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -11,6 +11,7 @@
|
|||
<el-input v-model="form.eleName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="isGatheringAlarm === '0'">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属图层" prop="regId">
|
||||
<el-select v-model="form.regId" filterable multiple>
|
||||
|
@ -50,17 +51,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="围栏颜色" prop="color">
|
||||
<el-color-picker
|
||||
v-model="form.color"
|
||||
:predefine="[
|
||||
'#ff1900',
|
||||
'#ff8c00',
|
||||
'#fff200',
|
||||
'#006aff',
|
||||
'#00ff1e',
|
||||
'#000000',
|
||||
]"
|
||||
/>
|
||||
<el-color-picker v-model="form.color" :predefine="predefine" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="form.eleType.includes('1')">
|
||||
|
@ -127,7 +118,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="最大人数" prop="overNum">
|
||||
<el-input v-model="form.overNum" />
|
||||
<el-input v-model.number="form.overNum" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
@ -149,7 +140,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="最小人数" prop="lackNum">
|
||||
<el-input v-model="form.lackNum" />
|
||||
<el-input v-model.number="form.lackNum" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
@ -199,6 +190,102 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="isGatheringAlarm === '1'">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="聚集告警区域" prop="regGatherId">
|
||||
<el-select v-model="form.regGatherId" multiple>
|
||||
<el-option
|
||||
v-for="item in clusterAlarmAreaList"
|
||||
:key="item.id"
|
||||
:label="`${item.regName}(${item.layName})`"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="围栏颜色" prop="gatherColor">
|
||||
<el-color-picker
|
||||
v-model="form.gatherColor"
|
||||
:predefine="predefine"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="聚集静默区域" prop="regId">
|
||||
<el-select v-model="form.regId" multiple>
|
||||
<el-option
|
||||
v-for="item in gatheringSilentAreasList"
|
||||
:key="item.id"
|
||||
:label="`${item.regName}(${item.layName})`"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="围栏颜色" prop="color">
|
||||
<el-color-picker v-model="form.color" :predefine="predefine" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="聚集半径(米)" prop="triggerRadius">
|
||||
<el-input v-model.number="form.triggerRadius" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="聚集时间(秒)" prop="eleTimeGather">
|
||||
<el-select v-model="form.eleTimeGather">
|
||||
<el-option
|
||||
v-for="item in timeList"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="一级聚集阈值" prop="gatherParameterA">
|
||||
<el-input v-model.number="form.gatherParameterA" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="一级聚集颜色" prop="gatherParameterColorA">
|
||||
<el-color-picker
|
||||
v-model="form.gatherParameterColorA"
|
||||
:predefine="predefine"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="二级聚集阈值" prop="gatherParameterB">
|
||||
<el-input v-model.number="form.gatherParameterB" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="二级聚集颜色" prop="gatherParameterColorB">
|
||||
<el-color-picker
|
||||
v-model="form.gatherParameterColorB"
|
||||
:predefine="predefine"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="三级聚集阈值" prop="gatherParameterC">
|
||||
<el-input v-model.number="form.gatherParameterC" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="三级聚集颜色" prop="gatherParameterColorC">
|
||||
<el-color-picker
|
||||
v-model="form.gatherParameterColorC"
|
||||
:predefine="predefine"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
|
@ -236,6 +323,11 @@ const props = defineProps({
|
|||
required: true,
|
||||
default: "",
|
||||
},
|
||||
isGatheringAlarm: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
|
@ -248,9 +340,23 @@ const alarmTypeList = [
|
|||
{ id: "7", label: "越界报警" },
|
||||
];
|
||||
const timeList = [10, 20, 30, 60, 120, 300, 600];
|
||||
const predefine = [
|
||||
"#ff1900",
|
||||
"#ff8c00",
|
||||
"#fff200",
|
||||
"#006aff",
|
||||
"#00ff1e",
|
||||
"#000000",
|
||||
];
|
||||
const rules = {
|
||||
eleName: [{ required: true, message: "请输入名称", trigger: "blur" }],
|
||||
regId: [{ required: true, message: "请选择所属图层", trigger: "change" }],
|
||||
regId: [
|
||||
{
|
||||
required: props.isGatheringAlarm === "0",
|
||||
message: "请选择所属图层",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
eleType: [{ required: true, message: "请选择告警类型", trigger: "change" }],
|
||||
color: [{ required: true, message: "请选择围栏颜色", trigger: "change" }],
|
||||
resTime: [{ required: true, message: "请选择滞留时间", trigger: "change" }],
|
||||
|
@ -275,18 +381,58 @@ const rules = {
|
|||
eleTimeDept: [
|
||||
{ required: true, message: "请选择告警间隔", trigger: "change" },
|
||||
],
|
||||
regGatherId: [
|
||||
{ required: true, message: "请选择聚集告警区域", trigger: "change" },
|
||||
],
|
||||
gatherColor: [
|
||||
{ required: true, message: "请选择围栏颜色", trigger: "change" },
|
||||
],
|
||||
triggerRadius: [
|
||||
{ required: true, message: "请输入聚集半径", trigger: "blur" },
|
||||
{ type: "number", message: "请输入数字", trigger: "blur" },
|
||||
],
|
||||
eleTimeGather: [
|
||||
{ required: true, message: "请选择聚集时间", trigger: "change" },
|
||||
],
|
||||
gatherParameterA: [
|
||||
{ required: true, message: "请输入一级聚集阈值", trigger: "blur" },
|
||||
{ type: "number", message: "请输入数字", trigger: "blur" },
|
||||
],
|
||||
gatherParameterColorA: [
|
||||
{ required: true, message: "请选择一级聚集颜色", trigger: "change" },
|
||||
],
|
||||
gatherParameterB: [
|
||||
{ required: true, message: "请输入二级聚集阈值", trigger: "blur" },
|
||||
{ type: "number", message: "请输入数字", trigger: "blur" },
|
||||
],
|
||||
gatherParameterColorB: [
|
||||
{ required: true, message: "请选择二级聚集颜色", trigger: "change" },
|
||||
],
|
||||
gatherParameterC: [
|
||||
{ required: true, message: "请输入三级聚集阈值", trigger: "blur" },
|
||||
{ type: "number", message: "请输入数字", trigger: "blur" },
|
||||
],
|
||||
gatherParameterColorC: [
|
||||
{ required: true, message: "请选择三级聚集颜色", trigger: "change" },
|
||||
],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const regionList = ref([]);
|
||||
const fnGetRegionList = async () => {
|
||||
const clusterAlarmAreaList = ref([]);
|
||||
const gatheringSilentAreasList = ref([]);
|
||||
const fnGetRegionList = async (type) => {
|
||||
const resData = await getAssignmentTicketAreaSettingsList({
|
||||
currentPage: 1,
|
||||
showCount: 99999,
|
||||
type: 0,
|
||||
type,
|
||||
});
|
||||
regionList.value = resData.rows;
|
||||
if (type === 0) regionList.value = resData.rows;
|
||||
if (type === 2) gatheringSilentAreasList.value = resData.rows;
|
||||
if (type === 3) clusterAlarmAreaList.value = resData.rows;
|
||||
};
|
||||
fnGetRegionList();
|
||||
props.isGatheringAlarm === "0" && fnGetRegionList(0);
|
||||
props.isGatheringAlarm === "1" && fnGetRegionList(2);
|
||||
props.isGatheringAlarm === "1" && fnGetRegionList(3);
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
|
@ -297,12 +443,13 @@ const fnSubmit = debounce(
|
|||
await useFormValidate(formRef);
|
||||
const params = {
|
||||
...form.value,
|
||||
isGatheringAlarm: props.isGatheringAlarm,
|
||||
regId: JSON.stringify(form.value.regId),
|
||||
eleType: JSON.stringify(form.value.eleType),
|
||||
eleCrossed: JSON.stringify(form.value.eleCrossed),
|
||||
eleDept: JSON.stringify(form.value.eleDept),
|
||||
regGatherId: JSON.stringify(form.value.regGatherId),
|
||||
};
|
||||
console.log(params);
|
||||
props.type === "add"
|
||||
? await setOtherAlarmConfigurationsAdd(params)
|
||||
: await setOtherAlarmConfigurationsEdit(params);
|
||||
|
|
|
@ -40,10 +40,12 @@
|
|||
<el-table-column label="名称" prop="eleName" />
|
||||
<el-table-column label="所属图层区域">
|
||||
<template #default="{ row }">
|
||||
{{ row.regions.map((item) => item.regName).join("、") }}
|
||||
{{ row.regions?.map((item) => item.regName).join("、") }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型">其它告警</el-table-column>
|
||||
<el-table-column label="类型">
|
||||
{{ typeList[isGatheringAlarm] }}
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="100">
|
||||
<template #default="{ row }">
|
||||
{{ row.status === "1" ? "停用" : "启用" }}
|
||||
|
@ -86,6 +88,7 @@
|
|||
v-model:visible="data.addOrEditDialog.visible"
|
||||
v-model:form="data.addOrEditDialog.form"
|
||||
:type="data.addOrEditDialog.type"
|
||||
:is-gathering-alarm="isGatheringAlarm"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
</div>
|
||||
|
@ -105,9 +108,20 @@ import {
|
|||
import Add from "./components/add.vue";
|
||||
import { nextTick, reactive } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
isGatheringAlarm: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "0",
|
||||
},
|
||||
});
|
||||
const typeList = {
|
||||
0: "其它告警",
|
||||
1: "聚集告警",
|
||||
};
|
||||
const { list, searchForm, tableRef, pagination, fnGetData, fnResetPagination } =
|
||||
useListData(getOtherAlarmConfigurationsList, {
|
||||
otherParams: { isGatheringAlarm: 0 },
|
||||
otherParams: { isGatheringAlarm: props.isGatheringAlarm },
|
||||
defaultSearchForm: { str: "" },
|
||||
key: "rows",
|
||||
});
|
||||
|
@ -130,6 +144,16 @@ const data = reactive({
|
|||
stillTime: "",
|
||||
eleTimeDept: "",
|
||||
eleDept: [],
|
||||
regGatherId: [],
|
||||
gatherColor: "#ff1900",
|
||||
triggerRadius: "",
|
||||
eleTimeGather: "",
|
||||
gatherParameterA: "",
|
||||
gatherParameterColorA: "#ff1900",
|
||||
gatherParameterB: "",
|
||||
gatherParameterColorB: "#ff8c00",
|
||||
gatherParameterC: "",
|
||||
gatherParameterColorC: "#fff200",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
@ -177,6 +201,7 @@ const fnAddOrEdit = async (id, type) => {
|
|||
if (type === "edit") {
|
||||
const resData = await getOtherAlarmConfigurationsView({ id });
|
||||
resData.data.regId = resData.data.regId.map(Number);
|
||||
resData.data.regGatherId = resData.data.regGatherId.map(Number);
|
||||
data.addOrEditDialog.form = resData.data;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -8,7 +8,11 @@
|
|||
<el-form-item label="名称" prop="regName">
|
||||
<el-input v-model="form.regName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属图层" prop="layId">
|
||||
<el-form-item
|
||||
v-if="queryType === '1' || queryType === '0'"
|
||||
label="所属图层"
|
||||
prop="layId"
|
||||
>
|
||||
<el-select v-model="form.layId" filterable>
|
||||
<el-option
|
||||
v-for="item in selectRegionTreeVoList"
|
||||
|
@ -72,6 +76,7 @@ const fnGetSelectRegionTreeVo = async () => {
|
|||
const resData = await getSelectRegionTreeVo();
|
||||
selectRegionTreeVoList.value = resData.data;
|
||||
};
|
||||
(props.queryType === "1" || props.queryType === "0") &&
|
||||
fnGetSelectRegionTreeVo();
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
|
|
|
@ -38,10 +38,12 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" prop="regName" />
|
||||
<el-table-column label="类型">
|
||||
{{ type === 1 ? "作业票区域" : "告警区域" }}
|
||||
</el-table-column>
|
||||
<el-table-column label="所属图层" prop="layName" />
|
||||
<el-table-column label="类型">{{ typeList[type] }}</el-table-column>
|
||||
<el-table-column
|
||||
v-if="type === '1' || type === '0'"
|
||||
label="所属图层"
|
||||
prop="layName"
|
||||
/>
|
||||
<el-table-column label="定位状态" width="100">
|
||||
<template #default="{ row }">
|
||||
{{ row.list.length > 0 ? "已定位" : "未选点" }}
|
||||
|
@ -126,9 +128,16 @@ import SelectingPoints from "./components/selecting_points.vue";
|
|||
const props = defineProps({
|
||||
type: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "1",
|
||||
},
|
||||
});
|
||||
const typeList = {
|
||||
1: "作业票区域",
|
||||
0: "告警区域",
|
||||
3: "聚集告警区域",
|
||||
2: "聚集静默区域",
|
||||
};
|
||||
const { list, searchForm, tableRef, pagination, fnGetData, fnResetPagination } =
|
||||
useListData(getAssignmentTicketAreaSettingsList, {
|
||||
otherParams: { type: props.type },
|
||||
|
|
Loading…
Reference in New Issue