diff --git a/src/assets/css/element.scss b/src/assets/css/element.scss index f46406f..fe42715 100644 --- a/src/assets/css/element.scss +++ b/src/assets/css/element.scss @@ -406,3 +406,7 @@ --el-notification-close-hover-color: #000 !important; } } + +.el-color-predefine__color-selector.selected { + --el-color-primary: #fff !important; +} diff --git a/src/views/aggregation_management/cluster_alarm_area/index.vue b/src/views/aggregation_management/cluster_alarm_area/index.vue new file mode 100644 index 0000000..df257c3 --- /dev/null +++ b/src/views/aggregation_management/cluster_alarm_area/index.vue @@ -0,0 +1,9 @@ + + + + + + + diff --git a/src/views/aggregation_management/cluster_alarm_configuration/index.vue b/src/views/aggregation_management/cluster_alarm_configuration/index.vue new file mode 100644 index 0000000..24c9930 --- /dev/null +++ b/src/views/aggregation_management/cluster_alarm_configuration/index.vue @@ -0,0 +1,9 @@ + + + + + + + diff --git a/src/views/aggregation_management/gathering_silent_areas/index.vue b/src/views/aggregation_management/gathering_silent_areas/index.vue new file mode 100644 index 0000000..8d9f38d --- /dev/null +++ b/src/views/aggregation_management/gathering_silent_areas/index.vue @@ -0,0 +1,9 @@ + + + + + + + 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 41b3025..44d99bb 100644 --- a/src/views/alarm_configuration/other_alarm_configurations/components/add.vue +++ b/src/views/alarm_configuration/other_alarm_configurations/components/add.vue @@ -11,82 +11,232 @@ - - - - - - {{ item.regName }}(图层:{{ item.layName }}) - - - [未选点] - - - [已停用] - + + + + + + + {{ item.regName }}(图层:{{ item.layName }}) + + + [未选点] + + + [已停用] + + - - - - - - - - - + + + + + + + + + + + + + + + + + + 滞留告警参数 + + + + + + + + + + + + 越界告警参数 + + + + + + + + + + + + + + + + + + + 超员告警参数 + + + + + + + + + + + + + + + + + 缺员告警参数 + + + + + + + + + + + + + + + + + 静止告警参数 + + + + + + + + + + + + 串岗告警参数 + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - 滞留告警参数 + - - + + - - - - 越界告警参数 + + + + - - + + + + + + + - - - - - - - - - - 超员告警参数 - - - - - - + + - - - - - - - - 缺员告警参数 - - - - - - + + - - - - - - - - 静止告警参数 - - - - - - - - - - - - 串岗告警参数 - - - - - - + + - - - - + + + + + + + + + + + + @@ -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); diff --git a/src/views/alarm_configuration/other_alarm_configurations/index.vue b/src/views/alarm_configuration/other_alarm_configurations/index.vue index bf8c378..c0c2b65 100644 --- a/src/views/alarm_configuration/other_alarm_configurations/index.vue +++ b/src/views/alarm_configuration/other_alarm_configurations/index.vue @@ -40,10 +40,12 @@ - {{ row.regions.map((item) => item.regName).join("、") }} + {{ row.regions?.map((item) => item.regName).join("、") }} - 其它告警 + + {{ typeList[isGatheringAlarm] }} + {{ 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" /> @@ -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; } }; diff --git a/src/views/map_settings/assignment_ticket_area_settings/components/add.vue b/src/views/map_settings/assignment_ticket_area_settings/components/add.vue index 570a579..78876bc 100644 --- a/src/views/map_settings/assignment_ticket_area_settings/components/add.vue +++ b/src/views/map_settings/assignment_ticket_area_settings/components/add.vue @@ -8,7 +8,11 @@ - + { const resData = await getSelectRegionTreeVo(); selectRegionTreeVoList.value = resData.data; }; -fnGetSelectRegionTreeVo(); +(props.queryType === "1" || props.queryType === "0") && + fnGetSelectRegionTreeVo(); const fnClose = () => { formRef.value.resetFields(); visible.value = false; diff --git a/src/views/map_settings/assignment_ticket_area_settings/index.vue b/src/views/map_settings/assignment_ticket_area_settings/index.vue index 3ae906c..7b39eb4 100644 --- a/src/views/map_settings/assignment_ticket_area_settings/index.vue +++ b/src/views/map_settings/assignment_ticket_area_settings/index.vue @@ -38,10 +38,12 @@ - - {{ type === 1 ? "作业票区域" : "告警区域" }} - - + {{ typeList[type] }} + {{ 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 },